@particle-academy/fancy-flow 0.43.1 → 0.43.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +37 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +20 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4036,38 +4036,38 @@ function attrRemoveNS2(fullname) {
|
|
|
4036
4036
|
this.removeAttributeNS(fullname.space, fullname.local);
|
|
4037
4037
|
};
|
|
4038
4038
|
}
|
|
4039
|
-
function attrConstant2(name,
|
|
4039
|
+
function attrConstant2(name, interpolate2, value1) {
|
|
4040
4040
|
var string00, string1 = value1 + "", interpolate0;
|
|
4041
4041
|
return function() {
|
|
4042
4042
|
var string0 = this.getAttribute(name);
|
|
4043
|
-
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 =
|
|
4043
|
+
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, value1);
|
|
4044
4044
|
};
|
|
4045
4045
|
}
|
|
4046
|
-
function attrConstantNS2(fullname,
|
|
4046
|
+
function attrConstantNS2(fullname, interpolate2, value1) {
|
|
4047
4047
|
var string00, string1 = value1 + "", interpolate0;
|
|
4048
4048
|
return function() {
|
|
4049
4049
|
var string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
4050
|
-
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 =
|
|
4050
|
+
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, value1);
|
|
4051
4051
|
};
|
|
4052
4052
|
}
|
|
4053
|
-
function attrFunction2(name,
|
|
4053
|
+
function attrFunction2(name, interpolate2, value) {
|
|
4054
4054
|
var string00, string10, interpolate0;
|
|
4055
4055
|
return function() {
|
|
4056
4056
|
var string0, value1 = value(this), string1;
|
|
4057
4057
|
if (value1 == null) return void this.removeAttribute(name);
|
|
4058
4058
|
string0 = this.getAttribute(name);
|
|
4059
4059
|
string1 = value1 + "";
|
|
4060
|
-
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 =
|
|
4060
|
+
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1));
|
|
4061
4061
|
};
|
|
4062
4062
|
}
|
|
4063
|
-
function attrFunctionNS2(fullname,
|
|
4063
|
+
function attrFunctionNS2(fullname, interpolate2, value) {
|
|
4064
4064
|
var string00, string10, interpolate0;
|
|
4065
4065
|
return function() {
|
|
4066
4066
|
var string0, value1 = value(this), string1;
|
|
4067
4067
|
if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);
|
|
4068
4068
|
string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
4069
4069
|
string1 = value1 + "";
|
|
4070
|
-
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 =
|
|
4070
|
+
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1));
|
|
4071
4071
|
};
|
|
4072
4072
|
}
|
|
4073
4073
|
function attr_default2(name, value) {
|
|
@@ -4277,11 +4277,11 @@ function selection_default2() {
|
|
|
4277
4277
|
}
|
|
4278
4278
|
|
|
4279
4279
|
// node_modules/d3-transition/src/transition/style.js
|
|
4280
|
-
function styleNull(name,
|
|
4280
|
+
function styleNull(name, interpolate2) {
|
|
4281
4281
|
var string00, string10, interpolate0;
|
|
4282
4282
|
return function() {
|
|
4283
4283
|
var string0 = styleValue(this, name), string1 = (this.style.removeProperty(name), styleValue(this, name));
|
|
4284
|
-
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : interpolate0 =
|
|
4284
|
+
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, string10 = string1);
|
|
4285
4285
|
};
|
|
4286
4286
|
}
|
|
4287
4287
|
function styleRemove2(name) {
|
|
@@ -4289,19 +4289,19 @@ function styleRemove2(name) {
|
|
|
4289
4289
|
this.style.removeProperty(name);
|
|
4290
4290
|
};
|
|
4291
4291
|
}
|
|
4292
|
-
function styleConstant2(name,
|
|
4292
|
+
function styleConstant2(name, interpolate2, value1) {
|
|
4293
4293
|
var string00, string1 = value1 + "", interpolate0;
|
|
4294
4294
|
return function() {
|
|
4295
4295
|
var string0 = styleValue(this, name);
|
|
4296
|
-
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 =
|
|
4296
|
+
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, value1);
|
|
4297
4297
|
};
|
|
4298
4298
|
}
|
|
4299
|
-
function styleFunction2(name,
|
|
4299
|
+
function styleFunction2(name, interpolate2, value) {
|
|
4300
4300
|
var string00, string10, interpolate0;
|
|
4301
4301
|
return function() {
|
|
4302
4302
|
var string0 = styleValue(this, name), value1 = value(this), string1 = value1 + "";
|
|
4303
4303
|
if (value1 == null) string1 = value1 = (this.style.removeProperty(name), styleValue(this, name));
|
|
4304
|
-
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 =
|
|
4304
|
+
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1));
|
|
4305
4305
|
};
|
|
4306
4306
|
}
|
|
4307
4307
|
function styleMaybeRemove(id2, name) {
|
|
@@ -4619,7 +4619,7 @@ function defaultConstrain(transform2, extent, translateExtent) {
|
|
|
4619
4619
|
);
|
|
4620
4620
|
}
|
|
4621
4621
|
function zoom_default2() {
|
|
4622
|
-
var filter2 = defaultFilter2, extent = defaultExtent, constrain = defaultConstrain, wheelDelta2 = defaultWheelDelta, touchable = defaultTouchable2, scaleExtent = [0, Infinity], translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]], duration = 250,
|
|
4622
|
+
var filter2 = defaultFilter2, extent = defaultExtent, constrain = defaultConstrain, wheelDelta2 = defaultWheelDelta, touchable = defaultTouchable2, scaleExtent = [0, Infinity], translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]], duration = 250, interpolate2 = zoom_default, listeners3 = dispatch_default("start", "zoom", "end"), touchstarting, touchfirst, touchending, touchDelay = 500, wheelDelay = 150, clickDistance2 = 0, tapDistance = 10;
|
|
4623
4623
|
function zoom(selection2) {
|
|
4624
4624
|
selection2.property("__zoom", defaultTransform).on("wheel.zoom", wheeled, { passive: false }).on("mousedown.zoom", mousedowned).on("dblclick.zoom", dblclicked).filter(touchable).on("touchstart.zoom", touchstarted).on("touchmove.zoom", touchmoved).on("touchend.zoom touchcancel.zoom", touchended).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
4625
4625
|
}
|
|
@@ -4680,7 +4680,7 @@ function zoom_default2() {
|
|
|
4680
4680
|
}).on("interrupt.zoom end.zoom", function() {
|
|
4681
4681
|
gesture(this, arguments).event(event).end();
|
|
4682
4682
|
}).tween("zoom", function() {
|
|
4683
|
-
var that = this, args = arguments, g = gesture(that, args).event(event), e = extent.apply(that, args), p2 = point == null ? centroid(e) : typeof point === "function" ? point.apply(that, args) : point, w3 = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]), a = that.__zoom, b = typeof transform2 === "function" ? transform2.apply(that, args) : transform2, i =
|
|
4683
|
+
var that = this, args = arguments, g = gesture(that, args).event(event), e = extent.apply(that, args), p2 = point == null ? centroid(e) : typeof point === "function" ? point.apply(that, args) : point, w3 = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]), a = that.__zoom, b = typeof transform2 === "function" ? transform2.apply(that, args) : transform2, i = interpolate2(a.invert(p2).concat(w3 / a.k), b.invert(p2).concat(w3 / b.k));
|
|
4684
4684
|
return function(t) {
|
|
4685
4685
|
if (t === 1) t = b;
|
|
4686
4686
|
else {
|
|
@@ -4885,7 +4885,7 @@ function zoom_default2() {
|
|
|
4885
4885
|
return arguments.length ? (duration = +_2, zoom) : duration;
|
|
4886
4886
|
};
|
|
4887
4887
|
zoom.interpolate = function(_2) {
|
|
4888
|
-
return arguments.length ? (
|
|
4888
|
+
return arguments.length ? (interpolate2 = _2, zoom) : interpolate2;
|
|
4889
4889
|
};
|
|
4890
4890
|
zoom.on = function() {
|
|
4891
4891
|
var value = listeners3.on.apply(listeners3, arguments);
|
|
@@ -15272,8 +15272,23 @@ var flowKeys = {
|
|
|
15272
15272
|
};
|
|
15273
15273
|
|
|
15274
15274
|
// src/expressions/expr.ts
|
|
15275
|
-
|
|
15276
|
-
|
|
15275
|
+
function wholeExpression(trimmed) {
|
|
15276
|
+
if (trimmed.length < 4) return null;
|
|
15277
|
+
if (!trimmed.startsWith("{{") || !trimmed.endsWith("}}")) return null;
|
|
15278
|
+
return trimmed.slice(2, -2);
|
|
15279
|
+
}
|
|
15280
|
+
function interpolate(template, resolve) {
|
|
15281
|
+
let out = "";
|
|
15282
|
+
let i = 0;
|
|
15283
|
+
for (; ; ) {
|
|
15284
|
+
const open = template.indexOf("{{", i);
|
|
15285
|
+
if (open === -1) return out + template.slice(i);
|
|
15286
|
+
const close = template.indexOf("}}", open + 2);
|
|
15287
|
+
if (close === -1) return out + template.slice(i);
|
|
15288
|
+
out += template.slice(i, open) + resolve(template.slice(open + 2, close));
|
|
15289
|
+
i = close + 2;
|
|
15290
|
+
}
|
|
15291
|
+
}
|
|
15277
15292
|
var FALSY_STRINGS = /* @__PURE__ */ new Set(["", "0", "false", "no", "off", "null"]);
|
|
15278
15293
|
function resolvePath(path, context) {
|
|
15279
15294
|
const trimmed = path.trim();
|
|
@@ -15298,9 +15313,9 @@ function resolvePath(path, context) {
|
|
|
15298
15313
|
}
|
|
15299
15314
|
function evaluateExpression(template, context) {
|
|
15300
15315
|
if (typeof template !== "string") return template;
|
|
15301
|
-
const whole =
|
|
15302
|
-
if (whole) return resolvePath(whole
|
|
15303
|
-
return template
|
|
15316
|
+
const whole = wholeExpression(template.trim());
|
|
15317
|
+
if (whole !== null) return resolvePath(whole, context);
|
|
15318
|
+
return interpolate(template, (path) => stringify(resolvePath(path, context)));
|
|
15304
15319
|
}
|
|
15305
15320
|
function truthy(value) {
|
|
15306
15321
|
if (typeof value === "boolean") return value;
|