From 33abd47645cbb9bb99160658c6b425ec95dcd911 Mon Sep 17 00:00:00 2001 From: swithek <52840391+swithek@users.noreply.github.com> Date: Tue, 25 Aug 2026 17:56:58 +0200 Subject: [PATCH] update web deps --- .../editor/blocks/figma/index.test.ts | 3 +- .../mermaid/MermaidPreview.nuxt.test.ts | 6 +- .../blocks/metrics/VisualizationContainer.vue | 5 +- .../metrics/config-modal/UnitSelect.vue | 4 +- .../metrics/config-modal/query/promql.ts | 4 +- .../components/editor/blocks/metrics/utils.ts | 3 +- .../metrics/visualizations/BarChart.vue | 4 +- .../metrics/visualizations/LineChart.vue | 4 +- .../blocks/metrics/visualizations/index.ts | 4 +- .../blocks/split-documentation/index.test.ts | 12 +- .../blocks/split-documentation/index.ts | 8 +- .../editor/comments/CommentRenderer.vue | 3 +- .../drag-handle/gap-decorations.test.ts | 3 +- .../editor/drag-handle/gap-decorations.ts | 2 +- .../editor/drag-handle/handle-plugin.ts | 3 +- .../drag-handle/menu-options/CoreMenu.vue | 8 +- .../components/editor/hooks/hook-decorator.ts | 3 +- .../components/editor/schema-extensions.ts | 4 +- web/app/components/editor/slash/extension.ts | 4 +- .../tiptap-utils/unique-id/extension.ts | 3 +- web/app/composables/api/prometheus-utils.ts | 2 +- web/app/plugins/03.api-fetch.nuxt.test.ts | 19 +- web/app/utils/api/data-source/index.ts | 3 +- web/app/utils/api/document.ts | 5 +- web/app/utils/websocket.test.ts | 4 +- web/electron/main.test.ts | 3 +- web/nuxt.config.ts | 4 +- web/package.json | 95 +- web/pnpm-lock.yaml | 8747 ++++++++--------- web/vitest.config.ts | 13 +- 30 files changed, 4220 insertions(+), 4765 deletions(-) diff --git a/web/app/components/editor/blocks/figma/index.test.ts b/web/app/components/editor/blocks/figma/index.test.ts index 9c1adc4f..9869f706 100644 --- a/web/app/components/editor/blocks/figma/index.test.ts +++ b/web/app/components/editor/blocks/figma/index.test.ts @@ -31,8 +31,7 @@ function figmaType(): NodeType { // reads nothing off the extension instance function pasteHandler(): (view: EditorView, event: ClipboardEvent) => boolean { const addPlugins = createFigmaLinkHandler().config.addProseMirrorPlugins as - | (() => Plugin[]) - | undefined + (() => Plugin[]) | undefined if (!addPlugins) { throw new Error("the figma link handler registers no plugins") diff --git a/web/app/components/editor/blocks/mermaid/MermaidPreview.nuxt.test.ts b/web/app/components/editor/blocks/mermaid/MermaidPreview.nuxt.test.ts index d6ae79c8..e56ea76b 100644 --- a/web/app/components/editor/blocks/mermaid/MermaidPreview.nuxt.test.ts +++ b/web/app/components/editor/blocks/mermaid/MermaidPreview.nuxt.test.ts @@ -123,7 +123,8 @@ describe("", { concurrent: false }, () => { const wrapper = await mountPreview("graph TD; A-->B;") await vi.waitFor(() => { - expect(previewHtml(wrapper)).toContain("") + // happy-dom unwraps the sanitized svg root; a real browser does not + expect(previewHtml(wrapper)).toContain("") }, WAIT_FOR_OPTIONS) expect(mermaid.render).toHaveBeenCalledTimes(1) expect(mermaid.render.mock.calls[0]?.[1]).toBe("graph TD; A-->B;") @@ -219,7 +220,8 @@ describe("", { concurrent: false }, () => { it("clears the diagram when the code is deleted", async ({ expect }) => { const wrapper = await mountPreview("graph TD; A-->B;") await vi.waitFor(() => { - expect(previewHtml(wrapper)).toContain("") + // happy-dom unwraps the sanitized svg root; a real browser does not + expect(previewHtml(wrapper)).toContain("") }, WAIT_FOR_OPTIONS) vi.useFakeTimers() diff --git a/web/app/components/editor/blocks/metrics/VisualizationContainer.vue b/web/app/components/editor/blocks/metrics/VisualizationContainer.vue index c81a4758..8a6be6c9 100644 --- a/web/app/components/editor/blocks/metrics/VisualizationContainer.vue +++ b/web/app/components/editor/blocks/metrics/VisualizationContainer.vue @@ -122,10 +122,7 @@ const data = computed<{ queryIndex?: number multipleQueries?: boolean data?: - | MultipleLineChartData - | MultipleBarChartData - | MultipleGaugeChartData - | null + MultipleLineChartData | MultipleBarChartData | MultipleGaugeChartData | null }>(() => { const results = fetchMetricData.state.value.data ?? [] const queryErrIndex = results.findIndex( diff --git a/web/app/components/editor/blocks/metrics/config-modal/UnitSelect.vue b/web/app/components/editor/blocks/metrics/config-modal/UnitSelect.vue index 171b7318..354f930a 100644 --- a/web/app/components/editor/blocks/metrics/config-modal/UnitSelect.vue +++ b/web/app/components/editor/blocks/metrics/config-modal/UnitSelect.vue @@ -46,9 +46,7 @@ const processedSelectedUnit = computed(() => { return { category, unit: unit as - | VisualizationTimeUnit - | VisualizationDataUnit - | VisualizationMiscUnit, + VisualizationTimeUnit | VisualizationDataUnit | VisualizationMiscUnit, } } diff --git a/web/app/components/editor/blocks/metrics/config-modal/query/promql.ts b/web/app/components/editor/blocks/metrics/config-modal/query/promql.ts index 26e08ab6..23f84a9a 100644 --- a/web/app/components/editor/blocks/metrics/config-modal/query/promql.ts +++ b/web/app/components/editor/blocks/metrics/config-modal/query/promql.ts @@ -106,7 +106,9 @@ function makeWrappedCompleteStrategy( // show presets when empty, when typing "$", or when typing a number const showPresets = - bc.token.length === 0 || /^\$/.test(bc.token) || /^\d/.test(bc.token) + bc.token.length === 0 || + bc.token.startsWith("$") || + /^\d/.test(bc.token) const presets = showPresets ? promqlDurationPresets(t) : [] diff --git a/web/app/components/editor/blocks/metrics/utils.ts b/web/app/components/editor/blocks/metrics/utils.ts index 62000bd5..ce4b73f4 100644 --- a/web/app/components/editor/blocks/metrics/utils.ts +++ b/web/app/components/editor/blocks/metrics/utils.ts @@ -133,8 +133,7 @@ export function buildConfigFromNodeAttrs( // legacy blobs may miss fields entirely and may still use the old "type" // field name, so Partial reflects the actual runtime shape. const legacy = attrs.config as - | (Partial & { type?: GenericQueryChartType | null }) - | null + (Partial & { type?: GenericQueryChartType | null }) | null if (legacy) { return { title: legacy.title ?? "", diff --git a/web/app/components/editor/blocks/metrics/visualizations/BarChart.vue b/web/app/components/editor/blocks/metrics/visualizations/BarChart.vue index 14a53c7b..54ec03f2 100644 --- a/web/app/components/editor/blocks/metrics/visualizations/BarChart.vue +++ b/web/app/components/editor/blocks/metrics/visualizations/BarChart.vue @@ -309,7 +309,9 @@ const legendHandler = computed(() => { class="size-full" :option="option" autoresize - @legendselectchanged="(p: LegendSelectChangedPayload) => legendHandler(p)" + @legendselectchanged=" + (p: unknown) => legendHandler(p as LegendSelectChangedPayload) + " >
diff --git a/web/app/components/editor/blocks/metrics/visualizations/LineChart.vue b/web/app/components/editor/blocks/metrics/visualizations/LineChart.vue index 8c40edb2..f5f9ccb3 100644 --- a/web/app/components/editor/blocks/metrics/visualizations/LineChart.vue +++ b/web/app/components/editor/blocks/metrics/visualizations/LineChart.vue @@ -315,7 +315,9 @@ const legendHandler = computed(() => { class="size-full" :option="option" autoresize - @legendselectchanged="(p: LegendSelectChangedPayload) => legendHandler(p)" + @legendselectchanged=" + (p: unknown) => legendHandler(p as LegendSelectChangedPayload) + " >