@septkit/ui 0.0.61 → 0.0.63

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 (29) hide show
  1. package/dist/dialecte/create-document-store.js +3 -3
  2. package/dist/external/.pnpm/{@dialecte_core@0.4.16 → @dialecte_core@0.5.1}/node_modules/@dialecte/core/dist/helpers.js +54 -51
  3. package/dist/external/.pnpm/@dialecte_core@0.5.1/node_modules/@dialecte/core/dist/index.js +3 -0
  4. package/dist/external/.pnpm/{@dialecte_core@0.4.16/node_modules/@dialecte/core/dist/project-nvZv2ie8.js → @dialecte_core@0.5.1/node_modules/@dialecte/core/dist/project-iCKfhRzr.js} +1783 -1747
  5. package/dist/external/.pnpm/{@dialecte_core@0.4.16/node_modules/@dialecte/core/dist/utils-BiEx1x59.js → @dialecte_core@0.5.1/node_modules/@dialecte/core/dist/utils-ERge2irW.js} +47 -25
  6. package/dist/external/.pnpm/@dialecte_scl@0.4.1/node_modules/@dialecte/scl/dist/hooks-CZTZsrpD.js +33955 -0
  7. package/dist/external/.pnpm/{@dialecte_scl@0.3.17 → @dialecte_scl@0.4.1}/node_modules/@dialecte/scl/dist/v2019C1/index.js +3 -3
  8. package/dist/external/.pnpm/@lucide_vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/arrow-up-down.js +22 -0
  9. package/dist/external/.pnpm/@lucide_vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/funnel.js +8 -0
  10. package/dist/index.d.ts +154 -29
  11. package/dist/index.js +18 -11
  12. package/dist/merge/merge-preflight.vue_vue_type_script_setup_true_lang.js +1 -1
  13. package/dist/merge/merge.service.js +2 -2
  14. package/dist/table/column-filter-context.js +13 -0
  15. package/dist/table/filterable-column-header.js +7 -0
  16. package/dist/table/filterable-column-header.vue_vue_type_script_setup_true_lang.js +175 -0
  17. package/dist/table/filters/build-filter-options.js +101 -0
  18. package/dist/table/filters/filter-popover.js +7 -0
  19. package/dist/table/filters/filter-popover.vue_vue_type_script_setup_true_lang.js +169 -0
  20. package/dist/table/filters/filter-tree-node.js +7 -0
  21. package/dist/table/filters/filter-tree-node.vue_vue_type_script_setup_true_lang.js +79 -0
  22. package/dist/table/filters/use-column-filters.js +61 -0
  23. package/dist/table/filters/use-row-sort.js +43 -0
  24. package/dist/table/index.js +7 -0
  25. package/dist/table/row-sort-context.js +11 -0
  26. package/dist/ui.css +1 -1
  27. package/package.json +3 -3
  28. package/dist/external/.pnpm/@dialecte_core@0.4.16/node_modules/@dialecte/core/dist/index.js +0 -3
  29. package/dist/external/.pnpm/@dialecte_scl@0.3.17/node_modules/@dialecte/scl/dist/hooks-BBGXNK0x.js +0 -20045
@@ -1,6 +1,6 @@
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
1
+ import "../../../../../../@dialecte_core@0.5.1/node_modules/@dialecte/core/dist/index.js";
2
+ import { i as e } from "../hooks-CZTZsrpD.js";
3
+ //#region node_modules/.pnpm/@dialecte+scl@0.4.1/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",
@@ -0,0 +1,22 @@
1
+ import e from "../createLucideIcon.js";
2
+ //#region node_modules/.pnpm/@lucide+vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/arrow-up-down.mjs
3
+ var t = [
4
+ ["path", {
5
+ d: "m21 16-4 4-4-4",
6
+ key: "f6ql7i"
7
+ }],
8
+ ["path", {
9
+ d: "M17 20V4",
10
+ key: "1ejh1v"
11
+ }],
12
+ ["path", {
13
+ d: "m3 8 4-4 4 4",
14
+ key: "11wl7u"
15
+ }],
16
+ ["path", {
17
+ d: "M7 4v16",
18
+ key: "1glfcx"
19
+ }]
20
+ ], n = e("arrow-up-down", t);
21
+ //#endregion
22
+ export { t as __iconNode, n as default };
@@ -0,0 +1,8 @@
1
+ import e from "../createLucideIcon.js";
2
+ //#region node_modules/.pnpm/@lucide+vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/funnel.mjs
3
+ var t = [["path", {
4
+ d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",
5
+ key: "sc7q7i"
6
+ }]], n = e("funnel", t);
7
+ //#endregion
8
+ export { t as __iconNode, n as default };
package/dist/index.d.ts CHANGED
@@ -85,19 +85,19 @@ expanded: ExplorerExpandedState;
85
85
  ariaLabel: string;
86
86
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
87
87
 
88
- declare const __VLS_component_6: DefineComponent<__VLS_Props_17, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_17> & Readonly<{}>, {
88
+ declare const __VLS_component_6: DefineComponent<__VLS_Props_18, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_18> & Readonly<{}>, {
89
89
  direction: "horizontal" | "vertical";
90
90
  defaultSize: number;
91
91
  maxSize: number;
92
92
  minSize: number;
93
93
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
94
94
 
95
- declare const __VLS_component_7: DefineComponent<__VLS_Props_19, {
95
+ declare const __VLS_component_7: DefineComponent<__VLS_Props_20, {
96
96
  focus: () => void | undefined;
97
97
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
98
98
  toggle: (groupId: string) => any;
99
99
  keydown: (event: KeyboardEvent) => any;
100
- }, string, PublicProps, Readonly<__VLS_Props_19> & Readonly<{
100
+ }, string, PublicProps, Readonly<__VLS_Props_20> & Readonly<{
101
101
  onToggle?: ((groupId: string) => any) | undefined;
102
102
  onKeydown?: ((event: KeyboardEvent) => any) | undefined;
103
103
  }>, {
@@ -166,13 +166,18 @@ declare type __VLS_Props_15 = {
166
166
  };
167
167
 
168
168
  declare type __VLS_Props_16 = {
169
+ columnId: string;
170
+ title: string;
171
+ };
172
+
173
+ declare type __VLS_Props_17 = {
169
174
  x: number;
170
175
  y: number;
171
176
  visible: boolean;
172
177
  items: ContextMenuItem[];
173
178
  };
174
179
 
175
- declare type __VLS_Props_17 = {
180
+ declare type __VLS_Props_18 = {
176
181
  /** Unique key: drives the splitter group's auto-save-id and both panel ids. */
177
182
  persistenceKey: string;
178
183
  showSidebar: boolean;
@@ -185,7 +190,7 @@ declare type __VLS_Props_17 = {
185
190
  maxSize?: number;
186
191
  };
187
192
 
188
- declare type __VLS_Props_18 = {
193
+ declare type __VLS_Props_19 = {
189
194
  nodeId: string;
190
195
  tagName: string;
191
196
  label: string;
@@ -202,24 +207,6 @@ declare type __VLS_Props_18 = {
202
207
  treeMeta?: TreeItemMeta;
203
208
  };
204
209
 
205
- declare type __VLS_Props_19 = {
206
- groupId: string;
207
- tagName: string;
208
- label: string;
209
- count: number;
210
- width: number;
211
- collapsedMembersHeight: number;
212
- members?: GroupMember[];
213
- expanded?: boolean;
214
- expandable?: boolean;
215
- testId?: string;
216
- toggleTestId?: string;
217
- /** undefined = consumer does not manage focus; no tabindex is rendered.
218
- * true/false = consumer manages a roving tabindex (tabindex 0 / -1). */
219
- tabbable?: boolean;
220
- treeMeta?: TreeItemMeta;
221
- };
222
-
223
210
  declare type __VLS_Props_2 = {
224
211
  /** Trigger color */
225
212
  color?: 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error';
@@ -238,6 +225,24 @@ declare type __VLS_Props_2 = {
238
225
  id?: string;
239
226
  };
240
227
 
228
+ declare type __VLS_Props_20 = {
229
+ groupId: string;
230
+ tagName: string;
231
+ label: string;
232
+ count: number;
233
+ width: number;
234
+ collapsedMembersHeight: number;
235
+ members?: GroupMember[];
236
+ expanded?: boolean;
237
+ expandable?: boolean;
238
+ testId?: string;
239
+ toggleTestId?: string;
240
+ /** undefined = consumer does not manage focus; no tabindex is rendered.
241
+ * true/false = consumer manages a roving tabindex (tabindex 0 / -1). */
242
+ tabbable?: boolean;
243
+ treeMeta?: TreeItemMeta;
244
+ };
245
+
241
246
  declare type __VLS_Props_3 = {
242
247
  options: AcceptableValue[];
243
248
  displayValue: (item: AcceptableValue) => string;
@@ -553,6 +558,10 @@ export declare type AttributeAffix = {
553
558
  suffix?: string;
554
559
  };
555
560
 
561
+ export declare function buildFlatOptions<T>(rows: readonly T[], getValue: (row: T) => string): FilterOption[];
562
+
563
+ export declare function buildMultiValueOptions<T>(rows: readonly T[], getValues: (row: T) => string[], emptyLabel: string): FilterOption[];
564
+
556
565
  /**
557
566
  * Build the parent→child `RecordWithCache` map and the list of root ids from a
558
567
  * flat record set. Pure: `record.parent` is never mutated — root status is
@@ -568,6 +577,8 @@ export declare function buildRecordCache<TRecord extends LayoutTreeRecord>(recor
568
577
  orphanIds: string[];
569
578
  };
570
579
 
580
+ export declare function buildTreeOptions<T>(rows: readonly T[], getPath: (row: T) => string[]): FilterTreeNode[];
581
+
571
582
  export declare const Button: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
572
583
 
573
584
  export declare const CATEGORY_ELEMENTS: Record<string, string[]>;
@@ -585,9 +596,47 @@ export declare const CodeBlock: DefineComponent<__VLS_Props_9, {}, {}, {}, {}, C
585
596
  */
586
597
  export declare function collectExpandableNodeIds(items: ExplorerNode[]): string[];
587
598
 
599
+ export declare function collectLeafKeys(node: FilterTreeNode | FilterTreeNode[]): Set<string>;
600
+
601
+ export declare function collectParentKeys(node: FilterTreeNode | FilterTreeNode[]): Set<string>;
602
+
588
603
  /** Collect all currently visible node ids (roots + recursively expanded children). */
589
604
  export declare function collectVisibleIds<TRecord extends LayoutTreeRecord>(rootIds: string[], recordMap: RecordMapById<TRecord>): string[];
590
605
 
606
+ export declare interface ColumnFilterHeaderModel {
607
+ isColumnActive(columnId: string): boolean;
608
+ getVariant(columnId: string): 'tree' | 'flat' | 'value';
609
+ getSelection(columnId: string): Set<string>;
610
+ getTreeOptions(columnId: string): FilterTreeNode[];
611
+ getFlatOptions(columnId: string): FilterOption[];
612
+ getLanguageOptions(columnId: string): string[];
613
+ getLanguage(columnId: string): string;
614
+ setLanguage(columnId: string, language: string): void;
615
+ expandAllByDefault(columnId: string): boolean;
616
+ apply(columnId: string, keys: Set<string>): void;
617
+ reset(columnId: string): void;
618
+ }
619
+
620
+ export declare interface ColumnFiltersController<TRow, TColId extends string> {
621
+ selections: Record<TColId, FilterSelection>;
622
+ anyActive: ComputedRef<boolean>;
623
+ isColumnActive: (column: TColId) => boolean;
624
+ apply: (column: TColId, keys: Set<string>) => void;
625
+ reset: (column: TColId) => void;
626
+ resetAll: () => void;
627
+ predicate: (row: TRow) => boolean;
628
+ getSelection: (column: TColId) => Set<string>;
629
+ getAllKeys: (column: TColId) => Set<string>;
630
+ }
631
+
632
+ export declare interface ColumnFilterStrategy<TRow> {
633
+ keyUniverse: (rows: readonly TRow[]) => Set<string>;
634
+ openWithAllSelected: boolean;
635
+ matches: (row: TRow, selection: Set<string> | null) => boolean;
636
+ isExtraActive?: () => boolean;
637
+ onReset?: () => void;
638
+ }
639
+
591
640
  export declare const Combobox: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
592
641
 
593
642
  /**
@@ -608,9 +657,9 @@ export declare type Connection = {
608
657
  target: string;
609
658
  };
610
659
 
611
- export declare const ContextMenu: DefineComponent<__VLS_Props_16, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
660
+ export declare const ContextMenu: DefineComponent<__VLS_Props_17, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
612
661
  close: () => any;
613
- }, string, PublicProps, Readonly<__VLS_Props_16> & Readonly<{
662
+ }, string, PublicProps, Readonly<__VLS_Props_17> & Readonly<{
614
663
  onClose?: (() => any) | undefined;
615
664
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
616
665
 
@@ -710,18 +759,18 @@ export declare type DiagramLayoutOptions<TRecord extends LayoutTreeRecord, TNode
710
759
  toEdge: (context: EdgeMapperContext) => TEdge;
711
760
  };
712
761
 
713
- export declare const DiagramNodeCard: DefineComponent<__VLS_Props_18, {
762
+ export declare const DiagramNodeCard: DefineComponent<__VLS_Props_19, {
714
763
  focus: () => void | undefined;
715
764
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
716
765
  select: (nodeId: string) => any;
717
766
  "toggle-expand": (nodeId: string) => any;
718
- "show-details": (nodeId: string) => any;
719
767
  keydown: (event: KeyboardEvent) => any;
720
- }, string, PublicProps, Readonly<__VLS_Props_18> & Readonly<{
768
+ "show-details": (nodeId: string) => any;
769
+ }, string, PublicProps, Readonly<__VLS_Props_19> & Readonly<{
721
770
  onSelect?: ((nodeId: string) => any) | undefined;
722
771
  "onToggle-expand"?: ((nodeId: string) => any) | undefined;
723
- "onShow-details"?: ((nodeId: string) => any) | undefined;
724
772
  onKeydown?: ((event: KeyboardEvent) => any) | undefined;
773
+ "onShow-details"?: ((nodeId: string) => any) | undefined;
725
774
  }>, {
726
775
  height: number;
727
776
  compact: boolean;
@@ -908,6 +957,30 @@ export declare type FileMeta = {
908
957
  revision: string;
909
958
  };
910
959
 
960
+ export declare const FilterableColumnHeader: DefineComponent<__VLS_Props_16, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_16> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
961
+ funnelRef: HTMLButtonElement;
962
+ popoverWrapperRef: HTMLDivElement;
963
+ }, HTMLDivElement>;
964
+
965
+ export declare type FilterOption = {
966
+ key: string;
967
+ label: string;
968
+ };
969
+
970
+ export declare type FilterSelection = Set<string> | null;
971
+
972
+ export declare function filterTree(nodes: FilterTreeNode[], term: string): {
973
+ nodes: FilterTreeNode[];
974
+ expandedKeys: Set<string>;
975
+ };
976
+
977
+ export declare type FilterTreeNode = {
978
+ key: string;
979
+ label: string;
980
+ children: FilterTreeNode[];
981
+ isTerminal?: boolean;
982
+ };
983
+
911
984
  /**
912
985
  * Collapsed members viewport: tall enough to show at least two member cards
913
986
  * fully; extra members overflow (scroll) - a partial card at the bottom is fine.
@@ -1011,6 +1084,8 @@ export declare function highlightCode(code: string, options?: {
1011
1084
 
1012
1085
  export declare function isGroupId(id: string): boolean;
1013
1086
 
1087
+ export declare const KEY_SEPARATOR = "\0";
1088
+
1014
1089
  export declare type LayoutDirection = 'UP' | 'DOWN' | 'LEFT' | 'RIGHT';
1015
1090
 
1016
1091
  /** A connection between nodes. Arrays mirror ELK's hyperedge model, so a
@@ -1206,6 +1281,8 @@ export declare type NavNode = {
1206
1281
  parentId: string | null;
1207
1282
  };
1208
1283
 
1284
+ export declare const NO_VALUE_KEY = "\0no-value";
1285
+
1209
1286
  /** Child-element tally rendered as capsules on a `DiagramNodeCard`. */
1210
1287
  export declare type NodeChildCount = {
1211
1288
  tagName: string;
@@ -1230,9 +1307,13 @@ declare type PropsOf<C extends Component> = C extends new (...args: never[]) =>
1230
1307
  $props: infer P;
1231
1308
  } ? P : Record<string, never>;
1232
1309
 
1310
+ export declare function provideColumnFilterHeader(model: ColumnFilterHeaderModel): void;
1311
+
1233
1312
  /** Create (or adopt) a dialog host and provide it to descendants. Call once at the root. */
1234
1313
  export declare function provideDialogHost(host?: DialogController): DialogController;
1235
1314
 
1315
+ export declare function provideRowSortHeader(model: RowSortHeaderModel): void;
1316
+
1236
1317
  /**
1237
1318
  * Minimal slice of a `Document` consumed by `useDocumentState`: its live `state`
1238
1319
  * plus `subscribe` (the in-realm reactive signal). Structural so the composable
@@ -1251,8 +1332,23 @@ export declare type RecordWithCache<TRecord extends LayoutTreeRecord = LayoutTre
1251
1332
  visibleChildIds: Set<string>;
1252
1333
  };
1253
1334
 
1335
+ export declare interface RowSortController<TRow, TColId extends string> {
1336
+ isSortable: (column: TColId) => boolean;
1337
+ getDirection: (column: TColId) => SortDirection | null;
1338
+ toggle: (column: TColId) => void;
1339
+ apply: (rows: TRow[]) => TRow[];
1340
+ }
1341
+
1342
+ export declare interface RowSortHeaderModel {
1343
+ isSortable(columnId: string): boolean;
1344
+ getDirection(columnId: string): SortDirection | null;
1345
+ toggle(columnId: string): void;
1346
+ }
1347
+
1254
1348
  export declare const SclExplorer: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
1255
1349
 
1350
+ export declare type SortDirection = 'asc' | 'desc';
1351
+
1256
1352
  export declare const SplitLayout: __VLS_WithTemplateSlots_6<typeof __VLS_component_6, __VLS_TemplateResult_6["slots"]>;
1257
1353
 
1258
1354
  /** Per-node selection payload: what to preview and (if any) the change it carries. */
@@ -1327,6 +1423,22 @@ export declare function useActiveDocument<GenericDocument>(params: {
1327
1423
  stop: () => void;
1328
1424
  };
1329
1425
 
1426
+ export declare function useColumnFilterHeaderContext(): ColumnFilterHeaderModel;
1427
+
1428
+ /**
1429
+ * Domain-agnostic per-column filter state combined with AND: a row passes only
1430
+ * when it satisfies every active column. `null` selection means the column is
1431
+ * inactive (no narrowing). All row/column specifics live in the per-column
1432
+ * strategies so both tree/flat and option-list columns share one implementation.
1433
+ */
1434
+ export declare function useColumnFilters<TRow, TColId extends string>(config: UseColumnFiltersConfig<TRow, TColId>): ColumnFiltersController<TRow, TColId>;
1435
+
1436
+ export declare interface UseColumnFiltersConfig<TRow, TColId extends string> {
1437
+ columns: readonly TColId[];
1438
+ rows: Ref<readonly TRow[]>;
1439
+ strategies: Record<TColId, ColumnFilterStrategy<TRow>>;
1440
+ }
1441
+
1330
1442
  export declare function useDiagramLayout<TRecord extends LayoutTreeRecord, TNode, TEdge>(options: DiagramLayoutOptions<TRecord, TNode, TEdge>): {
1331
1443
  flowNodes: ShallowRef<TNode[], TNode[]>;
1332
1444
  flowEdges: ShallowRef<TEdge[], TEdge[]>;
@@ -1459,6 +1571,8 @@ export declare function useMergeSession(params: MergeSessionParams): {
1459
1571
  commit: () => Promise<void>;
1460
1572
  };
1461
1573
 
1574
+ export declare function useOptionalRowSortContext(): RowSortHeaderModel | undefined;
1575
+
1462
1576
  /**
1463
1577
  * Async data that refetches when anything in the project changes:
1464
1578
  * commits on any document, imports, removals, new documents.
@@ -1477,6 +1591,17 @@ export declare function useProjectLiveData<T>(params: {
1477
1591
  refresh: (delay?: number) => Promise<T | undefined>;
1478
1592
  };
1479
1593
 
1594
+ /**
1595
+ * Explicit, user-triggered row sort: rows keep whatever order they already have and
1596
+ * only change when the user clicks a sortable column header. Clicking cycles
1597
+ * asc -> desc -> off (original order).
1598
+ */
1599
+ export declare function useRowSort<TRow, TColId extends string>(config: UseRowSortConfig<TRow, TColId>): RowSortController<TRow, TColId>;
1600
+
1601
+ export declare interface UseRowSortConfig<TRow, TColId extends string> {
1602
+ sortAccessors: Partial<Record<TColId, (row: TRow) => string>>;
1603
+ }
1604
+
1480
1605
  /** Options that drive which nodes are initially visible. */
1481
1606
  export declare type VisibilityOptions = {
1482
1607
  expandedNodeIds: Set<string>;
package/dist/index.js CHANGED
@@ -33,17 +33,24 @@ import j from "./merge/type-name-authority.js";
33
33
  import { useMergeSession as M } from "./merge/use-merge-session.js";
34
34
  import N from "./merge/merge-review.js";
35
35
  import "./merge/index.js";
36
- import P from "./context-menu/context-menu.js";
36
+ import { KEY_SEPARATOR as P, NO_VALUE_KEY as F, buildFlatOptions as I, buildMultiValueOptions as L, buildTreeOptions as R, collectLeafKeys as z, collectParentKeys as B, filterTree as V } from "./table/filters/build-filter-options.js";
37
+ import { useColumnFilters as H } from "./table/filters/use-column-filters.js";
38
+ import { useRowSort as U } from "./table/filters/use-row-sort.js";
39
+ import { provideColumnFilterHeader as W, useColumnFilterHeaderContext as G } from "./table/column-filter-context.js";
40
+ import { provideRowSortHeader as K, useOptionalRowSortContext as q } from "./table/row-sort-context.js";
41
+ import J from "./table/filterable-column-header.js";
42
+ import "./table/index.js";
43
+ import Y from "./context-menu/context-menu.js";
37
44
  import "./context-menu/index.js";
38
- import F from "./split-layout/split-layout.js";
45
+ import X from "./split-layout/split-layout.js";
39
46
  import "./split-layout/index.js";
40
- import { applyInitialVisibility as I, buildRecordCache as L, collectVisibleIds as R, hideDescendants as z } from "./diagram-layout/visibility-model.js";
41
- import { groupStackMetrics as B } from "./diagram-layout/group-stack.js";
42
- import { GROUP_COLLAPSED_MEMBERS_HEIGHT as V, GROUP_HEADER_HEIGHT as H, GROUP_MEMBER_GAP as U, GROUP_MEMBER_HEIGHT as W, GROUP_MEMBER_HEIGHT_COMPACT as G, memberCardHeight as K } from "./diagram-layout/group-geometry.js";
43
- import { computeGroups as q, isGroupId as J, makeGroupId as Y } from "./diagram-layout/grouping.js";
44
- import { createElkLayoutEngine as X } from "./diagram-layout/elk-layout-engine.js";
45
- import { useDiagramLayout as Z } from "./diagram-layout/use-diagram-layout.js";
46
- import Q from "./diagram-layout/diagram-node-card.js";
47
- import $ from "./diagram-layout/diagram-node-group.js";
47
+ import { applyInitialVisibility as Z, buildRecordCache as Q, collectVisibleIds as $, hideDescendants as ee } from "./diagram-layout/visibility-model.js";
48
+ import { groupStackMetrics as te } from "./diagram-layout/group-stack.js";
49
+ import { GROUP_COLLAPSED_MEMBERS_HEIGHT as ne, GROUP_HEADER_HEIGHT as re, GROUP_MEMBER_GAP as ie, GROUP_MEMBER_HEIGHT as ae, GROUP_MEMBER_HEIGHT_COMPACT as oe, memberCardHeight as se } from "./diagram-layout/group-geometry.js";
50
+ import { computeGroups as ce, isGroupId as le, makeGroupId as ue } from "./diagram-layout/grouping.js";
51
+ import { createElkLayoutEngine as de } from "./diagram-layout/elk-layout-engine.js";
52
+ import { useDiagramLayout as fe } from "./diagram-layout/use-diagram-layout.js";
53
+ import pe from "./diagram-layout/diagram-node-card.js";
54
+ import me from "./diagram-layout/diagram-node-group.js";
48
55
  import "./diagram-layout/index.js";
49
- export { s as Button, y as CATEGORY_ELEMENTS, T as CodeBlock, l as Combobox, P as ContextMenu, O as DecisionToggle, Q as DiagramNodeCard, $ as DiagramNodeGroup, d as Dialog, _ as DialogHost, v as DocumentProgressBar, c as Dropdown, b as ELEMENT_TO_COLOR, x as ELEMENT_TO_ICON, k as ElementDetail, f as FeedbackDialog, V as GROUP_COLLAPSED_MEMBERS_HEIGHT, H as GROUP_HEADER_HEIGHT, U as GROUP_MEMBER_GAP, W as GROUP_MEMBER_HEIGHT, G as GROUP_MEMBER_HEIGHT_COMPACT, N as MergeReview, A as MergeTree, u as MultiSelect, C as SclExplorer, F as SplitLayout, j as TypeNameAuthority, D as XmlDiff, I as applyInitialVisibility, L as buildRecordCache, S as collectExpandableNodeIds, R as collectVisibleIds, q as computeGroups, p as createDialogHost, e as createDocumentStore, X as createElkLayoutEngine, m as dialogHostKey, E as diffLines, B as groupStackMetrics, z as hideDescendants, w as highlightCode, J as isGroupId, Y as makeGroupId, K as memberCardHeight, h as provideDialogHost, i as useActiveDocument, Z as useDiagramLayout, t as useDialecteChannel, g as useDialog, a as useDocumentProgress, o as useDocumentState, n as useLiveData, M as useMergeSession, r as useProjectLiveData };
56
+ export { s as Button, y as CATEGORY_ELEMENTS, T as CodeBlock, l as Combobox, Y as ContextMenu, O as DecisionToggle, pe as DiagramNodeCard, me as DiagramNodeGroup, d as Dialog, _ as DialogHost, v as DocumentProgressBar, c as Dropdown, b as ELEMENT_TO_COLOR, x as ELEMENT_TO_ICON, k as ElementDetail, f as FeedbackDialog, J as FilterableColumnHeader, ne as GROUP_COLLAPSED_MEMBERS_HEIGHT, re as GROUP_HEADER_HEIGHT, ie as GROUP_MEMBER_GAP, ae as GROUP_MEMBER_HEIGHT, oe as GROUP_MEMBER_HEIGHT_COMPACT, P as KEY_SEPARATOR, N as MergeReview, A as MergeTree, u as MultiSelect, F as NO_VALUE_KEY, C as SclExplorer, X as SplitLayout, j as TypeNameAuthority, D as XmlDiff, Z as applyInitialVisibility, I as buildFlatOptions, L as buildMultiValueOptions, Q as buildRecordCache, R as buildTreeOptions, S as collectExpandableNodeIds, z as collectLeafKeys, B as collectParentKeys, $ as collectVisibleIds, ce as computeGroups, p as createDialogHost, e as createDocumentStore, de as createElkLayoutEngine, m as dialogHostKey, E as diffLines, V as filterTree, te as groupStackMetrics, ee as hideDescendants, w as highlightCode, le as isGroupId, ue as makeGroupId, se as memberCardHeight, W as provideColumnFilterHeader, h as provideDialogHost, K as provideRowSortHeader, i as useActiveDocument, G as useColumnFilterHeaderContext, H as useColumnFilters, fe as useDiagramLayout, t as useDialecteChannel, g as useDialog, a as useDocumentProgress, o as useDocumentState, n as useLiveData, M as useMergeSession, q as useOptionalRowSortContext, r as useProjectLiveData, U as useRowSort };
@@ -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.17/node_modules/@dialecte/scl/dist/v2019C1/index.js";
2
+ import { TEMPLATE_UUID_WARNING_INFO as t } from "../external/.pnpm/@dialecte_scl@0.4.1/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,5 +1,5 @@
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";
1
+ import { i as e } from "../external/.pnpm/@dialecte_scl@0.4.1/node_modules/@dialecte/scl/dist/hooks-CZTZsrpD.js";
2
+ import "../external/.pnpm/@dialecte_scl@0.4.1/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);
@@ -0,0 +1,13 @@
1
+ import { inject as e, provide as t } from "vue";
2
+ //#region lib/table/column-filter-context.ts
3
+ var n = Symbol("column-filter-header");
4
+ function r(e) {
5
+ t(n, e);
6
+ }
7
+ function i() {
8
+ let t = e(n);
9
+ if (!t) throw Error("useColumnFilterHeaderContext must be used within a provideColumnFilterHeader scope");
10
+ return t;
11
+ }
12
+ //#endregion
13
+ export { r as provideColumnFilterHeader, i as useColumnFilterHeaderContext };
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./filterable-column-header.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region lib/table/filterable-column-header.vue
5
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-7fb9a055"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,175 @@
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/arrow-down.js";
2
+ import t from "../external/.pnpm/@lucide_vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/arrow-up-down.js";
3
+ import n from "../external/.pnpm/@lucide_vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/arrow-up.js";
4
+ import r from "../external/.pnpm/@lucide_vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/funnel.js";
5
+ import i from "../external/.pnpm/@lucide_vue@1.23.0_vue@3.5.39_typescript@5.8.3_/node_modules/@lucide/vue/dist/esm/icons/x.js";
6
+ import { useColumnFilterHeaderContext as a } from "./column-filter-context.js";
7
+ import { useOptionalRowSortContext as o } from "./row-sort-context.js";
8
+ import s from "./filters/filter-popover.js";
9
+ import { Fragment as c, Teleport as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createVNode as h, defineComponent as g, nextTick as _, normalizeClass as v, normalizeStyle as y, onBeforeUnmount as ee, openBlock as b, ref as x, toDisplayString as te, unref as S, watch as C } from "vue";
10
+ //#region lib/table/filterable-column-header.vue?vue&type=script&setup=true&lang.ts
11
+ var ne = { class: "filterable-column-header" }, w = ["title"], T = ["aria-label", "title"], E = [
12
+ "aria-label",
13
+ "aria-pressed",
14
+ "aria-expanded",
15
+ "data-active"
16
+ ], D = ["aria-label", "title"], O = ["aria-label"], k = 14, A = 9, j = 8, M = /*@__PURE__*/ g({
17
+ __name: "filterable-column-header",
18
+ props: {
19
+ columnId: {},
20
+ title: {}
21
+ },
22
+ setup(g) {
23
+ let M = g, N = a(), P = o(), F = u(() => N.getVariant(M.columnId)), I = u(() => N.isColumnActive(M.columnId)), L = x(/* @__PURE__ */ new Set()), R = u(() => F.value === "tree" ? N.getTreeOptions(M.columnId) : []), z = u(() => F.value === "tree" ? [] : N.getFlatOptions(M.columnId)), B = u(() => N.getLanguageOptions(M.columnId)), V = u(() => N.getLanguage(M.columnId)), re = u(() => P?.isSortable(M.columnId) ?? !1), H = u(() => P?.getDirection(M.columnId) ?? null);
24
+ function ie(e) {
25
+ N.setLanguage(M.columnId, e), L.value = N.getSelection(M.columnId);
26
+ }
27
+ let U = x(!1), W = x({
28
+ top: "0px",
29
+ left: "0px"
30
+ }), G = x(null), K = x(null), q = x("bottom"), J = x({ left: "0px" });
31
+ async function ae() {
32
+ L.value = N.getSelection(M.columnId), W.value = {
33
+ top: "-9999px",
34
+ left: "-9999px"
35
+ }, U.value = !0, await _(), Y();
36
+ }
37
+ function Y() {
38
+ let e = K.value, t = G.value;
39
+ if (!e || !t) return;
40
+ let n = e.getBoundingClientRect(), r = t.offsetWidth, i = t.offsetHeight, a = window.visualViewport?.width ?? window.innerWidth, o = window.visualViewport?.height ?? window.innerHeight, s = Math.max(j, a - r - j), c = Math.max(j, o - i - j), l = n.left + n.width / 2, u = n.bottom + A, d = n.top - A - i, f = u > c, p = f ? Math.max(j, d) : u, m = Math.min(Math.max(j, l - r / 2), s);
41
+ q.value = f ? "top" : "bottom";
42
+ let h = Math.min(Math.max(k, l - m - k / 2), r - k * 2);
43
+ J.value = { left: `${h}px` }, W.value = {
44
+ top: `${p}px`,
45
+ left: `${m}px`
46
+ };
47
+ }
48
+ function X() {
49
+ U.value = !1, K.value?.focus();
50
+ }
51
+ function Z(e) {
52
+ e.key === "Escape" && X();
53
+ }
54
+ function oe(e) {
55
+ if (e.key !== "Tab") return;
56
+ let t = G.value?.querySelectorAll("button, input, [tabindex]:not([tabindex=\"-1\"])");
57
+ if (!t?.length) return;
58
+ let n = t[0], r = t[t.length - 1], i = window.document.activeElement;
59
+ e.shiftKey && i === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && i === r && (e.preventDefault(), n.focus());
60
+ }
61
+ C(U, (e) => {
62
+ e ? (window.addEventListener("keydown", Z), window.addEventListener("scroll", Y, !0), window.addEventListener("resize", Y)) : Q();
63
+ });
64
+ function Q() {
65
+ window.removeEventListener("keydown", Z), window.removeEventListener("scroll", Y, !0), window.removeEventListener("resize", Y);
66
+ }
67
+ ee(Q);
68
+ function se(e) {
69
+ N.apply(M.columnId, e), X();
70
+ }
71
+ function ce() {
72
+ N.reset(M.columnId);
73
+ }
74
+ function $() {
75
+ return H.value === "asc" ? `Sorted by ${M.title} ascending, click to sort descending` : H.value === "desc" ? `Sorted by ${M.title} descending, click to clear sorting` : `Sort by ${M.title}`;
76
+ }
77
+ return (a, o) => (b(), p("div", ne, [
78
+ m("span", {
79
+ class: "filterable-column-header__title",
80
+ title: g.title
81
+ }, te(g.title), 9, w),
82
+ re.value ? (b(), p("button", {
83
+ key: 0,
84
+ type: "button",
85
+ class: v(["filterable-column-header__sort", { "filterable-column-header__sort--active": H.value }]),
86
+ "aria-label": $(),
87
+ title: $(),
88
+ "data-testid": "column-sort-trigger",
89
+ onClick: o[0] ||= (e) => S(P)?.toggle(g.columnId)
90
+ }, [H.value === "asc" ? (b(), d(S(n), {
91
+ key: 0,
92
+ size: 14,
93
+ "aria-hidden": "true"
94
+ })) : H.value === "desc" ? (b(), d(S(e), {
95
+ key: 1,
96
+ size: 14,
97
+ "aria-hidden": "true"
98
+ })) : (b(), d(S(t), {
99
+ key: 2,
100
+ size: 14,
101
+ "aria-hidden": "true"
102
+ }))], 10, T)) : f("", !0),
103
+ m("button", {
104
+ ref_key: "funnelRef",
105
+ ref: K,
106
+ type: "button",
107
+ class: v(["filterable-column-header__funnel", { "filterable-column-header__funnel--active": I.value }]),
108
+ "aria-label": `Filter ${g.title}`,
109
+ "aria-pressed": I.value,
110
+ "aria-haspopup": "dialog",
111
+ "aria-expanded": U.value,
112
+ "data-active": I.value,
113
+ "data-testid": "column-filter-trigger",
114
+ onClick: ae
115
+ }, [h(S(r), {
116
+ size: 14,
117
+ "aria-hidden": "true"
118
+ })], 10, E),
119
+ I.value ? (b(), p("button", {
120
+ key: 1,
121
+ type: "button",
122
+ class: "filterable-column-header__reset",
123
+ "aria-label": `Reset ${g.title} filter`,
124
+ title: `Reset ${g.title} filter`,
125
+ "data-testid": "column-filter-reset",
126
+ onClick: ce
127
+ }, [h(S(i), {
128
+ size: 14,
129
+ "aria-hidden": "true"
130
+ })], 8, D)) : f("", !0),
131
+ (b(), d(l, { to: "body" }, [U.value ? (b(), p(c, { key: 0 }, [m("div", {
132
+ class: "filterable-column-header__backdrop",
133
+ onMousedown: X
134
+ }, null, 32), m("div", {
135
+ ref_key: "popoverWrapperRef",
136
+ ref: G,
137
+ role: "dialog",
138
+ "aria-modal": "true",
139
+ "aria-label": `Filter ${g.title}`,
140
+ style: y({
141
+ position: "fixed",
142
+ ...W.value,
143
+ zIndex: 9999
144
+ }),
145
+ onKeydown: oe
146
+ }, [m("div", {
147
+ class: v(["filterable-column-header__arrow", `filterable-column-header__arrow--${q.value}`]),
148
+ style: y(J.value)
149
+ }, null, 6), h(s, {
150
+ title: `Filter ${g.title.toLowerCase()}`,
151
+ variant: F.value,
152
+ "initial-selection": L.value,
153
+ "tree-options": R.value,
154
+ "flat-options": z.value,
155
+ "language-options": B.value,
156
+ language: V.value,
157
+ "expand-all-by-default": S(N).expandAllByDefault(g.columnId),
158
+ onApply: se,
159
+ onCancel: X,
160
+ "onUpdate:language": ie
161
+ }, null, 8, [
162
+ "title",
163
+ "variant",
164
+ "initial-selection",
165
+ "tree-options",
166
+ "flat-options",
167
+ "language-options",
168
+ "language",
169
+ "expand-all-by-default"
170
+ ])], 44, O)], 64)) : f("", !0)]))
171
+ ]));
172
+ }
173
+ });
174
+ //#endregion
175
+ export { M as default };