@septkit/ui 0.0.67 → 0.0.69
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/button/button.vue_vue_type_script_setup_true_lang.js +20 -17
- package/dist/code/code-block.js +1 -1
- package/dist/code/code-block.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/diagram-layout/diagram-node-card.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/diagram-layout/diagram-node-group.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/dialecte/create-document-store.js +4 -3
- package/dist/dialog/dialog-host.vue_vue_type_script_setup_true_lang.js +9 -7
- package/dist/dialog/dialog.vue_vue_type_script_setup_true_lang.js +44 -35
- package/dist/dialog/use-dialog-host.js +12 -2
- package/dist/dropdown/combobox-options.js +17 -0
- package/dist/dropdown/combobox.vue_vue_type_script_setup_true_lang.js +155 -65
- package/dist/explorer/explorer.js +1 -1
- package/dist/explorer/explorer.vue_vue_type_script_setup_true_lang.js +52 -48
- package/dist/external/.pnpm/@dialecte_core@0.6.1/node_modules/@dialecte/core/dist/helpers.js +229 -0
- package/dist/external/.pnpm/@dialecte_core@0.6.1/node_modules/@dialecte/core/dist/index.js +3 -0
- package/dist/external/.pnpm/{@dialecte_core@0.5.2/node_modules/@dialecte/core/dist/project-Bd3fSPam.js → @dialecte_core@0.6.1/node_modules/@dialecte/core/dist/project-sK-5Xc-5.js} +1391 -1248
- package/dist/external/.pnpm/@dialecte_core@0.6.1/node_modules/@dialecte/core/dist/utils-CTBHUFs9.js +440 -0
- package/dist/external/.pnpm/@dialecte_core@0.6.1/node_modules/@dialecte/core/dist/utils.js +2 -0
- package/dist/external/.pnpm/@dialecte_scl@0.8.1/node_modules/@dialecte/scl/dist/hooks-C05NpRNi.js +44305 -0
- package/dist/external/.pnpm/@dialecte_scl@0.8.1/node_modules/@dialecte/scl/dist/v2019C1/index.js +22 -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 +117 -59
- package/dist/external/.pnpm/@vueuse_shared@14.3.0_vue@3.5.39_typescript@5.8.3_/node_modules/@vueuse/shared/dist/index.js +60 -57
- package/dist/external/.pnpm/reka-ui@2.10.1_vue@3.5.39_typescript@5.8.3_/node_modules/reka-ui/dist/Combobox/ComboboxGroup.js +39 -3
- package/dist/external/.pnpm/reka-ui@2.10.1_vue@3.5.39_typescript@5.8.3_/node_modules/reka-ui/dist/Combobox/ComboboxLabel.js +38 -0
- package/dist/external/.pnpm/reka-ui@2.10.1_vue@3.5.39_typescript@5.8.3_/node_modules/reka-ui/dist/Dialog/DialogDescription.js +30 -0
- package/dist/external/.pnpm/reka-ui@2.10.1_vue@3.5.39_typescript@5.8.3_/node_modules/reka-ui/dist/Listbox/ListboxGroup.js +27 -0
- 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 +97 -0
- 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 +31 -0
- package/dist/icons/element-badge.js +5 -0
- package/dist/icons/element-badge.vue_vue_type_script_setup_true_lang.js +29 -0
- package/dist/icons/index.js +4 -0
- package/dist/index.d.ts +1880 -81
- package/dist/index.js +36 -33
- package/dist/merge/{merge-preflight.js → check-files/components/merge-preflight.js} +1 -1
- package/dist/merge/check-files/components/merge-preflight.vue_vue_type_script_setup_true_lang.js +53 -0
- package/dist/merge/check-files/flags.js +17 -0
- package/dist/merge/check-files/identity-warning.js +18 -0
- package/dist/merge/{merge-summary.js → confirm/components/merge-summary.js} +1 -1
- package/dist/merge/confirm/components/merge-summary.vue_vue_type_script_setup_true_lang.js +207 -0
- package/dist/merge/confirm/landings.js +34 -0
- package/dist/merge/confirm/outcome.js +178 -0
- package/dist/merge/confirm/summary.js +57 -0
- package/dist/merge/done/applied-counts.js +16 -0
- package/dist/merge/done/applied-focus.js +15 -0
- package/dist/merge/help.js +76 -0
- package/dist/merge/index.js +8 -7
- package/dist/merge/match/components/merge-map.js +5 -0
- package/dist/merge/match/components/merge-map.vue_vue_type_script_setup_true_lang.js +230 -0
- package/dist/merge/match/match.js +211 -0
- package/dist/merge/review/affix.js +14 -0
- package/dist/merge/review/change-badge.js +10 -0
- package/dist/merge/{decision-toggle.js → review/components/decision-toggle.js} +1 -1
- package/dist/merge/review/components/decision-toggle.vue_vue_type_script_setup_true_lang.js +80 -0
- package/dist/merge/{element-detail.js → review/components/element-detail.js} +1 -1
- package/dist/merge/review/components/element-detail.vue_vue_type_script_setup_true_lang.js +210 -0
- package/dist/merge/{merge-tree.js → review/components/merge-tree.js} +1 -1
- package/dist/merge/review/components/merge-tree.vue_vue_type_script_setup_true_lang.js +192 -0
- package/dist/merge/{type-name-authority.js → review/components/type-name-authority.js} +1 -1
- package/dist/merge/{type-name-authority.vue_vue_type_script_setup_true_lang.js → review/components/type-name-authority.vue_vue_type_script_setup_true_lang.js} +7 -6
- package/dist/merge/review/decision.js +12 -0
- package/dist/merge/review/detail.js +63 -0
- package/dist/merge/{merge-highlight.js → review/highlight.js} +2 -2
- package/dist/merge/review/marks.js +17 -0
- package/dist/merge/review/navigation.js +82 -0
- package/dist/merge/review/title.js +7 -0
- package/dist/merge/review/tree.js +138 -0
- package/dist/merge/session/components/merge-help.js +7 -0
- package/dist/merge/session/components/merge-help.vue_vue_type_script_setup_true_lang.js +109 -0
- package/dist/merge/{merge-progress.js → session/components/merge-progress.js} +1 -1
- package/dist/merge/{merge-progress.vue_vue_type_script_setup_true_lang.js → session/components/merge-progress.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/merge/{merge-review.js → session/components/merge-review.js} +1 -1
- package/dist/merge/session/components/merge-review.vue_vue_type_script_setup_true_lang.js +894 -0
- package/dist/merge/session/merge.service.js +107 -0
- package/dist/merge/session/shortcuts.js +22 -0
- package/dist/merge/session/staged-writes.js +47 -0
- package/dist/merge/session/steps.js +21 -0
- package/dist/merge/{use-document-progress.js → session/use-document-progress.js} +1 -1
- package/dist/merge/session/use-merge-session.js +360 -0
- package/dist/merge/wording.js +124 -0
- package/dist/ui.css +1 -1
- package/package.json +3 -3
- package/dist/external/.pnpm/@dialecte_core@0.5.2/node_modules/@dialecte/core/dist/helpers.js +0 -142
- package/dist/external/.pnpm/@dialecte_core@0.5.2/node_modules/@dialecte/core/dist/index.js +0 -3
- package/dist/external/.pnpm/@dialecte_core@0.5.2/node_modules/@dialecte/core/dist/utils-ERge2irW.js +0 -254
- package/dist/external/.pnpm/@dialecte_scl@0.5.0/node_modules/@dialecte/scl/dist/hooks-2Y_WzKF4.js +0 -33971
- package/dist/external/.pnpm/@dialecte_scl@0.5.0/node_modules/@dialecte/scl/dist/v2019C1/index.js +0 -22
- 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 +0 -22
- 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 +0 -13
- package/dist/merge/affix.js +0 -14
- package/dist/merge/build-view-model.js +0 -215
- package/dist/merge/decision-toggle.vue_vue_type_script_setup_true_lang.js +0 -40
- package/dist/merge/element-detail.vue_vue_type_script_setup_true_lang.js +0 -185
- package/dist/merge/merge-decision.js +0 -6
- package/dist/merge/merge-preflight.vue_vue_type_script_setup_true_lang.js +0 -41
- package/dist/merge/merge-review.vue_vue_type_script_setup_true_lang.js +0 -409
- package/dist/merge/merge-summary.vue_vue_type_script_setup_true_lang.js +0 -98
- package/dist/merge/merge-tree.vue_vue_type_script_setup_true_lang.js +0 -112
- package/dist/merge/merge.service.js +0 -80
- package/dist/merge/use-merge-session.js +0 -164
package/dist/index.js
CHANGED
|
@@ -20,45 +20,48 @@ import y from "./tooltip/floating-tooltip.js";
|
|
|
20
20
|
import "./tooltip/index.js";
|
|
21
21
|
import { CATEGORY_ELEMENTS as b, ELEMENT_TO_COLOR as x } from "./icons/element-color-map.generated.js";
|
|
22
22
|
import { ELEMENT_TO_ICON as S } from "./icons/element-icon-mapper.js";
|
|
23
|
-
import
|
|
24
|
-
import
|
|
23
|
+
import C from "./icons/element-badge.js";
|
|
24
|
+
import "./icons/index.js";
|
|
25
|
+
import { collectExpandableNodeIds as w } from "./explorer/collect-expandable-node-ids.js";
|
|
26
|
+
import T from "./explorer/explorer.js";
|
|
25
27
|
import "./explorer/index.js";
|
|
26
|
-
import
|
|
28
|
+
import E from "./library-browser/library-browser.js";
|
|
27
29
|
import "./library-browser/index.js";
|
|
28
|
-
import { highlightCode as
|
|
29
|
-
import
|
|
30
|
-
import { diffLines as
|
|
31
|
-
import
|
|
30
|
+
import { highlightCode as D } from "./code/highlight.js";
|
|
31
|
+
import O from "./code/code-block.js";
|
|
32
|
+
import { diffLines as k } from "./code/diff.js";
|
|
33
|
+
import A from "./code/xml-diff.js";
|
|
32
34
|
import "./code/index.js";
|
|
33
|
-
import { NOTE_CATEGORIES as
|
|
34
|
-
import
|
|
35
|
-
import
|
|
35
|
+
import { NOTE_CATEGORIES as j, NOTE_CATEGORY_LABELS as M, NOTE_STATUSES as N, parseNoteData as P, serializeNoteData as F } from "./notes/note-data.js";
|
|
36
|
+
import I from "./notes/note-category-tag.js";
|
|
37
|
+
import L from "./notes/note-category-picker.js";
|
|
36
38
|
import "./notes/index.js";
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
39
|
+
import R from "./merge/review/components/decision-toggle.js";
|
|
40
|
+
import z from "./merge/review/components/element-detail.js";
|
|
41
|
+
import B from "./merge/match/components/merge-map.js";
|
|
42
|
+
import V from "./merge/review/components/merge-tree.js";
|
|
43
|
+
import H from "./merge/review/components/type-name-authority.js";
|
|
44
|
+
import { useMergeSession as U } from "./merge/session/use-merge-session.js";
|
|
45
|
+
import W from "./merge/session/components/merge-review.js";
|
|
43
46
|
import "./merge/index.js";
|
|
44
|
-
import { KEY_SEPARATOR as
|
|
45
|
-
import { useColumnFilters as
|
|
46
|
-
import { useRowSort as
|
|
47
|
-
import { provideColumnFilterHeader as
|
|
48
|
-
import { provideRowSortHeader as
|
|
49
|
-
import
|
|
47
|
+
import { KEY_SEPARATOR as G, NO_VALUE_KEY as K, buildFlatOptions as q, buildMultiValueOptions as J, buildTreeOptions as Y, collectLeafKeys as X, collectParentKeys as Z, filterTree as Q } from "./table/filters/build-filter-options.js";
|
|
48
|
+
import { useColumnFilters as $ } from "./table/filters/use-column-filters.js";
|
|
49
|
+
import { useRowSort as ee } from "./table/filters/use-row-sort.js";
|
|
50
|
+
import { provideColumnFilterHeader as te, useColumnFilterHeaderContext as ne } from "./table/column-filter-context.js";
|
|
51
|
+
import { provideRowSortHeader as re, useOptionalRowSortContext as ie } from "./table/row-sort-context.js";
|
|
52
|
+
import ae from "./table/filterable-column-header.js";
|
|
50
53
|
import "./table/index.js";
|
|
51
|
-
import
|
|
54
|
+
import oe from "./context-menu/context-menu.js";
|
|
52
55
|
import "./context-menu/index.js";
|
|
53
|
-
import
|
|
56
|
+
import se from "./split-layout/split-layout.js";
|
|
54
57
|
import "./split-layout/index.js";
|
|
55
|
-
import { applyInitialVisibility as
|
|
56
|
-
import { groupStackMetrics as
|
|
57
|
-
import { GROUP_COLLAPSED_MEMBERS_HEIGHT as
|
|
58
|
-
import { computeGroups as
|
|
59
|
-
import { createElkLayoutEngine as
|
|
60
|
-
import { useDiagramLayout as
|
|
61
|
-
import
|
|
62
|
-
import
|
|
58
|
+
import { applyInitialVisibility as ce, buildRecordCache as le, collectVisibleIds as ue, hideDescendants as de } from "./diagram-layout/visibility-model.js";
|
|
59
|
+
import { groupStackMetrics as fe } from "./diagram-layout/group-stack.js";
|
|
60
|
+
import { GROUP_COLLAPSED_MEMBERS_HEIGHT as pe, GROUP_HEADER_HEIGHT as me, GROUP_MEMBER_GAP as he, GROUP_MEMBER_HEIGHT as ge, GROUP_MEMBER_HEIGHT_COMPACT as _e, memberCardHeight as ve } from "./diagram-layout/group-geometry.js";
|
|
61
|
+
import { computeGroups as ye, isGroupId as be, makeGroupId as xe } from "./diagram-layout/grouping.js";
|
|
62
|
+
import { createElkLayoutEngine as Se } from "./diagram-layout/elk-layout-engine.js";
|
|
63
|
+
import { useDiagramLayout as Ce } from "./diagram-layout/use-diagram-layout.js";
|
|
64
|
+
import we from "./diagram-layout/diagram-node-card.js";
|
|
65
|
+
import Te from "./diagram-layout/diagram-node-group.js";
|
|
63
66
|
import "./diagram-layout/index.js";
|
|
64
|
-
export { s as Button, b as CATEGORY_ELEMENTS,
|
|
67
|
+
export { s as Button, b as CATEGORY_ELEMENTS, O as CodeBlock, l as Combobox, oe as ContextMenu, R as DecisionToggle, we as DiagramNodeCard, Te as DiagramNodeGroup, d as Dialog, _ as DialogHost, v as DocumentProgressBar, c as Dropdown, x as ELEMENT_TO_COLOR, S as ELEMENT_TO_ICON, C as ElementBadge, z as ElementDetail, f as FeedbackDialog, ae as FilterableColumnHeader, y as FloatingTooltip, pe as GROUP_COLLAPSED_MEMBERS_HEIGHT, me as GROUP_HEADER_HEIGHT, he as GROUP_MEMBER_GAP, ge as GROUP_MEMBER_HEIGHT, _e as GROUP_MEMBER_HEIGHT_COMPACT, G as KEY_SEPARATOR, E as LibraryBrowser, B as MergeMap, W as MergeReview, V as MergeTree, u as MultiSelect, j as NOTE_CATEGORIES, M as NOTE_CATEGORY_LABELS, N as NOTE_STATUSES, K as NO_VALUE_KEY, L as NoteCategoryPicker, I as NoteCategoryTag, T as SclExplorer, se as SplitLayout, H as TypeNameAuthority, A as XmlDiff, ce as applyInitialVisibility, q as buildFlatOptions, J as buildMultiValueOptions, le as buildRecordCache, Y as buildTreeOptions, w as collectExpandableNodeIds, X as collectLeafKeys, Z as collectParentKeys, ue as collectVisibleIds, ye as computeGroups, p as createDialogHost, e as createDocumentStore, Se as createElkLayoutEngine, m as dialogHostKey, k as diffLines, Q as filterTree, fe as groupStackMetrics, de as hideDescendants, D as highlightCode, be as isGroupId, xe as makeGroupId, ve as memberCardHeight, P as parseNoteData, te as provideColumnFilterHeader, h as provideDialogHost, re as provideRowSortHeader, F as serializeNoteData, i as useActiveDocument, ne as useColumnFilterHeaderContext, $ as useColumnFilters, Ce as useDiagramLayout, t as useDialecteChannel, g as useDialog, a as useDocumentProgress, o as useDocumentState, n as useLiveData, U as useMergeSession, ie as useOptionalRowSortContext, r as useProjectLiveData, ee as useRowSort };
|
package/dist/merge/check-files/components/merge-preflight.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
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 { describeIdentityWarning as t } from "../identity-warning.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/check-files/components/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 = {
|
|
6
|
+
key: 0,
|
|
7
|
+
"data-testid": "preflight-identity",
|
|
8
|
+
class: "flex items-start gap-3"
|
|
9
|
+
}, _ = { 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 = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "mt-1 text-sm"
|
|
12
|
+
}, C = { class: "text-base-content/80" }, w = {
|
|
13
|
+
key: 1,
|
|
14
|
+
class: "mt-1 text-sm text-base-content/80",
|
|
15
|
+
"data-testid": "preflight-advice"
|
|
16
|
+
}, T = { class: "divide-y divide-warning/15" }, E = { class: "font-mono break-all" }, D = { class: "text-base-content/80" }, O = {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "mt-0.5 flex flex-wrap gap-1"
|
|
19
|
+
}, k = /*@__PURE__*/ c({
|
|
20
|
+
__name: "merge-preflight",
|
|
21
|
+
props: { warnings: {} },
|
|
22
|
+
setup(c) {
|
|
23
|
+
let k = c, A = r(() => {
|
|
24
|
+
let e = /* @__PURE__ */ new Map();
|
|
25
|
+
for (let t of k.warnings) {
|
|
26
|
+
let n = e.get(t.code) ?? [];
|
|
27
|
+
n.push(t), e.set(t.code, n);
|
|
28
|
+
}
|
|
29
|
+
return [...e.entries()].map(([e, n]) => ({
|
|
30
|
+
code: e,
|
|
31
|
+
info: t(e),
|
|
32
|
+
items: n
|
|
33
|
+
}));
|
|
34
|
+
});
|
|
35
|
+
return (t, r) => (l(), a("div", p, [o("div", m, [o("div", h, [c.warnings.length > 0 ? (l(), a("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/80" }, " 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)])) : i("", !0), (l(!0), a(n, null, u(A.value, (e) => (l(), a("div", {
|
|
36
|
+
key: e.code,
|
|
37
|
+
class: "overflow-hidden rounded-box border border-warning/40 bg-warning/5"
|
|
38
|
+
}, [o("div", _, [
|
|
39
|
+
o("div", v, [o("span", y, d(e.items.length), 1), o("h3", b, d(e.info.title), 1)]),
|
|
40
|
+
o("p", x, d(e.info.description), 1),
|
|
41
|
+
e.info.whatHappens ? (l(), a("p", S, [r[1] ||= o("span", { class: "font-medium" }, "What the merge does:", -1), o("span", C, d(e.info.whatHappens), 1)])) : i("", !0),
|
|
42
|
+
e.info.advice ? (l(), a("p", w, d(e.info.advice), 1)) : i("", !0)
|
|
43
|
+
]), o("ul", T, [(l(!0), a(n, null, u(e.items, (e) => (l(), a("li", {
|
|
44
|
+
key: `${e.code}:${e.value}`,
|
|
45
|
+
class: "px-3 py-1.5 text-xs"
|
|
46
|
+
}, [o("div", null, [o("code", E, d(e.value), 1), o("span", D, " — " + d(e.message), 1)]), e.tagNames.length ? (l(), a("div", O, [(l(!0), a(n, null, u(e.tagNames, (e) => (l(), a("span", {
|
|
47
|
+
key: e,
|
|
48
|
+
class: "badge badge-ghost badge-xs font-mono"
|
|
49
|
+
}, d(e), 1))), 128))])) : i("", !0)]))), 128))])]))), 128))])])]));
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
//#endregion
|
|
53
|
+
export { k as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region lib/merge/check-files/flags.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
let { index: t, warnings: n, mappings: r, wordOf: i } = e, a = /* @__PURE__ */ new Map();
|
|
4
|
+
for (let e of n) for (let t of e.refs) t.id && !a.has(t.id) && a.set(t.id, i(e));
|
|
5
|
+
for (let e of r) {
|
|
6
|
+
let t = a.get(e.sourceId ?? e.id), n = e.mapping && "existing" in e.mapping ? e.mapping.existing.id : void 0;
|
|
7
|
+
t && n && !a.has(n) && a.set(n, t);
|
|
8
|
+
}
|
|
9
|
+
let o = {};
|
|
10
|
+
for (let [e, n] of Object.entries(t)) {
|
|
11
|
+
let t = a.get(e) ?? (n.node?.instanceRef?.id ? a.get(n.node.instanceRef.id) : void 0) ?? (n.node?.sourceRef?.id ? a.get(n.node.sourceRef.id) : void 0);
|
|
12
|
+
t && (o[e] = t);
|
|
13
|
+
}
|
|
14
|
+
return o;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { e as flaggedNodes };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TEMPLATE_UUID_WARNING_INFO as e } from "../../external/.pnpm/@dialecte_scl@0.8.1/node_modules/@dialecte/scl/dist/v2019C1/index.js";
|
|
2
|
+
//#region lib/merge/check-files/identity-warning.ts
|
|
3
|
+
function t(t) {
|
|
4
|
+
let r = e[t];
|
|
5
|
+
return {
|
|
6
|
+
title: r?.title ?? t,
|
|
7
|
+
description: r?.description ?? "",
|
|
8
|
+
whatHappens: r?.fallback ?? "",
|
|
9
|
+
advice: n[t]
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
var n = {
|
|
13
|
+
"cross-type-template-uuid": "In the review, keep one of the two — the new element or yours — or fix the templateUuid in the file.",
|
|
14
|
+
"duplicate-instance-uuid": "Check the affected elements in the review, and resolve the duplication in the file.",
|
|
15
|
+
"template-uuid-type-mismatch": "In the review, keep one of the two — the new element or yours — or fix the templateUuid in the file."
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { t as describeIdentityWarning };
|
|
@@ -0,0 +1,207 @@
|
|
|
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 "../../../icons/element-badge.js";
|
|
3
|
+
import "../../../icons/index.js";
|
|
4
|
+
import { LEFT_OUT_LABEL as n } from "../../wording.js";
|
|
5
|
+
import { writesNothing as r } from "../summary.js";
|
|
6
|
+
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, openBlock as p, renderList as m, toDisplayString as h, unref as g } from "vue";
|
|
7
|
+
//#region lib/merge/confirm/components/merge-summary.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var _ = { class: "h-full overflow-auto p-4 text-sm" }, v = { class: "mx-auto max-w-3xl space-y-4" }, y = {
|
|
9
|
+
"data-testid": "summary-heading",
|
|
10
|
+
class: "text-base font-medium"
|
|
11
|
+
}, b = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "mt-2 flex flex-wrap gap-1.5"
|
|
14
|
+
}, x = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "rounded-box border border-error/40"
|
|
17
|
+
}, S = { class: "space-y-1.5 p-3" }, C = { class: "font-medium" }, w = { class: "text-xs text-base-content/80" }, T = {
|
|
18
|
+
key: 1,
|
|
19
|
+
"data-testid": "summary-lands",
|
|
20
|
+
class: "rounded-box border border-base-300"
|
|
21
|
+
}, E = { class: "flex items-center justify-between border-b border-base-300 px-3 py-1.5 font-medium" }, D = { class: "space-y-1.5 p-3" }, O = {
|
|
22
|
+
key: 0,
|
|
23
|
+
"data-testid": "summary-lands-in",
|
|
24
|
+
class: "flex flex-wrap items-center gap-x-1.5 gap-y-0.5"
|
|
25
|
+
}, k = {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: "text-base-content/60",
|
|
28
|
+
"aria-hidden": "true"
|
|
29
|
+
}, A = { class: "inline-flex items-center gap-1" }, j = ["title", "onClick"], M = {
|
|
30
|
+
key: 1,
|
|
31
|
+
class: "font-medium"
|
|
32
|
+
}, N = {
|
|
33
|
+
key: 2,
|
|
34
|
+
class: "text-xs text-base-content/80"
|
|
35
|
+
}, P = {
|
|
36
|
+
key: 3,
|
|
37
|
+
class: "text-xs text-base-content/80"
|
|
38
|
+
}, F = { class: "font-medium" }, I = ["title", "onClick"], L = { key: 1 }, ee = { class: "text-xs text-base-content/80" }, R = {
|
|
39
|
+
key: 2,
|
|
40
|
+
class: "text-xs text-base-content/80"
|
|
41
|
+
}, z = ["data-testid"], B = { class: "border-b border-base-300 px-3 py-1.5 font-medium" }, V = { class: "space-y-1.5 p-3" }, H = ["title", "onClick"], U = {
|
|
42
|
+
key: 2,
|
|
43
|
+
class: "font-medium"
|
|
44
|
+
}, W = {
|
|
45
|
+
key: 3,
|
|
46
|
+
class: "text-xs text-base-content/80"
|
|
47
|
+
}, G = /*@__PURE__*/ f({
|
|
48
|
+
__name: "merge-summary",
|
|
49
|
+
props: {
|
|
50
|
+
summary: {},
|
|
51
|
+
scenario: {},
|
|
52
|
+
verb: {}
|
|
53
|
+
},
|
|
54
|
+
emits: ["changeMatch", "show"],
|
|
55
|
+
setup(f, { emit: G }) {
|
|
56
|
+
let K = f, q = G, J = {
|
|
57
|
+
ssd: "substation template (SSD)",
|
|
58
|
+
asd: "application template (ASD)",
|
|
59
|
+
fsd: "function template (FSD)"
|
|
60
|
+
}, Y = a(() => {
|
|
61
|
+
if (r(K.summary)) return "Nothing to apply: everything is left out or already in the project.";
|
|
62
|
+
let e = J[K.verb] ?? `${K.verb.toUpperCase()} template`;
|
|
63
|
+
return K.scenario === "instantiate" ? `Apply places the ${e} in the project.` : K.summary.instances > 1 ? `Apply updates the ${K.summary.instances} instances of the ${e}.` : `Apply updates the instance of the ${e}.`;
|
|
64
|
+
}), X = a(() => [
|
|
65
|
+
{
|
|
66
|
+
label: "added",
|
|
67
|
+
count: K.summary.added.length
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
label: "updated",
|
|
71
|
+
count: K.summary.updated.length
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
label: "removed",
|
|
75
|
+
count: K.summary.removed.length + K.summary.dropped.length
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
label: n,
|
|
79
|
+
count: K.summary.skipped.length
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
label: "kept",
|
|
83
|
+
count: K.summary.preserved.length
|
|
84
|
+
}
|
|
85
|
+
].filter((e) => e.count > 0)), Z = a(() => [...K.summary.dropped.map((e) => ({
|
|
86
|
+
...e,
|
|
87
|
+
detail: "no longer in the template"
|
|
88
|
+
})), ...K.summary.removed.map((e) => ({
|
|
89
|
+
...e,
|
|
90
|
+
detail: "your addition, removed by your choice"
|
|
91
|
+
}))]), Q = a(() => K.summary.landsIn.length > 0 || K.summary.shared.length > 0), $ = a(() => [
|
|
92
|
+
{
|
|
93
|
+
id: "left-out",
|
|
94
|
+
title: "Left out",
|
|
95
|
+
items: K.summary.skipped
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
id: "added",
|
|
99
|
+
title: "Will be added",
|
|
100
|
+
items: K.summary.added
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
id: "updated",
|
|
104
|
+
title: "Will be updated",
|
|
105
|
+
items: K.summary.updated
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: "renamed",
|
|
109
|
+
title: "Renamed by the merge",
|
|
110
|
+
items: K.summary.renamed.map((e) => ({
|
|
111
|
+
title: e.title,
|
|
112
|
+
detail: `${e.field} → ${e.to}`
|
|
113
|
+
}))
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: "kept",
|
|
117
|
+
title: "Kept (your additions)",
|
|
118
|
+
items: K.summary.preserved
|
|
119
|
+
}
|
|
120
|
+
].filter((e) => e.items.length > 0));
|
|
121
|
+
return (n, r) => (p(), c("div", _, [l("div", v, [
|
|
122
|
+
l("div", null, [l("p", y, h(Y.value), 1), X.value.length ? (p(), c("div", b, [(p(!0), c(i, null, m(X.value, (e) => (p(), c("span", {
|
|
123
|
+
key: e.label,
|
|
124
|
+
"data-testid": "summary-count",
|
|
125
|
+
class: "badge badge-ghost badge-sm"
|
|
126
|
+
}, h(e.count) + " " + h(e.label), 1))), 128))])) : s("", !0)]),
|
|
127
|
+
Z.value.length ? (p(), c("section", x, [r[1] ||= l("h3", { class: "border-b border-error/30 bg-error/5 px-3 py-1.5 font-medium" }, "Removed", -1), l("ul", S, [(p(!0), c(i, null, m(Z.value, (e, n) => (p(), c("li", {
|
|
128
|
+
key: `rm${n}`,
|
|
129
|
+
class: "flex flex-wrap items-center gap-x-2 gap-y-0.5"
|
|
130
|
+
}, [
|
|
131
|
+
e.tag ? (p(), o(g(t), {
|
|
132
|
+
key: 0,
|
|
133
|
+
"tag-name": e.tag,
|
|
134
|
+
size: "sm"
|
|
135
|
+
}, null, 8, ["tag-name"])) : s("", !0),
|
|
136
|
+
l("span", C, h(e.title), 1),
|
|
137
|
+
l("span", w, h(e.detail), 1)
|
|
138
|
+
]))), 128))])])) : s("", !0),
|
|
139
|
+
Q.value ? (p(), c("section", T, [l("h3", E, [r[2] ||= u(" Where it lands ", -1), l("button", {
|
|
140
|
+
type: "button",
|
|
141
|
+
"data-testid": "summary-change",
|
|
142
|
+
class: "btn btn-ghost btn-sm font-normal",
|
|
143
|
+
onClick: r[0] ||= (e) => q("changeMatch")
|
|
144
|
+
}, " Change ")]), l("ul", D, [f.summary.landsIn.length ? (p(), c("li", O, [(p(!0), c(i, null, m(f.summary.landsIn, (e, n) => (p(), c(i, { key: `l${n}` }, [n > 0 ? (p(), c("span", k, "/")) : s("", !0), l("span", A, [
|
|
145
|
+
d(g(t), {
|
|
146
|
+
"tag-name": e.tag,
|
|
147
|
+
size: "sm"
|
|
148
|
+
}, null, 8, ["tag-name"]),
|
|
149
|
+
e.show ? (p(), c("button", {
|
|
150
|
+
key: 0,
|
|
151
|
+
type: "button",
|
|
152
|
+
class: "link link-hover font-medium",
|
|
153
|
+
title: `Show ${e.title} in the review`,
|
|
154
|
+
onClick: (t) => q("show", e.show)
|
|
155
|
+
}, h(e.title), 9, j)) : (p(), c("span", M, h(e.title), 1)),
|
|
156
|
+
e.created ? (p(), c("span", N, "new")) : s("", !0),
|
|
157
|
+
e.chosen ? (p(), c("span", P, "your choice")) : s("", !0)
|
|
158
|
+
])], 64))), 128))])) : s("", !0), (p(!0), c(i, null, m(f.summary.shared, (n, r) => (p(), c("li", {
|
|
159
|
+
key: `sh${r}`,
|
|
160
|
+
class: "flex flex-wrap items-center gap-x-2 gap-y-0.5"
|
|
161
|
+
}, [
|
|
162
|
+
d(g(t), {
|
|
163
|
+
"tag-name": n.tag,
|
|
164
|
+
size: "sm"
|
|
165
|
+
}, null, 8, ["tag-name"]),
|
|
166
|
+
l("span", F, h(n.title), 1),
|
|
167
|
+
d(g(e), {
|
|
168
|
+
class: "size-3.5 shrink-0 text-base-content/60",
|
|
169
|
+
"aria-hidden": "true"
|
|
170
|
+
}),
|
|
171
|
+
n.show ? (p(), c("button", {
|
|
172
|
+
key: 0,
|
|
173
|
+
type: "button",
|
|
174
|
+
class: "link link-hover",
|
|
175
|
+
title: `Show ${n.to} in the review`,
|
|
176
|
+
onClick: (e) => q("show", n.show)
|
|
177
|
+
}, h(n.to), 9, I)) : (p(), c("span", L, h(n.to), 1)),
|
|
178
|
+
l("span", ee, h(n.chosen ? "your choice" : n.why), 1),
|
|
179
|
+
n.askedName ? (p(), c("span", R, " (“" + h(n.askedName) + "” was already used) ", 1)) : s("", !0)
|
|
180
|
+
]))), 128))])])) : s("", !0),
|
|
181
|
+
(p(!0), c(i, null, m($.value, (e) => (p(), c("section", {
|
|
182
|
+
key: e.id,
|
|
183
|
+
"data-testid": `summary-${e.id}`,
|
|
184
|
+
class: "rounded-box border border-base-300"
|
|
185
|
+
}, [l("h3", B, h(e.title), 1), l("ul", V, [(p(!0), c(i, null, m(e.items, (n, r) => (p(), c("li", {
|
|
186
|
+
key: `${e.id}${r}`,
|
|
187
|
+
class: "flex flex-wrap items-center gap-x-2 gap-y-0.5"
|
|
188
|
+
}, [
|
|
189
|
+
n.tag ? (p(), o(g(t), {
|
|
190
|
+
key: 0,
|
|
191
|
+
"tag-name": n.tag,
|
|
192
|
+
size: "sm"
|
|
193
|
+
}, null, 8, ["tag-name"])) : s("", !0),
|
|
194
|
+
n.show ? (p(), c("button", {
|
|
195
|
+
key: 1,
|
|
196
|
+
type: "button",
|
|
197
|
+
class: "link link-hover font-medium",
|
|
198
|
+
title: `Show ${n.title} in the review`,
|
|
199
|
+
onClick: (e) => q("show", n.show)
|
|
200
|
+
}, h(n.title), 9, H)) : (p(), c("span", U, h(n.title), 1)),
|
|
201
|
+
n.detail ? (p(), c("span", W, h(n.detail), 1)) : s("", !0)
|
|
202
|
+
]))), 128))])], 8, z))), 128))
|
|
203
|
+
])]));
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
//#endregion
|
|
207
|
+
export { G as default };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { PLACEMENT_GROUP as e, describeTarget as t } from "../match/match.js";
|
|
2
|
+
//#region lib/merge/confirm/landings.ts
|
|
3
|
+
function n(n) {
|
|
4
|
+
let { view: o, landed: s } = n, c = [...o.changeable, ...o.automatic], l = c.filter((t) => t.tag === e).flatMap((e) => e.rows).filter((e) => s.has(e.id)), u = c.filter((t) => t.tag !== e).flatMap((e) => e.rows).filter((e) => s.has(e.id));
|
|
5
|
+
return {
|
|
6
|
+
landsIn: l.map((e) => ({
|
|
7
|
+
tag: e.tag,
|
|
8
|
+
title: e.target.kind === "existing" ? e.target.title : i(e),
|
|
9
|
+
created: e.target.kind === "create",
|
|
10
|
+
chosen: e.chosen,
|
|
11
|
+
...r(e)
|
|
12
|
+
})),
|
|
13
|
+
shared: u.map((e) => ({
|
|
14
|
+
title: e.title,
|
|
15
|
+
tag: e.tag,
|
|
16
|
+
to: t(e),
|
|
17
|
+
why: e.hint,
|
|
18
|
+
chosen: e.chosen,
|
|
19
|
+
...a(e) ? { askedName: a(e) } : {},
|
|
20
|
+
...r(e)
|
|
21
|
+
}))
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function r(e) {
|
|
25
|
+
return e.target.kind === "existing" ? { show: { nodeId: e.target.id } } : {};
|
|
26
|
+
}
|
|
27
|
+
function i(e) {
|
|
28
|
+
return e.target.kind === "create" ? e.target.name : "to choose";
|
|
29
|
+
}
|
|
30
|
+
function a(e) {
|
|
31
|
+
if (!(e.target.kind !== "create" || !e.written || e.written.name === e.target.name)) return e.target.name;
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { n as summarizeLandings };
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { toRawRecord as e, toRef as t } from "../../external/.pnpm/@dialecte_core@0.6.1/node_modules/@dialecte/core/dist/helpers.js";
|
|
2
|
+
import { T as n } from "../../external/.pnpm/@dialecte_scl@0.8.1/node_modules/@dialecte/scl/dist/hooks-C05NpRNi.js";
|
|
3
|
+
import "../../external/.pnpm/@dialecte_scl@0.8.1/node_modules/@dialecte/scl/dist/v2019C1/index.js";
|
|
4
|
+
import { extractTitle as r, getAttributes as i } from "../session/merge.service.js";
|
|
5
|
+
import { allGroups as a } from "../review/tree.js";
|
|
6
|
+
import { countAttributeChanges as o, foldOperations as s } from "../session/staged-writes.js";
|
|
7
|
+
//#region lib/merge/confirm/outcome.ts
|
|
8
|
+
async function c(e, t) {
|
|
9
|
+
let { created: n, changed: r } = s(t.operations), i = {
|
|
10
|
+
query: e,
|
|
11
|
+
elements: /* @__PURE__ */ new Map(),
|
|
12
|
+
paths: /* @__PURE__ */ new Map()
|
|
13
|
+
}, a = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set();
|
|
14
|
+
for (let e of n.values()) u(e) && d({
|
|
15
|
+
record: e,
|
|
16
|
+
created: n,
|
|
17
|
+
holdsElement: c
|
|
18
|
+
});
|
|
19
|
+
let l = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map();
|
|
20
|
+
for (let e of n.values()) {
|
|
21
|
+
let t = f({
|
|
22
|
+
record: e,
|
|
23
|
+
created: n,
|
|
24
|
+
owners: a
|
|
25
|
+
});
|
|
26
|
+
if (t) {
|
|
27
|
+
let e = l.get(t.id) ?? {
|
|
28
|
+
record: t,
|
|
29
|
+
companions: 0
|
|
30
|
+
};
|
|
31
|
+
e.companions += 1, l.set(t.id, e);
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
if (u(e)) {
|
|
35
|
+
l.set(e.id, l.get(e.id) ?? {
|
|
36
|
+
record: e,
|
|
37
|
+
companions: 0
|
|
38
|
+
});
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
if (c.has(e.id)) continue;
|
|
42
|
+
let r = await m(i, p({
|
|
43
|
+
record: e,
|
|
44
|
+
created: n
|
|
45
|
+
}));
|
|
46
|
+
r && g(h, {
|
|
47
|
+
ref: r,
|
|
48
|
+
addedInside: 1
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
for (let { before: e, after: t } of r.values()) {
|
|
52
|
+
let n = o({
|
|
53
|
+
before: e,
|
|
54
|
+
after: t
|
|
55
|
+
});
|
|
56
|
+
if (n === 0) continue;
|
|
57
|
+
if (u(t)) {
|
|
58
|
+
g(h, {
|
|
59
|
+
ref: b(t),
|
|
60
|
+
attributes: n
|
|
61
|
+
});
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
let r = await m(i, t.parent ? b(t.parent) : void 0);
|
|
65
|
+
r && g(h, {
|
|
66
|
+
ref: r,
|
|
67
|
+
changedInside: 1
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
let y = [];
|
|
71
|
+
for (let e of l.values()) y.push(await _(i, {
|
|
72
|
+
...e,
|
|
73
|
+
created: n
|
|
74
|
+
}));
|
|
75
|
+
let x = [];
|
|
76
|
+
for (let e of h.values()) x.push(await v(i, e));
|
|
77
|
+
return {
|
|
78
|
+
added: y,
|
|
79
|
+
updated: x
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
async function l(e, t) {
|
|
83
|
+
let { report: n, sourceQuery: r, actionOf: o, editedValueOf: s } = t, c = [];
|
|
84
|
+
for (let t of a(n)) {
|
|
85
|
+
let { primary: a } = t;
|
|
86
|
+
if (a.change !== "added" || o(t.id) === "skip" || !a.appliedRef || !a.sourceRef) continue;
|
|
87
|
+
let l = (t.editableAttributes ?? []).filter((e) => e.mode === "rename");
|
|
88
|
+
if (l.length === 0) continue;
|
|
89
|
+
let u = await i(r, a.sourceRef), d = await i(e, a.appliedRef), f = n.mappings.find((e) => (e.sourceId ?? e.id) === a.sourceRef?.id), p = f?.mapping && "create" in f.mapping ? f.mapping.create.name : void 0;
|
|
90
|
+
for (let { attr: e } of l) {
|
|
91
|
+
let n = s(t.id, e) ?? (e === "name" ? p : void 0) ?? u[e], r = d[e];
|
|
92
|
+
n && r && n !== r && c.push({
|
|
93
|
+
title: n,
|
|
94
|
+
field: e,
|
|
95
|
+
to: r
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return c;
|
|
100
|
+
}
|
|
101
|
+
function u(e) {
|
|
102
|
+
return n(e) !== null;
|
|
103
|
+
}
|
|
104
|
+
function d(e) {
|
|
105
|
+
let { record: t, created: n, holdsElement: r } = e, i = t.parent ? n.get(t.parent.id) : void 0;
|
|
106
|
+
for (; i && !r.has(i.id);) r.add(i.id), i = i.parent ? n.get(i.parent.id) : void 0;
|
|
107
|
+
}
|
|
108
|
+
function f(e) {
|
|
109
|
+
let { record: t, created: n, owners: r } = e;
|
|
110
|
+
if (r.has(t.id)) return r.get(t.id);
|
|
111
|
+
let i = t.parent ? n.get(t.parent.id) : void 0, a = i ? u(i) ? i : f({
|
|
112
|
+
record: i,
|
|
113
|
+
created: n,
|
|
114
|
+
owners: r
|
|
115
|
+
}) : void 0;
|
|
116
|
+
return r.set(t.id, a), a;
|
|
117
|
+
}
|
|
118
|
+
function p(e) {
|
|
119
|
+
let { created: t } = e, n = e.record;
|
|
120
|
+
for (; n.parent && t.has(n.parent.id);) n = t.get(n.parent.id);
|
|
121
|
+
return n.parent ? b(n.parent) : void 0;
|
|
122
|
+
}
|
|
123
|
+
async function m(t, n) {
|
|
124
|
+
if (!n?.id) return;
|
|
125
|
+
if (t.elements.has(n.id)) return t.elements.get(n.id);
|
|
126
|
+
let r = await t.query.getRecord(n), i = r ? u(e(r)) ? n : await m(t, r.parent ? b(r.parent) : void 0) : void 0;
|
|
127
|
+
return t.elements.set(n.id, i), i;
|
|
128
|
+
}
|
|
129
|
+
async function h(e, t) {
|
|
130
|
+
let n = t.id ?? "";
|
|
131
|
+
if (!e.paths.has(n)) {
|
|
132
|
+
let r = await e.query.reference.buildElementPath(t);
|
|
133
|
+
e.paths.set(n, r?.path);
|
|
134
|
+
}
|
|
135
|
+
return e.paths.get(n);
|
|
136
|
+
}
|
|
137
|
+
function g(e, t) {
|
|
138
|
+
let n = t.ref.id ?? "", r = e.get(n) ?? {
|
|
139
|
+
ref: t.ref,
|
|
140
|
+
attributes: 0,
|
|
141
|
+
addedInside: 0,
|
|
142
|
+
changedInside: 0
|
|
143
|
+
};
|
|
144
|
+
r.attributes += t.attributes ?? 0, r.addedInside += t.addedInside ?? 0, r.changedInside += t.changedInside ?? 0, e.set(n, r);
|
|
145
|
+
}
|
|
146
|
+
async function _(e, t) {
|
|
147
|
+
let { record: n, companions: i, created: a } = t, o = await m(e, p({
|
|
148
|
+
record: n,
|
|
149
|
+
created: a
|
|
150
|
+
})), s = o ? await h(e, o) : void 0, c = [s ? `in ${s}` : void 0, i ? `${y(i, "element")} inside` : void 0].filter(Boolean);
|
|
151
|
+
return {
|
|
152
|
+
title: await r(e.query, b(n)),
|
|
153
|
+
tag: n.tagName,
|
|
154
|
+
...c.length ? { detail: c.join(" · ") } : {},
|
|
155
|
+
elementId: n.id
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
async function v(e, t) {
|
|
159
|
+
let { ref: n, attributes: i, addedInside: a, changedInside: o } = t, s = [
|
|
160
|
+
i ? `${y(i, "attribute")} changed` : void 0,
|
|
161
|
+
a ? `${y(a, "element")} added inside` : void 0,
|
|
162
|
+
o ? `${y(o, "element")} changed inside` : void 0
|
|
163
|
+
].filter(Boolean);
|
|
164
|
+
return {
|
|
165
|
+
title: await r(e.query, n),
|
|
166
|
+
tag: n.tagName,
|
|
167
|
+
...s.length ? { detail: s.join(" · ") } : {},
|
|
168
|
+
elementId: n.id
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
function y(e, t) {
|
|
172
|
+
return `${e} ${t}${e > 1 ? "s" : ""}`;
|
|
173
|
+
}
|
|
174
|
+
function b(e) {
|
|
175
|
+
return t(e);
|
|
176
|
+
}
|
|
177
|
+
//#endregion
|
|
178
|
+
export { c as summarizeOutcome, l as summarizeRenamed };
|