@septkit/ui 0.0.58 → 0.0.59

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.
@@ -1,4 +1,4 @@
1
- //#region node_modules/.pnpm/@dialecte+core@0.4.12/node_modules/@dialecte/core/dist/utils-C5_11hqg.js
1
+ //#region node_modules/.pnpm/@dialecte+core@0.4.16/node_modules/@dialecte/core/dist/utils-BiEx1x59.js
2
2
  var e = {
3
3
  UNKNOWN: {
4
4
  code: "D0001",
@@ -229,4 +229,4 @@ function f(e) {
229
229
  return c.push(...s), c;
230
230
  }
231
231
  //#endregion
232
- export { a, u as c, c as d, i as f, l as i, o as l, e as m, f as n, r as o, t as p, d as r, s as u };
232
+ export { r as c, o as d, s as f, e as g, t as h, i as m, f as n, l as o, c as p, d as r, a as s, u };
@@ -1,5 +1,5 @@
1
- import { XSI_NAMESPACE as e } from "../../../../../@dialecte_core@0.4.12/node_modules/@dialecte/core/dist/helpers.js";
2
- //#region node_modules/.pnpm/@dialecte+scl@0.3.15/node_modules/@dialecte/scl/dist/hooks-CLIa7kxj.js
1
+ import { XSI_NAMESPACE as e } from "../../../../../@dialecte_core@0.4.16/node_modules/@dialecte/core/dist/helpers.js";
2
+ //#region node_modules/.pnpm/@dialecte+scl@0.3.17/node_modules/@dialecte/scl/dist/hooks-BBGXNK0x.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",
@@ -19910,13 +19910,24 @@ var u = {
19910
19910
  }]
19911
19911
  }, d = Object.keys(u);
19912
19912
  new Set(d), new Set(Object.values(u).flatMap((e) => e.flatMap((e) => e.target)));
19913
- var f = {
19913
+ var f = [
19914
+ "Substation",
19915
+ "VoltageLevel",
19916
+ "Bay"
19917
+ ], p = [
19918
+ "Application",
19919
+ "Function",
19920
+ "FunctionCategory",
19921
+ "AllocationRole",
19922
+ "Variable",
19923
+ "BehaviorDescription"
19924
+ ], m = {
19914
19925
  direct: "direct",
19915
19926
  lnode: "lnode",
19916
19927
  iedAddress: "ied-address",
19917
19928
  behaviorDescription: "behavior-description",
19918
19929
  unsupported: "unsupported"
19919
- }, p = {
19930
+ }, h = {
19920
19931
  LN: [{
19921
19932
  attribute: "lnType",
19922
19933
  target: "LNodeType"
@@ -19968,7 +19979,7 @@ var f = {
19968
19979
  }
19969
19980
  }]
19970
19981
  };
19971
- function m(e) {
19982
+ function g(e) {
19972
19983
  let t = {};
19973
19984
  for (let [n, r] of Object.entries(e)) for (let e of r) {
19974
19985
  let r = t[e.resolution] ??= /* @__PURE__ */ new Map();
@@ -19983,7 +19994,7 @@ function m(e) {
19983
19994
  }
19984
19995
  return t;
19985
19996
  }
19986
- function h(e) {
19997
+ function _(e) {
19987
19998
  let t = /* @__PURE__ */ new Map();
19988
19999
  for (let [n, r] of Object.entries(e)) t.set(n, r.map((e) => ({
19989
20000
  uuidAttr: e.attribute.uuid,
@@ -19993,7 +20004,7 @@ function h(e) {
19993
20004
  })));
19994
20005
  return t;
19995
20006
  }
19996
- function g(e) {
20007
+ function v(e) {
19997
20008
  let t = /* @__PURE__ */ new Map();
19998
20009
  for (let [n, r] of Object.entries(e)) for (let e of r) {
19999
20010
  let r = t.get(e.target) ?? [];
@@ -20005,23 +20016,24 @@ function g(e) {
20005
20016
  }
20006
20017
  return t;
20007
20018
  }
20008
- m(u);
20009
- var _ = [
20010
- f.direct,
20011
- f.lnode,
20012
- f.iedAddress,
20013
- f.behaviorDescription
20019
+ g(u);
20020
+ var y = [
20021
+ m.direct,
20022
+ m.lnode,
20023
+ m.iedAddress,
20024
+ m.behaviorDescription
20014
20025
  ];
20015
- [..._, f.unsupported], h(u), new Map(Object.entries(u).flatMap(([e, t]) => t.filter((e) => e.attribute.path === "mappedDoName" || e.attribute.path === "mappedDaName").map((t) => [e, {
20026
+ [...y, m.unsupported], _(u), new Map(Object.entries(u).flatMap(([e, t]) => t.filter((e) => e.attribute.path === "mappedDoName" || e.attribute.path === "mappedDaName").map((t) => [e, {
20016
20027
  path: t.attribute.path,
20017
20028
  uuid: t.attribute.uuid
20018
20029
  }]))), [...new Set(Object.values(u).flatMap((e) => e.map((e) => e.attribute.uuid)))];
20019
- var v = new Map(Object.entries(p).map(([e, t]) => [e, [...new Set(t.map((e) => e.attribute))]])), y = g(p);
20020
- new Set(y.keys()), [...n.LNode?.attributes?.identityFields ?? [], ...v.get("LNode") ?? []], new Set(n.LNode.attributes.details.lnClass.facets.enumeration), new Set(Object.values(u).flatMap((e) => e.flatMap((e) => [e.attribute.path, e.attribute.uuid])));
20021
- function b(e) {
20030
+ var b = new Map(Object.entries(h).map(([e, t]) => [e, [...new Set(t.map((e) => e.attribute))]])), x = v(h);
20031
+ new Set(x.keys()), [...n.LNode?.attributes?.identityFields ?? [], ...b.get("LNode") ?? []], new Set(n.LNode.attributes.details.lnClass.facets.enumeration), new Set(Object.values(u).flatMap((e) => e.flatMap((e) => [e.attribute.path, e.attribute.uuid]))), [...f, ...p];
20032
+ function S(e) {
20022
20033
  switch (e.verb) {
20023
20034
  case "fsd":
20024
- case "asd": return {
20035
+ case "asd":
20036
+ case "ssd": return {
20025
20037
  rootTag: "Substation",
20026
20038
  omit: ["Communication", "IED"],
20027
20039
  include: ["DataTypeTemplates"]
@@ -20030,4 +20042,4 @@ function b(e) {
20030
20042
  }
20031
20043
  new Set(Object.values(a).map((e) => e.uri)), new Set(Object.values(a).map((e) => e.prefix).filter(Boolean));
20032
20044
  //#endregion
20033
- export { i as A, u as D, r as M, a as N, v as g, y as h, b as i, o as k, _ as m, p as v, d as w, f as y };
20045
+ export { o as A, n as F, r as N, u as O, a as P, f as S, d as T, p as b, b as g, x as h, S as i, i as j, y as m, h as v, m as y };
@@ -1,6 +1,6 @@
1
- import "../../../../../../@dialecte_core@0.4.12/node_modules/@dialecte/core/dist/index.js";
2
- import { i as e } from "../hooks-CLIa7kxj.js";
3
- //#region node_modules/.pnpm/@dialecte+scl@0.3.15/node_modules/@dialecte/scl/dist/v2019C1/index.js
1
+ import "../../../../../../@dialecte_core@0.4.16/node_modules/@dialecte/core/dist/index.js";
2
+ import { i as e } from "../hooks-BBGXNK0x.js";
3
+ //#region node_modules/.pnpm/@dialecte+scl@0.3.17/node_modules/@dialecte/scl/dist/v2019C1/index.js
4
4
  var t = {
5
5
  "cross-type-template-uuid": {
6
6
  title: "Placeholder templateUuid reused across element types",
package/dist/index.d.ts CHANGED
@@ -23,6 +23,7 @@ import { Ref } from 'vue';
23
23
  import { Scl } from '@dialecte/scl/v2019C1';
24
24
  import { ShallowRef } from 'vue';
25
25
  import { TemplateUuidWarning } from '@dialecte/scl/v2019C1';
26
+ import { TopologyStructuralTag } from '@dialecte/scl/v2019C1';
26
27
 
27
28
  declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
28
29
 
@@ -879,8 +880,8 @@ export declare type MergeSessionParams = {
879
880
  verb: LifecycleVerb;
880
881
  /** Operation to perform: place a new instance, or reconcile the existing one. */
881
882
  scenario: LifecycleScenario;
882
- /** Source (template) element: a Function (fsd) or Application (asd). */
883
- sourceRef: Scl.Ref<'Function'> | Scl.Ref<'Application'>;
883
+ /** Source (template) element: a Function (fsd), Application (asd) or topology scope (ssd). */
884
+ sourceRef: Scl.Ref<'Function'> | Scl.Ref<'Application'> | Scl.Ref<TopologyStructuralTag>;
884
885
  /** Target parent the instance lives under / is placed into. */
885
886
  anchor: Scl.Ref<Scl.ElementsOf>;
886
887
  /** Optional consumer post-step run inside the merge tx (preview + commit). */
@@ -4,42 +4,42 @@ function n(e) {
4
4
  return e.instances.flatMap((e) => e.groups);
5
5
  }
6
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, {
7
+ let { report: t } = e, r = /* @__PURE__ */ new Map();
8
+ for (let e of n(t)) r.set(e.primary, {
9
9
  role: "primary",
10
10
  groupId: e.id
11
11
  });
12
- let a = /* @__PURE__ */ new Map();
13
- function o(e) {
14
- let t = r.get(e);
12
+ let i = /* @__PURE__ */ new Map();
13
+ function a(e) {
14
+ let t = e.appliedRef?.id;
15
15
  if (!t) return;
16
- let n = i.get(e);
17
- a.set(t, {
16
+ let n = r.get(e);
17
+ i.set(t, {
18
18
  change: e.change,
19
19
  role: n?.role ?? "plain",
20
20
  groupId: n?.groupId,
21
21
  node: e
22
22
  });
23
23
  }
24
- function s(e) {
25
- o(e);
26
- for (let t of e.children) s(t);
24
+ function o(e) {
25
+ a(e);
26
+ for (let t of e.children) o(t);
27
27
  }
28
- function c(e, t) {
28
+ function s(e, t) {
29
29
  if (e.change !== "unchanged") {
30
- let n = r.get(e);
31
- n && a.set(n, {
30
+ let n = e.appliedRef?.id;
31
+ n && i.set(n, {
32
32
  change: e.change,
33
33
  role: "companion",
34
34
  groupId: t,
35
35
  node: e
36
36
  });
37
37
  }
38
- for (let n of e.children) c(n, t);
38
+ for (let n of e.children) s(n, t);
39
39
  }
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;
40
+ for (let e of t.instances) o(e.tree);
41
+ for (let e of n(t)) for (let t of e.companions) s(t, e.id);
42
+ return i;
43
43
  }
44
44
  async function i(t) {
45
45
  let { tree: n, changeByStagedId: r, query: i } = t, a = {
@@ -1,5 +1,5 @@
1
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 { TEMPLATE_UUID_WARNING_INFO as t } from "../external/.pnpm/@dialecte_scl@0.3.15/node_modules/@dialecte/scl/dist/v2019C1/index.js";
2
+ import { TEMPLATE_UUID_WARNING_INFO as t } from "../external/.pnpm/@dialecte_scl@0.3.17/node_modules/@dialecte/scl/dist/v2019C1/index.js";
3
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
4
  //#region lib/merge/merge-preflight.vue?vue&type=script&setup=true&lang.ts
5
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 = { class: "flex items-start gap-3" }, _ = { 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 = { class: "mt-1 text-sm" }, C = { class: "text-base-content/80" }, w = { class: "divide-y divide-warning/15" }, T = { class: "font-mono break-all" }, E = { class: "text-base-content/70" }, D = {
@@ -1,28 +1,24 @@
1
- import { i as e } from "../external/.pnpm/@dialecte_scl@0.3.15/node_modules/@dialecte/scl/dist/hooks-CLIa7kxj.js";
2
- import "../external/.pnpm/@dialecte_scl@0.3.15/node_modules/@dialecte/scl/dist/v2019C1/index.js";
1
+ import { i as e } from "../external/.pnpm/@dialecte_scl@0.3.17/node_modules/@dialecte/scl/dist/hooks-BBGXNK0x.js";
2
+ import "../external/.pnpm/@dialecte_scl@0.3.17/node_modules/@dialecte/scl/dist/v2019C1/index.js";
3
3
  //#region lib/merge/merge.service.ts
4
4
  async function t(e, t) {
5
5
  return e.query.lifecycle.report(t);
6
6
  }
7
7
  async function n({ doc: e, target: t, report: n, decisions: r, keepNameTypesFrom: i, afterApply: a }) {
8
- let o;
9
- return {
10
- prepared: await e.prepare(async (e) => {
11
- let s = await e.lifecycle.apply({
12
- ...t,
13
- report: n,
14
- decisions: r,
15
- keepNameTypesFrom: i
16
- });
17
- o = s.instances, await a?.(e, {
18
- target: t,
19
- report: n,
20
- decisions: r,
21
- result: s
22
- });
23
- }),
24
- applied: o
25
- };
8
+ return { prepared: await e.prepare(async (e) => {
9
+ let o = await e.lifecycle.apply({
10
+ ...t,
11
+ report: n,
12
+ decisions: r,
13
+ keepNameTypesFrom: i
14
+ });
15
+ await a?.(e, {
16
+ target: t,
17
+ report: n,
18
+ decisions: r,
19
+ result: o
20
+ });
21
+ }) };
26
22
  }
27
23
  async function r({ doc: e, target: t, report: n, decisions: r, keepNameTypesFrom: i, afterApply: a }) {
28
24
  await e.transaction(async (e) => {
@@ -1,63 +1,62 @@
1
1
  import { collectTemplateUuidWarnings as e, commitMerge as t, findScopeRoot as n, getAttributes as r, getPresentationScope as i, previewApply as a, reportLifecycle as o, snapshotTree as s, snapshotXml as c } from "./merge.service.js";
2
2
  import { allGroups as l, buildChangeIndex as u, buildStructuralTree as d } from "./build-view-model.js";
3
- import { correlate as f } from "./merge-correlate.js";
4
- import { reactive as p, shallowRef as m } from "vue";
3
+ import { reactive as f, shallowRef as p } from "vue";
5
4
  //#region lib/merge/use-merge-session.ts
6
- function h(h) {
7
- let g = m(), _ = p(/* @__PURE__ */ new Map()), v = m("target"), y = m(), b = m({
5
+ function m(m) {
6
+ let h = p(), g = f(/* @__PURE__ */ new Map()), _ = p("target"), v = p(), y = p({
8
7
  items: [],
9
8
  meta: {},
10
9
  index: {},
11
10
  expanded: []
12
- }), x = m(), S = m(), C = m(!1), w = m([]);
13
- function T() {
11
+ }), b = p(), x = p(), S = p(!1), C = p([]);
12
+ function w() {
14
13
  return {
15
- verb: h.verb,
16
- scenario: h.scenario,
17
- sourceQuery: h.sourceQuery,
18
- ref: h.sourceRef,
19
- anchor: h.anchor
14
+ verb: m.verb,
15
+ scenario: m.scenario,
16
+ sourceQuery: m.sourceQuery,
17
+ ref: m.sourceRef,
18
+ anchor: m.anchor
20
19
  };
21
20
  }
22
- function E(e) {
21
+ function T(e) {
23
22
  return e === void 0 ? "accept" : typeof e == "string" ? e : e.action;
24
23
  }
25
- function D(e) {
24
+ function E(e) {
26
25
  return typeof e == "object" ? e.values : void 0;
27
26
  }
28
- async function O() {
29
- let t = await o(h.targetDocument, T());
30
- g.value = t, w.value = await e([h.sourceQuery, h.targetDocument.query]);
31
- for (let e of l(t)) e.suggestedAction && e.suggestedAction !== "accept" && _.set(e.id, e.suggestedAction);
32
- await z();
27
+ async function D() {
28
+ let t = await o(m.targetDocument, w());
29
+ h.value = t, C.value = await e([m.sourceQuery, m.targetDocument.query]);
30
+ for (let e of l(t)) e.suggestedAction && e.suggestedAction !== "accept" && g.set(e.id, e.suggestedAction);
31
+ await R();
33
32
  }
34
- function k(e, t) {
35
- let n = D(_.get(e));
36
- _.set(e, n ? {
33
+ function O(e, t) {
34
+ let n = E(g.get(e));
35
+ g.set(e, n ? {
37
36
  action: t,
38
37
  values: n
39
- } : t), R();
38
+ } : t), L();
40
39
  }
41
- function A(e, t, n) {
42
- let r = _.get(e), i = {
43
- ...D(r),
40
+ function k(e, t, n) {
41
+ let r = g.get(e), i = {
42
+ ...E(r),
44
43
  [t]: n
45
44
  };
46
- _.set(e, {
47
- action: E(r),
45
+ g.set(e, {
46
+ action: T(r),
48
47
  values: i
49
- }), R();
48
+ }), L();
50
49
  }
51
- function j(e) {
52
- return E(_.get(e));
50
+ function A(e) {
51
+ return T(g.get(e));
53
52
  }
54
- function M(e, t) {
55
- return D(_.get(e))?.[t];
53
+ function j(e, t) {
54
+ return E(g.get(e))?.[t];
56
55
  }
57
- function N() {
56
+ function M() {
58
57
  let e = /* @__PURE__ */ new Map();
59
- for (let [t, n] of _) {
60
- let r = D(n);
58
+ for (let [t, n] of g) {
59
+ let r = E(n);
61
60
  r && e.set(t, {
62
61
  action: "accept",
63
62
  values: r
@@ -65,58 +64,39 @@ function h(h) {
65
64
  }
66
65
  return e;
67
66
  }
68
- function P(e) {
69
- y.value = e, V();
70
- }
71
- let F, I, L = 0;
72
- function R() {
73
- I && clearTimeout(I), I = setTimeout(() => void z(), 150);
74
- }
75
- async function z() {
76
- if (!g.value) return;
77
- let e = ++L;
78
- C.value = !0;
79
- let t = N(), { prepared: o, applied: c } = await a({
80
- doc: h.targetDocument,
81
- target: T(),
82
- report: g.value,
67
+ function N(e) {
68
+ v.value = e, B();
69
+ }
70
+ let P, F, I = 0;
71
+ function L() {
72
+ F && clearTimeout(F), F = setTimeout(() => void R(), 150);
73
+ }
74
+ async function R() {
75
+ if (!h.value) return;
76
+ let e = ++I;
77
+ S.value = !0;
78
+ let t = M(), { prepared: r } = await a({
79
+ doc: m.targetDocument,
80
+ target: w(),
81
+ report: h.value,
83
82
  decisions: t,
84
- keepNameTypesFrom: v.value,
85
- afterApply: h.afterApply
83
+ keepNameTypesFrom: _.value,
84
+ afterApply: m.afterApply
86
85
  });
87
- if (e !== L) {
88
- o.discard();
86
+ if (e !== I) {
87
+ r.discard();
89
88
  return;
90
89
  }
91
- F?.discard(), F = o;
92
- let p = i(h.verb), m = await n(F.query, h.anchor, p.rootTag), _ = await s(F.query, m), x = c.verb === "fsd" ? c.functions : [...c.applications, ...c.functions], S = /* @__PURE__ */ new Map();
93
- for (let e of l(g.value)) for (let t of e.companions) {
94
- if (t.instanceRef?.id || !t.sourceRef) continue;
95
- let { name: e } = await r(h.sourceQuery, t.sourceRef);
96
- if (!e) continue;
97
- let [n] = await F.query.any.findByAttributes({
98
- tagName: t.tagName,
99
- attributes: { name: e }
100
- });
101
- n && S.set(t, n.id);
102
- }
103
- let w = f({
104
- report: g.value,
105
- snapshot: _,
106
- appliedRoots: x,
107
- companionAnchors: S
108
- }), E = u({
109
- report: g.value,
110
- correlation: w
111
- });
112
- b.value = await d({
113
- tree: _,
114
- changeByStagedId: E,
115
- query: F.query,
116
- instances: g.value.instances
117
- }), y.value &&= B(y.value, b.value), C.value = !1, await V();
118
- }
119
- function B(e, t) {
90
+ P?.discard(), P = r;
91
+ let o = i(m.verb), c = await n(P.query, m.anchor, o.rootTag), l = await s(P.query, c), f = u({ report: h.value });
92
+ y.value = await d({
93
+ tree: l,
94
+ changeByStagedId: f,
95
+ query: P.query,
96
+ instances: h.value.instances
97
+ }), v.value &&= z(v.value, y.value), S.value = !1, await B();
98
+ }
99
+ function z(e, t) {
120
100
  let n = Object.values(t.index);
121
101
  if (e.node) {
122
102
  let t = n.find((t) => t.node === e.node);
@@ -128,57 +108,57 @@ function h(h) {
128
108
  }
129
109
  return (e.previewRef.id ? t.index[e.previewRef.id] : void 0) ?? e;
130
110
  }
131
- async function V() {
132
- let e = y.value;
133
- if (!e || !F) {
134
- x.value = void 0, S.value = void 0;
111
+ async function B() {
112
+ let e = v.value;
113
+ if (!e || !P) {
114
+ b.value = void 0, x.value = void 0;
135
115
  return;
136
116
  }
137
- let t = e.change === "target-only" && !!e.groupId && E(_.get(e.groupId)) === "accept";
138
- x.value = t ? "" : await c(F.query, e.previewRef), S.value = e.change === "added" ? "" : await U(e.previewRef);
117
+ let t = e.change === "target-only" && !!e.groupId && T(g.get(e.groupId)) === "accept";
118
+ b.value = t ? "" : await c(P.query, e.previewRef), x.value = e.change === "added" ? "" : await H(e.previewRef);
139
119
  }
140
- async function H(e) {
141
- return F ? r(F.query, e) : {};
120
+ async function V(e) {
121
+ return P ? r(P.query, e) : {};
142
122
  }
143
- async function U(e) {
123
+ async function H(e) {
144
124
  try {
145
- return await c(h.targetDocument.query, e);
125
+ return await c(m.targetDocument.query, e);
146
126
  } catch {
147
127
  return;
148
128
  }
149
129
  }
150
- async function W() {
151
- g.value && (F?.discard(), F = void 0, await t({
152
- doc: h.targetDocument,
153
- target: T(),
154
- report: g.value,
155
- decisions: new Map(_),
156
- keepNameTypesFrom: v.value,
157
- afterApply: h.afterApply
130
+ async function U() {
131
+ h.value && (P?.discard(), P = void 0, await t({
132
+ doc: m.targetDocument,
133
+ target: w(),
134
+ report: h.value,
135
+ decisions: new Map(g),
136
+ keepNameTypesFrom: _.value,
137
+ afterApply: m.afterApply
158
138
  }));
159
139
  }
160
- function G(e) {
161
- v.value = e, R();
140
+ function W(e) {
141
+ _.value = e, L();
162
142
  }
163
143
  return {
164
- report: g,
165
- decisions: _,
166
- keepNameTypesFrom: v,
167
- structuralTree: b,
168
- previewXml: x,
169
- previewBeforeXml: S,
170
- previewLoading: C,
171
- warnings: w,
172
- load: O,
173
- setDecision: k,
174
- setValue: A,
175
- decisionOf: j,
176
- editedValue: M,
177
- select: P,
178
- stagedAttributes: H,
179
- setKeepNameTypesFrom: G,
180
- commit: W
144
+ report: h,
145
+ decisions: g,
146
+ keepNameTypesFrom: _,
147
+ structuralTree: y,
148
+ previewXml: b,
149
+ previewBeforeXml: x,
150
+ previewLoading: S,
151
+ warnings: C,
152
+ load: D,
153
+ setDecision: O,
154
+ setValue: k,
155
+ decisionOf: A,
156
+ editedValue: j,
157
+ select: N,
158
+ stagedAttributes: V,
159
+ setKeepNameTypesFrom: W,
160
+ commit: U
181
161
  };
182
162
  }
183
163
  //#endregion
184
- export { h as useMergeSession };
164
+ export { m as useMergeSession };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@septkit/ui",
3
- "version": "0.0.58",
3
+ "version": "0.0.59",
4
4
  "type": "module",
5
5
  "source": "lib/index.ts",
6
6
  "files": [
@@ -16,8 +16,8 @@
16
16
  "./uicss": "./dist/ui.css"
17
17
  },
18
18
  "dependencies": {
19
- "@dialecte/core": "0.4.12",
20
- "@dialecte/scl": "0.3.15",
19
+ "@dialecte/core": "0.4.16",
20
+ "@dialecte/scl": "0.3.17",
21
21
  "@lucide/vue": "^1.16.0",
22
22
  "@tailwindcss/vite": "4.2.2",
23
23
  "@vueuse/components": "^13.9.0",
@@ -1,3 +0,0 @@
1
- import "./utils-C5_11hqg.js";
2
- import { pt as e } from "./project-DkMkDgld.js";
3
- export { e as bindExtensions };
@@ -1,46 +0,0 @@
1
- //#region lib/merge/merge-correlate.ts
2
- function e(e) {
3
- let { report: i, snapshot: a, appliedRoots: o, companionAnchors: s } = e, c = r(a), l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Set();
4
- i.instances.forEach((e, n) => {
5
- let r = e.rootRef?.id ?? o[n]?.id, i = r ? c.get(r) : void 0;
6
- i && t(e.tree, i, l, u);
7
- });
8
- for (let e of i.instances) for (let r of e.groups) for (let e of r.companions) {
9
- if (l.has(e)) continue;
10
- let r = s?.get(e) ?? e.instanceRef?.id, i = r ? c.get(r) : n(a, e.tagName, u);
11
- i && t(e, i, l, u);
12
- }
13
- return l;
14
- }
15
- function t(e, n, r, i) {
16
- r.set(e, n.id), i.add(n.id);
17
- let a = n.tree ?? [], o = /* @__PURE__ */ new Map();
18
- for (let t of e.children) {
19
- let e = t.instanceRef?.id;
20
- if (!e) continue;
21
- let n = a.find((t) => t.id === e && !i.has(t.id));
22
- n && (o.set(t, n), i.add(n.id));
23
- }
24
- for (let t of e.children) {
25
- if (o.has(t) || t.instanceRef || t.change === "removed") continue;
26
- let e = a.find((e) => e.tagName === t.tagName && !i.has(e.id));
27
- e && (o.set(t, e), i.add(e.id));
28
- }
29
- for (let [e, n] of o) t(e, n, r, i);
30
- }
31
- function n(e, t, r) {
32
- if (e.tagName === t && !r.has(e.id)) return e;
33
- for (let i of e.tree ?? []) {
34
- let e = n(i, t, r);
35
- if (e) return e;
36
- }
37
- }
38
- function r(e) {
39
- let t = /* @__PURE__ */ new Map(), n = (e) => {
40
- t.set(e.id, e);
41
- for (let t of e.tree ?? []) n(t);
42
- };
43
- return n(e), t;
44
- }
45
- //#endregion
46
- export { e as correlate };