@septkit/ui 0.0.49 → 0.0.50
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 +18 -11
- package/dist/dialecte/create-document-store.js +3 -3
- package/dist/external/.pnpm/{@dialecte_core@0.4.7 → @dialecte_core@0.4.9}/node_modules/@dialecte/core/dist/helpers.js +16 -19
- package/dist/external/.pnpm/{@dialecte_core@0.4.7 → @dialecte_core@0.4.9}/node_modules/@dialecte/core/dist/index.js +1 -1
- package/dist/external/.pnpm/{@dialecte_core@0.4.7/node_modules/@dialecte/core/dist/project-DxIu-3AU.js → @dialecte_core@0.4.9/node_modules/@dialecte/core/dist/project-D-KS3OPN.js} +1 -1
- package/dist/external/.pnpm/{@dialecte_core@0.4.7 → @dialecte_core@0.4.9}/node_modules/@dialecte/core/dist/utils-C5_11hqg.js +1 -1
- package/dist/external/.pnpm/{@dialecte_scl@0.3.8/node_modules/@dialecte/scl/dist/hooks-DJJN-WU2.js → @dialecte_scl@0.3.9/node_modules/@dialecte/scl/dist/hooks-DO4gUiix.js} +48 -5277
- package/dist/external/.pnpm/@dialecte_scl@0.3.9/node_modules/@dialecte/scl/dist/v2019C1/index.js +3 -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/rotate-ccw.js +11 -0
- package/dist/index.d.ts +7 -1
- package/dist/merge/build-view-model.js +37 -21
- package/dist/merge/element-detail.vue_vue_type_script_setup_true_lang.js +80 -43
- package/dist/merge/merge-review.vue_vue_type_script_setup_true_lang.js +156 -151
- package/dist/merge/merge-summary.vue_vue_type_script_setup_true_lang.js +47 -25
- package/dist/merge/merge-tree.vue_vue_type_script_setup_true_lang.js +11 -9
- package/dist/merge/merge.service.js +2 -2
- package/dist/merge/use-merge-session.js +4 -1
- package/dist/ui.css +1 -1
- package/package.json +3 -3
- package/dist/external/.pnpm/@dialecte_scl@0.3.8/node_modules/@dialecte/scl/dist/v2019C1/index.js +0 -3
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import e from "../createLucideIcon.js";
|
|
2
|
+
//#region node_modules/.pnpm/@lucide+vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/rotate-ccw.mjs
|
|
3
|
+
var t = [["path", {
|
|
4
|
+
d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",
|
|
5
|
+
key: "1357e3"
|
|
6
|
+
}], ["path", {
|
|
7
|
+
d: "M3 3v5h5",
|
|
8
|
+
key: "1xhq8a"
|
|
9
|
+
}]], n = e("rotate-ccw", t);
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t as __iconNode, n as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -405,7 +405,7 @@ export declare const Button: __VLS_WithTemplateSlots<typeof __VLS_component, __V
|
|
|
405
405
|
export declare const CATEGORY_ELEMENTS: Record<string, string[]>;
|
|
406
406
|
|
|
407
407
|
/** How an element or attribute changed between the template and the instance. */
|
|
408
|
-
export declare type ChangeStatus = 'added' | 'removed' | 'modified' | 'unchanged';
|
|
408
|
+
export declare type ChangeStatus = 'added' | 'removed' | 'modified' | 'unchanged' | 'target-only';
|
|
409
409
|
|
|
410
410
|
declare function closeDropdown(): void;
|
|
411
411
|
|
|
@@ -656,6 +656,12 @@ export declare type MergeNodeMeta = {
|
|
|
656
656
|
role: 'primary' | 'companion' | 'plain';
|
|
657
657
|
/** The decision group this node belongs to (primary + companions share it). */
|
|
658
658
|
groupId?: string;
|
|
659
|
+
/**
|
|
660
|
+
* The topmost changed node of a change region (no changed same-group ancestor above it).
|
|
661
|
+
* Only region heads carry a status marker, so one badge shows per change instead of
|
|
662
|
+
* scattering across correlated companions but not their uuid-less siblings.
|
|
663
|
+
*/
|
|
664
|
+
regionHead?: boolean;
|
|
659
665
|
/** For a satellite companion that lives elsewhere: its real document path (shown as subtitle). */
|
|
660
666
|
path?: string;
|
|
661
667
|
};
|
|
@@ -47,41 +47,45 @@ async function r(t) {
|
|
|
47
47
|
index: {},
|
|
48
48
|
expanded: []
|
|
49
49
|
};
|
|
50
|
-
async function o(t, n) {
|
|
51
|
-
let
|
|
50
|
+
async function o(t, n, s) {
|
|
51
|
+
let c = r.get(t.id), l = c?.change ?? (n.added ? "added" : "unchanged"), u = c?.groupId ?? (l === "unchanged" ? void 0 : n.groupId), d = c?.role ?? "plain", f = {
|
|
52
52
|
tagName: t.tagName,
|
|
53
53
|
id: t.id
|
|
54
|
-
},
|
|
55
|
-
added:
|
|
56
|
-
groupId:
|
|
57
|
-
},
|
|
58
|
-
for (let e of t.tree ?? [])
|
|
59
|
-
|
|
54
|
+
}, p = l !== "unchanged" && (!s || s.change === "unchanged" || s.groupId !== u), m = {
|
|
55
|
+
added: c ? c.change === "added" : n.added,
|
|
56
|
+
groupId: u ?? n.groupId
|
|
57
|
+
}, h = [];
|
|
58
|
+
for (let e of t.tree ?? []) h.push(await o(e, m, {
|
|
59
|
+
change: l,
|
|
60
|
+
groupId: u
|
|
61
|
+
}));
|
|
62
|
+
let g = l !== "unchanged" || h.some((e) => e.changed);
|
|
60
63
|
return a.meta[t.id] = {
|
|
61
|
-
change:
|
|
62
|
-
role:
|
|
63
|
-
groupId:
|
|
64
|
+
change: l,
|
|
65
|
+
role: d,
|
|
66
|
+
groupId: u,
|
|
67
|
+
regionHead: p
|
|
64
68
|
}, a.index[t.id] = {
|
|
65
|
-
previewRef:
|
|
66
|
-
change:
|
|
67
|
-
role:
|
|
68
|
-
groupId:
|
|
69
|
-
node:
|
|
70
|
-
},
|
|
69
|
+
previewRef: f,
|
|
70
|
+
change: l,
|
|
71
|
+
role: d,
|
|
72
|
+
groupId: u,
|
|
73
|
+
node: c?.node
|
|
74
|
+
}, g && a.expanded.push(t.id), {
|
|
71
75
|
node: {
|
|
72
76
|
tag: t.tagName,
|
|
73
77
|
id: t.id,
|
|
74
|
-
name: await e(i,
|
|
78
|
+
name: await e(i, f),
|
|
75
79
|
selectable: !0,
|
|
76
|
-
children:
|
|
80
|
+
children: h.length ? h.map((e) => e.node) : void 0
|
|
77
81
|
},
|
|
78
|
-
changed:
|
|
82
|
+
changed: g
|
|
79
83
|
};
|
|
80
84
|
}
|
|
81
85
|
return a.items.push((await o(n, {
|
|
82
86
|
added: !1,
|
|
83
87
|
groupId: void 0
|
|
84
|
-
})).node), a;
|
|
88
|
+
}, void 0)).node), a;
|
|
85
89
|
}
|
|
86
90
|
async function i(e, n, r) {
|
|
87
91
|
let i = new Map((n?.editableAttributes ?? []).map((e) => [e.attr, e])), a = [];
|
|
@@ -148,10 +152,22 @@ async function a(e, t, n, r) {
|
|
|
148
152
|
added: [],
|
|
149
153
|
updated: [],
|
|
150
154
|
skipped: [],
|
|
155
|
+
preserved: [],
|
|
156
|
+
removed: [],
|
|
151
157
|
renamed: []
|
|
152
158
|
};
|
|
153
159
|
for (let a of e.groups) {
|
|
154
160
|
let e = await o(a.primary, r), s = a.primary.tagName, c = a.companions.length;
|
|
161
|
+
if (a.primary.change === "target-only") {
|
|
162
|
+
t(a.id) === "skip" ? i.preserved.push({
|
|
163
|
+
title: e,
|
|
164
|
+
tag: s
|
|
165
|
+
}) : i.removed.push({
|
|
166
|
+
title: e,
|
|
167
|
+
tag: s
|
|
168
|
+
});
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
155
171
|
if (t(a.id) === "skip") {
|
|
156
172
|
i.skipped.push({
|
|
157
173
|
title: e,
|
|
@@ -1,76 +1,113 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
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/rotate-ccw.js";
|
|
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, createVNode as c, defineComponent as l, normalizeClass as u, openBlock as d, renderList as f, toDisplayString as p, unref as m } from "vue";
|
|
3
4
|
//#region lib/merge/element-detail.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var
|
|
5
|
+
var h = {
|
|
5
6
|
key: 0,
|
|
6
7
|
class: "flex h-full flex-col gap-3 overflow-auto p-3 text-sm"
|
|
7
|
-
},
|
|
8
|
+
}, g = { class: "flex items-center gap-2" }, _ = { class: "font-medium" }, v = { class: "badge badge-sm opacity-70" }, y = {
|
|
8
9
|
key: 0,
|
|
9
|
-
class: "flex flex-col gap-2
|
|
10
|
-
},
|
|
10
|
+
class: "flex flex-col gap-2 text-xs"
|
|
11
|
+
}, b = { class: "flex items-center gap-2" }, x = ["title"], S = { class: "flex w-full items-center font-mono" }, C = {
|
|
11
12
|
key: 0,
|
|
12
13
|
class: "shrink-0 select-none opacity-60"
|
|
13
|
-
},
|
|
14
|
+
}, w = ["value", "onInput"], T = {
|
|
14
15
|
key: 1,
|
|
15
16
|
class: "shrink-0 select-none opacity-60"
|
|
16
|
-
},
|
|
17
|
-
|
|
17
|
+
}, E = [
|
|
18
|
+
"title",
|
|
19
|
+
"aria-pressed",
|
|
20
|
+
"onClick"
|
|
21
|
+
], D = {
|
|
22
|
+
key: 1,
|
|
18
23
|
class: "badge badge-warning badge-xs shrink-0",
|
|
19
24
|
title: "Auto-resolved to avoid a naming collision — edit to override"
|
|
20
|
-
},
|
|
25
|
+
}, O = {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: "mt-1 flex items-center gap-1 pl-24 font-mono opacity-70"
|
|
28
|
+
}, k = { class: "line-through decoration-error/60" }, A = { class: "text-warning" }, j = {
|
|
29
|
+
key: 1,
|
|
30
|
+
class: "badge badge-info badge-xs"
|
|
31
|
+
}, M = {
|
|
21
32
|
key: 1,
|
|
22
33
|
class: "text-xs opacity-60"
|
|
23
|
-
},
|
|
34
|
+
}, N = {
|
|
24
35
|
key: 1,
|
|
25
36
|
class: "grid h-full place-items-center p-4 text-sm opacity-60"
|
|
26
|
-
},
|
|
37
|
+
}, P = /*@__PURE__*/ l({
|
|
27
38
|
__name: "element-detail",
|
|
28
39
|
props: {
|
|
29
40
|
detail: {},
|
|
30
41
|
affixMask: { type: Function }
|
|
31
42
|
},
|
|
32
43
|
emits: ["edit"],
|
|
33
|
-
setup(
|
|
34
|
-
let
|
|
44
|
+
setup(l, { emit: P }) {
|
|
45
|
+
let F = l, I = P, L = i(() => ({
|
|
35
46
|
added: "badge-success",
|
|
36
47
|
removed: "badge-error",
|
|
37
48
|
modified: "badge-warning",
|
|
38
|
-
unchanged: "badge-ghost"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
49
|
+
unchanged: "badge-ghost",
|
|
50
|
+
"target-only": "badge-info"
|
|
51
|
+
})[F.detail?.change ?? "unchanged"]), R = i(() => [...F.detail?.attributes ?? []].filter((e) => e.editable).sort((e, t) => Number(V(t)) - Number(V(e))));
|
|
52
|
+
function z(e) {
|
|
53
|
+
if (!(!F.detail || !F.affixMask)) return F.affixMask({
|
|
54
|
+
tag: F.detail.tag,
|
|
43
55
|
attr: e.name
|
|
44
56
|
});
|
|
45
57
|
}
|
|
46
|
-
function
|
|
47
|
-
return
|
|
58
|
+
function B(e) {
|
|
59
|
+
return n(e.after ?? "", z(e));
|
|
48
60
|
}
|
|
49
|
-
function
|
|
61
|
+
function V(e) {
|
|
62
|
+
return e.status === "modified";
|
|
63
|
+
}
|
|
64
|
+
function H(e) {
|
|
65
|
+
return V(e) && (e.after ?? "") === (e.before ?? "");
|
|
66
|
+
}
|
|
67
|
+
function U(e, n) {
|
|
50
68
|
let r = n.target.value;
|
|
51
|
-
|
|
69
|
+
I("edit", e.name, t(r, z(e)));
|
|
70
|
+
}
|
|
71
|
+
function W(e) {
|
|
72
|
+
I("edit", e.name, e.before ?? "");
|
|
52
73
|
}
|
|
53
|
-
return (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
]),
|
|
58
|
-
key:
|
|
59
|
-
class: "
|
|
60
|
-
}, [
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
74
|
+
return (t, n) => l.detail ? (d(), o("div", h, [s("header", g, [
|
|
75
|
+
s("span", _, p(l.detail.title), 1),
|
|
76
|
+
s("span", v, p(l.detail.tag), 1),
|
|
77
|
+
s("span", { class: u(["badge badge-sm", L.value]) }, p(l.detail.change), 3)
|
|
78
|
+
]), R.value.length ? (d(), o("div", y, [(d(!0), o(r, null, f(R.value, (t) => (d(), o("div", {
|
|
79
|
+
key: t.name,
|
|
80
|
+
class: u(["rounded-md border px-2 py-1.5", V(t) ? "border-warning/40 bg-warning/5" : "border-base-200"])
|
|
81
|
+
}, [s("div", b, [
|
|
82
|
+
s("span", {
|
|
83
|
+
class: "w-24 shrink-0 truncate opacity-70",
|
|
84
|
+
title: t.name
|
|
85
|
+
}, p(t.name), 9, x),
|
|
86
|
+
s("span", S, [
|
|
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)
|
|
70
94
|
]),
|
|
71
|
-
|
|
72
|
-
|
|
95
|
+
V(t) ? (d(), o("button", {
|
|
96
|
+
key: 0,
|
|
97
|
+
type: "button",
|
|
98
|
+
class: u(["btn btn-ghost btn-xs btn-square shrink-0", H(t) ? "text-info" : "opacity-60 hover:opacity-100"]),
|
|
99
|
+
title: H(t) ? "Keeping the current value — click again is a no-op" : `Keep current value: ${t.before || "(empty)"}`,
|
|
100
|
+
"aria-pressed": H(t),
|
|
101
|
+
"aria-label": "Keep current value",
|
|
102
|
+
onClick: (e) => W(t)
|
|
103
|
+
}, [c(m(e), { class: "size-3.5" })], 10, E)) : a("", !0),
|
|
104
|
+
t.conflict ? (d(), o("span", D, " conflict ")) : a("", !0)
|
|
105
|
+
]), V(t) ? (d(), o("p", O, [
|
|
106
|
+
n[1] ||= s("span", { class: "opacity-60" }, "current", -1),
|
|
107
|
+
s("span", k, p(t.before || "∅"), 1),
|
|
108
|
+
H(t) ? (d(), o("span", j, "kept")) : (d(), o(r, { key: 0 }, [n[0] ||= s("span", { class: "opacity-50" }, "→", -1), s("span", A, p(t.after || "∅"), 1)], 64))
|
|
109
|
+
])) : a("", !0)], 2))), 128))])) : (d(), o("div", M, "No editable fields. See the diff below."))])) : (d(), o("div", N, " Select an element to see its changes. "));
|
|
73
110
|
}
|
|
74
111
|
});
|
|
75
112
|
//#endregion
|
|
76
|
-
export {
|
|
113
|
+
export { P as default };
|