@fragiola/flow-angular 0.0.0-stage → 0.0.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/LICENSE +21 -0
- package/README.md +13 -2
- package/dist/fesm2022/fragiola-flow-angular-connection.mjs +1 -0
- package/dist/fesm2022/fragiola-flow-angular-drag.mjs +1 -0
- package/dist/fesm2022/fragiola-flow-angular-keyboard.mjs +1 -0
- package/dist/fesm2022/fragiola-flow-angular-minimap.mjs +408 -0
- package/dist/fesm2022/fragiola-flow-angular-minimap.mjs.map +1 -0
- package/dist/fesm2022/fragiola-flow-angular-reconnection.mjs +1 -0
- package/dist/fesm2022/fragiola-flow-angular-resize.mjs +437 -0
- package/dist/fesm2022/fragiola-flow-angular-resize.mjs.map +1 -0
- package/dist/fesm2022/fragiola-flow-angular-selection.mjs +1 -0
- package/dist/fesm2022/fragiola-flow-angular-subflows.mjs +1 -0
- package/dist/fesm2022/fragiola-flow-angular.mjs +4688 -0
- package/dist/fesm2022/fragiola-flow-angular.mjs.map +1 -0
- package/dist/types/fragiola-flow-angular-connection.d.ts +1 -0
- package/dist/types/fragiola-flow-angular-drag.d.ts +1 -0
- package/dist/types/fragiola-flow-angular-keyboard.d.ts +1 -0
- package/dist/types/fragiola-flow-angular-minimap.d.ts +118 -0
- package/dist/types/fragiola-flow-angular-reconnection.d.ts +1 -0
- package/dist/types/fragiola-flow-angular-resize.d.ts +145 -0
- package/dist/types/fragiola-flow-angular-selection.d.ts +1 -0
- package/dist/types/fragiola-flow-angular-subflows.d.ts +1 -0
- package/dist/types/fragiola-flow-angular.d.ts +1839 -0
- package/package.json +106 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mauro de Souza
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @fragiola/flow-angular
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Composable, unstyled Angular directives for **Flow**, headless node-based editors and diagrams:
|
|
4
|
+
`[flowRoot]`, `[flowViewport]`, `[flowNodes]`, `[flowNode]`, `[flowHandle]`, `[flowEdges]`,
|
|
5
|
+
`[flowEdge]`, `[flowBackground]`, `[flowControls]`, … on your own elements, over the
|
|
6
|
+
framework-free core `@fragiola/flow` (re-exported whole, so an Angular app installs this one
|
|
7
|
+
package). The opt-in features are on their own entries (`@fragiola/flow-angular/selection`,
|
|
8
|
+
`/drag`, `/connection`, `/reconnection`, `/resize`, `/subflows`, `/keyboard`, `/minimap`). No CSS,
|
|
9
|
+
no icons, no text: you style every part, through its `data-flow-part` and state attributes.
|
|
10
|
+
|
|
11
|
+
Not usable yet: version `0.0.0`, nothing is published.
|
|
12
|
+
|
|
13
|
+
Documentation: **<https://fragiola.com/flow>** (coming soon). ESM only. Angular 22 or later
|
|
14
|
+
(signals, standalone directives, zoneless).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@fragiola/flow/connection";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@fragiola/flow/drag";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@fragiola/flow/keyboard";
|
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Directive, InjectionToken, computed, effect, inject, input, output, untracked } from "@angular/core";
|
|
3
|
+
import { partAttributes } from "@fragiola/flow";
|
|
4
|
+
import { ɵbeforeInputs, ɵbindAttributes, ɵbindBaseAttributes, ɵbindPresence, ɵbindStructuralStyle, ɵdefaultContent, ɵflowValue, ɵinjectFlowContext, ɵinjectHost, ɵonDestroy, ɵoptionalBoolean, ɵoptionalNumber, ɵpx } from "@fragiola/flow-angular";
|
|
5
|
+
export * from "@fragiola/flow/minimap";
|
|
6
|
+
const FLOW_MINIMAP_VIEW = new InjectionToken("FlowMiniMapView");
|
|
7
|
+
function injectMiniMapView(part) {
|
|
8
|
+
const view = inject(FLOW_MINIMAP_VIEW, { optional: true });
|
|
9
|
+
if (!view) throw new Error(`${part} must be used inside [flowMiniMap]`);
|
|
10
|
+
return view;
|
|
11
|
+
}
|
|
12
|
+
const ATTRIBUTES = partAttributes("minimap-mask");
|
|
13
|
+
function bindMiniMapMask(element, view) {
|
|
14
|
+
ɵbindAttributes(element, () => ATTRIBUTES);
|
|
15
|
+
ɵbindBaseAttributes(element, () => ({
|
|
16
|
+
d: view().maskPath,
|
|
17
|
+
"fill-rule": "evenodd"
|
|
18
|
+
}));
|
|
19
|
+
}
|
|
20
|
+
var FlowMiniMapMaskDirective = class FlowMiniMapMaskDirective {
|
|
21
|
+
constructor() {
|
|
22
|
+
this.view = injectMiniMapView("[flowMiniMapMask]");
|
|
23
|
+
this.state = computed(() => ({ view: this.view().view }), ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
|
|
24
|
+
bindMiniMapMask(ɵinjectHost(), this.view);
|
|
25
|
+
}
|
|
26
|
+
static {
|
|
27
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
28
|
+
minVersion: "12.0.0",
|
|
29
|
+
version: "22.2.5",
|
|
30
|
+
ngImport: i0,
|
|
31
|
+
type: FlowMiniMapMaskDirective,
|
|
32
|
+
deps: [],
|
|
33
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
static {
|
|
37
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
38
|
+
minVersion: "14.0.0",
|
|
39
|
+
version: "22.2.5",
|
|
40
|
+
type: FlowMiniMapMaskDirective,
|
|
41
|
+
isStandalone: true,
|
|
42
|
+
selector: "[flowMiniMapMask]",
|
|
43
|
+
exportAs: ["flowMiniMapMask"],
|
|
44
|
+
ngImport: i0
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
49
|
+
minVersion: "12.0.0",
|
|
50
|
+
version: "22.2.5",
|
|
51
|
+
ngImport: i0,
|
|
52
|
+
type: FlowMiniMapMaskDirective,
|
|
53
|
+
decorators: [{
|
|
54
|
+
type: Directive,
|
|
55
|
+
args: [{
|
|
56
|
+
selector: "[flowMiniMapMask]",
|
|
57
|
+
exportAs: "flowMiniMapMask"
|
|
58
|
+
}]
|
|
59
|
+
}],
|
|
60
|
+
ctorParameters: () => []
|
|
61
|
+
});
|
|
62
|
+
const SVG = "http://www.w3.org/2000/svg";
|
|
63
|
+
const EMPTY_VIEW = Object.freeze({
|
|
64
|
+
viewBox: Object.freeze({
|
|
65
|
+
x: 0,
|
|
66
|
+
y: 0,
|
|
67
|
+
width: 0,
|
|
68
|
+
height: 0
|
|
69
|
+
}),
|
|
70
|
+
viewBoxAttribute: "0 0 0 0",
|
|
71
|
+
scale: 1,
|
|
72
|
+
nodes: Object.freeze([]),
|
|
73
|
+
view: Object.freeze({
|
|
74
|
+
x: 0,
|
|
75
|
+
y: 0,
|
|
76
|
+
width: 0,
|
|
77
|
+
height: 0
|
|
78
|
+
}),
|
|
79
|
+
maskPath: ""
|
|
80
|
+
});
|
|
81
|
+
function sameView(a, b) {
|
|
82
|
+
return a === b || a.viewBoxAttribute === b.viewBoxAttribute && a.maskPath === b.maskPath && a.nodes.length === b.nodes.length && a.nodes.every((node, i) => {
|
|
83
|
+
const other = b.nodes[i];
|
|
84
|
+
return other !== void 0 && node.nodeId === other.nodeId && node.x === other.x && node.y === other.y && node.width === other.width && node.height === other.height;
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
var FlowMiniMapDirective = class FlowMiniMapDirective {
|
|
88
|
+
constructor() {
|
|
89
|
+
this.width = input(200, {
|
|
90
|
+
...ngDevMode ? { debugName: "width" } : /* istanbul ignore next */ {},
|
|
91
|
+
transform: (value) => ɵoptionalNumber(value) ?? 200
|
|
92
|
+
});
|
|
93
|
+
this.height = input(150, {
|
|
94
|
+
...ngDevMode ? { debugName: "height" } : /* istanbul ignore next */ {},
|
|
95
|
+
transform: (value) => ɵoptionalNumber(value) ?? 150
|
|
96
|
+
});
|
|
97
|
+
this.inversePan = input(void 0, {
|
|
98
|
+
...ngDevMode ? { debugName: "inversePan" } : /* istanbul ignore next */ {},
|
|
99
|
+
transform: ɵoptionalBoolean
|
|
100
|
+
});
|
|
101
|
+
this.zoomStep = input(void 0, {
|
|
102
|
+
...ngDevMode ? { debugName: "zoomStep" } : /* istanbul ignore next */ {},
|
|
103
|
+
transform: ɵoptionalNumber
|
|
104
|
+
});
|
|
105
|
+
this.minimapClick = output();
|
|
106
|
+
this.context = ɵinjectFlowContext("[flowMiniMap]");
|
|
107
|
+
this.view = ɵflowValue(this.context, () => this.context.engine()?.get("minimap-view", {
|
|
108
|
+
width: this.width(),
|
|
109
|
+
height: this.height()
|
|
110
|
+
}) ?? EMPTY_VIEW, sameView);
|
|
111
|
+
this.state = computed(() => ({ view: this.view() }), ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
|
|
112
|
+
const host = ɵinjectHost();
|
|
113
|
+
const attributes = ɵflowValue(this.context, () => {
|
|
114
|
+
const engine = this.context.engine();
|
|
115
|
+
return engine ? engine.adapter.attributes("minimap") : partAttributes("minimap");
|
|
116
|
+
});
|
|
117
|
+
ɵbindAttributes(host, () => ({
|
|
118
|
+
...attributes(),
|
|
119
|
+
viewBox: this.view().viewBoxAttribute,
|
|
120
|
+
width: String(this.width()),
|
|
121
|
+
height: String(this.height())
|
|
122
|
+
}));
|
|
123
|
+
ɵbindStructuralStyle(host, () => ({
|
|
124
|
+
width: ɵpx(this.width()),
|
|
125
|
+
height: ɵpx(this.height())
|
|
126
|
+
}));
|
|
127
|
+
effect((onCleanup) => {
|
|
128
|
+
const engine = this.context.engine();
|
|
129
|
+
if (!engine) return;
|
|
130
|
+
const options = Object.fromEntries(Object.entries({
|
|
131
|
+
inversePan: this.inversePan(),
|
|
132
|
+
zoomStep: this.zoomStep()
|
|
133
|
+
}).filter(([, value]) => value !== void 0));
|
|
134
|
+
untracked(() => engine.adapter.setPartOptions("minimap", "", options));
|
|
135
|
+
onCleanup(() => engine.adapter.setPartOptions("minimap", "", null));
|
|
136
|
+
});
|
|
137
|
+
effect((onCleanup) => {
|
|
138
|
+
const engine = this.context.engine();
|
|
139
|
+
if (!engine) return;
|
|
140
|
+
onCleanup(untracked(() => engine.subscribe((event) => {
|
|
141
|
+
if (event.type === "minimap-click" && event.element === host) this.minimapClick.emit(event);
|
|
142
|
+
})));
|
|
143
|
+
});
|
|
144
|
+
ɵdefaultContent(host, (document) => {
|
|
145
|
+
const mask = document.createElementNS(SVG, "path");
|
|
146
|
+
bindMiniMapMask(mask, this.view);
|
|
147
|
+
const rects = /* @__PURE__ */ new Map();
|
|
148
|
+
effect(() => {
|
|
149
|
+
const nodes = this.view().nodes;
|
|
150
|
+
this.context.revision();
|
|
151
|
+
const engine = this.context.engine();
|
|
152
|
+
untracked(() => {
|
|
153
|
+
const ids = new Set(nodes.map((node) => node.nodeId));
|
|
154
|
+
for (const [id, { rect }] of rects) {
|
|
155
|
+
if (ids.has(id)) continue;
|
|
156
|
+
rect.remove();
|
|
157
|
+
rects.delete(id);
|
|
158
|
+
}
|
|
159
|
+
for (const node of nodes) {
|
|
160
|
+
let entry = rects.get(node.nodeId);
|
|
161
|
+
if (!entry) {
|
|
162
|
+
entry = {
|
|
163
|
+
rect: document.createElementNS(SVG, "rect"),
|
|
164
|
+
names: /* @__PURE__ */ new Set()
|
|
165
|
+
};
|
|
166
|
+
rects.set(node.nodeId, entry);
|
|
167
|
+
}
|
|
168
|
+
const next = {
|
|
169
|
+
...engine ? engine.adapter.attributes("minimap-node", { nodeId: node.nodeId }) : partAttributes("minimap-node", node.nodeId),
|
|
170
|
+
x: String(node.x),
|
|
171
|
+
y: String(node.y),
|
|
172
|
+
width: String(node.width),
|
|
173
|
+
height: String(node.height)
|
|
174
|
+
};
|
|
175
|
+
for (const name of entry.names) if (next[name] === void 0) {
|
|
176
|
+
entry.rect.removeAttribute(name);
|
|
177
|
+
entry.names.delete(name);
|
|
178
|
+
}
|
|
179
|
+
for (const [name, value] of Object.entries(next)) {
|
|
180
|
+
if (value === void 0) continue;
|
|
181
|
+
entry.rect.setAttribute(name, value);
|
|
182
|
+
entry.names.add(name);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
let next = mask;
|
|
186
|
+
for (let i = nodes.length - 1; i >= 0; i--) {
|
|
187
|
+
const rect = rects.get(nodes[i]?.nodeId ?? "")?.rect;
|
|
188
|
+
if (!rect) continue;
|
|
189
|
+
if (rect.nextSibling !== next) next.before(rect);
|
|
190
|
+
next = rect;
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
ɵonDestroy(() => {
|
|
195
|
+
for (const { rect } of rects.values()) rect.remove();
|
|
196
|
+
});
|
|
197
|
+
return [mask];
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
static {
|
|
201
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
202
|
+
minVersion: "12.0.0",
|
|
203
|
+
version: "22.2.5",
|
|
204
|
+
ngImport: i0,
|
|
205
|
+
type: FlowMiniMapDirective,
|
|
206
|
+
deps: [],
|
|
207
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
static {
|
|
211
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
212
|
+
minVersion: "17.1.0",
|
|
213
|
+
version: "22.2.5",
|
|
214
|
+
type: FlowMiniMapDirective,
|
|
215
|
+
isStandalone: true,
|
|
216
|
+
selector: "[flowMiniMap]",
|
|
217
|
+
inputs: {
|
|
218
|
+
width: {
|
|
219
|
+
classPropertyName: "width",
|
|
220
|
+
publicName: "width",
|
|
221
|
+
isSignal: true,
|
|
222
|
+
isRequired: false,
|
|
223
|
+
transformFunction: null
|
|
224
|
+
},
|
|
225
|
+
height: {
|
|
226
|
+
classPropertyName: "height",
|
|
227
|
+
publicName: "height",
|
|
228
|
+
isSignal: true,
|
|
229
|
+
isRequired: false,
|
|
230
|
+
transformFunction: null
|
|
231
|
+
},
|
|
232
|
+
inversePan: {
|
|
233
|
+
classPropertyName: "inversePan",
|
|
234
|
+
publicName: "inversePan",
|
|
235
|
+
isSignal: true,
|
|
236
|
+
isRequired: false,
|
|
237
|
+
transformFunction: null
|
|
238
|
+
},
|
|
239
|
+
zoomStep: {
|
|
240
|
+
classPropertyName: "zoomStep",
|
|
241
|
+
publicName: "zoomStep",
|
|
242
|
+
isSignal: true,
|
|
243
|
+
isRequired: false,
|
|
244
|
+
transformFunction: null
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
outputs: { minimapClick: "minimapClick" },
|
|
248
|
+
providers: [{
|
|
249
|
+
provide: FLOW_MINIMAP_VIEW,
|
|
250
|
+
useFactory: () => inject(FlowMiniMapDirective).view
|
|
251
|
+
}],
|
|
252
|
+
exportAs: ["flowMiniMap"],
|
|
253
|
+
ngImport: i0
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
258
|
+
minVersion: "12.0.0",
|
|
259
|
+
version: "22.2.5",
|
|
260
|
+
ngImport: i0,
|
|
261
|
+
type: FlowMiniMapDirective,
|
|
262
|
+
decorators: [{
|
|
263
|
+
type: Directive,
|
|
264
|
+
args: [{
|
|
265
|
+
selector: "[flowMiniMap]",
|
|
266
|
+
exportAs: "flowMiniMap",
|
|
267
|
+
providers: [{
|
|
268
|
+
provide: FLOW_MINIMAP_VIEW,
|
|
269
|
+
useFactory: () => inject(FlowMiniMapDirective).view
|
|
270
|
+
}]
|
|
271
|
+
}]
|
|
272
|
+
}],
|
|
273
|
+
ctorParameters: () => [],
|
|
274
|
+
propDecorators: {
|
|
275
|
+
width: [{
|
|
276
|
+
type: i0.Input,
|
|
277
|
+
args: [{
|
|
278
|
+
isSignal: true,
|
|
279
|
+
alias: "width",
|
|
280
|
+
required: false
|
|
281
|
+
}]
|
|
282
|
+
}],
|
|
283
|
+
height: [{
|
|
284
|
+
type: i0.Input,
|
|
285
|
+
args: [{
|
|
286
|
+
isSignal: true,
|
|
287
|
+
alias: "height",
|
|
288
|
+
required: false
|
|
289
|
+
}]
|
|
290
|
+
}],
|
|
291
|
+
inversePan: [{
|
|
292
|
+
type: i0.Input,
|
|
293
|
+
args: [{
|
|
294
|
+
isSignal: true,
|
|
295
|
+
alias: "inversePan",
|
|
296
|
+
required: false
|
|
297
|
+
}]
|
|
298
|
+
}],
|
|
299
|
+
zoomStep: [{
|
|
300
|
+
type: i0.Input,
|
|
301
|
+
args: [{
|
|
302
|
+
isSignal: true,
|
|
303
|
+
alias: "zoomStep",
|
|
304
|
+
required: false
|
|
305
|
+
}]
|
|
306
|
+
}],
|
|
307
|
+
minimapClick: [{
|
|
308
|
+
type: i0.Output,
|
|
309
|
+
args: ["minimapClick"]
|
|
310
|
+
}]
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
function bindMiniMapNode(context, element, view, nodeId) {
|
|
314
|
+
const attributes = ɵflowValue(context, () => {
|
|
315
|
+
const id = nodeId();
|
|
316
|
+
if (id === void 0) return void 0;
|
|
317
|
+
const engine = context.engine();
|
|
318
|
+
return engine ? engine.adapter.attributes("minimap-node", { nodeId: id }) : partAttributes("minimap-node", id);
|
|
319
|
+
}, void 0, { scope: "entity" });
|
|
320
|
+
const box = computed(() => {
|
|
321
|
+
const id = nodeId();
|
|
322
|
+
return view().nodes.find((node) => node.nodeId === id);
|
|
323
|
+
}, ...ngDevMode ? [{ debugName: "box" }] : /* istanbul ignore next */ []);
|
|
324
|
+
ɵbindAttributes(element, () => {
|
|
325
|
+
const shown = box();
|
|
326
|
+
return {
|
|
327
|
+
...attributes(),
|
|
328
|
+
x: shown === void 0 ? void 0 : String(shown.x),
|
|
329
|
+
y: shown === void 0 ? void 0 : String(shown.y),
|
|
330
|
+
width: shown === void 0 ? void 0 : String(shown.width),
|
|
331
|
+
height: shown === void 0 ? void 0 : String(shown.height)
|
|
332
|
+
};
|
|
333
|
+
});
|
|
334
|
+
ɵbindPresence(element, () => box() ? "here" : null);
|
|
335
|
+
return computed(() => {
|
|
336
|
+
const id = nodeId();
|
|
337
|
+
const own = attributes();
|
|
338
|
+
if (id === void 0 || !own) return void 0;
|
|
339
|
+
return {
|
|
340
|
+
nodeId: id,
|
|
341
|
+
selected: own["data-selected"] !== void 0
|
|
342
|
+
};
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
var FlowMiniMapNodeDirective = class FlowMiniMapNodeDirective {
|
|
346
|
+
constructor() {
|
|
347
|
+
this.nodeId = input.required(...ngDevMode ? [{ debugName: "nodeId" }] : /* istanbul ignore next */ []);
|
|
348
|
+
this.state = bindMiniMapNode(ɵinjectFlowContext("[flowMiniMapNode]"), ɵinjectHost(), injectMiniMapView("[flowMiniMapNode]"), () => ɵbeforeInputs(void 0, this.nodeId));
|
|
349
|
+
}
|
|
350
|
+
static {
|
|
351
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
352
|
+
minVersion: "12.0.0",
|
|
353
|
+
version: "22.2.5",
|
|
354
|
+
ngImport: i0,
|
|
355
|
+
type: FlowMiniMapNodeDirective,
|
|
356
|
+
deps: [],
|
|
357
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
static {
|
|
361
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
362
|
+
minVersion: "17.1.0",
|
|
363
|
+
version: "22.2.5",
|
|
364
|
+
type: FlowMiniMapNodeDirective,
|
|
365
|
+
isStandalone: true,
|
|
366
|
+
selector: "[flowMiniMapNode]",
|
|
367
|
+
inputs: { nodeId: {
|
|
368
|
+
classPropertyName: "nodeId",
|
|
369
|
+
publicName: "nodeId",
|
|
370
|
+
isSignal: true,
|
|
371
|
+
isRequired: true,
|
|
372
|
+
transformFunction: null
|
|
373
|
+
} },
|
|
374
|
+
exportAs: ["flowMiniMapNode"],
|
|
375
|
+
ngImport: i0
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
380
|
+
minVersion: "12.0.0",
|
|
381
|
+
version: "22.2.5",
|
|
382
|
+
ngImport: i0,
|
|
383
|
+
type: FlowMiniMapNodeDirective,
|
|
384
|
+
decorators: [{
|
|
385
|
+
type: Directive,
|
|
386
|
+
args: [{
|
|
387
|
+
selector: "[flowMiniMapNode]",
|
|
388
|
+
exportAs: "flowMiniMapNode"
|
|
389
|
+
}]
|
|
390
|
+
}],
|
|
391
|
+
ctorParameters: () => [],
|
|
392
|
+
propDecorators: { nodeId: [{
|
|
393
|
+
type: i0.Input,
|
|
394
|
+
args: [{
|
|
395
|
+
isSignal: true,
|
|
396
|
+
alias: "nodeId",
|
|
397
|
+
required: true
|
|
398
|
+
}]
|
|
399
|
+
}] }
|
|
400
|
+
});
|
|
401
|
+
const FLOW_MINIMAP = [
|
|
402
|
+
FlowMiniMapDirective,
|
|
403
|
+
FlowMiniMapNodeDirective,
|
|
404
|
+
FlowMiniMapMaskDirective
|
|
405
|
+
];
|
|
406
|
+
export { FLOW_MINIMAP, FlowMiniMapDirective, FlowMiniMapMaskDirective, FlowMiniMapNodeDirective };
|
|
407
|
+
|
|
408
|
+
//# sourceMappingURL=fragiola-flow-angular-minimap.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fragiola-flow-angular-minimap.mjs","names":["injectHost","optionalNumber","optionalBoolean","injectFlowContext","flowValue","injectHost","px","flowValue","injectFlowContext","injectHost","beforeInputs"],"sources":["../../src/minimap/mini-map-context.ts","../../src/minimap/mini-map-mask.directive.ts","../../src/minimap/mini-map.directive.ts","../../src/minimap/mini-map-node.directive.ts","../../src/minimap/index.ts"],"sourcesContent":["import { InjectionToken, inject, type Signal } from \"@angular/core\";\nimport type { MinimapView } from \"@fragiola/flow\";\n\n/** The view of the enclosing `[flowMiniMap]`, for its nodes and its mask. */\nexport const FLOW_MINIMAP_VIEW = new InjectionToken<Signal<MinimapView>>(\n \"FlowMiniMapView\",\n);\n\nexport function injectMiniMapView(part: string): Signal<MinimapView> {\n const view = inject(FLOW_MINIMAP_VIEW, { optional: true });\n if (!view) throw new Error(`${part} must be used inside [flowMiniMap]`);\n return view;\n}\n","import { computed, Directive, type Signal } from \"@angular/core\";\nimport { type MinimapView, partAttributes } from \"@fragiola/flow\";\nimport {\n ɵbindAttributes as bindAttributes,\n ɵbindBaseAttributes as bindBaseAttributes,\n ɵinjectHost as injectHost,\n} from \"@fragiola/flow-angular\";\nimport { injectMiniMapView } from \"./mini-map-context\";\n\n/** The state of `[flowMiniMapMask]`: the root's view, in flow coordinates. */\nexport interface MiniMapMaskState {\n readonly view: { x: number; y: number; width: number; height: number };\n}\n\nconst ATTRIBUTES = partAttributes(\"minimap-mask\");\n\n/** @internal binds a minimap's mask onto `element` */\nexport function bindMiniMapMask(\n element: Element,\n view: Signal<MinimapView>,\n): void {\n bindAttributes(element, () => ATTRIBUTES);\n // the app's own `fill-rule` (or `d`) wins\n bindBaseAttributes(element, () => ({\n d: view().maskPath,\n \"fill-rule\": \"evenodd\",\n }));\n}\n\n/**\n * The minimap's mask (`data-flow-part=\"minimap-mask\"`), on the app's SVG path inside\n * `[flowMiniMap]`: `<svg:path flowMiniMapMask />`, covering the map but what the root shows\n * (`fill-rule=\"evenodd\"`). Give it its fill.\n */\n@Directive({ selector: \"[flowMiniMapMask]\", exportAs: \"flowMiniMapMask\" })\nexport class FlowMiniMapMaskDirective {\n private readonly view = injectMiniMapView(\"[flowMiniMapMask]\");\n\n /** the mask's state */\n readonly state: Signal<MiniMapMaskState> = computed(() => ({\n view: this.view().view,\n }));\n\n constructor() {\n bindMiniMapMask(injectHost<SVGElement>(), this.view);\n }\n}\n","import {\n computed,\n Directive,\n effect,\n inject,\n input,\n output,\n type Signal,\n untracked,\n} from \"@angular/core\";\nimport {\n type FlowEngineEventOf,\n type MinimapView,\n partAttributes,\n} from \"@fragiola/flow\";\nimport {\n ɵbindAttributes as bindAttributes,\n ɵbindStructuralStyle as bindStructuralStyle,\n ɵdefaultContent as defaultContent,\n ɵflowValue as flowValue,\n ɵinjectFlowContext as injectFlowContext,\n ɵinjectHost as injectHost,\n ɵonDestroy as onDestroy,\n ɵoptionalBoolean as optionalBoolean,\n ɵoptionalNumber as optionalNumber,\n ɵpx as px,\n} from \"@fragiola/flow-angular\";\nimport { FLOW_MINIMAP_VIEW } from \"./mini-map-context\";\nimport { bindMiniMapMask } from \"./mini-map-mask.directive\";\n\nexport interface MiniMapState {\n /** what it draws: the nodes, the view and the mask, in flow coordinates */\n readonly view: MinimapView;\n}\n\nconst SVG = \"http://www.w3.org/2000/svg\";\n\nconst EMPTY_VIEW: MinimapView = Object.freeze({\n viewBox: Object.freeze({ x: 0, y: 0, width: 0, height: 0 }),\n viewBoxAttribute: \"0 0 0 0\",\n scale: 1,\n nodes: Object.freeze([]),\n view: Object.freeze({ x: 0, y: 0, width: 0, height: 0 }),\n maskPath: \"\",\n});\n\n/** Two minimap views that draw the same. */\nfunction sameView(a: MinimapView, b: MinimapView): boolean {\n return (\n a === b ||\n (a.viewBoxAttribute === b.viewBoxAttribute &&\n a.maskPath === b.maskPath &&\n a.nodes.length === b.nodes.length &&\n a.nodes.every((node, i) => {\n const other = b.nodes[i];\n return (\n other !== undefined &&\n node.nodeId === other.nodeId &&\n node.x === other.x &&\n node.y === other.y &&\n node.width === other.width &&\n node.height === other.height\n );\n }))\n );\n}\n\n/**\n * A small map of the flow (`data-flow-part=\"minimap\"`, `minimap()`), on the app's\n * `<svg flowMiniMap>` inside `[flowRoot]`, outside `[flowViewport]`: `width` × `height` pixels\n * showing every node and what the root shows. With `minimap()`'s options, a drag on it pans and\n * its wheel zooms the flow. It draws what the app writes inside it in flow coordinates\n * (`[flowMiniMapNode]`s over `#map=\"flowMiniMap\"`'s `map.state().view.nodes`, a\n * `[flowMiniMapMask]`), or, when the app writes no element, a node per node and the mask. Place\n * it with your style.\n */\n@Directive({\n selector: \"[flowMiniMap]\",\n exportAs: \"flowMiniMap\",\n providers: [\n {\n provide: FLOW_MINIMAP_VIEW,\n useFactory: (): Signal<MinimapView> =>\n inject(FlowMiniMapDirective).view,\n },\n ],\n})\nexport class FlowMiniMapDirective {\n /** its width, in pixels; default 200 */\n readonly width = input(200, {\n transform: (value: unknown) => optionalNumber(value) ?? 200,\n });\n /** its height, in pixels; default 150 */\n readonly height = input(150, {\n transform: (value: unknown) => optionalNumber(value) ?? 150,\n });\n /**\n * a drag on it moves the view the other way (as grabbing the flow), and a press does not\n * centre the view; default `minimap()`'s `inversePan`\n */\n readonly inversePan = input(undefined, { transform: optionalBoolean });\n /** how fast its wheel zooms: 10 is the flow's own wheel, 20 twice as fast; default `minimap()`'s `zoomStep` */\n readonly zoomStep = input(undefined, { transform: optionalNumber });\n /**\n * a tap on it (the engine's `minimap-click`: `point`, the flow point under the pointer on the\n * minimap, `client` and the DOM `event`): center the view there, add a node there. The root\n * captures the pointer, so a DOM `(click)` never follows a press on it\n */\n readonly minimapClick = output<FlowEngineEventOf<\"minimap-click\">>();\n\n private readonly context = injectFlowContext(\"[flowMiniMap]\");\n\n /** @internal what its nodes and its mask read */\n readonly view: Signal<MinimapView> = flowValue(\n this.context,\n () =>\n this.context.engine()?.get(\"minimap-view\", {\n width: this.width(),\n height: this.height(),\n }) ?? EMPTY_VIEW,\n sameView,\n );\n\n /** what it draws (`#map=\"flowMiniMap\"`, then `map.state().view.nodes`) */\n readonly state: Signal<MiniMapState> = computed(() => ({\n view: this.view(),\n }));\n\n constructor() {\n const host = injectHost<SVGSVGElement>();\n const attributes = flowValue(this.context, () => {\n const engine = this.context.engine();\n return engine\n ? engine.adapter.attributes(\"minimap\")\n : partAttributes(\"minimap\");\n });\n bindAttributes(host, () => ({\n ...attributes(),\n viewBox: this.view().viewBoxAttribute,\n width: String(this.width()),\n height: String(this.height()),\n }));\n bindStructuralStyle(host, () => ({\n width: px(this.width()),\n height: px(this.height()),\n }));\n // its options over `minimap()`'s, one set for the root's minimaps (the engine's part options)\n effect((onCleanup) => {\n const engine = this.context.engine();\n if (!engine) return;\n const options = Object.fromEntries(\n Object.entries({\n inversePan: this.inversePan(),\n zoomStep: this.zoomStep(),\n }).filter(([, value]) => value !== undefined),\n );\n untracked(() =>\n engine.adapter.setPartOptions(\"minimap\", \"\", options),\n );\n onCleanup(() => engine.adapter.setPartOptions(\"minimap\", \"\", null));\n });\n // its taps (`minimap-click` on its own element: the root may draw several minimaps)\n effect((onCleanup) => {\n const engine = this.context.engine();\n if (!engine) return;\n const stop = untracked(() =>\n engine.subscribe((event) => {\n if (\n event.type === \"minimap-click\" &&\n event.element === host\n ) {\n this.minimapClick.emit(event);\n }\n }),\n );\n onCleanup(stop);\n });\n // React's default children: a node per node, then the mask\n defaultContent(host, (document) => {\n const mask = document.createElementNS(SVG, \"path\");\n bindMiniMapMask(mask, this.view);\n const rects = new Map<\n string,\n { rect: SVGRectElement; names: Set<string> }\n >();\n effect(() => {\n const nodes = this.view().nodes;\n this.context.revision();\n const engine = this.context.engine();\n untracked(() => {\n const ids = new Set(nodes.map((node) => node.nodeId));\n for (const [id, { rect }] of rects) {\n if (ids.has(id)) continue;\n rect.remove();\n rects.delete(id);\n }\n for (const node of nodes) {\n let entry = rects.get(node.nodeId);\n if (!entry) {\n entry = {\n rect: document.createElementNS(SVG, \"rect\"),\n names: new Set(),\n };\n rects.set(node.nodeId, entry);\n }\n const next: Record<string, string | undefined> = {\n ...(engine\n ? engine.adapter.attributes(\"minimap-node\", {\n nodeId: node.nodeId,\n })\n : partAttributes(\"minimap-node\", node.nodeId)),\n x: String(node.x),\n y: String(node.y),\n width: String(node.width),\n height: String(node.height),\n };\n for (const name of entry.names) {\n if (next[name] === undefined) {\n entry.rect.removeAttribute(name);\n entry.names.delete(name);\n }\n }\n for (const [name, value] of Object.entries(next)) {\n if (value === undefined) continue;\n entry.rect.setAttribute(name, value);\n entry.names.add(name);\n }\n }\n // in the view's order, before the mask: only a rect out of place moves\n let next: Element = mask;\n for (let i = nodes.length - 1; i >= 0; i--) {\n const rect = rects.get(nodes[i]?.nodeId ?? \"\")?.rect;\n if (!rect) continue;\n if (rect.nextSibling !== next) next.before(rect);\n next = rect;\n }\n });\n });\n onDestroy(() => {\n for (const { rect } of rects.values()) rect.remove();\n });\n return [mask];\n });\n }\n}\n","import { computed, Directive, input, type Signal } from \"@angular/core\";\nimport { type MinimapView, partAttributes } from \"@fragiola/flow\";\nimport {\n ɵbeforeInputs as beforeInputs,\n ɵbindAttributes as bindAttributes,\n ɵbindPresence as bindPresence,\n type ɵFlowContext as FlowContext,\n ɵflowValue as flowValue,\n ɵinjectFlowContext as injectFlowContext,\n ɵinjectHost as injectHost,\n} from \"@fragiola/flow-angular\";\nimport { injectMiniMapView } from \"./mini-map-context\";\n\nexport interface MiniMapNodeState {\n readonly nodeId: string;\n /** `data-selected` (`selection()`) */\n readonly selected: boolean;\n}\n\n/** @internal binds a node's box onto `element`, out of the document while the node is not shown */\nexport function bindMiniMapNode(\n context: FlowContext,\n element: Element,\n view: Signal<MinimapView>,\n nodeId: () => string | undefined,\n): Signal<MiniMapNodeState | undefined> {\n const attributes = flowValue(\n context,\n () => {\n const id = nodeId();\n if (id === undefined) return undefined;\n const engine = context.engine();\n return engine\n ? engine.adapter.attributes(\"minimap-node\", { nodeId: id })\n : partAttributes(\"minimap-node\", id);\n },\n undefined,\n { scope: \"entity\" },\n );\n const box = computed(() => {\n const id = nodeId();\n return view().nodes.find((node) => node.nodeId === id);\n });\n bindAttributes(element, () => {\n const shown = box();\n return {\n ...attributes(),\n x: shown === undefined ? undefined : String(shown.x),\n y: shown === undefined ? undefined : String(shown.y),\n width: shown === undefined ? undefined : String(shown.width),\n height: shown === undefined ? undefined : String(shown.height),\n };\n });\n bindPresence(element, () => (box() ? \"here\" : null));\n return computed(() => {\n const id = nodeId();\n const own = attributes();\n if (id === undefined || !own) return undefined;\n return { nodeId: id, selected: own[\"data-selected\"] !== undefined };\n });\n}\n\n/**\n * A node in the minimap (`data-flow-part=\"minimap-node\"`, `data-flow-id`), on the app's SVG rect\n * inside `[flowMiniMap]`: `<svg:rect flowMiniMapNode [nodeId]=\"id\" />`, the node's box in flow\n * coordinates. Out of the document while the node is not shown.\n */\n@Directive({ selector: \"[flowMiniMapNode]\", exportAs: \"flowMiniMapNode\" })\nexport class FlowMiniMapNodeDirective {\n /** the node it stands for */\n readonly nodeId = input.required<string>();\n\n /** the node's state in the map */\n readonly state: Signal<MiniMapNodeState | undefined>;\n\n constructor() {\n this.state = bindMiniMapNode(\n injectFlowContext(\"[flowMiniMapNode]\"),\n injectHost<SVGElement>(),\n injectMiniMapView(\"[flowMiniMapNode]\"),\n () => beforeInputs(undefined, this.nodeId),\n );\n }\n}\n","// The entry of @fragiola/flow-angular/minimap: the core's minimap feature (`minimap()`) and what\n// draws it: `[flowMiniMap]`, `[flowMiniMapNode]`, `[flowMiniMapMask]` (`FLOW_MINIMAP`). A flow\n// that never imports it does not ship them.\nimport { FlowMiniMapDirective } from \"./mini-map.directive\";\nimport { FlowMiniMapMaskDirective } from \"./mini-map-mask.directive\";\nimport { FlowMiniMapNodeDirective } from \"./mini-map-node.directive\";\n\nexport * from \"@fragiola/flow/minimap\";\nexport { FlowMiniMapDirective, type MiniMapState } from \"./mini-map.directive\";\nexport {\n FlowMiniMapMaskDirective,\n type MiniMapMaskState,\n} from \"./mini-map-mask.directive\";\nexport {\n FlowMiniMapNodeDirective,\n type MiniMapNodeState,\n} from \"./mini-map-node.directive\";\n\n/** The minimap's directives, for a standalone component's `imports`. */\nexport const FLOW_MINIMAP = [\n FlowMiniMapDirective,\n FlowMiniMapNodeDirective,\n FlowMiniMapMaskDirective,\n] as const;\n"],"mappings":";;;;;AAIA,MAAa,oBAAoB,IAAI,eACjC,iBAAiB;AAGrB,SAAgB,kBAAkB,MAAY;CAC1C,MAAM,OAAO,OAAO,mBAAmB,EAAE,UAAU,KAAI,CAAE;CACzD,IAAI,CAAC,MAAM,MAAM,IAAI,MAAM,GAAG,KAAI,mCAAoC;CACtE,OAAO;AACX;ACEA,MAAM,aAAa,eAAe,cAAc;AAGhD,SAAgB,gBACZ,SACA,MAAyB;CAEzB,gBAAe,eAAe,UAAU;CAExC,oBAAmB,gBAAgB;EAC/B,GAAG,KAAI,CAAE,CAAC;EACV,aAAa;CAChB,EAAC;AACN;AAQA,IAAa,2BAAb,MAAa,yBAAwB;CAQjC,cAAA;EAPiB,KAAA,OAAO,kBAAkB,mBAAmB;EAGpD,KAAA,QAAkC,gBAAgB,EACvD,MAAM,KAAK,KAAI,CAAE,CAAC,KACrB,IAAE,GAAA,YAAA,CAAA,EAAA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