@design.estate/dees-catalog 4.10.0 → 4.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@design.estate/dees-catalog",
3
- "version": "4.10.0",
3
+ "version": "4.11.0",
4
4
  "private": false,
5
5
  "description": "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.",
6
6
  "main": "dist_ts_web/index.js",
@@ -46,11 +46,11 @@
46
46
  "devDependencies": {
47
47
  "@design.estate/dees-wcctools": "^3.9.2",
48
48
  "@git.zone/tsbuild": "^4.4.2",
49
- "@git.zone/tsbundle": "^2.11.3",
50
- "@git.zone/tstest": "^3.6.7",
49
+ "@git.zone/tsbundle": "^2.11.4",
50
+ "@git.zone/tstest": "^4.0.0",
51
51
  "@git.zone/tswatch": "^3.3.5",
52
52
  "@push.rocks/projectinfo": "^5.1.0",
53
- "@types/node": "^26.1.1"
53
+ "@types/node": "^26.1.2"
54
54
  },
55
55
  "files": [
56
56
  "ts/**/*",
package/readme.md CHANGED
@@ -1863,7 +1863,7 @@ Token usage chip (`in · out · total`, `compact` shows the total only); cache r
1863
1863
 
1864
1864
  Searchable, card-based conversation column for sidebars or a `DeesModal` (`harness-session-select` on click, `harness-session-open` on double-click/Enter). Cards are collapsed by default, expose an independent accessible expansion control, and auto-expand only when an already-rendered session changes from not working to `working: true`. Selection does not affect expansion.
1865
1865
 
1866
- `IHarnessSessionMeta.state` accepts `normal`, `working`, `finished`, `attention`, or `error`; `working` remains an independent activity signal for expansion transitions. With `enableGrouping`, sortable cards can move within and between groups. Dragging opens a full-card drop slot and animates surrounding cards; `harness-session-move` includes both the compatibility `index` and a stable optional `beforeSessionId` anchor. Set `draggable: false` for pinned entries such as terminals. Pass `ungroupedSessionIds` to control the order outside groups; omitted or unknown entries fall back to recency order.
1866
+ `IHarnessSessionMeta.state` accepts `normal`, `working`, `finished`, `attention`, or `error`; `working` remains an independent activity signal for expansion transitions. With `enableGrouping`, sortable cards can move within and between groups. Drag from a card's focusable grip, or use its ArrowUp, ArrowDown, Home, and End keys. Pointer dragging moves a full-card preview, opens a matching drop slot, and animates surrounding cards; `harness-session-move` includes both the compatibility `index` and a stable optional `beforeSessionId` anchor. Set `draggable: false` for pinned entries such as terminals. Pass `ungroupedSessionIds` to control the order outside groups; omitted or unknown entries fall back to recency order.
1867
1867
 
1868
1868
  ---
1869
1869
 
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@design.estate/dees-catalog',
6
- version: '4.10.0',
6
+ version: '4.11.0',
7
7
  description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
8
8
  }
@@ -1,5 +1,9 @@
1
1
  import { html } from '@design.estate/dees-element';
2
- import type { IHarnessSessionMeta } from '../interfaces.js';
2
+ import type {
3
+ IHarnessSessionGroup,
4
+ IHarnessSessionMeta,
5
+ IHarnessSessionMoveDetail,
6
+ } from '../interfaces.js';
3
7
 
4
8
  const demoSessions: IHarnessSessionMeta[] = Array.from({ length: 24 }, (_, index) => ({
5
9
  id: `session-${index}`,
@@ -19,11 +23,34 @@ const demoSessions: IHarnessSessionMeta[] = Array.from({ length: 24 }, (_, index
19
23
  working: index % 5 === 1,
20
24
  }));
21
25
 
22
- const demoGroups = [
26
+ const demoGroups: IHarnessSessionGroup[] = [
23
27
  { id: 'active', name: 'Active work', sessionIds: ['session-0', 'session-1', 'session-2'] },
24
28
  { id: 'review', name: 'Review', sessionIds: ['session-3', 'session-4'] },
25
29
  ];
26
30
 
31
+ type TDemoSessionList = HTMLElement & {
32
+ groups: IHarnessSessionGroup[];
33
+ ungroupedSessionIds: string[];
34
+ };
35
+
36
+ const handleSessionMove = (event: CustomEvent<IHarnessSessionMoveDetail>): void => {
37
+ const list = event.currentTarget as TDemoSessionList;
38
+ const { sessionId, groupId, beforeSessionId } = event.detail;
39
+ const groups = list.groups.map((group) => ({
40
+ ...group,
41
+ sessionIds: group.sessionIds.filter((id) => id !== sessionId),
42
+ }));
43
+ const ungroupedSessionIds = list.ungroupedSessionIds.filter((id) => id !== sessionId);
44
+ const targetIds = groupId === null
45
+ ? ungroupedSessionIds
46
+ : groups.find((group) => group.id === groupId)?.sessionIds;
47
+ if (!targetIds) return;
48
+ const anchorIndex = beforeSessionId ? targetIds.indexOf(beforeSessionId) : -1;
49
+ targetIds.splice(anchorIndex >= 0 ? anchorIndex : targetIds.length, 0, sessionId);
50
+ list.groups = groups;
51
+ list.ungroupedSessionIds = ungroupedSessionIds;
52
+ };
53
+
27
54
  const openModal = async () => {
28
55
  const { DeesModal } = await import('../../00group-overlay/dees-modal/dees-modal.js');
29
56
  const content = document.createElement('dees-harness-session-list');
@@ -43,7 +70,7 @@ export const demoFunc = () => html`
43
70
  <style>
44
71
  .sessionDemo {
45
72
  display: grid;
46
- grid-template-rows: auto minmax(0, 1fr);
73
+ grid-template-rows: auto auto minmax(0, 1fr);
47
74
  gap: 12px;
48
75
  height: 480px;
49
76
  max-width: 420px;
@@ -53,10 +80,15 @@ export const demoFunc = () => html`
53
80
  border: 1px solid var(--dees-color-border-subtle);
54
81
  background: var(--dees-color-bg-secondary);
55
82
  }
83
+ .demoHint {
84
+ color: var(--dees-color-text-secondary);
85
+ font-size: var(--dees-font-caption1-size, 11px);
86
+ }
56
87
  .sessionDemo dees-harness-session-list { min-height: 0; }
57
88
  </style>
58
89
  <div class="sessionDemo">
59
90
  <dees-button @clicked=${openModal}>Open in a DeesModal</dees-button>
91
+ <div class="demoHint">Drag the grip to reorder conversations or move them between groups.</div>
60
92
  <dees-harness-session-list
61
93
  .sessions=${demoSessions}
62
94
  .groups=${demoGroups}
@@ -64,6 +96,7 @@ export const demoFunc = () => html`
64
96
  .enableGrouping=${true}
65
97
  selectedSessionId="session-2"
66
98
  @harness-session-select=${(event: CustomEvent) => console.log('select', event.detail.session)}
99
+ @harness-session-move=${handleSessionMove}
67
100
  ></dees-harness-session-list>
68
101
  </div>
69
102
  `;