Update @antv/x6.

This commit is contained in:
Sebastian Jeltsch
2025-12-03 12:24:15 +01:00
parent e90d78e23b
commit 1eccb6aa13
5 changed files with 40 additions and 46 deletions

View File

@@ -13,7 +13,7 @@
"test": "vitest run"
},
"dependencies": {
"@antv/x6": "^2.19.2",
"@antv/x6": "^3.1.0",
"@bufbuild/protobuf": "^2.10.1",
"@codemirror/autocomplete": "^6.20.0",
"@codemirror/lang-sql": "^6.10.0",

View File

@@ -1,6 +1,5 @@
import { onMount } from "solid-js";
import { Graph, Cell, Shape, Edge, Node } from "@antv/x6";
import { PortManager } from "@antv/x6/lib/model/port";
import { Graph, Cell, Shape, Edge, NodeMetadata, EdgeMetadata } from "@antv/x6";
import { cn } from "@/lib/utils";
import { createIsMobile } from "@/lib/signals";
@@ -13,10 +12,6 @@ const ACCENT_600 = "#0073aa";
const GRAY_100 = "#f3f7f9";
export const EDGE_COLOR = "#A2B1C3";
export type NodeMetadata = Node.Metadata;
export type EdgeMetadata = Edge.Metadata;
export type PortMetadata = PortManager.PortMetadata;
(function setupGraph() {
const ER_PORT_POSITION_NAME = "erPortPosition";

View File

@@ -1,13 +1,12 @@
import { Switch, Match, createMemo } from "solid-js";
import { createTableSchemaQuery } from "@/lib/api/table";
import { prettyFormatQualifiedName } from "@/lib/schema";
import { NodeMetadata, EdgeMetadata } from "@antv/x6";
import { PortMetadata } from "@antv/x6/lib/model/port";
import { Header } from "@/components/Header";
import {
ErdGraph,
NodeMetadata,
EdgeMetadata,
PortMetadata,
ER_NODE_NAME,
NODE_WIDTH,
LINE_HEIGHT,

View File

@@ -211,12 +211,13 @@ export interface DeferredOperation<ResponseType> {
}
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export interface DeferredMutation<ResponseType>
extends DeferredOperation<ResponseType> {}
export interface DeferredMutation<
ResponseType,
> extends DeferredOperation<ResponseType> {}
export class CreateOperation<T = Record<string, unknown>>
implements DeferredMutation<RecordId>
{
export class CreateOperation<
T = Record<string, unknown>,
> implements DeferredMutation<RecordId> {
constructor(
private readonly client: Client,
private readonly apiName: string,
@@ -246,9 +247,9 @@ export class CreateOperation<T = Record<string, unknown>>
}
}
export class UpdateOperation<T = Record<string, unknown>>
implements DeferredMutation<void>
{
export class UpdateOperation<
T = Record<string, unknown>,
> implements DeferredMutation<void> {
constructor(
private readonly client: Client,
private readonly apiName: string,
@@ -301,9 +302,9 @@ export interface ReadOpts {
expand?: string[];
}
export class ReadOperation<T = Record<string, unknown>>
implements DeferredOperation<T>
{
export class ReadOperation<
T = Record<string, unknown>,
> implements DeferredOperation<T> {
constructor(
private readonly client: Client,
private readonly apiName: string,
@@ -330,9 +331,9 @@ export interface ListOpts {
expand?: string[];
}
export class ListOperation<T = Record<string, unknown>>
implements DeferredOperation<ListResponse<T>>
{
export class ListOperation<
T = Record<string, unknown>,
> implements DeferredOperation<ListResponse<T>> {
constructor(
private readonly client: Client,
private readonly apiName: string,
@@ -401,9 +402,9 @@ export interface RecordApi<T = Record<string, unknown>> {
}
/// Provides CRUD access to records through TrailBase's record API.
export class RecordApiImpl<T = Record<string, unknown>>
implements RecordApi<T>
{
export class RecordApiImpl<
T = Record<string, unknown>,
> implements RecordApi<T> {
constructor(
private readonly client: Client,
private readonly name: string,

37
pnpm-lock.yaml generated
View File

@@ -40,8 +40,8 @@ importers:
crates/assets/js/admin:
dependencies:
'@antv/x6':
specifier: ^2.19.2
version: 2.19.2
specifier: ^3.1.0
version: 3.1.0
'@bufbuild/protobuf':
specifier: ^2.10.1
version: 2.10.1
@@ -968,14 +968,9 @@ packages:
'@antfu/utils@8.1.1':
resolution: {integrity: sha512-Mex9nXf9vR6AhcXmMrlz/HVgYYZpVGJ6YlPgwl7UnaFpnshXs6EK/oa5Gpf3CzENMjkvEx2tQtntGnb7UtSTOQ==}
'@antv/x6-common@2.0.17':
resolution: {integrity: sha512-37g7vmRkNdYzZPdwjaMSZEGv/MMH0S4r70/Jwoab1mioycmuIBN73iyziX8m56BvJSDucZ3J/6DU07otWqzS6A==}
'@antv/x6-geometry@2.0.5':
resolution: {integrity: sha512-MId6riEQkxphBpVeTcL4ZNXL4lScyvDEPLyIafvWMcWNTGK0jgkK7N20XSzqt8ltJb0mGUso5s56mrk8ysHu2A==}
'@antv/x6@2.19.2':
resolution: {integrity: sha512-lr9sUAlrR7eSVANru8kUNZUqCRl7eOCgb36M61FMDonUYREwkHpRN+0zq+1egSSOdz3HHSDBjs7UMtGH1ZEg2w==}
'@antv/x6@3.1.0':
resolution: {integrity: sha512-dKi8biYPjr83FZU02V4OPA4c9dpW7odh+b03gV3LrC2Pw328ZNbjfZtcZ5eGUZXizWx7JdwU+U/B2znPCTa71Q==}
engines: {node: '>=20.0.0'}
'@apidevtools/json-schema-ref-parser@13.0.5':
resolution: {integrity: sha512-xfh4xVJD62gG6spIc7lwxoWT+l16nZu1ELyU8FkjaP/oD2yP09EvLAU6KhtudN9aML2Khhs9pY6Slr7KGTES3w==}
@@ -3451,6 +3446,9 @@ packages:
dom-accessibility-api@0.6.3:
resolution: {integrity: sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==}
dom-align@1.12.4:
resolution: {integrity: sha512-R8LUSEay/68zE5c8/3BDxiTEvgb4xZTF0RKmAHfiEVN3klfIpXfi2/QCoiWPccVQ0J/ZGdz9OjzL4uJEP/MRAw==}
dom-serializer@2.0.0:
resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==}
@@ -4671,6 +4669,9 @@ packages:
moment@2.30.1:
resolution: {integrity: sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==}
mousetrap@1.6.5:
resolution: {integrity: sha512-QNo4kEepaIBwiT8CDhP98umTetp+JNfQYBWvC1pc6/OAibuXtRcxZ58Qz8skvEHYvURne/7R8T5VoOI7rDsEUA==}
mrmime@2.0.1:
resolution: {integrity: sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==}
engines: {node: '>=10'}
@@ -6443,17 +6444,11 @@ snapshots:
'@antfu/utils@8.1.1': {}
'@antv/x6-common@2.0.17':
'@antv/x6@3.1.0':
dependencies:
dom-align: 1.12.4
lodash-es: 4.17.21
utility-types: 3.11.0
'@antv/x6-geometry@2.0.5': {}
'@antv/x6@2.19.2':
dependencies:
'@antv/x6-common': 2.0.17
'@antv/x6-geometry': 2.0.5
mousetrap: 1.6.5
utility-types: 3.11.0
'@apidevtools/json-schema-ref-parser@13.0.5':
@@ -9444,6 +9439,8 @@ snapshots:
dom-accessibility-api@0.6.3: {}
dom-align@1.12.4: {}
dom-serializer@2.0.0:
dependencies:
domelementtype: 2.3.0
@@ -11121,6 +11118,8 @@ snapshots:
moment@2.30.1: {}
mousetrap@1.6.5: {}
mrmime@2.0.1: {}
ms@2.0.0: {}