@septkit/ui 0.0.50 → 0.0.52

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 (27) 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/dropdown/index.js +2 -1
  4. package/dist/dropdown/multi-select.js +5 -0
  5. package/dist/dropdown/multi-select.vue_vue_type_script_setup_true_lang.js +126 -0
  6. 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
  7. package/dist/external/.pnpm/@dialecte_scl@0.3.12/node_modules/@dialecte/scl/dist/v2019C1/index.js +22 -0
  8. package/dist/index.d.ts +108 -47
  9. package/dist/index.js +20 -19
  10. package/dist/merge/build-view-model.js +71 -60
  11. package/dist/merge/decision-toggle.vue_vue_type_script_setup_true_lang.js +2 -2
  12. package/dist/merge/element-detail.vue_vue_type_script_setup_true_lang.js +139 -67
  13. package/dist/merge/merge-correlate.js +46 -0
  14. package/dist/merge/merge-decision.js +6 -0
  15. package/dist/merge/merge-highlight.js +44 -0
  16. package/dist/merge/merge-preflight.js +5 -0
  17. package/dist/merge/merge-preflight.vue_vue_type_script_setup_true_lang.js +41 -0
  18. package/dist/merge/merge-progress.vue_vue_type_script_setup_true_lang.js +12 -20
  19. package/dist/merge/merge-review.vue_vue_type_script_setup_true_lang.js +233 -189
  20. package/dist/merge/merge-tree.vue_vue_type_script_setup_true_lang.js +74 -65
  21. package/dist/merge/merge.service.js +36 -23
  22. package/dist/merge/use-document-progress.js +8 -9
  23. package/dist/merge/use-merge-session.js +122 -111
  24. package/dist/ui.css +1 -1
  25. package/package.json +2 -2
  26. package/dist/external/.pnpm/@dialecte_scl@0.3.9/node_modules/@dialecte/scl/dist/v2019C1/index.js +0 -3
  27. 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
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
 
@@ -54,23 +55,23 @@ color: "neutral" | "primary" | "secondary" | "accent" | "info" | "success" | "wa
54
55
  size: "xs" | "sm" | "md" | "lg" | "xl";
55
56
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
56
57
 
57
- declare const __VLS_component_4: DefineComponent<__VLS_Props_4, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
58
+ declare const __VLS_component_4: DefineComponent<__VLS_Props_5, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
58
59
  "update:open": (value: boolean) => any;
59
- }, string, PublicProps, Readonly<__VLS_Props_4> & Readonly<{
60
+ }, string, PublicProps, Readonly<__VLS_Props_5> & Readonly<{
60
61
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
61
62
  }>, {
62
63
  size: DialogSize;
63
64
  closable: boolean;
64
65
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
65
66
 
66
- declare const __VLS_component_5: DefineComponent<__VLS_Props_7, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
67
+ declare const __VLS_component_5: DefineComponent<__VLS_Props_8, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
67
68
  select: (node: ExplorerNode) => any;
68
69
  contextmenu: (payload: {
69
70
  node: ExplorerNode;
70
71
  event: MouseEvent;
71
72
  }) => any;
72
73
  "update:expanded": (state: ExplorerExpandedState) => any;
73
- }, string, PublicProps, Readonly<__VLS_Props_7> & Readonly<{
74
+ }, string, PublicProps, Readonly<__VLS_Props_8> & Readonly<{
74
75
  onSelect?: ((node: ExplorerNode) => any) | undefined;
75
76
  onContextmenu?: ((payload: {
76
77
  node: ExplorerNode;
@@ -92,23 +93,33 @@ declare type __VLS_Props = {
92
93
  };
93
94
 
94
95
  declare type __VLS_Props_10 = {
96
+ /** Baseline XML. Omit (or empty) for a purely-added element. */
97
+ before?: string;
98
+ /** Resulting XML. */
99
+ after?: string;
100
+ loading?: boolean;
101
+ };
102
+
103
+ declare type __VLS_Props_11 = {
95
104
  size?: 'xs' | 'sm' | 'md';
96
105
  disabled?: boolean;
97
106
  };
98
107
 
99
- declare type __VLS_Props_11 = {
108
+ declare type __VLS_Props_12 = {
100
109
  detail: ElementDetailVM | undefined;
101
110
  /** Consumer-supplied fixed prefix/suffix per attribute; the user edits only the core. */
102
111
  affixMask?: AffixMaskResolver;
112
+ /** The selected group is skipped: lock editing and show the skip (current) value. */
113
+ disabled?: boolean;
103
114
  };
104
115
 
105
- declare type __VLS_Props_12 = MergeSessionParams & {
116
+ declare type __VLS_Props_13 = MergeSessionParams & {
106
117
  source?: FileMeta;
107
118
  target?: FileMeta;
108
119
  affixMask?: AffixMaskResolver;
109
120
  };
110
121
 
111
- declare type __VLS_Props_13 = {
122
+ declare type __VLS_Props_14 = {
112
123
  items: ExplorerNode[];
113
124
  /** Per-node metadata keyed by node id (change, role, groupId, path). */
114
125
  meta: Record<string, MergeNodeMeta>;
@@ -118,7 +129,7 @@ declare type __VLS_Props_13 = {
118
129
  expandedItems?: string[];
119
130
  };
120
131
 
121
- declare type __VLS_Props_14 = {
132
+ declare type __VLS_Props_15 = {
122
133
  size?: 'xs' | 'sm' | 'md';
123
134
  disabled?: boolean;
124
135
  /** Render the segmented control only, without the leading label. */
@@ -155,6 +166,19 @@ declare type __VLS_Props_3 = {
155
166
  };
156
167
 
157
168
  declare type __VLS_Props_4 = {
169
+ options: {
170
+ value: string;
171
+ label: string;
172
+ }[];
173
+ placeholder?: string;
174
+ emptyText?: string;
175
+ color?: 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error';
176
+ variant?: 'ghost' | 'bordered' | 'soft' | 'dash';
177
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
178
+ disabled?: boolean;
179
+ };
180
+
181
+ declare type __VLS_Props_5 = {
158
182
  /** Controlled open state (v-model:open). */
159
183
  open: boolean;
160
184
  title?: string;
@@ -168,11 +192,11 @@ declare type __VLS_Props_4 = {
168
192
  scoped?: boolean;
169
193
  };
170
194
 
171
- declare type __VLS_Props_5 = {
195
+ declare type __VLS_Props_6 = {
172
196
  host?: DialogController;
173
197
  };
174
198
 
175
- declare type __VLS_Props_6 = {
199
+ declare type __VLS_Props_7 = {
176
200
  variant: FeedbackVariant;
177
201
  message: string;
178
202
  detail?: string;
@@ -184,13 +208,13 @@ declare type __VLS_Props_6 = {
184
208
  autoCloseMs?: number;
185
209
  };
186
210
 
187
- declare type __VLS_Props_7 = {
211
+ declare type __VLS_Props_8 = {
188
212
  items: ExplorerNode[];
189
213
  expanded?: ExplorerExpandedState;
190
214
  ariaLabel?: string;
191
215
  };
192
216
 
193
- declare type __VLS_Props_8 = {
217
+ declare type __VLS_Props_9 = {
194
218
  /** Code to render. */
195
219
  code?: string;
196
220
  /** Shiki language id. Defaults to `xml`. */
@@ -202,25 +226,22 @@ declare type __VLS_Props_8 = {
202
226
  wrap?: boolean;
203
227
  };
204
228
 
205
- declare type __VLS_Props_9 = {
206
- /** Baseline XML. Omit (or empty) for a purely-added element. */
207
- before?: string;
208
- /** Resulting XML. */
209
- after?: string;
210
- loading?: boolean;
211
- };
212
-
213
229
  declare type __VLS_PublicProps = {
214
230
  modelValue?: AcceptableValue;
215
231
  } & __VLS_Props_3;
216
232
 
217
233
  declare type __VLS_PublicProps_2 = {
218
- modelValue: DecisionAction;
219
- } & __VLS_Props_10;
234
+ modelValue?: string[];
235
+ 'open'?: boolean;
236
+ } & __VLS_Props_4;
220
237
 
221
238
  declare type __VLS_PublicProps_3 = {
239
+ modelValue: DecisionAction;
240
+ } & __VLS_Props_11;
241
+
242
+ declare type __VLS_PublicProps_4 = {
222
243
  modelValue: KeepNameTypesFrom;
223
- } & __VLS_Props_14;
244
+ } & __VLS_Props_15;
224
245
 
225
246
  declare function __VLS_template(): {
226
247
  attrs: Partial<{}>;
@@ -409,7 +430,7 @@ export declare type ChangeStatus = 'added' | 'removed' | 'modified' | 'unchanged
409
430
 
410
431
  declare function closeDropdown(): void;
411
432
 
412
- export declare const CodeBlock: DefineComponent<__VLS_Props_8, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_8> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
433
+ export declare const CodeBlock: DefineComponent<__VLS_Props_9, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_9> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
413
434
 
414
435
  /**
415
436
  * Collects the ids of every node that has children, for binding to
@@ -452,9 +473,9 @@ export declare function createDocumentStore<GenericBaseDocument, GenericAugmente
452
473
  /** A user's binary choice on a decision group. */
453
474
  export declare type DecisionAction = 'accept' | 'skip';
454
475
 
455
- export declare const DecisionToggle: DefineComponent<__VLS_PublicProps_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
476
+ export declare const DecisionToggle: DefineComponent<__VLS_PublicProps_3, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
456
477
  "update:modelValue": (value: DecisionAction) => any;
457
- }, string, PublicProps, Readonly<__VLS_PublicProps_2> & Readonly<{
478
+ }, string, PublicProps, Readonly<__VLS_PublicProps_3> & Readonly<{
458
479
  "onUpdate:modelValue"?: ((value: DecisionAction) => any) | undefined;
459
480
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
460
481
 
@@ -462,10 +483,15 @@ export declare const DecisionToggle: DefineComponent<__VLS_PublicProps_2, {}, {}
462
483
  export declare type DetailAttribute = {
463
484
  name: string;
464
485
  status: ChangeStatus;
465
- /** The current/instance value — the `-` line, present when modified/removed. */
486
+ /** The current/instance value — the `-` line, present when modified/removed. (Skip target.) */
466
487
  before?: string;
467
- /** The final value that will be written — the `+` line, present when added/modified. */
488
+ /** The incoming/proposed value — the `+` line, present when added/modified. (Accept target.) */
468
489
  after?: string;
490
+ /**
491
+ * The live value that will actually be written — the user's edit, or accept/skip choice.
492
+ * Defaults to `after` (accept) when unset; a skip sets it to `before`. The input binds to this.
493
+ */
494
+ written?: string;
469
495
  /** When set, the attribute is user-editable and its value renders as an input. */
470
496
  editable?: EditableMode;
471
497
  /** The engine auto-resolved a placement collision on this field (value = the resolved one). */
@@ -502,7 +528,7 @@ export declare type DialogController = {
502
528
  close: () => void;
503
529
  };
504
530
 
505
- export declare const DialogHost: DefineComponent<__VLS_Props_5, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_5> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
531
+ export declare const DialogHost: DefineComponent<__VLS_Props_6, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_6> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
506
532
 
507
533
  /** Injection key for the ambient dialog host. */
508
534
  export declare const dialogHostKey: InjectionKey<DialogController>;
@@ -543,9 +569,9 @@ export declare interface ElementColor {
543
569
  background: string;
544
570
  }
545
571
 
546
- export declare const ElementDetail: DefineComponent<__VLS_Props_11, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
572
+ export declare const ElementDetail: DefineComponent<__VLS_Props_12, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
547
573
  edit: (attr: string, value: string) => any;
548
- }, string, PublicProps, Readonly<__VLS_Props_11> & Readonly<{
574
+ }, string, PublicProps, Readonly<__VLS_Props_12> & Readonly<{
549
575
  onEdit?: ((attr: string, value: string) => any) | undefined;
550
576
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
551
577
 
@@ -578,10 +604,10 @@ export declare type ExplorerNode = {
578
604
  /** Map of named extension modules. */
579
605
  export declare type ExtensionsConfig = Record<string, ExtensionModule>;
580
606
 
581
- export declare const FeedbackDialog: DefineComponent<__VLS_Props_6, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
607
+ export declare const FeedbackDialog: DefineComponent<__VLS_Props_7, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
582
608
  dismiss: () => any;
583
609
  retry: () => any;
584
- }, string, PublicProps, Readonly<__VLS_Props_6> & Readonly<{
610
+ }, string, PublicProps, Readonly<__VLS_Props_7> & Readonly<{
585
611
  onDismiss?: (() => any) | undefined;
586
612
  onRetry?: (() => any) | undefined;
587
613
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
@@ -664,12 +690,21 @@ export declare type MergeNodeMeta = {
664
690
  regionHead?: boolean;
665
691
  /** For a satellite companion that lives elsewhere: its real document path (shown as subtitle). */
666
692
  path?: string;
693
+ /**
694
+ * Present on an instance ROOT (Application/Function): its linkage to the loaded template
695
+ * and its member cluster. Drives the "linked / up to date" badge and the select-to-highlight
696
+ * of the whole instance (subtree + folded satellites).
697
+ */
698
+ instance?: {
699
+ linked: boolean;
700
+ upToDate: boolean;
701
+ };
667
702
  };
668
703
 
669
- export declare const MergeReview: DefineComponent<__VLS_Props_12, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
704
+ export declare const MergeReview: DefineComponent<__VLS_Props_13, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
670
705
  close: () => any;
671
706
  applied: () => any;
672
- }, string, PublicProps, Readonly<__VLS_Props_12> & Readonly<{
707
+ }, string, PublicProps, Readonly<__VLS_Props_13> & Readonly<{
673
708
  onClose?: (() => any) | undefined;
674
709
  onApplied?: (() => any) | undefined;
675
710
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
@@ -689,10 +724,10 @@ export declare type MergeSessionParams = {
689
724
  afterApply?: AfterApply;
690
725
  };
691
726
 
692
- export declare const MergeTree: DefineComponent<__VLS_Props_13, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
727
+ export declare const MergeTree: DefineComponent<__VLS_Props_14, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
693
728
  select: (node: ExplorerNode) => any;
694
729
  "update:decision": (groupId: string, action: DecisionAction) => any;
695
- }, string, PublicProps, Readonly<__VLS_Props_13> & Readonly<{
730
+ }, string, PublicProps, Readonly<__VLS_Props_14> & Readonly<{
696
731
  onSelect?: ((node: ExplorerNode) => any) | undefined;
697
732
  "onUpdate:decision"?: ((groupId: string, action: DecisionAction) => any) | undefined;
698
733
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
@@ -700,6 +735,17 @@ onSelect?: ((node: ExplorerNode) => any) | undefined;
700
735
  /** The transaction handle passed to `prepare`/`transaction` callbacks. */
701
736
  declare type MergeTx = Parameters<Parameters<Scl.Document['prepare']>[0]>[0];
702
737
 
738
+ export declare const MultiSelect: DefineComponent<__VLS_PublicProps_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
739
+ "update:modelValue": (value: string[]) => any;
740
+ "update:open": (value: boolean) => any;
741
+ }, string, PublicProps, Readonly<__VLS_PublicProps_2> & Readonly<{
742
+ "onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
743
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
744
+ }>, {
745
+ color: "neutral" | "primary" | "secondary" | "accent" | "info" | "success" | "warning" | "error";
746
+ size: "xs" | "sm" | "md" | "lg" | "xl";
747
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
748
+
703
749
  /** The props a component accepts (declared props + Vue built-ins like `onXxx` listeners). */
704
750
  declare type PropsOf<C extends Component> = C extends new (...args: never[]) => {
705
751
  $props: infer P;
@@ -729,9 +775,9 @@ declare type StructuralTree = {
729
775
  expanded: string[];
730
776
  };
731
777
 
732
- export declare const TypeNameAuthority: DefineComponent<__VLS_PublicProps_3, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
778
+ export declare const TypeNameAuthority: DefineComponent<__VLS_PublicProps_4, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
733
779
  "update:modelValue": (value: KeepNameTypesFrom) => any;
734
- }, string, PublicProps, Readonly<__VLS_PublicProps_3> & Readonly<{
780
+ }, string, PublicProps, Readonly<__VLS_PublicProps_4> & Readonly<{
735
781
  "onUpdate:modelValue"?: ((value: KeepNameTypesFrom) => any) | undefined;
736
782
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
737
783
 
@@ -743,14 +789,21 @@ export declare type UnifiedDiff = {
743
789
  };
744
790
 
745
791
  /**
746
- * Reactively hydrate the shell's active document — race-safe across realms.
792
+ * Reactively resolve the shell's active document — race-safe across realms.
747
793
  *
748
794
  * The active-document id (shell `localStorage` `storage` event) and the
749
795
  * project's document registry (BroadcastChannel) are not ordered across realms,
750
796
  * so in an iframe extension the id can arrive before the document is registered
751
797
  * / 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.
798
+ * realm's store against persisted state first, so the exposed document never
799
+ * races ahead of the document. Results from a superseded switch are ignored.
800
+ *
801
+ * The resolved document is returned as a nullable `document` ref (single source
802
+ * of truth); `isReady` is derived from it. When the active id changes, the
803
+ * previous document is dropped *before* the new one's readiness is probed, so a
804
+ * stale document is never exposed for the new id. Consumers should gate on
805
+ * `isReady`/`document` and can pass optional `hydrate`/`clear` callbacks to also
806
+ * mirror the value into a module-level document store.
754
807
  *
755
808
  * Cleanup runs automatically when used inside a component/effect scope; the
756
809
  * returned `stop` lets scope-less callers (e.g. an extension bootstrap) tear it
@@ -759,10 +812,11 @@ export declare type UnifiedDiff = {
759
812
  export declare function useActiveDocument<GenericDocument>(params: {
760
813
  project: ActiveDocumentProject<GenericDocument>;
761
814
  activeDocumentId: ActiveDocumentObservable<string>;
762
- hydrate: (doc: GenericDocument) => void;
763
- clear: () => void;
815
+ hydrate?: (doc: GenericDocument) => void;
816
+ clear?: () => void;
764
817
  }): {
765
- isReady: Ref<boolean>;
818
+ document: Ref<GenericDocument | undefined>;
819
+ isReady: ComputedRef<boolean>;
766
820
  activeDocumentId: Ref<string | undefined>;
767
821
  stop: () => void;
768
822
  };
@@ -796,9 +850,15 @@ export declare function useDialog(): DialogController;
796
850
  * a `commit` message for this documentId — posted by any Document instance,
797
851
  * in this tab or another — re-runs the fetcher. Document state itself is plain,
798
852
  * non-reactive data in core; do not watch it.
853
+ *
854
+ * The document may be absent (`undefined`): the composable then holds `initial`,
855
+ * subscribes to nothing, and starts fetching once a document appears — mirroring
856
+ * {@link useProjectLiveData}. This lets a caller pass a document that is null
857
+ * before hydration or during a teardown/switch without pre-guarding a value
858
+ * that would otherwise throw.
799
859
  */
800
860
  export declare function useLiveData<T>(params: {
801
- document: LiveDataDocument | ComputedRef<LiveDataDocument>;
861
+ document: MaybeRefOrGetter<LiveDataDocument | undefined>;
802
862
  fetcher: () => Promise<T>;
803
863
  initial: T;
804
864
  }): {
@@ -821,6 +881,7 @@ export declare function useMergeSession(params: MergeSessionParams): {
821
881
  previewXml: ShallowRef<string | undefined, string | undefined>;
822
882
  previewBeforeXml: ShallowRef<string | undefined, string | undefined>;
823
883
  previewLoading: ShallowRef<boolean, boolean>;
884
+ warnings: ShallowRef<TemplateUuidWarning[], TemplateUuidWarning[]>;
824
885
  load: () => Promise<void>;
825
886
  setDecision: (groupId: string, action: "accept" | "skip") => void;
826
887
  setValue: (groupId: string, attr: string, value: string) => void;
@@ -850,6 +911,6 @@ export declare function useProjectLiveData<T>(params: {
850
911
  refresh: (delay?: number) => Promise<T | undefined>;
851
912
  };
852
913
 
853
- export declare const XmlDiff: DefineComponent<__VLS_Props_9, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_9> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
914
+ export declare const XmlDiff: DefineComponent<__VLS_Props_10, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_10> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
854
915
 
855
916
  export { }
package/dist/index.js CHANGED
@@ -6,27 +6,28 @@ import "./dialecte/index.js";
6
6
  import a from "./button/button.js";
7
7
  import o from "./dropdown/dropdown.js";
8
8
  import s from "./dropdown/combobox.js";
9
+ import c from "./dropdown/multi-select.js";
9
10
  import "./dropdown/index.js";
10
- import c from "./dialog/dialog.js";
11
- import l from "./dialog/feedback-dialog.js";
12
- import { createDialogHost as u, dialogHostKey as d, provideDialogHost as f, useDialog as p } from "./dialog/use-dialog-host.js";
13
- import m from "./dialog/dialog-host.js";
11
+ import l from "./dialog/dialog.js";
12
+ import u from "./dialog/feedback-dialog.js";
13
+ import { createDialogHost as d, dialogHostKey as f, provideDialogHost as p, useDialog as m } from "./dialog/use-dialog-host.js";
14
+ import h from "./dialog/dialog-host.js";
14
15
  import "./dialog/index.js";
15
- import { CATEGORY_ELEMENTS as h, ELEMENT_TO_COLOR as g } from "./icons/element-color-map.generated.js";
16
- import { ELEMENT_TO_ICON as _ } from "./icons/element-icon-mapper.js";
17
- import { collectExpandableNodeIds as v } from "./explorer/collect-expandable-node-ids.js";
18
- import y from "./explorer/explorer.js";
16
+ import { CATEGORY_ELEMENTS as g, ELEMENT_TO_COLOR as _ } from "./icons/element-color-map.generated.js";
17
+ import { ELEMENT_TO_ICON as v } from "./icons/element-icon-mapper.js";
18
+ import { collectExpandableNodeIds as y } from "./explorer/collect-expandable-node-ids.js";
19
+ import b from "./explorer/explorer.js";
19
20
  import "./explorer/index.js";
20
- import { highlightCode as b } from "./code/highlight.js";
21
- import x from "./code/code-block.js";
22
- import { diffLines as S } from "./code/diff.js";
23
- import C from "./code/xml-diff.js";
21
+ import { highlightCode as x } from "./code/highlight.js";
22
+ import S from "./code/code-block.js";
23
+ import { diffLines as C } from "./code/diff.js";
24
+ import w from "./code/xml-diff.js";
24
25
  import "./code/index.js";
25
- import w from "./merge/decision-toggle.js";
26
- import T from "./merge/element-detail.js";
27
- import E from "./merge/merge-tree.js";
28
- import D from "./merge/type-name-authority.js";
29
- import { useMergeSession as O } from "./merge/use-merge-session.js";
30
- import k from "./merge/merge-review.js";
26
+ import T from "./merge/decision-toggle.js";
27
+ import E from "./merge/element-detail.js";
28
+ import D from "./merge/merge-tree.js";
29
+ import O from "./merge/type-name-authority.js";
30
+ import { useMergeSession as k } from "./merge/use-merge-session.js";
31
+ import A from "./merge/merge-review.js";
31
32
  import "./merge/index.js";
32
- export { a as Button, h as CATEGORY_ELEMENTS, x as CodeBlock, s as Combobox, w as DecisionToggle, c as Dialog, m as DialogHost, o as Dropdown, g as ELEMENT_TO_COLOR, _ as ELEMENT_TO_ICON, T as ElementDetail, l as FeedbackDialog, k as MergeReview, E as MergeTree, y as SclExplorer, D as TypeNameAuthority, C as XmlDiff, v as collectExpandableNodeIds, u as createDialogHost, e as createDocumentStore, d as dialogHostKey, S as diffLines, b as highlightCode, f as provideDialogHost, i as useActiveDocument, t as useDialecteChannel, p as useDialog, n as useLiveData, O as useMergeSession, r as useProjectLiveData };
33
+ export { a as Button, g as CATEGORY_ELEMENTS, S as CodeBlock, s as Combobox, T as DecisionToggle, l as Dialog, h as DialogHost, o as Dropdown, _ as ELEMENT_TO_COLOR, v as ELEMENT_TO_ICON, E as ElementDetail, u as FeedbackDialog, A as MergeReview, D as MergeTree, c as MultiSelect, b as SclExplorer, O as TypeNameAuthority, w as XmlDiff, y as collectExpandableNodeIds, d as createDialogHost, e as createDocumentStore, f as dialogHostKey, C as diffLines, x as highlightCode, p as provideDialogHost, i as useActiveDocument, t as useDialecteChannel, m as useDialog, n as useLiveData, k as useMergeSession, r as useProjectLiveData };
@@ -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"