@septkit/ui 0.0.58 → 0.0.60

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.
Files changed (22) hide show
  1. package/dist/diagram-layout/group-stack.js +13 -0
  2. package/dist/diagram-layout/grouping.js +33 -0
  3. package/dist/diagram-layout/index.js +6 -2
  4. package/dist/diagram-layout/use-diagram-layout.js +319 -0
  5. package/dist/diagram-layout/visibility-model.js +56 -0
  6. package/dist/dialecte/create-document-store.js +3 -3
  7. package/dist/external/.pnpm/{@dialecte_core@0.4.12 → @dialecte_core@0.4.16}/node_modules/@dialecte/core/dist/helpers.js +41 -41
  8. package/dist/external/.pnpm/@dialecte_core@0.4.16/node_modules/@dialecte/core/dist/index.js +3 -0
  9. package/dist/external/.pnpm/{@dialecte_core@0.4.12/node_modules/@dialecte/core/dist/project-DkMkDgld.js → @dialecte_core@0.4.16/node_modules/@dialecte/core/dist/project-nvZv2ie8.js} +797 -745
  10. package/dist/external/.pnpm/{@dialecte_core@0.4.12/node_modules/@dialecte/core/dist/utils-C5_11hqg.js → @dialecte_core@0.4.16/node_modules/@dialecte/core/dist/utils-BiEx1x59.js} +2 -2
  11. package/dist/external/.pnpm/{@dialecte_scl@0.3.15/node_modules/@dialecte/scl/dist/hooks-CLIa7kxj.js → @dialecte_scl@0.3.17/node_modules/@dialecte/scl/dist/hooks-BBGXNK0x.js} +31 -19
  12. package/dist/external/.pnpm/{@dialecte_scl@0.3.15 → @dialecte_scl@0.3.17}/node_modules/@dialecte/scl/dist/v2019C1/index.js +3 -3
  13. package/dist/index.d.ts +200 -2
  14. package/dist/index.js +6 -2
  15. package/dist/merge/build-view-model.js +17 -17
  16. package/dist/merge/merge-preflight.vue_vue_type_script_setup_true_lang.js +1 -1
  17. package/dist/merge/merge.service.js +16 -20
  18. package/dist/merge/use-merge-session.js +101 -121
  19. package/dist/ui.css +1 -1
  20. package/package.json +3 -3
  21. package/dist/external/.pnpm/@dialecte_core@0.4.12/node_modules/@dialecte/core/dist/index.js +0 -3
  22. package/dist/merge/merge-correlate.js +0 -46
@@ -1,63 +1,62 @@
1
1
  import { collectTemplateUuidWarnings as e, commitMerge as t, findScopeRoot as n, getAttributes as r, getPresentationScope as i, previewApply as a, reportLifecycle as o, snapshotTree as s, snapshotXml as c } from "./merge.service.js";
2
2
  import { allGroups as l, buildChangeIndex as u, buildStructuralTree as d } from "./build-view-model.js";
3
- import { correlate as f } from "./merge-correlate.js";
4
- import { reactive as p, shallowRef as m } from "vue";
3
+ import { reactive as f, shallowRef as p } from "vue";
5
4
  //#region lib/merge/use-merge-session.ts
6
- function h(h) {
7
- let g = m(), _ = p(/* @__PURE__ */ new Map()), v = m("target"), y = m(), b = m({
5
+ function m(m) {
6
+ let h = p(), g = f(/* @__PURE__ */ new Map()), _ = p("target"), v = p(), y = p({
8
7
  items: [],
9
8
  meta: {},
10
9
  index: {},
11
10
  expanded: []
12
- }), x = m(), S = m(), C = m(!1), w = m([]);
13
- function T() {
11
+ }), b = p(), x = p(), S = p(!1), C = p([]);
12
+ function w() {
14
13
  return {
15
- verb: h.verb,
16
- scenario: h.scenario,
17
- sourceQuery: h.sourceQuery,
18
- ref: h.sourceRef,
19
- anchor: h.anchor
14
+ verb: m.verb,
15
+ scenario: m.scenario,
16
+ sourceQuery: m.sourceQuery,
17
+ ref: m.sourceRef,
18
+ anchor: m.anchor
20
19
  };
21
20
  }
22
- function E(e) {
21
+ function T(e) {
23
22
  return e === void 0 ? "accept" : typeof e == "string" ? e : e.action;
24
23
  }
25
- function D(e) {
24
+ function E(e) {
26
25
  return typeof e == "object" ? e.values : void 0;
27
26
  }
28
- async function O() {
29
- let t = await o(h.targetDocument, T());
30
- g.value = t, w.value = await e([h.sourceQuery, h.targetDocument.query]);
31
- for (let e of l(t)) e.suggestedAction && e.suggestedAction !== "accept" && _.set(e.id, e.suggestedAction);
32
- await z();
27
+ async function D() {
28
+ let t = await o(m.targetDocument, w());
29
+ h.value = t, C.value = await e([m.sourceQuery, m.targetDocument.query]);
30
+ for (let e of l(t)) e.suggestedAction && e.suggestedAction !== "accept" && g.set(e.id, e.suggestedAction);
31
+ await R();
33
32
  }
34
- function k(e, t) {
35
- let n = D(_.get(e));
36
- _.set(e, n ? {
33
+ function O(e, t) {
34
+ let n = E(g.get(e));
35
+ g.set(e, n ? {
37
36
  action: t,
38
37
  values: n
39
- } : t), R();
38
+ } : t), L();
40
39
  }
41
- function A(e, t, n) {
42
- let r = _.get(e), i = {
43
- ...D(r),
40
+ function k(e, t, n) {
41
+ let r = g.get(e), i = {
42
+ ...E(r),
44
43
  [t]: n
45
44
  };
46
- _.set(e, {
47
- action: E(r),
45
+ g.set(e, {
46
+ action: T(r),
48
47
  values: i
49
- }), R();
48
+ }), L();
50
49
  }
51
- function j(e) {
52
- return E(_.get(e));
50
+ function A(e) {
51
+ return T(g.get(e));
53
52
  }
54
- function M(e, t) {
55
- return D(_.get(e))?.[t];
53
+ function j(e, t) {
54
+ return E(g.get(e))?.[t];
56
55
  }
57
- function N() {
56
+ function M() {
58
57
  let e = /* @__PURE__ */ new Map();
59
- for (let [t, n] of _) {
60
- let r = D(n);
58
+ for (let [t, n] of g) {
59
+ let r = E(n);
61
60
  r && e.set(t, {
62
61
  action: "accept",
63
62
  values: r
@@ -65,58 +64,39 @@ function h(h) {
65
64
  }
66
65
  return e;
67
66
  }
68
- function P(e) {
69
- y.value = e, V();
70
- }
71
- let F, I, L = 0;
72
- function R() {
73
- I && clearTimeout(I), I = setTimeout(() => void z(), 150);
74
- }
75
- async function z() {
76
- if (!g.value) return;
77
- let e = ++L;
78
- C.value = !0;
79
- let t = N(), { prepared: o, applied: c } = await a({
80
- doc: h.targetDocument,
81
- target: T(),
82
- report: g.value,
67
+ function N(e) {
68
+ v.value = e, B();
69
+ }
70
+ let P, F, I = 0;
71
+ function L() {
72
+ F && clearTimeout(F), F = setTimeout(() => void R(), 150);
73
+ }
74
+ async function R() {
75
+ if (!h.value) return;
76
+ let e = ++I;
77
+ S.value = !0;
78
+ let t = M(), { prepared: r } = await a({
79
+ doc: m.targetDocument,
80
+ target: w(),
81
+ report: h.value,
83
82
  decisions: t,
84
- keepNameTypesFrom: v.value,
85
- afterApply: h.afterApply
83
+ keepNameTypesFrom: _.value,
84
+ afterApply: m.afterApply
86
85
  });
87
- if (e !== L) {
88
- o.discard();
86
+ if (e !== I) {
87
+ r.discard();
89
88
  return;
90
89
  }
91
- F?.discard(), F = o;
92
- let p = i(h.verb), m = await n(F.query, h.anchor, p.rootTag), _ = await s(F.query, m), x = c.verb === "fsd" ? c.functions : [...c.applications, ...c.functions], S = /* @__PURE__ */ new Map();
93
- for (let e of l(g.value)) for (let t of e.companions) {
94
- if (t.instanceRef?.id || !t.sourceRef) continue;
95
- let { name: e } = await r(h.sourceQuery, t.sourceRef);
96
- if (!e) continue;
97
- let [n] = await F.query.any.findByAttributes({
98
- tagName: t.tagName,
99
- attributes: { name: e }
100
- });
101
- n && S.set(t, n.id);
102
- }
103
- let w = f({
104
- report: g.value,
105
- snapshot: _,
106
- appliedRoots: x,
107
- companionAnchors: S
108
- }), E = u({
109
- report: g.value,
110
- correlation: w
111
- });
112
- b.value = await d({
113
- tree: _,
114
- changeByStagedId: E,
115
- query: F.query,
116
- instances: g.value.instances
117
- }), y.value &&= B(y.value, b.value), C.value = !1, await V();
118
- }
119
- function B(e, t) {
90
+ P?.discard(), P = r;
91
+ let o = i(m.verb), c = await n(P.query, m.anchor, o.rootTag), l = await s(P.query, c), f = u({ report: h.value });
92
+ y.value = await d({
93
+ tree: l,
94
+ changeByStagedId: f,
95
+ query: P.query,
96
+ instances: h.value.instances
97
+ }), v.value &&= z(v.value, y.value), S.value = !1, await B();
98
+ }
99
+ function z(e, t) {
120
100
  let n = Object.values(t.index);
121
101
  if (e.node) {
122
102
  let t = n.find((t) => t.node === e.node);
@@ -128,57 +108,57 @@ function h(h) {
128
108
  }
129
109
  return (e.previewRef.id ? t.index[e.previewRef.id] : void 0) ?? e;
130
110
  }
131
- async function V() {
132
- let e = y.value;
133
- if (!e || !F) {
134
- x.value = void 0, S.value = void 0;
111
+ async function B() {
112
+ let e = v.value;
113
+ if (!e || !P) {
114
+ b.value = void 0, x.value = void 0;
135
115
  return;
136
116
  }
137
- let t = e.change === "target-only" && !!e.groupId && E(_.get(e.groupId)) === "accept";
138
- x.value = t ? "" : await c(F.query, e.previewRef), S.value = e.change === "added" ? "" : await U(e.previewRef);
117
+ let t = e.change === "target-only" && !!e.groupId && T(g.get(e.groupId)) === "accept";
118
+ b.value = t ? "" : await c(P.query, e.previewRef), x.value = e.change === "added" ? "" : await H(e.previewRef);
139
119
  }
140
- async function H(e) {
141
- return F ? r(F.query, e) : {};
120
+ async function V(e) {
121
+ return P ? r(P.query, e) : {};
142
122
  }
143
- async function U(e) {
123
+ async function H(e) {
144
124
  try {
145
- return await c(h.targetDocument.query, e);
125
+ return await c(m.targetDocument.query, e);
146
126
  } catch {
147
127
  return;
148
128
  }
149
129
  }
150
- async function W() {
151
- g.value && (F?.discard(), F = void 0, await t({
152
- doc: h.targetDocument,
153
- target: T(),
154
- report: g.value,
155
- decisions: new Map(_),
156
- keepNameTypesFrom: v.value,
157
- afterApply: h.afterApply
130
+ async function U() {
131
+ h.value && (P?.discard(), P = void 0, await t({
132
+ doc: m.targetDocument,
133
+ target: w(),
134
+ report: h.value,
135
+ decisions: new Map(g),
136
+ keepNameTypesFrom: _.value,
137
+ afterApply: m.afterApply
158
138
  }));
159
139
  }
160
- function G(e) {
161
- v.value = e, R();
140
+ function W(e) {
141
+ _.value = e, L();
162
142
  }
163
143
  return {
164
- report: g,
165
- decisions: _,
166
- keepNameTypesFrom: v,
167
- structuralTree: b,
168
- previewXml: x,
169
- previewBeforeXml: S,
170
- previewLoading: C,
171
- warnings: w,
172
- load: O,
173
- setDecision: k,
174
- setValue: A,
175
- decisionOf: j,
176
- editedValue: M,
177
- select: P,
178
- stagedAttributes: H,
179
- setKeepNameTypesFrom: G,
180
- commit: W
144
+ report: h,
145
+ decisions: g,
146
+ keepNameTypesFrom: _,
147
+ structuralTree: y,
148
+ previewXml: b,
149
+ previewBeforeXml: x,
150
+ previewLoading: S,
151
+ warnings: C,
152
+ load: D,
153
+ setDecision: O,
154
+ setValue: k,
155
+ decisionOf: A,
156
+ editedValue: j,
157
+ select: N,
158
+ stagedAttributes: V,
159
+ setKeepNameTypesFrom: W,
160
+ commit: U
181
161
  };
182
162
  }
183
163
  //#endregion
184
- export { h as useMergeSession };
164
+ export { m as useMergeSession };