@septkit/ui 0.0.46 → 0.0.47
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/external/.pnpm/{@dialecte_scl@0.3.5/node_modules/@dialecte/scl/dist/hooks-abaf9148.js → @dialecte_scl@0.3.7/node_modules/@dialecte/scl/dist/hooks-ByGralT8.js} +3 -6
- package/dist/external/.pnpm/{@dialecte_scl@0.3.5 → @dialecte_scl@0.3.7}/node_modules/@dialecte/scl/dist/v2019C1/index.js +1 -1
- package/dist/external/.pnpm/@lucide_vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/eye-off.js +22 -0
- package/dist/external/.pnpm/@lucide_vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/eye.js +13 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +4 -3
- package/dist/merge/index.js +4 -3
- package/dist/merge/merge-review.vue_vue_type_script_setup_true_lang.js +141 -127
- package/dist/merge/merge.service.js +14 -12
- package/dist/merge/type-name-authority.js +5 -0
- package/dist/merge/type-name-authority.vue_vue_type_script_setup_true_lang.js +46 -0
- package/dist/merge/use-merge-session.js +82 -63
- package/dist/ui.css +1 -1
- package/package.json +2 -2
|
@@ -1,36 +1,38 @@
|
|
|
1
|
-
import { i as e } from "../external/.pnpm/@dialecte_scl@0.3.
|
|
2
|
-
import "../external/.pnpm/@dialecte_scl@0.3.
|
|
1
|
+
import { i as e } from "../external/.pnpm/@dialecte_scl@0.3.7/node_modules/@dialecte/scl/dist/hooks-ByGralT8.js";
|
|
2
|
+
import "../external/.pnpm/@dialecte_scl@0.3.7/node_modules/@dialecte/scl/dist/v2019C1/index.js";
|
|
3
3
|
//#region lib/merge/merge.service.ts
|
|
4
4
|
async function t(e, t) {
|
|
5
5
|
return e.query.lifecycle.report(t);
|
|
6
6
|
}
|
|
7
|
-
async function n(e, t, n, r, i) {
|
|
7
|
+
async function n({ doc: e, target: t, report: n, decisions: r, keepNameTypesFrom: i, afterApply: a }) {
|
|
8
8
|
return e.prepare(async (e) => {
|
|
9
|
-
let
|
|
9
|
+
let o = await e.lifecycle.apply({
|
|
10
10
|
...t,
|
|
11
11
|
report: n,
|
|
12
|
-
decisions: r
|
|
12
|
+
decisions: r,
|
|
13
|
+
keepNameTypesFrom: i
|
|
13
14
|
});
|
|
14
|
-
await
|
|
15
|
+
await a?.(e, {
|
|
15
16
|
target: t,
|
|
16
17
|
report: n,
|
|
17
18
|
decisions: r,
|
|
18
|
-
result:
|
|
19
|
+
result: o
|
|
19
20
|
});
|
|
20
21
|
});
|
|
21
22
|
}
|
|
22
|
-
async function r(e, t, n, r, i) {
|
|
23
|
+
async function r({ doc: e, target: t, report: n, decisions: r, keepNameTypesFrom: i, afterApply: a }) {
|
|
23
24
|
await e.transaction(async (e) => {
|
|
24
|
-
let
|
|
25
|
+
let o = await e.lifecycle.apply({
|
|
25
26
|
...t,
|
|
26
27
|
report: n,
|
|
27
|
-
decisions: r
|
|
28
|
+
decisions: r,
|
|
29
|
+
keepNameTypesFrom: i
|
|
28
30
|
});
|
|
29
|
-
await
|
|
31
|
+
await a?.(e, {
|
|
30
32
|
target: t,
|
|
31
33
|
report: n,
|
|
32
34
|
decisions: r,
|
|
33
|
-
result:
|
|
35
|
+
result: o
|
|
34
36
|
});
|
|
35
37
|
});
|
|
36
38
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ELEMENT_TO_COLOR as e } from "../icons/element-color-map.generated.js";
|
|
2
|
+
import { ELEMENT_TO_ICON as t } from "../icons/element-icon-mapper.js";
|
|
3
|
+
import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, defineComponent as c, mergeModels as l, normalizeClass as u, openBlock as d, resolveDynamicComponent as f, unref as p, useModel as m } from "vue";
|
|
4
|
+
//#region lib/merge/type-name-authority.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var h = {
|
|
6
|
+
class: "flex items-center gap-1.5",
|
|
7
|
+
title: "Type de-duplication in the DataTypeTemplates section: when an incoming type is identical to an existing one but named differently, keep the name from this document"
|
|
8
|
+
}, g = {
|
|
9
|
+
class: "join",
|
|
10
|
+
role: "group",
|
|
11
|
+
"aria-label": "Keep type names from the target or the source document"
|
|
12
|
+
}, _ = ["disabled", "aria-pressed"], v = ["disabled", "aria-pressed"], y = /*@__PURE__*/ c({
|
|
13
|
+
__name: "type-name-authority",
|
|
14
|
+
props: /*@__PURE__*/ l({
|
|
15
|
+
size: {},
|
|
16
|
+
disabled: { type: Boolean },
|
|
17
|
+
hideLabel: { type: Boolean }
|
|
18
|
+
}, {
|
|
19
|
+
modelValue: { required: !0 },
|
|
20
|
+
modelModifiers: {}
|
|
21
|
+
}),
|
|
22
|
+
emits: ["update:modelValue"],
|
|
23
|
+
setup(c) {
|
|
24
|
+
let l = m(c, "modelValue"), y = c, b = t.DataTypeTemplates, x = e.DataTypeTemplates, S = r(() => ({
|
|
25
|
+
xs: "btn-xs",
|
|
26
|
+
sm: "btn-sm",
|
|
27
|
+
md: "btn-md",
|
|
28
|
+
undefined: "btn-xs"
|
|
29
|
+
})[y.size ?? "undefined"]);
|
|
30
|
+
return (e, t) => (d(), o("div", h, [c.hideLabel ? a("", !0) : (d(), o(n, { key: 0 }, [s("span", { class: u(["inline-flex items-center justify-center rounded-full p-1", [p(x).text, p(x).background]]) }, [(d(), i(f(p(b)), { class: "h-3.5 w-3.5" }))], 2), t[2] ||= s("span", { class: "text-base-content/60" }, "DataTypeTemplates - keep type names from:", -1)], 64)), s("div", g, [s("button", {
|
|
31
|
+
type: "button",
|
|
32
|
+
class: u(["btn join-item", [S.value, l.value === "target" ? "btn-primary" : "btn-ghost"]]),
|
|
33
|
+
disabled: c.disabled,
|
|
34
|
+
"aria-pressed": l.value === "target",
|
|
35
|
+
onClick: t[0] ||= (e) => l.value = "target"
|
|
36
|
+
}, " Target ", 10, _), s("button", {
|
|
37
|
+
type: "button",
|
|
38
|
+
class: u(["btn join-item", [S.value, l.value === "source" ? "btn-primary" : "btn-ghost"]]),
|
|
39
|
+
disabled: c.disabled,
|
|
40
|
+
"aria-pressed": l.value === "source",
|
|
41
|
+
onClick: t[1] ||= (e) => l.value = "source"
|
|
42
|
+
}, " Source ", 10, v)])]));
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
//#endregion
|
|
46
|
+
export { y as default };
|
|
@@ -3,13 +3,13 @@ import { buildChangeIndex as c, buildStructuralTree as l } from "./build-view-mo
|
|
|
3
3
|
import { reactive as u, shallowRef as d } from "vue";
|
|
4
4
|
//#region lib/merge/use-merge-session.ts
|
|
5
5
|
function f(f) {
|
|
6
|
-
let p = d(), m = u(/* @__PURE__ */ new Map()), h = d(), g = d({
|
|
6
|
+
let p = d(), m = u(/* @__PURE__ */ new Map()), h = d("target"), g = d(), _ = d({
|
|
7
7
|
items: [],
|
|
8
8
|
meta: {},
|
|
9
9
|
index: {},
|
|
10
10
|
expanded: []
|
|
11
|
-
}),
|
|
12
|
-
function
|
|
11
|
+
}), v = d(), y = d(), b = d(!1);
|
|
12
|
+
function x() {
|
|
13
13
|
return {
|
|
14
14
|
verb: f.verb,
|
|
15
15
|
scenario: f.scenario,
|
|
@@ -18,42 +18,42 @@ function f(f) {
|
|
|
18
18
|
anchor: f.anchor
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function S(e) {
|
|
22
22
|
return e === void 0 ? "accept" : typeof e == "string" ? e : e.action;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function C(e) {
|
|
25
25
|
return typeof e == "object" ? e.values : void 0;
|
|
26
26
|
}
|
|
27
|
-
async function
|
|
28
|
-
p.value = await a(f.targetDocument,
|
|
27
|
+
async function w() {
|
|
28
|
+
p.value = await a(f.targetDocument, x()), await I();
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
let n =
|
|
30
|
+
function T(e, t) {
|
|
31
|
+
let n = C(m.get(e));
|
|
32
32
|
m.set(e, n ? {
|
|
33
33
|
action: t,
|
|
34
34
|
values: n
|
|
35
|
-
} : t),
|
|
35
|
+
} : t), F();
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function E(e, t, n) {
|
|
38
38
|
let r = m.get(e), i = {
|
|
39
|
-
...
|
|
39
|
+
...C(r),
|
|
40
40
|
[t]: n
|
|
41
41
|
};
|
|
42
42
|
m.set(e, {
|
|
43
|
-
action:
|
|
43
|
+
action: S(r),
|
|
44
44
|
values: i
|
|
45
|
-
}),
|
|
45
|
+
}), F();
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
return
|
|
47
|
+
function D(e) {
|
|
48
|
+
return S(m.get(e));
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
return
|
|
50
|
+
function O(e, t) {
|
|
51
|
+
return C(m.get(e))?.[t];
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function k() {
|
|
54
54
|
let e = /* @__PURE__ */ new Map();
|
|
55
55
|
for (let [t, n] of m) {
|
|
56
|
-
let r =
|
|
56
|
+
let r = C(n);
|
|
57
57
|
r && e.set(t, {
|
|
58
58
|
action: "accept",
|
|
59
59
|
values: r
|
|
@@ -61,43 +61,50 @@ function f(f) {
|
|
|
61
61
|
}
|
|
62
62
|
return e;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
|
|
64
|
+
function A(e) {
|
|
65
|
+
g.value = e, R();
|
|
66
66
|
}
|
|
67
|
-
let
|
|
68
|
-
function
|
|
69
|
-
|
|
67
|
+
let j, M = /* @__PURE__ */ new Map(), N, P = 0;
|
|
68
|
+
function F() {
|
|
69
|
+
N && clearTimeout(N), N = setTimeout(() => void I(), 150);
|
|
70
70
|
}
|
|
71
|
-
async function
|
|
71
|
+
async function I() {
|
|
72
72
|
if (!p.value) return;
|
|
73
|
-
let e = ++
|
|
74
|
-
|
|
75
|
-
let a =
|
|
76
|
-
|
|
73
|
+
let e = ++P;
|
|
74
|
+
b.value = !0;
|
|
75
|
+
let a = k(), s = await i({
|
|
76
|
+
doc: f.targetDocument,
|
|
77
|
+
target: x(),
|
|
78
|
+
report: p.value,
|
|
79
|
+
decisions: a,
|
|
80
|
+
keepNameTypesFrom: h.value,
|
|
81
|
+
afterApply: f.afterApply
|
|
82
|
+
});
|
|
83
|
+
if (e !== P) {
|
|
77
84
|
s.discard();
|
|
78
85
|
return;
|
|
79
86
|
}
|
|
80
|
-
|
|
81
|
-
for (let e of
|
|
87
|
+
j?.discard(), j = s, M = /* @__PURE__ */ new Map();
|
|
88
|
+
for (let e of j.operations) {
|
|
82
89
|
if (e.status !== "created") continue;
|
|
83
90
|
let t = {
|
|
84
91
|
tagName: e.newRecord.tagName,
|
|
85
92
|
id: e.newRecord.id
|
|
86
|
-
}, { templateUuid: r } = await n(
|
|
87
|
-
r &&
|
|
93
|
+
}, { templateUuid: r } = await n(j.query, t);
|
|
94
|
+
r && M.set(r, t);
|
|
88
95
|
}
|
|
89
|
-
let u = r(f.verb), d = await t(
|
|
96
|
+
let u = r(f.verb), d = await t(j.query, f.anchor, u.rootTag), m = await o(j.query, d), v = await c({
|
|
90
97
|
report: p.value,
|
|
91
|
-
createdBySourceUuid:
|
|
98
|
+
createdBySourceUuid: M,
|
|
92
99
|
sourceQuery: f.sourceQuery
|
|
93
100
|
});
|
|
94
|
-
|
|
101
|
+
_.value = await l({
|
|
95
102
|
tree: m,
|
|
96
|
-
changeByStagedId:
|
|
97
|
-
query:
|
|
98
|
-
}),
|
|
103
|
+
changeByStagedId: v,
|
|
104
|
+
query: j.query
|
|
105
|
+
}), g.value &&= L(g.value, _.value), b.value = !1, await R();
|
|
99
106
|
}
|
|
100
|
-
function
|
|
107
|
+
function L(e, t) {
|
|
101
108
|
let n = Object.values(t.index);
|
|
102
109
|
if (e.node) {
|
|
103
110
|
let t = n.find((t) => t.node === e.node);
|
|
@@ -109,42 +116,54 @@ function f(f) {
|
|
|
109
116
|
}
|
|
110
117
|
return (e.previewRef.id ? t.index[e.previewRef.id] : void 0) ?? e;
|
|
111
118
|
}
|
|
112
|
-
async function
|
|
113
|
-
let e =
|
|
114
|
-
if (!e || !
|
|
115
|
-
|
|
119
|
+
async function R() {
|
|
120
|
+
let e = g.value;
|
|
121
|
+
if (!e || !j) {
|
|
122
|
+
v.value = void 0, y.value = void 0;
|
|
116
123
|
return;
|
|
117
124
|
}
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
async function R(e) {
|
|
121
|
-
return A ? n(A.query, e) : {};
|
|
125
|
+
v.value = await s(j.query, e.previewRef), y.value = e.change === "added" ? "" : await B(e.previewRef);
|
|
122
126
|
}
|
|
123
127
|
async function z(e) {
|
|
128
|
+
return j ? n(j.query, e) : {};
|
|
129
|
+
}
|
|
130
|
+
async function B(e) {
|
|
124
131
|
try {
|
|
125
132
|
return await s(f.targetDocument.query, e);
|
|
126
133
|
} catch {
|
|
127
134
|
return;
|
|
128
135
|
}
|
|
129
136
|
}
|
|
130
|
-
async function
|
|
131
|
-
p.value && (
|
|
137
|
+
async function V() {
|
|
138
|
+
p.value && (j?.discard(), j = void 0, await e({
|
|
139
|
+
doc: f.targetDocument,
|
|
140
|
+
target: x(),
|
|
141
|
+
report: p.value,
|
|
142
|
+
decisions: new Map(m),
|
|
143
|
+
keepNameTypesFrom: h.value,
|
|
144
|
+
afterApply: f.afterApply
|
|
145
|
+
}));
|
|
146
|
+
}
|
|
147
|
+
function H(e) {
|
|
148
|
+
h.value = e, F();
|
|
132
149
|
}
|
|
133
150
|
return {
|
|
134
151
|
report: p,
|
|
135
152
|
decisions: m,
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
153
|
+
keepNameTypesFrom: h,
|
|
154
|
+
structuralTree: _,
|
|
155
|
+
previewXml: v,
|
|
156
|
+
previewBeforeXml: y,
|
|
157
|
+
previewLoading: b,
|
|
158
|
+
load: w,
|
|
159
|
+
setDecision: T,
|
|
160
|
+
setValue: E,
|
|
161
|
+
decisionOf: D,
|
|
162
|
+
editedValue: O,
|
|
163
|
+
select: A,
|
|
164
|
+
stagedAttributes: z,
|
|
165
|
+
setKeepNameTypesFrom: H,
|
|
166
|
+
commit: V
|
|
148
167
|
};
|
|
149
168
|
}
|
|
150
169
|
//#endregion
|