@septkit/ui 0.0.60 → 0.0.62

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 (25) hide show
  1. package/dist/diagram-layout/diagram-node-card.js +7 -0
  2. package/dist/diagram-layout/diagram-node-card.vue_vue_type_script_setup_true_lang.js +147 -0
  3. package/dist/diagram-layout/diagram-node-group.js +7 -0
  4. package/dist/diagram-layout/diagram-node-group.vue_vue_type_script_setup_true_lang.js +107 -0
  5. package/dist/diagram-layout/group-geometry.js +7 -0
  6. package/dist/diagram-layout/index.js +7 -4
  7. 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
  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/funnel.js +8 -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/info.js +20 -0
  10. package/dist/index.d.ts +288 -6
  11. package/dist/index.js +18 -8
  12. package/dist/table/column-filter-context.js +13 -0
  13. package/dist/table/filterable-column-header.js +7 -0
  14. package/dist/table/filterable-column-header.vue_vue_type_script_setup_true_lang.js +175 -0
  15. package/dist/table/filters/build-filter-options.js +101 -0
  16. package/dist/table/filters/filter-popover.js +7 -0
  17. package/dist/table/filters/filter-popover.vue_vue_type_script_setup_true_lang.js +169 -0
  18. package/dist/table/filters/filter-tree-node.js +7 -0
  19. package/dist/table/filters/filter-tree-node.vue_vue_type_script_setup_true_lang.js +79 -0
  20. package/dist/table/filters/use-column-filters.js +61 -0
  21. package/dist/table/filters/use-row-sort.js +43 -0
  22. package/dist/table/index.js +7 -0
  23. package/dist/table/row-sort-context.js +11 -0
  24. package/dist/ui.css +1 -1
  25. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -85,13 +85,33 @@ 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_20, {
96
+ focus: () => void | undefined;
97
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
98
+ toggle: (groupId: string) => any;
99
+ keydown: (event: KeyboardEvent) => any;
100
+ }, string, PublicProps, Readonly<__VLS_Props_20> & Readonly<{
101
+ onToggle?: ((groupId: string) => any) | undefined;
102
+ onKeydown?: ((event: KeyboardEvent) => any) | undefined;
103
+ }>, {
104
+ expanded: boolean;
105
+ testId: string;
106
+ tabbable: boolean;
107
+ treeMeta: TreeItemMeta;
108
+ members: GroupMember[];
109
+ expandable: boolean;
110
+ toggleTestId: string;
111
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
112
+ headerEl: HTMLDivElement;
113
+ }, HTMLDivElement>;
114
+
95
115
  declare type __VLS_Props = {
96
116
  color?: 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error';
97
117
  variant?: 'outline' | 'dash' | 'soft' | 'ghost' | 'link';
@@ -146,13 +166,18 @@ declare type __VLS_Props_15 = {
146
166
  };
147
167
 
148
168
  declare type __VLS_Props_16 = {
169
+ columnId: string;
170
+ title: string;
171
+ };
172
+
173
+ declare type __VLS_Props_17 = {
149
174
  x: number;
150
175
  y: number;
151
176
  visible: boolean;
152
177
  items: ContextMenuItem[];
153
178
  };
154
179
 
155
- declare type __VLS_Props_17 = {
180
+ declare type __VLS_Props_18 = {
156
181
  /** Unique key: drives the splitter group's auto-save-id and both panel ids. */
157
182
  persistenceKey: string;
158
183
  showSidebar: boolean;
@@ -165,6 +190,23 @@ declare type __VLS_Props_17 = {
165
190
  maxSize?: number;
166
191
  };
167
192
 
193
+ declare type __VLS_Props_19 = {
194
+ nodeId: string;
195
+ tagName: string;
196
+ label: string;
197
+ hasChildren: boolean;
198
+ isExpanded: boolean;
199
+ width: number;
200
+ height?: number;
201
+ compact?: boolean;
202
+ selected?: boolean;
203
+ childCounts?: NodeChildCount[];
204
+ testId?: string;
205
+ detailsTestId?: string;
206
+ tabbable?: boolean;
207
+ treeMeta?: TreeItemMeta;
208
+ };
209
+
168
210
  declare type __VLS_Props_2 = {
169
211
  /** Trigger color */
170
212
  color?: 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error';
@@ -183,6 +225,24 @@ declare type __VLS_Props_2 = {
183
225
  id?: string;
184
226
  };
185
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
+
186
246
  declare type __VLS_Props_3 = {
187
247
  options: AcceptableValue[];
188
248
  displayValue: (item: AcceptableValue) => string;
@@ -352,6 +412,19 @@ declare function __VLS_template_6(): {
352
412
  rootEl: any;
353
413
  };
354
414
 
415
+ declare function __VLS_template_7(): {
416
+ attrs: Partial<{}>;
417
+ slots: {
418
+ member?(_: {
419
+ member: GroupMember;
420
+ }): any;
421
+ };
422
+ refs: {
423
+ headerEl: HTMLDivElement;
424
+ };
425
+ rootEl: HTMLDivElement;
426
+ };
427
+
355
428
  declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
356
429
 
357
430
  declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
@@ -364,6 +437,8 @@ declare type __VLS_TemplateResult_5 = ReturnType<typeof __VLS_template_5>;
364
437
 
365
438
  declare type __VLS_TemplateResult_6 = ReturnType<typeof __VLS_template_6>;
366
439
 
440
+ declare type __VLS_TemplateResult_7 = ReturnType<typeof __VLS_template_7>;
441
+
367
442
  declare type __VLS_WithTemplateSlots<T, S> = T & {
368
443
  new (): {
369
444
  $slots: S;
@@ -400,6 +475,12 @@ declare type __VLS_WithTemplateSlots_6<T, S> = T & {
400
475
  };
401
476
  };
402
477
 
478
+ declare type __VLS_WithTemplateSlots_7<T, S> = T & {
479
+ new (): {
480
+ $slots: S;
481
+ };
482
+ };
483
+
403
484
  export declare type ActionFn = () => void;
404
485
 
405
486
  /** The component + props + options currently mounted in the host (the "root"). */
@@ -477,6 +558,10 @@ export declare type AttributeAffix = {
477
558
  suffix?: string;
478
559
  };
479
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
+
480
565
  /**
481
566
  * Build the parent→child `RecordWithCache` map and the list of root ids from a
482
567
  * flat record set. Pure: `record.parent` is never mutated — root status is
@@ -492,6 +577,8 @@ export declare function buildRecordCache<TRecord extends LayoutTreeRecord>(recor
492
577
  orphanIds: string[];
493
578
  };
494
579
 
580
+ export declare function buildTreeOptions<T>(rows: readonly T[], getPath: (row: T) => string[]): FilterTreeNode[];
581
+
495
582
  export declare const Button: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
496
583
 
497
584
  export declare const CATEGORY_ELEMENTS: Record<string, string[]>;
@@ -509,9 +596,47 @@ export declare const CodeBlock: DefineComponent<__VLS_Props_9, {}, {}, {}, {}, C
509
596
  */
510
597
  export declare function collectExpandableNodeIds(items: ExplorerNode[]): string[];
511
598
 
599
+ export declare function collectLeafKeys(node: FilterTreeNode | FilterTreeNode[]): Set<string>;
600
+
601
+ export declare function collectParentKeys(node: FilterTreeNode | FilterTreeNode[]): Set<string>;
602
+
512
603
  /** Collect all currently visible node ids (roots + recursively expanded children). */
513
604
  export declare function collectVisibleIds<TRecord extends LayoutTreeRecord>(rootIds: string[], recordMap: RecordMapById<TRecord>): string[];
514
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
+
515
640
  export declare const Combobox: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
516
641
 
517
642
  /**
@@ -532,9 +657,9 @@ export declare type Connection = {
532
657
  target: string;
533
658
  };
534
659
 
535
- export declare const ContextMenu: DefineComponent<__VLS_Props_16, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
660
+ export declare const ContextMenu: DefineComponent<__VLS_Props_17, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
536
661
  close: () => any;
537
- }, string, PublicProps, Readonly<__VLS_Props_16> & Readonly<{
662
+ }, string, PublicProps, Readonly<__VLS_Props_17> & Readonly<{
538
663
  onClose?: (() => any) | undefined;
539
664
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
540
665
 
@@ -634,6 +759,33 @@ export declare type DiagramLayoutOptions<TRecord extends LayoutTreeRecord, TNode
634
759
  toEdge: (context: EdgeMapperContext) => TEdge;
635
760
  };
636
761
 
762
+ export declare const DiagramNodeCard: DefineComponent<__VLS_Props_19, {
763
+ focus: () => void | undefined;
764
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
765
+ select: (nodeId: string) => any;
766
+ "toggle-expand": (nodeId: string) => any;
767
+ keydown: (event: KeyboardEvent) => any;
768
+ "show-details": (nodeId: string) => any;
769
+ }, string, PublicProps, Readonly<__VLS_Props_19> & Readonly<{
770
+ onSelect?: ((nodeId: string) => any) | undefined;
771
+ "onToggle-expand"?: ((nodeId: string) => any) | undefined;
772
+ onKeydown?: ((event: KeyboardEvent) => any) | undefined;
773
+ "onShow-details"?: ((nodeId: string) => any) | undefined;
774
+ }>, {
775
+ height: number;
776
+ compact: boolean;
777
+ selected: boolean;
778
+ childCounts: NodeChildCount[];
779
+ testId: string;
780
+ detailsTestId: string;
781
+ tabbable: boolean;
782
+ treeMeta: TreeItemMeta;
783
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
784
+ rootEl: HTMLDivElement;
785
+ }, HTMLDivElement>;
786
+
787
+ export declare const DiagramNodeGroup: __VLS_WithTemplateSlots_7<typeof __VLS_component_7, __VLS_TemplateResult_7["slots"]>;
788
+
637
789
  /**
638
790
  * Message shapes posted on a dialecte project's BroadcastChannel — the public
639
791
  * event contract of @dialecte/core. Alias of core's `ProjectChannelMessage`
@@ -805,6 +957,48 @@ export declare type FileMeta = {
805
957
  revision: string;
806
958
  };
807
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
+
984
+ /**
985
+ * Collapsed members viewport: tall enough to show at least two member cards
986
+ * fully; extra members overflow (scroll) - a partial card at the bottom is fine.
987
+ */
988
+ export declare const GROUP_COLLAPSED_MEMBERS_HEIGHT: number;
989
+
990
+ /** Group header bar height. Matches the `.group-header` rule in `DiagramNodeGroup`. */
991
+ export declare const GROUP_HEADER_HEIGHT = 34;
992
+
993
+ /** Vertical gap between two member cards. */
994
+ export declare const GROUP_MEMBER_GAP = 12;
995
+
996
+ /** Member card height when it shows child capsules. */
997
+ export declare const GROUP_MEMBER_HEIGHT = 72;
998
+
999
+ /** Member card height with no capsules (icon + title only). */
1000
+ export declare const GROUP_MEMBER_HEIGHT_COMPACT = 48;
1001
+
808
1002
  export declare type GroupLayout = LayoutSize & {
809
1003
  expandable: boolean;
810
1004
  };
@@ -818,6 +1012,18 @@ export declare type GroupMapperContext<TRecord extends LayoutTreeRecord> = {
818
1012
  expandable: boolean;
819
1013
  };
820
1014
 
1015
+ /** A member rendered inside a group container (see `DiagramNodeGroup`). */
1016
+ export declare type GroupMember = {
1017
+ id: string;
1018
+ tagName: string;
1019
+ label: string;
1020
+ hasChildren: boolean;
1021
+ /** Rendered card height (members without child badges are shorter). */
1022
+ height: number;
1023
+ /** Child tally rendered as capsules on the member card. */
1024
+ childCounts?: NodeChildCount[];
1025
+ };
1026
+
821
1027
  export declare type GroupNode = {
822
1028
  id: string;
823
1029
  parentId: string;
@@ -854,8 +1060,9 @@ export declare type GroupStackMetrics = {
854
1060
  * column, so the height is a pure function of the member heights, and a tile is
855
1061
  * expandable exactly when its content does not fit the collapsed viewport.
856
1062
  *
857
- * Padding, header height, scrollbar gutters and per-member card heights stay
858
- * with the consumer - this owns the stacking rule only.
1063
+ * Padding, header height and scrollbar gutters stay with the consumer - this
1064
+ * owns the stacking rule only. Member card heights live in `group-geometry`,
1065
+ * next to the card component that dictates them.
859
1066
  */
860
1067
  export declare function groupStackMetrics(input: GroupStackInput, expanded: boolean): GroupStackMetrics;
861
1068
 
@@ -877,6 +1084,8 @@ export declare function highlightCode(code: string, options?: {
877
1084
 
878
1085
  export declare function isGroupId(id: string): boolean;
879
1086
 
1087
+ export declare const KEY_SEPARATOR = "\0";
1088
+
880
1089
  export declare type LayoutDirection = 'UP' | 'DOWN' | 'LEFT' | 'RIGHT';
881
1090
 
882
1091
  /** A connection between nodes. Arrays mirror ELK's hyperedge model, so a
@@ -982,6 +1191,14 @@ export declare type LiveDataDocument = {
982
1191
 
983
1192
  export declare function makeGroupId(parentId: string, tagName: string): string;
984
1193
 
1194
+ /**
1195
+ * Height of a single member card. Capsule presence - not the record's child
1196
+ * relationship - decides it, because capsules are the only thing the taller
1197
+ * card has room for. Keeping the two in step stops a record whose children are
1198
+ * all filtered out from reserving an empty 72px row.
1199
+ */
1200
+ export declare function memberCardHeight(hasChildCounts: boolean): number;
1201
+
985
1202
  /**
986
1203
  * Per-node metadata the merge tree overlays on an `ExplorerNode` (keyed by node id).
987
1204
  * The tree itself is a plain `ExplorerNode[]`; this side map drives change colour, the
@@ -1064,6 +1281,16 @@ export declare type NavNode = {
1064
1281
  parentId: string | null;
1065
1282
  };
1066
1283
 
1284
+ export declare const NO_VALUE_KEY = "\0no-value";
1285
+
1286
+ /** Child-element tally rendered as capsules on a `DiagramNodeCard`. */
1287
+ export declare type NodeChildCount = {
1288
+ tagName: string;
1289
+ count: number;
1290
+ /** Optional label shown instead of the count (e.g. a single child's name). */
1291
+ label?: string;
1292
+ };
1293
+
1067
1294
  export declare type NodeMapperContext<TRecord extends LayoutTreeRecord> = {
1068
1295
  entry: RecordWithCache<TRecord>;
1069
1296
  position: LayoutPoint;
@@ -1080,9 +1307,13 @@ declare type PropsOf<C extends Component> = C extends new (...args: never[]) =>
1080
1307
  $props: infer P;
1081
1308
  } ? P : Record<string, never>;
1082
1309
 
1310
+ export declare function provideColumnFilterHeader(model: ColumnFilterHeaderModel): void;
1311
+
1083
1312
  /** Create (or adopt) a dialog host and provide it to descendants. Call once at the root. */
1084
1313
  export declare function provideDialogHost(host?: DialogController): DialogController;
1085
1314
 
1315
+ export declare function provideRowSortHeader(model: RowSortHeaderModel): void;
1316
+
1086
1317
  /**
1087
1318
  * Minimal slice of a `Document` consumed by `useDocumentState`: its live `state`
1088
1319
  * plus `subscribe` (the in-realm reactive signal). Structural so the composable
@@ -1101,8 +1332,23 @@ export declare type RecordWithCache<TRecord extends LayoutTreeRecord = LayoutTre
1101
1332
  visibleChildIds: Set<string>;
1102
1333
  };
1103
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
+
1104
1348
  export declare const SclExplorer: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
1105
1349
 
1350
+ export declare type SortDirection = 'asc' | 'desc';
1351
+
1106
1352
  export declare const SplitLayout: __VLS_WithTemplateSlots_6<typeof __VLS_component_6, __VLS_TemplateResult_6["slots"]>;
1107
1353
 
1108
1354
  /** Per-node selection payload: what to preview and (if any) the change it carries. */
@@ -1124,6 +1370,13 @@ declare type StructuralTree = {
1124
1370
  expanded: string[];
1125
1371
  };
1126
1372
 
1373
+ /** ARIA tree position, supplied by the consumer's navigation model. */
1374
+ export declare type TreeItemMeta = {
1375
+ level?: number;
1376
+ setsize?: number;
1377
+ posinset?: number;
1378
+ };
1379
+
1127
1380
  export declare const TypeNameAuthority: DefineComponent<__VLS_PublicProps_4, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1128
1381
  "update:modelValue": (value: KeepNameTypesFrom) => any;
1129
1382
  }, string, PublicProps, Readonly<__VLS_PublicProps_4> & Readonly<{
@@ -1170,6 +1423,22 @@ export declare function useActiveDocument<GenericDocument>(params: {
1170
1423
  stop: () => void;
1171
1424
  };
1172
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
+
1173
1442
  export declare function useDiagramLayout<TRecord extends LayoutTreeRecord, TNode, TEdge>(options: DiagramLayoutOptions<TRecord, TNode, TEdge>): {
1174
1443
  flowNodes: ShallowRef<TNode[], TNode[]>;
1175
1444
  flowEdges: ShallowRef<TEdge[], TEdge[]>;
@@ -1302,6 +1571,8 @@ export declare function useMergeSession(params: MergeSessionParams): {
1302
1571
  commit: () => Promise<void>;
1303
1572
  };
1304
1573
 
1574
+ export declare function useOptionalRowSortContext(): RowSortHeaderModel | undefined;
1575
+
1305
1576
  /**
1306
1577
  * Async data that refetches when anything in the project changes:
1307
1578
  * commits on any document, imports, removals, new documents.
@@ -1320,6 +1591,17 @@ export declare function useProjectLiveData<T>(params: {
1320
1591
  refresh: (delay?: number) => Promise<T | undefined>;
1321
1592
  };
1322
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
+
1323
1605
  /** Options that drive which nodes are initially visible. */
1324
1606
  export declare type VisibilityOptions = {
1325
1607
  expandedNodeIds: Set<string>;
package/dist/index.js CHANGED
@@ -33,14 +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 { computeGroups as V, isGroupId as H, makeGroupId as U } from "./diagram-layout/grouping.js";
43
- import { createElkLayoutEngine as W } from "./diagram-layout/elk-layout-engine.js";
44
- import { useDiagramLayout as G } from "./diagram-layout/use-diagram-layout.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";
45
55
  import "./diagram-layout/index.js";
46
- export { s as Button, y as CATEGORY_ELEMENTS, T as CodeBlock, l as Combobox, P as ContextMenu, O as DecisionToggle, 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, 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, V as computeGroups, p as createDialogHost, e as createDocumentStore, W as createElkLayoutEngine, m as dialogHostKey, E as diffLines, B as groupStackMetrics, z as hideDescendants, w as highlightCode, H as isGroupId, U as makeGroupId, h as provideDialogHost, i as useActiveDocument, G 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 };
@@ -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 };