fix: repair EM observation web charts
This commit is contained in:
@@ -0,0 +1,333 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { readFileSync } from "node:fs";
|
||||
import { test } from "node:test";
|
||||
import { JSDOM } from "jsdom";
|
||||
|
||||
const webDir = new URL("../../TrajectoryPlanningVisualization/Web/", import.meta.url);
|
||||
const readWebFile = (name) => readFileSync(new URL(name, webDir), "utf8");
|
||||
|
||||
function makeStaticSnapshot({ empty = false } = {}) {
|
||||
return {
|
||||
sessionNameChinese: "合成轨迹规划观察",
|
||||
worldBounds: { xMin: 0, xMax: 12, yMin: 0, yMax: 8 },
|
||||
occupancyGrid: null,
|
||||
staticPolylines: empty
|
||||
? []
|
||||
: [
|
||||
{
|
||||
id: "global",
|
||||
legendChinese: "全局参考路径",
|
||||
kind: "global",
|
||||
lineStyle: 0,
|
||||
points: [
|
||||
{ x: 0, y: 1 },
|
||||
{ x: 3, y: 1 },
|
||||
{ x: 6, y: 2 },
|
||||
{ x: 8, y: 4 },
|
||||
{ x: 11, y: 6 }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: "local-g2",
|
||||
legendChinese: "完整 Local G2 路径",
|
||||
kind: "local-g2",
|
||||
lineStyle: 0,
|
||||
points: [
|
||||
{ x: 0.2, y: 1 },
|
||||
{ x: 3.2, y: 1.1 },
|
||||
{ x: 6.1, y: 2.1 },
|
||||
{ x: 8.1, y: 4.1 },
|
||||
{ x: 10.9, y: 5.9 }
|
||||
]
|
||||
}
|
||||
],
|
||||
staticMarkers: empty
|
||||
? []
|
||||
: [
|
||||
{ id: "gear-1", kind: "gear-switch", labelChinese: "换向 1", position: { x: 6, y: 2 } },
|
||||
{ id: "gear-1-end", kind: "gear-switch-end", labelChinese: "换向点 1 / s_end", position: { x: 6, y: 2 } },
|
||||
{ id: "final-goal", kind: "final-goal", labelChinese: "终点 / s_end", position: { x: 11, y: 6 } }
|
||||
],
|
||||
directionSegments: empty
|
||||
? []
|
||||
: [
|
||||
{
|
||||
segmentIndex: 0,
|
||||
direction: "forward",
|
||||
startsAtGearSwitch: false,
|
||||
endsAtGearSwitch: true,
|
||||
points: [
|
||||
{ x: 0, y: 1 },
|
||||
{ x: 3, y: 1 },
|
||||
{ x: 6, y: 2 }
|
||||
]
|
||||
},
|
||||
{
|
||||
segmentIndex: 1,
|
||||
direction: "reverse",
|
||||
startsAtGearSwitch: true,
|
||||
endsAtGearSwitch: false,
|
||||
points: [
|
||||
{ x: 6, y: 2 },
|
||||
{ x: 8, y: 4 },
|
||||
{ x: 11, y: 6 }
|
||||
]
|
||||
}
|
||||
],
|
||||
configurationGroups: []
|
||||
};
|
||||
}
|
||||
|
||||
function chart(id, title, xAxis, yAxis, points, annotations = []) {
|
||||
return {
|
||||
id,
|
||||
chineseTitle: title,
|
||||
xAxisLabel: xAxis,
|
||||
yAxisLabel: yAxis,
|
||||
noteChinese: "",
|
||||
series: [
|
||||
{
|
||||
id: id + "-current",
|
||||
legend: "当前轨迹",
|
||||
lineStyle: 0,
|
||||
points: points.map(([x, y]) => ({ x, y }))
|
||||
}
|
||||
],
|
||||
annotations
|
||||
};
|
||||
}
|
||||
|
||||
function makeDynamicSnapshot({ empty = false } = {}) {
|
||||
if (empty) {
|
||||
return {
|
||||
sequence: 1,
|
||||
observedAtUtc: "2026-08-06T00:00:00Z",
|
||||
sessionStateChinese: "运行中",
|
||||
activeSegmentIndex: 0,
|
||||
activeDirection: "forward",
|
||||
vehiclePose: null,
|
||||
dynamicPolylines: [],
|
||||
dynamicMarkers: [],
|
||||
charts: [],
|
||||
statusValues: [],
|
||||
cycleSummary: {
|
||||
cycleVersion: 1,
|
||||
occurredAtUtc: "2026-08-06T00:00:00Z",
|
||||
status: "成功",
|
||||
published: true,
|
||||
planningElapsedMilliseconds: 4.2,
|
||||
segmentIndex: 0,
|
||||
direction: "forward",
|
||||
longitudinalMode: "full",
|
||||
terminalType: "goal",
|
||||
terminalVelocity: 0,
|
||||
terminalAcceleration: 0,
|
||||
failureReason: ""
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
sequence: 1,
|
||||
observedAtUtc: "2026-08-06T00:00:00Z",
|
||||
sessionStateChinese: "合成数据运行中",
|
||||
activeSegmentIndex: 0,
|
||||
activeDirection: "forward",
|
||||
vehiclePose: { x: 2, y: 1, headingRadians: 0 },
|
||||
dynamicPolylines: [
|
||||
{
|
||||
id: "previous",
|
||||
legendChinese: "上一轮轨迹",
|
||||
kind: "previous",
|
||||
lineStyle: 1,
|
||||
points: [
|
||||
{ x: 1, y: 1 },
|
||||
{ x: 2.5, y: 1 },
|
||||
{ x: 4, y: 1.3 }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: "current",
|
||||
legendChinese: "当前轨迹",
|
||||
kind: "current",
|
||||
lineStyle: 0,
|
||||
points: [
|
||||
{ x: 2, y: 1 },
|
||||
{ x: 3.8, y: 1.2 },
|
||||
{ x: 5.8, y: 1.9 }
|
||||
]
|
||||
}
|
||||
],
|
||||
dynamicMarkers: [
|
||||
{ id: "vehicle", kind: "vehicle", labelChinese: "车辆", position: { x: 2, y: 1 } },
|
||||
{ id: "plan-start", kind: "plan-start", labelChinese: "计划起点", position: { x: 2, y: 1 } },
|
||||
{ id: "gear-switch-end", kind: "gear-switch-end", labelChinese: "换向点 1 / s_end", position: { x: 6, y: 2 } }
|
||||
],
|
||||
charts: [
|
||||
chart("ls", "横向偏移", "ReferenceS (m)", "l (m)", [[0, 0.05], [2, 0.08], [4, 0.02]], [
|
||||
{ id: "ls-s-end", kind: "s-end", labelChinese: "s_end", x: 4 }
|
||||
]),
|
||||
chart("st", "时空轨迹", "t (s)", "PathS (m)", [[0, 0], [1, 1.2], [2, 3]], [
|
||||
{ id: "st-s-end", kind: "s-end", labelChinese: "s_end", x: 2 }
|
||||
])
|
||||
],
|
||||
statusValues: [],
|
||||
cycleSummary: {
|
||||
cycleVersion: 1,
|
||||
occurredAtUtc: "2026-08-06T00:00:00Z",
|
||||
status: "成功",
|
||||
published: true,
|
||||
planningElapsedMilliseconds: 4.2,
|
||||
segmentIndex: 0,
|
||||
direction: "forward",
|
||||
longitudinalMode: "full",
|
||||
terminalType: "goal",
|
||||
terminalVelocity: 0,
|
||||
terminalAcceleration: 0,
|
||||
failureReason: ""
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function fakeContext() {
|
||||
return {
|
||||
setTransform() {},
|
||||
clearRect() {},
|
||||
fillRect() {}
|
||||
};
|
||||
}
|
||||
|
||||
function loadApp({ staticSnapshot = makeStaticSnapshot(), dynamicSnapshot = makeDynamicSnapshot() } = {}) {
|
||||
const dom = new JSDOM(readWebFile("index.html"), {
|
||||
runScripts: "outside-only",
|
||||
pretendToBeVisual: true,
|
||||
url: "http://127.0.0.1/observation?token=test"
|
||||
});
|
||||
const { window } = dom;
|
||||
window.devicePixelRatio = 1;
|
||||
window.__TRAJECTORY_VISUALIZATION_TEST__ = true;
|
||||
window.__fetchCalled = false;
|
||||
window.__eventSourceCreated = false;
|
||||
window.fetch = async () => {
|
||||
window.__fetchCalled = true;
|
||||
throw new Error("test mode must not fetch");
|
||||
};
|
||||
window.EventSource = class {
|
||||
constructor() {
|
||||
window.__eventSourceCreated = true;
|
||||
}
|
||||
|
||||
close() {}
|
||||
};
|
||||
const style = window.document.createElement("style");
|
||||
style.textContent = readWebFile("app.css");
|
||||
window.document.head.append(style);
|
||||
window.HTMLCanvasElement.prototype.getContext = () => fakeContext();
|
||||
window.eval(readWebFile("app.js"));
|
||||
|
||||
if (window.__trajectoryVisualizationTestHooks) {
|
||||
const hooks = window.__trajectoryVisualizationTestHooks;
|
||||
hooks.setBootstrap(staticSnapshot);
|
||||
hooks.receiveFrame({ snapshot: dynamicSnapshot, history: [] });
|
||||
}
|
||||
|
||||
return dom;
|
||||
}
|
||||
|
||||
test("tab switching hides inactive sections despite CSS grid rules", () => {
|
||||
const dom = loadApp();
|
||||
const { document, getComputedStyle } = dom.window;
|
||||
const overview = document.querySelector("#overview");
|
||||
const lsSt = document.querySelector("#ls-st");
|
||||
const kinematics = document.querySelector("#kinematics");
|
||||
|
||||
assert.equal(overview.hidden, false);
|
||||
assert.notEqual(getComputedStyle(overview).display, "none");
|
||||
|
||||
document.querySelector('button[data-tab="ls-st"]').click();
|
||||
|
||||
assert.equal(overview.hidden, true);
|
||||
assert.equal(getComputedStyle(overview).display, "none");
|
||||
assert.equal(lsSt.hidden, false);
|
||||
assert.notEqual(getComputedStyle(lsSt).display, "none");
|
||||
assert.equal(kinematics.hidden, true);
|
||||
assert.equal(getComputedStyle(kinematics).display, "none");
|
||||
});
|
||||
|
||||
test("ST chart renders y ticks, units, and s_end annotation", () => {
|
||||
const dom = loadApp();
|
||||
const { document } = dom.window;
|
||||
document.querySelector('button[data-tab="ls-st"]').click();
|
||||
|
||||
const yTicks = document.querySelectorAll("#st .axis-tick-y");
|
||||
const xTicks = document.querySelectorAll("#st .axis-tick-x");
|
||||
const yLabel = document.querySelector("#st .axis-label-y");
|
||||
const xLabel = document.querySelector("#st .axis-label-x");
|
||||
|
||||
assert.ok(yTicks.length >= 4, "ST renders y tick text");
|
||||
assert.ok(xTicks.length >= 4, "ST renders x tick text");
|
||||
assert.ok([...yTicks].every(tick => tick.textContent.length > 0), "y ticks have readable values");
|
||||
assert.equal(yLabel.textContent, "PathS (m)");
|
||||
assert.equal(xLabel.textContent, "t (s)");
|
||||
assert.ok(document.querySelector("#st .chart-annotation-label")?.textContent.includes("s_end"));
|
||||
});
|
||||
|
||||
test("ST PathS polyline rises and semantic world layers are ordered", () => {
|
||||
const dom = loadApp();
|
||||
const { document } = dom.window;
|
||||
document.querySelector('button[data-tab="ls-st"]').click();
|
||||
const stPath = document.querySelector("#st path.chart-data");
|
||||
assert.ok(stPath, "ST chart has a polyline");
|
||||
const segments = stPath.getAttribute("d").split(/(?=[ML])/).filter(Boolean);
|
||||
const yValues = segments.map(segment => Number(segment.slice(1).trim().split(/[\s,]+/)[1]));
|
||||
assert.ok(yValues.length >= 3, "ST polyline has at least three rendered points");
|
||||
assert.ok(yValues[1] < yValues[0] && yValues[2] < yValues[1],
|
||||
"ST PathS increases upward in rendered pixel coordinates");
|
||||
|
||||
document.querySelector('button[data-tab="overview"]').click();
|
||||
const overlay = document.querySelector("#world-overlay");
|
||||
const paths = [...overlay.querySelectorAll("path")];
|
||||
const layerClasses = ["world-coarse", "world-local-g2", "world-segment-active", "world-previous", "world-current"];
|
||||
const indices = layerClasses.map(className => paths.findIndex(path => path.classList.contains(className)));
|
||||
layerClasses.forEach((className, index) => assert.ok(indices[index] !== -1, className + " exists"));
|
||||
for (let index = 1; index < indices.length; index += 1) {
|
||||
assert.ok(indices[index - 1] < indices[index], "semantic world layer order is preserved");
|
||||
}
|
||||
});
|
||||
|
||||
test("vehicle, plan start, gear switch, and final goal use semantic markers", () => {
|
||||
const dom = loadApp();
|
||||
const { document } = dom.window;
|
||||
const overlay = document.querySelector("#world-overlay");
|
||||
|
||||
for (const className of ["marker-vehicle", "marker-plan-start", "marker-gear-switch", "marker-final-goal"]) {
|
||||
assert.ok(overlay.querySelector("." + className), className + " is rendered");
|
||||
}
|
||||
assert.equal(overlay.querySelectorAll(".marker-vehicle circle").length, 0,
|
||||
"vehicle marker is not a fixed pixel circle");
|
||||
});
|
||||
|
||||
test("empty overview names the missing Local G2 source", () => {
|
||||
const dom = loadApp({
|
||||
staticSnapshot: makeStaticSnapshot({ empty: true }),
|
||||
dynamicSnapshot: makeDynamicSnapshot({ empty: true })
|
||||
});
|
||||
const emptyState = dom.window.document.querySelector("#world-overlay .world-empty-state");
|
||||
|
||||
assert.ok(emptyState, "empty overview renders a visible state");
|
||||
assert.match(emptyState.textContent, /未收到.*Local G2 路径/);
|
||||
});
|
||||
|
||||
test("test mode exposes frozen hooks without fetch or SSE", () => {
|
||||
const dom = loadApp();
|
||||
const { window } = dom;
|
||||
|
||||
assert.equal(window.__fetchCalled, false);
|
||||
assert.equal(window.__eventSourceCreated, false);
|
||||
assert.ok(window.__trajectoryVisualizationTestHooks, "test hooks are exposed");
|
||||
assert.equal(Object.isFrozen(window.__trajectoryVisualizationTestHooks), true);
|
||||
for (const name of ["setBootstrap", "receiveFrame", "renderActiveTab", "installTabs"]) {
|
||||
assert.equal(typeof window.__trajectoryVisualizationTestHooks[name], "function", name + " hook exists");
|
||||
}
|
||||
assert.equal("state" in window.__trajectoryVisualizationTestHooks, false);
|
||||
});
|
||||
@@ -0,0 +1,558 @@
|
||||
{
|
||||
"name": "trajectory-planning-visualization-web-dom-tests",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "trajectory-planning-visualization-web-dom-tests",
|
||||
"devDependencies": {
|
||||
"jsdom": "29.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=24"
|
||||
}
|
||||
},
|
||||
"node_modules/@asamuzakjp/css-color": {
|
||||
"version": "5.1.11",
|
||||
"resolved": "https://registry.npmmirror.com/@asamuzakjp/css-color/-/css-color-5.1.11.tgz",
|
||||
"integrity": "sha512-KVw6qIiCTUQhByfTd78h2yD1/00waTmm9uy/R7Ck/ctUyAPj+AEDLkQIdJW0T8+qGgj3j5bpNKK7Q3G+LedJWg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@asamuzakjp/generational-cache": "^1.0.1",
|
||||
"@csstools/css-calc": "^3.2.0",
|
||||
"@csstools/css-color-parser": "^4.1.0",
|
||||
"@csstools/css-parser-algorithms": "^4.0.0",
|
||||
"@csstools/css-tokenizer": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.19.0 || ^22.12.0 || >=24.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@asamuzakjp/dom-selector": {
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/@asamuzakjp/dom-selector/-/dom-selector-7.1.1.tgz",
|
||||
"integrity": "sha512-67RZDnYRc8H/8MLDgQCDE//zoqVFwajkepHZgmXrbwybzXOEwOWGPYGmALYl9J2DOLfFPPs6kKCqmbzV895hTQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@asamuzakjp/generational-cache": "^1.0.1",
|
||||
"@asamuzakjp/nwsapi": "^2.3.9",
|
||||
"bidi-js": "^1.0.3",
|
||||
"css-tree": "^3.2.1",
|
||||
"is-potential-custom-element-name": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.19.0 || ^22.12.0 || >=24.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@asamuzakjp/generational-cache": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/@asamuzakjp/generational-cache/-/generational-cache-1.0.1.tgz",
|
||||
"integrity": "sha512-wajfB8KqzMCN2KGNFdLkReeHncd0AslUSrvHVvvYWuU8ghncRJoA50kT3zP9MVL0+9g4/67H+cdvBskj9THPzg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "^20.19.0 || ^22.12.0 || >=24.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@asamuzakjp/nwsapi": {
|
||||
"version": "2.3.9",
|
||||
"resolved": "https://registry.npmmirror.com/@asamuzakjp/nwsapi/-/nwsapi-2.3.9.tgz",
|
||||
"integrity": "sha512-n8GuYSrI9bF7FFZ/SjhwevlHc8xaVlb/7HmHelnc/PZXBD2ZR49NnN9sMMuDdEGPeeRQ5d0hqlSlEpgCX3Wl0Q==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@bramus/specificity": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmmirror.com/@bramus/specificity/-/specificity-2.4.2.tgz",
|
||||
"integrity": "sha512-ctxtJ/eA+t+6q2++vj5j7FYX3nRu311q1wfYH3xjlLOsczhlhxAg2FWNUXhpGvAw3BWo1xBcvOV6/YLc2r5FJw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"css-tree": "^3.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"specificity": "bin/cli.js"
|
||||
}
|
||||
},
|
||||
"node_modules/@csstools/color-helpers": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/@csstools/color-helpers/-/color-helpers-6.1.0.tgz",
|
||||
"integrity": "sha512-064IFJdjTfUqnjpCVpMOdbr8FLQBhinbZj6yRv2An2E41O/pLEXqfFRWqGq/SxlE5PEUYTlvWsG2r8MswAVvkg==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/csstools"
|
||||
},
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/csstools"
|
||||
}
|
||||
],
|
||||
"license": "MIT-0",
|
||||
"engines": {
|
||||
"node": ">=20.19.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@csstools/css-calc": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmmirror.com/@csstools/css-calc/-/css-calc-3.3.0.tgz",
|
||||
"integrity": "sha512-c5ihYsPkdG6JCkU2zTMm4+k6r7RXuGxtWYhu5DHMIiF1FHzrfmHL5so11AoFpUv/tu61xfcmT4AmKoFfMPoqdQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/csstools"
|
||||
},
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/csstools"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=20.19.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@csstools/css-parser-algorithms": "^4.0.0",
|
||||
"@csstools/css-tokenizer": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@csstools/css-color-parser": {
|
||||
"version": "4.1.10",
|
||||
"resolved": "https://registry.npmmirror.com/@csstools/css-color-parser/-/css-color-parser-4.1.10.tgz",
|
||||
"integrity": "sha512-UZhQLIUyJaaMepqehrCODwCg2KW25vFvLWBmqYFaPclYvvxzj/sG8LBOhBFCp11i9uE7t1EyS+RAoV9tztPFyw==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/csstools"
|
||||
},
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/csstools"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@csstools/color-helpers": "^6.1.0",
|
||||
"@csstools/css-calc": "^3.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.19.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@csstools/css-parser-algorithms": "^4.0.0",
|
||||
"@csstools/css-tokenizer": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@csstools/css-parser-algorithms": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/@csstools/css-parser-algorithms/-/css-parser-algorithms-4.0.0.tgz",
|
||||
"integrity": "sha512-+B87qS7fIG3L5h3qwJ/IFbjoVoOe/bpOdh9hAjXbvx0o8ImEmUsGXN0inFOnk2ChCFgqkkGFQ+TpM5rbhkKe4w==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/csstools"
|
||||
},
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/csstools"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=20.19.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@csstools/css-tokenizer": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@csstools/css-syntax-patches-for-csstree": {
|
||||
"version": "1.1.7",
|
||||
"resolved": "https://registry.npmmirror.com/@csstools/css-syntax-patches-for-csstree/-/css-syntax-patches-for-csstree-1.1.7.tgz",
|
||||
"integrity": "sha512-fQ+05118eQS1cofO3aJpB5efgpBZMvIzwr/sbC8kDLVA5XLG8q1kJV5yzrUAI1f7lvhPnm8fgIjzFB8/O/5Dig==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/csstools"
|
||||
},
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/csstools"
|
||||
}
|
||||
],
|
||||
"license": "MIT-0",
|
||||
"peerDependencies": {
|
||||
"css-tree": "^3.2.1"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"css-tree": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@csstools/css-tokenizer": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/@csstools/css-tokenizer/-/css-tokenizer-4.0.0.tgz",
|
||||
"integrity": "sha512-QxULHAm7cNu72w97JUNCBFODFaXpbDg+dP8b/oWFAZ2MTRppA3U00Y2L1HqaS4J6yBqxwa/Y3nMBaxVKbB/NsA==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/csstools"
|
||||
},
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/csstools"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=20.19.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@exodus/bytes": {
|
||||
"version": "1.15.1",
|
||||
"resolved": "https://registry.npmmirror.com/@exodus/bytes/-/bytes-1.15.1.tgz",
|
||||
"integrity": "sha512-S6mL0yNB/Abt9Ei4tq8gDhcczc4S3+vQ4ra7vxnAf+YHC02srtqxKKZghx2Dq6p0e66THKwR6r8N6P95wEty7Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "^20.19.0 || ^22.12.0 || >=24.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@noble/hashes": "^1.8.0 || ^2.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@noble/hashes": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/bidi-js": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/bidi-js/-/bidi-js-1.0.3.tgz",
|
||||
"integrity": "sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"require-from-string": "^2.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/css-tree": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/css-tree/-/css-tree-3.2.1.tgz",
|
||||
"integrity": "sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mdn-data": "2.27.1",
|
||||
"source-map-js": "^1.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/data-urls": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/data-urls/-/data-urls-7.0.0.tgz",
|
||||
"integrity": "sha512-23XHcCF+coGYevirZceTVD7NdJOqVn+49IHyxgszm+JIiHLoB2TkmPtsYkNWT1pvRSGkc35L6NHs0yHkN2SumA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"whatwg-mimetype": "^5.0.0",
|
||||
"whatwg-url": "^16.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.19.0 || ^22.12.0 || >=24.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/decimal.js": {
|
||||
"version": "10.6.0",
|
||||
"resolved": "https://registry.npmmirror.com/decimal.js/-/decimal.js-10.6.0.tgz",
|
||||
"integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/entities": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/entities/-/entities-8.0.0.tgz",
|
||||
"integrity": "sha512-zwfzJecQ/Uej6tusMqwAqU/6KL2XaB2VZ2Jg54Je6ahNBGNH6Ek6g3jjNCF0fG9EWQKGZNddNjU5F1ZQn/sBnA==",
|
||||
"dev": true,
|
||||
"license": "BSD-2-Clause",
|
||||
"engines": {
|
||||
"node": ">=20.19.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/fb55/entities?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/html-encoding-sniffer": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/html-encoding-sniffer/-/html-encoding-sniffer-6.0.0.tgz",
|
||||
"integrity": "sha512-CV9TW3Y3f8/wT0BRFc1/KAVQ3TUHiXmaAb6VW9vtiMFf7SLoMd1PdAc4W3KFOFETBJUb90KatHqlsZMWV+R9Gg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@exodus/bytes": "^1.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.19.0 || ^22.12.0 || >=24.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-potential-custom-element-name": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz",
|
||||
"integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/jsdom": {
|
||||
"version": "29.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/jsdom/-/jsdom-29.1.1.tgz",
|
||||
"integrity": "sha512-ECi4Fi2f7BdJtUKTflYRTiaMxIB0O6zfR1fX0GXpUrf6flp8QIYn1UT20YQqdSOfk2dfkCwS8LAFoJDEppNK5Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@asamuzakjp/css-color": "^5.1.11",
|
||||
"@asamuzakjp/dom-selector": "^7.1.1",
|
||||
"@bramus/specificity": "^2.4.2",
|
||||
"@csstools/css-syntax-patches-for-csstree": "^1.1.3",
|
||||
"@exodus/bytes": "^1.15.0",
|
||||
"css-tree": "^3.2.1",
|
||||
"data-urls": "^7.0.0",
|
||||
"decimal.js": "^10.6.0",
|
||||
"html-encoding-sniffer": "^6.0.0",
|
||||
"is-potential-custom-element-name": "^1.0.1",
|
||||
"lru-cache": "^11.3.5",
|
||||
"parse5": "^8.0.1",
|
||||
"saxes": "^6.0.0",
|
||||
"symbol-tree": "^3.2.4",
|
||||
"tough-cookie": "^6.0.1",
|
||||
"undici": "^7.25.0",
|
||||
"w3c-xmlserializer": "^5.0.0",
|
||||
"webidl-conversions": "^8.0.1",
|
||||
"whatwg-mimetype": "^5.0.0",
|
||||
"whatwg-url": "^16.0.1",
|
||||
"xml-name-validator": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.19.0 || ^22.13.0 || >=24.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"canvas": "^3.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"canvas": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/lru-cache": {
|
||||
"version": "11.5.2",
|
||||
"resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-11.5.2.tgz",
|
||||
"integrity": "sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==",
|
||||
"dev": true,
|
||||
"license": "BlueOak-1.0.0",
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
}
|
||||
},
|
||||
"node_modules/mdn-data": {
|
||||
"version": "2.27.1",
|
||||
"resolved": "https://registry.npmmirror.com/mdn-data/-/mdn-data-2.27.1.tgz",
|
||||
"integrity": "sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==",
|
||||
"dev": true,
|
||||
"license": "CC0-1.0"
|
||||
},
|
||||
"node_modules/parse5": {
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/parse5/-/parse5-8.0.1.tgz",
|
||||
"integrity": "sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"entities": "^8.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/inikulin/parse5?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/punycode": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.3.1.tgz",
|
||||
"integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/require-from-string": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/require-from-string/-/require-from-string-2.0.2.tgz",
|
||||
"integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/saxes": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/saxes/-/saxes-6.0.0.tgz",
|
||||
"integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"xmlchars": "^2.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=v12.22.7"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz",
|
||||
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/symbol-tree": {
|
||||
"version": "3.2.4",
|
||||
"resolved": "https://registry.npmmirror.com/symbol-tree/-/symbol-tree-3.2.4.tgz",
|
||||
"integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/tldts": {
|
||||
"version": "7.4.10",
|
||||
"resolved": "https://registry.npmmirror.com/tldts/-/tldts-7.4.10.tgz",
|
||||
"integrity": "sha512-GgouD1B+sWwvkaEq8vXC15DjQitxbvs12oIXELpconwm+Tg3zfcEv4jgzq3vtKverDXsg3VI8aRgNL2Nra0Iog==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"tldts-core": "^7.4.10"
|
||||
},
|
||||
"bin": {
|
||||
"tldts": "bin/cli.js"
|
||||
}
|
||||
},
|
||||
"node_modules/tldts-core": {
|
||||
"version": "7.4.10",
|
||||
"resolved": "https://registry.npmmirror.com/tldts-core/-/tldts-core-7.4.10.tgz",
|
||||
"integrity": "sha512-KnQjp53ZekKgm/r3l+u8kJGGzYgrWdP8+Mql7a4vijh2WE0IrZWspQj/TpTxDho/YxO+AnOZnIjQcCD+q6iJsw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/tough-cookie": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/tough-cookie/-/tough-cookie-6.0.2.tgz",
|
||||
"integrity": "sha512-exgYmnmL/sJpR3upZfXG5PoatXQii55xAiXGXzY+sROLZ/Y+SLcp9PgJNI9Vz37HpQ74WvDcLT8eqm+kV3FzrA==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"tldts": "^7.0.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
}
|
||||
},
|
||||
"node_modules/tr46": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/tr46/-/tr46-6.0.0.tgz",
|
||||
"integrity": "sha512-bLVMLPtstlZ4iMQHpFHTR7GAGj2jxi8Dg0s2h2MafAE4uSWF98FC/3MomU51iQAMf8/qDUbKWf5GxuvvVcXEhw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"punycode": "^2.3.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20"
|
||||
}
|
||||
},
|
||||
"node_modules/undici": {
|
||||
"version": "7.29.0",
|
||||
"resolved": "https://registry.npmmirror.com/undici/-/undici-7.29.0.tgz",
|
||||
"integrity": "sha512-IDxfleLmmbSskfWSUATiN1nfn2rDuvnMOqb5CWR92iIfojA0Ud+ulOAAEQ57LPr9rWmsreUyf5lwyao+7GNNVw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=20.18.1"
|
||||
}
|
||||
},
|
||||
"node_modules/w3c-xmlserializer": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz",
|
||||
"integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"xml-name-validator": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/webidl-conversions": {
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/webidl-conversions/-/webidl-conversions-8.0.1.tgz",
|
||||
"integrity": "sha512-BMhLD/Sw+GbJC21C/UgyaZX41nPt8bUTg+jWyDeg7e7YN4xOM05YPSIXceACnXVtqyEw/LMClUQMtMZ+PGGpqQ==",
|
||||
"dev": true,
|
||||
"license": "BSD-2-Clause",
|
||||
"engines": {
|
||||
"node": ">=20"
|
||||
}
|
||||
},
|
||||
"node_modules/whatwg-mimetype": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/whatwg-mimetype/-/whatwg-mimetype-5.0.0.tgz",
|
||||
"integrity": "sha512-sXcNcHOC51uPGF0P/D4NVtrkjSU2fNsm9iog4ZvZJsL3rjoDAzXZhkm2MWt1y+PUdggKAYVoMAIYcs78wJ51Cw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=20"
|
||||
}
|
||||
},
|
||||
"node_modules/whatwg-url": {
|
||||
"version": "16.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/whatwg-url/-/whatwg-url-16.0.1.tgz",
|
||||
"integrity": "sha512-1to4zXBxmXHV3IiSSEInrreIlu02vUOvrhxJJH5vcxYTBDAx51cqZiKdyTxlecdKNSjj8EcxGBxNf6Vg+945gw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@exodus/bytes": "^1.11.0",
|
||||
"tr46": "^6.0.0",
|
||||
"webidl-conversions": "^8.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.19.0 || ^22.12.0 || >=24.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/xml-name-validator": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/xml-name-validator/-/xml-name-validator-5.0.0.tgz",
|
||||
"integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/xmlchars": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/xmlchars/-/xmlchars-2.2.0.tgz",
|
||||
"integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "trajectory-planning-visualization-web-dom-tests",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "node --test dashboard.dom.test.mjs"
|
||||
},
|
||||
"devDependencies": {
|
||||
"jsdom": "29.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=24"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user