feat: add new file

This commit is contained in:
Daniel
2026-03-24 10:35:58 +08:00
commit 2788fc468f
9058 changed files with 896924 additions and 0 deletions

17
frontend/node_modules/d3-shape/src/symbol/asterisk.js generated vendored Normal file
View File

@@ -0,0 +1,17 @@
import {min, sqrt} from "../math.js";
const sqrt3 = sqrt(3);
export default {
draw(context, size) {
const r = sqrt(size + min(size / 28, 0.75)) * 0.59436;
const t = r / 2;
const u = t * sqrt3;
context.moveTo(0, r);
context.lineTo(0, -r);
context.moveTo(-u, -t);
context.lineTo(u, t);
context.moveTo(-u, t);
context.lineTo(u, -t);
}
};

9
frontend/node_modules/d3-shape/src/symbol/circle.js generated vendored Normal file
View File

@@ -0,0 +1,9 @@
import {pi, sqrt, tau} from "../math.js";
export default {
draw(context, size) {
const r = sqrt(size / pi);
context.moveTo(r, 0);
context.arc(0, 0, r, 0, tau);
}
};

20
frontend/node_modules/d3-shape/src/symbol/cross.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
import {sqrt} from "../math.js";
export default {
draw(context, size) {
const r = sqrt(size / 5) / 2;
context.moveTo(-3 * r, -r);
context.lineTo(-r, -r);
context.lineTo(-r, -3 * r);
context.lineTo(r, -3 * r);
context.lineTo(r, -r);
context.lineTo(3 * r, -r);
context.lineTo(3 * r, r);
context.lineTo(r, r);
context.lineTo(r, 3 * r);
context.lineTo(-r, 3 * r);
context.lineTo(-r, r);
context.lineTo(-3 * r, r);
context.closePath();
}
};

16
frontend/node_modules/d3-shape/src/symbol/diamond.js generated vendored Normal file
View File

@@ -0,0 +1,16 @@
import {sqrt} from "../math.js";
const tan30 = sqrt(1 / 3);
const tan30_2 = tan30 * 2;
export default {
draw(context, size) {
const y = sqrt(size / tan30_2);
const x = y * tan30;
context.moveTo(0, -y);
context.lineTo(x, 0);
context.lineTo(0, y);
context.lineTo(-x, 0);
context.closePath();
}
};

12
frontend/node_modules/d3-shape/src/symbol/diamond2.js generated vendored Normal file
View File

@@ -0,0 +1,12 @@
import {sqrt} from "../math.js";
export default {
draw(context, size) {
const r = sqrt(size) * 0.62625;
context.moveTo(0, -r);
context.lineTo(r, 0);
context.lineTo(0, r);
context.lineTo(-r, 0);
context.closePath();
}
};

11
frontend/node_modules/d3-shape/src/symbol/plus.js generated vendored Normal file
View File

@@ -0,0 +1,11 @@
import {min, sqrt} from "../math.js";
export default {
draw(context, size) {
const r = sqrt(size - min(size / 7, 2)) * 0.87559;
context.moveTo(-r, 0);
context.lineTo(r, 0);
context.moveTo(0, r);
context.lineTo(0, -r);
}
};

9
frontend/node_modules/d3-shape/src/symbol/square.js generated vendored Normal file
View File

@@ -0,0 +1,9 @@
import {sqrt} from "../math.js";
export default {
draw(context, size) {
const w = sqrt(size);
const x = -w / 2;
context.rect(x, x, w, w);
}
};

12
frontend/node_modules/d3-shape/src/symbol/square2.js generated vendored Normal file
View File

@@ -0,0 +1,12 @@
import {sqrt} from "../math.js";
export default {
draw(context, size) {
const r = sqrt(size) * 0.4431;
context.moveTo(r, r);
context.lineTo(r, -r);
context.lineTo(-r, -r);
context.lineTo(-r, r);
context.closePath();
}
};

24
frontend/node_modules/d3-shape/src/symbol/star.js generated vendored Normal file
View File

@@ -0,0 +1,24 @@
import {sin, cos, sqrt, pi, tau} from "../math.js";
const ka = 0.89081309152928522810;
const kr = sin(pi / 10) / sin(7 * pi / 10);
const kx = sin(tau / 10) * kr;
const ky = -cos(tau / 10) * kr;
export default {
draw(context, size) {
const r = sqrt(size * ka);
const x = kx * r;
const y = ky * r;
context.moveTo(0, -r);
context.lineTo(x, y);
for (let i = 1; i < 5; ++i) {
const a = tau * i / 5;
const c = cos(a);
const s = sin(a);
context.lineTo(s * r, -c * r);
context.lineTo(c * x - s * y, s * x + c * y);
}
context.closePath();
}
};

11
frontend/node_modules/d3-shape/src/symbol/times.js generated vendored Normal file
View File

@@ -0,0 +1,11 @@
import {min, sqrt} from "../math.js";
export default {
draw(context, size) {
const r = sqrt(size - min(size / 6, 1.7)) * 0.6189;
context.moveTo(-r, -r);
context.lineTo(r, r);
context.moveTo(-r, r);
context.lineTo(r, -r);
}
};

13
frontend/node_modules/d3-shape/src/symbol/triangle.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
import {sqrt} from "../math.js";
const sqrt3 = sqrt(3);
export default {
draw(context, size) {
const y = -sqrt(size / (sqrt3 * 3));
context.moveTo(0, y * 2);
context.lineTo(-sqrt3 * y, -y);
context.lineTo(sqrt3 * y, -y);
context.closePath();
}
};

15
frontend/node_modules/d3-shape/src/symbol/triangle2.js generated vendored Normal file
View File

@@ -0,0 +1,15 @@
import {sqrt} from "../math.js";
const sqrt3 = sqrt(3);
export default {
draw(context, size) {
const s = sqrt(size) * 0.6824;
const t = s / 2;
const u = (s * sqrt3) / 2; // cos(Math.PI / 6)
context.moveTo(0, -s);
context.lineTo(u, t);
context.lineTo(-u, t);
context.closePath();
}
};

25
frontend/node_modules/d3-shape/src/symbol/wye.js generated vendored Normal file
View File

@@ -0,0 +1,25 @@
import {sqrt} from "../math.js";
const c = -0.5;
const s = sqrt(3) / 2;
const k = 1 / sqrt(12);
const a = (k / 2 + 1) * 3;
export default {
draw(context, size) {
const r = sqrt(size / a);
const x0 = r / 2, y0 = r * k;
const x1 = x0, y1 = r * k + r;
const x2 = -x1, y2 = y1;
context.moveTo(x0, y0);
context.lineTo(x1, y1);
context.lineTo(x2, y2);
context.lineTo(c * x0 - s * y0, s * x0 + c * y0);
context.lineTo(c * x1 - s * y1, s * x1 + c * y1);
context.lineTo(c * x2 - s * y2, s * x2 + c * y2);
context.lineTo(c * x0 + s * y0, c * y0 - s * x0);
context.lineTo(c * x1 + s * y1, c * y1 - s * x1);
context.lineTo(c * x2 + s * y2, c * y2 - s * x2);
context.closePath();
}
};