зеркало из https://github.com/microsoft/SandDance.git
Родитель
64a1324297
Коммит
18b56bbc33
|
@ -2362,34 +2362,7 @@ var _defineJsDefault = parcelHelpers.interopDefault(_defineJs);
|
|||
function Color() {}
|
||||
var darker = 0.7;
|
||||
var brighter = 1 / darker;
|
||||
var reI = "\\s*([+-]?\\d+)\\s*", reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*", reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*", reHex = /^#([0-9a-f]{3,8})$/, reRgbInteger = new RegExp("^rgb\\(" + [
|
||||
reI,
|
||||
reI,
|
||||
reI
|
||||
] + "\\)$"), reRgbPercent = new RegExp("^rgb\\(" + [
|
||||
reP,
|
||||
reP,
|
||||
reP
|
||||
] + "\\)$"), reRgbaInteger = new RegExp("^rgba\\(" + [
|
||||
reI,
|
||||
reI,
|
||||
reI,
|
||||
reN
|
||||
] + "\\)$"), reRgbaPercent = new RegExp("^rgba\\(" + [
|
||||
reP,
|
||||
reP,
|
||||
reP,
|
||||
reN
|
||||
] + "\\)$"), reHslPercent = new RegExp("^hsl\\(" + [
|
||||
reN,
|
||||
reP,
|
||||
reP
|
||||
] + "\\)$"), reHslaPercent = new RegExp("^hsla\\(" + [
|
||||
reN,
|
||||
reP,
|
||||
reP,
|
||||
reN
|
||||
] + "\\)$");
|
||||
var reI = "\\s*([+-]?\\d+)\\s*", reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", reHex = /^#([0-9a-f]{3,8})$/, reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`), reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`), reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`), reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`), reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`), reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`);
|
||||
var named = {
|
||||
aliceblue: 0xf0f8ff,
|
||||
antiquewhite: 0xfaebd7,
|
||||
|
@ -2541,14 +2514,15 @@ var named = {
|
|||
yellowgreen: 0x9acd32
|
||||
};
|
||||
(0, _defineJsDefault.default)(Color, color, {
|
||||
copy: function(channels) {
|
||||
copy (channels) {
|
||||
return Object.assign(new this.constructor, this, channels);
|
||||
},
|
||||
displayable: function() {
|
||||
displayable () {
|
||||
return this.rgb().displayable();
|
||||
},
|
||||
hex: color_formatHex,
|
||||
formatHex: color_formatHex,
|
||||
formatHex8: color_formatHex8,
|
||||
formatHsl: color_formatHsl,
|
||||
formatRgb: color_formatRgb,
|
||||
toString: color_formatRgb
|
||||
|
@ -2556,6 +2530,9 @@ var named = {
|
|||
function color_formatHex() {
|
||||
return this.rgb().formatHex();
|
||||
}
|
||||
function color_formatHex8() {
|
||||
return this.rgb().formatHex8();
|
||||
}
|
||||
function color_formatHsl() {
|
||||
return hslConvert(this).formatHsl();
|
||||
}
|
||||
|
@ -2603,35 +2580,47 @@ function Rgb(r, g, b, opacity) {
|
|||
this.opacity = +opacity;
|
||||
}
|
||||
(0, _defineJsDefault.default)(Rgb, rgb, (0, _defineJs.extend)(Color, {
|
||||
brighter: function(k) {
|
||||
brighter (k) {
|
||||
k = k == null ? brighter : Math.pow(brighter, k);
|
||||
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
||||
},
|
||||
darker: function(k) {
|
||||
darker (k) {
|
||||
k = k == null ? darker : Math.pow(darker, k);
|
||||
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
||||
},
|
||||
rgb: function() {
|
||||
rgb () {
|
||||
return this;
|
||||
},
|
||||
displayable: function() {
|
||||
clamp () {
|
||||
return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
|
||||
},
|
||||
displayable () {
|
||||
return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
|
||||
},
|
||||
hex: rgb_formatHex,
|
||||
formatHex: rgb_formatHex,
|
||||
formatHex8: rgb_formatHex8,
|
||||
formatRgb: rgb_formatRgb,
|
||||
toString: rgb_formatRgb
|
||||
}));
|
||||
function rgb_formatHex() {
|
||||
return "#" + hex(this.r) + hex(this.g) + hex(this.b);
|
||||
return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;
|
||||
}
|
||||
function rgb_formatHex8() {
|
||||
return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
||||
}
|
||||
function rgb_formatRgb() {
|
||||
var a = this.opacity;
|
||||
a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
||||
return (a === 1 ? "rgb(" : "rgba(") + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + (a === 1 ? ")" : ", " + a + ")");
|
||||
const a = clampa(this.opacity);
|
||||
return `${a === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`;
|
||||
}
|
||||
function clampa(opacity) {
|
||||
return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
|
||||
}
|
||||
function clampi(value) {
|
||||
return Math.max(0, Math.min(255, Math.round(value) || 0));
|
||||
}
|
||||
function hex(value) {
|
||||
value = Math.max(0, Math.min(255, Math.round(value) || 0));
|
||||
value = clampi(value);
|
||||
return (value < 16 ? "0" : "") + value.toString(16);
|
||||
}
|
||||
function hsla(h, s, l, a) {
|
||||
|
@ -2666,27 +2655,36 @@ function Hsl(h, s, l, opacity) {
|
|||
this.opacity = +opacity;
|
||||
}
|
||||
(0, _defineJsDefault.default)(Hsl, hsl, (0, _defineJs.extend)(Color, {
|
||||
brighter: function(k) {
|
||||
brighter (k) {
|
||||
k = k == null ? brighter : Math.pow(brighter, k);
|
||||
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
||||
},
|
||||
darker: function(k) {
|
||||
darker (k) {
|
||||
k = k == null ? darker : Math.pow(darker, k);
|
||||
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
||||
},
|
||||
rgb: function() {
|
||||
rgb () {
|
||||
var h = this.h % 360 + (this.h < 0) * 360, s = isNaN(h) || isNaN(this.s) ? 0 : this.s, l = this.l, m2 = l + (l < 0.5 ? l : 1 - l) * s, m1 = 2 * l - m2;
|
||||
return new Rgb(hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), hsl2rgb(h, m1, m2), hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), this.opacity);
|
||||
},
|
||||
displayable: function() {
|
||||
clamp () {
|
||||
return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
|
||||
},
|
||||
displayable () {
|
||||
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
|
||||
},
|
||||
formatHsl: function() {
|
||||
var a = this.opacity;
|
||||
a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
||||
return (a === 1 ? "hsl(" : "hsla(") + (this.h || 0) + ", " + (this.s || 0) * 100 + "%, " + (this.l || 0) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")");
|
||||
formatHsl () {
|
||||
const a = clampa(this.opacity);
|
||||
return `${a === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`;
|
||||
}
|
||||
}));
|
||||
function clamph(value) {
|
||||
value = (value || 0) % 360;
|
||||
return value < 0 ? value + 360 : value;
|
||||
}
|
||||
function clampt(value) {
|
||||
return Math.max(0, Math.min(1, value || 0));
|
||||
}
|
||||
/* From FvD 13.37, CSS Color Module Level 3 */ function hsl2rgb(h, m1, m2) {
|
||||
return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;
|
||||
}
|
||||
|
@ -39103,6 +39101,13 @@ class AxesCorrelation {
|
|||
function createAxes(cartesian, dim2d, dim3d, axis, orientation, height, props, facetLabel) {
|
||||
const domain = (axis === null || axis === void 0 ? void 0 : axis.domain) || nullDomain;
|
||||
const { tickPositions , tickText , textPos , textSize } = convertAxis(axis, domain, dim2d, height);
|
||||
if (axis.axisRole === "z") {
|
||||
tickPositions.forEach((t, i)=>tickPositions[i] = 1 - t);
|
||||
textPos.forEach((t, i)=>textPos[i] = 1 - t);
|
||||
tickText.reverse();
|
||||
tickPositions.reverse();
|
||||
textPos.reverse();
|
||||
}
|
||||
cartesian.setTickPositions(dim3d, tickPositions);
|
||||
cartesian.zero[dim3d] = 0; //TODO get any "zero" gridline position from vega
|
||||
cartesian.setLabelPositions(dim3d, textPos);
|
||||
|
@ -39146,9 +39151,11 @@ function getDomainBounds(dim2d, axis) {
|
|||
};
|
||||
}
|
||||
function convertAxis(axis, domain, dim, height) {
|
||||
const tickPositions = axis ? axis.ticks.map((t)=>(t.sourcePosition[dim] - domain.sourcePosition[dim]) / (domain.targetPosition[dim] - domain.sourcePosition[dim])) : [];
|
||||
const start = domain.sourcePosition[dim];
|
||||
const span = domain.targetPosition[dim] - start;
|
||||
const tickPositions = axis ? axis.ticks.map((t)=>(t.sourcePosition[dim] - start) / span) : [];
|
||||
const tickText = axis ? axis.tickText.map((t)=>t.text) : [];
|
||||
const textPos = axis ? axis.tickText.map((t)=>(t.position[dim] - domain.sourcePosition[dim]) / (domain.targetPosition[dim] - domain.sourcePosition[dim])) : [];
|
||||
const textPos = axis ? axis.tickText.map((t)=>(t.position[dim] - start) / span) : [];
|
||||
const textSize = axis ? axis.tickText.map((t)=>t.size / height) : [];
|
||||
if (tickPositions.length) {
|
||||
if (tickPositions[0] !== 0) tickPositions[0] = 0;
|
||||
|
@ -40133,7 +40140,7 @@ const RendererGl = _RendererGl;
|
|||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
parcelHelpers.defineInteropFlag(exports);
|
||||
parcelHelpers.export(exports, "version", ()=>version);
|
||||
const version = "1.0.3";
|
||||
const version = "1.0.4";
|
||||
|
||||
},{"@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"cHhTd":[function(require,module,exports) {
|
||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
|
@ -43912,7 +43919,7 @@ exports.default = function(step, max) {
|
|||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
parcelHelpers.defineInteropFlag(exports);
|
||||
parcelHelpers.export(exports, "version", ()=>version);
|
||||
const version = "4.0.1";
|
||||
const version = "4.0.2";
|
||||
|
||||
},{"@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"4RaV2":[function(require,module,exports) {
|
||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
|
@ -44122,7 +44129,7 @@ function use(react, reactDOM, vega) {
|
|||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
parcelHelpers.defineInteropFlag(exports);
|
||||
parcelHelpers.export(exports, "version", ()=>version);
|
||||
const version = "4.0.0";
|
||||
const version = "4.0.1";
|
||||
|
||||
},{"@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"7qvdA":[function(require,module,exports) {
|
||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
|
@ -46634,7 +46641,7 @@ const capabilities = {
|
|||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
parcelHelpers.defineInteropFlag(exports);
|
||||
parcelHelpers.export(exports, "version", ()=>version);
|
||||
const version = "4.0.2";
|
||||
const version = "4.0.3";
|
||||
|
||||
},{"@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"jdUx0":[function(require,module,exports) {
|
||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
|
@ -53236,8 +53243,15 @@ function _Renderer(_props) {
|
|||
}
|
||||
setOptions(newOptions) {
|
||||
const { explorer } = this.props;
|
||||
const renderer = Object.assign(Object.assign({}, explorer.state.renderer), newOptions);
|
||||
const { onSetupOptionsChanged } = explorer.props;
|
||||
if (onSetupOptionsChanged) {
|
||||
const setup = explorer.getSetup();
|
||||
setup.renderer = renderer;
|
||||
onSetupOptionsChanged(setup);
|
||||
}
|
||||
explorer.setState({
|
||||
renderer: Object.assign(Object.assign({}, explorer.state.renderer), newOptions)
|
||||
renderer
|
||||
});
|
||||
}
|
||||
setBasicOptions(newOptions) {
|
||||
|
|
Двоичный файл не отображается.
Двоичные данные
docs/dist/powerbi/v4/SandDance201929976D117A654D0BAB8E96507442D80B.4.1.0.pbiviz
поставляемый
Normal file
Двоичные данные
docs/dist/powerbi/v4/SandDance201929976D117A654D0BAB8E96507442D80B.4.1.0.pbiviz
поставляемый
Normal file
Двоичный файл не отображается.
|
@ -1685,34 +1685,7 @@ function $67aa9bbf7ac601ea$export$8b58be045bf06082(parent, definition) {
|
|||
function $fe67bfce8e40eaac$export$892596cec99bc70e() {}
|
||||
var $fe67bfce8e40eaac$export$4adafc6ed0600c10 = 0.7;
|
||||
var $fe67bfce8e40eaac$export$9eace2cc0d12c98d = 1 / $fe67bfce8e40eaac$export$4adafc6ed0600c10;
|
||||
var $fe67bfce8e40eaac$var$reI = "\\s*([+-]?\\d+)\\s*", $fe67bfce8e40eaac$var$reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*", $fe67bfce8e40eaac$var$reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*", $fe67bfce8e40eaac$var$reHex = /^#([0-9a-f]{3,8})$/, $fe67bfce8e40eaac$var$reRgbInteger = new RegExp("^rgb\\(" + [
|
||||
$fe67bfce8e40eaac$var$reI,
|
||||
$fe67bfce8e40eaac$var$reI,
|
||||
$fe67bfce8e40eaac$var$reI
|
||||
] + "\\)$"), $fe67bfce8e40eaac$var$reRgbPercent = new RegExp("^rgb\\(" + [
|
||||
$fe67bfce8e40eaac$var$reP,
|
||||
$fe67bfce8e40eaac$var$reP,
|
||||
$fe67bfce8e40eaac$var$reP
|
||||
] + "\\)$"), $fe67bfce8e40eaac$var$reRgbaInteger = new RegExp("^rgba\\(" + [
|
||||
$fe67bfce8e40eaac$var$reI,
|
||||
$fe67bfce8e40eaac$var$reI,
|
||||
$fe67bfce8e40eaac$var$reI,
|
||||
$fe67bfce8e40eaac$var$reN
|
||||
] + "\\)$"), $fe67bfce8e40eaac$var$reRgbaPercent = new RegExp("^rgba\\(" + [
|
||||
$fe67bfce8e40eaac$var$reP,
|
||||
$fe67bfce8e40eaac$var$reP,
|
||||
$fe67bfce8e40eaac$var$reP,
|
||||
$fe67bfce8e40eaac$var$reN
|
||||
] + "\\)$"), $fe67bfce8e40eaac$var$reHslPercent = new RegExp("^hsl\\(" + [
|
||||
$fe67bfce8e40eaac$var$reN,
|
||||
$fe67bfce8e40eaac$var$reP,
|
||||
$fe67bfce8e40eaac$var$reP
|
||||
] + "\\)$"), $fe67bfce8e40eaac$var$reHslaPercent = new RegExp("^hsla\\(" + [
|
||||
$fe67bfce8e40eaac$var$reN,
|
||||
$fe67bfce8e40eaac$var$reP,
|
||||
$fe67bfce8e40eaac$var$reP,
|
||||
$fe67bfce8e40eaac$var$reN
|
||||
] + "\\)$");
|
||||
var $fe67bfce8e40eaac$var$reI = "\\s*([+-]?\\d+)\\s*", $fe67bfce8e40eaac$var$reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", $fe67bfce8e40eaac$var$reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", $fe67bfce8e40eaac$var$reHex = /^#([0-9a-f]{3,8})$/, $fe67bfce8e40eaac$var$reRgbInteger = new RegExp(`^rgb\\(${$fe67bfce8e40eaac$var$reI},${$fe67bfce8e40eaac$var$reI},${$fe67bfce8e40eaac$var$reI}\\)$`), $fe67bfce8e40eaac$var$reRgbPercent = new RegExp(`^rgb\\(${$fe67bfce8e40eaac$var$reP},${$fe67bfce8e40eaac$var$reP},${$fe67bfce8e40eaac$var$reP}\\)$`), $fe67bfce8e40eaac$var$reRgbaInteger = new RegExp(`^rgba\\(${$fe67bfce8e40eaac$var$reI},${$fe67bfce8e40eaac$var$reI},${$fe67bfce8e40eaac$var$reI},${$fe67bfce8e40eaac$var$reN}\\)$`), $fe67bfce8e40eaac$var$reRgbaPercent = new RegExp(`^rgba\\(${$fe67bfce8e40eaac$var$reP},${$fe67bfce8e40eaac$var$reP},${$fe67bfce8e40eaac$var$reP},${$fe67bfce8e40eaac$var$reN}\\)$`), $fe67bfce8e40eaac$var$reHslPercent = new RegExp(`^hsl\\(${$fe67bfce8e40eaac$var$reN},${$fe67bfce8e40eaac$var$reP},${$fe67bfce8e40eaac$var$reP}\\)$`), $fe67bfce8e40eaac$var$reHslaPercent = new RegExp(`^hsla\\(${$fe67bfce8e40eaac$var$reN},${$fe67bfce8e40eaac$var$reP},${$fe67bfce8e40eaac$var$reP},${$fe67bfce8e40eaac$var$reN}\\)$`);
|
||||
var $fe67bfce8e40eaac$var$named = {
|
||||
aliceblue: 0xf0f8ff,
|
||||
antiquewhite: 0xfaebd7,
|
||||
|
@ -1864,14 +1837,15 @@ var $fe67bfce8e40eaac$var$named = {
|
|||
yellowgreen: 0x9acd32
|
||||
};
|
||||
(0, $67aa9bbf7ac601ea$export$2e2bcd8739ae039)($fe67bfce8e40eaac$export$892596cec99bc70e, $fe67bfce8e40eaac$export$2e2bcd8739ae039, {
|
||||
copy: function(channels) {
|
||||
copy (channels) {
|
||||
return Object.assign(new this.constructor, this, channels);
|
||||
},
|
||||
displayable: function() {
|
||||
displayable () {
|
||||
return this.rgb().displayable();
|
||||
},
|
||||
hex: $fe67bfce8e40eaac$var$color_formatHex,
|
||||
formatHex: $fe67bfce8e40eaac$var$color_formatHex,
|
||||
formatHex8: $fe67bfce8e40eaac$var$color_formatHex8,
|
||||
formatHsl: $fe67bfce8e40eaac$var$color_formatHsl,
|
||||
formatRgb: $fe67bfce8e40eaac$var$color_formatRgb,
|
||||
toString: $fe67bfce8e40eaac$var$color_formatRgb
|
||||
|
@ -1879,6 +1853,9 @@ var $fe67bfce8e40eaac$var$named = {
|
|||
function $fe67bfce8e40eaac$var$color_formatHex() {
|
||||
return this.rgb().formatHex();
|
||||
}
|
||||
function $fe67bfce8e40eaac$var$color_formatHex8() {
|
||||
return this.rgb().formatHex8();
|
||||
}
|
||||
function $fe67bfce8e40eaac$var$color_formatHsl() {
|
||||
return $fe67bfce8e40eaac$export$8133dc3fa904d6d1(this).formatHsl();
|
||||
}
|
||||
|
@ -1925,35 +1902,47 @@ function $fe67bfce8e40eaac$export$5e05a94393ac29e3(r, g, b, opacity) {
|
|||
this.opacity = +opacity;
|
||||
}
|
||||
(0, $67aa9bbf7ac601ea$export$2e2bcd8739ae039)($fe67bfce8e40eaac$export$5e05a94393ac29e3, $fe67bfce8e40eaac$export$8972dc0e6ad9238f, (0, $67aa9bbf7ac601ea$export$8b58be045bf06082)($fe67bfce8e40eaac$export$892596cec99bc70e, {
|
||||
brighter: function(k) {
|
||||
brighter (k) {
|
||||
k = k == null ? $fe67bfce8e40eaac$export$9eace2cc0d12c98d : Math.pow($fe67bfce8e40eaac$export$9eace2cc0d12c98d, k);
|
||||
return new $fe67bfce8e40eaac$export$5e05a94393ac29e3(this.r * k, this.g * k, this.b * k, this.opacity);
|
||||
},
|
||||
darker: function(k) {
|
||||
darker (k) {
|
||||
k = k == null ? $fe67bfce8e40eaac$export$4adafc6ed0600c10 : Math.pow($fe67bfce8e40eaac$export$4adafc6ed0600c10, k);
|
||||
return new $fe67bfce8e40eaac$export$5e05a94393ac29e3(this.r * k, this.g * k, this.b * k, this.opacity);
|
||||
},
|
||||
rgb: function() {
|
||||
rgb () {
|
||||
return this;
|
||||
},
|
||||
displayable: function() {
|
||||
clamp () {
|
||||
return new $fe67bfce8e40eaac$export$5e05a94393ac29e3($fe67bfce8e40eaac$var$clampi(this.r), $fe67bfce8e40eaac$var$clampi(this.g), $fe67bfce8e40eaac$var$clampi(this.b), $fe67bfce8e40eaac$var$clampa(this.opacity));
|
||||
},
|
||||
displayable () {
|
||||
return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
|
||||
},
|
||||
hex: $fe67bfce8e40eaac$var$rgb_formatHex,
|
||||
formatHex: $fe67bfce8e40eaac$var$rgb_formatHex,
|
||||
formatHex8: $fe67bfce8e40eaac$var$rgb_formatHex8,
|
||||
formatRgb: $fe67bfce8e40eaac$var$rgb_formatRgb,
|
||||
toString: $fe67bfce8e40eaac$var$rgb_formatRgb
|
||||
}));
|
||||
function $fe67bfce8e40eaac$var$rgb_formatHex() {
|
||||
return "#" + $fe67bfce8e40eaac$var$hex(this.r) + $fe67bfce8e40eaac$var$hex(this.g) + $fe67bfce8e40eaac$var$hex(this.b);
|
||||
return `#${$fe67bfce8e40eaac$var$hex(this.r)}${$fe67bfce8e40eaac$var$hex(this.g)}${$fe67bfce8e40eaac$var$hex(this.b)}`;
|
||||
}
|
||||
function $fe67bfce8e40eaac$var$rgb_formatHex8() {
|
||||
return `#${$fe67bfce8e40eaac$var$hex(this.r)}${$fe67bfce8e40eaac$var$hex(this.g)}${$fe67bfce8e40eaac$var$hex(this.b)}${$fe67bfce8e40eaac$var$hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
||||
}
|
||||
function $fe67bfce8e40eaac$var$rgb_formatRgb() {
|
||||
var a = this.opacity;
|
||||
a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
||||
return (a === 1 ? "rgb(" : "rgba(") + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + (a === 1 ? ")" : ", " + a + ")");
|
||||
const a = $fe67bfce8e40eaac$var$clampa(this.opacity);
|
||||
return `${a === 1 ? "rgb(" : "rgba("}${$fe67bfce8e40eaac$var$clampi(this.r)}, ${$fe67bfce8e40eaac$var$clampi(this.g)}, ${$fe67bfce8e40eaac$var$clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`;
|
||||
}
|
||||
function $fe67bfce8e40eaac$var$clampa(opacity) {
|
||||
return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
|
||||
}
|
||||
function $fe67bfce8e40eaac$var$clampi(value) {
|
||||
return Math.max(0, Math.min(255, Math.round(value) || 0));
|
||||
}
|
||||
function $fe67bfce8e40eaac$var$hex(value) {
|
||||
value = Math.max(0, Math.min(255, Math.round(value) || 0));
|
||||
value = $fe67bfce8e40eaac$var$clampi(value);
|
||||
return (value < 16 ? "0" : "") + value.toString(16);
|
||||
}
|
||||
function $fe67bfce8e40eaac$var$hsla(h, s, l, a) {
|
||||
|
@ -1988,27 +1977,36 @@ function $fe67bfce8e40eaac$var$Hsl(h, s, l, opacity) {
|
|||
this.opacity = +opacity;
|
||||
}
|
||||
(0, $67aa9bbf7ac601ea$export$2e2bcd8739ae039)($fe67bfce8e40eaac$var$Hsl, $fe67bfce8e40eaac$export$8f4a7c0bb78e6ea8, (0, $67aa9bbf7ac601ea$export$8b58be045bf06082)($fe67bfce8e40eaac$export$892596cec99bc70e, {
|
||||
brighter: function(k) {
|
||||
brighter (k) {
|
||||
k = k == null ? $fe67bfce8e40eaac$export$9eace2cc0d12c98d : Math.pow($fe67bfce8e40eaac$export$9eace2cc0d12c98d, k);
|
||||
return new $fe67bfce8e40eaac$var$Hsl(this.h, this.s, this.l * k, this.opacity);
|
||||
},
|
||||
darker: function(k) {
|
||||
darker (k) {
|
||||
k = k == null ? $fe67bfce8e40eaac$export$4adafc6ed0600c10 : Math.pow($fe67bfce8e40eaac$export$4adafc6ed0600c10, k);
|
||||
return new $fe67bfce8e40eaac$var$Hsl(this.h, this.s, this.l * k, this.opacity);
|
||||
},
|
||||
rgb: function() {
|
||||
rgb () {
|
||||
var h = this.h % 360 + (this.h < 0) * 360, s = isNaN(h) || isNaN(this.s) ? 0 : this.s, l = this.l, m2 = l + (l < 0.5 ? l : 1 - l) * s, m1 = 2 * l - m2;
|
||||
return new $fe67bfce8e40eaac$export$5e05a94393ac29e3($fe67bfce8e40eaac$var$hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), $fe67bfce8e40eaac$var$hsl2rgb(h, m1, m2), $fe67bfce8e40eaac$var$hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), this.opacity);
|
||||
},
|
||||
displayable: function() {
|
||||
clamp () {
|
||||
return new $fe67bfce8e40eaac$var$Hsl($fe67bfce8e40eaac$var$clamph(this.h), $fe67bfce8e40eaac$var$clampt(this.s), $fe67bfce8e40eaac$var$clampt(this.l), $fe67bfce8e40eaac$var$clampa(this.opacity));
|
||||
},
|
||||
displayable () {
|
||||
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
|
||||
},
|
||||
formatHsl: function() {
|
||||
var a = this.opacity;
|
||||
a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
||||
return (a === 1 ? "hsl(" : "hsla(") + (this.h || 0) + ", " + (this.s || 0) * 100 + "%, " + (this.l || 0) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")");
|
||||
formatHsl () {
|
||||
const a = $fe67bfce8e40eaac$var$clampa(this.opacity);
|
||||
return `${a === 1 ? "hsl(" : "hsla("}${$fe67bfce8e40eaac$var$clamph(this.h)}, ${$fe67bfce8e40eaac$var$clampt(this.s) * 100}%, ${$fe67bfce8e40eaac$var$clampt(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`;
|
||||
}
|
||||
}));
|
||||
function $fe67bfce8e40eaac$var$clamph(value) {
|
||||
value = (value || 0) % 360;
|
||||
return value < 0 ? value + 360 : value;
|
||||
}
|
||||
function $fe67bfce8e40eaac$var$clampt(value) {
|
||||
return Math.max(0, Math.min(1, value || 0));
|
||||
}
|
||||
/* From FvD 13.37, CSS Color Module Level 3 */ function $fe67bfce8e40eaac$var$hsl2rgb(h, m1, m2) {
|
||||
return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;
|
||||
}
|
||||
|
@ -33413,6 +33411,13 @@ class $b29bcea612a8cd83$var$AxesCorrelation {
|
|||
function $b29bcea612a8cd83$var$createAxes(cartesian, dim2d, dim3d, axis, orientation, height, props, facetLabel) {
|
||||
const domain = (axis === null || axis === void 0 ? void 0 : axis.domain) || $b29bcea612a8cd83$var$nullDomain;
|
||||
const { tickPositions: tickPositions , tickText: tickText , textPos: textPos , textSize: textSize } = $b29bcea612a8cd83$var$convertAxis(axis, domain, dim2d, height);
|
||||
if (axis.axisRole === "z") {
|
||||
tickPositions.forEach((t, i)=>tickPositions[i] = 1 - t);
|
||||
textPos.forEach((t, i)=>textPos[i] = 1 - t);
|
||||
tickText.reverse();
|
||||
tickPositions.reverse();
|
||||
textPos.reverse();
|
||||
}
|
||||
cartesian.setTickPositions(dim3d, tickPositions);
|
||||
cartesian.zero[dim3d] = 0; //TODO get any "zero" gridline position from vega
|
||||
cartesian.setLabelPositions(dim3d, textPos);
|
||||
|
@ -33456,9 +33461,11 @@ function $b29bcea612a8cd83$var$getDomainBounds(dim2d, axis) {
|
|||
};
|
||||
}
|
||||
function $b29bcea612a8cd83$var$convertAxis(axis, domain, dim, height) {
|
||||
const tickPositions = axis ? axis.ticks.map((t)=>(t.sourcePosition[dim] - domain.sourcePosition[dim]) / (domain.targetPosition[dim] - domain.sourcePosition[dim])) : [];
|
||||
const start = domain.sourcePosition[dim];
|
||||
const span = domain.targetPosition[dim] - start;
|
||||
const tickPositions = axis ? axis.ticks.map((t)=>(t.sourcePosition[dim] - start) / span) : [];
|
||||
const tickText = axis ? axis.tickText.map((t)=>t.text) : [];
|
||||
const textPos = axis ? axis.tickText.map((t)=>(t.position[dim] - domain.sourcePosition[dim]) / (domain.targetPosition[dim] - domain.sourcePosition[dim])) : [];
|
||||
const textPos = axis ? axis.tickText.map((t)=>(t.position[dim] - start) / span) : [];
|
||||
const textSize = axis ? axis.tickText.map((t)=>t.size / height) : [];
|
||||
if (tickPositions.length) {
|
||||
if (tickPositions[0] !== 0) tickPositions[0] = 0;
|
||||
|
@ -34572,7 +34579,7 @@ const $d35dded7832c8625$export$6d8f9057dcd7f9e6 = $d35dded7832c8625$var$_ViewGl;
|
|||
|
||||
|
||||
|
||||
const $6cb4b91d47e414da$export$83d89fbfd8236492 = "1.0.3";
|
||||
const $6cb4b91d47e414da$export$83d89fbfd8236492 = "1.0.4";
|
||||
|
||||
|
||||
$parcel$exportWildcard($77c6d719b6f16e7d$exports, $20fbdb0de5c041fa$exports);
|
||||
|
@ -37743,7 +37750,7 @@ class $0000a41cc7b5918f$export$2ec4afd9b3c16a85 {
|
|||
*/ $0000a41cc7b5918f$export$2ec4afd9b3c16a85.defaultViewerOptions = (0, $74c2763994d75bb8$export$fb736e4909afb3d7);
|
||||
|
||||
|
||||
const $15874c145702a1a4$export$83d89fbfd8236492 = "4.0.1";
|
||||
const $15874c145702a1a4$export$83d89fbfd8236492 = "4.0.2";
|
||||
|
||||
|
||||
const $3b509b9541e52a8f$export$1f96ae73734a86cc = (0, $94c0add5c61b9a48$export$1f96ae73734a86cc);
|
||||
|
@ -37931,7 +37938,7 @@ const $81745c046077d503$export$2ec4afd9b3c16a85 = $81745c046077d503$var$_Viewer;
|
|||
|
||||
|
||||
|
||||
const $b7e03869cd46da1e$export$83d89fbfd8236492 = "4.0.0";
|
||||
const $b7e03869cd46da1e$export$83d89fbfd8236492 = "4.0.1";
|
||||
|
||||
|
||||
|
||||
|
@ -40098,7 +40105,7 @@ const $29728562a99c68a2$export$8e76ac9f37578d1b = {
|
|||
|
||||
|
||||
|
||||
const $f56a95f33c4cc847$export$83d89fbfd8236492 = "4.0.2";
|
||||
const $f56a95f33c4cc847$export$83d89fbfd8236492 = "4.0.3";
|
||||
|
||||
|
||||
var $4805700d8b417596$var$SandDance = $3b509b9541e52a8f$exports;
|
||||
|
@ -45322,8 +45329,15 @@ function $dc870545cd7ec4ba$var$_Renderer(_props) {
|
|||
}
|
||||
setOptions(newOptions) {
|
||||
const { explorer: explorer } = this.props;
|
||||
const renderer = Object.assign(Object.assign({}, explorer.state.renderer), newOptions);
|
||||
const { onSetupOptionsChanged: onSetupOptionsChanged } = explorer.props;
|
||||
if (onSetupOptionsChanged) {
|
||||
const setup = explorer.getSetup();
|
||||
setup.renderer = renderer;
|
||||
onSetupOptionsChanged(setup);
|
||||
}
|
||||
explorer.setState({
|
||||
renderer: Object.assign(Object.assign({}, explorer.state.renderer), newOptions)
|
||||
renderer: renderer
|
||||
});
|
||||
}
|
||||
setBasicOptions(newOptions) {
|
||||
|
|
|
@ -254,7 +254,7 @@
|
|||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
const version = '4.0.0';
|
||||
const version = '4.0.1';
|
||||
|
||||
exports.SandDance = SandDance__namespace;
|
||||
exports.Viewer = Viewer;
|
||||
|
|
|
@ -1231,15 +1231,15 @@
|
|||
var brighter$2 = 1 / darker$2;
|
||||
|
||||
var reI$2 = "\\s*([+-]?\\d+)\\s*",
|
||||
reN$2 = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
|
||||
reP$2 = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
|
||||
reN$2 = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",
|
||||
reP$2 = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
|
||||
reHex$2 = /^#([0-9a-f]{3,8})$/,
|
||||
reRgbInteger$2 = new RegExp("^rgb\\(" + [reI$2, reI$2, reI$2] + "\\)$"),
|
||||
reRgbPercent$2 = new RegExp("^rgb\\(" + [reP$2, reP$2, reP$2] + "\\)$"),
|
||||
reRgbaInteger$2 = new RegExp("^rgba\\(" + [reI$2, reI$2, reI$2, reN$2] + "\\)$"),
|
||||
reRgbaPercent$2 = new RegExp("^rgba\\(" + [reP$2, reP$2, reP$2, reN$2] + "\\)$"),
|
||||
reHslPercent$2 = new RegExp("^hsl\\(" + [reN$2, reP$2, reP$2] + "\\)$"),
|
||||
reHslaPercent$2 = new RegExp("^hsla\\(" + [reN$2, reP$2, reP$2, reN$2] + "\\)$");
|
||||
reRgbInteger$2 = new RegExp(`^rgb\\(${reI$2},${reI$2},${reI$2}\\)$`),
|
||||
reRgbPercent$2 = new RegExp(`^rgb\\(${reP$2},${reP$2},${reP$2}\\)$`),
|
||||
reRgbaInteger$2 = new RegExp(`^rgba\\(${reI$2},${reI$2},${reI$2},${reN$2}\\)$`),
|
||||
reRgbaPercent$2 = new RegExp(`^rgba\\(${reP$2},${reP$2},${reP$2},${reN$2}\\)$`),
|
||||
reHslPercent$2 = new RegExp(`^hsl\\(${reN$2},${reP$2},${reP$2}\\)$`),
|
||||
reHslaPercent$2 = new RegExp(`^hsla\\(${reN$2},${reP$2},${reP$2},${reN$2}\\)$`);
|
||||
|
||||
var named$2 = {
|
||||
aliceblue: 0xf0f8ff,
|
||||
|
@ -1393,14 +1393,15 @@
|
|||
};
|
||||
|
||||
define$2(Color$3, color$2, {
|
||||
copy: function(channels) {
|
||||
copy(channels) {
|
||||
return Object.assign(new this.constructor, this, channels);
|
||||
},
|
||||
displayable: function() {
|
||||
displayable() {
|
||||
return this.rgb().displayable();
|
||||
},
|
||||
hex: color_formatHex$2, // Deprecated! Use color.formatHex.
|
||||
formatHex: color_formatHex$2,
|
||||
formatHex8: color_formatHex8$2,
|
||||
formatHsl: color_formatHsl$2,
|
||||
formatRgb: color_formatRgb$2,
|
||||
toString: color_formatRgb$2
|
||||
|
@ -1410,6 +1411,10 @@
|
|||
return this.rgb().formatHex();
|
||||
}
|
||||
|
||||
function color_formatHex8$2() {
|
||||
return this.rgb().formatHex8();
|
||||
}
|
||||
|
||||
function color_formatHsl$2() {
|
||||
return hslConvert$2(this).formatHsl();
|
||||
}
|
||||
|
@ -1465,18 +1470,21 @@
|
|||
}
|
||||
|
||||
define$2(Rgb$2, rgb$3, extend$2(Color$3, {
|
||||
brighter: function(k) {
|
||||
brighter(k) {
|
||||
k = k == null ? brighter$2 : Math.pow(brighter$2, k);
|
||||
return new Rgb$2(this.r * k, this.g * k, this.b * k, this.opacity);
|
||||
},
|
||||
darker: function(k) {
|
||||
darker(k) {
|
||||
k = k == null ? darker$2 : Math.pow(darker$2, k);
|
||||
return new Rgb$2(this.r * k, this.g * k, this.b * k, this.opacity);
|
||||
},
|
||||
rgb: function() {
|
||||
rgb() {
|
||||
return this;
|
||||
},
|
||||
displayable: function() {
|
||||
clamp() {
|
||||
return new Rgb$2(clampi$2(this.r), clampi$2(this.g), clampi$2(this.b), clampa$2(this.opacity));
|
||||
},
|
||||
displayable() {
|
||||
return (-0.5 <= this.r && this.r < 255.5)
|
||||
&& (-0.5 <= this.g && this.g < 255.5)
|
||||
&& (-0.5 <= this.b && this.b < 255.5)
|
||||
|
@ -1484,25 +1492,34 @@
|
|||
},
|
||||
hex: rgb_formatHex$2, // Deprecated! Use color.formatHex.
|
||||
formatHex: rgb_formatHex$2,
|
||||
formatHex8: rgb_formatHex8$2,
|
||||
formatRgb: rgb_formatRgb$2,
|
||||
toString: rgb_formatRgb$2
|
||||
}));
|
||||
|
||||
function rgb_formatHex$2() {
|
||||
return "#" + hex$2(this.r) + hex$2(this.g) + hex$2(this.b);
|
||||
return `#${hex$2(this.r)}${hex$2(this.g)}${hex$2(this.b)}`;
|
||||
}
|
||||
|
||||
function rgb_formatHex8$2() {
|
||||
return `#${hex$2(this.r)}${hex$2(this.g)}${hex$2(this.b)}${hex$2((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
||||
}
|
||||
|
||||
function rgb_formatRgb$2() {
|
||||
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
||||
return (a === 1 ? "rgb(" : "rgba(")
|
||||
+ Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", "
|
||||
+ Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", "
|
||||
+ Math.max(0, Math.min(255, Math.round(this.b) || 0))
|
||||
+ (a === 1 ? ")" : ", " + a + ")");
|
||||
const a = clampa$2(this.opacity);
|
||||
return `${a === 1 ? "rgb(" : "rgba("}${clampi$2(this.r)}, ${clampi$2(this.g)}, ${clampi$2(this.b)}${a === 1 ? ")" : `, ${a})`}`;
|
||||
}
|
||||
|
||||
function clampa$2(opacity) {
|
||||
return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
|
||||
}
|
||||
|
||||
function clampi$2(value) {
|
||||
return Math.max(0, Math.min(255, Math.round(value) || 0));
|
||||
}
|
||||
|
||||
function hex$2(value) {
|
||||
value = Math.max(0, Math.min(255, Math.round(value) || 0));
|
||||
value = clampi$2(value);
|
||||
return (value < 16 ? "0" : "") + value.toString(16);
|
||||
}
|
||||
|
||||
|
@ -1551,15 +1568,15 @@
|
|||
}
|
||||
|
||||
define$2(Hsl$2, hsl$2, extend$2(Color$3, {
|
||||
brighter: function(k) {
|
||||
brighter(k) {
|
||||
k = k == null ? brighter$2 : Math.pow(brighter$2, k);
|
||||
return new Hsl$2(this.h, this.s, this.l * k, this.opacity);
|
||||
},
|
||||
darker: function(k) {
|
||||
darker(k) {
|
||||
k = k == null ? darker$2 : Math.pow(darker$2, k);
|
||||
return new Hsl$2(this.h, this.s, this.l * k, this.opacity);
|
||||
},
|
||||
rgb: function() {
|
||||
rgb() {
|
||||
var h = this.h % 360 + (this.h < 0) * 360,
|
||||
s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
|
||||
l = this.l,
|
||||
|
@ -1572,21 +1589,29 @@
|
|||
this.opacity
|
||||
);
|
||||
},
|
||||
displayable: function() {
|
||||
clamp() {
|
||||
return new Hsl$2(clamph$2(this.h), clampt$2(this.s), clampt$2(this.l), clampa$2(this.opacity));
|
||||
},
|
||||
displayable() {
|
||||
return (0 <= this.s && this.s <= 1 || isNaN(this.s))
|
||||
&& (0 <= this.l && this.l <= 1)
|
||||
&& (0 <= this.opacity && this.opacity <= 1);
|
||||
},
|
||||
formatHsl: function() {
|
||||
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
||||
return (a === 1 ? "hsl(" : "hsla(")
|
||||
+ (this.h || 0) + ", "
|
||||
+ (this.s || 0) * 100 + "%, "
|
||||
+ (this.l || 0) * 100 + "%"
|
||||
+ (a === 1 ? ")" : ", " + a + ")");
|
||||
formatHsl() {
|
||||
const a = clampa$2(this.opacity);
|
||||
return `${a === 1 ? "hsl(" : "hsla("}${clamph$2(this.h)}, ${clampt$2(this.s) * 100}%, ${clampt$2(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`;
|
||||
}
|
||||
}));
|
||||
|
||||
function clamph$2(value) {
|
||||
value = (value || 0) % 360;
|
||||
return value < 0 ? value + 360 : value;
|
||||
}
|
||||
|
||||
function clampt$2(value) {
|
||||
return Math.max(0, Math.min(1, value || 0));
|
||||
}
|
||||
|
||||
/* From FvD 13.37, CSS Color Module Level 3 */
|
||||
function hsl2rgb$2(h, m1, m2) {
|
||||
return (h < 60 ? m1 + (m2 - m1) * h / 60
|
||||
|
@ -23647,6 +23672,13 @@ f 5/6/6 1/12/6 8/11/6`;
|
|||
function createAxes(cartesian, dim2d, dim3d, axis, orientation, height, props, facetLabel) {
|
||||
const domain = (axis === null || axis === void 0 ? void 0 : axis.domain) || nullDomain;
|
||||
const { tickPositions, tickText, textPos, textSize } = convertAxis(axis, domain, dim2d, height);
|
||||
if (axis.axisRole === 'z') {
|
||||
tickPositions.forEach((t, i) => tickPositions[i] = 1 - t);
|
||||
textPos.forEach((t, i) => textPos[i] = 1 - t);
|
||||
tickText.reverse();
|
||||
tickPositions.reverse();
|
||||
textPos.reverse();
|
||||
}
|
||||
cartesian.setTickPositions(dim3d, tickPositions);
|
||||
cartesian.zero[dim3d] = 0; //TODO get any "zero" gridline position from vega
|
||||
cartesian.setLabelPositions(dim3d, textPos);
|
||||
|
@ -23692,9 +23724,11 @@ f 5/6/6 1/12/6 8/11/6`;
|
|||
};
|
||||
}
|
||||
function convertAxis(axis, domain, dim, height) {
|
||||
const start = domain.sourcePosition[dim];
|
||||
const span = domain.targetPosition[dim] - start;
|
||||
const tickPositions = axis
|
||||
?
|
||||
axis.ticks.map(t => (t.sourcePosition[dim] - domain.sourcePosition[dim]) / (domain.targetPosition[dim] - domain.sourcePosition[dim]))
|
||||
axis.ticks.map(t => (t.sourcePosition[dim] - start) / span)
|
||||
:
|
||||
[];
|
||||
const tickText = axis ?
|
||||
|
@ -23702,7 +23736,7 @@ f 5/6/6 1/12/6 8/11/6`;
|
|||
:
|
||||
[];
|
||||
const textPos = axis ?
|
||||
axis.tickText.map(t => (t.position[dim] - domain.sourcePosition[dim]) / (domain.targetPosition[dim] - domain.sourcePosition[dim]))
|
||||
axis.tickText.map(t => (t.position[dim] - start) / span)
|
||||
:
|
||||
[];
|
||||
const textSize = axis ?
|
||||
|
@ -24912,7 +24946,7 @@ f 5/6/6 1/12/6 8/11/6`;
|
|||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
const version$1 = '1.0.3';
|
||||
const version$1 = '1.0.4';
|
||||
|
||||
/*!
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
|
@ -28320,7 +28354,7 @@ f 5/6/6 1/12/6 8/11/6`;
|
|||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
const version = '4.0.1';
|
||||
const version = '4.0.2';
|
||||
|
||||
/*!
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
|
|
|
@ -640,15 +640,15 @@
|
|||
var brighter = 1 / darker;
|
||||
|
||||
var reI = "\\s*([+-]?\\d+)\\s*",
|
||||
reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
|
||||
reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
|
||||
reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",
|
||||
reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
|
||||
reHex = /^#([0-9a-f]{3,8})$/,
|
||||
reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"),
|
||||
reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"),
|
||||
reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"),
|
||||
reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"),
|
||||
reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"),
|
||||
reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
|
||||
reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`),
|
||||
reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`),
|
||||
reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`),
|
||||
reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`),
|
||||
reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`),
|
||||
reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`);
|
||||
|
||||
var named = {
|
||||
aliceblue: 0xf0f8ff,
|
||||
|
@ -802,14 +802,15 @@
|
|||
};
|
||||
|
||||
define(Color, color, {
|
||||
copy: function(channels) {
|
||||
copy(channels) {
|
||||
return Object.assign(new this.constructor, this, channels);
|
||||
},
|
||||
displayable: function() {
|
||||
displayable() {
|
||||
return this.rgb().displayable();
|
||||
},
|
||||
hex: color_formatHex, // Deprecated! Use color.formatHex.
|
||||
formatHex: color_formatHex,
|
||||
formatHex8: color_formatHex8,
|
||||
formatHsl: color_formatHsl,
|
||||
formatRgb: color_formatRgb,
|
||||
toString: color_formatRgb
|
||||
|
@ -819,6 +820,10 @@
|
|||
return this.rgb().formatHex();
|
||||
}
|
||||
|
||||
function color_formatHex8() {
|
||||
return this.rgb().formatHex8();
|
||||
}
|
||||
|
||||
function color_formatHsl() {
|
||||
return hslConvert(this).formatHsl();
|
||||
}
|
||||
|
@ -874,18 +879,21 @@
|
|||
}
|
||||
|
||||
define(Rgb, rgb, extend(Color, {
|
||||
brighter: function(k) {
|
||||
brighter(k) {
|
||||
k = k == null ? brighter : Math.pow(brighter, k);
|
||||
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
||||
},
|
||||
darker: function(k) {
|
||||
darker(k) {
|
||||
k = k == null ? darker : Math.pow(darker, k);
|
||||
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
||||
},
|
||||
rgb: function() {
|
||||
rgb() {
|
||||
return this;
|
||||
},
|
||||
displayable: function() {
|
||||
clamp() {
|
||||
return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
|
||||
},
|
||||
displayable() {
|
||||
return (-0.5 <= this.r && this.r < 255.5)
|
||||
&& (-0.5 <= this.g && this.g < 255.5)
|
||||
&& (-0.5 <= this.b && this.b < 255.5)
|
||||
|
@ -893,25 +901,34 @@
|
|||
},
|
||||
hex: rgb_formatHex, // Deprecated! Use color.formatHex.
|
||||
formatHex: rgb_formatHex,
|
||||
formatHex8: rgb_formatHex8,
|
||||
formatRgb: rgb_formatRgb,
|
||||
toString: rgb_formatRgb
|
||||
}));
|
||||
|
||||
function rgb_formatHex() {
|
||||
return "#" + hex(this.r) + hex(this.g) + hex(this.b);
|
||||
return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;
|
||||
}
|
||||
|
||||
function rgb_formatHex8() {
|
||||
return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
||||
}
|
||||
|
||||
function rgb_formatRgb() {
|
||||
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
||||
return (a === 1 ? "rgb(" : "rgba(")
|
||||
+ Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", "
|
||||
+ Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", "
|
||||
+ Math.max(0, Math.min(255, Math.round(this.b) || 0))
|
||||
+ (a === 1 ? ")" : ", " + a + ")");
|
||||
const a = clampa(this.opacity);
|
||||
return `${a === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`;
|
||||
}
|
||||
|
||||
function clampa(opacity) {
|
||||
return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
|
||||
}
|
||||
|
||||
function clampi(value) {
|
||||
return Math.max(0, Math.min(255, Math.round(value) || 0));
|
||||
}
|
||||
|
||||
function hex(value) {
|
||||
value = Math.max(0, Math.min(255, Math.round(value) || 0));
|
||||
value = clampi(value);
|
||||
return (value < 16 ? "0" : "") + value.toString(16);
|
||||
}
|
||||
|
||||
|
@ -960,15 +977,15 @@
|
|||
}
|
||||
|
||||
define(Hsl, hsl, extend(Color, {
|
||||
brighter: function(k) {
|
||||
brighter(k) {
|
||||
k = k == null ? brighter : Math.pow(brighter, k);
|
||||
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
||||
},
|
||||
darker: function(k) {
|
||||
darker(k) {
|
||||
k = k == null ? darker : Math.pow(darker, k);
|
||||
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
||||
},
|
||||
rgb: function() {
|
||||
rgb() {
|
||||
var h = this.h % 360 + (this.h < 0) * 360,
|
||||
s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
|
||||
l = this.l,
|
||||
|
@ -981,21 +998,29 @@
|
|||
this.opacity
|
||||
);
|
||||
},
|
||||
displayable: function() {
|
||||
clamp() {
|
||||
return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
|
||||
},
|
||||
displayable() {
|
||||
return (0 <= this.s && this.s <= 1 || isNaN(this.s))
|
||||
&& (0 <= this.l && this.l <= 1)
|
||||
&& (0 <= this.opacity && this.opacity <= 1);
|
||||
},
|
||||
formatHsl: function() {
|
||||
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
||||
return (a === 1 ? "hsl(" : "hsla(")
|
||||
+ (this.h || 0) + ", "
|
||||
+ (this.s || 0) * 100 + "%, "
|
||||
+ (this.l || 0) * 100 + "%"
|
||||
+ (a === 1 ? ")" : ", " + a + ")");
|
||||
formatHsl() {
|
||||
const a = clampa(this.opacity);
|
||||
return `${a === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`;
|
||||
}
|
||||
}));
|
||||
|
||||
function clamph(value) {
|
||||
value = (value || 0) % 360;
|
||||
return value < 0 ? value + 360 : value;
|
||||
}
|
||||
|
||||
function clampt(value) {
|
||||
return Math.max(0, Math.min(1, value || 0));
|
||||
}
|
||||
|
||||
/* From FvD 13.37, CSS Color Module Level 3 */
|
||||
function hsl2rgb(h, m1, m2) {
|
||||
return (h < 60 ? m1 + (m2 - m1) * h / 60
|
||||
|
|
|
@ -18134,6 +18134,13 @@ f 5/6/6 1/12/6 8/11/6`;
|
|||
function createAxes(cartesian, dim2d, dim3d, axis, orientation, height, props, facetLabel) {
|
||||
const domain = (axis === null || axis === void 0 ? void 0 : axis.domain) || nullDomain;
|
||||
const { tickPositions, tickText, textPos, textSize } = convertAxis(axis, domain, dim2d, height);
|
||||
if (axis.axisRole === 'z') {
|
||||
tickPositions.forEach((t, i) => tickPositions[i] = 1 - t);
|
||||
textPos.forEach((t, i) => textPos[i] = 1 - t);
|
||||
tickText.reverse();
|
||||
tickPositions.reverse();
|
||||
textPos.reverse();
|
||||
}
|
||||
cartesian.setTickPositions(dim3d, tickPositions);
|
||||
cartesian.zero[dim3d] = 0; //TODO get any "zero" gridline position from vega
|
||||
cartesian.setLabelPositions(dim3d, textPos);
|
||||
|
@ -18179,9 +18186,11 @@ f 5/6/6 1/12/6 8/11/6`;
|
|||
};
|
||||
}
|
||||
function convertAxis(axis, domain, dim, height) {
|
||||
const start = domain.sourcePosition[dim];
|
||||
const span = domain.targetPosition[dim] - start;
|
||||
const tickPositions = axis
|
||||
?
|
||||
axis.ticks.map(t => (t.sourcePosition[dim] - domain.sourcePosition[dim]) / (domain.targetPosition[dim] - domain.sourcePosition[dim]))
|
||||
axis.ticks.map(t => (t.sourcePosition[dim] - start) / span)
|
||||
:
|
||||
[];
|
||||
const tickText = axis ?
|
||||
|
@ -18189,7 +18198,7 @@ f 5/6/6 1/12/6 8/11/6`;
|
|||
:
|
||||
[];
|
||||
const textPos = axis ?
|
||||
axis.tickText.map(t => (t.position[dim] - domain.sourcePosition[dim]) / (domain.targetPosition[dim] - domain.sourcePosition[dim]))
|
||||
axis.tickText.map(t => (t.position[dim] - start) / span)
|
||||
:
|
||||
[];
|
||||
const textSize = axis ?
|
||||
|
@ -19399,7 +19408,7 @@ f 5/6/6 1/12/6 8/11/6`;
|
|||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
const version = '1.0.3';
|
||||
const version = '1.0.4';
|
||||
|
||||
exports.Presenter = Presenter;
|
||||
exports.ViewGl = ViewGl;
|
||||
|
|
Двоичный файл не отображается.
|
@ -493,7 +493,7 @@ title: 'IDialogProps | @msrvida/sanddance-explorer'
|
|||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited tsd-is-external">
|
||||
<a name="maxWidth" class="tsd-anchor"></a>
|
||||
<h3><span class="tsd-flag ts-flagOptional">Optional</span> max<wbr>Width</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">max<wbr>Width<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
|
||||
<div class="tsd-signature tsd-kind-icon">max<wbr>Width<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<p>Inherited from FluentUITypes.IDialogProps.maxWidth</p>
|
||||
<ul>
|
||||
|
@ -510,7 +510,7 @@ title: 'IDialogProps | @msrvida/sanddance-explorer'
|
|||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited tsd-is-external">
|
||||
<a name="minWidth" class="tsd-anchor"></a>
|
||||
<h3><span class="tsd-flag ts-flagOptional">Optional</span> min<wbr>Width</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">min<wbr>Width<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
|
||||
<div class="tsd-signature tsd-kind-icon">min<wbr>Width<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<p>Inherited from FluentUITypes.IDialogProps.minWidth</p>
|
||||
<ul>
|
||||
|
@ -565,7 +565,7 @@ title: 'IDialogProps | @msrvida/sanddance-explorer'
|
|||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited tsd-is-external">
|
||||
<a name="styles" class="tsd-anchor"></a>
|
||||
<h3><span class="tsd-flag ts-flagOptional">Optional</span> styles</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">styles<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
|
||||
<div class="tsd-signature tsd-kind-icon">styles<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">IStyleFunctionOrObject</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">IDialogStyleProps</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">IDialogStyles</span><span class="tsd-signature-symbol">></span></div>
|
||||
<aside class="tsd-sources">
|
||||
<p>Inherited from FluentUITypes.IDialogProps.styles</p>
|
||||
<ul>
|
||||
|
|
|
@ -27,9 +27,9 @@ title: Examples
|
|||
|
||||
## <a name="apps"></a>SandDance apps v4
|
||||
* [Web app](../tests/v4/es6/app)
|
||||
* [Power BI custom visual](../dist/powerbi/v4/SandDance201929976D117A654D0BAB8E96507442D80B.4.0.0.pbiviz) 4.0.0
|
||||
* [Azure Data Studio extension](../dist/azdata/v4/azdata-sanddance-4.0.0.vsix) 4.0.0
|
||||
* [VSCode extension](../dist/vscode/v4/vscode-sanddance-4.0.1.vsix) 4.0.1
|
||||
* [Power BI custom visual](../dist/powerbi/v4/SandDance201929976D117A654D0BAB8E96507442D80B.4.1.0.pbiviz) 4.1.0
|
||||
* [Azure Data Studio extension](../dist/azdata/v4/azdata-sanddance-4.0.1.vsix) 4.0.1
|
||||
* [VSCode extension](../dist/vscode/v4/vscode-sanddance-4.0.2.vsix) 4.0.2
|
||||
|
||||
## Previous versions
|
||||
|
||||
|
|
|
@ -1216,15 +1216,15 @@
|
|||
var brighter = 1 / darker;
|
||||
|
||||
var reI = "\\s*([+-]?\\d+)\\s*",
|
||||
reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
|
||||
reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
|
||||
reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",
|
||||
reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
|
||||
reHex = /^#([0-9a-f]{3,8})$/,
|
||||
reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"),
|
||||
reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"),
|
||||
reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"),
|
||||
reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"),
|
||||
reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"),
|
||||
reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
|
||||
reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`),
|
||||
reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`),
|
||||
reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`),
|
||||
reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`),
|
||||
reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`),
|
||||
reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`);
|
||||
|
||||
var named = {
|
||||
aliceblue: 0xf0f8ff,
|
||||
|
@ -1378,14 +1378,15 @@
|
|||
};
|
||||
|
||||
define(Color, color, {
|
||||
copy: function(channels) {
|
||||
copy(channels) {
|
||||
return Object.assign(new this.constructor, this, channels);
|
||||
},
|
||||
displayable: function() {
|
||||
displayable() {
|
||||
return this.rgb().displayable();
|
||||
},
|
||||
hex: color_formatHex, // Deprecated! Use color.formatHex.
|
||||
formatHex: color_formatHex,
|
||||
formatHex8: color_formatHex8,
|
||||
formatHsl: color_formatHsl,
|
||||
formatRgb: color_formatRgb,
|
||||
toString: color_formatRgb
|
||||
|
@ -1395,6 +1396,10 @@
|
|||
return this.rgb().formatHex();
|
||||
}
|
||||
|
||||
function color_formatHex8() {
|
||||
return this.rgb().formatHex8();
|
||||
}
|
||||
|
||||
function color_formatHsl() {
|
||||
return hslConvert(this).formatHsl();
|
||||
}
|
||||
|
@ -1450,18 +1455,21 @@
|
|||
}
|
||||
|
||||
define(Rgb, rgb, extend(Color, {
|
||||
brighter: function(k) {
|
||||
brighter(k) {
|
||||
k = k == null ? brighter : Math.pow(brighter, k);
|
||||
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
||||
},
|
||||
darker: function(k) {
|
||||
darker(k) {
|
||||
k = k == null ? darker : Math.pow(darker, k);
|
||||
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
||||
},
|
||||
rgb: function() {
|
||||
rgb() {
|
||||
return this;
|
||||
},
|
||||
displayable: function() {
|
||||
clamp() {
|
||||
return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
|
||||
},
|
||||
displayable() {
|
||||
return (-0.5 <= this.r && this.r < 255.5)
|
||||
&& (-0.5 <= this.g && this.g < 255.5)
|
||||
&& (-0.5 <= this.b && this.b < 255.5)
|
||||
|
@ -1469,25 +1477,34 @@
|
|||
},
|
||||
hex: rgb_formatHex, // Deprecated! Use color.formatHex.
|
||||
formatHex: rgb_formatHex,
|
||||
formatHex8: rgb_formatHex8,
|
||||
formatRgb: rgb_formatRgb,
|
||||
toString: rgb_formatRgb
|
||||
}));
|
||||
|
||||
function rgb_formatHex() {
|
||||
return "#" + hex(this.r) + hex(this.g) + hex(this.b);
|
||||
return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;
|
||||
}
|
||||
|
||||
function rgb_formatHex8() {
|
||||
return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
||||
}
|
||||
|
||||
function rgb_formatRgb() {
|
||||
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
||||
return (a === 1 ? "rgb(" : "rgba(")
|
||||
+ Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", "
|
||||
+ Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", "
|
||||
+ Math.max(0, Math.min(255, Math.round(this.b) || 0))
|
||||
+ (a === 1 ? ")" : ", " + a + ")");
|
||||
const a = clampa(this.opacity);
|
||||
return `${a === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`;
|
||||
}
|
||||
|
||||
function clampa(opacity) {
|
||||
return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
|
||||
}
|
||||
|
||||
function clampi(value) {
|
||||
return Math.max(0, Math.min(255, Math.round(value) || 0));
|
||||
}
|
||||
|
||||
function hex(value) {
|
||||
value = Math.max(0, Math.min(255, Math.round(value) || 0));
|
||||
value = clampi(value);
|
||||
return (value < 16 ? "0" : "") + value.toString(16);
|
||||
}
|
||||
|
||||
|
@ -1536,15 +1553,15 @@
|
|||
}
|
||||
|
||||
define(Hsl, hsl, extend(Color, {
|
||||
brighter: function(k) {
|
||||
brighter(k) {
|
||||
k = k == null ? brighter : Math.pow(brighter, k);
|
||||
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
||||
},
|
||||
darker: function(k) {
|
||||
darker(k) {
|
||||
k = k == null ? darker : Math.pow(darker, k);
|
||||
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
||||
},
|
||||
rgb: function() {
|
||||
rgb() {
|
||||
var h = this.h % 360 + (this.h < 0) * 360,
|
||||
s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
|
||||
l = this.l,
|
||||
|
@ -1557,21 +1574,29 @@
|
|||
this.opacity
|
||||
);
|
||||
},
|
||||
displayable: function() {
|
||||
clamp() {
|
||||
return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
|
||||
},
|
||||
displayable() {
|
||||
return (0 <= this.s && this.s <= 1 || isNaN(this.s))
|
||||
&& (0 <= this.l && this.l <= 1)
|
||||
&& (0 <= this.opacity && this.opacity <= 1);
|
||||
},
|
||||
formatHsl: function() {
|
||||
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
||||
return (a === 1 ? "hsl(" : "hsla(")
|
||||
+ (this.h || 0) + ", "
|
||||
+ (this.s || 0) * 100 + "%, "
|
||||
+ (this.l || 0) * 100 + "%"
|
||||
+ (a === 1 ? ")" : ", " + a + ")");
|
||||
formatHsl() {
|
||||
const a = clampa(this.opacity);
|
||||
return `${a === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`;
|
||||
}
|
||||
}));
|
||||
|
||||
function clamph(value) {
|
||||
value = (value || 0) % 360;
|
||||
return value < 0 ? value + 360 : value;
|
||||
}
|
||||
|
||||
function clampt(value) {
|
||||
return Math.max(0, Math.min(1, value || 0));
|
||||
}
|
||||
|
||||
/* From FvD 13.37, CSS Color Module Level 3 */
|
||||
function hsl2rgb(h, m1, m2) {
|
||||
return (h < 60 ? m1 + (m2 - m1) * h / 60
|
||||
|
|
|
@ -2362,34 +2362,7 @@ var _defineJsDefault = parcelHelpers.interopDefault(_defineJs);
|
|||
function Color() {}
|
||||
var darker = 0.7;
|
||||
var brighter = 1 / darker;
|
||||
var reI = "\\s*([+-]?\\d+)\\s*", reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*", reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*", reHex = /^#([0-9a-f]{3,8})$/, reRgbInteger = new RegExp("^rgb\\(" + [
|
||||
reI,
|
||||
reI,
|
||||
reI
|
||||
] + "\\)$"), reRgbPercent = new RegExp("^rgb\\(" + [
|
||||
reP,
|
||||
reP,
|
||||
reP
|
||||
] + "\\)$"), reRgbaInteger = new RegExp("^rgba\\(" + [
|
||||
reI,
|
||||
reI,
|
||||
reI,
|
||||
reN
|
||||
] + "\\)$"), reRgbaPercent = new RegExp("^rgba\\(" + [
|
||||
reP,
|
||||
reP,
|
||||
reP,
|
||||
reN
|
||||
] + "\\)$"), reHslPercent = new RegExp("^hsl\\(" + [
|
||||
reN,
|
||||
reP,
|
||||
reP
|
||||
] + "\\)$"), reHslaPercent = new RegExp("^hsla\\(" + [
|
||||
reN,
|
||||
reP,
|
||||
reP,
|
||||
reN
|
||||
] + "\\)$");
|
||||
var reI = "\\s*([+-]?\\d+)\\s*", reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", reHex = /^#([0-9a-f]{3,8})$/, reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`), reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`), reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`), reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`), reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`), reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`);
|
||||
var named = {
|
||||
aliceblue: 0xf0f8ff,
|
||||
antiquewhite: 0xfaebd7,
|
||||
|
@ -2541,14 +2514,15 @@ var named = {
|
|||
yellowgreen: 0x9acd32
|
||||
};
|
||||
(0, _defineJsDefault.default)(Color, color, {
|
||||
copy: function(channels) {
|
||||
copy (channels) {
|
||||
return Object.assign(new this.constructor, this, channels);
|
||||
},
|
||||
displayable: function() {
|
||||
displayable () {
|
||||
return this.rgb().displayable();
|
||||
},
|
||||
hex: color_formatHex,
|
||||
formatHex: color_formatHex,
|
||||
formatHex8: color_formatHex8,
|
||||
formatHsl: color_formatHsl,
|
||||
formatRgb: color_formatRgb,
|
||||
toString: color_formatRgb
|
||||
|
@ -2556,6 +2530,9 @@ var named = {
|
|||
function color_formatHex() {
|
||||
return this.rgb().formatHex();
|
||||
}
|
||||
function color_formatHex8() {
|
||||
return this.rgb().formatHex8();
|
||||
}
|
||||
function color_formatHsl() {
|
||||
return hslConvert(this).formatHsl();
|
||||
}
|
||||
|
@ -2603,35 +2580,47 @@ function Rgb(r, g, b, opacity) {
|
|||
this.opacity = +opacity;
|
||||
}
|
||||
(0, _defineJsDefault.default)(Rgb, rgb, (0, _defineJs.extend)(Color, {
|
||||
brighter: function(k) {
|
||||
brighter (k) {
|
||||
k = k == null ? brighter : Math.pow(brighter, k);
|
||||
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
||||
},
|
||||
darker: function(k) {
|
||||
darker (k) {
|
||||
k = k == null ? darker : Math.pow(darker, k);
|
||||
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
||||
},
|
||||
rgb: function() {
|
||||
rgb () {
|
||||
return this;
|
||||
},
|
||||
displayable: function() {
|
||||
clamp () {
|
||||
return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
|
||||
},
|
||||
displayable () {
|
||||
return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
|
||||
},
|
||||
hex: rgb_formatHex,
|
||||
formatHex: rgb_formatHex,
|
||||
formatHex8: rgb_formatHex8,
|
||||
formatRgb: rgb_formatRgb,
|
||||
toString: rgb_formatRgb
|
||||
}));
|
||||
function rgb_formatHex() {
|
||||
return "#" + hex(this.r) + hex(this.g) + hex(this.b);
|
||||
return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;
|
||||
}
|
||||
function rgb_formatHex8() {
|
||||
return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
||||
}
|
||||
function rgb_formatRgb() {
|
||||
var a = this.opacity;
|
||||
a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
||||
return (a === 1 ? "rgb(" : "rgba(") + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + (a === 1 ? ")" : ", " + a + ")");
|
||||
const a = clampa(this.opacity);
|
||||
return `${a === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`;
|
||||
}
|
||||
function clampa(opacity) {
|
||||
return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
|
||||
}
|
||||
function clampi(value) {
|
||||
return Math.max(0, Math.min(255, Math.round(value) || 0));
|
||||
}
|
||||
function hex(value) {
|
||||
value = Math.max(0, Math.min(255, Math.round(value) || 0));
|
||||
value = clampi(value);
|
||||
return (value < 16 ? "0" : "") + value.toString(16);
|
||||
}
|
||||
function hsla(h, s, l, a) {
|
||||
|
@ -2666,27 +2655,36 @@ function Hsl(h, s, l, opacity) {
|
|||
this.opacity = +opacity;
|
||||
}
|
||||
(0, _defineJsDefault.default)(Hsl, hsl, (0, _defineJs.extend)(Color, {
|
||||
brighter: function(k) {
|
||||
brighter (k) {
|
||||
k = k == null ? brighter : Math.pow(brighter, k);
|
||||
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
||||
},
|
||||
darker: function(k) {
|
||||
darker (k) {
|
||||
k = k == null ? darker : Math.pow(darker, k);
|
||||
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
||||
},
|
||||
rgb: function() {
|
||||
rgb () {
|
||||
var h = this.h % 360 + (this.h < 0) * 360, s = isNaN(h) || isNaN(this.s) ? 0 : this.s, l = this.l, m2 = l + (l < 0.5 ? l : 1 - l) * s, m1 = 2 * l - m2;
|
||||
return new Rgb(hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), hsl2rgb(h, m1, m2), hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), this.opacity);
|
||||
},
|
||||
displayable: function() {
|
||||
clamp () {
|
||||
return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
|
||||
},
|
||||
displayable () {
|
||||
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
|
||||
},
|
||||
formatHsl: function() {
|
||||
var a = this.opacity;
|
||||
a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
||||
return (a === 1 ? "hsl(" : "hsla(") + (this.h || 0) + ", " + (this.s || 0) * 100 + "%, " + (this.l || 0) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")");
|
||||
formatHsl () {
|
||||
const a = clampa(this.opacity);
|
||||
return `${a === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`;
|
||||
}
|
||||
}));
|
||||
function clamph(value) {
|
||||
value = (value || 0) % 360;
|
||||
return value < 0 ? value + 360 : value;
|
||||
}
|
||||
function clampt(value) {
|
||||
return Math.max(0, Math.min(1, value || 0));
|
||||
}
|
||||
/* From FvD 13.37, CSS Color Module Level 3 */ function hsl2rgb(h, m1, m2) {
|
||||
return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;
|
||||
}
|
||||
|
@ -39103,6 +39101,13 @@ class AxesCorrelation {
|
|||
function createAxes(cartesian, dim2d, dim3d, axis, orientation, height, props, facetLabel) {
|
||||
const domain = (axis === null || axis === void 0 ? void 0 : axis.domain) || nullDomain;
|
||||
const { tickPositions , tickText , textPos , textSize } = convertAxis(axis, domain, dim2d, height);
|
||||
if (axis.axisRole === "z") {
|
||||
tickPositions.forEach((t, i)=>tickPositions[i] = 1 - t);
|
||||
textPos.forEach((t, i)=>textPos[i] = 1 - t);
|
||||
tickText.reverse();
|
||||
tickPositions.reverse();
|
||||
textPos.reverse();
|
||||
}
|
||||
cartesian.setTickPositions(dim3d, tickPositions);
|
||||
cartesian.zero[dim3d] = 0; //TODO get any "zero" gridline position from vega
|
||||
cartesian.setLabelPositions(dim3d, textPos);
|
||||
|
@ -39146,9 +39151,11 @@ function getDomainBounds(dim2d, axis) {
|
|||
};
|
||||
}
|
||||
function convertAxis(axis, domain, dim, height) {
|
||||
const tickPositions = axis ? axis.ticks.map((t)=>(t.sourcePosition[dim] - domain.sourcePosition[dim]) / (domain.targetPosition[dim] - domain.sourcePosition[dim])) : [];
|
||||
const start = domain.sourcePosition[dim];
|
||||
const span = domain.targetPosition[dim] - start;
|
||||
const tickPositions = axis ? axis.ticks.map((t)=>(t.sourcePosition[dim] - start) / span) : [];
|
||||
const tickText = axis ? axis.tickText.map((t)=>t.text) : [];
|
||||
const textPos = axis ? axis.tickText.map((t)=>(t.position[dim] - domain.sourcePosition[dim]) / (domain.targetPosition[dim] - domain.sourcePosition[dim])) : [];
|
||||
const textPos = axis ? axis.tickText.map((t)=>(t.position[dim] - start) / span) : [];
|
||||
const textSize = axis ? axis.tickText.map((t)=>t.size / height) : [];
|
||||
if (tickPositions.length) {
|
||||
if (tickPositions[0] !== 0) tickPositions[0] = 0;
|
||||
|
@ -40133,7 +40140,7 @@ const RendererGl = _RendererGl;
|
|||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
parcelHelpers.defineInteropFlag(exports);
|
||||
parcelHelpers.export(exports, "version", ()=>version);
|
||||
const version = "1.0.3";
|
||||
const version = "1.0.4";
|
||||
|
||||
},{"@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"cHhTd":[function(require,module,exports) {
|
||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
|
@ -43912,7 +43919,7 @@ exports.default = function(step, max) {
|
|||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
parcelHelpers.defineInteropFlag(exports);
|
||||
parcelHelpers.export(exports, "version", ()=>version);
|
||||
const version = "4.0.1";
|
||||
const version = "4.0.2";
|
||||
|
||||
},{"@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"4RaV2":[function(require,module,exports) {
|
||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
|
@ -44122,7 +44129,7 @@ function use(react, reactDOM, vega) {
|
|||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
parcelHelpers.defineInteropFlag(exports);
|
||||
parcelHelpers.export(exports, "version", ()=>version);
|
||||
const version = "4.0.0";
|
||||
const version = "4.0.1";
|
||||
|
||||
},{"@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"7qvdA":[function(require,module,exports) {
|
||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
|
@ -46634,7 +46641,7 @@ const capabilities = {
|
|||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
parcelHelpers.defineInteropFlag(exports);
|
||||
parcelHelpers.export(exports, "version", ()=>version);
|
||||
const version = "4.0.2";
|
||||
const version = "4.0.3";
|
||||
|
||||
},{"@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"jdUx0":[function(require,module,exports) {
|
||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
|
@ -53236,8 +53243,15 @@ function _Renderer(_props) {
|
|||
}
|
||||
setOptions(newOptions) {
|
||||
const { explorer } = this.props;
|
||||
const renderer = Object.assign(Object.assign({}, explorer.state.renderer), newOptions);
|
||||
const { onSetupOptionsChanged } = explorer.props;
|
||||
if (onSetupOptionsChanged) {
|
||||
const setup = explorer.getSetup();
|
||||
setup.renderer = renderer;
|
||||
onSetupOptionsChanged(setup);
|
||||
}
|
||||
explorer.setState({
|
||||
renderer: Object.assign(Object.assign({}, explorer.state.renderer), newOptions)
|
||||
renderer
|
||||
});
|
||||
}
|
||||
setBasicOptions(newOptions) {
|
||||
|
|
|
@ -47203,34 +47203,7 @@ var _defineJsDefault = parcelHelpers.interopDefault(_defineJs);
|
|||
function Color() {}
|
||||
var darker = 0.7;
|
||||
var brighter = 1 / darker;
|
||||
var reI = "\\s*([+-]?\\d+)\\s*", reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*", reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*", reHex = /^#([0-9a-f]{3,8})$/, reRgbInteger = new RegExp("^rgb\\(" + [
|
||||
reI,
|
||||
reI,
|
||||
reI
|
||||
] + "\\)$"), reRgbPercent = new RegExp("^rgb\\(" + [
|
||||
reP,
|
||||
reP,
|
||||
reP
|
||||
] + "\\)$"), reRgbaInteger = new RegExp("^rgba\\(" + [
|
||||
reI,
|
||||
reI,
|
||||
reI,
|
||||
reN
|
||||
] + "\\)$"), reRgbaPercent = new RegExp("^rgba\\(" + [
|
||||
reP,
|
||||
reP,
|
||||
reP,
|
||||
reN
|
||||
] + "\\)$"), reHslPercent = new RegExp("^hsl\\(" + [
|
||||
reN,
|
||||
reP,
|
||||
reP
|
||||
] + "\\)$"), reHslaPercent = new RegExp("^hsla\\(" + [
|
||||
reN,
|
||||
reP,
|
||||
reP,
|
||||
reN
|
||||
] + "\\)$");
|
||||
var reI = "\\s*([+-]?\\d+)\\s*", reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", reHex = /^#([0-9a-f]{3,8})$/, reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`), reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`), reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`), reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`), reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`), reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`);
|
||||
var named = {
|
||||
aliceblue: 0xf0f8ff,
|
||||
antiquewhite: 0xfaebd7,
|
||||
|
@ -47382,14 +47355,15 @@ var named = {
|
|||
yellowgreen: 0x9acd32
|
||||
};
|
||||
(0, _defineJsDefault.default)(Color, color, {
|
||||
copy: function(channels) {
|
||||
copy (channels) {
|
||||
return Object.assign(new this.constructor, this, channels);
|
||||
},
|
||||
displayable: function() {
|
||||
displayable () {
|
||||
return this.rgb().displayable();
|
||||
},
|
||||
hex: color_formatHex,
|
||||
formatHex: color_formatHex,
|
||||
formatHex8: color_formatHex8,
|
||||
formatHsl: color_formatHsl,
|
||||
formatRgb: color_formatRgb,
|
||||
toString: color_formatRgb
|
||||
|
@ -47397,6 +47371,9 @@ var named = {
|
|||
function color_formatHex() {
|
||||
return this.rgb().formatHex();
|
||||
}
|
||||
function color_formatHex8() {
|
||||
return this.rgb().formatHex8();
|
||||
}
|
||||
function color_formatHsl() {
|
||||
return hslConvert(this).formatHsl();
|
||||
}
|
||||
|
@ -47444,35 +47421,47 @@ function Rgb(r, g, b, opacity) {
|
|||
this.opacity = +opacity;
|
||||
}
|
||||
(0, _defineJsDefault.default)(Rgb, rgb, (0, _defineJs.extend)(Color, {
|
||||
brighter: function(k) {
|
||||
brighter (k) {
|
||||
k = k == null ? brighter : Math.pow(brighter, k);
|
||||
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
||||
},
|
||||
darker: function(k) {
|
||||
darker (k) {
|
||||
k = k == null ? darker : Math.pow(darker, k);
|
||||
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
||||
},
|
||||
rgb: function() {
|
||||
rgb () {
|
||||
return this;
|
||||
},
|
||||
displayable: function() {
|
||||
clamp () {
|
||||
return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
|
||||
},
|
||||
displayable () {
|
||||
return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
|
||||
},
|
||||
hex: rgb_formatHex,
|
||||
formatHex: rgb_formatHex,
|
||||
formatHex8: rgb_formatHex8,
|
||||
formatRgb: rgb_formatRgb,
|
||||
toString: rgb_formatRgb
|
||||
}));
|
||||
function rgb_formatHex() {
|
||||
return "#" + hex(this.r) + hex(this.g) + hex(this.b);
|
||||
return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;
|
||||
}
|
||||
function rgb_formatHex8() {
|
||||
return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
||||
}
|
||||
function rgb_formatRgb() {
|
||||
var a = this.opacity;
|
||||
a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
||||
return (a === 1 ? "rgb(" : "rgba(") + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + (a === 1 ? ")" : ", " + a + ")");
|
||||
const a = clampa(this.opacity);
|
||||
return `${a === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`;
|
||||
}
|
||||
function clampa(opacity) {
|
||||
return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
|
||||
}
|
||||
function clampi(value) {
|
||||
return Math.max(0, Math.min(255, Math.round(value) || 0));
|
||||
}
|
||||
function hex(value) {
|
||||
value = Math.max(0, Math.min(255, Math.round(value) || 0));
|
||||
value = clampi(value);
|
||||
return (value < 16 ? "0" : "") + value.toString(16);
|
||||
}
|
||||
function hsla(h, s, l, a) {
|
||||
|
@ -47507,27 +47496,36 @@ function Hsl(h, s, l, opacity) {
|
|||
this.opacity = +opacity;
|
||||
}
|
||||
(0, _defineJsDefault.default)(Hsl, hsl, (0, _defineJs.extend)(Color, {
|
||||
brighter: function(k) {
|
||||
brighter (k) {
|
||||
k = k == null ? brighter : Math.pow(brighter, k);
|
||||
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
||||
},
|
||||
darker: function(k) {
|
||||
darker (k) {
|
||||
k = k == null ? darker : Math.pow(darker, k);
|
||||
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
||||
},
|
||||
rgb: function() {
|
||||
rgb () {
|
||||
var h = this.h % 360 + (this.h < 0) * 360, s = isNaN(h) || isNaN(this.s) ? 0 : this.s, l = this.l, m2 = l + (l < 0.5 ? l : 1 - l) * s, m1 = 2 * l - m2;
|
||||
return new Rgb(hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), hsl2rgb(h, m1, m2), hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), this.opacity);
|
||||
},
|
||||
displayable: function() {
|
||||
clamp () {
|
||||
return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
|
||||
},
|
||||
displayable () {
|
||||
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
|
||||
},
|
||||
formatHsl: function() {
|
||||
var a = this.opacity;
|
||||
a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
||||
return (a === 1 ? "hsl(" : "hsla(") + (this.h || 0) + ", " + (this.s || 0) * 100 + "%, " + (this.l || 0) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")");
|
||||
formatHsl () {
|
||||
const a = clampa(this.opacity);
|
||||
return `${a === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`;
|
||||
}
|
||||
}));
|
||||
function clamph(value) {
|
||||
value = (value || 0) % 360;
|
||||
return value < 0 ? value + 360 : value;
|
||||
}
|
||||
function clampt(value) {
|
||||
return Math.max(0, Math.min(1, value || 0));
|
||||
}
|
||||
/* From FvD 13.37, CSS Color Module Level 3 */ function hsl2rgb(h, m1, m2) {
|
||||
return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;
|
||||
}
|
||||
|
@ -83944,6 +83942,13 @@ class AxesCorrelation {
|
|||
function createAxes(cartesian, dim2d, dim3d, axis, orientation, height, props, facetLabel) {
|
||||
const domain = (axis === null || axis === void 0 ? void 0 : axis.domain) || nullDomain;
|
||||
const { tickPositions , tickText , textPos , textSize } = convertAxis(axis, domain, dim2d, height);
|
||||
if (axis.axisRole === "z") {
|
||||
tickPositions.forEach((t, i)=>tickPositions[i] = 1 - t);
|
||||
textPos.forEach((t, i)=>textPos[i] = 1 - t);
|
||||
tickText.reverse();
|
||||
tickPositions.reverse();
|
||||
textPos.reverse();
|
||||
}
|
||||
cartesian.setTickPositions(dim3d, tickPositions);
|
||||
cartesian.zero[dim3d] = 0; //TODO get any "zero" gridline position from vega
|
||||
cartesian.setLabelPositions(dim3d, textPos);
|
||||
|
@ -83987,9 +83992,11 @@ function getDomainBounds(dim2d, axis) {
|
|||
};
|
||||
}
|
||||
function convertAxis(axis, domain, dim, height) {
|
||||
const tickPositions = axis ? axis.ticks.map((t)=>(t.sourcePosition[dim] - domain.sourcePosition[dim]) / (domain.targetPosition[dim] - domain.sourcePosition[dim])) : [];
|
||||
const start = domain.sourcePosition[dim];
|
||||
const span = domain.targetPosition[dim] - start;
|
||||
const tickPositions = axis ? axis.ticks.map((t)=>(t.sourcePosition[dim] - start) / span) : [];
|
||||
const tickText = axis ? axis.tickText.map((t)=>t.text) : [];
|
||||
const textPos = axis ? axis.tickText.map((t)=>(t.position[dim] - domain.sourcePosition[dim]) / (domain.targetPosition[dim] - domain.sourcePosition[dim])) : [];
|
||||
const textPos = axis ? axis.tickText.map((t)=>(t.position[dim] - start) / span) : [];
|
||||
const textSize = axis ? axis.tickText.map((t)=>t.size / height) : [];
|
||||
if (tickPositions.length) {
|
||||
if (tickPositions[0] !== 0) tickPositions[0] = 0;
|
||||
|
@ -84974,7 +84981,7 @@ const RendererGl = _RendererGl;
|
|||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
parcelHelpers.defineInteropFlag(exports);
|
||||
parcelHelpers.export(exports, "version", ()=>version);
|
||||
const version = "1.0.3";
|
||||
const version = "1.0.4";
|
||||
|
||||
},{"@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"bPdl3":[function(require,module,exports) {
|
||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
|
@ -88753,7 +88760,7 @@ exports.default = function(step, max) {
|
|||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
parcelHelpers.defineInteropFlag(exports);
|
||||
parcelHelpers.export(exports, "version", ()=>version);
|
||||
const version = "4.0.1";
|
||||
const version = "4.0.2";
|
||||
|
||||
},{"@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}]},["gK9HS"], "gK9HS", "parcelRequire0e59")
|
||||
|
||||
|
|
|
@ -77693,6 +77693,13 @@ class AxesCorrelation {
|
|||
function createAxes(cartesian, dim2d, dim3d, axis, orientation, height, props, facetLabel) {
|
||||
const domain = (axis === null || axis === void 0 ? void 0 : axis.domain) || nullDomain;
|
||||
const { tickPositions , tickText , textPos , textSize } = convertAxis(axis, domain, dim2d, height);
|
||||
if (axis.axisRole === "z") {
|
||||
tickPositions.forEach((t, i)=>tickPositions[i] = 1 - t);
|
||||
textPos.forEach((t, i)=>textPos[i] = 1 - t);
|
||||
tickText.reverse();
|
||||
tickPositions.reverse();
|
||||
textPos.reverse();
|
||||
}
|
||||
cartesian.setTickPositions(dim3d, tickPositions);
|
||||
cartesian.zero[dim3d] = 0; //TODO get any "zero" gridline position from vega
|
||||
cartesian.setLabelPositions(dim3d, textPos);
|
||||
|
@ -77736,9 +77743,11 @@ function getDomainBounds(dim2d, axis) {
|
|||
};
|
||||
}
|
||||
function convertAxis(axis, domain, dim, height) {
|
||||
const tickPositions = axis ? axis.ticks.map((t)=>(t.sourcePosition[dim] - domain.sourcePosition[dim]) / (domain.targetPosition[dim] - domain.sourcePosition[dim])) : [];
|
||||
const start = domain.sourcePosition[dim];
|
||||
const span = domain.targetPosition[dim] - start;
|
||||
const tickPositions = axis ? axis.ticks.map((t)=>(t.sourcePosition[dim] - start) / span) : [];
|
||||
const tickText = axis ? axis.tickText.map((t)=>t.text) : [];
|
||||
const textPos = axis ? axis.tickText.map((t)=>(t.position[dim] - domain.sourcePosition[dim]) / (domain.targetPosition[dim] - domain.sourcePosition[dim])) : [];
|
||||
const textPos = axis ? axis.tickText.map((t)=>(t.position[dim] - start) / span) : [];
|
||||
const textSize = axis ? axis.tickText.map((t)=>t.size / height) : [];
|
||||
if (tickPositions.length) {
|
||||
if (tickPositions[0] !== 0) tickPositions[0] = 0;
|
||||
|
@ -78723,7 +78732,7 @@ const RendererGl = _RendererGl;
|
|||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
parcelHelpers.defineInteropFlag(exports);
|
||||
parcelHelpers.export(exports, "version", ()=>version);
|
||||
const version = "1.0.3";
|
||||
const version = "1.0.4";
|
||||
|
||||
},{"@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}]},["dlIYU"], "dlIYU", "parcelRequire1c68")
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "azdata-sanddance",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "azdata-sanddance",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/temp-write": "^3.3.0",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "azdata-sanddance",
|
||||
"displayName": "SandDance for Azure Data Studio",
|
||||
"description": "Visually explore, understand, and present your data.",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.1",
|
||||
"icon": "sanddance-logo.png",
|
||||
"preview": true,
|
||||
"publisher": "msrvida",
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "vscode-sanddance",
|
||||
"version": "4.0.1",
|
||||
"version": "4.0.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "vscode-sanddance",
|
||||
"version": "4.0.1",
|
||||
"version": "4.0.2",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@types/node": "^8.10.25",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "vscode-sanddance",
|
||||
"displayName": "SandDance for VSCode",
|
||||
"description": "Visually explore, understand, and present your data.",
|
||||
"version": "4.0.1",
|
||||
"version": "4.0.2",
|
||||
"icon": "sanddance-logo.png",
|
||||
"publisher": "msrvida",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@msrvida/sanddance-embed",
|
||||
"version": "4.1.0",
|
||||
"version": "4.2.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@msrvida/sanddance-embed",
|
||||
"version": "4.1.0",
|
||||
"version": "4.2.0",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@fluentui/react": "^8",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@msrvida/sanddance-embed",
|
||||
"version": "4.1.0",
|
||||
"version": "4.2.0",
|
||||
"description": "Embeddable SandDance Explorer.",
|
||||
"browser": "dist/umd/sanddance-embed.js",
|
||||
"repository": {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@msrvida/sanddance-react",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@msrvida/sanddance-react",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"just-compare": "^1.3.0"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@msrvida/sanddance-react",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.1",
|
||||
"description": "SandDance visualization canvas React component",
|
||||
"main": "dist/es6/index.js",
|
||||
"repository": {
|
||||
|
@ -13,10 +13,10 @@
|
|||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"uitest": "parcel serve ./test/index.html --open --no-autoinstall --no-cache",
|
||||
"uitest": "parcel serve ./test/index.html --open --no-autoinstall --no-cache",
|
||||
"eslint": "eslint -c ../../.eslintrc.json --fix ./src/**/*.ts*",
|
||||
"docs": "typedoc src/index.ts -out ../../docs/docs/sanddance-react/v4 --theme ../../typedoc/theme --excludePrivate --gitRevision master",
|
||||
"deploy": "node ./scripts/deploy.js",
|
||||
"deploy": "node ./scripts/deploy.js",
|
||||
"watch-typescript": "tsc -p . -w",
|
||||
"build-typescript": "tsc -p .",
|
||||
"build-css": "sass ./src/css/sanddance-react.scss ./dist/css/sanddance-react.css",
|
||||
|
@ -37,7 +37,7 @@
|
|||
"react": ">=16.8.0 <18.0.0",
|
||||
"react-dom": ">=16.8.0 <18.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vega": "5.22.1"
|
||||
}
|
||||
"devDependencies": {
|
||||
"vega": "5.22.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@msrvida/sanddance",
|
||||
"version": "4.0.1",
|
||||
"version": "4.0.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@msrvida/sanddance",
|
||||
"version": "4.0.1",
|
||||
"version": "4.0.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"d3-scale": "^4.0.2",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@msrvida/sanddance",
|
||||
"version": "4.0.1",
|
||||
"version": "4.0.2",
|
||||
"description": "SandDance visualization canvas component.",
|
||||
"main": "dist/es6/index.js",
|
||||
"repository": {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@msrvida/vega-deck.gl",
|
||||
"version": "3.3.3",
|
||||
"version": "3.3.4",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@msrvida/vega-deck.gl",
|
||||
"version": "3.3.3",
|
||||
"version": "3.3.4",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@danmarshall/deckgl-typings": "^4.1.11",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@msrvida/vega-deck.gl",
|
||||
"version": "3.3.3",
|
||||
"version": "3.3.4",
|
||||
"description": "Deck.gl renderer for Vega",
|
||||
"main": "dist/es6/index.js",
|
||||
"repository": {
|
||||
|
|
Загрузка…
Ссылка в новой задаче