@kangtae49/just-layout 0.0.6 → 0.0.7
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.d.ts +470 -1
- package/package.json +1 -1
- package/dist/just-layout.css +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,470 @@
|
|
|
1
|
-
|
|
1
|
+
import { Container } from 'inversify';
|
|
2
|
+
import { ContainerModule } from 'inversify';
|
|
3
|
+
import { default as default_2 } from 'react';
|
|
4
|
+
import { JSX } from 'react/jsx-runtime';
|
|
5
|
+
import * as React_2 from 'react';
|
|
6
|
+
import { RefObject } from 'react';
|
|
7
|
+
import { Spec } from 'immutability-helper';
|
|
8
|
+
|
|
9
|
+
export declare const container: Container;
|
|
10
|
+
|
|
11
|
+
export declare type GetTabIconFn = (justId: JustId, layoutId: string) => default_2.JSX.Element;
|
|
12
|
+
|
|
13
|
+
export declare type GetTabMenuFn = (layoutId: string, branch: JustBranch, justStack: JustStack, isFullScreenView: boolean) => default_2.JSX.Element;
|
|
14
|
+
|
|
15
|
+
export declare type GetTabTitleFn = ({ justId, layoutId, justBranch, isFullScreenView, winInfo }: TabTitleProps) => default_2.JSX.Element;
|
|
16
|
+
|
|
17
|
+
export declare type GetViewFn = (justId: JustId, layoutId: string) => default_2.JSX.Element;
|
|
18
|
+
|
|
19
|
+
export declare type GetWinInfoFn = (justId: JustId) => WinInfo;
|
|
20
|
+
|
|
21
|
+
export declare type JSONObject = {
|
|
22
|
+
[key: string]: JSONValue;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
declare type JSONPrimitive = string | number | boolean | null | undefined;
|
|
26
|
+
|
|
27
|
+
export declare type JSONValue = JSONPrimitive | JSONValue[] | {
|
|
28
|
+
[key: string]: JSONValue;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export declare const JUST_LAYOUT_TYPES: {
|
|
32
|
+
JustLayoutService: symbol;
|
|
33
|
+
JustLayoutStore: symbol;
|
|
34
|
+
JustLayoutFactory: symbol;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export declare type JustBranch = JustSplitDirection[];
|
|
38
|
+
|
|
39
|
+
export declare type JustDirection = 'row' | 'column';
|
|
40
|
+
|
|
41
|
+
export declare const JustDraggableTitle: typeof JustDraggableTitle_2 & {
|
|
42
|
+
displayName: string;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
declare function JustDraggableTitle_2(props: Props): JSX.Element;
|
|
46
|
+
|
|
47
|
+
export declare interface JustId extends JSONObject {
|
|
48
|
+
title: string;
|
|
49
|
+
viewId: string;
|
|
50
|
+
dupId?: string;
|
|
51
|
+
params?: Record<string, JSONValue>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export declare type JustLayoutFactory = (id: string) => JustLayoutStore;
|
|
55
|
+
|
|
56
|
+
export declare const justLayoutModule: ContainerModule;
|
|
57
|
+
|
|
58
|
+
export declare class JustLayoutService {
|
|
59
|
+
insertWinIdToStack: (layout: JustNode | null, payload: JustPayloadMoveWinStack) => JustNode | null;
|
|
60
|
+
insertWinIdToSplit: (layout: JustNode | null, payload: JustPayloadMoveWinSplit) => JustNode | null;
|
|
61
|
+
removeWinId: (layout: JustNode | null, justId: JustId) => JustNode | null;
|
|
62
|
+
removeAllTabs: (layout: JustNode | null, branch: JustBranch) => JustNode | null;
|
|
63
|
+
activeWinId: (layout: JustNode | null, justId: JustId) => JustNode | null;
|
|
64
|
+
getActiveWinIds: (layout: JustNode | null) => JustId[];
|
|
65
|
+
removeEmpty: (layout: JustNode | null) => JustNode | null;
|
|
66
|
+
findEmptyBranch: (layout: JustNode | null, parentNode: JustNode | null, branch: JustBranch) => JustBranch | null;
|
|
67
|
+
moveWinIdToStack: (layout: JustNode | null, payload: JustPayloadMoveWinStack) => JustNode | null;
|
|
68
|
+
moveWinIdToSplit: (layout: JustNode | null, payload: JustPayloadMoveWinSplit) => JustNode | null;
|
|
69
|
+
getBranch: (layout: JustNode | null, justId: JustId, branch: JustBranch) => JustBranch | null;
|
|
70
|
+
getBranchByWinId: (layout: JustNode | null, justId: JustId) => JustBranch | null;
|
|
71
|
+
getNodeInfoByNodeName: (layout: JustNode | null, nodeName: string, curBranch: JustBranch) => NodeInfo | null;
|
|
72
|
+
getTabNodeInfoByNodeName: (layout: JustNode | null, nodeName: string, curBranch: JustBranch) => NodeInfo | null;
|
|
73
|
+
getNodeByWinId: (layout: JustNode | null, justId: JustId) => JustNode | null;
|
|
74
|
+
getTabBranch: (layout: JustNode | null, curBranch: JustBranch) => JustBranch | null;
|
|
75
|
+
getTabNodeInfo: (layout: JustNode | null, curBranch: JustBranch) => NodeInfo | null;
|
|
76
|
+
addTabWin: (layout: JustNode | null, branch: JustBranch, justId: JustId, index: number) => JustNode | null;
|
|
77
|
+
queryWinIdsByViewId: (layout: JustNode | null, viewId: string, justIds: JustId[]) => JustId[];
|
|
78
|
+
queryDupWinIdsByWinId: (layout: JustNode | null, justId: JustId, justIds: JustId[]) => JustId[];
|
|
79
|
+
queryWinIdsByStack: (layout: JustNode | null, branch: JustBranch) => JustId[];
|
|
80
|
+
getNodeByBranch: <T extends JustNode>(obj: JustNode, path: JustBranch) => T;
|
|
81
|
+
updateNodeOfBranch: (layout: JustNode | null, branch: JustBranch, value: any) => JustNode | null;
|
|
82
|
+
updateNodeOfWinId: (layout: JustNode | null, justId: JustId, value: any) => JustNode | null;
|
|
83
|
+
hasWinId: (layout: JustNode | null, justId: JustId) => boolean;
|
|
84
|
+
updateNode: (layout: JustNode | null, updateSpec: JustUpdateSpec) => JustNode | null;
|
|
85
|
+
buildSpecFromUpdateSpec: (branch: JustBranch, updateSpec: JustUpdateSpec) => JustUpdateSpec;
|
|
86
|
+
getNodeAtBranch: (node: JustNode | null, branch: JustBranch) => JustNode | null;
|
|
87
|
+
getBranchRightTop: (node: JustNode | null) => JustBranch;
|
|
88
|
+
updateSplitSize: (node: JustNode | null, branch: JustBranch, size: number) => JustNode | null;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export declare class JustLayoutStore {
|
|
92
|
+
service: JustLayoutService;
|
|
93
|
+
layout: JustNode | null;
|
|
94
|
+
lastActiveId: JustId | null;
|
|
95
|
+
lastActiveTm: number;
|
|
96
|
+
fullScreenLayout: JustNode | null;
|
|
97
|
+
fullScreenHideTitle: boolean;
|
|
98
|
+
tabTitleMap: Map<string, string>;
|
|
99
|
+
tabTitleTooltipMap: Map<string, string>;
|
|
100
|
+
constructor(service: JustLayoutService);
|
|
101
|
+
setLayout: (payload: JustNode | null) => void;
|
|
102
|
+
setTabTitle: (justId: JustId, title: string) => void;
|
|
103
|
+
getTabTitle: (justId: JustId) => string | undefined;
|
|
104
|
+
setTabTitleTooltip: (justId: JustId, tooltip: string) => void;
|
|
105
|
+
getTabTitleTooltip: (justId: JustId) => string | undefined;
|
|
106
|
+
setFullScreenLayoutByBranch: (payload: JustBranch | null) => void;
|
|
107
|
+
setFullScreenHideTitle: (flag: boolean) => void;
|
|
108
|
+
addTab: (payload: JustPayloadAddTab) => void;
|
|
109
|
+
addTabByNodeName: (payload: JustPayloadAddTabByNodeName) => void;
|
|
110
|
+
queryWinIdsByViewId: (viewId: string) => JustId[];
|
|
111
|
+
cloneTab: (payload: JustPayloadCloneTab) => void;
|
|
112
|
+
removeWin: (payload: JustPayloadRemove) => void;
|
|
113
|
+
removeAllTabs: (payload: JustPayloadAllTabs) => void;
|
|
114
|
+
activeWin: (payload: JustPayloadActive) => void;
|
|
115
|
+
activePrevWin: () => void;
|
|
116
|
+
activeNextWin: () => void;
|
|
117
|
+
updateResize: (payload: JustPayloadResize) => void;
|
|
118
|
+
moveWin: (payload: JustPayloadMoveWin) => void;
|
|
119
|
+
toggleSideMenu: () => void;
|
|
120
|
+
toggleWin: ({ nodeName }: PayloadToggleWin) => void;
|
|
121
|
+
showWin: ({ nodeName, show }: PayloadShowWin) => void;
|
|
122
|
+
getSizeByNodeName: ({ nodeName }: PayloadGetSize) => number | null | undefined;
|
|
123
|
+
getBranchByJustId: ({ justId }: PayloadGetBranchByJustId) => JustBranch | null;
|
|
124
|
+
isPrimaryHide: ({ nodeName }: PayloadIsPrimayHide) => boolean | null | undefined;
|
|
125
|
+
openWin: ({ justId }: PayloadOpenWin) => void;
|
|
126
|
+
openWinByNodeName: ({ justId, nodeName }: PayloadOpenWinByNodeName) => void;
|
|
127
|
+
getWinIds: ({ viewId }: PayloadGetWinIds) => JustId[];
|
|
128
|
+
getDupWinIds: ({ justId }: PayloadGetDupWinIds) => JustId[];
|
|
129
|
+
getWinIdsByBranch: ({ branch }: PayloadGetWinIdsByBranch) => JustId[];
|
|
130
|
+
getNodeAtBranch: ({ branch }: PayloadGetNodeAtBranch) => JustNode | null;
|
|
131
|
+
openWinMenu: ({ justId, nodeName }: PayloadOpenWinMenu) => void;
|
|
132
|
+
fullScreenWin: (justBranch: JustBranch, isFullScreenView: boolean, hideTitle?: boolean) => Promise<void>;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export declare const JustLayoutView: typeof JustLayoutView_2 & {
|
|
136
|
+
displayName: string;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
declare function JustLayoutView_2({ layoutId, getWinInfo, getTabMenu, initialValue }: Props_2): JSX.Element;
|
|
140
|
+
|
|
141
|
+
export declare type JustNode = JustStack | JustSplit;
|
|
142
|
+
|
|
143
|
+
export declare interface JustNodeBase {
|
|
144
|
+
type: JustType;
|
|
145
|
+
name?: string;
|
|
146
|
+
dndAccept?: string[];
|
|
147
|
+
hideTitle?: boolean;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export declare const JustNodeView: typeof JustNodeView_2 & {
|
|
151
|
+
displayName: string;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
declare function JustNodeView_2({ layoutId, isFullScreenView, hideTitle, dndAccept, node, justBranch, getWinInfo, getTabMenu }: Props_3): JSX.Element;
|
|
155
|
+
|
|
156
|
+
export declare interface JustPayloadActive {
|
|
157
|
+
justId: JustId;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export declare interface JustPayloadAddTab {
|
|
161
|
+
justId: JustId;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export declare interface JustPayloadAddTabByNodeName {
|
|
165
|
+
justId: JustId;
|
|
166
|
+
nodeName: string;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export declare interface JustPayloadAllTabs {
|
|
170
|
+
branch: JustBranch;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export declare interface JustPayloadCloneTab {
|
|
174
|
+
justId: JustId;
|
|
175
|
+
cloneJustId: JustId;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export declare interface JustPayloadInsert {
|
|
179
|
+
branch: JustBranch;
|
|
180
|
+
justId: JustId;
|
|
181
|
+
direction: JustDirection;
|
|
182
|
+
pos: JustPos;
|
|
183
|
+
index: number;
|
|
184
|
+
size?: number;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export declare type JustPayloadMoveWin = JustPayloadMoveWinStack | JustPayloadMoveWinSplit;
|
|
188
|
+
|
|
189
|
+
export declare interface JustPayloadMoveWinSplit {
|
|
190
|
+
pos: "first" | "second";
|
|
191
|
+
justId: JustId;
|
|
192
|
+
branch: JustBranch;
|
|
193
|
+
direction: JustDirection;
|
|
194
|
+
size?: number;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export declare interface JustPayloadMoveWinStack {
|
|
198
|
+
pos: "stack";
|
|
199
|
+
justId: JustId;
|
|
200
|
+
branch: JustBranch;
|
|
201
|
+
index: number;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export declare interface JustPayloadRemove {
|
|
205
|
+
justId: JustId;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export declare interface JustPayloadResize {
|
|
209
|
+
branch: JustBranch;
|
|
210
|
+
size: number;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export declare type JustPos = JustSplitDirection | 'stack';
|
|
214
|
+
|
|
215
|
+
export declare type JustSplit = JustSplitPercentage | JustSplitPixels;
|
|
216
|
+
|
|
217
|
+
export declare interface JustSplitBase extends JustNodeBase {
|
|
218
|
+
type: JustSplitType;
|
|
219
|
+
direction: JustDirection;
|
|
220
|
+
first: JustNode;
|
|
221
|
+
second: JustNode;
|
|
222
|
+
size: number;
|
|
223
|
+
minSize?: number;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export declare type JustSplitDirection = 'first' | 'second';
|
|
227
|
+
|
|
228
|
+
export declare interface JustSplitPercentage extends JustSplitBase {
|
|
229
|
+
type: 'split-percentage';
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export declare interface JustSplitPixels extends JustSplitBase {
|
|
233
|
+
type: 'split-pixels';
|
|
234
|
+
primary: JustSplitDirection;
|
|
235
|
+
primaryDefaultSize: number;
|
|
236
|
+
primaryHide?: boolean;
|
|
237
|
+
noSplitter?: boolean;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export declare const JustSplitter: typeof JustSplitter_2 & {
|
|
241
|
+
displayName: string;
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
declare function JustSplitter_2({ node, containerRef, onChange, onRelease }: Props_4): JSX.Element;
|
|
245
|
+
|
|
246
|
+
export declare type JustSplitType = 'split-percentage' | 'split-pixels';
|
|
247
|
+
|
|
248
|
+
export declare interface JustStack extends JustNodeBase {
|
|
249
|
+
type: 'stack';
|
|
250
|
+
tabs: JustId[];
|
|
251
|
+
active: JustId | null;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export declare const JustTabMenu: typeof JustTabMenu_2 & {
|
|
255
|
+
displayName: string;
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
declare function JustTabMenu_2({ layoutId, justBranch, isFullScreenView }: Prop): JSX.Element;
|
|
259
|
+
|
|
260
|
+
export declare const JustTabTitle: typeof JustTabTitle_2 & {
|
|
261
|
+
displayName: string;
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
declare function JustTabTitle_2({ layoutId, justId, winInfo }: Props_5): JSX.Element;
|
|
265
|
+
|
|
266
|
+
export declare type JustType = 'stack' | JustSplitType;
|
|
267
|
+
|
|
268
|
+
export declare type JustUpdateSpec = Spec<JustNode>;
|
|
269
|
+
|
|
270
|
+
export declare class JustUtil {
|
|
271
|
+
static toString(justId: JustId): string;
|
|
272
|
+
static getParamString(justId: JustId, key: string): string | undefined;
|
|
273
|
+
static getParam<T>(justId: JustId, key: string): T | undefined;
|
|
274
|
+
static isEquals(justId1: JustId | null | undefined, justId2: JustId | null | undefined): boolean;
|
|
275
|
+
static indexOf(tab: JustId[], justId: JustId): number;
|
|
276
|
+
static includes(tab: JustId[], justId: JustId): boolean;
|
|
277
|
+
static withoutDup(justId: JustId): JustId;
|
|
278
|
+
static replaceDup(justId: JustId): JustId;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
export declare const JustWinBodyView: typeof JustWinBodyView_2 & {
|
|
282
|
+
displayName: string;
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
declare function JustWinBodyView_2(props: Props_6): JSX.Element;
|
|
286
|
+
|
|
287
|
+
export declare const JustWinTitleView: typeof JustWinTitleView_2 & {
|
|
288
|
+
displayName: string;
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
declare function JustWinTitleView_2({ layoutId, isFullScreenView, dndAccept, justBranch, justStack, getWinInfo, getTabMenu }: Props_7): JSX.Element;
|
|
292
|
+
|
|
293
|
+
export declare const JustWinView: typeof JustWinView_2 & {
|
|
294
|
+
displayName: string;
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
declare function JustWinView_2({ layoutId, isFullScreenView, hideTitle, dndAccept, justBranch, justStack, getWinInfo, getTabMenu }: Props_8): JSX.Element;
|
|
298
|
+
|
|
299
|
+
export declare interface NodeInfo {
|
|
300
|
+
node: JustNode;
|
|
301
|
+
branch: JustBranch;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
declare interface PayloadGetBranchByJustId {
|
|
305
|
+
justId: JustId;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
declare interface PayloadGetDupWinIds {
|
|
309
|
+
justId: JustId;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
declare interface PayloadGetNodeAtBranch {
|
|
313
|
+
branch: JustBranch;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
declare interface PayloadGetSize {
|
|
317
|
+
nodeName: string;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
declare interface PayloadGetWinIds {
|
|
321
|
+
viewId: string;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
declare interface PayloadGetWinIdsByBranch {
|
|
325
|
+
branch: JustBranch;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
declare interface PayloadIsPrimayHide {
|
|
329
|
+
nodeName: string;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
declare interface PayloadOpenWin {
|
|
333
|
+
justId: JustId;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
declare interface PayloadOpenWinByNodeName {
|
|
337
|
+
justId: JustId;
|
|
338
|
+
nodeName: string;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
declare interface PayloadOpenWinMenu {
|
|
342
|
+
justId: JustId;
|
|
343
|
+
nodeName: string;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
declare interface PayloadShowWin {
|
|
347
|
+
nodeName: string;
|
|
348
|
+
show: boolean;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
declare interface PayloadToggleWin {
|
|
352
|
+
nodeName: string;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
declare interface Prop {
|
|
356
|
+
layoutId: string;
|
|
357
|
+
justBranch: JustBranch;
|
|
358
|
+
justStack: JustStack;
|
|
359
|
+
isFullScreenView: boolean;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
declare interface Props extends default_2.Attributes {
|
|
363
|
+
layoutId: string;
|
|
364
|
+
isFullScreenView: boolean;
|
|
365
|
+
dndAccept: string[];
|
|
366
|
+
justBranch: JustBranch;
|
|
367
|
+
justId: JustId;
|
|
368
|
+
winInfo: WinInfo;
|
|
369
|
+
justStack: JustStack;
|
|
370
|
+
rect: DOMRect | null;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
declare interface Props_2 extends default_2.Attributes {
|
|
374
|
+
layoutId: string;
|
|
375
|
+
getWinInfo: GetWinInfoFn;
|
|
376
|
+
initialValue: JustNode;
|
|
377
|
+
getTabMenu?: GetTabMenuFn;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
declare interface Props_3 extends React_2.Attributes {
|
|
381
|
+
layoutId: string;
|
|
382
|
+
isFullScreenView: boolean;
|
|
383
|
+
justBranch: JustBranch;
|
|
384
|
+
node: JustNode | null;
|
|
385
|
+
getWinInfo: GetWinInfoFn;
|
|
386
|
+
getTabMenu?: GetTabMenuFn;
|
|
387
|
+
hideTitle?: boolean;
|
|
388
|
+
dndAccept: string[];
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
declare interface Props_4 extends default_2.Attributes {
|
|
392
|
+
layoutId: string;
|
|
393
|
+
node: JustSplit;
|
|
394
|
+
justBranch: JustBranch;
|
|
395
|
+
containerRef: RefObject<HTMLDivElement | null>;
|
|
396
|
+
onChange?: (splitSize: SplitSize) => void;
|
|
397
|
+
onRelease?: (splitSize: SplitSize) => void;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
declare interface Props_5 extends default_2.Attributes {
|
|
401
|
+
justId: JustId;
|
|
402
|
+
layoutId: string;
|
|
403
|
+
justBranch: JustBranch;
|
|
404
|
+
isFullScreenView: boolean;
|
|
405
|
+
winInfo: WinInfo;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
declare interface Props_6 extends default_2.Attributes {
|
|
409
|
+
layoutId: string;
|
|
410
|
+
dndAccept: string[];
|
|
411
|
+
justBranch: JustBranch;
|
|
412
|
+
justStack: JustStack;
|
|
413
|
+
getWinInfo: GetWinInfoFn;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
declare interface Props_7 extends default_2.Attributes {
|
|
417
|
+
layoutId: string;
|
|
418
|
+
isFullScreenView: boolean;
|
|
419
|
+
dndAccept: string[];
|
|
420
|
+
justBranch: JustBranch;
|
|
421
|
+
justStack: JustStack;
|
|
422
|
+
getWinInfo: GetWinInfoFn;
|
|
423
|
+
getTabMenu?: GetTabMenuFn;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
declare interface Props_8 extends default_2.Attributes {
|
|
427
|
+
layoutId: string;
|
|
428
|
+
isFullScreenView: boolean;
|
|
429
|
+
hideTitle?: boolean;
|
|
430
|
+
dndAccept: string[];
|
|
431
|
+
justBranch: JustBranch;
|
|
432
|
+
justStack: JustStack;
|
|
433
|
+
getWinInfo: GetWinInfoFn;
|
|
434
|
+
getTabMenu?: GetTabMenuFn;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
declare type SplitSize = SplitSizePercentage | SplitSizePiexels;
|
|
438
|
+
|
|
439
|
+
declare interface SplitSizePercentage {
|
|
440
|
+
type: JustSplitType;
|
|
441
|
+
size: number;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
declare interface SplitSizePiexels {
|
|
445
|
+
type: JustSplitType;
|
|
446
|
+
primary: JustSplitDirection;
|
|
447
|
+
size: number;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
export declare function stableStringify(obj: any): string;
|
|
451
|
+
|
|
452
|
+
export declare const storeCache: Map<string, any>;
|
|
453
|
+
|
|
454
|
+
export declare interface TabTitleProps {
|
|
455
|
+
justId: JustId;
|
|
456
|
+
layoutId: string;
|
|
457
|
+
justBranch: JustBranch;
|
|
458
|
+
isFullScreenView: boolean;
|
|
459
|
+
winInfo: WinInfo;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
export declare const useJustLayoutStore: (id: string) => JustLayoutStore;
|
|
463
|
+
|
|
464
|
+
export declare interface WinInfo {
|
|
465
|
+
getTabTitle?: GetTabTitleFn;
|
|
466
|
+
getTabIcon: GetTabIconFn;
|
|
467
|
+
getView: GetViewFn;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
export { }
|
package/package.json
CHANGED
package/dist/just-layout.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.just-layout{width:100%;height:100%;background-color:#272d30;--layout-bg-color: #272d30;--title-bg-color: #191a1c;--title-font-color: rgb(255, 255, 255, .7);--splitter-border-color1: #1e1f22;--splitter-border-color2: #1e1f22;--splitter-bg-color: #1e1f22;overflow:hidden}.just-node{display:flex;flex:1;width:100%;height:100%}.just-win{display:flex;flex-direction:column;flex:1;width:100%;height:100%}.just-win .just-win-title{flex:0 0 40px;display:flex;box-sizing:border-box}.just-win .just-win-body{flex:1;min-height:0;width:100%;height:100%}.just-win-title .just-title-list{flex:1;overflow-x:overlay;display:flex;box-sizing:border-box;height:100%}.just-win-title .just-title-list:hover{padding-bottom:0}.just-title-list::-webkit-scrollbar{height:4px}.just-title-list::-webkit-scrollbar-thumb{background:#4d4d4d;background-clip:padding-box}.just-title-list::-webkit-scrollbar-thumb:hover{background:#ffc233}.just-title-list::-webkit-scrollbar-track{background:transparent}.just-win-title .just-title-menus{display:flex;align-items:center;padding-right:3px}.just-title-menus .just-menu-item.active{background-color:#3574f066}.just-title-menu{flex:0 0 26px;height:26px;display:flex;align-items:center;justify-content:center;padding:3px;border-radius:3px;box-sizing:border-box}.just-title-menu:hover{background-color:#ffffff1a}.just-title-menu svg{color:#fff}.just-layout .just-column{display:flex;flex-direction:column;width:100%;height:100%}.just-layout .just-row{display:flex;flex-direction:row;width:100%;height:100%}.just-layout .just-first,.just-layout .just-second{display:flex;overflow:hidden}.just-layout .just-primary{flex-grow:0;flex-shrink:0;min-width:0}.just-layout .just-secondary{flex:1}.just-layout .just-splitter{flex:0 0 3px;padding:0;margin:0;box-sizing:border-box}.just-row>.just-splitter{cursor:ew-resize}.just-column>.just-splitter{cursor:ns-resize}.dragging{cursor:move;border:1px dashed gray;box-sizing:border-box}.just-win-title{display:flex;background-color:var(--title-bg-color)}.just-draggable-title{display:flex;margin:0;padding:4px;height:36px;align-items:center;white-space:nowrap;background-color:var(--title-bg-color);color:var(--title-font-color);font-size:12px;border-top:4px solid transparent;box-sizing:border-box}.just-draggable-title.just-active{border-top:4px solid #008080;border-left:1px solid #43454a;border-right:1px solid #43454a;border-bottom:1px solid #43454a;box-sizing:border-box;background-color:#2b2d30}.just-draggable-title:hover{background-color:#2b2d30}.just-draggable-title.last-active{background:linear-gradient(135deg,#174aaeb3,#08186acc)}.just-draggable-title .just-icon{display:flex;flex:0 0 25px;align-items:center;justify-content:center}.just-icon svg{width:16px;height:16px}.just-close:hover svg{color:#fff}.just-draggable-title .just-title{flex:1;height:100%;display:flex;align-items:center}.just-draggable-title.just-title-menus .szh-menu svg{color:#ffc233}.just-title-menus .szh-menu-container{display:flex;background-color:#2b2d30}.just-title-menus .szh-menu{background-color:#2b2d30;color:#fff;padding:5px;border:1px solid #393b40;display:flex;flex-direction:column;justify-content:center;outline:none;z-index:99999!important}.just-title-menus .szh-menu__item{background-color:#2b2d30;flex:0 0 26px;display:flex;font-size:12px;border-radius:3px;padding:0;outline:none}.just-title-menus .szh-menu__item:hover{background-color:#3574f066}.just-menu-item{display:flex;margin:0;padding:3px;height:100%;align-items:center;white-space:nowrap;background-color:var(--title-bg-color);color:var(--title-font-color);font-size:12px;box-sizing:border-box}.just-menu-item.just-active{border-bottom:4px solid #3574f0;box-sizing:border-box}.just-menu-item .just-icon{display:flex;flex:0 0 25px;align-items:center;justify-content:center}.just-icon svg{width:16px;height:16px;color:#ffffff4d}.just-menu-item .just-title{flex:1;height:100%;display:flex;align-items:center}.just-menu-item>div{height:100%}.just-overlay{position:absolute;z-index:9999;background-color:#00000080;pointer-events:none}
|