@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.
- package/dist/dialecte/create-document-store.js +3 -3
- package/dist/external/.pnpm/{@dialecte_core@0.4.12 → @dialecte_core@0.4.16}/node_modules/@dialecte/core/dist/helpers.js +41 -41
- package/dist/external/.pnpm/@dialecte_core@0.4.16/node_modules/@dialecte/core/dist/index.js +3 -0
- package/dist/external/.pnpm/{@dialecte_core@0.4.12/node_modules/@dialecte/core/dist/project-DkMkDgld.js → @dialecte_core@0.4.16/node_modules/@dialecte/core/dist/project-nvZv2ie8.js} +797 -745
- package/dist/external/.pnpm/{@dialecte_core@0.4.12/node_modules/@dialecte/core/dist/utils-C5_11hqg.js → @dialecte_core@0.4.16/node_modules/@dialecte/core/dist/utils-BiEx1x59.js} +2 -2
- package/dist/external/.pnpm/{@dialecte_scl@0.3.15/node_modules/@dialecte/scl/dist/hooks-CLIa7kxj.js → @dialecte_scl@0.3.17/node_modules/@dialecte/scl/dist/hooks-BBGXNK0x.js} +31 -19
- package/dist/external/.pnpm/{@dialecte_scl@0.3.15 → @dialecte_scl@0.3.17}/node_modules/@dialecte/scl/dist/v2019C1/index.js +3 -3
- package/dist/index.d.ts +3 -2
- package/dist/merge/build-view-model.js +17 -17
- package/dist/merge/merge-preflight.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/merge/merge.service.js +16 -20
- package/dist/merge/use-merge-session.js +101 -121
- package/package.json +3 -3
- package/dist/external/.pnpm/@dialecte_core@0.4.12/node_modules/@dialecte/core/dist/index.js +0 -3
- package/dist/merge/merge-correlate.js +0 -46
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region node_modules/.pnpm/@dialecte+core@0.4.
|
|
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 {
|
|
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.
|
|
2
|
-
//#region node_modules/.pnpm/@dialecte+scl@0.3.
|
|
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
|
-
},
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
20009
|
-
var
|
|
20010
|
-
|
|
20011
|
-
|
|
20012
|
-
|
|
20013
|
-
|
|
20019
|
+
g(u);
|
|
20020
|
+
var y = [
|
|
20021
|
+
m.direct,
|
|
20022
|
+
m.lnode,
|
|
20023
|
+
m.iedAddress,
|
|
20024
|
+
m.behaviorDescription
|
|
20014
20025
|
];
|
|
20015
|
-
[...
|
|
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
|
|
20020
|
-
new Set(
|
|
20021
|
-
function
|
|
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":
|
|
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 {
|
|
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.
|
|
2
|
-
import { i as e } from "../hooks-
|
|
3
|
-
//#region node_modules/.pnpm/@dialecte+scl@0.3.
|
|
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)
|
|
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
|
|
8
|
-
for (let e of n(t))
|
|
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
|
|
13
|
-
function
|
|
14
|
-
let t =
|
|
12
|
+
let i = /* @__PURE__ */ new Map();
|
|
13
|
+
function a(e) {
|
|
14
|
+
let t = e.appliedRef?.id;
|
|
15
15
|
if (!t) return;
|
|
16
|
-
let n =
|
|
17
|
-
|
|
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
|
|
25
|
-
|
|
26
|
-
for (let t of e.children)
|
|
24
|
+
function o(e) {
|
|
25
|
+
a(e);
|
|
26
|
+
for (let t of e.children) o(t);
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function s(e, t) {
|
|
29
29
|
if (e.change !== "unchanged") {
|
|
30
|
-
let n =
|
|
31
|
-
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)
|
|
38
|
+
for (let n of e.children) s(n, t);
|
|
39
39
|
}
|
|
40
|
-
for (let e of t.instances)
|
|
41
|
-
for (let e of n(t)) for (let t of e.companions)
|
|
42
|
-
return
|
|
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.
|
|
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.
|
|
2
|
-
import "../external/.pnpm/@dialecte_scl@0.3.
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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 {
|
|
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
|
|
7
|
-
let
|
|
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
|
-
}),
|
|
13
|
-
function
|
|
11
|
+
}), b = p(), x = p(), S = p(!1), C = p([]);
|
|
12
|
+
function w() {
|
|
14
13
|
return {
|
|
15
|
-
verb:
|
|
16
|
-
scenario:
|
|
17
|
-
sourceQuery:
|
|
18
|
-
ref:
|
|
19
|
-
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
|
|
21
|
+
function T(e) {
|
|
23
22
|
return e === void 0 ? "accept" : typeof e == "string" ? e : e.action;
|
|
24
23
|
}
|
|
25
|
-
function
|
|
24
|
+
function E(e) {
|
|
26
25
|
return typeof e == "object" ? e.values : void 0;
|
|
27
26
|
}
|
|
28
|
-
async function
|
|
29
|
-
let t = await o(
|
|
30
|
-
|
|
31
|
-
for (let e of l(t)) e.suggestedAction && e.suggestedAction !== "accept" &&
|
|
32
|
-
await
|
|
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
|
|
35
|
-
let n =
|
|
36
|
-
|
|
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),
|
|
38
|
+
} : t), L();
|
|
40
39
|
}
|
|
41
|
-
function
|
|
42
|
-
let r =
|
|
43
|
-
...
|
|
40
|
+
function k(e, t, n) {
|
|
41
|
+
let r = g.get(e), i = {
|
|
42
|
+
...E(r),
|
|
44
43
|
[t]: n
|
|
45
44
|
};
|
|
46
|
-
|
|
47
|
-
action:
|
|
45
|
+
g.set(e, {
|
|
46
|
+
action: T(r),
|
|
48
47
|
values: i
|
|
49
|
-
}),
|
|
48
|
+
}), L();
|
|
50
49
|
}
|
|
51
|
-
function
|
|
52
|
-
return
|
|
50
|
+
function A(e) {
|
|
51
|
+
return T(g.get(e));
|
|
53
52
|
}
|
|
54
|
-
function
|
|
55
|
-
return
|
|
53
|
+
function j(e, t) {
|
|
54
|
+
return E(g.get(e))?.[t];
|
|
56
55
|
}
|
|
57
|
-
function
|
|
56
|
+
function M() {
|
|
58
57
|
let e = /* @__PURE__ */ new Map();
|
|
59
|
-
for (let [t, n] of
|
|
60
|
-
let r =
|
|
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
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
let F, I
|
|
72
|
-
function
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
async function
|
|
76
|
-
if (!
|
|
77
|
-
let e = ++
|
|
78
|
-
|
|
79
|
-
let t =
|
|
80
|
-
doc:
|
|
81
|
-
target:
|
|
82
|
-
report:
|
|
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:
|
|
85
|
-
afterApply:
|
|
83
|
+
keepNameTypesFrom: _.value,
|
|
84
|
+
afterApply: m.afterApply
|
|
86
85
|
});
|
|
87
|
-
if (e !==
|
|
88
|
-
|
|
86
|
+
if (e !== I) {
|
|
87
|
+
r.discard();
|
|
89
88
|
return;
|
|
90
89
|
}
|
|
91
|
-
|
|
92
|
-
let
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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
|
|
132
|
-
let e =
|
|
133
|
-
if (!e || !
|
|
134
|
-
|
|
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 &&
|
|
138
|
-
|
|
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
|
|
141
|
-
return
|
|
120
|
+
async function V(e) {
|
|
121
|
+
return P ? r(P.query, e) : {};
|
|
142
122
|
}
|
|
143
|
-
async function
|
|
123
|
+
async function H(e) {
|
|
144
124
|
try {
|
|
145
|
-
return await c(
|
|
125
|
+
return await c(m.targetDocument.query, e);
|
|
146
126
|
} catch {
|
|
147
127
|
return;
|
|
148
128
|
}
|
|
149
129
|
}
|
|
150
|
-
async function
|
|
151
|
-
|
|
152
|
-
doc:
|
|
153
|
-
target:
|
|
154
|
-
report:
|
|
155
|
-
decisions: new Map(
|
|
156
|
-
keepNameTypesFrom:
|
|
157
|
-
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
|
|
161
|
-
|
|
140
|
+
function W(e) {
|
|
141
|
+
_.value = e, L();
|
|
162
142
|
}
|
|
163
143
|
return {
|
|
164
|
-
report:
|
|
165
|
-
decisions:
|
|
166
|
-
keepNameTypesFrom:
|
|
167
|
-
structuralTree:
|
|
168
|
-
previewXml:
|
|
169
|
-
previewBeforeXml:
|
|
170
|
-
previewLoading:
|
|
171
|
-
warnings:
|
|
172
|
-
load:
|
|
173
|
-
setDecision:
|
|
174
|
-
setValue:
|
|
175
|
-
decisionOf:
|
|
176
|
-
editedValue:
|
|
177
|
-
select:
|
|
178
|
-
stagedAttributes:
|
|
179
|
-
setKeepNameTypesFrom:
|
|
180
|
-
commit:
|
|
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 {
|
|
164
|
+
export { m as useMergeSession };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@septkit/ui",
|
|
3
|
-
"version": "0.0.
|
|
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.
|
|
20
|
-
"@dialecte/scl": "0.3.
|
|
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,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 };
|