@dynamix-layout/core 0.0.2-beta.0 → 0.0.5
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/CHANGELOG.md +12 -0
- package/README.md +155 -61
- package/{LICENSE → dist/LICENSE} +1 -1
- package/dist/core.cjs.js +57 -0
- package/dist/core.cjs.js.br +0 -0
- package/dist/core.cjs.js.gz +0 -0
- package/dist/core.cjs.js.map +1 -0
- package/dist/core.es.js +1025 -0
- package/dist/core.es.js.br +0 -0
- package/dist/core.es.js.gz +0 -0
- package/dist/core.es.js.map +1 -0
- package/dist/core.iife.js +57 -1
- package/dist/core.iife.js.br +0 -0
- package/dist/core.iife.js.gz +0 -0
- package/dist/core.iife.js.map +1 -0
- package/dist/core.umd.js +57 -1
- package/dist/core.umd.js.br +0 -0
- package/dist/core.umd.js.gz +0 -0
- package/dist/core.umd.js.map +1 -0
- package/dist/types/app/comparator.d.ts +3 -0
- package/dist/types/app/dynamix.d.ts +97 -0
- package/dist/types/app/index.d.ts +4 -64
- package/dist/types/app/queue.d.ts +217 -0
- package/dist/types/app/reactive-state.d.ts +3 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/type/index.d.ts +54 -0
- package/package.json +58 -29
- package/dist/core.js +0 -1
- package/dist/core.mjs +0 -244
- package/dist/types/lib/Constant.d.ts +0 -14
- package/dist/types/lib/Element.d.ts +0 -22
- package/dist/types/lib/Helper.d.ts +0 -21
- package/dist/types/lib/Method.d.ts +0 -1
- package/dist/types/lib/index.d.ts +0 -4
- package/dist/types/types/Element.d.ts +0 -103
- package/dist/types/types/Method.d.ts +0 -5
- package/dist/types/types/index.d.ts +0 -2
- package/src/app/index.ts +0 -291
- package/src/index.ts +0 -3
- package/src/lib/Constant.ts +0 -17
- package/src/lib/Element.ts +0 -66
- package/src/lib/Helper.ts +0 -259
- package/src/lib/Method.ts +0 -12
- package/src/lib/index.ts +0 -4
- package/src/types/Element.ts +0 -116
- package/src/types/Method.ts +0 -4
- package/src/types/index.ts +0 -2
package/src/types/Element.ts
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Element.ts
|
|
3
|
-
* @description Interface to create concrete class.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @interface INode
|
|
8
|
-
* @description Interface for Node.
|
|
9
|
-
* @property {Type} type : Type of Node (Row, Column, Tabset, Tab).
|
|
10
|
-
* @property {number} weight : Weight of Node.
|
|
11
|
-
* @property {[number,number]} dimension : Dimension of Node.
|
|
12
|
-
* @property {[number,number]} coordinate : Coordinate of Node.
|
|
13
|
-
* @property {Node | null} parent : Parent Node ( Node | null ).
|
|
14
|
-
* @property {Node[]} children : Children Node ( Node[] ).
|
|
15
|
-
* @property {Bond | null} prev : Previous Bond ( Bond | null ).
|
|
16
|
-
* @property {Bond | null} next : Next Bond ( Bond | null ).
|
|
17
|
-
*
|
|
18
|
-
*/
|
|
19
|
-
export interface INode<T, K> {
|
|
20
|
-
type: TypeValue;
|
|
21
|
-
weight: number;
|
|
22
|
-
dimension: [number, number];
|
|
23
|
-
coordinate: [number, number];
|
|
24
|
-
parent: T | null;
|
|
25
|
-
children: T[];
|
|
26
|
-
prev: K | null;
|
|
27
|
-
next: K | null;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* @interface IBond
|
|
32
|
-
* @description Interface for Bond.
|
|
33
|
-
* @property {Type} type : Type of Bond (Row, Column, Tabset, Tab).
|
|
34
|
-
* @property {Node} prev : Previous Node ( Node | null ).
|
|
35
|
-
* @property {Node} next : Next Node ( Node | null ).
|
|
36
|
-
* @property {[number,number]} dimension : Dimension of Bond.
|
|
37
|
-
* @property {[number,number]} coordinate : Coordinate of Bond.
|
|
38
|
-
*
|
|
39
|
-
*/
|
|
40
|
-
export interface IBond<T> {
|
|
41
|
-
type: TypeValue;
|
|
42
|
-
prev: T;
|
|
43
|
-
next: T;
|
|
44
|
-
dimension: [number, number];
|
|
45
|
-
coordinate: [number, number];
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* @interface ILayout
|
|
50
|
-
* @description Interface for Layout.
|
|
51
|
-
* @property {Node} root : Root Node.
|
|
52
|
-
* @property {Node[]} tabs : Tabs Node.
|
|
53
|
-
* @property {Bond[]} bond : Bond between two components.
|
|
54
|
-
*
|
|
55
|
-
*/
|
|
56
|
-
export interface ILayout<T, K> {
|
|
57
|
-
_root: T;
|
|
58
|
-
_tabs: T[];
|
|
59
|
-
_bond: K[];
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* @enum Type
|
|
65
|
-
* @description Enum for Type.
|
|
66
|
-
* @property {Row} Row : Row Type.
|
|
67
|
-
* @property {Column} Column : Column Type.
|
|
68
|
-
* @property {Tabset} Tabset : Tabset Type.
|
|
69
|
-
* @property {Tab} Tab : Tab Type.
|
|
70
|
-
*/
|
|
71
|
-
export const Type = {
|
|
72
|
-
Row: 0,
|
|
73
|
-
Column: 1,
|
|
74
|
-
Tabset: 2,
|
|
75
|
-
Tab: 3
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* @enum TypeValue : Value of Type.
|
|
82
|
-
*/
|
|
83
|
-
export type TypeValue = number;
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* @enum Area
|
|
87
|
-
* @description Enum for Area.
|
|
88
|
-
* @property {Left} Left : Left Area.
|
|
89
|
-
* @property {Right} Right : Right Area.
|
|
90
|
-
* @property {Top} Top : Top Area.
|
|
91
|
-
* @property {Bottom} Bottom : Bottom Area.
|
|
92
|
-
* @property {Cover} Cover : Cover Area.
|
|
93
|
-
*/
|
|
94
|
-
export const Area = {
|
|
95
|
-
Left: "left" as Left,
|
|
96
|
-
Right: "right" as Right,
|
|
97
|
-
Top: "top" as Top,
|
|
98
|
-
Bottom: "bottom" as Bottom,
|
|
99
|
-
Cover: "cover" as Cover
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export type Left = "left";
|
|
103
|
-
export type Right = "right";
|
|
104
|
-
export type Top = "top";
|
|
105
|
-
export type Bottom = "bottom";
|
|
106
|
-
export type Cover = "cover";
|
|
107
|
-
|
|
108
|
-
export type AreaValue = typeof Area[keyof typeof Area];
|
|
109
|
-
|
|
110
|
-
export type LayoutTree = {
|
|
111
|
-
type: TypeValue;
|
|
112
|
-
weight: number;
|
|
113
|
-
children: LayoutTree[];
|
|
114
|
-
name: string;
|
|
115
|
-
}
|
|
116
|
-
|
package/src/types/Method.ts
DELETED
package/src/types/index.ts
DELETED