@septkit/ui 0.0.81 → 0.0.83
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/create-document-store.js +4 -4
- package/dist/external/.pnpm/{@dialecte_core@0.9.0/node_modules/@dialecte/core/dist/dialecte-oAXwOG-Q.js → @dialecte_core@0.10.0/node_modules/@dialecte/core/dist/dialecte-CVLWSkgW.js} +1 -1
- package/dist/external/.pnpm/@dialecte_core@0.10.0/node_modules/@dialecte/core/dist/helpers-D8p0KiJu.js +130 -0
- package/dist/external/.pnpm/@dialecte_core@0.10.0/node_modules/@dialecte/core/dist/index.js +6 -0
- package/dist/external/.pnpm/{@dialecte_core@0.9.0 → @dialecte_core@0.10.0}/node_modules/@dialecte/core/dist/project-key-2ccZ-0gu.js +1 -1
- package/dist/external/.pnpm/{@dialecte_core@0.9.0 → @dialecte_core@0.10.0}/node_modules/@dialecte/core/dist/rolldown-runtime-CYdcPHCu.js +1 -1
- package/dist/external/.pnpm/{@dialecte_core@0.9.0 → @dialecte_core@0.10.0}/node_modules/@dialecte/core/dist/running-operations-DCKvzlU7.js +1 -1
- package/dist/external/.pnpm/{@dialecte_core@0.9.0 → @dialecte_core@0.10.0}/node_modules/@dialecte/core/dist/same-json-value-_AChwM_n.js +1 -1
- package/dist/external/.pnpm/{@dialecte_core@0.9.0 → @dialecte_core@0.10.0}/node_modules/@dialecte/core/dist/utils-Cv4oHia0.js +79 -102
- package/dist/external/.pnpm/@dialecte_core@0.10.0/node_modules/@dialecte/core/dist/utils.js +2 -0
- package/dist/external/.pnpm/@vueuse_core@14.3.0_vue@3.5.39_typescript@5.8.3_/node_modules/@vueuse/core/dist/index.js +59 -117
- package/dist/external/.pnpm/@vueuse_shared@14.3.0_vue@3.5.39_typescript@5.8.3_/node_modules/@vueuse/shared/dist/index.js +57 -60
- package/dist/index.d.ts +49 -1960
- package/dist/index.js +19 -27
- package/dist/selector-input/index.js +3 -3
- package/dist/selector-input/selector-input.js +4 -89
- package/dist/selector-input/selector-input.vue_vue_type_script_setup_true_lang.js +91 -89
- package/dist/selector-input/selector-xpath.js +92 -0
- package/dist/ui.css +1 -1
- package/package.json +3 -3
- package/dist/external/.pnpm/@dialecte_core@0.9.0/node_modules/@dialecte/core/dist/helpers-D8p0KiJu.js +0 -179
- package/dist/external/.pnpm/@dialecte_core@0.9.0/node_modules/@dialecte/core/dist/helpers.js +0 -3
- package/dist/external/.pnpm/@dialecte_core@0.9.0/node_modules/@dialecte/core/dist/index.js +0 -6
- package/dist/external/.pnpm/@dialecte_core@0.9.0/node_modules/@dialecte/core/dist/utils.js +0 -2
- package/dist/external/.pnpm/@dialecte_scl@0.14.0_libxml2-wasm@0.7.2_vitest@4.1.10/node_modules/@dialecte/scl/dist/declaration.constants-DSLNk1wh.js +0 -45065
- package/dist/external/.pnpm/@dialecte_scl@0.14.0_libxml2-wasm@0.7.2_vitest@4.1.10/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/arrow-right.js +0 -11
- package/dist/external/.pnpm/@lucide_vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/list-tree.js +0 -26
- package/dist/external/.pnpm/reka-ui@2.10.1_vue@3.5.39_typescript@5.8.3_/node_modules/reka-ui/dist/Stepper/StepperIndicator.js +0 -27
- package/dist/external/.pnpm/reka-ui@2.10.1_vue@3.5.39_typescript@5.8.3_/node_modules/reka-ui/dist/Stepper/StepperItem.js +0 -67
- package/dist/external/.pnpm/reka-ui@2.10.1_vue@3.5.39_typescript@5.8.3_/node_modules/reka-ui/dist/Stepper/StepperRoot.js +0 -136
- package/dist/external/.pnpm/reka-ui@2.10.1_vue@3.5.39_typescript@5.8.3_/node_modules/reka-ui/dist/Stepper/StepperTitle.js +0 -28
- package/dist/external/.pnpm/reka-ui@2.10.1_vue@3.5.39_typescript@5.8.3_/node_modules/reka-ui/dist/Stepper/StepperTrigger.js +0 -97
- package/dist/external/.pnpm/reka-ui@2.10.1_vue@3.5.39_typescript@5.8.3_/node_modules/reka-ui/dist/shared/useArrowNavigation.js +0 -31
- package/dist/merge/check-files/components/merge-preflight.js +0 -5
- package/dist/merge/check-files/components/merge-preflight.vue_vue_type_script_setup_true_lang.js +0 -53
- package/dist/merge/check-files/flags.js +0 -17
- package/dist/merge/check-files/identity-warning.js +0 -19
- package/dist/merge/confirm/components/merge-summary.js +0 -5
- package/dist/merge/confirm/components/merge-summary.vue_vue_type_script_setup_true_lang.js +0 -207
- package/dist/merge/confirm/landings.js +0 -34
- package/dist/merge/confirm/outcome.js +0 -179
- package/dist/merge/confirm/summary.js +0 -57
- package/dist/merge/done/applied-counts.js +0 -16
- package/dist/merge/done/applied-focus.js +0 -15
- package/dist/merge/help.js +0 -76
- package/dist/merge/index.js +0 -8
- package/dist/merge/match/components/merge-map.js +0 -5
- package/dist/merge/match/components/merge-map.vue_vue_type_script_setup_true_lang.js +0 -230
- package/dist/merge/match/match.js +0 -210
- package/dist/merge/review/affix.js +0 -14
- package/dist/merge/review/change-badge.js +0 -10
- package/dist/merge/review/components/decision-toggle.js +0 -5
- package/dist/merge/review/components/decision-toggle.vue_vue_type_script_setup_true_lang.js +0 -80
- package/dist/merge/review/components/element-detail.js +0 -5
- package/dist/merge/review/components/element-detail.vue_vue_type_script_setup_true_lang.js +0 -210
- package/dist/merge/review/components/merge-tree.js +0 -5
- package/dist/merge/review/components/merge-tree.vue_vue_type_script_setup_true_lang.js +0 -192
- package/dist/merge/review/components/type-name-authority.js +0 -5
- package/dist/merge/review/components/type-name-authority.vue_vue_type_script_setup_true_lang.js +0 -47
- package/dist/merge/review/decision.js +0 -12
- package/dist/merge/review/detail.js +0 -63
- package/dist/merge/review/highlight.js +0 -44
- package/dist/merge/review/marks.js +0 -17
- package/dist/merge/review/navigation.js +0 -82
- package/dist/merge/review/title.js +0 -7
- package/dist/merge/review/tree.js +0 -138
- package/dist/merge/session/components/merge-help.js +0 -7
- package/dist/merge/session/components/merge-help.vue_vue_type_script_setup_true_lang.js +0 -109
- package/dist/merge/session/components/merge-progress.js +0 -5
- package/dist/merge/session/components/merge-progress.vue_vue_type_script_setup_true_lang.js +0 -23
- package/dist/merge/session/components/merge-review.js +0 -5
- package/dist/merge/session/components/merge-review.vue_vue_type_script_setup_true_lang.js +0 -895
- package/dist/merge/session/merge.service.js +0 -113
- package/dist/merge/session/shortcuts.js +0 -22
- package/dist/merge/session/staged-writes.js +0 -47
- package/dist/merge/session/steps.js +0 -21
- package/dist/merge/session/use-document-progress.js +0 -26
- package/dist/merge/session/use-merge-session.js +0 -372
- package/dist/merge/wording.js +0 -123
- package/dist/selector-input/selector-input2.js +0 -5
|
@@ -1,230 +0,0 @@
|
|
|
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/arrow-right.js";
|
|
2
|
-
import t from "../../../external/.pnpm/@lucide_vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/info.js";
|
|
3
|
-
import n from "../../../external/.pnpm/@lucide_vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/map-pin.js";
|
|
4
|
-
import r 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";
|
|
5
|
-
import ee from "../../../dropdown/combobox.js";
|
|
6
|
-
import "../../../dropdown/index.js";
|
|
7
|
-
import i from "../../../icons/element-badge.js";
|
|
8
|
-
import "../../../icons/index.js";
|
|
9
|
-
import { arrangeTargets as a, describeTarget as o, needsChoice as s } from "../match.js";
|
|
10
|
-
import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createTextVNode as m, createVNode as h, defineComponent as g, normalizeClass as te, openBlock as _, renderList as v, toDisplayString as y, unref as b, withCtx as x } from "vue";
|
|
11
|
-
//#region lib/merge/match/components/merge-map.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
-
var ne = { class: "flex h-full min-h-0 flex-col" }, re = { class: "min-h-0 flex-1 overflow-auto p-4" }, ie = { class: "mx-auto max-w-3xl space-y-5" }, ae = {
|
|
13
|
-
"data-testid": "map-intro",
|
|
14
|
-
class: "mt-0.5 max-w-prose text-sm text-base-content/80"
|
|
15
|
-
}, oe = {
|
|
16
|
-
key: 0,
|
|
17
|
-
"data-testid": "map-notice",
|
|
18
|
-
class: "flex items-start gap-2 rounded-box border border-info/40 bg-info/5 px-3 py-2 text-sm"
|
|
19
|
-
}, se = { class: "flex items-center gap-2 text-sm font-semibold" }, ce = {
|
|
20
|
-
key: 0,
|
|
21
|
-
class: "inline-flex items-center justify-center rounded-full bg-base-300 p-1",
|
|
22
|
-
"aria-hidden": "true"
|
|
23
|
-
}, le = {
|
|
24
|
-
"data-testid": "map-group-count",
|
|
25
|
-
class: "font-normal text-base-content/80"
|
|
26
|
-
}, S = { class: "divide-y divide-base-300 rounded-box border border-base-300" }, C = ["data-testid"], w = { class: "flex flex-wrap items-center gap-2" }, T = { class: "flex min-w-32 items-center gap-1.5 font-medium" }, E = {
|
|
27
|
-
key: 1,
|
|
28
|
-
"data-testid": "map-row-for",
|
|
29
|
-
class: "text-xs font-normal text-base-content/80"
|
|
30
|
-
}, D = {
|
|
31
|
-
key: 0,
|
|
32
|
-
"data-testid": "map-new-badge",
|
|
33
|
-
class: "badge badge-soft badge-success badge-sm shrink-0"
|
|
34
|
-
}, O = { class: "min-w-56 flex-1" }, k = { class: "flex min-w-0 flex-col gap-0.5" }, A = { class: "truncate font-medium" }, j = { class: "truncate opacity-90" }, M = {
|
|
35
|
-
key: 1,
|
|
36
|
-
"data-testid": "map-created-under",
|
|
37
|
-
class: "text-xs text-base-content/80"
|
|
38
|
-
}, N = ["onClick"], P = {
|
|
39
|
-
key: 0,
|
|
40
|
-
class: "mt-1.5 flex items-center gap-1.5 text-xs text-base-content/80"
|
|
41
|
-
}, F = ["id"], I = {
|
|
42
|
-
key: 1,
|
|
43
|
-
"data-testid": "map-row-note",
|
|
44
|
-
class: "mt-1.5 flex items-center gap-1.5 text-xs text-base-content/80"
|
|
45
|
-
}, L = {
|
|
46
|
-
key: 2,
|
|
47
|
-
"data-testid": "map-taken-name",
|
|
48
|
-
class: "mt-1.5 flex flex-wrap items-center gap-2 text-xs"
|
|
49
|
-
}, R = ["id"], z = ["onClick"], B = {
|
|
50
|
-
key: 1,
|
|
51
|
-
"data-testid": "map-automatic",
|
|
52
|
-
class: "rounded-box border border-base-300"
|
|
53
|
-
}, ue = { class: "cursor-pointer px-3 py-2 text-sm font-medium" }, V = { class: "space-y-3 border-t border-base-300 px-3 py-2" }, H = { class: "text-xs font-semibold text-base-content/80" }, U = { class: "mt-1 space-y-1" }, de = ["data-testid"], fe = { class: "font-medium" }, pe = { class: "text-xs text-base-content/80" }, W = "__new__", me = 100, G = /*@__PURE__*/ g({
|
|
54
|
-
__name: "merge-map",
|
|
55
|
-
props: {
|
|
56
|
-
view: {},
|
|
57
|
-
notice: {}
|
|
58
|
-
},
|
|
59
|
-
emits: ["map"],
|
|
60
|
-
setup(g, { emit: G }) {
|
|
61
|
-
let K = g, q = G, he = [
|
|
62
|
-
"",
|
|
63
|
-
"pl-8",
|
|
64
|
-
"pl-14"
|
|
65
|
-
], ge = l(() => {
|
|
66
|
-
let e = [...K.view.changeable, ...K.view.automatic].map((e) => e.tag), t = [];
|
|
67
|
-
return e.includes("Placement") && t.push("Choose where each level of the template goes. A level follows from the one above it."), e.some((e) => e !== "Placement") && t.push("Roles and categories are shared across the project: reuse one the project already has, or create a new one."), t.join(" ");
|
|
68
|
-
}), J = l(() => K.view.automatic.reduce((e, t) => e + t.rows.length, 0));
|
|
69
|
-
function _e(e) {
|
|
70
|
-
return e.target.kind === "existing" ? {
|
|
71
|
-
id: e.target.id,
|
|
72
|
-
title: e.target.title,
|
|
73
|
-
path: e.target.path
|
|
74
|
-
} : e.target.kind === "create" ? {
|
|
75
|
-
id: W,
|
|
76
|
-
title: e.target.name,
|
|
77
|
-
path: e.target.parentPath ?? ""
|
|
78
|
-
} : null;
|
|
79
|
-
}
|
|
80
|
-
function Y(e) {
|
|
81
|
-
return e;
|
|
82
|
-
}
|
|
83
|
-
function ve(e) {
|
|
84
|
-
let t = Y(e);
|
|
85
|
-
return t.id === W ? t.title : t.path || t.title;
|
|
86
|
-
}
|
|
87
|
-
function ye(e) {
|
|
88
|
-
let t = Y(e);
|
|
89
|
-
return `${t.title} ${t.path}`;
|
|
90
|
-
}
|
|
91
|
-
function X(e, t) {
|
|
92
|
-
if (!(!t || t.includes("/"))) return e.candidates.some((e) => e.title === t) ? void 0 : t;
|
|
93
|
-
}
|
|
94
|
-
function Z(e) {
|
|
95
|
-
let t = e.target.kind === "create" && e.target.parentPath ? ` in ${e.target.parentPath}` : "";
|
|
96
|
-
return (n) => {
|
|
97
|
-
let r = X(e, n);
|
|
98
|
-
return `${r ? `Create “${r}”` : "Create new"}${t}`;
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
function Q(e) {
|
|
102
|
-
return e.target.kind === "undecided" && !e.ambiguous;
|
|
103
|
-
}
|
|
104
|
-
function be(e, t) {
|
|
105
|
-
let n = t ? Y(t) : void 0;
|
|
106
|
-
!n || n.id === W || q("map", e.id, { existing: {
|
|
107
|
-
tagName: e.tag,
|
|
108
|
-
id: n.id
|
|
109
|
-
} });
|
|
110
|
-
}
|
|
111
|
-
function xe(e, t) {
|
|
112
|
-
let n = X(e, t);
|
|
113
|
-
q("map", e.id, { create: n ? { name: n } : {} });
|
|
114
|
-
}
|
|
115
|
-
function $(e) {
|
|
116
|
-
return e.target.kind === "create" && !!e.written && e.written.name !== e.target.name;
|
|
117
|
-
}
|
|
118
|
-
function Se(e) {
|
|
119
|
-
let t = e.rows.filter(s).length;
|
|
120
|
-
return t ? `${e.rows.length} · ${t} to choose` : `${e.rows.length}`;
|
|
121
|
-
}
|
|
122
|
-
function Ce(e) {
|
|
123
|
-
e.existingNamedAlike && q("map", e.id, { existing: {
|
|
124
|
-
tagName: e.tag,
|
|
125
|
-
id: e.existingNamedAlike.id
|
|
126
|
-
} });
|
|
127
|
-
}
|
|
128
|
-
return (l, W) => (_(), f("div", ne, [p("div", re, [p("div", ie, [
|
|
129
|
-
p("div", null, [W[0] ||= p("h2", { class: "text-base font-semibold" }, "Match with your project", -1), p("p", ae, y(ge.value), 1)]),
|
|
130
|
-
g.notice ? (_(), f("p", oe, [h(b(t), { class: "mt-0.5 size-4 shrink-0 text-info" }), p("span", null, y(g.notice), 1)])) : d("", !0),
|
|
131
|
-
(_(!0), f(c, null, v(g.view.changeable, (o) => (_(), f("section", {
|
|
132
|
-
key: o.tag,
|
|
133
|
-
class: "space-y-2"
|
|
134
|
-
}, [p("h3", se, [
|
|
135
|
-
o.tag === b("Placement") ? (_(), f("span", ce, [h(b(n), { class: "size-3.5" })])) : (_(), u(b(i), {
|
|
136
|
-
key: 1,
|
|
137
|
-
"tag-name": o.tag,
|
|
138
|
-
size: "sm"
|
|
139
|
-
}, null, 8, ["tag-name"])),
|
|
140
|
-
m(" " + y(o.label) + " ", 1),
|
|
141
|
-
p("span", le, y(Se(o)), 1)
|
|
142
|
-
]), p("div", S, [(_(!0), f(c, null, v(o.rows, (n, c) => (_(), f("div", {
|
|
143
|
-
key: n.id,
|
|
144
|
-
"data-testid": `map-row-${n.id}`,
|
|
145
|
-
class: te(["p-3", [{ "bg-warning/5": n.ambiguous }, o.tag === b("Placement") ? he[c] : ""]])
|
|
146
|
-
}, [
|
|
147
|
-
p("div", w, [
|
|
148
|
-
p("span", T, [
|
|
149
|
-
o.tag === b("Placement") ? (_(), u(b(i), {
|
|
150
|
-
key: 0,
|
|
151
|
-
"tag-name": n.tag,
|
|
152
|
-
size: "sm"
|
|
153
|
-
}, null, 8, ["tag-name"])) : d("", !0),
|
|
154
|
-
m(" " + y(n.title) + " ", 1),
|
|
155
|
-
n.decidedFor ? (_(), f("span", E, " for " + y(n.decidedFor), 1)) : d("", !0)
|
|
156
|
-
]),
|
|
157
|
-
h(b(e), { class: "size-4 shrink-0 text-base-content/60" }),
|
|
158
|
-
n.target.kind === "create" ? (_(), f("span", D, " new ")) : d("", !0),
|
|
159
|
-
p("div", O, [h(b(ee), {
|
|
160
|
-
"model-value": _e(n),
|
|
161
|
-
options: b(a)(n).options,
|
|
162
|
-
"display-value": ve,
|
|
163
|
-
"get-key": (e) => Y(e).id,
|
|
164
|
-
"search-text": ye,
|
|
165
|
-
"group-of": (e) => b(a)(n).groupOf(Y(e)),
|
|
166
|
-
limit: me,
|
|
167
|
-
"action-label": Z(n),
|
|
168
|
-
placeholder: "Choose…",
|
|
169
|
-
"empty-text": void 0,
|
|
170
|
-
size: "sm",
|
|
171
|
-
color: b(s)(n) && !Q(n) ? "warning" : "neutral",
|
|
172
|
-
disabled: Q(n),
|
|
173
|
-
"aria-label": `Where ${n.title} lands`,
|
|
174
|
-
"aria-describedby": `map-hint-${n.id}`,
|
|
175
|
-
"onUpdate:modelValue": (e) => be(n, e),
|
|
176
|
-
onAction: (e) => xe(n, e)
|
|
177
|
-
}, {
|
|
178
|
-
default: x(({ item: e }) => [p("span", k, [p("span", A, y(Y(e).title), 1), p("span", j, y(Y(e).path), 1)])]),
|
|
179
|
-
_: 1
|
|
180
|
-
}, 8, [
|
|
181
|
-
"model-value",
|
|
182
|
-
"options",
|
|
183
|
-
"get-key",
|
|
184
|
-
"group-of",
|
|
185
|
-
"action-label",
|
|
186
|
-
"color",
|
|
187
|
-
"disabled",
|
|
188
|
-
"aria-label",
|
|
189
|
-
"aria-describedby",
|
|
190
|
-
"onUpdate:modelValue",
|
|
191
|
-
"onAction"
|
|
192
|
-
])]),
|
|
193
|
-
n.target.kind === "create" && n.target.parentPath ? (_(), f("span", M, " in " + y(n.target.parentPath), 1)) : d("", !0),
|
|
194
|
-
n.chosen ? (_(), f("button", {
|
|
195
|
-
key: 2,
|
|
196
|
-
"data-testid": "map-undo",
|
|
197
|
-
type: "button",
|
|
198
|
-
class: "btn btn-ghost btn-sm",
|
|
199
|
-
title: "Undo your choice: the merge decides where it lands again",
|
|
200
|
-
onClick: (e) => q("map", n.id, void 0)
|
|
201
|
-
}, " Undo choice ", 8, N)) : d("", !0)
|
|
202
|
-
]),
|
|
203
|
-
$(n) ? d("", !0) : (_(), f("p", P, [n.ambiguous ? (_(), u(b(r), {
|
|
204
|
-
key: 0,
|
|
205
|
-
class: "size-3.5 shrink-0 text-warning"
|
|
206
|
-
})) : d("", !0), p("span", { id: `map-hint-${n.id}` }, y(n.hint), 9, F)])),
|
|
207
|
-
n.note ? (_(), f("p", I, [h(b(t), { class: "size-3.5 shrink-0" }), m(y(n.note), 1)])) : d("", !0),
|
|
208
|
-
n.target.kind === "create" && n.written && $(n) ? (_(), f("p", L, [p("span", { id: `map-hint-${n.id}` }, " “" + y(n.target.name) + "” is already used here, so the new element is named “" + y(n.written.name) + "”. ", 9, R), n.existingNamedAlike ? (_(), f("button", {
|
|
209
|
-
key: 0,
|
|
210
|
-
"data-testid": "map-reuse-taken",
|
|
211
|
-
type: "button",
|
|
212
|
-
class: "btn btn-outline btn-sm",
|
|
213
|
-
onClick: (e) => Ce(n)
|
|
214
|
-
}, " Use " + y(n.existingNamedAlike.path || n.existingNamedAlike.title) + " instead ", 9, z)) : d("", !0)])) : d("", !0)
|
|
215
|
-
], 10, C))), 128))])]))), 128)),
|
|
216
|
-
J.value > 0 ? (_(), f("details", B, [p("summary", ue, y(J.value) + " kept automatically ", 1), p("div", V, [(_(!0), f(c, null, v(g.view.automatic, (t) => (_(), f("div", { key: t.tag }, [p("h3", H, y(t.label), 1), p("ul", U, [(_(!0), f(c, null, v(t.rows, (t) => (_(), f("li", {
|
|
217
|
-
key: t.id,
|
|
218
|
-
"data-testid": `map-row-${t.id}`,
|
|
219
|
-
class: "flex flex-wrap items-center gap-2 text-sm"
|
|
220
|
-
}, [
|
|
221
|
-
p("span", fe, y(t.title), 1),
|
|
222
|
-
h(b(e), { class: "size-3.5 shrink-0 text-base-content/60" }),
|
|
223
|
-
p("span", null, y(b(o)(t)), 1),
|
|
224
|
-
p("span", pe, y(t.hint), 1)
|
|
225
|
-
], 8, de))), 128))])]))), 128))])])) : d("", !0)
|
|
226
|
-
])])]));
|
|
227
|
-
}
|
|
228
|
-
});
|
|
229
|
-
//#endregion
|
|
230
|
-
export { G as default };
|
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
import { f as e } from "../../external/.pnpm/@dialecte_core@0.9.0/node_modules/@dialecte/core/dist/helpers-D8p0KiJu.js";
|
|
2
|
-
import "../../external/.pnpm/@dialecte_core@0.9.0/node_modules/@dialecte/core/dist/helpers.js";
|
|
3
|
-
import "../../external/.pnpm/@dialecte_scl@0.14.0_libxml2-wasm@0.7.2_vitest@4.1.10/node_modules/@dialecte/scl/dist/declaration.constants-DSLNk1wh.js";
|
|
4
|
-
import "../../external/.pnpm/@dialecte_scl@0.14.0_libxml2-wasm@0.7.2_vitest@4.1.10/node_modules/@dialecte/scl/dist/v2019C1/index.js";
|
|
5
|
-
import { extractTitle as t } from "../session/merge.service.js";
|
|
6
|
-
//#region lib/merge/match/match.ts
|
|
7
|
-
async function n(e) {
|
|
8
|
-
let { mappings: t, sourceQuery: n, targetQuery: r } = e, i = [], a = [];
|
|
9
|
-
for (let e of t) e.locked ? a.push(e) : i.push(e);
|
|
10
|
-
return {
|
|
11
|
-
changeable: await v({
|
|
12
|
-
mappings: i,
|
|
13
|
-
sourceQuery: n,
|
|
14
|
-
targetQuery: r
|
|
15
|
-
}),
|
|
16
|
-
automatic: await v({
|
|
17
|
-
mappings: a,
|
|
18
|
-
sourceQuery: n,
|
|
19
|
-
targetQuery: r
|
|
20
|
-
})
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
function r(e) {
|
|
24
|
-
let t = /* @__PURE__ */ new Set();
|
|
25
|
-
for (let { mapping: n, projectOwned: r } of c(e)) r && n && "existing" in n && n.existing.id && t.add(n.existing.id);
|
|
26
|
-
return t;
|
|
27
|
-
}
|
|
28
|
-
function i(e) {
|
|
29
|
-
let { report: t, stagedId: n, sourceId: r, titleOf: i } = e, s = c(t), l = (e) => {
|
|
30
|
-
let t = i?.(e);
|
|
31
|
-
return t ? `the template's ${t}` : "an element of the template";
|
|
32
|
-
}, u = s.find((e) => e.mapping && "existing" in e.mapping && e.mapping.existing.id === n);
|
|
33
|
-
if (u?.projectOwned) return `${o(l(a(u)))} reuses this element of the project: it keeps its own name and attributes and only gains what the template brings.`;
|
|
34
|
-
if (u) return `Created for ${l(a(u))} by an earlier placement: it follows the template.`;
|
|
35
|
-
let d = s.find((e) => a(e) === r && e.mapping && "create" in e.mapping);
|
|
36
|
-
if (d) {
|
|
37
|
-
let e = d.parentPath ? ` in ${d.parentPath}` : "";
|
|
38
|
-
return `New, created for ${l(a(d))}${e}.`;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
function a(e) {
|
|
42
|
-
return e.sourceId ?? e.id;
|
|
43
|
-
}
|
|
44
|
-
function o(e) {
|
|
45
|
-
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
46
|
-
}
|
|
47
|
-
function s(e) {
|
|
48
|
-
if (e.target.kind === "undecided") return "to choose";
|
|
49
|
-
if (e.target.kind === "create") {
|
|
50
|
-
let { name: t, parentPath: n } = e.written ?? e.target;
|
|
51
|
-
return `new: ${t}${n ? ` in ${n}` : ""}`;
|
|
52
|
-
}
|
|
53
|
-
return e.target.path || e.target.title;
|
|
54
|
-
}
|
|
55
|
-
function c(e) {
|
|
56
|
-
return [...e.mappings, ...e.instances.flatMap((e) => e.mappings)];
|
|
57
|
-
}
|
|
58
|
-
function l(e) {
|
|
59
|
-
if (!e) return;
|
|
60
|
-
let t = u(e.templateLevel);
|
|
61
|
-
return `This template was made for ${t}; you started from ${u(e.startedFrom)}. Its content lands in ${t}, below where you started.`;
|
|
62
|
-
}
|
|
63
|
-
function u(e) {
|
|
64
|
-
return `a ${(m[e] ?? e).toLowerCase()}`;
|
|
65
|
-
}
|
|
66
|
-
function d(e) {
|
|
67
|
-
return e.changeable.length > 0;
|
|
68
|
-
}
|
|
69
|
-
function f(e) {
|
|
70
|
-
return e.changeable.some((e) => e.rows.some(p));
|
|
71
|
-
}
|
|
72
|
-
function p(e) {
|
|
73
|
-
return e.target.kind === "undecided";
|
|
74
|
-
}
|
|
75
|
-
var m = {
|
|
76
|
-
Substation: "Substation",
|
|
77
|
-
VoltageLevel: "Voltage level",
|
|
78
|
-
Bay: "Bay"
|
|
79
|
-
}, h = "Placement", g = {
|
|
80
|
-
Function: "Functions",
|
|
81
|
-
AllocationRole: "Allocation roles",
|
|
82
|
-
FunctionCategory: "Function categories"
|
|
83
|
-
}, _ = Object.keys(g);
|
|
84
|
-
async function v(e) {
|
|
85
|
-
let { mappings: t, sourceQuery: n, targetQuery: r } = e, i = [], a = /* @__PURE__ */ new Map();
|
|
86
|
-
for (let e of t) {
|
|
87
|
-
let t = await b({
|
|
88
|
-
mapping: e,
|
|
89
|
-
sourceQuery: n,
|
|
90
|
-
targetQuery: r
|
|
91
|
-
});
|
|
92
|
-
e.kind === "level" ? i.push(t) : a.set(e.tagName, [...a.get(e.tagName) ?? [], t]);
|
|
93
|
-
}
|
|
94
|
-
let o = [...a.entries()].sort(([e], [t]) => y(e) - y(t)).map(([e, t]) => ({
|
|
95
|
-
tag: e,
|
|
96
|
-
label: g[e] ?? e,
|
|
97
|
-
rows: [...t.filter((e) => e.ambiguous), ...t.filter((e) => !e.ambiguous)]
|
|
98
|
-
}));
|
|
99
|
-
return i.length === 0 ? o : [{
|
|
100
|
-
tag: h,
|
|
101
|
-
label: h,
|
|
102
|
-
rows: i
|
|
103
|
-
}, ...o];
|
|
104
|
-
}
|
|
105
|
-
function y(e) {
|
|
106
|
-
let t = _.indexOf(e);
|
|
107
|
-
return t === -1 ? _.length : t;
|
|
108
|
-
}
|
|
109
|
-
async function b(n) {
|
|
110
|
-
let { mapping: r, sourceQuery: i, targetQuery: o } = n, s = {
|
|
111
|
-
tagName: r.tagName,
|
|
112
|
-
id: a(r)
|
|
113
|
-
}, c = r.placedFor && o ? await t(o, e(r.placedFor)) : void 0, l = r.candidates.map((e) => ({
|
|
114
|
-
id: e.ref.id ?? "",
|
|
115
|
-
title: e.title,
|
|
116
|
-
path: e.path
|
|
117
|
-
})), u = await t(i, s), d = r.kind === "level", f = d && u === "TEMPLATE", p = f ? m[r.tagName] : u;
|
|
118
|
-
return {
|
|
119
|
-
id: r.id,
|
|
120
|
-
tag: r.tagName,
|
|
121
|
-
title: p,
|
|
122
|
-
...c ? { decidedFor: c } : {},
|
|
123
|
-
target: S({
|
|
124
|
-
mapping: r,
|
|
125
|
-
candidates: l
|
|
126
|
-
}),
|
|
127
|
-
hint: d ? w({
|
|
128
|
-
mapping: r,
|
|
129
|
-
context: f
|
|
130
|
-
}) : C(r),
|
|
131
|
-
ambiguous: r.ambiguous,
|
|
132
|
-
chosen: r.reason === "decision",
|
|
133
|
-
candidates: l
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
function x(e, t) {
|
|
137
|
-
let n = (e) => ({
|
|
138
|
-
...e,
|
|
139
|
-
rows: e.rows.map((e) => {
|
|
140
|
-
let { written: n, existingNamedAlike: r, ...i } = e, a = t.get(e.id);
|
|
141
|
-
if (e.target.kind !== "create" || !a) return i;
|
|
142
|
-
let o = e.target;
|
|
143
|
-
if (a.name === o.name && a.parentPath === o.parentPath) return i;
|
|
144
|
-
let s = a.name === o.name ? void 0 : e.candidates.find((e) => e.title === o.name);
|
|
145
|
-
return {
|
|
146
|
-
...i,
|
|
147
|
-
written: a,
|
|
148
|
-
...s ? { existingNamedAlike: s } : {}
|
|
149
|
-
};
|
|
150
|
-
})
|
|
151
|
-
});
|
|
152
|
-
return {
|
|
153
|
-
changeable: e.changeable.map(n),
|
|
154
|
-
automatic: e.automatic.map(n)
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
function S(e) {
|
|
158
|
-
let { mapping: t, candidates: n } = e;
|
|
159
|
-
if (!t.mapping) return { kind: "undecided" };
|
|
160
|
-
if ("create" in t.mapping) return {
|
|
161
|
-
kind: "create",
|
|
162
|
-
name: t.mapping.create.name ?? "",
|
|
163
|
-
...t.parentPath ? { parentPath: t.parentPath } : {}
|
|
164
|
-
};
|
|
165
|
-
let r = t.mapping.existing.id ?? "", i = n.find((e) => e.id === r);
|
|
166
|
-
return {
|
|
167
|
-
kind: "existing",
|
|
168
|
-
id: r,
|
|
169
|
-
title: i?.title ?? "",
|
|
170
|
-
path: i?.path ?? ""
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
function C(e) {
|
|
174
|
-
if (e.locked) return "Already used by this instance";
|
|
175
|
-
if (e.ambiguous && e.reason === "none") return "May be an element this instance already uses — pick it to keep it";
|
|
176
|
-
if (e.ambiguous) return "Several of that name in the project: choose one, or create a new one";
|
|
177
|
-
switch (e.reason) {
|
|
178
|
-
case "decision": return "Your choice";
|
|
179
|
-
case "lineage": return "Created by an earlier placement of this template";
|
|
180
|
-
case "name": return "Same name in the project";
|
|
181
|
-
case "none": return "Nothing of that name in the project";
|
|
182
|
-
case "anchor":
|
|
183
|
-
case "only": return w({
|
|
184
|
-
mapping: e,
|
|
185
|
-
context: !1
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
function w(e) {
|
|
190
|
-
let { mapping: t, context: n } = e;
|
|
191
|
-
if (t.locked) return "Already used by this instance";
|
|
192
|
-
if (!t.mapping) return t.ambiguous ? "Several there — choose one, or have a new one created" : "Follows from the level above";
|
|
193
|
-
switch (t.reason) {
|
|
194
|
-
case "decision": return "Your choice";
|
|
195
|
-
case "anchor": return "Where you started";
|
|
196
|
-
case "only": return "The only one there";
|
|
197
|
-
case "lineage": return "Created by an earlier placement of this template";
|
|
198
|
-
case "name": return "Same name in the project";
|
|
199
|
-
case "none": return n ? "None there yet" : "Created from the template";
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
function T(e) {
|
|
203
|
-
let t = /* @__PURE__ */ new Set([e.title, ...e.target.kind === "create" ? [e.target.name] : []]), n = (e) => t.has(e.title);
|
|
204
|
-
return {
|
|
205
|
-
options: [...e.candidates.filter(n), ...e.candidates.filter((e) => !n(e))],
|
|
206
|
-
groupOf: (e) => n(e) ? "Same name" : "Others in the project"
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
//#endregion
|
|
210
|
-
export { h as PLACEMENT_GROUP, T as arrangeTargets, n as buildMapView, r as collectMappedOntoIds, i as describeMappingOf, l as describeOffLevel, s as describeTarget, d as hasMapStep, f as hasUndecided, p as needsChoice, a as sourceIdOf, x as withWrittenTargets };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
//#region lib/merge/review/affix.ts
|
|
2
|
-
function e(e, t) {
|
|
3
|
-
let n = t?.prefix ?? "", r = t?.suffix ?? "", i = e, a = n, o = r;
|
|
4
|
-
return n && i.startsWith(n) ? i = i.slice(n.length) : n && i.includes(n) && (a = ""), r && i.endsWith(r) ? i = i.slice(0, i.length - r.length) : r && i.includes(r) && (o = ""), {
|
|
5
|
-
prefix: a,
|
|
6
|
-
core: i,
|
|
7
|
-
suffix: o
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
function t(e, t) {
|
|
11
|
-
return `${t?.prefix ?? ""}${e}${t?.suffix ?? ""}`;
|
|
12
|
-
}
|
|
13
|
-
//#endregion
|
|
14
|
-
export { t as composeAffix, e as splitAffix };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
//#region lib/merge/review/change-badge.ts
|
|
2
|
-
var e = {
|
|
3
|
-
added: "badge-soft badge-success",
|
|
4
|
-
removed: "badge-soft badge-error",
|
|
5
|
-
modified: "badge-soft badge-warning",
|
|
6
|
-
unchanged: "badge-soft badge-neutral",
|
|
7
|
-
"target-only": "badge-soft badge-info"
|
|
8
|
-
}, t = "badge-dash badge-neutral";
|
|
9
|
-
//#endregion
|
|
10
|
-
export { e as CHANGE_BADGE, t as LEFT_OUT_BADGE };
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createElementBlock as n, defineComponent as r, mergeModels as i, normalizeClass as a, openBlock as o, renderList as s, toDisplayString as c, useModel as l } from "vue";
|
|
2
|
-
//#region lib/merge/review/components/decision-toggle.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
-
var u = ["aria-label"], d = [
|
|
4
|
-
"disabled",
|
|
5
|
-
"aria-pressed",
|
|
6
|
-
"onClick"
|
|
7
|
-
], f = /*@__PURE__*/ r({
|
|
8
|
-
__name: "decision-toggle",
|
|
9
|
-
props: /*@__PURE__*/ i({
|
|
10
|
-
size: {},
|
|
11
|
-
disabled: { type: Boolean },
|
|
12
|
-
label: {},
|
|
13
|
-
change: {}
|
|
14
|
-
}, {
|
|
15
|
-
modelValue: { required: !0 },
|
|
16
|
-
modelModifiers: {}
|
|
17
|
-
}),
|
|
18
|
-
emits: ["update:modelValue"],
|
|
19
|
-
setup(r) {
|
|
20
|
-
let i = l(r, "modelValue"), f = r, p = {
|
|
21
|
-
added: [{
|
|
22
|
-
action: "accept",
|
|
23
|
-
label: "Add"
|
|
24
|
-
}, {
|
|
25
|
-
action: "skip",
|
|
26
|
-
label: "Leave out"
|
|
27
|
-
}],
|
|
28
|
-
modified: [{
|
|
29
|
-
action: "accept",
|
|
30
|
-
label: "Update"
|
|
31
|
-
}, {
|
|
32
|
-
action: "skip",
|
|
33
|
-
label: "Keep current"
|
|
34
|
-
}],
|
|
35
|
-
removed: [{
|
|
36
|
-
action: "accept",
|
|
37
|
-
label: "Remove"
|
|
38
|
-
}, {
|
|
39
|
-
action: "skip",
|
|
40
|
-
label: "Keep"
|
|
41
|
-
}],
|
|
42
|
-
"target-only": [{
|
|
43
|
-
action: "skip",
|
|
44
|
-
label: "Keep"
|
|
45
|
-
}, {
|
|
46
|
-
action: "accept",
|
|
47
|
-
label: "Remove"
|
|
48
|
-
}],
|
|
49
|
-
unchanged: [{
|
|
50
|
-
action: "accept",
|
|
51
|
-
label: "Accept"
|
|
52
|
-
}, {
|
|
53
|
-
action: "skip",
|
|
54
|
-
label: "Skip"
|
|
55
|
-
}]
|
|
56
|
-
}, m = {
|
|
57
|
-
accept: "btn-primary",
|
|
58
|
-
skip: "btn-neutral"
|
|
59
|
-
}, h = t(() => p[f.change ?? "unchanged"]), g = t(() => ({
|
|
60
|
-
xs: "btn-xs",
|
|
61
|
-
sm: "btn-sm",
|
|
62
|
-
md: "btn-md",
|
|
63
|
-
undefined: "btn-sm"
|
|
64
|
-
})[f.size ?? "undefined"]);
|
|
65
|
-
return (t, l) => (o(), n("div", {
|
|
66
|
-
class: "join",
|
|
67
|
-
role: "group",
|
|
68
|
-
"aria-label": `Decide on ${r.label ?? "this change"}`
|
|
69
|
-
}, [(o(!0), n(e, null, s(h.value, (e) => (o(), n("button", {
|
|
70
|
-
key: e.action,
|
|
71
|
-
type: "button",
|
|
72
|
-
class: a(["btn join-item font-semibold", [g.value, i.value === e.action ? m[e.action] : "btn-ghost"]]),
|
|
73
|
-
disabled: r.disabled,
|
|
74
|
-
"aria-pressed": i.value === e.action,
|
|
75
|
-
onClick: (t) => i.value = e.action
|
|
76
|
-
}, c(e.label), 11, d))), 128))], 8, u));
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
//#endregion
|
|
80
|
-
export { f as default };
|