@design.estate/dees-catalog 5.0.0 → 6.1.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/dist_bundle/bundle.js +526 -134
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.d.ts +7 -2
- package/dist_ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.demo.js +1 -2
- package/dist_ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.js +110 -26
- package/dist_ts_web/elements/00group-harness/dees-harness-session-sidebar/dees-harness-session-sidebar.d.ts +5 -0
- package/dist_ts_web/elements/00group-harness/dees-harness-session-sidebar/dees-harness-session-sidebar.js +287 -66
- package/dist_ts_web/elements/00group-harness/dees-harness-tool-card/dees-harness-tool-card.d.ts +5 -0
- package/dist_ts_web/elements/00group-harness/dees-harness-tool-card/dees-harness-tool-card.js +91 -3
- package/dist_ts_web/elements/00group-harness/dees-harness-tool-card/renderers.js +6 -5
- package/dist_ts_web/elements/00group-harness/harness.styles.js +23 -4
- package/dist_ts_web/elements/00group-harness/interfaces.d.ts +2 -0
- package/package.json +1 -1
- package/readme.md +6 -4
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.demo.ts +0 -1
- package/ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.ts +101 -25
- package/ts_web/elements/00group-harness/dees-harness-session-sidebar/dees-harness-session-sidebar.ts +318 -73
- package/ts_web/elements/00group-harness/dees-harness-tool-card/dees-harness-tool-card.ts +83 -1
- package/ts_web/elements/00group-harness/dees-harness-tool-card/renderers.ts +5 -4
- package/ts_web/elements/00group-harness/harness.styles.ts +22 -3
- package/ts_web/elements/00group-harness/interfaces.ts +2 -0
|
@@ -45,7 +45,7 @@ declare global {
|
|
|
45
45
|
* pinned permission queue, status line, and composer. Owns no business
|
|
46
46
|
* logic — consumers feed `.messages`/`.permissions`/`.status` (and stream
|
|
47
47
|
* through `applyDelta()`), and listen for the bubbling harness-* events
|
|
48
|
-
* from the children
|
|
48
|
+
* from the children.
|
|
49
49
|
*/
|
|
50
50
|
@customElement('dees-harness-chat')
|
|
51
51
|
export class DeesHarnessChat extends DeesElement {
|
|
@@ -109,6 +109,14 @@ export class DeesHarnessChat extends DeesElement {
|
|
|
109
109
|
@state()
|
|
110
110
|
private accessor sessionSidebarOpen: boolean = false;
|
|
111
111
|
|
|
112
|
+
@state()
|
|
113
|
+
private accessor desktopSessionSidebarVisible: boolean = true;
|
|
114
|
+
|
|
115
|
+
@state()
|
|
116
|
+
private accessor narrowSessionLayout: boolean = false;
|
|
117
|
+
|
|
118
|
+
private sessionLayoutResizeObserver: ResizeObserver | undefined;
|
|
119
|
+
|
|
112
120
|
@property()
|
|
113
121
|
accessor heading: string = '';
|
|
114
122
|
|
|
@@ -201,21 +209,32 @@ export class DeesHarnessChat extends DeesElement {
|
|
|
201
209
|
.sessionPanel {
|
|
202
210
|
flex: 0 0 232px;
|
|
203
211
|
min-width: 0;
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
212
|
+
min-height: 0;
|
|
213
|
+
display: flex;
|
|
214
|
+
flex-direction: column;
|
|
215
|
+
overflow: hidden;
|
|
216
|
+
padding: 0;
|
|
208
217
|
border-left: 1px solid var(--dees-color-border-subtle);
|
|
209
218
|
background: var(--dees-color-bg-secondary);
|
|
210
219
|
}
|
|
211
220
|
|
|
221
|
+
.sessionPanel.desktopHidden {
|
|
222
|
+
display: none;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.sessionPanel > dees-harness-session-sidebar {
|
|
226
|
+
flex: 1;
|
|
227
|
+
min-height: 0;
|
|
228
|
+
}
|
|
229
|
+
|
|
212
230
|
.sessionPanelClose,
|
|
213
231
|
.sessionPanelToggle,
|
|
214
232
|
.sessionPanelBackdrop {
|
|
215
233
|
display: none;
|
|
216
234
|
}
|
|
217
235
|
|
|
218
|
-
.sessionPanelToggle
|
|
236
|
+
.sessionPanelToggle,
|
|
237
|
+
.toolbarSessionPanelToggle {
|
|
219
238
|
box-sizing: border-box;
|
|
220
239
|
width: var(--dees-control-height-lg);
|
|
221
240
|
height: var(--dees-control-height-lg);
|
|
@@ -230,11 +249,17 @@ export class DeesHarnessChat extends DeesElement {
|
|
|
230
249
|
cursor: pointer;
|
|
231
250
|
}
|
|
232
251
|
|
|
233
|
-
.
|
|
252
|
+
.toolbarSessionPanelToggle {
|
|
253
|
+
display: flex;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.sessionPanelToggle:hover,
|
|
257
|
+
.toolbarSessionPanelToggle:hover {
|
|
234
258
|
background: var(--dees-color-badge-default-bg);
|
|
235
259
|
}
|
|
236
260
|
|
|
237
|
-
.sessionPanelToggle:focus-visible
|
|
261
|
+
.sessionPanelToggle:focus-visible,
|
|
262
|
+
.toolbarSessionPanelToggle:focus-visible {
|
|
238
263
|
outline: 2px solid var(--dees-color-accent-primary);
|
|
239
264
|
outline-offset: 2px;
|
|
240
265
|
}
|
|
@@ -245,9 +270,10 @@ export class DeesHarnessChat extends DeesElement {
|
|
|
245
270
|
.sessionPanel {
|
|
246
271
|
position: absolute;
|
|
247
272
|
inset: 0 0 0 auto;
|
|
273
|
+
display: flex;
|
|
248
274
|
width: min(320px, calc(100% - 36px));
|
|
249
275
|
max-width: none;
|
|
250
|
-
padding
|
|
276
|
+
padding: 42px 0 0;
|
|
251
277
|
border-left-color: var(--dees-color-border-default);
|
|
252
278
|
box-shadow: var(--dees-shadow-lg);
|
|
253
279
|
visibility: hidden;
|
|
@@ -257,6 +283,10 @@ export class DeesHarnessChat extends DeesElement {
|
|
|
257
283
|
visibility 0s linear var(--dees-transition-default);
|
|
258
284
|
}
|
|
259
285
|
|
|
286
|
+
.sessionPanel.desktopHidden {
|
|
287
|
+
display: flex;
|
|
288
|
+
}
|
|
289
|
+
|
|
260
290
|
.sessionPanel.open {
|
|
261
291
|
visibility: visible;
|
|
262
292
|
transform: translateX(0);
|
|
@@ -412,6 +442,32 @@ export class DeesHarnessChat extends DeesElement {
|
|
|
412
442
|
this.listElement?.scrollToBottom(force);
|
|
413
443
|
}
|
|
414
444
|
|
|
445
|
+
public async connectedCallback(): Promise<void> {
|
|
446
|
+
await super.connectedCallback();
|
|
447
|
+
await this.updateComplete;
|
|
448
|
+
if (!this.isConnected) return;
|
|
449
|
+
this.syncSessionLayout(this.getBoundingClientRect().width);
|
|
450
|
+
this.sessionLayoutResizeObserver?.disconnect();
|
|
451
|
+
this.sessionLayoutResizeObserver = new ResizeObserver((entries) => {
|
|
452
|
+
const entry = entries[0];
|
|
453
|
+
if (entry) this.syncSessionLayout(entry.contentRect.width);
|
|
454
|
+
});
|
|
455
|
+
this.sessionLayoutResizeObserver.observe(this);
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
public async disconnectedCallback(): Promise<void> {
|
|
459
|
+
this.sessionLayoutResizeObserver?.disconnect();
|
|
460
|
+
this.sessionLayoutResizeObserver = undefined;
|
|
461
|
+
await super.disconnectedCallback();
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
private syncSessionLayout(widthArg: number): void {
|
|
465
|
+
const narrow = widthArg <= 680;
|
|
466
|
+
if (narrow === this.narrowSessionLayout) return;
|
|
467
|
+
this.narrowSessionLayout = narrow;
|
|
468
|
+
this.sessionSidebarOpen = false;
|
|
469
|
+
}
|
|
470
|
+
|
|
415
471
|
public get effectiveTodos(): IHarnessTodoItem[] {
|
|
416
472
|
if (this.todos.length) return this.todos;
|
|
417
473
|
// the newest todo call is the current state — an empty write clears
|
|
@@ -446,6 +502,10 @@ export class DeesHarnessChat extends DeesElement {
|
|
|
446
502
|
}
|
|
447
503
|
|
|
448
504
|
private readonly toggleSessionSidebar = (): void => {
|
|
505
|
+
if (!this.narrowSessionLayout) {
|
|
506
|
+
this.desktopSessionSidebarVisible = !this.desktopSessionSidebarVisible;
|
|
507
|
+
return;
|
|
508
|
+
}
|
|
449
509
|
if (this.sessionSidebarOpen) {
|
|
450
510
|
void this.closeSessionSidebar();
|
|
451
511
|
return;
|
|
@@ -464,7 +524,9 @@ export class DeesHarnessChat extends DeesElement {
|
|
|
464
524
|
private async closeSessionSidebar(): Promise<void> {
|
|
465
525
|
this.sessionSidebarOpen = false;
|
|
466
526
|
await this.updateComplete;
|
|
467
|
-
const toggleButton = this.shadowRoot?.querySelector<HTMLButtonElement>(
|
|
527
|
+
const toggleButton = this.shadowRoot?.querySelector<HTMLButtonElement>(
|
|
528
|
+
this.showToolbar ? '.toolbarSessionPanelToggle' : '.sessionPanelToggle',
|
|
529
|
+
);
|
|
468
530
|
toggleButton?.focus();
|
|
469
531
|
}
|
|
470
532
|
|
|
@@ -494,7 +556,7 @@ export class DeesHarnessChat extends DeesElement {
|
|
|
494
556
|
</div>
|
|
495
557
|
`
|
|
496
558
|
: ''}
|
|
497
|
-
${this.hasSessionSidebar ? html`
|
|
559
|
+
${this.hasSessionSidebar && !this.showToolbar ? html`
|
|
498
560
|
<button
|
|
499
561
|
class="sessionPanelToggle"
|
|
500
562
|
type="button"
|
|
@@ -520,11 +582,17 @@ export class DeesHarnessChat extends DeesElement {
|
|
|
520
582
|
></button>
|
|
521
583
|
<aside
|
|
522
584
|
id="harness-session-panel"
|
|
523
|
-
class=${`todosPanel sessionPanel ${this.sessionSidebarOpen ? 'open' : ''}`}
|
|
585
|
+
class=${`todosPanel sessionPanel ${this.sessionSidebarOpen ? 'open' : ''} ${this.desktopSessionSidebarVisible ? '' : 'desktopHidden'}`}
|
|
524
586
|
aria-label="Session details"
|
|
587
|
+
aria-hidden=${String(this.narrowSessionLayout
|
|
588
|
+
? !this.sessionSidebarOpen
|
|
589
|
+
: !this.desktopSessionSidebarVisible)}
|
|
590
|
+
?inert=${this.narrowSessionLayout
|
|
591
|
+
? !this.sessionSidebarOpen
|
|
592
|
+
: !this.desktopSessionSidebarVisible}
|
|
525
593
|
tabindex="-1"
|
|
526
594
|
@keydown=${(event: KeyboardEvent) => {
|
|
527
|
-
if (event.key !== 'Escape') return;
|
|
595
|
+
if (event.key !== 'Escape' || !this.narrowSessionLayout) return;
|
|
528
596
|
event.preventDefault();
|
|
529
597
|
event.stopPropagation();
|
|
530
598
|
void this.closeSessionSidebar();
|
|
@@ -597,20 +665,28 @@ export class DeesHarnessChat extends DeesElement {
|
|
|
597
665
|
</div>
|
|
598
666
|
<div class="toolbarActions">
|
|
599
667
|
<dees-harness-usage compact .usage=${this.usage}></dees-harness-usage>
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
668
|
+
${this.hasSessionSidebar ? html`
|
|
669
|
+
<button
|
|
670
|
+
class="toolbarSessionPanelToggle"
|
|
671
|
+
type="button"
|
|
672
|
+
aria-label="Toggle session details"
|
|
673
|
+
title="Toggle session details"
|
|
674
|
+
aria-expanded=${String(this.narrowSessionLayout
|
|
675
|
+
? this.sessionSidebarOpen
|
|
676
|
+
: this.desktopSessionSidebarVisible)}
|
|
677
|
+
aria-controls="harness-session-panel"
|
|
678
|
+
@click=${this.toggleSessionSidebar}
|
|
679
|
+
>
|
|
680
|
+
<dees-icon
|
|
681
|
+
icon=${this.narrowSessionLayout
|
|
682
|
+
? (this.sessionSidebarOpen ? 'lucide:PanelRightClose' : 'lucide:PanelRightOpen')
|
|
683
|
+
: (this.desktopSessionSidebarVisible ? 'lucide:PanelRightClose' : 'lucide:PanelRightOpen')}
|
|
684
|
+
iconSize="16"
|
|
685
|
+
></dees-icon>
|
|
686
|
+
</button>
|
|
687
|
+
` : ''}
|
|
608
688
|
</div>
|
|
609
689
|
</div>
|
|
610
690
|
`;
|
|
611
691
|
}
|
|
612
|
-
|
|
613
|
-
private emit(name: string): void {
|
|
614
|
-
this.dispatchEvent(new CustomEvent(name, { detail: {}, bubbles: true, composed: true }));
|
|
615
|
-
}
|
|
616
692
|
}
|