@antelopejs/dms-database 0.0.7 → 0.0.9
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.
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
lineNumbers,
|
|
28
28
|
placeholder as cmPlaceholder,
|
|
29
29
|
} from "@codemirror/view";
|
|
30
|
+
import { useColorMode } from "@vueuse/core";
|
|
30
31
|
import type { SchemaSummary } from "../composables/useDatabaseSchemas";
|
|
31
32
|
import type { QueryLanguage } from "../composables/useQueryStore";
|
|
32
33
|
|
|
@@ -6,6 +6,11 @@ import {
|
|
|
6
6
|
type VueFlowStore,
|
|
7
7
|
} from "@vue-flow/core";
|
|
8
8
|
import dagre from "@dagrejs/dagre";
|
|
9
|
+
import type { ShallowUnwrapRef } from "vue";
|
|
10
|
+
import DiagramNoteNode from "./DiagramNoteNode.vue";
|
|
11
|
+
import DiagramRelationEdge from "./DiagramRelationEdge.vue";
|
|
12
|
+
import DiagramStubNode from "./DiagramStubNode.vue";
|
|
13
|
+
import DiagramTableNode from "./DiagramTableNode.vue";
|
|
9
14
|
import type { SchemaSummary } from "../composables/useDatabaseSchemas";
|
|
10
15
|
import type {
|
|
11
16
|
DiagramNote,
|
|
@@ -192,7 +197,9 @@ const {
|
|
|
192
197
|
// exposes the full imperative VueFlow controller (setNodes/setEdges/fitView/
|
|
193
198
|
// viewport/findNode/onNodeDrag…) via a template ref; all the ERD business
|
|
194
199
|
// logic below (dagre auto-layout, edge routing, undo/redo, notes) stays here.
|
|
195
|
-
|
|
200
|
+
// Vue's expose proxy unwraps the controller's refs: `edges` is the array
|
|
201
|
+
// itself, not a Ref (`edges.value` is undefined and threw on every drag).
|
|
202
|
+
const canvas = shallowRef<ShallowUnwrapRef<VueFlowStore> | null>(null);
|
|
196
203
|
// Our own wrapper element — used to measure the visible canvas for note placement.
|
|
197
204
|
const canvasWrapper = ref<HTMLElement | null>(null);
|
|
198
205
|
|
|
@@ -788,15 +795,19 @@ async function applyChanges() {
|
|
|
788
795
|
}
|
|
789
796
|
}
|
|
790
797
|
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
798
|
+
// Imported directly, not resolved by name: the DMS registers its global
|
|
799
|
+
// components as async components, and the async relation edge was mounted
|
|
800
|
+
// with the HTML namespace — its <path> was created as an HTML element inside
|
|
801
|
+
// the edges <svg>, so no relation line was drawn.
|
|
802
|
+
const nodeTypes = markRaw({
|
|
803
|
+
[TABLE_NODE_TYPE]: DiagramTableNode,
|
|
804
|
+
[STUB_NODE_TYPE]: DiagramStubNode,
|
|
805
|
+
[NOTE_NODE_TYPE]: DiagramNoteNode,
|
|
806
|
+
});
|
|
796
807
|
|
|
797
|
-
const edgeTypes = {
|
|
798
|
-
[RELATION_EDGE_TYPE]:
|
|
799
|
-
};
|
|
808
|
+
const edgeTypes = markRaw({
|
|
809
|
+
[RELATION_EDGE_TYPE]: DiagramRelationEdge,
|
|
810
|
+
});
|
|
800
811
|
|
|
801
812
|
const zoomPercent = computed(
|
|
802
813
|
() => `${Math.round(liveViewport.value.zoom * 100)}%`,
|
|
@@ -810,7 +821,7 @@ function widthForNodeType(type: string | undefined): number {
|
|
|
810
821
|
function recomputeEdgesForNode(nodeId: string) {
|
|
811
822
|
const instance = canvas.value;
|
|
812
823
|
if (!instance) return;
|
|
813
|
-
for (const edge of instance.edges
|
|
824
|
+
for (const edge of instance.edges) {
|
|
814
825
|
if (edge.source !== nodeId && edge.target !== nodeId) continue;
|
|
815
826
|
const sNode = instance.findNode(edge.source);
|
|
816
827
|
const tNode = instance.findNode(edge.target);
|
|
@@ -42,8 +42,8 @@ importers:
|
|
|
42
42
|
specifier: ^1.48.2
|
|
43
43
|
version: 1.48.2(vue@3.5.34(typescript@5.9.3))
|
|
44
44
|
'@vueuse/core':
|
|
45
|
-
specifier: ^
|
|
46
|
-
version:
|
|
45
|
+
specifier: ^14.3.0
|
|
46
|
+
version: 14.3.0(vue@3.5.34(typescript@5.9.3))
|
|
47
47
|
vue:
|
|
48
48
|
specifier: ^3.5.18
|
|
49
49
|
version: 3.5.34(typescript@5.9.3)
|
|
@@ -1304,11 +1304,6 @@ packages:
|
|
|
1304
1304
|
'@vueuse/core@10.11.1':
|
|
1305
1305
|
resolution: {integrity: sha512-guoy26JQktXPcz+0n3GukWIy/JDNKti9v6VEMu6kV2sYBsWuGiTU8OWdg+ADfUbHg3/3DlqySDe7JmdHrktiww==}
|
|
1306
1306
|
|
|
1307
|
-
'@vueuse/core@13.9.0':
|
|
1308
|
-
resolution: {integrity: sha512-ts3regBQyURfCE2BcytLqzm8+MmLlo5Ln/KLoxDVcsZ2gzIwVNnQpQOL/UKV8alUqjSZOlpFZcRNsLRqj+OzyA==}
|
|
1309
|
-
peerDependencies:
|
|
1310
|
-
vue: ^3.5.0
|
|
1311
|
-
|
|
1312
1307
|
'@vueuse/core@14.3.0':
|
|
1313
1308
|
resolution: {integrity: sha512-aHfz47g0ZhMtTVHmIzMVpJy8ePhhOy68GY5bv110+5DVtZ+W7BsOx+m61UNQqfrWyPztIHIanWa3E2tib3NFIw==}
|
|
1314
1309
|
peerDependencies:
|
|
@@ -1359,20 +1354,12 @@ packages:
|
|
|
1359
1354
|
'@vueuse/metadata@10.11.1':
|
|
1360
1355
|
resolution: {integrity: sha512-IGa5FXd003Ug1qAZmyE8wF3sJ81xGLSqTqtQ6jaVfkeZ4i5kS2mwQF61yhVqojRnenVew5PldLyRgvdl4YYuSw==}
|
|
1361
1356
|
|
|
1362
|
-
'@vueuse/metadata@13.9.0':
|
|
1363
|
-
resolution: {integrity: sha512-1AFRvuiGphfF7yWixZa0KwjYH8ulyjDCC0aFgrGRz8+P4kvDFSdXLVfTk5xAN9wEuD1J6z4/myMoYbnHoX07zg==}
|
|
1364
|
-
|
|
1365
1357
|
'@vueuse/metadata@14.3.0':
|
|
1366
1358
|
resolution: {integrity: sha512-BwxmbAzwAVF50+MW57GXOUEV61nFBGnlBvrTqj49PqWJu3uw7hdu72ztXeZ33RdZtDY6kO+bfCAE1PCn88Tktw==}
|
|
1367
1359
|
|
|
1368
1360
|
'@vueuse/shared@10.11.1':
|
|
1369
1361
|
resolution: {integrity: sha512-LHpC8711VFZlDaYUXEBbFBCQ7GS3dVU9mjOhhMhXP6txTV4EhYQg/KGnQuvt/sPAtoUKq7VVUnL6mVtFoL42sA==}
|
|
1370
1362
|
|
|
1371
|
-
'@vueuse/shared@13.9.0':
|
|
1372
|
-
resolution: {integrity: sha512-e89uuTLMh0U5cZ9iDpEI2senqPGfbPRTHM/0AaQkcxnpqjkZqDYP8rpfm7edOz8s+pOCOROEy1PIveSW8+fL5g==}
|
|
1373
|
-
peerDependencies:
|
|
1374
|
-
vue: ^3.5.0
|
|
1375
|
-
|
|
1376
1363
|
'@vueuse/shared@14.3.0':
|
|
1377
1364
|
resolution: {integrity: sha512-bZpge9eSXwa4ToSiqJ7j6KRwhAsneMFoSz3LMWKQDkqimm3D/tbFlrklrs/IOqC8tEcYmXQZJ6N0UrjhBirVCg==}
|
|
1378
1365
|
peerDependencies:
|
|
@@ -4271,13 +4258,6 @@ snapshots:
|
|
|
4271
4258
|
- '@vue/composition-api'
|
|
4272
4259
|
- vue
|
|
4273
4260
|
|
|
4274
|
-
'@vueuse/core@13.9.0(vue@3.5.34(typescript@5.9.3))':
|
|
4275
|
-
dependencies:
|
|
4276
|
-
'@types/web-bluetooth': 0.0.21
|
|
4277
|
-
'@vueuse/metadata': 13.9.0
|
|
4278
|
-
'@vueuse/shared': 13.9.0(vue@3.5.34(typescript@5.9.3))
|
|
4279
|
-
vue: 3.5.34(typescript@5.9.3)
|
|
4280
|
-
|
|
4281
4261
|
'@vueuse/core@14.3.0(vue@3.5.34(typescript@5.9.3))':
|
|
4282
4262
|
dependencies:
|
|
4283
4263
|
'@types/web-bluetooth': 0.0.21
|
|
@@ -4295,8 +4275,6 @@ snapshots:
|
|
|
4295
4275
|
|
|
4296
4276
|
'@vueuse/metadata@10.11.1': {}
|
|
4297
4277
|
|
|
4298
|
-
'@vueuse/metadata@13.9.0': {}
|
|
4299
|
-
|
|
4300
4278
|
'@vueuse/metadata@14.3.0': {}
|
|
4301
4279
|
|
|
4302
4280
|
'@vueuse/shared@10.11.1(vue@3.5.34(typescript@5.9.3))':
|
|
@@ -4306,10 +4284,6 @@ snapshots:
|
|
|
4306
4284
|
- '@vue/composition-api'
|
|
4307
4285
|
- vue
|
|
4308
4286
|
|
|
4309
|
-
'@vueuse/shared@13.9.0(vue@3.5.34(typescript@5.9.3))':
|
|
4310
|
-
dependencies:
|
|
4311
|
-
vue: 3.5.34(typescript@5.9.3)
|
|
4312
|
-
|
|
4313
4287
|
'@vueuse/shared@14.3.0(vue@3.5.34(typescript@5.9.3))':
|
|
4314
4288
|
dependencies:
|
|
4315
4289
|
vue: 3.5.34(typescript@5.9.3)
|