@tldiagram/core-ui 2.0.8 → 2.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.
- package/dist/index.js +909 -910
- package/package.json +2 -2
- package/src/api/client.ts +8 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tldiagram/core-ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"test": "vitest run"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@buf/tldiagramcom_diagram.bufbuild_es": "^2.12.0-
|
|
40
|
+
"@buf/tldiagramcom_diagram.bufbuild_es": "^2.12.0-20260516210401-05aeb295f766.1",
|
|
41
41
|
"@bufbuild/protobuf": "^2.11.0",
|
|
42
42
|
"esbuild": "^0.25.12",
|
|
43
43
|
"zustand": "^5.0.12"
|
package/src/api/client.ts
CHANGED
|
@@ -650,15 +650,16 @@ export const api = {
|
|
|
650
650
|
}),
|
|
651
651
|
|
|
652
652
|
content: (id: number): Promise<{ placements: PlacedElement[]; connectors: Connector[] }> =>
|
|
653
|
-
(async () => {
|
|
654
|
-
const res = await
|
|
655
|
-
|
|
656
|
-
|
|
653
|
+
rpc(async () => {
|
|
654
|
+
const res = await workspaceClient.getView({ viewId: id, includeContent: true })
|
|
655
|
+
const json = j<{
|
|
656
|
+
content?: { placements?: Record<string, unknown>[]; connectors?: Record<string, unknown>[] }
|
|
657
|
+
}>(GetViewResponseSchema, res)
|
|
657
658
|
return {
|
|
658
|
-
placements: (json.placements ?? []).map(protoPlacedElement),
|
|
659
|
-
connectors: (json.connectors ?? []).map(protoConnector),
|
|
659
|
+
placements: (json.content?.placements ?? []).map(protoPlacedElement),
|
|
660
|
+
connectors: (json.content?.connectors ?? []).map(protoConnector),
|
|
660
661
|
}
|
|
661
|
-
})
|
|
662
|
+
}),
|
|
662
663
|
|
|
663
664
|
tree: (): Promise<ViewTreeNode[]> =>
|
|
664
665
|
rpc(async () => {
|