@septkit/ui 0.0.66 → 0.0.68

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.
Files changed (103) hide show
  1. package/dist/button/button.vue_vue_type_script_setup_true_lang.js +20 -17
  2. package/dist/code/code-block.js +1 -1
  3. package/dist/code/code-block.vue_vue_type_script_setup_true_lang.js +1 -1
  4. package/dist/diagram-layout/diagram-node-card.vue_vue_type_script_setup_true_lang.js +1 -0
  5. package/dist/diagram-layout/diagram-node-group.vue_vue_type_script_setup_true_lang.js +1 -0
  6. package/dist/dialecte/create-document-store.js +4 -3
  7. package/dist/dialog/dialog-host.vue_vue_type_script_setup_true_lang.js +9 -7
  8. package/dist/dialog/dialog.vue_vue_type_script_setup_true_lang.js +44 -35
  9. package/dist/dialog/use-dialog-host.js +12 -2
  10. package/dist/dropdown/combobox-options.js +17 -0
  11. package/dist/dropdown/combobox.vue_vue_type_script_setup_true_lang.js +155 -65
  12. package/dist/explorer/explorer.js +1 -1
  13. package/dist/explorer/explorer.vue_vue_type_script_setup_true_lang.js +52 -48
  14. package/dist/external/.pnpm/@dialecte_core@0.6.1/node_modules/@dialecte/core/dist/helpers.js +229 -0
  15. package/dist/external/.pnpm/@dialecte_core@0.6.1/node_modules/@dialecte/core/dist/index.js +3 -0
  16. 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
  17. package/dist/external/.pnpm/@dialecte_core@0.6.1/node_modules/@dialecte/core/dist/utils-CTBHUFs9.js +440 -0
  18. package/dist/external/.pnpm/@dialecte_core@0.6.1/node_modules/@dialecte/core/dist/utils.js +2 -0
  19. package/dist/external/.pnpm/@dialecte_scl@0.8.0/node_modules/@dialecte/scl/dist/hooks-VMnZqbr-.js +44305 -0
  20. package/dist/external/.pnpm/@dialecte_scl@0.8.0/node_modules/@dialecte/scl/dist/v2019C1/index.js +22 -0
  21. 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
  22. 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
  23. 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
  24. 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
  25. 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
  26. 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
  27. 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
  28. 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
  29. package/dist/icons/element-badge.js +5 -0
  30. package/dist/icons/element-badge.vue_vue_type_script_setup_true_lang.js +29 -0
  31. package/dist/icons/index.js +4 -0
  32. package/dist/index.d.ts +1923 -84
  33. package/dist/index.js +37 -32
  34. package/dist/library-browser/build-tree.js +57 -0
  35. package/dist/library-browser/index.js +2 -0
  36. package/dist/library-browser/library-browser.js +7 -0
  37. package/dist/library-browser/library-browser.vue_vue_type_script_setup_true_lang.js +124 -0
  38. package/dist/merge/{merge-preflight.js → check-files/components/merge-preflight.js} +1 -1
  39. package/dist/merge/check-files/components/merge-preflight.vue_vue_type_script_setup_true_lang.js +53 -0
  40. package/dist/merge/check-files/flags.js +17 -0
  41. package/dist/merge/check-files/identity-warning.js +18 -0
  42. package/dist/merge/{merge-summary.js → confirm/components/merge-summary.js} +1 -1
  43. package/dist/merge/confirm/components/merge-summary.vue_vue_type_script_setup_true_lang.js +207 -0
  44. package/dist/merge/confirm/landings.js +34 -0
  45. package/dist/merge/confirm/outcome.js +178 -0
  46. package/dist/merge/confirm/summary.js +57 -0
  47. package/dist/merge/done/applied-counts.js +16 -0
  48. package/dist/merge/done/applied-focus.js +15 -0
  49. package/dist/merge/help.js +76 -0
  50. package/dist/merge/index.js +8 -7
  51. package/dist/merge/match/components/merge-map.js +5 -0
  52. package/dist/merge/match/components/merge-map.vue_vue_type_script_setup_true_lang.js +230 -0
  53. package/dist/merge/match/match.js +211 -0
  54. package/dist/merge/review/affix.js +14 -0
  55. package/dist/merge/review/change-badge.js +10 -0
  56. package/dist/merge/{decision-toggle.js → review/components/decision-toggle.js} +1 -1
  57. package/dist/merge/review/components/decision-toggle.vue_vue_type_script_setup_true_lang.js +80 -0
  58. package/dist/merge/{element-detail.js → review/components/element-detail.js} +1 -1
  59. package/dist/merge/review/components/element-detail.vue_vue_type_script_setup_true_lang.js +210 -0
  60. package/dist/merge/{merge-tree.js → review/components/merge-tree.js} +1 -1
  61. package/dist/merge/review/components/merge-tree.vue_vue_type_script_setup_true_lang.js +192 -0
  62. package/dist/merge/{type-name-authority.js → review/components/type-name-authority.js} +1 -1
  63. 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
  64. package/dist/merge/review/decision.js +12 -0
  65. package/dist/merge/review/detail.js +63 -0
  66. package/dist/merge/{merge-highlight.js → review/highlight.js} +2 -2
  67. package/dist/merge/review/marks.js +17 -0
  68. package/dist/merge/review/navigation.js +82 -0
  69. package/dist/merge/review/title.js +7 -0
  70. package/dist/merge/review/tree.js +138 -0
  71. package/dist/merge/session/components/merge-help.js +7 -0
  72. package/dist/merge/session/components/merge-help.vue_vue_type_script_setup_true_lang.js +109 -0
  73. package/dist/merge/{merge-progress.js → session/components/merge-progress.js} +1 -1
  74. 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
  75. package/dist/merge/{merge-review.js → session/components/merge-review.js} +1 -1
  76. package/dist/merge/session/components/merge-review.vue_vue_type_script_setup_true_lang.js +894 -0
  77. package/dist/merge/session/merge.service.js +107 -0
  78. package/dist/merge/session/shortcuts.js +22 -0
  79. package/dist/merge/session/staged-writes.js +47 -0
  80. package/dist/merge/session/steps.js +21 -0
  81. package/dist/merge/{use-document-progress.js → session/use-document-progress.js} +1 -1
  82. package/dist/merge/session/use-merge-session.js +360 -0
  83. package/dist/merge/wording.js +124 -0
  84. package/dist/ui.css +1 -1
  85. package/package.json +3 -3
  86. package/dist/external/.pnpm/@dialecte_core@0.5.2/node_modules/@dialecte/core/dist/helpers.js +0 -142
  87. package/dist/external/.pnpm/@dialecte_core@0.5.2/node_modules/@dialecte/core/dist/index.js +0 -3
  88. package/dist/external/.pnpm/@dialecte_core@0.5.2/node_modules/@dialecte/core/dist/utils-ERge2irW.js +0 -254
  89. package/dist/external/.pnpm/@dialecte_scl@0.5.0/node_modules/@dialecte/scl/dist/hooks-2Y_WzKF4.js +0 -33971
  90. package/dist/external/.pnpm/@dialecte_scl@0.5.0/node_modules/@dialecte/scl/dist/v2019C1/index.js +0 -22
  91. 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
  92. 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
  93. package/dist/merge/affix.js +0 -14
  94. package/dist/merge/build-view-model.js +0 -215
  95. package/dist/merge/decision-toggle.vue_vue_type_script_setup_true_lang.js +0 -40
  96. package/dist/merge/element-detail.vue_vue_type_script_setup_true_lang.js +0 -185
  97. package/dist/merge/merge-decision.js +0 -6
  98. package/dist/merge/merge-preflight.vue_vue_type_script_setup_true_lang.js +0 -41
  99. package/dist/merge/merge-review.vue_vue_type_script_setup_true_lang.js +0 -409
  100. package/dist/merge/merge-summary.vue_vue_type_script_setup_true_lang.js +0 -98
  101. package/dist/merge/merge-tree.vue_vue_type_script_setup_true_lang.js +0 -112
  102. package/dist/merge/merge.service.js +0 -80
  103. package/dist/merge/use-merge-session.js +0 -164
package/dist/index.js CHANGED
@@ -20,43 +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 { collectExpandableNodeIds as C } from "./explorer/collect-expandable-node-ids.js";
24
- import w from "./explorer/explorer.js";
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 { highlightCode as T } from "./code/highlight.js";
27
- import E from "./code/code-block.js";
28
- import { diffLines as D } from "./code/diff.js";
29
- import O from "./code/xml-diff.js";
28
+ import E from "./library-browser/library-browser.js";
29
+ import "./library-browser/index.js";
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";
30
34
  import "./code/index.js";
31
- import { NOTE_CATEGORIES as k, NOTE_CATEGORY_LABELS as A, NOTE_STATUSES as j, parseNoteData as M, serializeNoteData as N } from "./notes/note-data.js";
32
- import P from "./notes/note-category-tag.js";
33
- import F from "./notes/note-category-picker.js";
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";
34
38
  import "./notes/index.js";
35
- import I from "./merge/decision-toggle.js";
36
- import L from "./merge/element-detail.js";
37
- import R from "./merge/merge-tree.js";
38
- import z from "./merge/type-name-authority.js";
39
- import { useMergeSession as B } from "./merge/use-merge-session.js";
40
- import V from "./merge/merge-review.js";
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";
41
46
  import "./merge/index.js";
42
- import { KEY_SEPARATOR as H, NO_VALUE_KEY as U, buildFlatOptions as W, buildMultiValueOptions as G, buildTreeOptions as K, collectLeafKeys as q, collectParentKeys as J, filterTree as Y } from "./table/filters/build-filter-options.js";
43
- import { useColumnFilters as X } from "./table/filters/use-column-filters.js";
44
- import { useRowSort as Z } from "./table/filters/use-row-sort.js";
45
- import { provideColumnFilterHeader as Q, useColumnFilterHeaderContext as $ } from "./table/column-filter-context.js";
46
- import { provideRowSortHeader as ee, useOptionalRowSortContext as te } from "./table/row-sort-context.js";
47
- import ne from "./table/filterable-column-header.js";
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";
48
53
  import "./table/index.js";
49
- import re from "./context-menu/context-menu.js";
54
+ import oe from "./context-menu/context-menu.js";
50
55
  import "./context-menu/index.js";
51
- import ie from "./split-layout/split-layout.js";
56
+ import se from "./split-layout/split-layout.js";
52
57
  import "./split-layout/index.js";
53
- import { applyInitialVisibility as ae, buildRecordCache as oe, collectVisibleIds as se, hideDescendants as ce } from "./diagram-layout/visibility-model.js";
54
- import { groupStackMetrics as le } from "./diagram-layout/group-stack.js";
55
- import { GROUP_COLLAPSED_MEMBERS_HEIGHT as ue, GROUP_HEADER_HEIGHT as de, GROUP_MEMBER_GAP as fe, GROUP_MEMBER_HEIGHT as pe, GROUP_MEMBER_HEIGHT_COMPACT as me, memberCardHeight as he } from "./diagram-layout/group-geometry.js";
56
- import { computeGroups as ge, isGroupId as _e, makeGroupId as ve } from "./diagram-layout/grouping.js";
57
- import { createElkLayoutEngine as ye } from "./diagram-layout/elk-layout-engine.js";
58
- import { useDiagramLayout as be } from "./diagram-layout/use-diagram-layout.js";
59
- import xe from "./diagram-layout/diagram-node-card.js";
60
- import Se from "./diagram-layout/diagram-node-group.js";
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";
61
66
  import "./diagram-layout/index.js";
62
- export { s as Button, b as CATEGORY_ELEMENTS, E as CodeBlock, l as Combobox, re as ContextMenu, I as DecisionToggle, xe as DiagramNodeCard, Se as DiagramNodeGroup, d as Dialog, _ as DialogHost, v as DocumentProgressBar, c as Dropdown, x as ELEMENT_TO_COLOR, S as ELEMENT_TO_ICON, L as ElementDetail, f as FeedbackDialog, ne as FilterableColumnHeader, y as FloatingTooltip, ue as GROUP_COLLAPSED_MEMBERS_HEIGHT, de as GROUP_HEADER_HEIGHT, fe as GROUP_MEMBER_GAP, pe as GROUP_MEMBER_HEIGHT, me as GROUP_MEMBER_HEIGHT_COMPACT, H as KEY_SEPARATOR, V as MergeReview, R as MergeTree, u as MultiSelect, k as NOTE_CATEGORIES, A as NOTE_CATEGORY_LABELS, j as NOTE_STATUSES, U as NO_VALUE_KEY, F as NoteCategoryPicker, P as NoteCategoryTag, w as SclExplorer, ie as SplitLayout, z as TypeNameAuthority, O as XmlDiff, ae as applyInitialVisibility, W as buildFlatOptions, G as buildMultiValueOptions, oe as buildRecordCache, K as buildTreeOptions, C as collectExpandableNodeIds, q as collectLeafKeys, J as collectParentKeys, se as collectVisibleIds, ge as computeGroups, p as createDialogHost, e as createDocumentStore, ye as createElkLayoutEngine, m as dialogHostKey, D as diffLines, Y as filterTree, le as groupStackMetrics, ce as hideDescendants, T as highlightCode, _e as isGroupId, ve as makeGroupId, he as memberCardHeight, M as parseNoteData, Q as provideColumnFilterHeader, h as provideDialogHost, ee as provideRowSortHeader, N as serializeNoteData, i as useActiveDocument, $ as useColumnFilterHeaderContext, X as useColumnFilters, be as useDiagramLayout, t as useDialecteChannel, g as useDialog, a as useDocumentProgress, o as useDocumentState, n as useLiveData, B as useMergeSession, te as useOptionalRowSortContext, r as useProjectLiveData, Z as useRowSort };
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 };
@@ -0,0 +1,57 @@
1
+ //#region lib/library-browser/build-tree.ts
2
+ function e(e, t) {
3
+ if (e.startsWith(".")) return !1;
4
+ let n = e.lastIndexOf(".");
5
+ return n === -1 ? !1 : t.includes(e.slice(n).toLowerCase());
6
+ }
7
+ function t(e) {
8
+ let t = e.lastIndexOf("/");
9
+ return t === -1 ? e : e.slice(t + 1);
10
+ }
11
+ function n(e) {
12
+ let t = e.lastIndexOf("/");
13
+ return t === -1 ? void 0 : e.slice(0, t);
14
+ }
15
+ function r(r, i) {
16
+ let a = /* @__PURE__ */ new Map(), o = [];
17
+ for (let n of r) a.set(n.path, {
18
+ path: n.path,
19
+ name: t(n.path),
20
+ kind: n.kind,
21
+ children: [],
22
+ matchesExtension: n.kind === "file" ? e(t(n.path), i) : !1
23
+ });
24
+ for (let e of r) {
25
+ let t = a.get(e.path);
26
+ if (!t) continue;
27
+ let r = n(e.path), i = r ? a.get(r) : void 0;
28
+ i ? i.children.push(t) : o.push(t);
29
+ }
30
+ function s(e) {
31
+ return e.kind === "file" ? e.matchesExtension : (e.children = e.children.filter((e) => {
32
+ let t = s(e);
33
+ return e.kind === "directory" || t;
34
+ }), e.matchesExtension = e.children.some((e) => e.matchesExtension), e.matchesExtension);
35
+ }
36
+ return o.filter((e) => {
37
+ let t = s(e);
38
+ return e.kind === "directory" || t;
39
+ });
40
+ }
41
+ function i(e, t) {
42
+ let n = [];
43
+ for (let r of e) {
44
+ if (r.kind === "file") {
45
+ r.path.toLowerCase().includes(t) && n.push(r);
46
+ continue;
47
+ }
48
+ let e = i(r.children, t);
49
+ e.length > 0 && n.push({
50
+ ...r,
51
+ children: e
52
+ });
53
+ }
54
+ return n;
55
+ }
56
+ //#endregion
57
+ export { r as buildTree, i as pruneForSearch };
@@ -0,0 +1,2 @@
1
+ import e from "./library-browser.js";
2
+ export { e as LibraryBrowser };
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./library-browser.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region lib/library-browser/library-browser.vue
5
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-21431b24"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,124 @@
1
+ import e from "../explorer/explorer.js";
2
+ import "../explorer/index.js";
3
+ import { buildTree as t, pruneForSearch as n } from "./build-tree.js";
4
+ import { computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, defineComponent as c, normalizeClass as l, openBlock as u, ref as d, toDisplayString as f, unref as p, vModelText as m, withCtx as h, withDirectives as g } from "vue";
5
+ //#region lib/library-browser/library-browser.vue?vue&type=script&setup=true&lang.ts
6
+ var _ = { class: "library-browser" }, v = {
7
+ key: 0,
8
+ class: "library-browser__empty-hint",
9
+ "data-testid": "library-browser-empty-hint"
10
+ }, y = {
11
+ key: 1,
12
+ class: "library-browser__offline-hint"
13
+ }, b = "::", x = /*@__PURE__*/ c({
14
+ __name: "library-browser",
15
+ props: {
16
+ sources: {},
17
+ extensions: {},
18
+ storageKey: {}
19
+ },
20
+ emits: ["select"],
21
+ setup(c, { emit: x }) {
22
+ let S = c, C = x, w = d(""), T = r(() => S.extensions.map((e) => e.toLowerCase())), E = r(() => {
23
+ let e = w.value.trim().toLowerCase();
24
+ return S.sources.map((r) => {
25
+ let i = r.status === "online" ? t(r.entries, T.value) : [];
26
+ return {
27
+ source: r,
28
+ nodes: e ? n(i, e) : i
29
+ };
30
+ });
31
+ }), D = r(() => {
32
+ let e = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set();
33
+ return {
34
+ items: E.value.map(({ source: n, nodes: r }) => (n.status === "offline" ? t.add(n.id) : r.some((e) => e.matchesExtension) || e.add(n.id), {
35
+ id: n.id,
36
+ name: n.label,
37
+ tag: "",
38
+ selectable: !1,
39
+ children: n.status === "online" ? r.map((t) => F(t, n.id, e)) : void 0
40
+ })),
41
+ emptyHints: e,
42
+ offline: t
43
+ };
44
+ });
45
+ function O(e) {
46
+ return !e.includes(b);
47
+ }
48
+ let k = r(() => w.value.trim().length > 0), A = d(N()), j = r(() => k.value ? {
49
+ scoped: [],
50
+ all: !0
51
+ } : A.value);
52
+ function M(e) {
53
+ k.value || (A.value = e, S.storageKey && localStorage.setItem(S.storageKey, JSON.stringify(e)));
54
+ }
55
+ function N() {
56
+ if (!S.storageKey) return {
57
+ scoped: [],
58
+ all: !1
59
+ };
60
+ try {
61
+ let e = localStorage.getItem(S.storageKey), t = e ? JSON.parse(e) : void 0;
62
+ if (t && Array.isArray(t.scoped)) return {
63
+ scoped: t.scoped,
64
+ all: !!t.all
65
+ };
66
+ } catch {}
67
+ return {
68
+ scoped: [],
69
+ all: !1
70
+ };
71
+ }
72
+ function P(e) {
73
+ let t = e.id.indexOf(b);
74
+ e.selectable === !1 || t === -1 || C("select", {
75
+ sourceId: e.id.slice(0, t),
76
+ path: e.id.slice(t + 2)
77
+ });
78
+ }
79
+ function F(e, t, n) {
80
+ let r = `${t}${b}${e.path}`;
81
+ return e.kind === "directory" ? (e.matchesExtension || n.add(r), {
82
+ id: r,
83
+ name: e.name,
84
+ tag: "",
85
+ selectable: !1,
86
+ children: e.children.map((e) => F(e, t, n))
87
+ }) : {
88
+ id: r,
89
+ name: e.name,
90
+ tag: "",
91
+ selectable: !0
92
+ };
93
+ }
94
+ return (t, n) => (u(), o("div", _, [g(s("input", {
95
+ "onUpdate:modelValue": n[0] ||= (e) => w.value = e,
96
+ type: "search",
97
+ class: "input input-sm library-browser__search",
98
+ placeholder: "Search...",
99
+ "data-testid": "library-browser-search"
100
+ }, null, 512), [[m, w.value]]), D.value.items.length ? (u(), i(p(e), {
101
+ key: 0,
102
+ items: D.value.items,
103
+ expanded: j.value,
104
+ "aria-label": "Template Library Browser",
105
+ "onUpdate:expanded": M,
106
+ onSelect: P
107
+ }, {
108
+ "node-label": h(({ node: e }) => [
109
+ s("span", {
110
+ class: l(["library-browser__label", {
111
+ offline: D.value.offline.has(e.id),
112
+ "library-browser__label--root": O(e.id)
113
+ }]),
114
+ "data-testid": "library-browser-node-label"
115
+ }, f(e.name), 3),
116
+ D.value.emptyHints.has(e.id) ? (u(), o("span", v, " No matching files ")) : a("", !0),
117
+ D.value.offline.has(e.id) ? (u(), o("span", y, " Offline ")) : a("", !0)
118
+ ]),
119
+ _: 1
120
+ }, 8, ["items", "expanded"])) : a("", !0)]));
121
+ }
122
+ });
123
+ //#endregion
124
+ export { x as default };
@@ -1,5 +1,5 @@
1
1
  import e from "./merge-preflight.vue_vue_type_script_setup_true_lang.js";
2
- //#region lib/merge/merge-preflight.vue
2
+ //#region lib/merge/check-files/components/merge-preflight.vue
3
3
  var t = e;
4
4
  //#endregion
5
5
  export { t as default };
@@ -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.0/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 };
@@ -1,5 +1,5 @@
1
1
  import e from "./merge-summary.vue_vue_type_script_setup_true_lang.js";
2
- //#region lib/merge/merge-summary.vue
2
+ //#region lib/merge/confirm/components/merge-summary.vue
3
3
  var t = e;
4
4
  //#endregion
5
5
  export { t as default };
@@ -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 };