@umami/shiso 1.12.0 → 1.13.0
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/chunks/App.js +76 -49
- package/dist/chunks/abnfDiagram-VCTEODGH.js +109 -0
- package/dist/chunks/arc.js +130 -0
- package/dist/chunks/architecture-7GRP2DOG.js +4 -0
- package/dist/chunks/architectureDiagram-5GKGNRK7.js +7466 -0
- package/dist/chunks/array.js +8 -0
- package/dist/chunks/blockDiagram-I7D4REHJ.js +2546 -0
- package/dist/chunks/c4Diagram-7LVT6UL2.js +3654 -0
- package/dist/chunks/channel.js +9 -0
- package/dist/chunks/chunk-2Q5K7J3B.js +21 -0
- package/dist/chunks/chunk-4HAMMTFA.js +6106 -0
- package/dist/chunks/chunk-5VM5RSS4.js +21 -0
- package/dist/chunks/chunk-75Z2AOVW.js +2185 -0
- package/dist/chunks/chunk-DU6HZSFF.js +8729 -0
- package/dist/chunks/chunk-F27PBJKO.js +95 -0
- package/dist/chunks/chunk-FOHPRMQF.js +27162 -0
- package/dist/chunks/chunk-GMAD6QVW.js +2369 -0
- package/dist/chunks/chunk-GVQU2GXP.js +58 -0
- package/dist/chunks/chunk-IMKFNOWR.js +2593 -0
- package/dist/chunks/chunk-JWPE2WC7.js +12 -0
- package/dist/chunks/chunk-L3NEJ4N5.js +420 -0
- package/dist/chunks/chunk-OSK3NFVY.js +1029 -0
- package/dist/chunks/chunk-P2QGCYS3.js +95 -0
- package/dist/chunks/chunk-POPQ4Y6H.js +33 -0
- package/dist/chunks/chunk-PWAF6VOD.js +467 -0
- package/dist/chunks/chunk-SHT3W25Y.js +4813 -0
- package/dist/chunks/chunk-SVP7TREG.js +686 -0
- package/dist/chunks/chunk-TICWLB2K.js +3800 -0
- package/dist/chunks/chunk-XXDRQBXY.js +12 -0
- package/dist/chunks/chunk-Y2CYZVJY.js +15 -0
- package/dist/chunks/classDiagram-ZZMXUADV.js +33 -0
- package/dist/chunks/classDiagram-v2-VYDZK3BY.js +33 -0
- package/dist/chunks/cose-bilkent-JH36ORCC.js +4268 -0
- package/dist/chunks/cynefin-OW5HDTMX.js +4 -0
- package/dist/chunks/cynefinDiagram-5FMLGOSQ.js +482 -0
- package/dist/chunks/cytoscape.esm.js +28282 -0
- package/dist/chunks/dagre-GXQ25YYZ.js +583 -0
- package/dist/chunks/dagre.js +4235 -0
- package/dist/chunks/defaultLocale.js +246 -0
- package/dist/chunks/diagram-S7CK7UJ4.js +402 -0
- package/dist/chunks/diagram-UQ7AKVKN.js +291 -0
- package/dist/chunks/diagram-VSXAHHWV.js +553 -0
- package/dist/chunks/diagram-VX7I27RA.js +798 -0
- package/dist/chunks/diagram-Z3DM3KII.js +186 -0
- package/dist/chunks/dist.js +92 -0
- package/dist/chunks/docs.js +987 -91
- package/dist/chunks/ebnfDiagram-PWID7BFC.js +123 -0
- package/dist/chunks/erDiagram-RLTQ6QDP.js +2295 -0
- package/dist/chunks/eventmodeling-NTZA5JFV.js +4 -0
- package/dist/chunks/flowDiagram-HODETNUW.js +17 -0
- package/dist/chunks/ganttDiagram-EL5Y4UJY.js +3928 -0
- package/dist/chunks/gitGraph-4MIJSDKK.js +4 -0
- package/dist/chunks/gitGraphDiagram-WWUBYQGX.js +1153 -0
- package/dist/chunks/graphlib.js +4194 -0
- package/dist/chunks/info-A6RAGUB7.js +4 -0
- package/dist/chunks/infoDiagram-27XIBGKW.js +25 -0
- package/dist/chunks/init.js +14 -0
- package/dist/chunks/ishikawaDiagram-5VMMS53U.js +971 -0
- package/dist/chunks/journeyDiagram-3NMN7TZE.js +1226 -0
- package/dist/chunks/kanban-definition-UXKFOSKX.js +1241 -0
- package/dist/chunks/katex.js +26463 -0
- package/dist/chunks/line.js +48 -0
- package/dist/chunks/linear.js +391 -0
- package/dist/chunks/mermaid-parser.core.js +754 -0
- package/dist/chunks/mermaid.core.js +4898 -0
- package/dist/chunks/mindmap-definition-YA3MSWOX.js +1309 -0
- package/dist/chunks/ordinal.js +84 -0
- package/dist/chunks/packet-AYTQ26CC.js +4 -0
- package/dist/chunks/path.js +106 -0
- package/dist/chunks/pegDiagram-XKGWAZYB.js +115 -0
- package/dist/chunks/pie-WAS4IAKB.js +4 -0
- package/dist/chunks/pieDiagram-E7YTZNPT.js +297 -0
- package/dist/chunks/quadrantDiagram-AXDQQJYC.js +2234 -0
- package/dist/chunks/radar-RG4KPBEZ.js +4 -0
- package/dist/chunks/railroad-74A4TZTK.js +4 -0
- package/dist/chunks/railroad-abnf-HS5TGJTU.js +4 -0
- package/dist/chunks/railroad-ebnf-LZEXJU2U.js +4 -0
- package/dist/chunks/railroad-peg-WCYAUIDC.js +4 -0
- package/dist/chunks/railroadDiagram-O6MQD6OU.js +89 -0
- package/dist/chunks/requirementDiagram-BXWQKSXE.js +2464 -0
- package/dist/chunks/rough.esm.js +1396 -0
- package/dist/chunks/sankeyDiagram-P5KCCOFB.js +1308 -0
- package/dist/chunks/sequenceDiagram-WJ2MYXX4.js +5445 -0
- package/dist/chunks/sizeCapture-INFHLROL.js +56 -0
- package/dist/chunks/src.js +2653 -0
- package/dist/chunks/stateDiagram-D77RDMKH.js +368 -0
- package/dist/chunks/stateDiagram-v2-MP3YSRHH.js +33 -0
- package/dist/chunks/swimlanes-42K2YHIH.js +6925 -0
- package/dist/chunks/swimlanesDiagram-VR7AAH4N.js +32 -0
- package/dist/chunks/timeline-definition-24CTP7MA.js +1507 -0
- package/dist/chunks/treeView-Q6P3EWNA.js +4 -0
- package/dist/chunks/treemap-WGGIJYW6.js +4 -0
- package/dist/chunks/vennDiagram-4TSXK5OY.js +2803 -0
- package/dist/chunks/wardley-WFR3VGLG.js +4 -0
- package/dist/chunks/wardleyDiagram-VM6X3IG4.js +877 -0
- package/dist/chunks/xychartDiagram-S5SC5T6Z.js +2698 -0
- package/dist/components.js +2 -2
- package/dist/entry-client.js +1 -1
- package/dist/entry-server.js +1 -1
- package/docs.schema.json +1 -1
- package/package.json +2 -1
- package/scripts/expand-navigation-globs.mjs +77 -8
- package/src/components/CodeBlock.tsx +36 -0
- package/src/components/Docs.tsx +44 -21
- package/src/components/OpenApiOperation.tsx +28 -20
- package/src/components/SideNav.tsx +8 -3
- package/src/components/docs/Changelog.tsx +163 -0
- package/src/components/docs/Mermaid.tsx +164 -0
- package/src/components/docs/Panel.tsx +23 -0
- package/src/components/docs/ParamField.tsx +17 -5
- package/src/components/docs/PropertiesTable.tsx +2 -2
- package/src/components/docs/ResponseField.tsx +17 -5
- package/src/components/docs/Tiles.tsx +59 -0
- package/src/components/docs/Tree.tsx +359 -0
- package/src/components/docs/Update.tsx +72 -0
- package/src/components/docs/index.ts +7 -0
- package/src/components/docs/panel-context.tsx +25 -0
- package/src/components/docs/styles.ts +49 -0
- package/src/components/icons/index.ts +4 -0
- package/src/lib/rehype-shiki.ts +18 -1
- package/types/components.d.ts +79 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { n as constant_default, t as withPath } from "./path.js";
|
|
2
|
+
import { t as array_default } from "./array.js";
|
|
3
|
+
import { rt as linear_default } from "./chunk-75Z2AOVW.js";
|
|
4
|
+
|
|
5
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/point.js
|
|
6
|
+
function x(p) {
|
|
7
|
+
return p[0];
|
|
8
|
+
}
|
|
9
|
+
function y(p) {
|
|
10
|
+
return p[1];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/line.js
|
|
15
|
+
function line_default(x$1, y$1) {
|
|
16
|
+
var defined = constant_default(true), context = null, curve = linear_default, output = null, path = withPath(line);
|
|
17
|
+
x$1 = typeof x$1 === "function" ? x$1 : x$1 === void 0 ? x : constant_default(x$1);
|
|
18
|
+
y$1 = typeof y$1 === "function" ? y$1 : y$1 === void 0 ? y : constant_default(y$1);
|
|
19
|
+
function line(data) {
|
|
20
|
+
var i, n = (data = array_default(data)).length, d, defined0 = false, buffer;
|
|
21
|
+
if (context == null) output = curve(buffer = path());
|
|
22
|
+
for (i = 0; i <= n; ++i) {
|
|
23
|
+
if (!(i < n && defined(d = data[i], i, data)) === defined0) if (defined0 = !defined0) output.lineStart();
|
|
24
|
+
else output.lineEnd();
|
|
25
|
+
if (defined0) output.point(+x$1(d, i, data), +y$1(d, i, data));
|
|
26
|
+
}
|
|
27
|
+
if (buffer) return output = null, buffer + "" || null;
|
|
28
|
+
}
|
|
29
|
+
line.x = function(_) {
|
|
30
|
+
return arguments.length ? (x$1 = typeof _ === "function" ? _ : constant_default(+_), line) : x$1;
|
|
31
|
+
};
|
|
32
|
+
line.y = function(_) {
|
|
33
|
+
return arguments.length ? (y$1 = typeof _ === "function" ? _ : constant_default(+_), line) : y$1;
|
|
34
|
+
};
|
|
35
|
+
line.defined = function(_) {
|
|
36
|
+
return arguments.length ? (defined = typeof _ === "function" ? _ : constant_default(!!_), line) : defined;
|
|
37
|
+
};
|
|
38
|
+
line.curve = function(_) {
|
|
39
|
+
return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;
|
|
40
|
+
};
|
|
41
|
+
line.context = function(_) {
|
|
42
|
+
return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;
|
|
43
|
+
};
|
|
44
|
+
return line;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
export { line_default as t };
|
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
import { l as color, n as number_default, o as constant_default, r as rgb_default, t as string_default } from "./src.js";
|
|
2
|
+
import { i as exponent_default, n as formatPrefix, r as formatSpecifier, t as format } from "./defaultLocale.js";
|
|
3
|
+
import { t as initRange } from "./init.js";
|
|
4
|
+
|
|
5
|
+
//#region ../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/ascending.js
|
|
6
|
+
function ascending(a, b) {
|
|
7
|
+
return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region ../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/descending.js
|
|
12
|
+
function descending(a, b) {
|
|
13
|
+
return a == null || b == null ? NaN : b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region ../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/bisector.js
|
|
18
|
+
function bisector(f) {
|
|
19
|
+
let compare1, compare2, delta;
|
|
20
|
+
if (f.length !== 2) {
|
|
21
|
+
compare1 = ascending;
|
|
22
|
+
compare2 = (d, x) => ascending(f(d), x);
|
|
23
|
+
delta = (d, x) => f(d) - x;
|
|
24
|
+
} else {
|
|
25
|
+
compare1 = f === ascending || f === descending ? f : zero;
|
|
26
|
+
compare2 = f;
|
|
27
|
+
delta = f;
|
|
28
|
+
}
|
|
29
|
+
function left(a, x, lo = 0, hi = a.length) {
|
|
30
|
+
if (lo < hi) {
|
|
31
|
+
if (compare1(x, x) !== 0) return hi;
|
|
32
|
+
do {
|
|
33
|
+
const mid = lo + hi >>> 1;
|
|
34
|
+
if (compare2(a[mid], x) < 0) lo = mid + 1;
|
|
35
|
+
else hi = mid;
|
|
36
|
+
} while (lo < hi);
|
|
37
|
+
}
|
|
38
|
+
return lo;
|
|
39
|
+
}
|
|
40
|
+
function right(a, x, lo = 0, hi = a.length) {
|
|
41
|
+
if (lo < hi) {
|
|
42
|
+
if (compare1(x, x) !== 0) return hi;
|
|
43
|
+
do {
|
|
44
|
+
const mid = lo + hi >>> 1;
|
|
45
|
+
if (compare2(a[mid], x) <= 0) lo = mid + 1;
|
|
46
|
+
else hi = mid;
|
|
47
|
+
} while (lo < hi);
|
|
48
|
+
}
|
|
49
|
+
return lo;
|
|
50
|
+
}
|
|
51
|
+
function center(a, x, lo = 0, hi = a.length) {
|
|
52
|
+
const i = left(a, x, lo, hi - 1);
|
|
53
|
+
return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
left,
|
|
57
|
+
center,
|
|
58
|
+
right
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function zero() {
|
|
62
|
+
return 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region ../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/number.js
|
|
67
|
+
function number$1(x) {
|
|
68
|
+
return x === null ? NaN : +x;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region ../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/bisect.js
|
|
73
|
+
const ascendingBisect = bisector(ascending);
|
|
74
|
+
const bisectRight = ascendingBisect.right;
|
|
75
|
+
const bisectLeft = ascendingBisect.left;
|
|
76
|
+
const bisectCenter = bisector(number$1).center;
|
|
77
|
+
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region ../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/ticks.js
|
|
80
|
+
const e10 = Math.sqrt(50);
|
|
81
|
+
const e5 = Math.sqrt(10);
|
|
82
|
+
const e2 = Math.sqrt(2);
|
|
83
|
+
function tickSpec(start, stop, count) {
|
|
84
|
+
const step = (stop - start) / Math.max(0, count), power = Math.floor(Math.log10(step)), error = step / Math.pow(10, power), factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;
|
|
85
|
+
let i1, i2, inc;
|
|
86
|
+
if (power < 0) {
|
|
87
|
+
inc = Math.pow(10, -power) / factor;
|
|
88
|
+
i1 = Math.round(start * inc);
|
|
89
|
+
i2 = Math.round(stop * inc);
|
|
90
|
+
if (i1 / inc < start) ++i1;
|
|
91
|
+
if (i2 / inc > stop) --i2;
|
|
92
|
+
inc = -inc;
|
|
93
|
+
} else {
|
|
94
|
+
inc = Math.pow(10, power) * factor;
|
|
95
|
+
i1 = Math.round(start / inc);
|
|
96
|
+
i2 = Math.round(stop / inc);
|
|
97
|
+
if (i1 * inc < start) ++i1;
|
|
98
|
+
if (i2 * inc > stop) --i2;
|
|
99
|
+
}
|
|
100
|
+
if (i2 < i1 && .5 <= count && count < 2) return tickSpec(start, stop, count * 2);
|
|
101
|
+
return [
|
|
102
|
+
i1,
|
|
103
|
+
i2,
|
|
104
|
+
inc
|
|
105
|
+
];
|
|
106
|
+
}
|
|
107
|
+
function ticks(start, stop, count) {
|
|
108
|
+
stop = +stop, start = +start, count = +count;
|
|
109
|
+
if (!(count > 0)) return [];
|
|
110
|
+
if (start === stop) return [start];
|
|
111
|
+
const reverse = stop < start, [i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count);
|
|
112
|
+
if (!(i2 >= i1)) return [];
|
|
113
|
+
const n = i2 - i1 + 1, ticks = new Array(n);
|
|
114
|
+
if (reverse) if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) / -inc;
|
|
115
|
+
else for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) * inc;
|
|
116
|
+
else if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) / -inc;
|
|
117
|
+
else for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) * inc;
|
|
118
|
+
return ticks;
|
|
119
|
+
}
|
|
120
|
+
function tickIncrement(start, stop, count) {
|
|
121
|
+
stop = +stop, start = +start, count = +count;
|
|
122
|
+
return tickSpec(start, stop, count)[2];
|
|
123
|
+
}
|
|
124
|
+
function tickStep(start, stop, count) {
|
|
125
|
+
stop = +stop, start = +start, count = +count;
|
|
126
|
+
const reverse = stop < start, inc = reverse ? tickIncrement(stop, start, count) : tickIncrement(start, stop, count);
|
|
127
|
+
return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/numberArray.js
|
|
132
|
+
function numberArray_default(a, b) {
|
|
133
|
+
if (!b) b = [];
|
|
134
|
+
var n = a ? Math.min(b.length, a.length) : 0, c = b.slice(), i;
|
|
135
|
+
return function(t) {
|
|
136
|
+
for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;
|
|
137
|
+
return c;
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
function isNumberArray(x) {
|
|
141
|
+
return ArrayBuffer.isView(x) && !(x instanceof DataView);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/array.js
|
|
146
|
+
function genericArray(a, b) {
|
|
147
|
+
var nb = b ? b.length : 0, na = a ? Math.min(nb, a.length) : 0, x = new Array(na), c = new Array(nb), i;
|
|
148
|
+
for (i = 0; i < na; ++i) x[i] = value_default(a[i], b[i]);
|
|
149
|
+
for (; i < nb; ++i) c[i] = b[i];
|
|
150
|
+
return function(t) {
|
|
151
|
+
for (i = 0; i < na; ++i) c[i] = x[i](t);
|
|
152
|
+
return c;
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
//#endregion
|
|
157
|
+
//#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/date.js
|
|
158
|
+
function date_default(a, b) {
|
|
159
|
+
var d = /* @__PURE__ */ new Date();
|
|
160
|
+
return a = +a, b = +b, function(t) {
|
|
161
|
+
return d.setTime(a * (1 - t) + b * t), d;
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
//#endregion
|
|
166
|
+
//#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/object.js
|
|
167
|
+
function object_default(a, b) {
|
|
168
|
+
var i = {}, c = {}, k;
|
|
169
|
+
if (a === null || typeof a !== "object") a = {};
|
|
170
|
+
if (b === null || typeof b !== "object") b = {};
|
|
171
|
+
for (k in b) if (k in a) i[k] = value_default(a[k], b[k]);
|
|
172
|
+
else c[k] = b[k];
|
|
173
|
+
return function(t) {
|
|
174
|
+
for (k in i) c[k] = i[k](t);
|
|
175
|
+
return c;
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/value.js
|
|
181
|
+
function value_default(a, b) {
|
|
182
|
+
var t = typeof b, c;
|
|
183
|
+
return b == null || t === "boolean" ? constant_default(b) : (t === "number" ? number_default : t === "string" ? (c = color(b)) ? (b = c, rgb_default) : string_default : b instanceof color ? rgb_default : b instanceof Date ? date_default : isNumberArray(b) ? numberArray_default : Array.isArray(b) ? genericArray : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object_default : number_default)(a, b);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
//#endregion
|
|
187
|
+
//#region ../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/round.js
|
|
188
|
+
function round_default(a, b) {
|
|
189
|
+
return a = +a, b = +b, function(t) {
|
|
190
|
+
return Math.round(a * (1 - t) + b * t);
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
//#endregion
|
|
195
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/precisionFixed.js
|
|
196
|
+
function precisionFixed_default(step) {
|
|
197
|
+
return Math.max(0, -exponent_default(Math.abs(step)));
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
//#endregion
|
|
201
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/precisionPrefix.js
|
|
202
|
+
function precisionPrefix_default(step, value) {
|
|
203
|
+
return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent_default(value) / 3))) * 3 - exponent_default(Math.abs(step)));
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
//#endregion
|
|
207
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/precisionRound.js
|
|
208
|
+
function precisionRound_default(step, max) {
|
|
209
|
+
step = Math.abs(step), max = Math.abs(max) - step;
|
|
210
|
+
return Math.max(0, exponent_default(max) - exponent_default(step)) + 1;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
//#endregion
|
|
214
|
+
//#region ../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/constant.js
|
|
215
|
+
function constants(x) {
|
|
216
|
+
return function() {
|
|
217
|
+
return x;
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
//#endregion
|
|
222
|
+
//#region ../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/number.js
|
|
223
|
+
function number(x) {
|
|
224
|
+
return +x;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
//#endregion
|
|
228
|
+
//#region ../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/continuous.js
|
|
229
|
+
var unit = [0, 1];
|
|
230
|
+
function identity(x) {
|
|
231
|
+
return x;
|
|
232
|
+
}
|
|
233
|
+
function normalize(a, b) {
|
|
234
|
+
return (b -= a = +a) ? function(x) {
|
|
235
|
+
return (x - a) / b;
|
|
236
|
+
} : constants(isNaN(b) ? NaN : .5);
|
|
237
|
+
}
|
|
238
|
+
function clamper(a, b) {
|
|
239
|
+
var t;
|
|
240
|
+
if (a > b) t = a, a = b, b = t;
|
|
241
|
+
return function(x) {
|
|
242
|
+
return Math.max(a, Math.min(b, x));
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
function bimap(domain, range, interpolate) {
|
|
246
|
+
var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];
|
|
247
|
+
if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);
|
|
248
|
+
else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);
|
|
249
|
+
return function(x) {
|
|
250
|
+
return r0(d0(x));
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
function polymap(domain, range, interpolate) {
|
|
254
|
+
var j = Math.min(domain.length, range.length) - 1, d = new Array(j), r = new Array(j), i = -1;
|
|
255
|
+
if (domain[j] < domain[0]) {
|
|
256
|
+
domain = domain.slice().reverse();
|
|
257
|
+
range = range.slice().reverse();
|
|
258
|
+
}
|
|
259
|
+
while (++i < j) {
|
|
260
|
+
d[i] = normalize(domain[i], domain[i + 1]);
|
|
261
|
+
r[i] = interpolate(range[i], range[i + 1]);
|
|
262
|
+
}
|
|
263
|
+
return function(x) {
|
|
264
|
+
var i = bisectRight(domain, x, 1, j) - 1;
|
|
265
|
+
return r[i](d[i](x));
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
function copy(source, target) {
|
|
269
|
+
return target.domain(source.domain()).range(source.range()).interpolate(source.interpolate()).clamp(source.clamp()).unknown(source.unknown());
|
|
270
|
+
}
|
|
271
|
+
function transformer() {
|
|
272
|
+
var domain = unit, range = unit, interpolate = value_default, transform, untransform, unknown, clamp = identity, piecewise, output, input;
|
|
273
|
+
function rescale() {
|
|
274
|
+
var n = Math.min(domain.length, range.length);
|
|
275
|
+
if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);
|
|
276
|
+
piecewise = n > 2 ? polymap : bimap;
|
|
277
|
+
output = input = null;
|
|
278
|
+
return scale;
|
|
279
|
+
}
|
|
280
|
+
function scale(x) {
|
|
281
|
+
return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));
|
|
282
|
+
}
|
|
283
|
+
scale.invert = function(y) {
|
|
284
|
+
return clamp(untransform((input || (input = piecewise(range, domain.map(transform), number_default)))(y)));
|
|
285
|
+
};
|
|
286
|
+
scale.domain = function(_) {
|
|
287
|
+
return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice();
|
|
288
|
+
};
|
|
289
|
+
scale.range = function(_) {
|
|
290
|
+
return arguments.length ? (range = Array.from(_), rescale()) : range.slice();
|
|
291
|
+
};
|
|
292
|
+
scale.rangeRound = function(_) {
|
|
293
|
+
return range = Array.from(_), interpolate = round_default, rescale();
|
|
294
|
+
};
|
|
295
|
+
scale.clamp = function(_) {
|
|
296
|
+
return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity;
|
|
297
|
+
};
|
|
298
|
+
scale.interpolate = function(_) {
|
|
299
|
+
return arguments.length ? (interpolate = _, rescale()) : interpolate;
|
|
300
|
+
};
|
|
301
|
+
scale.unknown = function(_) {
|
|
302
|
+
return arguments.length ? (unknown = _, scale) : unknown;
|
|
303
|
+
};
|
|
304
|
+
return function(t, u) {
|
|
305
|
+
transform = t, untransform = u;
|
|
306
|
+
return rescale();
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
function continuous() {
|
|
310
|
+
return transformer()(identity, identity);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
//#endregion
|
|
314
|
+
//#region ../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/tickFormat.js
|
|
315
|
+
function tickFormat(start, stop, count, specifier) {
|
|
316
|
+
var step = tickStep(start, stop, count), precision;
|
|
317
|
+
specifier = formatSpecifier(specifier == null ? ",f" : specifier);
|
|
318
|
+
switch (specifier.type) {
|
|
319
|
+
case "s":
|
|
320
|
+
var value = Math.max(Math.abs(start), Math.abs(stop));
|
|
321
|
+
if (specifier.precision == null && !isNaN(precision = precisionPrefix_default(step, value))) specifier.precision = precision;
|
|
322
|
+
return formatPrefix(specifier, value);
|
|
323
|
+
case "":
|
|
324
|
+
case "e":
|
|
325
|
+
case "g":
|
|
326
|
+
case "p":
|
|
327
|
+
case "r":
|
|
328
|
+
if (specifier.precision == null && !isNaN(precision = precisionRound_default(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e");
|
|
329
|
+
break;
|
|
330
|
+
case "f":
|
|
331
|
+
case "%": if (specifier.precision == null && !isNaN(precision = precisionFixed_default(step))) specifier.precision = precision - (specifier.type === "%") * 2;
|
|
332
|
+
}
|
|
333
|
+
return format(specifier);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
//#endregion
|
|
337
|
+
//#region ../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/linear.js
|
|
338
|
+
function linearish(scale) {
|
|
339
|
+
var domain = scale.domain;
|
|
340
|
+
scale.ticks = function(count) {
|
|
341
|
+
var d = domain();
|
|
342
|
+
return ticks(d[0], d[d.length - 1], count == null ? 10 : count);
|
|
343
|
+
};
|
|
344
|
+
scale.tickFormat = function(count, specifier) {
|
|
345
|
+
var d = domain();
|
|
346
|
+
return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);
|
|
347
|
+
};
|
|
348
|
+
scale.nice = function(count) {
|
|
349
|
+
if (count == null) count = 10;
|
|
350
|
+
var d = domain();
|
|
351
|
+
var i0 = 0;
|
|
352
|
+
var i1 = d.length - 1;
|
|
353
|
+
var start = d[i0];
|
|
354
|
+
var stop = d[i1];
|
|
355
|
+
var prestep;
|
|
356
|
+
var step;
|
|
357
|
+
var maxIter = 10;
|
|
358
|
+
if (stop < start) {
|
|
359
|
+
step = start, start = stop, stop = step;
|
|
360
|
+
step = i0, i0 = i1, i1 = step;
|
|
361
|
+
}
|
|
362
|
+
while (maxIter-- > 0) {
|
|
363
|
+
step = tickIncrement(start, stop, count);
|
|
364
|
+
if (step === prestep) {
|
|
365
|
+
d[i0] = start;
|
|
366
|
+
d[i1] = stop;
|
|
367
|
+
return domain(d);
|
|
368
|
+
} else if (step > 0) {
|
|
369
|
+
start = Math.floor(start / step) * step;
|
|
370
|
+
stop = Math.ceil(stop / step) * step;
|
|
371
|
+
} else if (step < 0) {
|
|
372
|
+
start = Math.ceil(start * step) / step;
|
|
373
|
+
stop = Math.floor(stop * step) / step;
|
|
374
|
+
} else break;
|
|
375
|
+
prestep = step;
|
|
376
|
+
}
|
|
377
|
+
return scale;
|
|
378
|
+
};
|
|
379
|
+
return scale;
|
|
380
|
+
}
|
|
381
|
+
function linear() {
|
|
382
|
+
var scale = continuous();
|
|
383
|
+
scale.copy = function() {
|
|
384
|
+
return copy(scale, linear());
|
|
385
|
+
};
|
|
386
|
+
initRange.apply(scale, arguments);
|
|
387
|
+
return linearish(scale);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
//#endregion
|
|
391
|
+
export { bisector as a, tickStep as i, continuous as n, copy as r, linear as t };
|