@tldiagram/core-ui 1.92.0 → 1.93.0
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/api/client.d.ts +13 -1
- package/dist/components/ElementNode.d.ts +9 -0
- package/dist/config/runtime-vscode.d.ts +1 -0
- package/dist/config/runtime.d.ts +1 -0
- package/dist/index.js +10344 -9294
- package/dist/pages/ViewEditor/hooks/useCanvasInteractions.d.ts +2 -1
- package/dist/pages/ViewEditor/hooks/useViewData.d.ts +20 -21
- package/dist/shims/empty-node-module.d.ts +2 -0
- package/dist/store/useStore.d.ts +78 -0
- package/dist/store/useStore.test.d.ts +1 -0
- package/package.json +7 -4
- package/src/api/client.ts +39 -1
- package/src/components/ElementNode.tsx +11 -58
- package/src/components/ElementPanel.tsx +2 -2
- package/src/components/LayoutSection.tsx +68 -93
- package/src/components/ViewGridNode.tsx +1 -4
- package/src/components/ZUI/renderer.ts +166 -66
- package/src/components/ZUI/useZUIInteraction.ts +235 -81
- package/src/config/runtime-vscode.ts +6 -0
- package/src/config/runtime.ts +4 -0
- package/src/main.tsx +26 -14
- package/src/pages/ViewEditor/context.tsx +12 -4
- package/src/pages/ViewEditor/hooks/useCanvasInteractions.ts +172 -121
- package/src/pages/ViewEditor/hooks/useViewData.ts +455 -253
- package/src/pages/ViewEditor/index.tsx +45 -32
- package/src/shims/empty-node-module.ts +1 -0
- package/src/store/useStore.test.ts +272 -0
- package/src/store/useStore.ts +285 -0
package/dist/api/client.d.ts
CHANGED
|
@@ -58,6 +58,18 @@ export declare const api: {
|
|
|
58
58
|
connectors: Connector[];
|
|
59
59
|
}>;
|
|
60
60
|
tree: () => Promise<ViewTreeNode[]>;
|
|
61
|
+
treeRoots: (opts?: {
|
|
62
|
+
limit?: number;
|
|
63
|
+
offset?: number;
|
|
64
|
+
search?: string;
|
|
65
|
+
}) => Promise<{
|
|
66
|
+
views: ViewTreeNode[];
|
|
67
|
+
totalCount: number;
|
|
68
|
+
}>;
|
|
69
|
+
treeChildren: (parentId: number, opts?: {
|
|
70
|
+
limit?: number;
|
|
71
|
+
offset?: number;
|
|
72
|
+
}) => Promise<ViewTreeNode[]>;
|
|
61
73
|
get: (id: number) => Promise<ViewTreeNode>;
|
|
62
74
|
create: (data: {
|
|
63
75
|
name: string;
|
|
@@ -71,7 +83,7 @@ export declare const api: {
|
|
|
71
83
|
rename: (id: number, name: string) => Promise<View>;
|
|
72
84
|
setLevel: (id: number, level: number) => Promise<void>;
|
|
73
85
|
delete: (_orgId: string, id: number) => Promise<void>;
|
|
74
|
-
thumbnail: (
|
|
86
|
+
thumbnail: (id: number) => Promise<string | null>;
|
|
75
87
|
placements: {
|
|
76
88
|
list: (diagramId: number) => Promise<ElementPlacement[]>;
|
|
77
89
|
add: (diagramId: number, elementId: number, x?: number, y?: number) => Promise<ElementPlacement>;
|
|
@@ -26,6 +26,15 @@ interface NodeData extends PlacedElement {
|
|
|
26
26
|
layerHighlightColor?: string;
|
|
27
27
|
forceShowTagPopup?: boolean;
|
|
28
28
|
isCanvasMoving?: boolean;
|
|
29
|
+
connectedHandleIds?: readonly string[];
|
|
30
|
+
selectedHandleIds?: readonly string[];
|
|
31
|
+
reconnectCandidates?: readonly {
|
|
32
|
+
handleId: string;
|
|
33
|
+
edgeId: string;
|
|
34
|
+
endpoint: 'source' | 'target';
|
|
35
|
+
selected: boolean;
|
|
36
|
+
}[];
|
|
37
|
+
isConnectorHighlighted?: boolean;
|
|
29
38
|
}
|
|
30
39
|
interface Props {
|
|
31
40
|
data: NodeData;
|
|
@@ -15,6 +15,7 @@ export declare const routerBasename: undefined;
|
|
|
15
15
|
export declare const isNativeApp = false;
|
|
16
16
|
export declare const apiBase: string;
|
|
17
17
|
export declare function apiUrl(path: string): string;
|
|
18
|
+
export declare function fetchApiAsset(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
|
|
18
19
|
export declare function oauthGoogleStartUrl(): string;
|
|
19
20
|
export declare function oauthGithubStartUrl(): string;
|
|
20
21
|
export declare function oauthAppleStartUrl(): string;
|
package/dist/config/runtime.d.ts
CHANGED
|
@@ -3,3 +3,4 @@ export declare const routerBasename: string | undefined;
|
|
|
3
3
|
export declare const isNativeApp = false;
|
|
4
4
|
export declare const apiBase: string;
|
|
5
5
|
export declare function apiUrl(path: string): string;
|
|
6
|
+
export declare function fetchApiAsset(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
|