@septkit/ui 0.0.50 → 0.0.52
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/dialecte/composables/use-active-document.js +26 -23
- package/dist/dialecte/composables/use-live-data.js +13 -13
- package/dist/dropdown/index.js +2 -1
- package/dist/dropdown/multi-select.js +5 -0
- package/dist/dropdown/multi-select.vue_vue_type_script_setup_true_lang.js +126 -0
- package/dist/external/.pnpm/{@dialecte_scl@0.3.9/node_modules/@dialecte/scl/dist/hooks-DO4gUiix.js → @dialecte_scl@0.3.12/node_modules/@dialecte/scl/dist/hooks-Cm_UYBBt.js} +1 -1
- package/dist/external/.pnpm/@dialecte_scl@0.3.12/node_modules/@dialecte/scl/dist/v2019C1/index.js +22 -0
- package/dist/index.d.ts +108 -47
- package/dist/index.js +20 -19
- package/dist/merge/build-view-model.js +71 -60
- package/dist/merge/decision-toggle.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/merge/element-detail.vue_vue_type_script_setup_true_lang.js +139 -67
- package/dist/merge/merge-correlate.js +46 -0
- package/dist/merge/merge-decision.js +6 -0
- package/dist/merge/merge-highlight.js +44 -0
- package/dist/merge/merge-preflight.js +5 -0
- package/dist/merge/merge-preflight.vue_vue_type_script_setup_true_lang.js +41 -0
- package/dist/merge/merge-progress.vue_vue_type_script_setup_true_lang.js +12 -20
- package/dist/merge/merge-review.vue_vue_type_script_setup_true_lang.js +233 -189
- package/dist/merge/merge-tree.vue_vue_type_script_setup_true_lang.js +74 -65
- package/dist/merge/merge.service.js +36 -23
- package/dist/merge/use-document-progress.js +8 -9
- package/dist/merge/use-merge-session.js +122 -111
- package/dist/ui.css +1 -1
- package/package.json +2 -2
- package/dist/external/.pnpm/@dialecte_scl@0.3.9/node_modules/@dialecte/scl/dist/v2019C1/index.js +0 -3
- package/dist/external/.pnpm/@lucide_vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/rotate-ccw.js +0 -11
|
@@ -1,113 +1,185 @@
|
|
|
1
|
-
import e from "../external/.pnpm/@lucide_vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/
|
|
1
|
+
import e from "../external/.pnpm/@lucide_vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/pencil.js";
|
|
2
2
|
import { composeAffix as t, splitAffix as n } from "./affix.js";
|
|
3
|
-
import { Fragment as r, computed as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s,
|
|
3
|
+
import { Fragment as r, computed as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, nextTick as d, normalizeClass as f, openBlock as p, reactive as m, renderList as h, toDisplayString as g, unref as ee } from "vue";
|
|
4
4
|
//#region lib/merge/element-detail.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var
|
|
5
|
+
var te = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "flex h-full flex-col gap-3 overflow-auto p-3 text-sm"
|
|
8
|
-
},
|
|
8
|
+
}, ne = { class: "flex items-center gap-2" }, _ = { class: "font-medium" }, v = { class: "badge badge-sm opacity-70" }, y = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "flex flex-col gap-2 text-xs"
|
|
11
|
-
}, b = { class: "flex items-center gap-2" }, x = ["title"], S =
|
|
11
|
+
}, b = { class: "flex items-center gap-2" }, x = ["title"], S = ["aria-label"], C = ["aria-checked", "onClick"], w = ["title"], re = ["aria-checked", "onClick"], ie = ["title"], T = ["aria-checked", "onClick"], E = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "shrink-0 select-none opacity-60"
|
|
14
|
-
},
|
|
14
|
+
}, D = [
|
|
15
|
+
"value",
|
|
16
|
+
"readonly",
|
|
17
|
+
"onInput"
|
|
18
|
+
], O = {
|
|
15
19
|
key: 1,
|
|
16
20
|
class: "shrink-0 select-none opacity-60"
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
"aria-pressed",
|
|
20
|
-
"onClick"
|
|
21
|
-
], D = {
|
|
22
|
-
key: 1,
|
|
21
|
+
}, k = {
|
|
22
|
+
key: 2,
|
|
23
23
|
class: "badge badge-warning badge-xs shrink-0",
|
|
24
24
|
title: "Auto-resolved to avoid a naming collision — edit to override"
|
|
25
|
-
},
|
|
25
|
+
}, A = {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: "mt-1.5 flex items-center gap-2"
|
|
28
|
+
}, j = { class: "flex w-full items-center font-mono" }, M = {
|
|
26
29
|
key: 0,
|
|
27
|
-
class: "
|
|
28
|
-
},
|
|
30
|
+
class: "shrink-0 select-none opacity-60"
|
|
31
|
+
}, N = ["value", "onInput"], P = {
|
|
29
32
|
key: 1,
|
|
30
|
-
class: "
|
|
31
|
-
},
|
|
33
|
+
class: "shrink-0 select-none opacity-60"
|
|
34
|
+
}, F = {
|
|
32
35
|
key: 1,
|
|
33
36
|
class: "text-xs opacity-60"
|
|
34
|
-
},
|
|
37
|
+
}, I = {
|
|
35
38
|
key: 1,
|
|
36
39
|
class: "grid h-full place-items-center p-4 text-sm opacity-60"
|
|
37
|
-
},
|
|
40
|
+
}, L = /*@__PURE__*/ u({
|
|
38
41
|
__name: "element-detail",
|
|
39
42
|
props: {
|
|
40
43
|
detail: {},
|
|
41
|
-
affixMask: { type: Function }
|
|
44
|
+
affixMask: { type: Function },
|
|
45
|
+
disabled: { type: Boolean }
|
|
42
46
|
},
|
|
43
47
|
emits: ["edit"],
|
|
44
|
-
setup(
|
|
45
|
-
let
|
|
48
|
+
setup(u, { emit: L }) {
|
|
49
|
+
let R = {
|
|
50
|
+
accept: {
|
|
51
|
+
border: "border-success",
|
|
52
|
+
label: "bg-success text-success-content",
|
|
53
|
+
value: "bg-success/15 text-success"
|
|
54
|
+
},
|
|
55
|
+
skip: {
|
|
56
|
+
border: "border-warning",
|
|
57
|
+
label: "bg-warning text-black",
|
|
58
|
+
value: "bg-warning/20 text-black"
|
|
59
|
+
},
|
|
60
|
+
other: {
|
|
61
|
+
border: "border-info",
|
|
62
|
+
label: "bg-info text-info-content",
|
|
63
|
+
value: "bg-info/15 text-info"
|
|
64
|
+
}
|
|
65
|
+
}, z = u, B = L, V = m(/* @__PURE__ */ new Set()), H = /* @__PURE__ */ new Map(), U = i(() => ({
|
|
46
66
|
added: "badge-success",
|
|
47
67
|
removed: "badge-error",
|
|
48
68
|
modified: "badge-warning",
|
|
49
69
|
unchanged: "badge-ghost",
|
|
50
70
|
"target-only": "badge-info"
|
|
51
|
-
})[
|
|
52
|
-
function
|
|
53
|
-
if (!(!
|
|
54
|
-
tag:
|
|
71
|
+
})[z.detail?.change ?? "unchanged"]), W = i(() => [...z.detail?.attributes ?? []].filter((e) => e.editable).sort((e, t) => Number(J(t)) - Number(J(e))));
|
|
72
|
+
function G(e) {
|
|
73
|
+
if (!(!z.detail || !z.affixMask)) return z.affixMask({
|
|
74
|
+
tag: z.detail.tag,
|
|
55
75
|
attr: e.name
|
|
56
76
|
});
|
|
57
77
|
}
|
|
58
|
-
function
|
|
59
|
-
return
|
|
78
|
+
function K(e) {
|
|
79
|
+
return z.disabled ? e.before ?? e.after ?? "" : e.written ?? e.after ?? "";
|
|
80
|
+
}
|
|
81
|
+
function q(e) {
|
|
82
|
+
return n(K(e), G(e));
|
|
60
83
|
}
|
|
61
|
-
function
|
|
84
|
+
function J(e) {
|
|
62
85
|
return e.status === "modified";
|
|
63
86
|
}
|
|
64
|
-
function
|
|
65
|
-
return
|
|
87
|
+
function Y(e) {
|
|
88
|
+
return e && e.length > 0 ? e : "∅";
|
|
66
89
|
}
|
|
67
|
-
function
|
|
68
|
-
|
|
69
|
-
|
|
90
|
+
function X(e) {
|
|
91
|
+
if (V.has(e.name)) return "other";
|
|
92
|
+
let t = K(e);
|
|
93
|
+
return t === (e.after ?? "") ? "accept" : t === (e.before ?? "") ? "skip" : "other";
|
|
70
94
|
}
|
|
71
|
-
function
|
|
72
|
-
|
|
95
|
+
function Z(e, t) {
|
|
96
|
+
if (t === "other") {
|
|
97
|
+
V.add(e.name), d(() => H.get(e.name)?.focus());
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
V.delete(e.name), B("edit", e.name, t === "accept" ? e.after ?? "" : e.before ?? "");
|
|
73
101
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
102
|
+
function Q(e, t) {
|
|
103
|
+
t instanceof HTMLInputElement ? H.set(e.name, t) : H.delete(e.name);
|
|
104
|
+
}
|
|
105
|
+
function $(e, n) {
|
|
106
|
+
let r = n.target.value;
|
|
107
|
+
B("edit", e.name, t(r, G(e)));
|
|
108
|
+
}
|
|
109
|
+
return (t, n) => u.detail ? (p(), o("div", te, [s("header", ne, [
|
|
110
|
+
s("span", _, g(u.detail.title), 1),
|
|
111
|
+
s("span", v, g(u.detail.tag), 1),
|
|
112
|
+
s("span", { class: f(["badge badge-sm", U.value]) }, g(u.detail.change), 3)
|
|
113
|
+
]), W.value.length ? (p(), o("div", y, [(p(!0), o(r, null, h(W.value, (t) => (p(), o("div", {
|
|
79
114
|
key: t.name,
|
|
80
|
-
class:
|
|
115
|
+
class: f(["rounded-md border px-2 py-1.5", J(t) ? "border-warning/40 bg-warning/5" : "border-base-200"])
|
|
81
116
|
}, [s("div", b, [
|
|
82
117
|
s("span", {
|
|
83
118
|
class: "w-24 shrink-0 truncate opacity-70",
|
|
84
119
|
title: t.name
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
B(t).prefix ? (d(), o("span", C, p(B(t).prefix), 1)) : a("", !0),
|
|
88
|
-
s("input", {
|
|
89
|
-
class: u(["input input-xs input-bordered w-full font-mono", { "input-warning": t.conflict }]),
|
|
90
|
-
value: B(t).core,
|
|
91
|
-
onInput: (e) => U(t, e)
|
|
92
|
-
}, null, 42, w),
|
|
93
|
-
B(t).suffix ? (d(), o("span", T, p(B(t).suffix), 1)) : a("", !0)
|
|
94
|
-
]),
|
|
95
|
-
V(t) ? (d(), o("button", {
|
|
120
|
+
}, g(t.name), 9, x),
|
|
121
|
+
J(t) ? (p(), o("div", {
|
|
96
122
|
key: 0,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
"
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
123
|
+
class: f(["flex flex-1 flex-wrap items-center gap-1.5", u.disabled && "pointer-events-none opacity-60"]),
|
|
124
|
+
role: "radiogroup",
|
|
125
|
+
"aria-label": `Decision for ${t.name}`
|
|
126
|
+
}, [
|
|
127
|
+
s("button", {
|
|
128
|
+
type: "button",
|
|
129
|
+
class: f(["inline-flex items-stretch overflow-hidden rounded-md border-2 text-xs transition", X(t) === "accept" ? R.accept.border : "border-transparent opacity-55 hover:opacity-100"]),
|
|
130
|
+
role: "radio",
|
|
131
|
+
"aria-checked": X(t) === "accept",
|
|
132
|
+
onClick: (e) => Z(t, "accept")
|
|
133
|
+
}, [s("span", { class: f(["px-2 py-0.5 font-semibold", R.accept.label]) }, " Accept ", 2), s("span", {
|
|
134
|
+
class: f(["max-w-[12ch] truncate px-2 py-0.5 font-mono", R.accept.value]),
|
|
135
|
+
title: Y(t.after)
|
|
136
|
+
}, g(Y(t.after)), 11, w)], 10, C),
|
|
137
|
+
s("button", {
|
|
138
|
+
type: "button",
|
|
139
|
+
class: f(["inline-flex items-stretch overflow-hidden rounded-md border-2 text-xs transition", X(t) === "skip" ? R.skip.border : "border-transparent opacity-55 hover:opacity-100"]),
|
|
140
|
+
role: "radio",
|
|
141
|
+
"aria-checked": X(t) === "skip",
|
|
142
|
+
onClick: (e) => Z(t, "skip")
|
|
143
|
+
}, [s("span", { class: f(["px-2 py-0.5 font-semibold", R.skip.label]) }, " Skip ", 2), s("span", {
|
|
144
|
+
class: f(["max-w-[12ch] truncate px-2 py-0.5 font-mono", R.skip.value]),
|
|
145
|
+
title: Y(t.before)
|
|
146
|
+
}, g(Y(t.before)), 11, ie)], 10, re),
|
|
147
|
+
s("button", {
|
|
148
|
+
type: "button",
|
|
149
|
+
class: f(["inline-flex items-stretch overflow-hidden rounded-md border-2 text-xs transition", X(t) === "other" ? R.other.border : "border-transparent opacity-55 hover:opacity-100"]),
|
|
150
|
+
role: "radio",
|
|
151
|
+
"aria-checked": X(t) === "other",
|
|
152
|
+
onClick: (e) => Z(t, "other")
|
|
153
|
+
}, [s("span", { class: f(["flex items-center gap-1 px-2 py-0.5 font-semibold", R.other.label]) }, [l(ee(e), { class: "size-3" }), n[0] ||= c(" Other ", -1)], 2)], 10, T)
|
|
154
|
+
], 10, S)) : (p(), o("span", {
|
|
155
|
+
key: 1,
|
|
156
|
+
class: f(["flex w-full items-center font-mono", u.disabled && "pointer-events-none opacity-60"])
|
|
157
|
+
}, [
|
|
158
|
+
q(t).prefix ? (p(), o("span", E, g(q(t).prefix), 1)) : a("", !0),
|
|
159
|
+
s("input", {
|
|
160
|
+
ref_for: !0,
|
|
161
|
+
ref: (e) => Q(t, e),
|
|
162
|
+
class: f(["input input-xs input-bordered w-full font-mono", { "input-warning": t.conflict }]),
|
|
163
|
+
value: q(t).core,
|
|
164
|
+
readonly: u.disabled,
|
|
165
|
+
onInput: (e) => $(t, e)
|
|
166
|
+
}, null, 42, D),
|
|
167
|
+
q(t).suffix ? (p(), o("span", O, g(q(t).suffix), 1)) : a("", !0)
|
|
168
|
+
], 2)),
|
|
169
|
+
t.conflict ? (p(), o("span", k, " conflict ")) : a("", !0)
|
|
170
|
+
]), J(t) && X(t) === "other" ? (p(), o("div", A, [n[1] ||= s("span", { class: "w-24 shrink-0" }, null, -1), s("span", j, [
|
|
171
|
+
q(t).prefix ? (p(), o("span", M, g(q(t).prefix), 1)) : a("", !0),
|
|
172
|
+
s("input", {
|
|
173
|
+
ref_for: !0,
|
|
174
|
+
ref: (e) => Q(t, e),
|
|
175
|
+
class: f(["input input-xs input-bordered w-full font-mono", { "input-warning": t.conflict }]),
|
|
176
|
+
value: q(t).core,
|
|
177
|
+
placeholder: "custom value",
|
|
178
|
+
onInput: (e) => $(t, e)
|
|
179
|
+
}, null, 42, N),
|
|
180
|
+
q(t).suffix ? (p(), o("span", P, g(q(t).suffix), 1)) : a("", !0)
|
|
181
|
+
])])) : a("", !0)], 2))), 128))])) : (p(), o("div", F, "No editable fields. See the diff below."))])) : (p(), o("div", I, " Select an element to see its changes. "));
|
|
110
182
|
}
|
|
111
183
|
});
|
|
112
184
|
//#endregion
|
|
113
|
-
export {
|
|
185
|
+
export { L as default };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
//#region lib/merge/merge-correlate.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
let { report: i, snapshot: a, appliedRoots: o, companionAnchors: s } = e, c = r(a), l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Set();
|
|
4
|
+
i.instances.forEach((e, n) => {
|
|
5
|
+
let r = e.rootRef?.id ?? o[n]?.id, i = r ? c.get(r) : void 0;
|
|
6
|
+
i && t(e.tree, i, l, u);
|
|
7
|
+
});
|
|
8
|
+
for (let e of i.instances) for (let r of e.groups) for (let e of r.companions) {
|
|
9
|
+
if (l.has(e)) continue;
|
|
10
|
+
let r = s?.get(e) ?? e.instanceRef?.id, i = r ? c.get(r) : n(a, e.tagName, u);
|
|
11
|
+
i && t(e, i, l, u);
|
|
12
|
+
}
|
|
13
|
+
return l;
|
|
14
|
+
}
|
|
15
|
+
function t(e, n, r, i) {
|
|
16
|
+
r.set(e, n.id), i.add(n.id);
|
|
17
|
+
let a = n.tree ?? [], o = /* @__PURE__ */ new Map();
|
|
18
|
+
for (let t of e.children) {
|
|
19
|
+
let e = t.instanceRef?.id;
|
|
20
|
+
if (!e) continue;
|
|
21
|
+
let n = a.find((t) => t.id === e && !i.has(t.id));
|
|
22
|
+
n && (o.set(t, n), i.add(n.id));
|
|
23
|
+
}
|
|
24
|
+
for (let t of e.children) {
|
|
25
|
+
if (o.has(t) || t.instanceRef || t.change === "removed") continue;
|
|
26
|
+
let e = a.find((e) => e.tagName === t.tagName && !i.has(e.id));
|
|
27
|
+
e && (o.set(t, e), i.add(e.id));
|
|
28
|
+
}
|
|
29
|
+
for (let [e, n] of o) t(e, n, r, i);
|
|
30
|
+
}
|
|
31
|
+
function n(e, t, r) {
|
|
32
|
+
if (e.tagName === t && !r.has(e.id)) return e;
|
|
33
|
+
for (let i of e.tree ?? []) {
|
|
34
|
+
let e = n(i, t, r);
|
|
35
|
+
if (e) return e;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function r(e) {
|
|
39
|
+
let t = /* @__PURE__ */ new Map(), n = (e) => {
|
|
40
|
+
t.set(e.id, e);
|
|
41
|
+
for (let t of e.tree ?? []) n(t);
|
|
42
|
+
};
|
|
43
|
+
return n(e), t;
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { e as correlate };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
//#region lib/merge/merge-highlight.ts
|
|
2
|
+
function e(e, t, n) {
|
|
3
|
+
let r = o(e, n) ?? [];
|
|
4
|
+
for (let e = r.length - 1; e >= 0; e--) {
|
|
5
|
+
let n = t[r[e].id]?.groupId;
|
|
6
|
+
if (n) return {
|
|
7
|
+
groupId: n,
|
|
8
|
+
rootId: r[e].id
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function t(e, t, i) {
|
|
13
|
+
let a = r(e, n(t, i.groupId) ?? i.rootId);
|
|
14
|
+
for (let [e, n] of Object.entries(t)) n.groupId === i.groupId && a.add(e);
|
|
15
|
+
return a;
|
|
16
|
+
}
|
|
17
|
+
function n(e, t) {
|
|
18
|
+
for (let [n, r] of Object.entries(e)) if (r.groupId === t && r.role === "primary") return n;
|
|
19
|
+
}
|
|
20
|
+
function r(e, t) {
|
|
21
|
+
let n = /* @__PURE__ */ new Set(), r = i(e, t);
|
|
22
|
+
return r && a(r, n), n;
|
|
23
|
+
}
|
|
24
|
+
function i(e, t) {
|
|
25
|
+
for (let n of e) {
|
|
26
|
+
if (n.id === t) return n;
|
|
27
|
+
let e = n.children && i(n.children, t);
|
|
28
|
+
if (e) return e;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function a(e, t) {
|
|
32
|
+
t.add(e.id);
|
|
33
|
+
for (let n of e.children ?? []) a(n, t);
|
|
34
|
+
}
|
|
35
|
+
function o(e, t, n = []) {
|
|
36
|
+
for (let r of e) {
|
|
37
|
+
let e = [...n, r];
|
|
38
|
+
if (r.id === t) return e;
|
|
39
|
+
let i = r.children && o(r.children, t, e);
|
|
40
|
+
if (i) return i;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { r as collectSubtreeIds, t as coupledNodeIds, e as focusForNode, n as primaryIdOf };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import e from "../external/.pnpm/@lucide_vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/triangle-alert.js";
|
|
2
|
+
import { TEMPLATE_UUID_WARNING_INFO as t } from "../external/.pnpm/@dialecte_scl@0.3.12/node_modules/@dialecte/scl/dist/v2019C1/index.js";
|
|
3
|
+
import { Fragment as n, computed as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createVNode as s, defineComponent as c, openBlock as l, renderList as u, toDisplayString as d, unref as f } from "vue";
|
|
4
|
+
//#region lib/merge/merge-preflight.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var p = { class: "flex h-full min-h-0 flex-col" }, m = { class: "min-h-0 flex-1 overflow-auto p-4" }, h = { class: "mx-auto max-w-2xl space-y-4" }, g = { class: "flex items-start gap-3" }, _ = { class: "border-b border-warning/25 px-3 py-2" }, v = { class: "flex items-center gap-2" }, y = { class: "badge badge-soft badge-warning badge-sm font-medium" }, b = { class: "font-semibold" }, x = { class: "mt-1 text-sm text-base-content/80" }, S = { class: "mt-1 text-sm" }, C = { class: "text-base-content/80" }, w = { class: "divide-y divide-warning/15" }, T = { class: "font-mono break-all" }, E = { class: "text-base-content/70" }, D = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "mt-0.5 flex flex-wrap gap-1"
|
|
8
|
+
}, O = /*@__PURE__*/ c({
|
|
9
|
+
__name: "merge-preflight",
|
|
10
|
+
props: { warnings: {} },
|
|
11
|
+
setup(c) {
|
|
12
|
+
let O = c, k = r(() => {
|
|
13
|
+
let e = /* @__PURE__ */ new Map();
|
|
14
|
+
for (let t of O.warnings) {
|
|
15
|
+
let n = e.get(t.code) ?? [];
|
|
16
|
+
n.push(t), e.set(t.code, n);
|
|
17
|
+
}
|
|
18
|
+
return [...e.entries()].map(([e, n]) => ({
|
|
19
|
+
code: e,
|
|
20
|
+
info: t[e],
|
|
21
|
+
items: n
|
|
22
|
+
}));
|
|
23
|
+
});
|
|
24
|
+
return (t, r) => (l(), a("div", p, [o("div", m, [o("div", h, [o("div", g, [s(f(e), { class: "mt-0.5 size-6 shrink-0 text-warning" }), r[0] ||= o("div", null, [o("h2", { class: "text-base font-semibold" }, "Check the file identity before merging"), o("p", { class: "mt-0.5 text-sm text-base-content/70" }, " These files break some SCL identity rules the merge relies on to recognise elements. It is not blocking — here is what was found and how the merge still proceeds. ")], -1)]), (l(!0), a(n, null, u(k.value, (e) => (l(), a("div", {
|
|
25
|
+
key: e.code,
|
|
26
|
+
class: "overflow-hidden rounded-lg border border-warning/40 bg-warning/5"
|
|
27
|
+
}, [o("div", _, [
|
|
28
|
+
o("div", v, [o("span", y, d(e.items.length), 1), o("h3", b, d(e.info.title), 1)]),
|
|
29
|
+
o("p", x, d(e.info.description), 1),
|
|
30
|
+
o("p", S, [r[1] ||= o("span", { class: "font-medium text-success" }, "Fallback:", -1), o("span", C, d(e.info.fallback), 1)])
|
|
31
|
+
]), o("ul", w, [(l(!0), a(n, null, u(e.items, (e) => (l(), a("li", {
|
|
32
|
+
key: `${e.code}:${e.value}`,
|
|
33
|
+
class: "px-3 py-1.5 text-xs"
|
|
34
|
+
}, [o("div", null, [o("code", T, d(e.value), 1), o("span", E, " — " + d(e.message), 1)]), e.tagNames.length ? (l(), a("div", D, [(l(!0), a(n, null, u(e.tagNames, (e) => (l(), a("span", {
|
|
35
|
+
key: e,
|
|
36
|
+
class: "badge badge-ghost badge-xs font-mono"
|
|
37
|
+
}, d(e), 1))), 128))])) : i("", !0)]))), 128))])]))), 128))])])]));
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
//#endregion
|
|
41
|
+
export { O as default };
|
|
@@ -1,31 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createCommentVNode as e, createElementBlock as t, createElementVNode as n, defineComponent as r, openBlock as i, toDisplayString as a } from "vue";
|
|
2
2
|
//#region lib/merge/merge-progress.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
-
var
|
|
4
|
-
key: 1,
|
|
5
|
-
class: "w-full space-y-0.5 text-center text-xs opacity-60"
|
|
6
|
-
}, p = /*@__PURE__*/ i({
|
|
3
|
+
var o = { class: "grid h-full place-items-center p-6" }, s = { class: "flex w-full max-w-md flex-col items-center gap-3" }, c = { class: "text-sm font-medium" }, l = ["value", "max"], u = /*@__PURE__*/ r({
|
|
7
4
|
__name: "merge-progress",
|
|
8
5
|
props: {
|
|
9
6
|
label: {},
|
|
10
|
-
progress: {}
|
|
11
|
-
history: {}
|
|
7
|
+
progress: {}
|
|
12
8
|
},
|
|
13
|
-
setup(
|
|
14
|
-
return (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
setup(r) {
|
|
10
|
+
return (u, d) => (i(), t("div", o, [n("div", s, [
|
|
11
|
+
d[0] ||= n("span", { class: "loading loading-spinner loading-lg text-primary" }, null, -1),
|
|
12
|
+
n("p", c, a(r.progress?.message || r.label || "Working…"), 1),
|
|
13
|
+
r.progress && r.progress.total > 0 ? (i(), t("progress", {
|
|
18
14
|
key: 0,
|
|
19
15
|
class: "progress progress-primary w-full",
|
|
20
|
-
value:
|
|
21
|
-
max:
|
|
22
|
-
}, null, 8,
|
|
23
|
-
i.history?.length ? (a(), n("ul", f, [(a(!0), n(e, null, o(i.history, (e, t) => (a(), n("li", {
|
|
24
|
-
key: t,
|
|
25
|
-
class: "truncate"
|
|
26
|
-
}, s(e.message || e.method), 1))), 128))])) : t("", !0)
|
|
16
|
+
value: r.progress.current,
|
|
17
|
+
max: r.progress.total
|
|
18
|
+
}, null, 8, l)) : e("", !0)
|
|
27
19
|
])]));
|
|
28
20
|
}
|
|
29
21
|
});
|
|
30
22
|
//#endregion
|
|
31
|
-
export {
|
|
23
|
+
export { u as default };
|