@ddd-tool/domain-designer-ui-component 0.1.0-beta.4 → 0.1.0-beta.6

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.
@@ -0,0 +1 @@
1
+ export declare const EMPTY_STORY = "__Empty__";
@@ -1,2 +1,25 @@
1
- import type { DomainDesigner } from '@ddd-tool/domain-designer-core';
2
- export declare function nomnomlCodeGenerator<T extends DomainDesigner>(design: T, displayReadModel: boolean, displaySystem: boolean): Generator<string, void, unknown>;
1
+ import type { DomainDesignAgg, DomainDesigner } from '@ddd-tool/domain-designer-core';
2
+ export declare function nomnomlCodeGenerator<T extends DomainDesigner>(params: {
3
+ design: T;
4
+ currentStory: string;
5
+ displayReadModel: boolean;
6
+ displaySystem: boolean;
7
+ }): Generator<string, void, unknown>;
8
+ export declare function filterContext(params: {
9
+ design: DomainDesigner;
10
+ currentStory: string;
11
+ displayReadModel: boolean;
12
+ displaySystem: boolean;
13
+ }): {
14
+ aggs: DomainDesignAgg<any>[];
15
+ commands: import("@ddd-tool/domain-designer-core").DomainDesignCommand<any>[];
16
+ facadeCommands: import("@ddd-tool/domain-designer-core").DomainDesignFacadeCommand<any>[];
17
+ events: import("@ddd-tool/domain-designer-core").DomainDesignEvent<any>[];
18
+ services: import("@ddd-tool/domain-designer-core").DomainDesignService[];
19
+ actors: import("@ddd-tool/domain-designer-core").DomainDesignActor[];
20
+ policies: import("@ddd-tool/domain-designer-core").DomainDesignPolicy[];
21
+ readModels: import("@ddd-tool/domain-designer-core").DomainDesignReadModel<any>[];
22
+ systems: import("@ddd-tool/domain-designer-core").DomainDesignSystem[];
23
+ links: Record<string, import("@ddd-tool/domain-designer-core/common").LinkType>;
24
+ getIdMap: () => Record<string, import("@ddd-tool/domain-designer-core").DomainDesignObject>;
25
+ };
@@ -1,9 +1,9 @@
1
1
  import type { DomainDesigner } from '@ddd-tool/domain-designer-core';
2
+ export { EMPTY_STORY } from './define';
2
3
  interface FocusFlowFn {
3
4
  (workflow: undefined, userStory?: string): void;
4
5
  (workflow: string, userStory: string): void;
5
6
  }
6
- export declare const EMPTY_STORY = "__Empty__";
7
7
  export declare function useDiagramAgg(data?: Record<string, DomainDesigner>): Readonly<{
8
8
  states: Readonly<{
9
9
  design: Readonly<import("vue").Ref<{
@@ -191,6 +191,19 @@ export declare function useDiagramAgg(data?: Record<string, DomainDesigner>): Re
191
191
  commands: Readonly<{
192
192
  focusFlow: FocusFlowFn;
193
193
  downloadSvg: () => void;
194
+ filterContext: () => {
195
+ aggs: import("@ddd-tool/domain-designer-core").DomainDesignAgg<any>[];
196
+ commands: import("@ddd-tool/domain-designer-core").DomainDesignCommand<any>[];
197
+ facadeCommands: import("@ddd-tool/domain-designer-core").DomainDesignFacadeCommand<any>[];
198
+ events: import("@ddd-tool/domain-designer-core").DomainDesignEvent<any>[];
199
+ services: import("@ddd-tool/domain-designer-core").DomainDesignService[];
200
+ actors: import("@ddd-tool/domain-designer-core").DomainDesignActor[];
201
+ policies: import("@ddd-tool/domain-designer-core").DomainDesignPolicy[];
202
+ readModels: import("@ddd-tool/domain-designer-core").DomainDesignReadModel<any>[];
203
+ systems: import("@ddd-tool/domain-designer-core").DomainDesignSystem[];
204
+ links: Record<string, import("@ddd-tool/domain-designer-core/common").LinkType>;
205
+ getIdMap: () => Record<string, import("@ddd-tool/domain-designer-core").DomainDesignObject>;
206
+ };
194
207
  setDownloadEnabled: (b: boolean) => void;
195
208
  setWorkflowPlayInterval: (i: number) => void;
196
209
  setDisplayReadModel: (b: boolean) => void;
@@ -230,4 +243,3 @@ export declare function useDiagramAgg(data?: Record<string, DomainDesigner>): Re
230
243
  };
231
244
  }>;
232
245
  }>;
233
- export {};
package/index.css CHANGED
@@ -1 +1,127 @@
1
- .nomnoml[data-v-83e775ca]{height:100%;overflow:auto}.nomnoml text{cursor:pointer}@keyframes shining-info{0%{stroke-width:1px;stroke-opacity:.2;stroke:#000;-webkit-text-stroke-color:#000}to{stroke-width:1px;stroke-opacity:.8;stroke:#000;-webkit-text-stroke-color:#000}}@keyframes shining-node{0%{stroke-opacity:.2;stroke:#33322e;-webkit-text-stroke-color:#33322e}to{stroke-opacity:1;stroke:#33322e;-webkit-text-stroke-color:#33322e}}.nomnoml .highlight-info:not(.active) text{animation:shining-info .6s alternate infinite;-webkit-animation:shining-info .6s alternate infinite;-moz-animation:shining-info .6s alternate infinite}.nomnoml .highlight-note:not(.active){animation:shining-info .6s alternate infinite;-webkit-animation:shining-info .6s alternate infinite;-moz-animation:shining-info .6s alternate infinite}.nomnoml .highlight-node:not(.active) g:first-child{animation:shining-node .6s alternate infinite;-webkit-animation:shining-node .6s alternate infinite;-moz-animation:shining-node .6s alternate infinite}.nomnoml g[data-id].active text,.nomnoml tspan[data-id].active{stroke-width:1px;stroke-opacity:.8;stroke:#000;-webkit-text-stroke-color:#000}.nomnoml g.node.active{animation:shining-node .6s alternate infinite;-webkit-animation:shining-node .6s alternate infinite;-moz-animation:shining-node .6s alternate infinite}.container{width:100vw;height:100vh;background-color:#efefef;overflow:hidden;position:relative}.draggable{position:absolute;top:0;left:0;user-select:none;transform-origin:0 0}.p-dock{opacity:.4;transition:.5s}.p-dock:hover{opacity:1}.p-dock .p-dock-item:hover{scale:1.1}.toolbar-drawer{width:40%}.toolbar-drawer .datasource{font-weight:700}.toolbar-drawer .datasource .datasource-item{display:grid;grid-template-columns:20px 1fr;grid-template-rows:1fr;margin:5px 0;line-height:1.5rem;font-size:1rem;border-radius:5px}.toolbar-drawer .datasource .datasource-item :hover{cursor:pointer;background-image:linear-gradient(to bottom,#fff,#e4faff,#fff)}.toolbar-drawer .datasource .datasource-item label{padding-left:5px}.root-fieldset{opacity:.9;white-space:pre-line;position:absolute;right:4rem;top:0;width:30%}.root-fieldset .note:before{content:"";display:inline-block;height:1rem;width:.5rem;border-radius:.25rem;margin-right:.5rem;background-color:#4441ff}
1
+
2
+ .nomnoml[data-v-ddc71b2c] {
3
+ height: 100%;
4
+ overflow: auto;
5
+ }
6
+
7
+ .nomnoml text {
8
+ cursor: pointer;
9
+ }
10
+ @keyframes shining-info {
11
+ from {
12
+ stroke-width: 1px;
13
+ stroke-opacity: 0.2;
14
+ stroke: #000;
15
+ -webkit-text-stroke-color: #000;
16
+ }
17
+ to {
18
+ stroke-width: 1px;
19
+ stroke-opacity: 0.8;
20
+ stroke: #000;
21
+ -webkit-text-stroke-color: #000;
22
+ }
23
+ }
24
+ @keyframes shining-node {
25
+ from {
26
+ stroke-opacity: 0.2;
27
+ stroke: #33322e;
28
+ -webkit-text-stroke-color: #33322e;
29
+ }
30
+ to {
31
+ stroke-opacity: 1;
32
+ stroke: #33322e;
33
+ -webkit-text-stroke-color: #33322e;
34
+ }
35
+ }
36
+ .nomnoml .highlight-info:not(.active) text {
37
+ animation: shining-info 0.6s alternate infinite;
38
+ -webkit-animation: shining-info 0.6s alternate infinite;
39
+ -moz-animation: shining-info 0.6s alternate infinite;
40
+ }
41
+ .nomnoml .highlight-note:not(.active) {
42
+ animation: shining-info 0.6s alternate infinite;
43
+ -webkit-animation: shining-info 0.6s alternate infinite;
44
+ -moz-animation: shining-info 0.6s alternate infinite;
45
+ }
46
+ .nomnoml .highlight-node:not(.active) g:first-child {
47
+ animation: shining-node 0.6s alternate infinite;
48
+ -webkit-animation: shining-node 0.6s alternate infinite;
49
+ -moz-animation: shining-node 0.6s alternate infinite;
50
+ }
51
+ .nomnoml g[data-id].active text,
52
+ .nomnoml tspan[data-id].active {
53
+ stroke-width: 1px;
54
+ stroke-opacity: 0.8;
55
+ stroke: #000;
56
+ -webkit-text-stroke-color: #000;
57
+ }
58
+ .nomnoml g.node.active {
59
+ animation: shining-node 0.6s alternate infinite;
60
+ -webkit-animation: shining-node 0.6s alternate infinite;
61
+ -moz-animation: shining-node 0.6s alternate infinite;
62
+ }
63
+
64
+ .container {
65
+ width: 100vw;
66
+ height: 100vh;
67
+ background-color: #efefef;
68
+ overflow: hidden;
69
+ position: relative;
70
+ }
71
+ .draggable {
72
+ position: absolute;
73
+ top: 0;
74
+ left: 0;
75
+ user-select: none;
76
+ transform-origin: 0 0; /* 设置缩放原点为左上角 */
77
+ }
78
+
79
+ .p-dock {
80
+ opacity: 0.4;
81
+ transition: 0.5s;
82
+ }
83
+ .p-dock:hover {
84
+ opacity: 1;
85
+ }
86
+ .p-dock .p-dock-item:hover {
87
+ scale: 1.1;
88
+ }
89
+ .toolbar-drawer {
90
+ width: 40%;
91
+ }
92
+ .toolbar-drawer .datasource {
93
+ font-weight: bold;
94
+ }
95
+ .toolbar-drawer .datasource .datasource-item {
96
+ display: grid;
97
+ grid-template-columns: 20px 1fr;
98
+ grid-template-rows: 1fr;
99
+ margin: 5px 0;
100
+ line-height: 1.5rem;
101
+ font-size: 1rem;
102
+ border-radius: 5px;
103
+ }
104
+ .toolbar-drawer .datasource .datasource-item :hover {
105
+ cursor: pointer;
106
+ background-image: linear-gradient(to bottom, white, rgb(228, 250, 255), white);
107
+ }
108
+ .toolbar-drawer .datasource .datasource-item label {
109
+ padding-left: 5px;
110
+ }
111
+ .root-fieldset {
112
+ opacity: 0.9;
113
+ white-space: pre-line;
114
+ position: absolute;
115
+ right: 4rem;
116
+ top: 0;
117
+ width: 30%;
118
+ }
119
+ .root-fieldset .note::before {
120
+ content: '';
121
+ display: inline-block;
122
+ height: 1rem;
123
+ width: 0.5rem;
124
+ border-radius: 0.25rem;
125
+ margin-right: 0.5rem;
126
+ background-color: #4441ff;
127
+ }