@septkit/ui 0.0.79 → 0.0.80
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 +4 -4
- package/dist/external/.pnpm/{@dialecte_core@0.8.1 → @dialecte_core@0.8.0}/node_modules/@dialecte/core/dist/dialecte-gIPrRzni.js +1 -1
- package/dist/external/.pnpm/{@dialecte_core@0.8.1 → @dialecte_core@0.8.0}/node_modules/@dialecte/core/dist/project-key-Ch34EtFa.js +1 -1
- package/dist/external/.pnpm/{@dialecte_core@0.8.1 → @dialecte_core@0.8.0}/node_modules/@dialecte/core/dist/rolldown-runtime-CYdcPHCu.js +1 -1
- package/dist/external/.pnpm/{@dialecte_core@0.8.1 → @dialecte_core@0.8.0}/node_modules/@dialecte/core/dist/running-operations-vnijBvn7.js +1 -1
- package/dist/external/.pnpm/{@dialecte_core@0.8.1 → @dialecte_core@0.8.0}/node_modules/@dialecte/core/dist/same-json-value-C6kUaoyt.js +1 -1
- package/dist/external/.pnpm/{@dialecte_core@0.8.1 → @dialecte_core@0.8.0}/node_modules/@dialecte/core/dist/utils-USNkj4sT.js +1 -1
- package/dist/external/.pnpm/{@dialecte_scl@0.13.2_libxml2-wasm@0.7.2_vitest@4.1.10/node_modules/@dialecte/scl/dist/hooks-DpI8_nD9.js → @dialecte_scl@0.11.0_libxml2-wasm@0.7.2_vitest@4.1.10/node_modules/@dialecte/scl/dist/hooks-F61-rgXT.js} +234 -262
- package/dist/external/.pnpm/@dialecte_scl@0.11.0_libxml2-wasm@0.7.2_vitest@4.1.10/node_modules/@dialecte/scl/dist/v2019C1/index.js +22 -0
- package/dist/index.d.ts +25 -6
- package/dist/index.js +13 -13
- package/dist/merge/check-files/identity-warning.js +1 -2
- package/dist/merge/confirm/outcome.js +4 -4
- package/dist/merge/done/applied-focus.js +1 -1
- package/dist/merge/match/match.js +4 -4
- package/dist/merge/session/components/merge-review.vue_vue_type_script_setup_true_lang.js +0 -1
- package/dist/merge/session/merge.service.js +19 -25
- package/dist/merge/session/use-merge-session.js +1 -11
- package/dist/merge/wording.js +4 -4
- package/dist/selector-input/index.js +3 -0
- package/dist/selector-input/selector-input.js +90 -0
- package/dist/selector-input/selector-input.vue_vue_type_script_setup_true_lang.js +180 -0
- package/dist/selector-input/selector-input2.js +5 -0
- package/dist/ui.css +1 -1
- package/package.json +3 -3
- package/dist/external/.pnpm/@dialecte_scl@0.13.2_libxml2-wasm@0.7.2_vitest@4.1.10/node_modules/@dialecte/scl/dist/v2019C1/index.js +0 -3
- package/dist/xpath-input/index.js +0 -3
- package/dist/xpath-input/xpath-input.js +0 -28
- package/dist/xpath-input/xpath-input.vue_vue_type_script_setup_true_lang.js +0 -101
- package/dist/xpath-input/xpath-input2.js +0 -5
- /package/dist/external/.pnpm/{@dialecte_core@0.8.1 → @dialecte_core@0.8.0}/node_modules/@dialecte/core/dist/helpers-DVShv41E.js +0 -0
- /package/dist/external/.pnpm/{@dialecte_core@0.8.1 → @dialecte_core@0.8.0}/node_modules/@dialecte/core/dist/helpers.js +0 -0
- /package/dist/external/.pnpm/{@dialecte_core@0.8.1 → @dialecte_core@0.8.0}/node_modules/@dialecte/core/dist/index.js +0 -0
- /package/dist/external/.pnpm/{@dialecte_core@0.8.1 → @dialecte_core@0.8.0}/node_modules/@dialecte/core/dist/utils.js +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "../../../../../../@dialecte_core@0.8.0/node_modules/@dialecte/core/dist/index.js";
|
|
2
|
+
import { _ as e, i as t, m as n, nt as r } from "../hooks-F61-rgXT.js";
|
|
3
|
+
//#region node_modules/.pnpm/@dialecte+scl@0.11.0_libxml2-wasm@0.7.2_vitest@4.1.10/node_modules/@dialecte/scl/dist/v2019C1/index.js
|
|
4
|
+
var i = {
|
|
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: none is recognised as an instance of a template element. A report then lists the template element as new and the existing element as an addition of the project."
|
|
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: "Identity by uuid is ambiguous for the affected elements: which of them a reference or a template element resolves to is not defined."
|
|
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: the element is not recognised as an instance of a template element. A report then lists the template element as new and the existing element as an addition of the project."
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { n as SCL_ERRORS, r as TEMPLATE_NAME, i as TEMPLATE_UUID_WARNING_INFO, e as getPathSegment, t as presentationScope };
|
package/dist/index.d.ts
CHANGED
|
@@ -330,10 +330,16 @@ path: string;
|
|
|
330
330
|
|
|
331
331
|
declare const __VLS_component_8: DefineComponent<__VLS_PublicProps_7, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
332
332
|
"update:modelValue": (value: string) => any;
|
|
333
|
+
"update:invalid": (value: boolean) => any;
|
|
333
334
|
}, string, PublicProps, Readonly<__VLS_PublicProps_7> & Readonly<{
|
|
334
335
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
336
|
+
"onUpdate:invalid"?: ((value: boolean) => any) | undefined;
|
|
335
337
|
}>, {
|
|
338
|
+
targets: string[];
|
|
339
|
+
nameOwners: string[];
|
|
336
340
|
anywhereLabel: string;
|
|
341
|
+
searchable: boolean;
|
|
342
|
+
allowXpath: boolean;
|
|
337
343
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
338
344
|
|
|
339
345
|
declare const __VLS_component_9: DefineComponent<__VLS_Props_25, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_25> & Readonly<{}>, {
|
|
@@ -489,8 +495,11 @@ declare type __VLS_Props_23 = {
|
|
|
489
495
|
|
|
490
496
|
declare type __VLS_Props_24 = {
|
|
491
497
|
anchors: Option_2[];
|
|
492
|
-
targets: Option_2[];
|
|
493
498
|
anywhereLabel?: string;
|
|
499
|
+
targets?: string[];
|
|
500
|
+
nameOwners?: string[];
|
|
501
|
+
searchable?: boolean;
|
|
502
|
+
allowXpath?: boolean;
|
|
494
503
|
};
|
|
495
504
|
|
|
496
505
|
declare type __VLS_Props_25 = {
|
|
@@ -654,6 +663,7 @@ declare type __VLS_PublicProps_6 = {
|
|
|
654
663
|
|
|
655
664
|
declare type __VLS_PublicProps_7 = {
|
|
656
665
|
modelValue?: string;
|
|
666
|
+
'invalid'?: boolean;
|
|
657
667
|
} & __VLS_Props_24;
|
|
658
668
|
|
|
659
669
|
declare function __VLS_template(): {
|
|
@@ -1139,7 +1149,7 @@ export declare function buildRecordCache<TRecord extends LayoutTreeRecord>(recor
|
|
|
1139
1149
|
|
|
1140
1150
|
export declare function buildTreeOptions<T>(rows: readonly T[], getPath: (row: T) => string[]): FilterTreeNode[];
|
|
1141
1151
|
|
|
1142
|
-
export declare function buildXpath({ anchor, targets }: XpathBuilderState): string;
|
|
1152
|
+
export declare function buildXpath({ anchor, targets, nameFilter, nameOwners, }: XpathBuilderState): string;
|
|
1143
1153
|
|
|
1144
1154
|
export declare const Button: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
1145
1155
|
|
|
@@ -1854,6 +1864,8 @@ export declare type MapView = {
|
|
|
1854
1864
|
automatic: MapGroup[];
|
|
1855
1865
|
};
|
|
1856
1866
|
|
|
1867
|
+
export declare function matchName({ match, value }: NameFilter, name: string | undefined): boolean;
|
|
1868
|
+
|
|
1857
1869
|
/**
|
|
1858
1870
|
* Height of a single member card. Capsule presence - not the record's child
|
|
1859
1871
|
* relationship - decides it, because capsules are the only thing the taller
|
|
@@ -3284,8 +3296,6 @@ export declare type MergeSessionParams = {
|
|
|
3284
3296
|
sourceRef: Scl.Ref<'Function'> | Scl.Ref<'FunctionTemplate'> | Scl.Ref<'Application'> | Scl.Ref<TopologyStructuralTag>;
|
|
3285
3297
|
/** Target parent the instance lives under / is placed into. */
|
|
3286
3298
|
anchor: Scl.Ref<Scl.ElementsOf>;
|
|
3287
|
-
/** Element tags the consumer creates on instances and maintains itself: the merge does not list them as the project's own. */
|
|
3288
|
-
consumerManagedTags?: readonly Scl.ElementsOf[];
|
|
3289
3299
|
/** The consumer's own step after the apply, run by the merge in its preview and its commit. */
|
|
3290
3300
|
afterApply?: AfterApplyHook;
|
|
3291
3301
|
};
|
|
@@ -3537,6 +3547,13 @@ default?: (props: {}) => any;
|
|
|
3537
3547
|
}) | null;
|
|
3538
3548
|
}, any>;
|
|
3539
3549
|
|
|
3550
|
+
export declare type NameFilter = {
|
|
3551
|
+
match: NameMatch;
|
|
3552
|
+
value: string;
|
|
3553
|
+
};
|
|
3554
|
+
|
|
3555
|
+
export declare type NameMatch = 'equals' | 'starts-with' | 'ends-with' | 'contains';
|
|
3556
|
+
|
|
3540
3557
|
export declare type NavNode = {
|
|
3541
3558
|
id: string;
|
|
3542
3559
|
x: number;
|
|
@@ -3654,6 +3671,8 @@ export declare interface RowSortHeaderModel {
|
|
|
3654
3671
|
|
|
3655
3672
|
export declare const SclExplorer: __VLS_WithTemplateSlots_6<typeof __VLS_component_6, __VLS_TemplateResult_6["slots"]>;
|
|
3656
3673
|
|
|
3674
|
+
export declare const SelectorInput: __VLS_WithTemplateSlots_8<typeof __VLS_component_8, __VLS_TemplateResult_8["slots"]>;
|
|
3675
|
+
|
|
3657
3676
|
export declare function serializeNoteData({ categories, otherTags, ...rest }: NoteData): string;
|
|
3658
3677
|
|
|
3659
3678
|
export declare type SortDirection = 'asc' | 'desc';
|
|
@@ -3963,8 +3982,8 @@ export declare const XmlDiff: DefineComponent<__VLS_Props_14, {}, {}, {}, {}, Co
|
|
|
3963
3982
|
export declare type XpathBuilderState = {
|
|
3964
3983
|
anchor: string;
|
|
3965
3984
|
targets: string[];
|
|
3985
|
+
nameFilter?: NameFilter;
|
|
3986
|
+
nameOwners?: string[];
|
|
3966
3987
|
};
|
|
3967
3988
|
|
|
3968
|
-
export declare const XpathInput: __VLS_WithTemplateSlots_8<typeof __VLS_component_8, __VLS_TemplateResult_8["slots"]>;
|
|
3969
|
-
|
|
3970
3989
|
export { }
|
package/dist/index.js
CHANGED
|
@@ -55,18 +55,18 @@ import oe from "./table/filterable-column-header.js";
|
|
|
55
55
|
import "./table/index.js";
|
|
56
56
|
import se from "./context-menu/context-menu.js";
|
|
57
57
|
import "./context-menu/index.js";
|
|
58
|
-
import { buildXpath as ce,
|
|
59
|
-
import
|
|
60
|
-
import "./
|
|
61
|
-
import
|
|
58
|
+
import { buildXpath as ce, matchName as le, parseXpath as ue, validateXpath as de } from "./selector-input/selector-input.js";
|
|
59
|
+
import fe from "./selector-input/selector-input2.js";
|
|
60
|
+
import "./selector-input/index.js";
|
|
61
|
+
import pe from "./split-layout/split-layout.js";
|
|
62
62
|
import "./split-layout/index.js";
|
|
63
|
-
import { applyInitialVisibility as
|
|
64
|
-
import { groupStackMetrics as
|
|
65
|
-
import { GROUP_COLLAPSED_MEMBERS_HEIGHT as
|
|
66
|
-
import { computeGroups as
|
|
67
|
-
import { createElkLayoutEngine as
|
|
68
|
-
import { useDiagramLayout as
|
|
69
|
-
import
|
|
70
|
-
import
|
|
63
|
+
import { applyInitialVisibility as me, buildRecordCache as he, collectVisibleIds as ge, hideDescendants as _e } from "./diagram-layout/visibility-model.js";
|
|
64
|
+
import { groupStackMetrics as ve } from "./diagram-layout/group-stack.js";
|
|
65
|
+
import { GROUP_COLLAPSED_MEMBERS_HEIGHT as ye, GROUP_HEADER_HEIGHT as be, GROUP_MEMBER_GAP as xe, GROUP_MEMBER_HEIGHT as Se, GROUP_MEMBER_HEIGHT_COMPACT as Ce, memberCardHeight as we } from "./diagram-layout/group-geometry.js";
|
|
66
|
+
import { computeGroups as Te, isGroupId as Ee, makeGroupId as De } from "./diagram-layout/grouping.js";
|
|
67
|
+
import { createElkLayoutEngine as Oe } from "./diagram-layout/elk-layout-engine.js";
|
|
68
|
+
import { useDiagramLayout as ke } from "./diagram-layout/use-diagram-layout.js";
|
|
69
|
+
import Ae from "./diagram-layout/diagram-node-card.js";
|
|
70
|
+
import je from "./diagram-layout/diagram-node-group.js";
|
|
71
71
|
import "./diagram-layout/index.js";
|
|
72
|
-
export { s as Button, x as CATEGORY_ELEMENTS, k as CodeBlock, l as Combobox, se as ContextMenu, z as DecisionToggle,
|
|
72
|
+
export { s as Button, x as CATEGORY_ELEMENTS, k as CodeBlock, l as Combobox, se as ContextMenu, z as DecisionToggle, Ae as DiagramNodeCard, je as DiagramNodeGroup, p as Dialog, y as DialogHost, b as DocumentProgressBar, c as Dropdown, S as ELEMENT_TO_COLOR, C as ELEMENT_TO_ICON, w as ElementBadge, B as ElementDetail, m as FeedbackDialog, oe as FilterableColumnHeader, u as FloatingTooltip, ye as GROUP_COLLAPSED_MEMBERS_HEIGHT, be as GROUP_HEADER_HEIGHT, xe as GROUP_MEMBER_GAP, Se as GROUP_MEMBER_HEIGHT, Ce as GROUP_MEMBER_HEIGHT_COMPACT, K as KEY_SEPARATOR, D as LibraryBrowser, V as MergeMap, G as MergeReview, H as MergeTree, d as MultiSelect, M as NOTE_CATEGORIES, N as NOTE_CATEGORY_LABELS, P as NOTE_STATUSES, q as NO_VALUE_KEY, R as NoteCategoryPicker, L as NoteCategoryTag, E as SclExplorer, fe as SelectorInput, pe as SplitLayout, f as TextInputAutocomplete, U as TypeNameAuthority, j as XmlDiff, me as applyInitialVisibility, J as buildFlatOptions, Y as buildMultiValueOptions, he as buildRecordCache, X as buildTreeOptions, ce as buildXpath, T as collectExpandableNodeIds, Z as collectLeafKeys, Q as collectParentKeys, ge as collectVisibleIds, Te as computeGroups, h as createDialogHost, e as createDocumentStore, Oe as createElkLayoutEngine, g as dialogHostKey, A as diffLines, $ as filterTree, ve as groupStackMetrics, _e as hideDescendants, O as highlightCode, Ee as isGroupId, De as makeGroupId, le as matchName, we as memberCardHeight, F as parseNoteData, ue as parseXpath, ne as provideColumnFilterHeader, _ as provideDialogHost, ie as provideRowSortHeader, I as serializeNoteData, i as useActiveDocument, re as useColumnFilterHeaderContext, ee as useColumnFilters, ke as useDiagramLayout, t as useDialecteChannel, v as useDialog, a as useDocumentProgress, o as useDocumentState, n as useLiveData, W as useMergeSession, ae as useOptionalRowSortContext, r as useProjectLiveData, te as useRowSort, de as validateXpath };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../external/.pnpm/@dialecte_scl@0.13.2_libxml2-wasm@0.7.2_vitest@4.1.10/node_modules/@dialecte/scl/dist/v2019C1/index.js";
|
|
1
|
+
import { TEMPLATE_UUID_WARNING_INFO as e } from "../../external/.pnpm/@dialecte_scl@0.11.0_libxml2-wasm@0.7.2_vitest@4.1.10/node_modules/@dialecte/scl/dist/v2019C1/index.js";
|
|
3
2
|
//#region lib/merge/check-files/identity-warning.ts
|
|
4
3
|
function t(t) {
|
|
5
4
|
let r = e[t];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as e, f as t } from "../../external/.pnpm/@dialecte_core@0.8.
|
|
2
|
-
import "../../external/.pnpm/@dialecte_core@0.8.
|
|
3
|
-
import {
|
|
4
|
-
import "../../external/.pnpm/@dialecte_scl@0.
|
|
1
|
+
import { d as e, f as t } from "../../external/.pnpm/@dialecte_core@0.8.0/node_modules/@dialecte/core/dist/helpers-DVShv41E.js";
|
|
2
|
+
import "../../external/.pnpm/@dialecte_core@0.8.0/node_modules/@dialecte/core/dist/helpers.js";
|
|
3
|
+
import { _ as n } from "../../external/.pnpm/@dialecte_scl@0.11.0_libxml2-wasm@0.7.2_vitest@4.1.10/node_modules/@dialecte/scl/dist/hooks-F61-rgXT.js";
|
|
4
|
+
import "../../external/.pnpm/@dialecte_scl@0.11.0_libxml2-wasm@0.7.2_vitest@4.1.10/node_modules/@dialecte/scl/dist/v2019C1/index.js";
|
|
5
5
|
import { extractTitle as r, getAttributes as i } from "../session/merge.service.js";
|
|
6
6
|
import { allGroups as a } from "../review/tree.js";
|
|
7
7
|
import { countAttributeChanges as o, foldOperations as s } from "../session/staged-writes.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region lib/merge/done/applied-focus.ts
|
|
2
2
|
function e(e, n) {
|
|
3
3
|
let { instances: r } = e;
|
|
4
|
-
if (r.verb === "fsd") return r.functions[0]
|
|
4
|
+
if (r.verb === "fsd") return r.functions[0];
|
|
5
5
|
if (!(r.verb === "asd" && !r.applications[0])) return r.verb === "ssd" ? t(e) : t(e) ?? n.anchor;
|
|
6
6
|
}
|
|
7
7
|
function t(e) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { f as e } from "../../external/.pnpm/@dialecte_core@0.8.
|
|
2
|
-
import "../../external/.pnpm/@dialecte_core@0.8.
|
|
3
|
-
import "../../external/.pnpm/@dialecte_scl@0.
|
|
4
|
-
import "../../external/.pnpm/@dialecte_scl@0.
|
|
1
|
+
import { f as e } from "../../external/.pnpm/@dialecte_core@0.8.0/node_modules/@dialecte/core/dist/helpers-DVShv41E.js";
|
|
2
|
+
import "../../external/.pnpm/@dialecte_core@0.8.0/node_modules/@dialecte/core/dist/helpers.js";
|
|
3
|
+
import "../../external/.pnpm/@dialecte_scl@0.11.0_libxml2-wasm@0.7.2_vitest@4.1.10/node_modules/@dialecte/scl/dist/hooks-F61-rgXT.js";
|
|
4
|
+
import "../../external/.pnpm/@dialecte_scl@0.11.0_libxml2-wasm@0.7.2_vitest@4.1.10/node_modules/@dialecte/scl/dist/v2019C1/index.js";
|
|
5
5
|
import { extractTitle as t } from "../session/merge.service.js";
|
|
6
6
|
//#region lib/merge/match/match.ts
|
|
7
7
|
async function n(e) {
|
|
@@ -1,55 +1,49 @@
|
|
|
1
|
-
import { i as e } from "../../external/.pnpm/@dialecte_scl@0.
|
|
2
|
-
import "../../external/.pnpm/@dialecte_scl@0.
|
|
1
|
+
import { i as e } from "../../external/.pnpm/@dialecte_scl@0.11.0_libxml2-wasm@0.7.2_vitest@4.1.10/node_modules/@dialecte/scl/dist/hooks-F61-rgXT.js";
|
|
2
|
+
import "../../external/.pnpm/@dialecte_scl@0.11.0_libxml2-wasm@0.7.2_vitest@4.1.10/node_modules/@dialecte/scl/dist/v2019C1/index.js";
|
|
3
3
|
//#region lib/merge/session/merge.service.ts
|
|
4
|
-
async function t(
|
|
5
|
-
|
|
6
|
-
if (!r && !i) return e.query.lifecycle.report(t);
|
|
7
|
-
let a = {};
|
|
8
|
-
return r && (a.mappings = r), i && (a.consumerManagedTags = i), e.query.lifecycle.report({
|
|
4
|
+
async function t(e, t, n) {
|
|
5
|
+
return n ? e.query.lifecycle.report({
|
|
9
6
|
...t,
|
|
10
|
-
resolution:
|
|
11
|
-
});
|
|
7
|
+
resolution: { mappings: n }
|
|
8
|
+
}) : e.query.lifecycle.report(t);
|
|
12
9
|
}
|
|
13
|
-
function n({ decisions: e, decisionMappings: t, keepNameTypesFrom: n,
|
|
10
|
+
function n({ decisions: e, decisionMappings: t, keepNameTypesFrom: n, afterApply: r }) {
|
|
14
11
|
return {
|
|
15
12
|
decisions: e,
|
|
16
13
|
mappings: t,
|
|
17
14
|
keepNameTypesFrom: n,
|
|
18
|
-
|
|
19
|
-
afterApply: i
|
|
15
|
+
afterApply: r
|
|
20
16
|
};
|
|
21
17
|
}
|
|
22
|
-
async function r({ doc: e, target: t, report: r, decisions: i, decisionMappings: a, keepNameTypesFrom: o,
|
|
23
|
-
let
|
|
18
|
+
async function r({ doc: e, target: t, report: r, decisions: i, decisionMappings: a, keepNameTypesFrom: o, afterApply: s }) {
|
|
19
|
+
let c = n({
|
|
24
20
|
decisions: i,
|
|
25
21
|
decisionMappings: a,
|
|
26
22
|
keepNameTypesFrom: o,
|
|
27
|
-
|
|
28
|
-
afterApply: c
|
|
23
|
+
afterApply: s
|
|
29
24
|
});
|
|
30
25
|
return { prepared: await e.prepare(async (e) => {
|
|
31
26
|
await e.lifecycle.apply({
|
|
32
27
|
...t,
|
|
33
28
|
report: r,
|
|
34
|
-
resolution:
|
|
29
|
+
resolution: c
|
|
35
30
|
});
|
|
36
31
|
}) };
|
|
37
32
|
}
|
|
38
|
-
async function i({ doc: e, target: t, report: r, decisions: i, decisionMappings: a, keepNameTypesFrom: o,
|
|
39
|
-
let
|
|
33
|
+
async function i({ doc: e, target: t, report: r, decisions: i, decisionMappings: a, keepNameTypesFrom: o, afterApply: s }) {
|
|
34
|
+
let c = n({
|
|
40
35
|
decisions: i,
|
|
41
36
|
decisionMappings: a,
|
|
42
37
|
keepNameTypesFrom: o,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}), u;
|
|
38
|
+
afterApply: s
|
|
39
|
+
}), l;
|
|
46
40
|
return await e.transaction(async (e) => {
|
|
47
|
-
|
|
41
|
+
l = await e.lifecycle.apply({
|
|
48
42
|
...t,
|
|
49
43
|
report: r,
|
|
50
|
-
resolution:
|
|
44
|
+
resolution: c
|
|
51
45
|
});
|
|
52
|
-
}),
|
|
46
|
+
}), l;
|
|
53
47
|
}
|
|
54
48
|
function a(t) {
|
|
55
49
|
return e({ verb: t });
|
|
@@ -40,14 +40,7 @@ function p(p) {
|
|
|
40
40
|
await L(), N.value = await t([p.sourceQuery, p.targetDocument.query]), j.value = await s(p.sourceQuery), await $();
|
|
41
41
|
}
|
|
42
42
|
async function L() {
|
|
43
|
-
let e = await te(
|
|
44
|
-
doc: p.targetDocument,
|
|
45
|
-
target: P(),
|
|
46
|
-
resolved: {
|
|
47
|
-
decisionMappings: new Map(g),
|
|
48
|
-
consumerManagedTags: p.consumerManagedTags
|
|
49
|
-
}
|
|
50
|
-
});
|
|
43
|
+
let e = await te(p.targetDocument, P(), new Map(g));
|
|
51
44
|
m.value = e;
|
|
52
45
|
let t = await re({
|
|
53
46
|
mappings: e.mappings,
|
|
@@ -211,7 +204,6 @@ function p(p) {
|
|
|
211
204
|
decisions: t,
|
|
212
205
|
decisionMappings: new Map(g),
|
|
213
206
|
keepNameTypesFrom: C.value,
|
|
214
|
-
consumerManagedTags: p.consumerManagedTags,
|
|
215
207
|
afterApply: p.afterApply
|
|
216
208
|
});
|
|
217
209
|
if (e !== Z) {
|
|
@@ -283,7 +275,6 @@ function p(p) {
|
|
|
283
275
|
decisions: q(),
|
|
284
276
|
decisionMappings: new Map(g),
|
|
285
277
|
keepNameTypesFrom: C.value,
|
|
286
|
-
consumerManagedTags: p.consumerManagedTags,
|
|
287
278
|
afterApply: p.afterApply
|
|
288
279
|
});
|
|
289
280
|
}
|
|
@@ -301,7 +292,6 @@ function p(p) {
|
|
|
301
292
|
decisions: q(),
|
|
302
293
|
decisionMappings: new Map(g),
|
|
303
294
|
keepNameTypesFrom: C.value,
|
|
304
|
-
consumerManagedTags: p.consumerManagedTags,
|
|
305
295
|
afterApply: p.afterApply
|
|
306
296
|
});
|
|
307
297
|
try {
|
package/dist/merge/wording.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { G as e, U as t } from "../external/.pnpm/@dialecte_core@0.8.
|
|
2
|
-
import "../external/.pnpm/@dialecte_core@0.8.
|
|
3
|
-
import {
|
|
4
|
-
import "../external/.pnpm/@dialecte_scl@0.
|
|
1
|
+
import { G as e, U as t } from "../external/.pnpm/@dialecte_core@0.8.0/node_modules/@dialecte/core/dist/utils-USNkj4sT.js";
|
|
2
|
+
import "../external/.pnpm/@dialecte_core@0.8.0/node_modules/@dialecte/core/dist/index.js";
|
|
3
|
+
import { m as n } from "../external/.pnpm/@dialecte_scl@0.11.0_libxml2-wasm@0.7.2_vitest@4.1.10/node_modules/@dialecte/scl/dist/hooks-F61-rgXT.js";
|
|
4
|
+
import "../external/.pnpm/@dialecte_scl@0.11.0_libxml2-wasm@0.7.2_vitest@4.1.10/node_modules/@dialecte/scl/dist/v2019C1/index.js";
|
|
5
5
|
//#region lib/merge/wording.ts
|
|
6
6
|
var r = {
|
|
7
7
|
added: "new",
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
//#region lib/selector-input/selector-input.ts
|
|
2
|
+
var e = "[\\w.-]+", t = RegExp(`^${e}$`), n = "(?:'[^']*'|\"[^\"]*\")", r = `ancestor::\\*\\[local-name\\(\\)='(${e})'\\]\\[1\\]`, i = `local-name\\(\\)='${e}'`, a = `${i}(?: or ${i})*`, o = (e) => `(?:@name=${e(n)}|${e("starts-with|contains")}\\(@name,${e(n)}\\)|substring\\(@name,string-length\\(@name\\)-string-length\\(${e(n)}\\)\\+1\\)=${e(n)})`, s = RegExp(`^${o((e) => `(${e})`)}$`), c = o((e) => `(?:${e})`), l = RegExp(`^(?:${r})?//\\*(?:\\[(${a})\\])?(?:\\[(${c})\\]|\\[ancestor::\\*\\[(${a})\\]\\[1\\]\\[(${c})\\]\\])?$`);
|
|
3
|
+
function u({ anchor: e, targets: t, nameFilter: n, nameOwners: r = [] }) {
|
|
4
|
+
b(e, { optional: !0 }), t.forEach((e) => b(e)), r.forEach((e) => b(e));
|
|
5
|
+
let i = n?.value ? n : void 0;
|
|
6
|
+
if (!e && t.length === 0 && !i) return "";
|
|
7
|
+
let a = e ? `ancestor::*[local-name()='${e}'][1]` : "", o = i ? h(i) : "", s = i && r.length > 0 ? `[ancestor::*[${p(r)}][1][${o}]]` : i ? `[${o}]` : "";
|
|
8
|
+
return `${a}//*${t.length > 0 ? `[${p(t)}]` : ""}${s}`;
|
|
9
|
+
}
|
|
10
|
+
function d(e) {
|
|
11
|
+
let t = l.exec(e);
|
|
12
|
+
if (!t) return;
|
|
13
|
+
let [, n = "", r = "", i, a, o] = t, s = i ?? o, c = s ? g(s) : void 0;
|
|
14
|
+
if (c === null || !n && !r && !c) return;
|
|
15
|
+
let u = m(r);
|
|
16
|
+
return c ? a ? {
|
|
17
|
+
anchor: n,
|
|
18
|
+
targets: u,
|
|
19
|
+
nameFilter: c,
|
|
20
|
+
nameOwners: m(a)
|
|
21
|
+
} : {
|
|
22
|
+
anchor: n,
|
|
23
|
+
targets: u,
|
|
24
|
+
nameFilter: c
|
|
25
|
+
} : {
|
|
26
|
+
anchor: n,
|
|
27
|
+
targets: u
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function f({ match: e, value: t }, n) {
|
|
31
|
+
if (n === void 0) return !1;
|
|
32
|
+
switch (e) {
|
|
33
|
+
case "equals": return n === t;
|
|
34
|
+
case "starts-with": return n.startsWith(t);
|
|
35
|
+
case "ends-with": return n.endsWith(t);
|
|
36
|
+
case "contains": return n.includes(t);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function p(e) {
|
|
40
|
+
return e.map((e) => `local-name()='${e}'`).join(" or ");
|
|
41
|
+
}
|
|
42
|
+
function m(e) {
|
|
43
|
+
return [...e.matchAll(/local-name\(\)='([^']+)'/g)].map((e) => e[1]);
|
|
44
|
+
}
|
|
45
|
+
function h({ match: e, value: t }) {
|
|
46
|
+
let n = _(t);
|
|
47
|
+
switch (e) {
|
|
48
|
+
case "equals": return `@name=${n}`;
|
|
49
|
+
case "starts-with":
|
|
50
|
+
case "contains": return `${e}(@name,${n})`;
|
|
51
|
+
case "ends-with": return `substring(@name,string-length(@name)-string-length(${n})+1)=${n}`;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function g(e) {
|
|
55
|
+
let t = s.exec(e);
|
|
56
|
+
if (!t) return null;
|
|
57
|
+
let [, n, r, i, a, o] = t;
|
|
58
|
+
return n ? {
|
|
59
|
+
match: "equals",
|
|
60
|
+
value: v(n)
|
|
61
|
+
} : r && i ? {
|
|
62
|
+
match: r,
|
|
63
|
+
value: v(i)
|
|
64
|
+
} : a === o ? {
|
|
65
|
+
match: "ends-with",
|
|
66
|
+
value: v(a)
|
|
67
|
+
} : null;
|
|
68
|
+
}
|
|
69
|
+
function _(e) {
|
|
70
|
+
if (!e.includes("'")) return `'${e}'`;
|
|
71
|
+
if (!e.includes("\"")) return `"${e}"`;
|
|
72
|
+
throw Error("Search text must not contain both single and double quotes");
|
|
73
|
+
}
|
|
74
|
+
function v(e) {
|
|
75
|
+
return e.slice(1, -1);
|
|
76
|
+
}
|
|
77
|
+
function y(e) {
|
|
78
|
+
if (e.trim() !== "") try {
|
|
79
|
+
let t = document.implementation.createDocument(null, "root");
|
|
80
|
+
t.evaluate(e, t, null, XPathResult.ANY_TYPE, null);
|
|
81
|
+
return;
|
|
82
|
+
} catch (e) {
|
|
83
|
+
return e instanceof Error && e.message || "Invalid XPath";
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function b(e, { optional: n = !1 } = {}) {
|
|
87
|
+
if (!(n && e === "") && !t.test(e)) throw Error(`Invalid element name "${e}"`);
|
|
88
|
+
}
|
|
89
|
+
//#endregion
|
|
90
|
+
export { u as buildXpath, f as matchName, d as parseXpath, y as validateXpath };
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { buildXpath as e, parseXpath as t, validateXpath as n } from "./selector-input.js";
|
|
2
|
+
import { Fragment as r, computed as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, defineComponent as c, mergeModels as l, normalizeClass as u, onBeforeUnmount as d, openBlock as f, ref as p, renderList as m, renderSlot as h, toDisplayString as g, useModel as _, vModelText as v, watch as y, withDirectives as b } from "vue";
|
|
3
|
+
//#region lib/selector-input/selector-input.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var x = {
|
|
5
|
+
class: "flex flex-col gap-2",
|
|
6
|
+
"data-testid": "selector-input"
|
|
7
|
+
}, S = { class: "tabs tabs-box w-fit tabs-sm" }, C = {
|
|
8
|
+
key: 0,
|
|
9
|
+
role: "status",
|
|
10
|
+
class: "alert alert-soft alert-info py-2 text-sm",
|
|
11
|
+
"data-testid": "selector-input-custom-hint"
|
|
12
|
+
}, w = { class: "fieldset" }, T = { class: "flex flex-wrap gap-2" }, E = [
|
|
13
|
+
"aria-pressed",
|
|
14
|
+
"data-testid",
|
|
15
|
+
"onClick"
|
|
16
|
+
], D = {
|
|
17
|
+
key: 1,
|
|
18
|
+
class: "fieldset"
|
|
19
|
+
}, O = { class: "fieldset-legend text-sm font-medium" }, k = {
|
|
20
|
+
class: "join",
|
|
21
|
+
role: "group",
|
|
22
|
+
"aria-label": "Name match"
|
|
23
|
+
}, A = [
|
|
24
|
+
"aria-pressed",
|
|
25
|
+
"data-testid",
|
|
26
|
+
"onClick"
|
|
27
|
+
], ee = [
|
|
28
|
+
"value",
|
|
29
|
+
"aria-label",
|
|
30
|
+
"placeholder"
|
|
31
|
+
], j = {
|
|
32
|
+
key: 0,
|
|
33
|
+
class: "label text-error",
|
|
34
|
+
role: "alert",
|
|
35
|
+
"data-testid": "selector-input-search-error"
|
|
36
|
+
}, M = {
|
|
37
|
+
key: 1,
|
|
38
|
+
class: "fieldset"
|
|
39
|
+
}, N = ["disabled"], P = {
|
|
40
|
+
key: 0,
|
|
41
|
+
class: "label text-error",
|
|
42
|
+
role: "alert",
|
|
43
|
+
"data-testid": "selector-input-error"
|
|
44
|
+
}, F = {
|
|
45
|
+
key: 1,
|
|
46
|
+
class: "label text-error",
|
|
47
|
+
role: "alert",
|
|
48
|
+
"data-testid": "selector-input-search-error"
|
|
49
|
+
}, I = /*@__PURE__*/ c({
|
|
50
|
+
__name: "selector-input",
|
|
51
|
+
props: /*@__PURE__*/ l({
|
|
52
|
+
anchors: {},
|
|
53
|
+
anywhereLabel: { default: "Anywhere" },
|
|
54
|
+
targets: { default: () => [] },
|
|
55
|
+
nameOwners: { default: () => [] },
|
|
56
|
+
searchable: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: !0
|
|
59
|
+
},
|
|
60
|
+
allowXpath: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: !1
|
|
63
|
+
}
|
|
64
|
+
}, {
|
|
65
|
+
modelValue: { default: "" },
|
|
66
|
+
modelModifiers: {},
|
|
67
|
+
invalid: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default: !1
|
|
70
|
+
},
|
|
71
|
+
invalidModifiers: {}
|
|
72
|
+
}),
|
|
73
|
+
emits: ["update:modelValue", "update:invalid"],
|
|
74
|
+
setup(c) {
|
|
75
|
+
let l = [
|
|
76
|
+
{
|
|
77
|
+
value: "equals",
|
|
78
|
+
label: "Full name"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
value: "starts-with",
|
|
82
|
+
label: "Starts with"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
value: "ends-with",
|
|
86
|
+
label: "Ends with"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
value: "contains",
|
|
90
|
+
label: "Contains"
|
|
91
|
+
}
|
|
92
|
+
], I = c, L = _(c, "modelValue"), R = _(c, "invalid"), z = i(() => t(L.value)), B = p(z.value?.anchor ?? ""), V = p(z.value?.targets ?? I.targets), H = p(z.value?.nameFilter?.match ?? "contains"), U = p(z.value?.nameFilter?.value ?? ""), W = p("builder"), G = i(() => L.value !== "" && z.value === void 0), K = i(() => I.allowXpath ? n(L.value) : void 0), q = i(() => I.nameOwners.length > 0 ? "Search by function name" : "Search by name"), J = i(() => U.value.includes("'") && U.value.includes("\"") ? "Search text must not contain both single and double quotes" : void 0), Y = i(() => !!(J.value || K.value)), X = i(() => [{
|
|
93
|
+
value: "",
|
|
94
|
+
label: I.anywhereLabel
|
|
95
|
+
}, ...I.anchors]);
|
|
96
|
+
y(Y, (e) => R.value = e, { immediate: !0 }), d(() => R.value = !1), y(L, (e) => {
|
|
97
|
+
let n = t(e);
|
|
98
|
+
B.value = n?.anchor ?? "", V.value = n?.targets ?? I.targets, U.value = n?.nameFilter?.value ?? "", n?.nameFilter && (H.value = n.nameFilter.match);
|
|
99
|
+
});
|
|
100
|
+
function Z(e) {
|
|
101
|
+
B.value = e, $();
|
|
102
|
+
}
|
|
103
|
+
function Q(e) {
|
|
104
|
+
H.value = e, $();
|
|
105
|
+
}
|
|
106
|
+
function te(e) {
|
|
107
|
+
U.value = e, $();
|
|
108
|
+
}
|
|
109
|
+
function $() {
|
|
110
|
+
J.value || (L.value = e({
|
|
111
|
+
anchor: B.value,
|
|
112
|
+
targets: V.value,
|
|
113
|
+
nameFilter: {
|
|
114
|
+
match: H.value,
|
|
115
|
+
value: U.value
|
|
116
|
+
},
|
|
117
|
+
nameOwners: I.nameOwners
|
|
118
|
+
}));
|
|
119
|
+
}
|
|
120
|
+
return (e, t) => (f(), o("div", x, [
|
|
121
|
+
s("div", S, [s("button", {
|
|
122
|
+
type: "button",
|
|
123
|
+
class: u(["tab", { "tab-active": W.value === "builder" }]),
|
|
124
|
+
"data-testid": "selector-input-mode-builder",
|
|
125
|
+
onClick: t[0] ||= (e) => W.value = "builder"
|
|
126
|
+
}, " Builder ", 2), s("button", {
|
|
127
|
+
type: "button",
|
|
128
|
+
class: u(["tab", { "tab-active": W.value === "xpath" }]),
|
|
129
|
+
"data-testid": "selector-input-mode-xpath",
|
|
130
|
+
onClick: t[1] ||= (e) => W.value = "xpath"
|
|
131
|
+
}, " XPath ", 2)]),
|
|
132
|
+
W.value === "builder" ? (f(), o(r, { key: 0 }, [
|
|
133
|
+
G.value ? (f(), o("div", C, g(c.searchable ? "A custom XPath is in use. Choosing a scope or entering a search replaces it." : "A custom XPath is in use. Choosing a scope replaces it."), 1)) : a("", !0),
|
|
134
|
+
s("fieldset", w, [t[4] ||= s("legend", { class: "fieldset-legend text-sm font-medium" }, "Scope", -1), s("div", T, [(f(!0), o(r, null, m(X.value, (e) => (f(), o("button", {
|
|
135
|
+
key: e.value,
|
|
136
|
+
type: "button",
|
|
137
|
+
class: u(["badge badge-sm cursor-pointer", !G.value && B.value === e.value ? "badge-primary" : "badge-soft"]),
|
|
138
|
+
"aria-pressed": !G.value && B.value === e.value,
|
|
139
|
+
"data-testid": `selector-input-anchor-${e.value || "none"}`,
|
|
140
|
+
onClick: (t) => Z(e.value)
|
|
141
|
+
}, g(e.label), 11, E))), 128))])]),
|
|
142
|
+
c.searchable ? (f(), o("fieldset", D, [
|
|
143
|
+
s("legend", O, g(c.nameOwners.length > 0 ? "Function name" : "Name"), 1),
|
|
144
|
+
s("div", k, [(f(), o(r, null, m(l, (e) => s("button", {
|
|
145
|
+
key: e.value,
|
|
146
|
+
type: "button",
|
|
147
|
+
class: u(["btn btn-sm join-item", { "btn-primary": H.value === e.value }]),
|
|
148
|
+
"aria-pressed": H.value === e.value,
|
|
149
|
+
"data-testid": `selector-input-match-${e.value}`,
|
|
150
|
+
onClick: (t) => Q(e.value)
|
|
151
|
+
}, g(e.label), 11, A)), 64))]),
|
|
152
|
+
s("input", {
|
|
153
|
+
value: U.value,
|
|
154
|
+
type: "search",
|
|
155
|
+
"aria-label": q.value,
|
|
156
|
+
class: u(["input input-sm w-full", { "input-error": J.value }]),
|
|
157
|
+
placeholder: q.value,
|
|
158
|
+
"data-testid": "selector-input-search",
|
|
159
|
+
onInput: t[2] ||= (e) => te(e.target.value)
|
|
160
|
+
}, null, 42, ee),
|
|
161
|
+
J.value ? (f(), o("p", j, g(J.value), 1)) : a("", !0)
|
|
162
|
+
])) : a("", !0)
|
|
163
|
+
], 64)) : (f(), o("fieldset", M, [
|
|
164
|
+
t[5] ||= s("legend", { class: "fieldset-legend" }, "XPath", -1),
|
|
165
|
+
b(s("input", {
|
|
166
|
+
"onUpdate:modelValue": t[3] ||= (e) => L.value = e,
|
|
167
|
+
type: "text",
|
|
168
|
+
disabled: !c.allowXpath,
|
|
169
|
+
class: u(["input w-full font-mono", { "input-error": K.value }]),
|
|
170
|
+
"data-testid": "selector-input-raw"
|
|
171
|
+
}, null, 10, N), [[v, L.value]]),
|
|
172
|
+
K.value ? (f(), o("p", P, g(K.value), 1)) : a("", !0),
|
|
173
|
+
J.value ? (f(), o("p", F, g(J.value), 1)) : a("", !0)
|
|
174
|
+
])),
|
|
175
|
+
h(e.$slots, "footer")
|
|
176
|
+
]));
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
//#endregion
|
|
180
|
+
export { I as default };
|