@septkit/ui 0.0.50 → 0.0.51

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 (23) hide show
  1. package/dist/dialecte/composables/use-active-document.js +26 -23
  2. package/dist/dialecte/composables/use-live-data.js +13 -13
  3. package/dist/external/.pnpm/{@dialecte_scl@0.3.9/node_modules/@dialecte/scl/dist/hooks-DO4gUiix.js → @dialecte_scl@0.3.12/node_modules/@dialecte/scl/dist/hooks-Cm_UYBBt.js} +1 -1
  4. package/dist/external/.pnpm/@dialecte_scl@0.3.12/node_modules/@dialecte/scl/dist/v2019C1/index.js +22 -0
  5. package/dist/index.d.ts +41 -9
  6. package/dist/merge/build-view-model.js +71 -60
  7. package/dist/merge/decision-toggle.vue_vue_type_script_setup_true_lang.js +2 -2
  8. package/dist/merge/element-detail.vue_vue_type_script_setup_true_lang.js +139 -67
  9. package/dist/merge/merge-correlate.js +46 -0
  10. package/dist/merge/merge-decision.js +6 -0
  11. package/dist/merge/merge-highlight.js +44 -0
  12. package/dist/merge/merge-preflight.js +5 -0
  13. package/dist/merge/merge-preflight.vue_vue_type_script_setup_true_lang.js +41 -0
  14. package/dist/merge/merge-progress.vue_vue_type_script_setup_true_lang.js +12 -20
  15. package/dist/merge/merge-review.vue_vue_type_script_setup_true_lang.js +233 -189
  16. package/dist/merge/merge-tree.vue_vue_type_script_setup_true_lang.js +74 -65
  17. package/dist/merge/merge.service.js +36 -23
  18. package/dist/merge/use-document-progress.js +8 -9
  19. package/dist/merge/use-merge-session.js +122 -111
  20. package/dist/ui.css +1 -1
  21. package/package.json +2 -2
  22. package/dist/external/.pnpm/@dialecte_scl@0.3.9/node_modules/@dialecte/scl/dist/v2019C1/index.js +0 -3
  23. package/dist/external/.pnpm/@lucide_vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/rotate-ccw.js +0 -11
@@ -1,31 +1,34 @@
1
- import { getCurrentScope as e, onScopeDispose as t, ref as n } from "vue";
1
+ import { computed as e, getCurrentScope as t, onScopeDispose as n, ref as r } from "vue";
2
2
  //#region lib/dialecte/composables/use-active-document.ts
3
- function r(r) {
4
- let { project: i, activeDocumentId: a, hydrate: o, clear: s } = r, c = n(!1), l = n(a.value), u = 0, d = !1;
5
- async function f(e) {
6
- let t = ++u;
7
- if (l.value = e, c.value = !1, !e) {
8
- s();
9
- return;
10
- }
11
- try {
12
- let { ready: n } = await i.getDocumentStatus(e);
13
- if (d || t !== u) return;
14
- n ? (o(i.openDocument(e)), c.value = !0) : s();
3
+ function i(i) {
4
+ let { project: a, activeDocumentId: o, hydrate: s, clear: c } = i, l = r(), u = e(() => l.value !== void 0), d = r(o.value), f = 0, p = !1;
5
+ function m() {
6
+ l.value = void 0, c?.();
7
+ }
8
+ async function h(e) {
9
+ let t = ++f;
10
+ if (d.value = e, m(), e) try {
11
+ let { ready: n } = await a.getDocumentStatus(e);
12
+ if (p || t !== f) return;
13
+ if (n) {
14
+ let t = a.openDocument(e);
15
+ l.value = t, s?.(t);
16
+ }
15
17
  } catch (e) {
16
- if (d || t !== u) return;
17
- console.debug("[useActiveDocument] getDocumentStatus failed", e), c.value = !1, s();
18
+ if (p || t !== f) return;
19
+ console.debug("[useActiveDocument] getDocumentStatus failed", e);
18
20
  }
19
21
  }
20
- f(a.value);
21
- let p = a.subscribe((e) => void f(e)), m = () => {
22
- d || (d = !0, u += 1, p(), c.value = !1, s());
22
+ h(o.value);
23
+ let g = o.subscribe((e) => void h(e)), _ = () => {
24
+ p || (p = !0, f += 1, g(), m());
23
25
  };
24
- return e() && t(m), {
25
- isReady: c,
26
- activeDocumentId: l,
27
- stop: m
26
+ return t() && n(_), {
27
+ document: l,
28
+ isReady: u,
29
+ activeDocumentId: d,
30
+ stop: _
28
31
  };
29
32
  }
30
33
  //#endregion
31
- export { r as useActiveDocument };
34
+ export { i as useActiveDocument };
@@ -1,31 +1,31 @@
1
1
  import { useDebounceFn as e } from "../../external/.pnpm/@vueuse_shared@14.3.0_vue@3.5.39_typescript@5.8.3_/node_modules/@vueuse/shared/dist/index.js";
2
2
  import { useAsyncState as t } from "../../external/.pnpm/@vueuse_core@14.3.0_vue@3.5.39_typescript@5.8.3_/node_modules/@vueuse/core/dist/index.js";
3
3
  import { useDialecteChannel as n } from "./use-dialecte-channel.js";
4
- import { computed as r, toValue as i, unref as a, watch as o } from "vue";
4
+ import { computed as r, toValue as i, watch as a } from "vue";
5
5
  //#region lib/dialecte/composables/use-live-data.ts
6
- function s(i) {
7
- let { document: s, fetcher: c, initial: l } = i, { state: u, isLoading: d, error: f, execute: p } = t(c, l), m = e(p, 50), h = r(() => a(s)), { data: g } = n(h.value.channelName);
8
- return o(g, (e) => {
9
- e?.type === "commit" && e.documentId === h.value.documentId && m();
10
- }), o(() => h.value.documentId, () => {
11
- u.value = l, m();
12
- }), {
6
+ function o(o) {
7
+ let { document: s, fetcher: c, initial: l } = o, { state: u, isLoading: d, error: f, execute: p } = t(c, l, { immediate: !1 }), m = e(p, 50), h = r(() => i(s)), { data: g } = n(r(() => h.value?.channelName));
8
+ return a(g, (e) => {
9
+ e?.type === "commit" && e.documentId === h.value?.documentId && m();
10
+ }), a(() => h.value?.documentId, (e) => {
11
+ u.value = l, e && m();
12
+ }, { immediate: !0 }), {
13
13
  state: u,
14
14
  isLoading: d,
15
15
  error: f,
16
16
  refresh: p
17
17
  };
18
18
  }
19
- function c(a) {
20
- let { project: s, fetcher: c, initial: l } = a, { state: u, isLoading: d, error: f, execute: p } = t(c, l, { immediate: !1 }), m = e(p, 50), h = r(() => i(s)?.channelName), { data: g } = n(h);
21
- return o(g, (e) => {
19
+ function s(o) {
20
+ let { project: s, fetcher: c, initial: l } = o, { state: u, isLoading: d, error: f, execute: p } = t(c, l, { immediate: !1 }), m = e(p, 50), h = r(() => i(s)?.channelName), { data: g } = n(h);
21
+ return a(g, (e) => {
22
22
  switch (e?.type) {
23
23
  case "commit":
24
24
  case "init-empty-document":
25
25
  case "document-removed":
26
26
  case "document-imported": m();
27
27
  }
28
- }), o(h, (e) => {
28
+ }), a(h, (e) => {
29
29
  u.value = l, e && m();
30
30
  }, { immediate: !0 }), {
31
31
  state: u,
@@ -35,4 +35,4 @@ function c(a) {
35
35
  };
36
36
  }
37
37
  //#endregion
38
- export { s as useLiveData, c as useProjectLiveData };
38
+ export { o as useLiveData, s as useProjectLiveData };
@@ -1,5 +1,5 @@
1
1
  import { XSI_NAMESPACE as e } from "../../../../../@dialecte_core@0.4.9/node_modules/@dialecte/core/dist/helpers.js";
2
- //#region node_modules/.pnpm/@dialecte+scl@0.3.9/node_modules/@dialecte/scl/dist/hooks-DO4gUiix.js
2
+ //#region node_modules/.pnpm/@dialecte+scl@0.3.12/node_modules/@dialecte/scl/dist/hooks-Cm_UYBBt.js
3
3
  var t = /* @__PURE__ */ "AccessControl.AccessPoint.Address.AllocationRole.AllocationRoleRef.AnalogueWiringParameters.AnalogueWiringParametersRef.Application.ApplicationSclRef.Association.Authentication.BDA.Bay.BayType.BehaviorDescription.BehaviorDescriptionRef.BehaviorReference.BinaryWiringParameters.BinaryWiringParametersRef.BitRate.CheckoutID.ClientLN.ClientServices.CommProt.Communication.CommunicationServiceSpecifications.ConductingEquipment.ConfDataSet.ConfLNs.ConfLdName.ConfLogControl.ConfReportControl.ConfSG.ConfSigRef.ConnectedAP.ConnectivityNode.ControlRef.ControllingLNode.DA.DAI.DAS.DAType.DO.DOI.DOS.DOType.DataObjectDirectory.DataSet.DataSetDirectory.DataTypeTemplates.DynAssociation.DynDataSet.EnumType.EnumVal.EqFunction.EqSubFunction.ExtCtrl.ExtRef.FCDA.FileHandling.Function.FunctionCatRef.FunctionCategory.FunctionCategoryRef.FunctionRef.FunctionRole.FunctionRoleContent.FunctionSclRef.FunctionTemplate.FunctionalSubVariant.FunctionalVariant.FunctionalVariantGroup.FunctionalVariantRef.GOOSE.GOOSEMcSecurity.GOOSESecurity.GSE.GSEControl.GSEDir.GSESettings.GSSE.GeneralEquipment.GetCBValues.GetDataObjectDefinition.GetDataSetValue.GetDirectory.GooseParameters.GooseParametersRef.Header.History.Hitem.IED.IEDName.IEDSourceFiles.InputVar.InputVarRef.Inputs.IssuerName.KDC.L2CommParameters.L3IPv4CommParameters.L3IPv6CommParameters.LDevice.LN.LN0.LNode.LNodeDataRef.LNodeInputRef.LNodeInputs.LNodeOutputRef.LNodeOutputs.LNodeSpecNaming.LNodeType.Label.Labels.Line.Log.LogControl.LogParameters.LogParametersRef.LogSettings.MaxTime.McSecurity.MinRequestedSCDFile.MinRequestedSCDFiles.MinTime.MultiAPPerSubNet.NeutralPoint.OptFields.OutputVar.OutputVarRef.Outputs.P.PhysConn.PowerSystemRelation.PowerSystemRelationRef.PowerSystemRelations.PowerTransformer.Private.Process.ProcessEcho.ProcessResource.ProcessResourceRef.ProcessResources.Project.ProjectProcessReference.ProtNs.Protocol.ReadWrite.RedProt.ReportControl.ReportParameters.ReportParametersRef.ReportSettings.Resource.RptEnabled.SCL.SCSM.SDI.SDO.SDS.SGEdit.SMV.SMVParameters.SMVParametersRef.SMVSecurity.SMVSettings.SMVsc.SVMcSecurity.SampledValueControl.SamplesPerSec.SclFileReference.SecPerSamples.Security.Server.ServerAt.ServiceSpecifications.Services.SetDataSetValue.SettingControl.SettingGroups.SignalRole.SmpRate.SmvOpts.SourceFiles.SourceRef.SubCategory.SubCheckoutID.SubEquipment.SubFunction.SubFunctionTemplate.SubNetwork.Subject.SubscriberLNode.Substation.SupSubscription.TapChanger.Terminal.Text.TimeSyncProt.TimerActivatedControl.TransformerWinding.TrgOps.Val.ValueHandling.Variable.VariableApplyTo.VariableRef.Voltage.VoltageLevel".split("."), n = {
4
4
  AccessControl: {
5
5
  tag: "AccessControl",
@@ -0,0 +1,22 @@
1
+ import "../../../../../../@dialecte_core@0.4.9/node_modules/@dialecte/core/dist/index.js";
2
+ import { i as e } from "../hooks-Cm_UYBBt.js";
3
+ //#region node_modules/.pnpm/@dialecte+scl@0.3.12/node_modules/@dialecte/scl/dist/v2019C1/index.js
4
+ var t = {
5
+ "cross-type-template-uuid": {
6
+ title: "Placeholder templateUuid reused across element types",
7
+ description: "One templateUuid is carried by elements of several different types, so it cannot identify a single template element — it is an authoring placeholder, not real lineage.",
8
+ fallback: "Template lineage is ignored for these elements; each instance is recognised by its name within its parent instead, so the merge still proceeds."
9
+ },
10
+ "duplicate-instance-uuid": {
11
+ title: "Duplicate instance uuid",
12
+ description: "The same uuid is used by more than one element. Every instance uuid in an SCL must be unique, so uuid-based identity is ambiguous for the affected elements.",
13
+ fallback: "The affected elements are matched by name and position rather than uuid, so the merge still proceeds — resolve the duplication to restore reliable identity."
14
+ },
15
+ "template-uuid-type-mismatch": {
16
+ title: "templateUuid resolves to a different element type",
17
+ description: "A templateUuid points in-file to an element of a different type than the one carrying it. An instance cannot derive from a template of another type, so the lineage is inconsistent.",
18
+ fallback: "The mismatched lineage is ignored and the element is recognised by name, so the merge still proceeds."
19
+ }
20
+ };
21
+ //#endregion
22
+ export { t as TEMPLATE_UUID_WARNING_INFO, e as presentationScope };
package/dist/index.d.ts CHANGED
@@ -21,6 +21,7 @@ import { Reactive } from 'vue';
21
21
  import { Ref } from 'vue';
22
22
  import { Scl } from '@dialecte/scl/v2019C1';
23
23
  import { ShallowRef } from 'vue';
24
+ import { TemplateUuidWarning } from '@dialecte/scl/v2019C1';
24
25
 
25
26
  declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
26
27
 
@@ -100,6 +101,8 @@ declare type __VLS_Props_11 = {
100
101
  detail: ElementDetailVM | undefined;
101
102
  /** Consumer-supplied fixed prefix/suffix per attribute; the user edits only the core. */
102
103
  affixMask?: AffixMaskResolver;
104
+ /** The selected group is skipped: lock editing and show the skip (current) value. */
105
+ disabled?: boolean;
103
106
  };
104
107
 
105
108
  declare type __VLS_Props_12 = MergeSessionParams & {
@@ -462,10 +465,15 @@ export declare const DecisionToggle: DefineComponent<__VLS_PublicProps_2, {}, {}
462
465
  export declare type DetailAttribute = {
463
466
  name: string;
464
467
  status: ChangeStatus;
465
- /** The current/instance value — the `-` line, present when modified/removed. */
468
+ /** The current/instance value — the `-` line, present when modified/removed. (Skip target.) */
466
469
  before?: string;
467
- /** The final value that will be written — the `+` line, present when added/modified. */
470
+ /** The incoming/proposed value — the `+` line, present when added/modified. (Accept target.) */
468
471
  after?: string;
472
+ /**
473
+ * The live value that will actually be written — the user's edit, or accept/skip choice.
474
+ * Defaults to `after` (accept) when unset; a skip sets it to `before`. The input binds to this.
475
+ */
476
+ written?: string;
469
477
  /** When set, the attribute is user-editable and its value renders as an input. */
470
478
  editable?: EditableMode;
471
479
  /** The engine auto-resolved a placement collision on this field (value = the resolved one). */
@@ -664,6 +672,15 @@ export declare type MergeNodeMeta = {
664
672
  regionHead?: boolean;
665
673
  /** For a satellite companion that lives elsewhere: its real document path (shown as subtitle). */
666
674
  path?: string;
675
+ /**
676
+ * Present on an instance ROOT (Application/Function): its linkage to the loaded template
677
+ * and its member cluster. Drives the "linked / up to date" badge and the select-to-highlight
678
+ * of the whole instance (subtree + folded satellites).
679
+ */
680
+ instance?: {
681
+ linked: boolean;
682
+ upToDate: boolean;
683
+ };
667
684
  };
668
685
 
669
686
  export declare const MergeReview: DefineComponent<__VLS_Props_12, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
@@ -743,14 +760,21 @@ export declare type UnifiedDiff = {
743
760
  };
744
761
 
745
762
  /**
746
- * Reactively hydrate the shell's active document — race-safe across realms.
763
+ * Reactively resolve the shell's active document — race-safe across realms.
747
764
  *
748
765
  * The active-document id (shell `localStorage` `storage` event) and the
749
766
  * project's document registry (BroadcastChannel) are not ordered across realms,
750
767
  * so in an iframe extension the id can arrive before the document is registered
751
768
  * / its records are readable. `project.getDocumentStatus(id)` reconciles this
752
- * realm's store against persisted state first, so hydration never races ahead
753
- * of the document. Results from a superseded switch are ignored.
769
+ * realm's store against persisted state first, so the exposed document never
770
+ * races ahead of the document. Results from a superseded switch are ignored.
771
+ *
772
+ * The resolved document is returned as a nullable `document` ref (single source
773
+ * of truth); `isReady` is derived from it. When the active id changes, the
774
+ * previous document is dropped *before* the new one's readiness is probed, so a
775
+ * stale document is never exposed for the new id. Consumers should gate on
776
+ * `isReady`/`document` and can pass optional `hydrate`/`clear` callbacks to also
777
+ * mirror the value into a module-level document store.
754
778
  *
755
779
  * Cleanup runs automatically when used inside a component/effect scope; the
756
780
  * returned `stop` lets scope-less callers (e.g. an extension bootstrap) tear it
@@ -759,10 +783,11 @@ export declare type UnifiedDiff = {
759
783
  export declare function useActiveDocument<GenericDocument>(params: {
760
784
  project: ActiveDocumentProject<GenericDocument>;
761
785
  activeDocumentId: ActiveDocumentObservable<string>;
762
- hydrate: (doc: GenericDocument) => void;
763
- clear: () => void;
786
+ hydrate?: (doc: GenericDocument) => void;
787
+ clear?: () => void;
764
788
  }): {
765
- isReady: Ref<boolean>;
789
+ document: Ref<GenericDocument | undefined>;
790
+ isReady: ComputedRef<boolean>;
766
791
  activeDocumentId: Ref<string | undefined>;
767
792
  stop: () => void;
768
793
  };
@@ -796,9 +821,15 @@ export declare function useDialog(): DialogController;
796
821
  * a `commit` message for this documentId — posted by any Document instance,
797
822
  * in this tab or another — re-runs the fetcher. Document state itself is plain,
798
823
  * non-reactive data in core; do not watch it.
824
+ *
825
+ * The document may be absent (`undefined`): the composable then holds `initial`,
826
+ * subscribes to nothing, and starts fetching once a document appears — mirroring
827
+ * {@link useProjectLiveData}. This lets a caller pass a document that is null
828
+ * before hydration or during a teardown/switch without pre-guarding a value
829
+ * that would otherwise throw.
799
830
  */
800
831
  export declare function useLiveData<T>(params: {
801
- document: LiveDataDocument | ComputedRef<LiveDataDocument>;
832
+ document: MaybeRefOrGetter<LiveDataDocument | undefined>;
802
833
  fetcher: () => Promise<T>;
803
834
  initial: T;
804
835
  }): {
@@ -821,6 +852,7 @@ export declare function useMergeSession(params: MergeSessionParams): {
821
852
  previewXml: ShallowRef<string | undefined, string | undefined>;
822
853
  previewBeforeXml: ShallowRef<string | undefined, string | undefined>;
823
854
  previewLoading: ShallowRef<boolean, boolean>;
855
+ warnings: ShallowRef<TemplateUuidWarning[], TemplateUuidWarning[]>;
824
856
  load: () => Promise<void>;
825
857
  setDecision: (groupId: string, action: "accept" | "skip") => void;
826
858
  setValue: (groupId: string, attr: string, value: string) => void;
@@ -1,46 +1,47 @@
1
1
  import { extractTitle as e, getAttributes as t } from "./merge.service.js";
2
2
  //#region lib/merge/build-view-model.ts
3
- async function n(e) {
4
- let { report: n, createdBySourceUuid: r, sourceQuery: i } = e, a = /* @__PURE__ */ new Map();
5
- for (let e of n.groups) {
6
- a.set(e.primary, {
7
- role: "primary",
8
- groupId: e.id
9
- });
10
- for (let t of e.companions) a.set(t, {
11
- role: "companion",
12
- groupId: e.id
3
+ function n(e) {
4
+ return e.instances.flatMap((e) => e.groups);
5
+ }
6
+ function r(e) {
7
+ let { report: t, correlation: r } = e, i = /* @__PURE__ */ new Map();
8
+ for (let e of n(t)) i.set(e.primary, {
9
+ role: "primary",
10
+ groupId: e.id
11
+ });
12
+ let a = /* @__PURE__ */ new Map();
13
+ function o(e) {
14
+ let t = r.get(e);
15
+ if (!t) return;
16
+ let n = i.get(e);
17
+ a.set(t, {
18
+ change: e.change,
19
+ role: n?.role ?? "plain",
20
+ groupId: n?.groupId,
21
+ node: e
13
22
  });
14
23
  }
15
- let o = /* @__PURE__ */ new Map();
16
- async function s(e) {
17
- if (e.instanceRef) return e.instanceRef.id;
18
- if (e.sourceRef) {
19
- let n = await t(i, e.sourceRef);
20
- return n.uuid ? r.get(n.uuid)?.id : void 0;
21
- }
24
+ function s(e) {
25
+ o(e);
26
+ for (let t of e.children) s(t);
22
27
  }
23
- async function c(e) {
24
- let t = await s(e);
25
- if (t) {
26
- let n = a.get(e);
27
- o.set(t, {
28
+ function c(e, t) {
29
+ if (e.change !== "unchanged") {
30
+ let n = r.get(e);
31
+ n && a.set(n, {
28
32
  change: e.change,
29
- role: n?.role ?? "plain",
30
- groupId: n?.groupId,
33
+ role: "companion",
34
+ groupId: t,
31
35
  node: e
32
36
  });
33
37
  }
38
+ for (let n of e.children) c(n, t);
34
39
  }
35
- async function l(e) {
36
- await c(e);
37
- for (let t of e.children) await l(t);
38
- }
39
- for (let e of n.roots) await l(e);
40
- for (let e of n.groups) for (let t of e.companions) await c(t);
41
- return o;
40
+ for (let e of t.instances) s(e.tree);
41
+ for (let e of n(t)) for (let t of e.companions) c(t, e.id);
42
+ return a;
42
43
  }
43
- async function r(t) {
44
+ async function i(t) {
44
45
  let { tree: n, changeByStagedId: r, query: i } = t, a = {
45
46
  items: [],
46
47
  meta: {},
@@ -51,7 +52,7 @@ async function r(t) {
51
52
  let c = r.get(t.id), l = c?.change ?? (n.added ? "added" : "unchanged"), u = c?.groupId ?? (l === "unchanged" ? void 0 : n.groupId), d = c?.role ?? "plain", f = {
52
53
  tagName: t.tagName,
53
54
  id: t.id
54
- }, p = l !== "unchanged" && (!s || s.change === "unchanged" || s.groupId !== u), m = {
55
+ }, p = l !== "unchanged" && (!s || s.change === "unchanged" || s.groupId !== u || s.change !== l), m = {
55
56
  added: c ? c.change === "added" : n.added,
56
57
  groupId: u ?? n.groupId
57
58
  }, h = [];
@@ -82,12 +83,22 @@ async function r(t) {
82
83
  changed: g
83
84
  };
84
85
  }
85
- return a.items.push((await o(n, {
86
+ a.items.push((await o(n, {
86
87
  added: !1,
87
88
  groupId: void 0
88
- }, void 0)).node), a;
89
+ }, void 0)).node);
90
+ let s = /* @__PURE__ */ new Map();
91
+ for (let [e, t] of r) s.set(t.node, e);
92
+ for (let e of t.instances) {
93
+ let t = s.get(e.tree);
94
+ !t || !a.meta[t] || (a.meta[t].instance = {
95
+ linked: e.linked,
96
+ upToDate: e.upToDate
97
+ });
98
+ }
99
+ return a;
89
100
  }
90
- async function i(e, n, r) {
101
+ async function a(e, n, r) {
91
102
  let i = new Map((n?.editableAttributes ?? []).map((e) => [e.attr, e])), a = [];
92
103
  if (e.change === "added" && e.sourceRef) {
93
104
  let n = await t(r.sourceQuery, e.sourceRef);
@@ -142,13 +153,13 @@ async function i(e, n, r) {
142
153
  }
143
154
  return {
144
155
  tag: e.tagName,
145
- title: await o(e, r),
156
+ title: await s(e, r),
146
157
  change: e.change,
147
158
  attributes: a
148
159
  };
149
160
  }
150
- async function a(e, t, n, r) {
151
- let i = {
161
+ async function o(e, t, r, i) {
162
+ let a = {
152
163
  added: [],
153
164
  updated: [],
154
165
  skipped: [],
@@ -156,49 +167,49 @@ async function a(e, t, n, r) {
156
167
  removed: [],
157
168
  renamed: []
158
169
  };
159
- for (let a of e.groups) {
160
- let e = await o(a.primary, r), s = a.primary.tagName, c = a.companions.length;
161
- if (a.primary.change === "target-only") {
162
- t(a.id) === "skip" ? i.preserved.push({
170
+ for (let o of n(e)) {
171
+ let e = await s(o.primary, i), n = o.primary.tagName, c = o.companions.length;
172
+ if (o.primary.change === "target-only") {
173
+ t(o.id) === "skip" ? a.preserved.push({
163
174
  title: e,
164
- tag: s
165
- }) : i.removed.push({
175
+ tag: n
176
+ }) : a.removed.push({
166
177
  title: e,
167
- tag: s
178
+ tag: n
168
179
  });
169
180
  continue;
170
181
  }
171
- if (t(a.id) === "skip") {
172
- i.skipped.push({
182
+ if (t(o.id) === "skip") {
183
+ a.skipped.push({
173
184
  title: e,
174
- tag: s
185
+ tag: n
175
186
  });
176
187
  continue;
177
188
  }
178
- for (let t of a.editableAttributes ?? []) t.conflict && t.suggestedValue && n(a.id, t.attr) == null && i.renamed.push({
189
+ for (let t of o.editableAttributes ?? []) t.conflict && t.suggestedValue && r(o.id, t.attr) == null && a.renamed.push({
179
190
  title: e,
180
191
  field: t.attr,
181
192
  to: t.suggestedValue
182
193
  });
183
- let l = a.editableAttributes?.find((e) => e.attr === "name" && e.conflict), u = n(a.id, "name") ?? l?.suggestedValue ?? e;
184
- if (a.primary.change === "added") i.added.push({
194
+ let l = o.editableAttributes?.find((e) => e.attr === "name" && e.conflict), u = r(o.id, "name") ?? l?.suggestedValue ?? e;
195
+ if (o.primary.change === "added") a.added.push({
185
196
  title: u,
186
- tag: s,
197
+ tag: n,
187
198
  detail: c ? `+${c} companion${c > 1 ? "s" : ""}` : void 0
188
199
  });
189
- else if (a.primary.change === "modified") {
190
- let e = a.primary.attributeChanges?.length ?? 0;
191
- i.updated.push({
200
+ else if (o.primary.change === "modified") {
201
+ let e = o.primary.attributeChanges?.length ?? 0;
202
+ a.updated.push({
192
203
  title: u,
193
- tag: s,
204
+ tag: n,
194
205
  detail: e ? `${e} attribute change${e > 1 ? "s" : ""}` : void 0
195
206
  });
196
207
  }
197
208
  }
198
- return i;
209
+ return a;
199
210
  }
200
- async function o(t, n) {
211
+ async function s(t, n) {
201
212
  return t.instanceRef ? e(n.targetQuery, t.instanceRef) : t.sourceRef ? e(n.sourceQuery, t.sourceRef) : t.tagName;
202
213
  }
203
214
  //#endregion
204
- export { n as buildChangeIndex, i as buildDetail, r as buildStructuralTree, a as buildSummary };
215
+ export { n as allGroups, r as buildChangeIndex, a as buildDetail, i as buildStructuralTree, o as buildSummary };
@@ -23,13 +23,13 @@ var c = {
23
23
  })[d.size ?? "undefined"]);
24
24
  return (e, s) => (o(), t("div", c, [n("button", {
25
25
  type: "button",
26
- class: a(["btn join-item", [f.value, i.value === "accept" ? "btn-success" : "btn-ghost"]]),
26
+ class: a(["btn join-item font-semibold", [f.value, i.value === "accept" ? "btn-success text-success-content" : "btn-ghost"]]),
27
27
  disabled: r.disabled,
28
28
  "aria-pressed": i.value === "accept",
29
29
  onClick: s[0] ||= (e) => i.value = "accept"
30
30
  }, " Accept ", 10, l), n("button", {
31
31
  type: "button",
32
- class: a(["btn join-item", [f.value, i.value === "skip" ? "btn-warning" : "btn-ghost"]]),
32
+ class: a(["btn join-item font-semibold", [f.value, i.value === "skip" ? "btn-warning text-black" : "btn-ghost"]]),
33
33
  disabled: r.disabled,
34
34
  "aria-pressed": i.value === "skip",
35
35
  onClick: s[1] ||= (e) => i.value = "skip"