@design.estate/dees-catalog 6.5.0 → 6.7.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 +1532 -681
- 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 +3 -0
- package/dist_ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.js +30 -3
- package/dist_ts_web/elements/00group-harness/dees-harness-composer/dees-harness-composer.d.ts +3 -0
- package/dist_ts_web/elements/00group-harness/dees-harness-composer/dees-harness-composer.js +24 -4
- package/dist_ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.d.ts +41 -2
- package/dist_ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.demo.js +100 -2
- package/dist_ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.js +816 -28
- package/dist_ts_web/elements/00group-harness/interfaces.d.ts +56 -0
- package/package.json +1 -1
- package/readme.hints.md +3 -0
- package/readme.md +50 -1
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.ts +17 -1
- package/ts_web/elements/00group-harness/dees-harness-composer/dees-harness-composer.ts +19 -2
- package/ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.demo.ts +123 -1
- package/ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.ts +922 -28
- package/ts_web/elements/00group-harness/interfaces.ts +67 -0
package/dist_bundle/bundle.js
CHANGED
|
@@ -61239,6 +61239,247 @@ var init_plugins4 = __esm({
|
|
|
61239
61239
|
}
|
|
61240
61240
|
});
|
|
61241
61241
|
|
|
61242
|
+
// ts_web/elements/00group-overlay/dees-contextmenu/dees-contextmenu.demo.ts
|
|
61243
|
+
var demoFunc;
|
|
61244
|
+
var init_dees_contextmenu_demo = __esm({
|
|
61245
|
+
"ts_web/elements/00group-overlay/dees-contextmenu/dees-contextmenu.demo.ts"() {
|
|
61246
|
+
init_dist_ts26();
|
|
61247
|
+
init_plugins4();
|
|
61248
|
+
init_dees_contextmenu();
|
|
61249
|
+
demoFunc = /* @__PURE__ */ __name(() => b2`
|
|
61250
|
+
<style>
|
|
61251
|
+
.withMargin {
|
|
61252
|
+
display: block;
|
|
61253
|
+
margin: 20px;
|
|
61254
|
+
}
|
|
61255
|
+
.demo-container {
|
|
61256
|
+
display: flex;
|
|
61257
|
+
flex-direction: column;
|
|
61258
|
+
gap: 20px;
|
|
61259
|
+
padding: 20px;
|
|
61260
|
+
min-height: 400px;
|
|
61261
|
+
}
|
|
61262
|
+
.demo-area {
|
|
61263
|
+
padding: 40px;
|
|
61264
|
+
border-radius: 8px;
|
|
61265
|
+
text-align: center;
|
|
61266
|
+
cursor: context-menu;
|
|
61267
|
+
transition: background 0.2s;
|
|
61268
|
+
}
|
|
61269
|
+
.demo-area:hover {
|
|
61270
|
+
background: rgba(0, 0, 0, 0.02);
|
|
61271
|
+
}
|
|
61272
|
+
</style>
|
|
61273
|
+
<div class="demo-container">
|
|
61274
|
+
<dees-panel heading="Basic Context Menu with Nested Submenus">
|
|
61275
|
+
<div class="demo-area" @contextmenu=${(eventArg) => {
|
|
61276
|
+
DeesContextmenu.openContextMenuWithOptions(eventArg, [
|
|
61277
|
+
{
|
|
61278
|
+
name: "File",
|
|
61279
|
+
iconName: "fileText",
|
|
61280
|
+
action: /* @__PURE__ */ __name(async () => {
|
|
61281
|
+
}, "action"),
|
|
61282
|
+
// Parent items with submenus still need an action
|
|
61283
|
+
submenu: [
|
|
61284
|
+
{ name: "New", iconName: "filePlus", shortcut: "Cmd+N", action: /* @__PURE__ */ __name(async () => console.log("New file"), "action") },
|
|
61285
|
+
{ name: "Open", iconName: "folderOpen", shortcut: "Cmd+O", action: /* @__PURE__ */ __name(async () => console.log("Open file"), "action") },
|
|
61286
|
+
{ name: "Save", iconName: "save", shortcut: "Cmd+S", action: /* @__PURE__ */ __name(async () => console.log("Save"), "action") },
|
|
61287
|
+
{ divider: true },
|
|
61288
|
+
{ name: "Export as PDF", iconName: "download", action: /* @__PURE__ */ __name(async () => console.log("Export PDF"), "action") },
|
|
61289
|
+
{ name: "Export as HTML", iconName: "code", action: /* @__PURE__ */ __name(async () => console.log("Export HTML"), "action") }
|
|
61290
|
+
]
|
|
61291
|
+
},
|
|
61292
|
+
{
|
|
61293
|
+
name: "Edit",
|
|
61294
|
+
iconName: "edit3",
|
|
61295
|
+
action: /* @__PURE__ */ __name(async () => {
|
|
61296
|
+
}, "action"),
|
|
61297
|
+
// Parent items with submenus still need an action
|
|
61298
|
+
submenu: [
|
|
61299
|
+
{ name: "Cut", iconName: "scissors", shortcut: "Cmd+X", action: /* @__PURE__ */ __name(async () => console.log("Cut"), "action") },
|
|
61300
|
+
{ name: "Copy", iconName: "copy", shortcut: "Cmd+C", action: /* @__PURE__ */ __name(async () => console.log("Copy"), "action") },
|
|
61301
|
+
{ name: "Paste", iconName: "clipboard", shortcut: "Cmd+V", action: /* @__PURE__ */ __name(async () => console.log("Paste"), "action") },
|
|
61302
|
+
{ divider: true },
|
|
61303
|
+
{ name: "Find", iconName: "search", shortcut: "Cmd+F", action: /* @__PURE__ */ __name(async () => console.log("Find"), "action") },
|
|
61304
|
+
{ name: "Replace", iconName: "repeat", shortcut: "Cmd+H", action: /* @__PURE__ */ __name(async () => console.log("Replace"), "action") }
|
|
61305
|
+
]
|
|
61306
|
+
},
|
|
61307
|
+
{
|
|
61308
|
+
name: "View",
|
|
61309
|
+
iconName: "eye",
|
|
61310
|
+
action: /* @__PURE__ */ __name(async () => {
|
|
61311
|
+
}, "action"),
|
|
61312
|
+
// Parent items with submenus still need an action
|
|
61313
|
+
submenu: [
|
|
61314
|
+
{ name: "Zoom In", iconName: "zoomIn", shortcut: "Cmd++", action: /* @__PURE__ */ __name(async () => console.log("Zoom in"), "action") },
|
|
61315
|
+
{ name: "Zoom Out", iconName: "zoomOut", shortcut: "Cmd+-", action: /* @__PURE__ */ __name(async () => console.log("Zoom out"), "action") },
|
|
61316
|
+
{ name: "Reset Zoom", iconName: "maximize2", shortcut: "Cmd+0", action: /* @__PURE__ */ __name(async () => console.log("Reset zoom"), "action") },
|
|
61317
|
+
{ divider: true },
|
|
61318
|
+
{ name: "Full Screen", iconName: "maximize", shortcut: "F11", action: /* @__PURE__ */ __name(async () => console.log("Full screen"), "action") }
|
|
61319
|
+
]
|
|
61320
|
+
},
|
|
61321
|
+
{ divider: true },
|
|
61322
|
+
{
|
|
61323
|
+
name: "Settings",
|
|
61324
|
+
iconName: "settings",
|
|
61325
|
+
action: /* @__PURE__ */ __name(async () => console.log("Settings"), "action")
|
|
61326
|
+
},
|
|
61327
|
+
{
|
|
61328
|
+
name: "Help",
|
|
61329
|
+
iconName: "helpCircle",
|
|
61330
|
+
action: /* @__PURE__ */ __name(async () => {
|
|
61331
|
+
}, "action"),
|
|
61332
|
+
// Parent items with submenus still need an action
|
|
61333
|
+
submenu: [
|
|
61334
|
+
{ name: "Documentation", iconName: "book", action: /* @__PURE__ */ __name(async () => console.log("Documentation"), "action") },
|
|
61335
|
+
{ name: "Keyboard Shortcuts", iconName: "keyboard", action: /* @__PURE__ */ __name(async () => console.log("Shortcuts"), "action") },
|
|
61336
|
+
{ divider: true },
|
|
61337
|
+
{ name: "About", iconName: "info", action: /* @__PURE__ */ __name(async () => console.log("About"), "action") }
|
|
61338
|
+
]
|
|
61339
|
+
}
|
|
61340
|
+
]);
|
|
61341
|
+
}}>
|
|
61342
|
+
<h3>Right-click anywhere in this area</h3>
|
|
61343
|
+
<p>A context menu with nested submenus will appear</p>
|
|
61344
|
+
</div>
|
|
61345
|
+
</dees-panel>
|
|
61346
|
+
<dees-panel heading="Component-Specific Context Menu">
|
|
61347
|
+
<dees-button style="margin: 20px;" @contextmenu=${(eventArg) => {
|
|
61348
|
+
DeesContextmenu.openContextMenuWithOptions(eventArg, [
|
|
61349
|
+
{
|
|
61350
|
+
name: "Button Actions",
|
|
61351
|
+
iconName: "mousePointer",
|
|
61352
|
+
action: /* @__PURE__ */ __name(async () => {
|
|
61353
|
+
}, "action"),
|
|
61354
|
+
// Parent items with submenus still need an action
|
|
61355
|
+
submenu: [
|
|
61356
|
+
{ name: "Click", iconName: "mouse", action: /* @__PURE__ */ __name(async () => console.log("Click action"), "action") },
|
|
61357
|
+
{ name: "Double Click", iconName: "zap", action: /* @__PURE__ */ __name(async () => console.log("Double click"), "action") },
|
|
61358
|
+
{ name: "Long Press", iconName: "clock", action: /* @__PURE__ */ __name(async () => console.log("Long press"), "action") }
|
|
61359
|
+
]
|
|
61360
|
+
},
|
|
61361
|
+
{
|
|
61362
|
+
name: "Button State",
|
|
61363
|
+
iconName: "toggleLeft",
|
|
61364
|
+
action: /* @__PURE__ */ __name(async () => {
|
|
61365
|
+
}, "action"),
|
|
61366
|
+
// Parent items with submenus still need an action
|
|
61367
|
+
submenu: [
|
|
61368
|
+
{ name: "Enable", iconName: "checkCircle", action: /* @__PURE__ */ __name(async () => console.log("Enable"), "action") },
|
|
61369
|
+
{ name: "Disable", iconName: "xCircle", action: /* @__PURE__ */ __name(async () => console.log("Disable"), "action") },
|
|
61370
|
+
{ divider: true },
|
|
61371
|
+
{ name: "Show", iconName: "eye", action: /* @__PURE__ */ __name(async () => console.log("Show"), "action") },
|
|
61372
|
+
{ name: "Hide", iconName: "eyeOff", action: /* @__PURE__ */ __name(async () => console.log("Hide"), "action") }
|
|
61373
|
+
]
|
|
61374
|
+
},
|
|
61375
|
+
{ divider: true },
|
|
61376
|
+
{
|
|
61377
|
+
name: "Disabled Action",
|
|
61378
|
+
iconName: "ban",
|
|
61379
|
+
disabled: true,
|
|
61380
|
+
action: /* @__PURE__ */ __name(async () => console.log("This should not run"), "action")
|
|
61381
|
+
},
|
|
61382
|
+
{
|
|
61383
|
+
name: "Properties",
|
|
61384
|
+
iconName: "settings",
|
|
61385
|
+
action: /* @__PURE__ */ __name(async () => console.log("Button properties"), "action")
|
|
61386
|
+
}
|
|
61387
|
+
]);
|
|
61388
|
+
}}>Right-click on this button</dees-button>
|
|
61389
|
+
</dees-panel>
|
|
61390
|
+
|
|
61391
|
+
<dees-panel heading="Advanced Context Menu Example">
|
|
61392
|
+
<div class="demo-area" @contextmenu=${(eventArg) => {
|
|
61393
|
+
DeesContextmenu.openContextMenuWithOptions(eventArg, [
|
|
61394
|
+
{
|
|
61395
|
+
name: "Format",
|
|
61396
|
+
iconName: "type",
|
|
61397
|
+
action: /* @__PURE__ */ __name(async () => {
|
|
61398
|
+
}, "action"),
|
|
61399
|
+
// Parent items with submenus still need an action
|
|
61400
|
+
submenu: [
|
|
61401
|
+
{ name: "Bold", iconName: "bold", shortcut: "Cmd+B", action: /* @__PURE__ */ __name(async () => console.log("Bold"), "action") },
|
|
61402
|
+
{ name: "Italic", iconName: "italic", shortcut: "Cmd+I", action: /* @__PURE__ */ __name(async () => console.log("Italic"), "action") },
|
|
61403
|
+
{ name: "Underline", iconName: "underline", shortcut: "Cmd+U", action: /* @__PURE__ */ __name(async () => console.log("Underline"), "action") },
|
|
61404
|
+
{ divider: true },
|
|
61405
|
+
{ name: "Font Size", iconName: "type", action: /* @__PURE__ */ __name(async () => console.log("Font size menu"), "action") },
|
|
61406
|
+
{ name: "Font Color", iconName: "palette", action: /* @__PURE__ */ __name(async () => console.log("Font color menu"), "action") }
|
|
61407
|
+
]
|
|
61408
|
+
},
|
|
61409
|
+
{
|
|
61410
|
+
name: "Transform",
|
|
61411
|
+
iconName: "shuffle",
|
|
61412
|
+
action: /* @__PURE__ */ __name(async () => {
|
|
61413
|
+
}, "action"),
|
|
61414
|
+
// Parent items with submenus still need an action
|
|
61415
|
+
submenu: [
|
|
61416
|
+
{ name: "To Uppercase", iconName: "arrowUp", action: /* @__PURE__ */ __name(async () => console.log("Uppercase"), "action") },
|
|
61417
|
+
{ name: "To Lowercase", iconName: "arrowDown", action: /* @__PURE__ */ __name(async () => console.log("Lowercase"), "action") },
|
|
61418
|
+
{ name: "Capitalize", iconName: "type", action: /* @__PURE__ */ __name(async () => console.log("Capitalize"), "action") }
|
|
61419
|
+
]
|
|
61420
|
+
},
|
|
61421
|
+
{ divider: true },
|
|
61422
|
+
{
|
|
61423
|
+
name: "Delete",
|
|
61424
|
+
iconName: "trash2",
|
|
61425
|
+
action: /* @__PURE__ */ __name(async () => console.log("Delete"), "action")
|
|
61426
|
+
}
|
|
61427
|
+
]);
|
|
61428
|
+
}}>
|
|
61429
|
+
<h3>Advanced Nested Menu Example</h3>
|
|
61430
|
+
<p>This shows deeply nested submenus and various formatting options</p>
|
|
61431
|
+
</div>
|
|
61432
|
+
</dees-panel>
|
|
61433
|
+
|
|
61434
|
+
<dees-panel heading="Static Context Menu (Always Visible)">
|
|
61435
|
+
<dees-contextmenu
|
|
61436
|
+
class="withMargin"
|
|
61437
|
+
.menuItems=${[
|
|
61438
|
+
{
|
|
61439
|
+
name: "Project",
|
|
61440
|
+
iconName: "folder",
|
|
61441
|
+
action: /* @__PURE__ */ __name(async () => {
|
|
61442
|
+
}, "action"),
|
|
61443
|
+
// Parent items with submenus still need an action
|
|
61444
|
+
submenu: [
|
|
61445
|
+
{ name: "New Project", iconName: "folderPlus", shortcut: "Cmd+Shift+N", action: /* @__PURE__ */ __name(async () => console.log("New project"), "action") },
|
|
61446
|
+
{ name: "Open Project", iconName: "folderOpen", shortcut: "Cmd+Shift+O", action: /* @__PURE__ */ __name(async () => console.log("Open project"), "action") },
|
|
61447
|
+
{ divider: true },
|
|
61448
|
+
{ name: "Recent Projects", iconName: "clock", action: /* @__PURE__ */ __name(async () => {
|
|
61449
|
+
}, "action"), submenu: [
|
|
61450
|
+
{ name: "Project Alpha", action: /* @__PURE__ */ __name(async () => console.log("Open Alpha"), "action") },
|
|
61451
|
+
{ name: "Project Beta", action: /* @__PURE__ */ __name(async () => console.log("Open Beta"), "action") },
|
|
61452
|
+
{ name: "Project Gamma", action: /* @__PURE__ */ __name(async () => console.log("Open Gamma"), "action") }
|
|
61453
|
+
] }
|
|
61454
|
+
]
|
|
61455
|
+
},
|
|
61456
|
+
{
|
|
61457
|
+
name: "Tools",
|
|
61458
|
+
iconName: "tool",
|
|
61459
|
+
action: /* @__PURE__ */ __name(async () => {
|
|
61460
|
+
}, "action"),
|
|
61461
|
+
// Parent items with submenus still need an action
|
|
61462
|
+
submenu: [
|
|
61463
|
+
{ name: "Terminal", iconName: "terminal", shortcut: "Cmd+T", action: /* @__PURE__ */ __name(async () => console.log("Terminal"), "action") },
|
|
61464
|
+
{ name: "Console", iconName: "monitor", shortcut: "Cmd+K", action: /* @__PURE__ */ __name(async () => console.log("Console"), "action") },
|
|
61465
|
+
{ divider: true },
|
|
61466
|
+
{ name: "Extensions", iconName: "package", action: /* @__PURE__ */ __name(async () => console.log("Extensions"), "action") }
|
|
61467
|
+
]
|
|
61468
|
+
},
|
|
61469
|
+
{ divider: true },
|
|
61470
|
+
{
|
|
61471
|
+
name: "Preferences",
|
|
61472
|
+
iconName: "sliders",
|
|
61473
|
+
action: /* @__PURE__ */ __name(async () => console.log("Preferences"), "action")
|
|
61474
|
+
}
|
|
61475
|
+
]}
|
|
61476
|
+
></dees-contextmenu>
|
|
61477
|
+
</dees-panel>
|
|
61478
|
+
</div>
|
|
61479
|
+
`, "demoFunc");
|
|
61480
|
+
}
|
|
61481
|
+
});
|
|
61482
|
+
|
|
61242
61483
|
// ts_web/elements/00group-overlay/dees-windowlayer/dees-windowlayer.ts
|
|
61243
61484
|
var _visible_dec, _contentZIndex_dec, _backdropZIndex_dec, _options_dec, _a, _DeesWindowLayer_decorators, _init, _options, _backdropZIndex, _contentZIndex, _visible, _protectedElements, _protectedSelector, _DeesWindowLayer, DeesWindowLayer;
|
|
61244
61485
|
var init_dees_windowlayer = __esm({
|
|
@@ -94849,6 +95090,400 @@ var init_dees_icon = __esm({
|
|
|
94849
95090
|
}
|
|
94850
95091
|
});
|
|
94851
95092
|
|
|
95093
|
+
// ts_web/elements/00group-overlay/dees-contextmenu/dees-contextmenu.ts
|
|
95094
|
+
var dees_contextmenu_exports = {};
|
|
95095
|
+
__export(dees_contextmenu_exports, {
|
|
95096
|
+
DeesContextmenu: () => DeesContextmenu
|
|
95097
|
+
});
|
|
95098
|
+
var _menuItems_dec, _a3, _DeesContextmenu_decorators, _init3, _menuItems, _DeesContextmenu, DeesContextmenu;
|
|
95099
|
+
var init_dees_contextmenu = __esm({
|
|
95100
|
+
"ts_web/elements/00group-overlay/dees-contextmenu/dees-contextmenu.ts"() {
|
|
95101
|
+
init_plugins4();
|
|
95102
|
+
init_dees_contextmenu_demo();
|
|
95103
|
+
init_dist_ts26();
|
|
95104
|
+
init_dist_ts25();
|
|
95105
|
+
init_dees_windowlayer();
|
|
95106
|
+
init_zindex();
|
|
95107
|
+
init_dees_icon();
|
|
95108
|
+
init_theme();
|
|
95109
|
+
_DeesContextmenu_decorators = [customElement("dees-contextmenu")];
|
|
95110
|
+
_DeesContextmenu = class _DeesContextmenu extends (_a3 = DeesElement, _menuItems_dec = [n5({
|
|
95111
|
+
type: Array
|
|
95112
|
+
})], _a3) {
|
|
95113
|
+
constructor() {
|
|
95114
|
+
super();
|
|
95115
|
+
__privateAdd(this, _menuItems, __runInitializers(_init3, 8, this, [])), __runInitializers(_init3, 11, this);
|
|
95116
|
+
__publicField(this, "windowLayer");
|
|
95117
|
+
__publicField(this, "submenu", null);
|
|
95118
|
+
__publicField(this, "submenuTimeout", null);
|
|
95119
|
+
__publicField(this, "parentMenu", null);
|
|
95120
|
+
__publicField(this, "isDestroying", false);
|
|
95121
|
+
__publicField(this, "handleKeydown", /* @__PURE__ */ __name((event) => {
|
|
95122
|
+
const menuItems = Array.from(this.shadowRoot.querySelectorAll(".menuitem:not(.disabled)"));
|
|
95123
|
+
const currentIndex = menuItems.findIndex((item) => item.matches(":hover"));
|
|
95124
|
+
switch (event.key) {
|
|
95125
|
+
case "ArrowDown":
|
|
95126
|
+
event.preventDefault();
|
|
95127
|
+
const nextIndex = currentIndex + 1 < menuItems.length ? currentIndex + 1 : 0;
|
|
95128
|
+
menuItems[nextIndex].dispatchEvent(new MouseEvent("mouseenter"));
|
|
95129
|
+
break;
|
|
95130
|
+
case "ArrowUp":
|
|
95131
|
+
event.preventDefault();
|
|
95132
|
+
const prevIndex = currentIndex - 1 >= 0 ? currentIndex - 1 : menuItems.length - 1;
|
|
95133
|
+
menuItems[prevIndex].dispatchEvent(new MouseEvent("mouseenter"));
|
|
95134
|
+
break;
|
|
95135
|
+
case "Enter":
|
|
95136
|
+
event.preventDefault();
|
|
95137
|
+
if (currentIndex >= 0) {
|
|
95138
|
+
menuItems[currentIndex].click();
|
|
95139
|
+
}
|
|
95140
|
+
break;
|
|
95141
|
+
case "Escape":
|
|
95142
|
+
event.preventDefault();
|
|
95143
|
+
this.destroy();
|
|
95144
|
+
break;
|
|
95145
|
+
}
|
|
95146
|
+
}, "handleKeydown"));
|
|
95147
|
+
this.tabIndex = 0;
|
|
95148
|
+
}
|
|
95149
|
+
// Add a global event listener for the right-click context menu
|
|
95150
|
+
static initializeGlobalListener() {
|
|
95151
|
+
document.addEventListener("contextmenu", (event) => {
|
|
95152
|
+
if (this.contextMenuDeactivated) {
|
|
95153
|
+
return;
|
|
95154
|
+
}
|
|
95155
|
+
event.preventDefault();
|
|
95156
|
+
_DeesContextmenu.accumulatedMenuItems = [];
|
|
95157
|
+
const path2 = event.composedPath();
|
|
95158
|
+
for (const element4 of path2) {
|
|
95159
|
+
if (element4.getContextMenuItems) {
|
|
95160
|
+
const items = element4.getContextMenuItems();
|
|
95161
|
+
if (items && items.length > 0) {
|
|
95162
|
+
if (_DeesContextmenu.accumulatedMenuItems.length > 0) {
|
|
95163
|
+
_DeesContextmenu.accumulatedMenuItems.push({ divider: true });
|
|
95164
|
+
}
|
|
95165
|
+
_DeesContextmenu.accumulatedMenuItems.push(...items);
|
|
95166
|
+
}
|
|
95167
|
+
}
|
|
95168
|
+
}
|
|
95169
|
+
_DeesContextmenu.openContextMenuWithOptions(event, _DeesContextmenu.accumulatedMenuItems);
|
|
95170
|
+
});
|
|
95171
|
+
}
|
|
95172
|
+
// allows opening of a contextmenu with options
|
|
95173
|
+
static async openContextMenuWithOptions(eventArg, menuItemsArg) {
|
|
95174
|
+
if (this.contextMenuDeactivated) {
|
|
95175
|
+
return;
|
|
95176
|
+
}
|
|
95177
|
+
eventArg.preventDefault();
|
|
95178
|
+
eventArg.stopPropagation();
|
|
95179
|
+
const contextMenu = new _DeesContextmenu();
|
|
95180
|
+
contextMenu.style.position = "fixed";
|
|
95181
|
+
contextMenu.style.zIndex = String(zIndexLayers.overlay.contextMenu);
|
|
95182
|
+
contextMenu.style.visibility = "hidden";
|
|
95183
|
+
contextMenu.menuItems = menuItemsArg;
|
|
95184
|
+
contextMenu.windowLayer = await DeesWindowLayer.createAndShow({ dimmed: false, dismissOnOutsidePress: true });
|
|
95185
|
+
contextMenu.windowLayer.protectedSelector = "dees-contextmenu";
|
|
95186
|
+
contextMenu.windowLayer.addEventListener("click", async (event) => {
|
|
95187
|
+
const clickedElement = event.target;
|
|
95188
|
+
const isContextMenu = clickedElement.closest("dees-contextmenu");
|
|
95189
|
+
if (!isContextMenu) {
|
|
95190
|
+
await contextMenu.destroy();
|
|
95191
|
+
}
|
|
95192
|
+
});
|
|
95193
|
+
document.body.append(contextMenu);
|
|
95194
|
+
await domtools_pluginexports_exports.smartdelay.delayFor(0);
|
|
95195
|
+
const rect = contextMenu.getBoundingClientRect();
|
|
95196
|
+
const windowWidth = window.innerWidth;
|
|
95197
|
+
const windowHeight = window.innerHeight;
|
|
95198
|
+
let top = eventArg.clientY;
|
|
95199
|
+
let left = eventArg.clientX;
|
|
95200
|
+
if (left + rect.width > windowWidth) {
|
|
95201
|
+
left = windowWidth - rect.width - 10;
|
|
95202
|
+
}
|
|
95203
|
+
if (top + rect.height > windowHeight) {
|
|
95204
|
+
top = windowHeight - rect.height - 10;
|
|
95205
|
+
}
|
|
95206
|
+
if (left < 10) left = 10;
|
|
95207
|
+
if (top < 10) top = 10;
|
|
95208
|
+
contextMenu.style.top = `${top}px`;
|
|
95209
|
+
contextMenu.style.left = `${left}px`;
|
|
95210
|
+
contextMenu.style.visibility = "visible";
|
|
95211
|
+
return contextMenu;
|
|
95212
|
+
}
|
|
95213
|
+
render() {
|
|
95214
|
+
return b2`
|
|
95215
|
+
<div class="mainbox">
|
|
95216
|
+
${this.menuItems.map((menuItemArg) => {
|
|
95217
|
+
if ("divider" in menuItemArg && menuItemArg.divider) {
|
|
95218
|
+
return b2`<div class="menu-divider"></div>`;
|
|
95219
|
+
}
|
|
95220
|
+
const menuItem = menuItemArg;
|
|
95221
|
+
const hasSubmenu = menuItem.submenu && menuItem.submenu.length > 0;
|
|
95222
|
+
return b2`
|
|
95223
|
+
<div
|
|
95224
|
+
class="menuitem ${menuItem.disabled ? "disabled" : ""} ${hasSubmenu ? "has-submenu" : ""}"
|
|
95225
|
+
@click=${() => !menuItem.disabled && !hasSubmenu && this.handleClick(menuItem)}
|
|
95226
|
+
@mouseenter=${() => this.handleMenuItemHover(menuItem, hasSubmenu)}
|
|
95227
|
+
@mouseleave=${() => this.handleMenuItemLeave()}
|
|
95228
|
+
>
|
|
95229
|
+
${menuItem.iconName ? b2`
|
|
95230
|
+
<dees-icon .icon="${menuItem.iconName}"></dees-icon>
|
|
95231
|
+
` : ""}
|
|
95232
|
+
<span class="menuitem-text">${menuItem.name}</span>
|
|
95233
|
+
${menuItem.shortcut && !hasSubmenu ? b2`
|
|
95234
|
+
<span class="menuitem-shortcut">${menuItem.shortcut}</span>
|
|
95235
|
+
` : ""}
|
|
95236
|
+
</div>
|
|
95237
|
+
`;
|
|
95238
|
+
})}
|
|
95239
|
+
${this.menuItems.length === 0 ? b2`
|
|
95240
|
+
<div class="menuitem" @click=${() => {
|
|
95241
|
+
_DeesContextmenu.contextMenuDeactivated = true;
|
|
95242
|
+
this.destroy();
|
|
95243
|
+
}}>
|
|
95244
|
+
<dees-icon .icon="lucide:x"></dees-icon>
|
|
95245
|
+
<span class="menuitem-text">Allow native context</span>
|
|
95246
|
+
</div>
|
|
95247
|
+
` : b2``}
|
|
95248
|
+
</div>
|
|
95249
|
+
`;
|
|
95250
|
+
}
|
|
95251
|
+
async firstUpdated() {
|
|
95252
|
+
this.focus();
|
|
95253
|
+
this.addEventListener("keydown", this.handleKeydown);
|
|
95254
|
+
}
|
|
95255
|
+
async handleClick(menuItem) {
|
|
95256
|
+
menuItem.action();
|
|
95257
|
+
await this.destroyAll();
|
|
95258
|
+
}
|
|
95259
|
+
async handleMenuItemHover(menuItem, hasSubmenu) {
|
|
95260
|
+
if (this.submenuTimeout) {
|
|
95261
|
+
clearTimeout(this.submenuTimeout);
|
|
95262
|
+
this.submenuTimeout = null;
|
|
95263
|
+
}
|
|
95264
|
+
if (this.submenu) {
|
|
95265
|
+
await this.hideSubmenu();
|
|
95266
|
+
}
|
|
95267
|
+
if (hasSubmenu && menuItem.submenu) {
|
|
95268
|
+
this.submenuTimeout = setTimeout(() => {
|
|
95269
|
+
this.showSubmenu(menuItem);
|
|
95270
|
+
}, 200);
|
|
95271
|
+
}
|
|
95272
|
+
}
|
|
95273
|
+
handleMenuItemLeave() {
|
|
95274
|
+
if (this.submenuTimeout) {
|
|
95275
|
+
clearTimeout(this.submenuTimeout);
|
|
95276
|
+
}
|
|
95277
|
+
this.submenuTimeout = setTimeout(() => {
|
|
95278
|
+
if (this.submenu && !this.submenu.matches(":hover")) {
|
|
95279
|
+
this.hideSubmenu();
|
|
95280
|
+
}
|
|
95281
|
+
}, 300);
|
|
95282
|
+
}
|
|
95283
|
+
async showSubmenu(menuItem) {
|
|
95284
|
+
if (!menuItem.submenu || menuItem.submenu.length === 0) return;
|
|
95285
|
+
const menuItems = Array.from(this.shadowRoot.querySelectorAll(".menuitem"));
|
|
95286
|
+
const menuItemElement = menuItems.find((el) => el.querySelector(".menuitem-text")?.textContent === menuItem.name);
|
|
95287
|
+
if (!menuItemElement) return;
|
|
95288
|
+
this.submenu = new _DeesContextmenu();
|
|
95289
|
+
this.submenu.menuItems = menuItem.submenu;
|
|
95290
|
+
this.submenu.parentMenu = this;
|
|
95291
|
+
this.submenu.style.position = "fixed";
|
|
95292
|
+
this.submenu.style.zIndex = String(parseInt(this.style.zIndex) + 1);
|
|
95293
|
+
this.submenu.style.opacity = "0";
|
|
95294
|
+
this.submenu.style.transform = "scale(0.95)";
|
|
95295
|
+
document.body.append(this.submenu);
|
|
95296
|
+
await domtools_pluginexports_exports.smartdelay.delayFor(0);
|
|
95297
|
+
const itemRect = menuItemElement.getBoundingClientRect();
|
|
95298
|
+
const menuRect = this.getBoundingClientRect();
|
|
95299
|
+
const submenuRect = this.submenu.getBoundingClientRect();
|
|
95300
|
+
const windowWidth = window.innerWidth;
|
|
95301
|
+
let left = menuRect.right - 4;
|
|
95302
|
+
let top = itemRect.top;
|
|
95303
|
+
if (left + submenuRect.width > windowWidth - 10) {
|
|
95304
|
+
left = menuRect.left - submenuRect.width + 4;
|
|
95305
|
+
}
|
|
95306
|
+
if (top + submenuRect.height > window.innerHeight - 10) {
|
|
95307
|
+
top = window.innerHeight - submenuRect.height - 10;
|
|
95308
|
+
}
|
|
95309
|
+
this.submenu.style.left = `${left}px`;
|
|
95310
|
+
this.submenu.style.top = `${top}px`;
|
|
95311
|
+
await domtools_pluginexports_exports.smartdelay.delayFor(0);
|
|
95312
|
+
this.submenu.style.opacity = "1";
|
|
95313
|
+
this.submenu.style.transform = "scale(1)";
|
|
95314
|
+
this.submenu.addEventListener("mouseenter", () => {
|
|
95315
|
+
if (this.submenuTimeout) {
|
|
95316
|
+
clearTimeout(this.submenuTimeout);
|
|
95317
|
+
this.submenuTimeout = null;
|
|
95318
|
+
}
|
|
95319
|
+
});
|
|
95320
|
+
this.submenu.addEventListener("mouseleave", () => {
|
|
95321
|
+
this.handleMenuItemLeave();
|
|
95322
|
+
});
|
|
95323
|
+
}
|
|
95324
|
+
async hideSubmenu() {
|
|
95325
|
+
if (!this.submenu) return;
|
|
95326
|
+
await this.submenu.destroy();
|
|
95327
|
+
this.submenu = null;
|
|
95328
|
+
}
|
|
95329
|
+
async destroy() {
|
|
95330
|
+
if (this.isDestroying) {
|
|
95331
|
+
return;
|
|
95332
|
+
}
|
|
95333
|
+
this.isDestroying = true;
|
|
95334
|
+
if (this.submenuTimeout) {
|
|
95335
|
+
clearTimeout(this.submenuTimeout);
|
|
95336
|
+
this.submenuTimeout = null;
|
|
95337
|
+
}
|
|
95338
|
+
if (this.submenu) {
|
|
95339
|
+
await this.submenu.destroy();
|
|
95340
|
+
this.submenu = null;
|
|
95341
|
+
}
|
|
95342
|
+
if (this.windowLayer && !this.parentMenu) {
|
|
95343
|
+
this.windowLayer.destroy();
|
|
95344
|
+
}
|
|
95345
|
+
this.style.visibility = "hidden";
|
|
95346
|
+
if (this.parentElement) {
|
|
95347
|
+
this.parentElement.removeChild(this);
|
|
95348
|
+
}
|
|
95349
|
+
}
|
|
95350
|
+
/**
|
|
95351
|
+
* Destroys this menu and all parent menus in the chain
|
|
95352
|
+
*/
|
|
95353
|
+
async destroyAll() {
|
|
95354
|
+
let rootMenu = this;
|
|
95355
|
+
while (rootMenu.parentMenu) {
|
|
95356
|
+
rootMenu = rootMenu.parentMenu;
|
|
95357
|
+
}
|
|
95358
|
+
await rootMenu.destroy();
|
|
95359
|
+
}
|
|
95360
|
+
};
|
|
95361
|
+
_init3 = __decoratorStart(_a3);
|
|
95362
|
+
_menuItems = new WeakMap();
|
|
95363
|
+
__decorateElement(_init3, 4, "menuItems", _menuItems_dec, _DeesContextmenu, _menuItems);
|
|
95364
|
+
_DeesContextmenu = __decorateElement(_init3, 0, "DeesContextmenu", _DeesContextmenu_decorators, _DeesContextmenu);
|
|
95365
|
+
__name(_DeesContextmenu, "DeesContextmenu");
|
|
95366
|
+
// DEMO
|
|
95367
|
+
__publicField(_DeesContextmenu, "demo", demoFunc);
|
|
95368
|
+
__publicField(_DeesContextmenu, "demoGroups", ["Overlay"]);
|
|
95369
|
+
// STATIC
|
|
95370
|
+
// This will store all the accumulated menu items
|
|
95371
|
+
__publicField(_DeesContextmenu, "contextMenuDeactivated", false);
|
|
95372
|
+
__publicField(_DeesContextmenu, "accumulatedMenuItems", []);
|
|
95373
|
+
/**
|
|
95374
|
+
* STATIC STYLES
|
|
95375
|
+
*/
|
|
95376
|
+
__publicField(_DeesContextmenu, "styles", [
|
|
95377
|
+
themeDefaultStyles,
|
|
95378
|
+
cssManager.defaultStyles,
|
|
95379
|
+
i`
|
|
95380
|
+
:host {
|
|
95381
|
+
display: block;
|
|
95382
|
+
transition:
|
|
95383
|
+
opacity var(--dees-transition-default) var(--dees-ease-standard),
|
|
95384
|
+
transform var(--dees-transition-default) var(--dees-ease-standard),
|
|
95385
|
+
left var(--dees-transition-default) var(--dees-ease-spring),
|
|
95386
|
+
top var(--dees-transition-default) var(--dees-ease-spring);
|
|
95387
|
+
outline: none;
|
|
95388
|
+
}
|
|
95389
|
+
|
|
95390
|
+
.mainbox {
|
|
95391
|
+
min-width: 200px;
|
|
95392
|
+
max-width: 280px;
|
|
95393
|
+
background: var(--dees-material-regular-bg);
|
|
95394
|
+
-webkit-backdrop-filter: var(--dees-material-regular-filter);
|
|
95395
|
+
backdrop-filter: var(--dees-material-regular-filter);
|
|
95396
|
+
border: 1px solid var(--dees-color-border-default);
|
|
95397
|
+
border-radius: var(--dees-radius-lg);
|
|
95398
|
+
box-shadow: var(--dees-shadow-lg);
|
|
95399
|
+
user-select: none;
|
|
95400
|
+
padding: var(--dees-spacing-xs) 0;
|
|
95401
|
+
font-size: var(--dees-font-control-size-sm);
|
|
95402
|
+
color: var(--dees-color-text-primary);
|
|
95403
|
+
}
|
|
95404
|
+
|
|
95405
|
+
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
|
|
95406
|
+
.mainbox {
|
|
95407
|
+
background: var(--dees-material-regular-bg-opaque);
|
|
95408
|
+
}
|
|
95409
|
+
}
|
|
95410
|
+
|
|
95411
|
+
@media (prefers-reduced-transparency: reduce) {
|
|
95412
|
+
.mainbox {
|
|
95413
|
+
background: var(--dees-material-regular-bg-opaque);
|
|
95414
|
+
-webkit-backdrop-filter: none;
|
|
95415
|
+
backdrop-filter: none;
|
|
95416
|
+
}
|
|
95417
|
+
}
|
|
95418
|
+
|
|
95419
|
+
.menuitem {
|
|
95420
|
+
display: flex;
|
|
95421
|
+
align-items: center;
|
|
95422
|
+
gap: var(--dees-spacing-sm);
|
|
95423
|
+
padding: var(--dees-spacing-sm) var(--dees-spacing-md);
|
|
95424
|
+
cursor: default;
|
|
95425
|
+
transition: background var(--dees-transition-fast) var(--dees-ease-standard);
|
|
95426
|
+
line-height: 1;
|
|
95427
|
+
position: relative;
|
|
95428
|
+
}
|
|
95429
|
+
|
|
95430
|
+
.menuitem:hover {
|
|
95431
|
+
background: var(--dees-color-active);
|
|
95432
|
+
}
|
|
95433
|
+
|
|
95434
|
+
.menuitem.has-submenu::after {
|
|
95435
|
+
content: '›';
|
|
95436
|
+
position: absolute;
|
|
95437
|
+
right: var(--dees-spacing-sm);
|
|
95438
|
+
font-size: 16px;
|
|
95439
|
+
color: var(--dees-color-text-secondary);
|
|
95440
|
+
}
|
|
95441
|
+
|
|
95442
|
+
.menuitem:active:not(.has-submenu) {
|
|
95443
|
+
background: var(--dees-color-pressed);
|
|
95444
|
+
}
|
|
95445
|
+
|
|
95446
|
+
.menuitem.disabled {
|
|
95447
|
+
opacity: 0.5;
|
|
95448
|
+
cursor: not-allowed;
|
|
95449
|
+
pointer-events: none;
|
|
95450
|
+
}
|
|
95451
|
+
|
|
95452
|
+
.menuitem dees-icon {
|
|
95453
|
+
font-size: 14px;
|
|
95454
|
+
color: var(--dees-color-text-secondary);
|
|
95455
|
+
}
|
|
95456
|
+
|
|
95457
|
+
.menuitem-text {
|
|
95458
|
+
flex: 1;
|
|
95459
|
+
}
|
|
95460
|
+
|
|
95461
|
+
.menuitem-shortcut {
|
|
95462
|
+
font-size: var(--dees-font-caption2-size);
|
|
95463
|
+
color: var(--dees-color-text-secondary);
|
|
95464
|
+
margin-left: auto;
|
|
95465
|
+
}
|
|
95466
|
+
|
|
95467
|
+
.menu-divider {
|
|
95468
|
+
height: 1px;
|
|
95469
|
+
background: var(--dees-color-border-default);
|
|
95470
|
+
margin: var(--dees-spacing-xs) 0;
|
|
95471
|
+
}
|
|
95472
|
+
|
|
95473
|
+
@media (prefers-reduced-motion: reduce) {
|
|
95474
|
+
:host,
|
|
95475
|
+
.menuitem {
|
|
95476
|
+
transition: none;
|
|
95477
|
+
}
|
|
95478
|
+
}
|
|
95479
|
+
`
|
|
95480
|
+
]);
|
|
95481
|
+
__runInitializers(_init3, 1, _DeesContextmenu);
|
|
95482
|
+
DeesContextmenu = _DeesContextmenu;
|
|
95483
|
+
DeesContextmenu.initializeGlobalListener();
|
|
95484
|
+
}
|
|
95485
|
+
});
|
|
95486
|
+
|
|
94852
95487
|
// ts_web/elements/00colors.ts
|
|
94853
95488
|
var colors_exports = {};
|
|
94854
95489
|
__export(colors_exports, {
|
|
@@ -121568,626 +122203,6 @@ var init_dees_workspace_terminal = __esm({
|
|
|
121568
122203
|
}
|
|
121569
122204
|
});
|
|
121570
122205
|
|
|
121571
|
-
// ts_web/elements/00group-overlay/dees-contextmenu/dees-contextmenu.demo.ts
|
|
121572
|
-
init_dist_ts26();
|
|
121573
|
-
init_plugins4();
|
|
121574
|
-
var demoFunc = /* @__PURE__ */ __name(() => b2`
|
|
121575
|
-
<style>
|
|
121576
|
-
.withMargin {
|
|
121577
|
-
display: block;
|
|
121578
|
-
margin: 20px;
|
|
121579
|
-
}
|
|
121580
|
-
.demo-container {
|
|
121581
|
-
display: flex;
|
|
121582
|
-
flex-direction: column;
|
|
121583
|
-
gap: 20px;
|
|
121584
|
-
padding: 20px;
|
|
121585
|
-
min-height: 400px;
|
|
121586
|
-
}
|
|
121587
|
-
.demo-area {
|
|
121588
|
-
padding: 40px;
|
|
121589
|
-
border-radius: 8px;
|
|
121590
|
-
text-align: center;
|
|
121591
|
-
cursor: context-menu;
|
|
121592
|
-
transition: background 0.2s;
|
|
121593
|
-
}
|
|
121594
|
-
.demo-area:hover {
|
|
121595
|
-
background: rgba(0, 0, 0, 0.02);
|
|
121596
|
-
}
|
|
121597
|
-
</style>
|
|
121598
|
-
<div class="demo-container">
|
|
121599
|
-
<dees-panel heading="Basic Context Menu with Nested Submenus">
|
|
121600
|
-
<div class="demo-area" @contextmenu=${(eventArg) => {
|
|
121601
|
-
DeesContextmenu.openContextMenuWithOptions(eventArg, [
|
|
121602
|
-
{
|
|
121603
|
-
name: "File",
|
|
121604
|
-
iconName: "fileText",
|
|
121605
|
-
action: /* @__PURE__ */ __name(async () => {
|
|
121606
|
-
}, "action"),
|
|
121607
|
-
// Parent items with submenus still need an action
|
|
121608
|
-
submenu: [
|
|
121609
|
-
{ name: "New", iconName: "filePlus", shortcut: "Cmd+N", action: /* @__PURE__ */ __name(async () => console.log("New file"), "action") },
|
|
121610
|
-
{ name: "Open", iconName: "folderOpen", shortcut: "Cmd+O", action: /* @__PURE__ */ __name(async () => console.log("Open file"), "action") },
|
|
121611
|
-
{ name: "Save", iconName: "save", shortcut: "Cmd+S", action: /* @__PURE__ */ __name(async () => console.log("Save"), "action") },
|
|
121612
|
-
{ divider: true },
|
|
121613
|
-
{ name: "Export as PDF", iconName: "download", action: /* @__PURE__ */ __name(async () => console.log("Export PDF"), "action") },
|
|
121614
|
-
{ name: "Export as HTML", iconName: "code", action: /* @__PURE__ */ __name(async () => console.log("Export HTML"), "action") }
|
|
121615
|
-
]
|
|
121616
|
-
},
|
|
121617
|
-
{
|
|
121618
|
-
name: "Edit",
|
|
121619
|
-
iconName: "edit3",
|
|
121620
|
-
action: /* @__PURE__ */ __name(async () => {
|
|
121621
|
-
}, "action"),
|
|
121622
|
-
// Parent items with submenus still need an action
|
|
121623
|
-
submenu: [
|
|
121624
|
-
{ name: "Cut", iconName: "scissors", shortcut: "Cmd+X", action: /* @__PURE__ */ __name(async () => console.log("Cut"), "action") },
|
|
121625
|
-
{ name: "Copy", iconName: "copy", shortcut: "Cmd+C", action: /* @__PURE__ */ __name(async () => console.log("Copy"), "action") },
|
|
121626
|
-
{ name: "Paste", iconName: "clipboard", shortcut: "Cmd+V", action: /* @__PURE__ */ __name(async () => console.log("Paste"), "action") },
|
|
121627
|
-
{ divider: true },
|
|
121628
|
-
{ name: "Find", iconName: "search", shortcut: "Cmd+F", action: /* @__PURE__ */ __name(async () => console.log("Find"), "action") },
|
|
121629
|
-
{ name: "Replace", iconName: "repeat", shortcut: "Cmd+H", action: /* @__PURE__ */ __name(async () => console.log("Replace"), "action") }
|
|
121630
|
-
]
|
|
121631
|
-
},
|
|
121632
|
-
{
|
|
121633
|
-
name: "View",
|
|
121634
|
-
iconName: "eye",
|
|
121635
|
-
action: /* @__PURE__ */ __name(async () => {
|
|
121636
|
-
}, "action"),
|
|
121637
|
-
// Parent items with submenus still need an action
|
|
121638
|
-
submenu: [
|
|
121639
|
-
{ name: "Zoom In", iconName: "zoomIn", shortcut: "Cmd++", action: /* @__PURE__ */ __name(async () => console.log("Zoom in"), "action") },
|
|
121640
|
-
{ name: "Zoom Out", iconName: "zoomOut", shortcut: "Cmd+-", action: /* @__PURE__ */ __name(async () => console.log("Zoom out"), "action") },
|
|
121641
|
-
{ name: "Reset Zoom", iconName: "maximize2", shortcut: "Cmd+0", action: /* @__PURE__ */ __name(async () => console.log("Reset zoom"), "action") },
|
|
121642
|
-
{ divider: true },
|
|
121643
|
-
{ name: "Full Screen", iconName: "maximize", shortcut: "F11", action: /* @__PURE__ */ __name(async () => console.log("Full screen"), "action") }
|
|
121644
|
-
]
|
|
121645
|
-
},
|
|
121646
|
-
{ divider: true },
|
|
121647
|
-
{
|
|
121648
|
-
name: "Settings",
|
|
121649
|
-
iconName: "settings",
|
|
121650
|
-
action: /* @__PURE__ */ __name(async () => console.log("Settings"), "action")
|
|
121651
|
-
},
|
|
121652
|
-
{
|
|
121653
|
-
name: "Help",
|
|
121654
|
-
iconName: "helpCircle",
|
|
121655
|
-
action: /* @__PURE__ */ __name(async () => {
|
|
121656
|
-
}, "action"),
|
|
121657
|
-
// Parent items with submenus still need an action
|
|
121658
|
-
submenu: [
|
|
121659
|
-
{ name: "Documentation", iconName: "book", action: /* @__PURE__ */ __name(async () => console.log("Documentation"), "action") },
|
|
121660
|
-
{ name: "Keyboard Shortcuts", iconName: "keyboard", action: /* @__PURE__ */ __name(async () => console.log("Shortcuts"), "action") },
|
|
121661
|
-
{ divider: true },
|
|
121662
|
-
{ name: "About", iconName: "info", action: /* @__PURE__ */ __name(async () => console.log("About"), "action") }
|
|
121663
|
-
]
|
|
121664
|
-
}
|
|
121665
|
-
]);
|
|
121666
|
-
}}>
|
|
121667
|
-
<h3>Right-click anywhere in this area</h3>
|
|
121668
|
-
<p>A context menu with nested submenus will appear</p>
|
|
121669
|
-
</div>
|
|
121670
|
-
</dees-panel>
|
|
121671
|
-
<dees-panel heading="Component-Specific Context Menu">
|
|
121672
|
-
<dees-button style="margin: 20px;" @contextmenu=${(eventArg) => {
|
|
121673
|
-
DeesContextmenu.openContextMenuWithOptions(eventArg, [
|
|
121674
|
-
{
|
|
121675
|
-
name: "Button Actions",
|
|
121676
|
-
iconName: "mousePointer",
|
|
121677
|
-
action: /* @__PURE__ */ __name(async () => {
|
|
121678
|
-
}, "action"),
|
|
121679
|
-
// Parent items with submenus still need an action
|
|
121680
|
-
submenu: [
|
|
121681
|
-
{ name: "Click", iconName: "mouse", action: /* @__PURE__ */ __name(async () => console.log("Click action"), "action") },
|
|
121682
|
-
{ name: "Double Click", iconName: "zap", action: /* @__PURE__ */ __name(async () => console.log("Double click"), "action") },
|
|
121683
|
-
{ name: "Long Press", iconName: "clock", action: /* @__PURE__ */ __name(async () => console.log("Long press"), "action") }
|
|
121684
|
-
]
|
|
121685
|
-
},
|
|
121686
|
-
{
|
|
121687
|
-
name: "Button State",
|
|
121688
|
-
iconName: "toggleLeft",
|
|
121689
|
-
action: /* @__PURE__ */ __name(async () => {
|
|
121690
|
-
}, "action"),
|
|
121691
|
-
// Parent items with submenus still need an action
|
|
121692
|
-
submenu: [
|
|
121693
|
-
{ name: "Enable", iconName: "checkCircle", action: /* @__PURE__ */ __name(async () => console.log("Enable"), "action") },
|
|
121694
|
-
{ name: "Disable", iconName: "xCircle", action: /* @__PURE__ */ __name(async () => console.log("Disable"), "action") },
|
|
121695
|
-
{ divider: true },
|
|
121696
|
-
{ name: "Show", iconName: "eye", action: /* @__PURE__ */ __name(async () => console.log("Show"), "action") },
|
|
121697
|
-
{ name: "Hide", iconName: "eyeOff", action: /* @__PURE__ */ __name(async () => console.log("Hide"), "action") }
|
|
121698
|
-
]
|
|
121699
|
-
},
|
|
121700
|
-
{ divider: true },
|
|
121701
|
-
{
|
|
121702
|
-
name: "Disabled Action",
|
|
121703
|
-
iconName: "ban",
|
|
121704
|
-
disabled: true,
|
|
121705
|
-
action: /* @__PURE__ */ __name(async () => console.log("This should not run"), "action")
|
|
121706
|
-
},
|
|
121707
|
-
{
|
|
121708
|
-
name: "Properties",
|
|
121709
|
-
iconName: "settings",
|
|
121710
|
-
action: /* @__PURE__ */ __name(async () => console.log("Button properties"), "action")
|
|
121711
|
-
}
|
|
121712
|
-
]);
|
|
121713
|
-
}}>Right-click on this button</dees-button>
|
|
121714
|
-
</dees-panel>
|
|
121715
|
-
|
|
121716
|
-
<dees-panel heading="Advanced Context Menu Example">
|
|
121717
|
-
<div class="demo-area" @contextmenu=${(eventArg) => {
|
|
121718
|
-
DeesContextmenu.openContextMenuWithOptions(eventArg, [
|
|
121719
|
-
{
|
|
121720
|
-
name: "Format",
|
|
121721
|
-
iconName: "type",
|
|
121722
|
-
action: /* @__PURE__ */ __name(async () => {
|
|
121723
|
-
}, "action"),
|
|
121724
|
-
// Parent items with submenus still need an action
|
|
121725
|
-
submenu: [
|
|
121726
|
-
{ name: "Bold", iconName: "bold", shortcut: "Cmd+B", action: /* @__PURE__ */ __name(async () => console.log("Bold"), "action") },
|
|
121727
|
-
{ name: "Italic", iconName: "italic", shortcut: "Cmd+I", action: /* @__PURE__ */ __name(async () => console.log("Italic"), "action") },
|
|
121728
|
-
{ name: "Underline", iconName: "underline", shortcut: "Cmd+U", action: /* @__PURE__ */ __name(async () => console.log("Underline"), "action") },
|
|
121729
|
-
{ divider: true },
|
|
121730
|
-
{ name: "Font Size", iconName: "type", action: /* @__PURE__ */ __name(async () => console.log("Font size menu"), "action") },
|
|
121731
|
-
{ name: "Font Color", iconName: "palette", action: /* @__PURE__ */ __name(async () => console.log("Font color menu"), "action") }
|
|
121732
|
-
]
|
|
121733
|
-
},
|
|
121734
|
-
{
|
|
121735
|
-
name: "Transform",
|
|
121736
|
-
iconName: "shuffle",
|
|
121737
|
-
action: /* @__PURE__ */ __name(async () => {
|
|
121738
|
-
}, "action"),
|
|
121739
|
-
// Parent items with submenus still need an action
|
|
121740
|
-
submenu: [
|
|
121741
|
-
{ name: "To Uppercase", iconName: "arrowUp", action: /* @__PURE__ */ __name(async () => console.log("Uppercase"), "action") },
|
|
121742
|
-
{ name: "To Lowercase", iconName: "arrowDown", action: /* @__PURE__ */ __name(async () => console.log("Lowercase"), "action") },
|
|
121743
|
-
{ name: "Capitalize", iconName: "type", action: /* @__PURE__ */ __name(async () => console.log("Capitalize"), "action") }
|
|
121744
|
-
]
|
|
121745
|
-
},
|
|
121746
|
-
{ divider: true },
|
|
121747
|
-
{
|
|
121748
|
-
name: "Delete",
|
|
121749
|
-
iconName: "trash2",
|
|
121750
|
-
action: /* @__PURE__ */ __name(async () => console.log("Delete"), "action")
|
|
121751
|
-
}
|
|
121752
|
-
]);
|
|
121753
|
-
}}>
|
|
121754
|
-
<h3>Advanced Nested Menu Example</h3>
|
|
121755
|
-
<p>This shows deeply nested submenus and various formatting options</p>
|
|
121756
|
-
</div>
|
|
121757
|
-
</dees-panel>
|
|
121758
|
-
|
|
121759
|
-
<dees-panel heading="Static Context Menu (Always Visible)">
|
|
121760
|
-
<dees-contextmenu
|
|
121761
|
-
class="withMargin"
|
|
121762
|
-
.menuItems=${[
|
|
121763
|
-
{
|
|
121764
|
-
name: "Project",
|
|
121765
|
-
iconName: "folder",
|
|
121766
|
-
action: /* @__PURE__ */ __name(async () => {
|
|
121767
|
-
}, "action"),
|
|
121768
|
-
// Parent items with submenus still need an action
|
|
121769
|
-
submenu: [
|
|
121770
|
-
{ name: "New Project", iconName: "folderPlus", shortcut: "Cmd+Shift+N", action: /* @__PURE__ */ __name(async () => console.log("New project"), "action") },
|
|
121771
|
-
{ name: "Open Project", iconName: "folderOpen", shortcut: "Cmd+Shift+O", action: /* @__PURE__ */ __name(async () => console.log("Open project"), "action") },
|
|
121772
|
-
{ divider: true },
|
|
121773
|
-
{ name: "Recent Projects", iconName: "clock", action: /* @__PURE__ */ __name(async () => {
|
|
121774
|
-
}, "action"), submenu: [
|
|
121775
|
-
{ name: "Project Alpha", action: /* @__PURE__ */ __name(async () => console.log("Open Alpha"), "action") },
|
|
121776
|
-
{ name: "Project Beta", action: /* @__PURE__ */ __name(async () => console.log("Open Beta"), "action") },
|
|
121777
|
-
{ name: "Project Gamma", action: /* @__PURE__ */ __name(async () => console.log("Open Gamma"), "action") }
|
|
121778
|
-
] }
|
|
121779
|
-
]
|
|
121780
|
-
},
|
|
121781
|
-
{
|
|
121782
|
-
name: "Tools",
|
|
121783
|
-
iconName: "tool",
|
|
121784
|
-
action: /* @__PURE__ */ __name(async () => {
|
|
121785
|
-
}, "action"),
|
|
121786
|
-
// Parent items with submenus still need an action
|
|
121787
|
-
submenu: [
|
|
121788
|
-
{ name: "Terminal", iconName: "terminal", shortcut: "Cmd+T", action: /* @__PURE__ */ __name(async () => console.log("Terminal"), "action") },
|
|
121789
|
-
{ name: "Console", iconName: "monitor", shortcut: "Cmd+K", action: /* @__PURE__ */ __name(async () => console.log("Console"), "action") },
|
|
121790
|
-
{ divider: true },
|
|
121791
|
-
{ name: "Extensions", iconName: "package", action: /* @__PURE__ */ __name(async () => console.log("Extensions"), "action") }
|
|
121792
|
-
]
|
|
121793
|
-
},
|
|
121794
|
-
{ divider: true },
|
|
121795
|
-
{
|
|
121796
|
-
name: "Preferences",
|
|
121797
|
-
iconName: "sliders",
|
|
121798
|
-
action: /* @__PURE__ */ __name(async () => console.log("Preferences"), "action")
|
|
121799
|
-
}
|
|
121800
|
-
]}
|
|
121801
|
-
></dees-contextmenu>
|
|
121802
|
-
</dees-panel>
|
|
121803
|
-
</div>
|
|
121804
|
-
`, "demoFunc");
|
|
121805
|
-
|
|
121806
|
-
// ts_web/elements/00group-overlay/dees-contextmenu/dees-contextmenu.ts
|
|
121807
|
-
init_plugins4();
|
|
121808
|
-
init_dist_ts26();
|
|
121809
|
-
init_dist_ts25();
|
|
121810
|
-
init_dees_windowlayer();
|
|
121811
|
-
init_zindex();
|
|
121812
|
-
init_dees_icon();
|
|
121813
|
-
init_theme();
|
|
121814
|
-
var _menuItems_dec, _a3, _DeesContextmenu_decorators, _init3, _menuItems;
|
|
121815
|
-
_DeesContextmenu_decorators = [customElement("dees-contextmenu")];
|
|
121816
|
-
var _DeesContextmenu = class _DeesContextmenu extends (_a3 = DeesElement, _menuItems_dec = [n5({
|
|
121817
|
-
type: Array
|
|
121818
|
-
})], _a3) {
|
|
121819
|
-
constructor() {
|
|
121820
|
-
super();
|
|
121821
|
-
__privateAdd(this, _menuItems, __runInitializers(_init3, 8, this, [])), __runInitializers(_init3, 11, this);
|
|
121822
|
-
__publicField(this, "windowLayer");
|
|
121823
|
-
__publicField(this, "submenu", null);
|
|
121824
|
-
__publicField(this, "submenuTimeout", null);
|
|
121825
|
-
__publicField(this, "parentMenu", null);
|
|
121826
|
-
__publicField(this, "isDestroying", false);
|
|
121827
|
-
__publicField(this, "handleKeydown", /* @__PURE__ */ __name((event) => {
|
|
121828
|
-
const menuItems = Array.from(this.shadowRoot.querySelectorAll(".menuitem:not(.disabled)"));
|
|
121829
|
-
const currentIndex = menuItems.findIndex((item) => item.matches(":hover"));
|
|
121830
|
-
switch (event.key) {
|
|
121831
|
-
case "ArrowDown":
|
|
121832
|
-
event.preventDefault();
|
|
121833
|
-
const nextIndex = currentIndex + 1 < menuItems.length ? currentIndex + 1 : 0;
|
|
121834
|
-
menuItems[nextIndex].dispatchEvent(new MouseEvent("mouseenter"));
|
|
121835
|
-
break;
|
|
121836
|
-
case "ArrowUp":
|
|
121837
|
-
event.preventDefault();
|
|
121838
|
-
const prevIndex = currentIndex - 1 >= 0 ? currentIndex - 1 : menuItems.length - 1;
|
|
121839
|
-
menuItems[prevIndex].dispatchEvent(new MouseEvent("mouseenter"));
|
|
121840
|
-
break;
|
|
121841
|
-
case "Enter":
|
|
121842
|
-
event.preventDefault();
|
|
121843
|
-
if (currentIndex >= 0) {
|
|
121844
|
-
menuItems[currentIndex].click();
|
|
121845
|
-
}
|
|
121846
|
-
break;
|
|
121847
|
-
case "Escape":
|
|
121848
|
-
event.preventDefault();
|
|
121849
|
-
this.destroy();
|
|
121850
|
-
break;
|
|
121851
|
-
}
|
|
121852
|
-
}, "handleKeydown"));
|
|
121853
|
-
this.tabIndex = 0;
|
|
121854
|
-
}
|
|
121855
|
-
// Add a global event listener for the right-click context menu
|
|
121856
|
-
static initializeGlobalListener() {
|
|
121857
|
-
document.addEventListener("contextmenu", (event) => {
|
|
121858
|
-
if (this.contextMenuDeactivated) {
|
|
121859
|
-
return;
|
|
121860
|
-
}
|
|
121861
|
-
event.preventDefault();
|
|
121862
|
-
_DeesContextmenu.accumulatedMenuItems = [];
|
|
121863
|
-
const path2 = event.composedPath();
|
|
121864
|
-
for (const element4 of path2) {
|
|
121865
|
-
if (element4.getContextMenuItems) {
|
|
121866
|
-
const items = element4.getContextMenuItems();
|
|
121867
|
-
if (items && items.length > 0) {
|
|
121868
|
-
if (_DeesContextmenu.accumulatedMenuItems.length > 0) {
|
|
121869
|
-
_DeesContextmenu.accumulatedMenuItems.push({ divider: true });
|
|
121870
|
-
}
|
|
121871
|
-
_DeesContextmenu.accumulatedMenuItems.push(...items);
|
|
121872
|
-
}
|
|
121873
|
-
}
|
|
121874
|
-
}
|
|
121875
|
-
_DeesContextmenu.openContextMenuWithOptions(event, _DeesContextmenu.accumulatedMenuItems);
|
|
121876
|
-
});
|
|
121877
|
-
}
|
|
121878
|
-
// allows opening of a contextmenu with options
|
|
121879
|
-
static async openContextMenuWithOptions(eventArg, menuItemsArg) {
|
|
121880
|
-
if (this.contextMenuDeactivated) {
|
|
121881
|
-
return;
|
|
121882
|
-
}
|
|
121883
|
-
eventArg.preventDefault();
|
|
121884
|
-
eventArg.stopPropagation();
|
|
121885
|
-
const contextMenu = new _DeesContextmenu();
|
|
121886
|
-
contextMenu.style.position = "fixed";
|
|
121887
|
-
contextMenu.style.zIndex = String(zIndexLayers.overlay.contextMenu);
|
|
121888
|
-
contextMenu.style.visibility = "hidden";
|
|
121889
|
-
contextMenu.menuItems = menuItemsArg;
|
|
121890
|
-
contextMenu.windowLayer = await DeesWindowLayer.createAndShow({ dimmed: false, dismissOnOutsidePress: true });
|
|
121891
|
-
contextMenu.windowLayer.protectedSelector = "dees-contextmenu";
|
|
121892
|
-
contextMenu.windowLayer.addEventListener("click", async (event) => {
|
|
121893
|
-
const clickedElement = event.target;
|
|
121894
|
-
const isContextMenu = clickedElement.closest("dees-contextmenu");
|
|
121895
|
-
if (!isContextMenu) {
|
|
121896
|
-
await contextMenu.destroy();
|
|
121897
|
-
}
|
|
121898
|
-
});
|
|
121899
|
-
document.body.append(contextMenu);
|
|
121900
|
-
await domtools_pluginexports_exports.smartdelay.delayFor(0);
|
|
121901
|
-
const rect = contextMenu.getBoundingClientRect();
|
|
121902
|
-
const windowWidth = window.innerWidth;
|
|
121903
|
-
const windowHeight = window.innerHeight;
|
|
121904
|
-
let top = eventArg.clientY;
|
|
121905
|
-
let left = eventArg.clientX;
|
|
121906
|
-
if (left + rect.width > windowWidth) {
|
|
121907
|
-
left = windowWidth - rect.width - 10;
|
|
121908
|
-
}
|
|
121909
|
-
if (top + rect.height > windowHeight) {
|
|
121910
|
-
top = windowHeight - rect.height - 10;
|
|
121911
|
-
}
|
|
121912
|
-
if (left < 10) left = 10;
|
|
121913
|
-
if (top < 10) top = 10;
|
|
121914
|
-
contextMenu.style.top = `${top}px`;
|
|
121915
|
-
contextMenu.style.left = `${left}px`;
|
|
121916
|
-
contextMenu.style.visibility = "visible";
|
|
121917
|
-
return contextMenu;
|
|
121918
|
-
}
|
|
121919
|
-
render() {
|
|
121920
|
-
return b2`
|
|
121921
|
-
<div class="mainbox">
|
|
121922
|
-
${this.menuItems.map((menuItemArg) => {
|
|
121923
|
-
if ("divider" in menuItemArg && menuItemArg.divider) {
|
|
121924
|
-
return b2`<div class="menu-divider"></div>`;
|
|
121925
|
-
}
|
|
121926
|
-
const menuItem = menuItemArg;
|
|
121927
|
-
const hasSubmenu = menuItem.submenu && menuItem.submenu.length > 0;
|
|
121928
|
-
return b2`
|
|
121929
|
-
<div
|
|
121930
|
-
class="menuitem ${menuItem.disabled ? "disabled" : ""} ${hasSubmenu ? "has-submenu" : ""}"
|
|
121931
|
-
@click=${() => !menuItem.disabled && !hasSubmenu && this.handleClick(menuItem)}
|
|
121932
|
-
@mouseenter=${() => this.handleMenuItemHover(menuItem, hasSubmenu)}
|
|
121933
|
-
@mouseleave=${() => this.handleMenuItemLeave()}
|
|
121934
|
-
>
|
|
121935
|
-
${menuItem.iconName ? b2`
|
|
121936
|
-
<dees-icon .icon="${menuItem.iconName}"></dees-icon>
|
|
121937
|
-
` : ""}
|
|
121938
|
-
<span class="menuitem-text">${menuItem.name}</span>
|
|
121939
|
-
${menuItem.shortcut && !hasSubmenu ? b2`
|
|
121940
|
-
<span class="menuitem-shortcut">${menuItem.shortcut}</span>
|
|
121941
|
-
` : ""}
|
|
121942
|
-
</div>
|
|
121943
|
-
`;
|
|
121944
|
-
})}
|
|
121945
|
-
${this.menuItems.length === 0 ? b2`
|
|
121946
|
-
<div class="menuitem" @click=${() => {
|
|
121947
|
-
_DeesContextmenu.contextMenuDeactivated = true;
|
|
121948
|
-
this.destroy();
|
|
121949
|
-
}}>
|
|
121950
|
-
<dees-icon .icon="lucide:x"></dees-icon>
|
|
121951
|
-
<span class="menuitem-text">Allow native context</span>
|
|
121952
|
-
</div>
|
|
121953
|
-
` : b2``}
|
|
121954
|
-
</div>
|
|
121955
|
-
`;
|
|
121956
|
-
}
|
|
121957
|
-
async firstUpdated() {
|
|
121958
|
-
this.focus();
|
|
121959
|
-
this.addEventListener("keydown", this.handleKeydown);
|
|
121960
|
-
}
|
|
121961
|
-
async handleClick(menuItem) {
|
|
121962
|
-
menuItem.action();
|
|
121963
|
-
await this.destroyAll();
|
|
121964
|
-
}
|
|
121965
|
-
async handleMenuItemHover(menuItem, hasSubmenu) {
|
|
121966
|
-
if (this.submenuTimeout) {
|
|
121967
|
-
clearTimeout(this.submenuTimeout);
|
|
121968
|
-
this.submenuTimeout = null;
|
|
121969
|
-
}
|
|
121970
|
-
if (this.submenu) {
|
|
121971
|
-
await this.hideSubmenu();
|
|
121972
|
-
}
|
|
121973
|
-
if (hasSubmenu && menuItem.submenu) {
|
|
121974
|
-
this.submenuTimeout = setTimeout(() => {
|
|
121975
|
-
this.showSubmenu(menuItem);
|
|
121976
|
-
}, 200);
|
|
121977
|
-
}
|
|
121978
|
-
}
|
|
121979
|
-
handleMenuItemLeave() {
|
|
121980
|
-
if (this.submenuTimeout) {
|
|
121981
|
-
clearTimeout(this.submenuTimeout);
|
|
121982
|
-
}
|
|
121983
|
-
this.submenuTimeout = setTimeout(() => {
|
|
121984
|
-
if (this.submenu && !this.submenu.matches(":hover")) {
|
|
121985
|
-
this.hideSubmenu();
|
|
121986
|
-
}
|
|
121987
|
-
}, 300);
|
|
121988
|
-
}
|
|
121989
|
-
async showSubmenu(menuItem) {
|
|
121990
|
-
if (!menuItem.submenu || menuItem.submenu.length === 0) return;
|
|
121991
|
-
const menuItems = Array.from(this.shadowRoot.querySelectorAll(".menuitem"));
|
|
121992
|
-
const menuItemElement = menuItems.find((el) => el.querySelector(".menuitem-text")?.textContent === menuItem.name);
|
|
121993
|
-
if (!menuItemElement) return;
|
|
121994
|
-
this.submenu = new _DeesContextmenu();
|
|
121995
|
-
this.submenu.menuItems = menuItem.submenu;
|
|
121996
|
-
this.submenu.parentMenu = this;
|
|
121997
|
-
this.submenu.style.position = "fixed";
|
|
121998
|
-
this.submenu.style.zIndex = String(parseInt(this.style.zIndex) + 1);
|
|
121999
|
-
this.submenu.style.opacity = "0";
|
|
122000
|
-
this.submenu.style.transform = "scale(0.95)";
|
|
122001
|
-
document.body.append(this.submenu);
|
|
122002
|
-
await domtools_pluginexports_exports.smartdelay.delayFor(0);
|
|
122003
|
-
const itemRect = menuItemElement.getBoundingClientRect();
|
|
122004
|
-
const menuRect = this.getBoundingClientRect();
|
|
122005
|
-
const submenuRect = this.submenu.getBoundingClientRect();
|
|
122006
|
-
const windowWidth = window.innerWidth;
|
|
122007
|
-
let left = menuRect.right - 4;
|
|
122008
|
-
let top = itemRect.top;
|
|
122009
|
-
if (left + submenuRect.width > windowWidth - 10) {
|
|
122010
|
-
left = menuRect.left - submenuRect.width + 4;
|
|
122011
|
-
}
|
|
122012
|
-
if (top + submenuRect.height > window.innerHeight - 10) {
|
|
122013
|
-
top = window.innerHeight - submenuRect.height - 10;
|
|
122014
|
-
}
|
|
122015
|
-
this.submenu.style.left = `${left}px`;
|
|
122016
|
-
this.submenu.style.top = `${top}px`;
|
|
122017
|
-
await domtools_pluginexports_exports.smartdelay.delayFor(0);
|
|
122018
|
-
this.submenu.style.opacity = "1";
|
|
122019
|
-
this.submenu.style.transform = "scale(1)";
|
|
122020
|
-
this.submenu.addEventListener("mouseenter", () => {
|
|
122021
|
-
if (this.submenuTimeout) {
|
|
122022
|
-
clearTimeout(this.submenuTimeout);
|
|
122023
|
-
this.submenuTimeout = null;
|
|
122024
|
-
}
|
|
122025
|
-
});
|
|
122026
|
-
this.submenu.addEventListener("mouseleave", () => {
|
|
122027
|
-
this.handleMenuItemLeave();
|
|
122028
|
-
});
|
|
122029
|
-
}
|
|
122030
|
-
async hideSubmenu() {
|
|
122031
|
-
if (!this.submenu) return;
|
|
122032
|
-
await this.submenu.destroy();
|
|
122033
|
-
this.submenu = null;
|
|
122034
|
-
}
|
|
122035
|
-
async destroy() {
|
|
122036
|
-
if (this.isDestroying) {
|
|
122037
|
-
return;
|
|
122038
|
-
}
|
|
122039
|
-
this.isDestroying = true;
|
|
122040
|
-
if (this.submenuTimeout) {
|
|
122041
|
-
clearTimeout(this.submenuTimeout);
|
|
122042
|
-
this.submenuTimeout = null;
|
|
122043
|
-
}
|
|
122044
|
-
if (this.submenu) {
|
|
122045
|
-
await this.submenu.destroy();
|
|
122046
|
-
this.submenu = null;
|
|
122047
|
-
}
|
|
122048
|
-
if (this.windowLayer && !this.parentMenu) {
|
|
122049
|
-
this.windowLayer.destroy();
|
|
122050
|
-
}
|
|
122051
|
-
this.style.visibility = "hidden";
|
|
122052
|
-
if (this.parentElement) {
|
|
122053
|
-
this.parentElement.removeChild(this);
|
|
122054
|
-
}
|
|
122055
|
-
}
|
|
122056
|
-
/**
|
|
122057
|
-
* Destroys this menu and all parent menus in the chain
|
|
122058
|
-
*/
|
|
122059
|
-
async destroyAll() {
|
|
122060
|
-
let rootMenu = this;
|
|
122061
|
-
while (rootMenu.parentMenu) {
|
|
122062
|
-
rootMenu = rootMenu.parentMenu;
|
|
122063
|
-
}
|
|
122064
|
-
await rootMenu.destroy();
|
|
122065
|
-
}
|
|
122066
|
-
};
|
|
122067
|
-
_init3 = __decoratorStart(_a3);
|
|
122068
|
-
_menuItems = new WeakMap();
|
|
122069
|
-
__decorateElement(_init3, 4, "menuItems", _menuItems_dec, _DeesContextmenu, _menuItems);
|
|
122070
|
-
_DeesContextmenu = __decorateElement(_init3, 0, "DeesContextmenu", _DeesContextmenu_decorators, _DeesContextmenu);
|
|
122071
|
-
__name(_DeesContextmenu, "DeesContextmenu");
|
|
122072
|
-
// DEMO
|
|
122073
|
-
__publicField(_DeesContextmenu, "demo", demoFunc);
|
|
122074
|
-
__publicField(_DeesContextmenu, "demoGroups", ["Overlay"]);
|
|
122075
|
-
// STATIC
|
|
122076
|
-
// This will store all the accumulated menu items
|
|
122077
|
-
__publicField(_DeesContextmenu, "contextMenuDeactivated", false);
|
|
122078
|
-
__publicField(_DeesContextmenu, "accumulatedMenuItems", []);
|
|
122079
|
-
/**
|
|
122080
|
-
* STATIC STYLES
|
|
122081
|
-
*/
|
|
122082
|
-
__publicField(_DeesContextmenu, "styles", [
|
|
122083
|
-
themeDefaultStyles,
|
|
122084
|
-
cssManager.defaultStyles,
|
|
122085
|
-
i`
|
|
122086
|
-
:host {
|
|
122087
|
-
display: block;
|
|
122088
|
-
transition:
|
|
122089
|
-
opacity var(--dees-transition-default) var(--dees-ease-standard),
|
|
122090
|
-
transform var(--dees-transition-default) var(--dees-ease-standard),
|
|
122091
|
-
left var(--dees-transition-default) var(--dees-ease-spring),
|
|
122092
|
-
top var(--dees-transition-default) var(--dees-ease-spring);
|
|
122093
|
-
outline: none;
|
|
122094
|
-
}
|
|
122095
|
-
|
|
122096
|
-
.mainbox {
|
|
122097
|
-
min-width: 200px;
|
|
122098
|
-
max-width: 280px;
|
|
122099
|
-
background: var(--dees-material-regular-bg);
|
|
122100
|
-
-webkit-backdrop-filter: var(--dees-material-regular-filter);
|
|
122101
|
-
backdrop-filter: var(--dees-material-regular-filter);
|
|
122102
|
-
border: 1px solid var(--dees-color-border-default);
|
|
122103
|
-
border-radius: var(--dees-radius-lg);
|
|
122104
|
-
box-shadow: var(--dees-shadow-lg);
|
|
122105
|
-
user-select: none;
|
|
122106
|
-
padding: var(--dees-spacing-xs) 0;
|
|
122107
|
-
font-size: var(--dees-font-control-size-sm);
|
|
122108
|
-
color: var(--dees-color-text-primary);
|
|
122109
|
-
}
|
|
122110
|
-
|
|
122111
|
-
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
|
|
122112
|
-
.mainbox {
|
|
122113
|
-
background: var(--dees-material-regular-bg-opaque);
|
|
122114
|
-
}
|
|
122115
|
-
}
|
|
122116
|
-
|
|
122117
|
-
@media (prefers-reduced-transparency: reduce) {
|
|
122118
|
-
.mainbox {
|
|
122119
|
-
background: var(--dees-material-regular-bg-opaque);
|
|
122120
|
-
-webkit-backdrop-filter: none;
|
|
122121
|
-
backdrop-filter: none;
|
|
122122
|
-
}
|
|
122123
|
-
}
|
|
122124
|
-
|
|
122125
|
-
.menuitem {
|
|
122126
|
-
display: flex;
|
|
122127
|
-
align-items: center;
|
|
122128
|
-
gap: var(--dees-spacing-sm);
|
|
122129
|
-
padding: var(--dees-spacing-sm) var(--dees-spacing-md);
|
|
122130
|
-
cursor: default;
|
|
122131
|
-
transition: background var(--dees-transition-fast) var(--dees-ease-standard);
|
|
122132
|
-
line-height: 1;
|
|
122133
|
-
position: relative;
|
|
122134
|
-
}
|
|
122135
|
-
|
|
122136
|
-
.menuitem:hover {
|
|
122137
|
-
background: var(--dees-color-active);
|
|
122138
|
-
}
|
|
122139
|
-
|
|
122140
|
-
.menuitem.has-submenu::after {
|
|
122141
|
-
content: '›';
|
|
122142
|
-
position: absolute;
|
|
122143
|
-
right: var(--dees-spacing-sm);
|
|
122144
|
-
font-size: 16px;
|
|
122145
|
-
color: var(--dees-color-text-secondary);
|
|
122146
|
-
}
|
|
122147
|
-
|
|
122148
|
-
.menuitem:active:not(.has-submenu) {
|
|
122149
|
-
background: var(--dees-color-pressed);
|
|
122150
|
-
}
|
|
122151
|
-
|
|
122152
|
-
.menuitem.disabled {
|
|
122153
|
-
opacity: 0.5;
|
|
122154
|
-
cursor: not-allowed;
|
|
122155
|
-
pointer-events: none;
|
|
122156
|
-
}
|
|
122157
|
-
|
|
122158
|
-
.menuitem dees-icon {
|
|
122159
|
-
font-size: 14px;
|
|
122160
|
-
color: var(--dees-color-text-secondary);
|
|
122161
|
-
}
|
|
122162
|
-
|
|
122163
|
-
.menuitem-text {
|
|
122164
|
-
flex: 1;
|
|
122165
|
-
}
|
|
122166
|
-
|
|
122167
|
-
.menuitem-shortcut {
|
|
122168
|
-
font-size: var(--dees-font-caption2-size);
|
|
122169
|
-
color: var(--dees-color-text-secondary);
|
|
122170
|
-
margin-left: auto;
|
|
122171
|
-
}
|
|
122172
|
-
|
|
122173
|
-
.menu-divider {
|
|
122174
|
-
height: 1px;
|
|
122175
|
-
background: var(--dees-color-border-default);
|
|
122176
|
-
margin: var(--dees-spacing-xs) 0;
|
|
122177
|
-
}
|
|
122178
|
-
|
|
122179
|
-
@media (prefers-reduced-motion: reduce) {
|
|
122180
|
-
:host,
|
|
122181
|
-
.menuitem {
|
|
122182
|
-
transition: none;
|
|
122183
|
-
}
|
|
122184
|
-
}
|
|
122185
|
-
`
|
|
122186
|
-
]);
|
|
122187
|
-
__runInitializers(_init3, 1, _DeesContextmenu);
|
|
122188
|
-
var DeesContextmenu = _DeesContextmenu;
|
|
122189
|
-
DeesContextmenu.initializeGlobalListener();
|
|
122190
|
-
|
|
122191
122206
|
// node_modules/.pnpm/@design.estate+dees-element@2.4.0/node_modules/@design.estate/dees-element/dist_ts_demotools/demotools.js
|
|
122192
122207
|
init_dist_ts26();
|
|
122193
122208
|
var __esDecorate3 = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
@@ -122336,6 +122351,7 @@ var demoFunc3 = /* @__PURE__ */ __name(() => {
|
|
|
122336
122351
|
// ts_web/elements/00group-appui/dees-appui-activitylog/dees-appui-activitylog.ts
|
|
122337
122352
|
init_dist_ts26();
|
|
122338
122353
|
init_dist_ts25();
|
|
122354
|
+
init_dees_contextmenu();
|
|
122339
122355
|
init_dees_icon();
|
|
122340
122356
|
init_theme();
|
|
122341
122357
|
var _filterCriteria_dec, _searchQuery_dec, _entries_dec, _a4, _DeesAppuiActivitylog_decorators, _init4, _entries, _searchQuery, _filterCriteria;
|
|
@@ -124167,6 +124183,7 @@ init_dist_ts26();
|
|
|
124167
124183
|
init_dist_ts25();
|
|
124168
124184
|
init_plugins4();
|
|
124169
124185
|
init_dees_icon();
|
|
124186
|
+
init_dees_contextmenu();
|
|
124170
124187
|
var _isProfileDropdownOpen_dec, _focusedDropdownItem_dec, _focusedItem_dec, _openDropdowns_dec, _activeMenu_dec, _activityLogActive_dec, _activityLogCount_dec, _showActivityLogToggle_dec, _showSearch_dec, _profileMenuItems_dec, _user_dec2, _showWindowControls_dec, _breadcrumbSeparator_dec, _breadcrumbs_dec, _menuItems_dec3, _a7, _DeesAppuiBar_decorators, _init7, _menuItems3, _breadcrumbs, _breadcrumbSeparator, _showWindowControls, _user2, _profileMenuItems, _showSearch, _showActivityLogToggle, _activityLogCount, _activityLogActive, _activeMenu, _openDropdowns, _focusedItem, _focusedDropdownItem, _isProfileDropdownOpen;
|
|
124171
124188
|
_DeesAppuiBar_decorators = [customElement("dees-appui-appbar")];
|
|
124172
124189
|
var _DeesAppuiBar = class _DeesAppuiBar extends (_a7 = DeesElement, _menuItems_dec3 = [n5({ type: Array })], _breadcrumbs_dec = [n5({ type: String })], _breadcrumbSeparator_dec = [n5({ type: String })], _showWindowControls_dec = [n5({ type: Boolean })], _user_dec2 = [n5({ type: Object })], _profileMenuItems_dec = [n5({ type: Array })], _showSearch_dec = [n5({ type: Boolean })], _showActivityLogToggle_dec = [n5({ type: Boolean })], _activityLogCount_dec = [n5({ type: Number })], _activityLogActive_dec = [n5({ type: Boolean })], _activeMenu_dec = [r5()], _openDropdowns_dec = [r5()], _focusedItem_dec = [r5()], _focusedDropdownItem_dec = [r5()], _isProfileDropdownOpen_dec = [r5()], _a7) {
|
|
@@ -124893,6 +124910,7 @@ var demoFunc5 = /* @__PURE__ */ __name(() => {
|
|
|
124893
124910
|
init_dist_ts26();
|
|
124894
124911
|
init_theme();
|
|
124895
124912
|
init_dees_icon();
|
|
124913
|
+
init_dees_contextmenu();
|
|
124896
124914
|
var _actions_dec, _widgets_dec, _a9, _DeesAppuiBottombar_decorators, _init8, _widgets, _actions;
|
|
124897
124915
|
_DeesAppuiBottombar_decorators = [customElement("dees-appui-bottombar")];
|
|
124898
124916
|
var _DeesAppuiBottombar = class _DeesAppuiBottombar extends (_a9 = DeesElement, _widgets_dec = [r5()], _actions_dec = [r5()], _a9) {
|
|
@@ -130062,6 +130080,7 @@ var demoFunc13 = /* @__PURE__ */ __name(() => b2`
|
|
|
130062
130080
|
init_colors();
|
|
130063
130081
|
init_dist_ts26();
|
|
130064
130082
|
init_theme();
|
|
130083
|
+
init_dees_contextmenu();
|
|
130065
130084
|
var _autocomplete_dec, _validConfirmed_dec, _vintegrated_dec, _validationFunction_dec, _validationText_dec, _validationState_dec, _showPasswordBool_dec, _isPasswordBool_dec, _value_dec4, _a21, _DeesInputText_decorators, _init19, _value4, _isPasswordBool, _showPasswordBool, _validationState, _validationText, _validationFunction, _vintegrated, _validConfirmed, _autocomplete;
|
|
130066
130085
|
_DeesInputText_decorators = [customElement("dees-input-text")];
|
|
130067
130086
|
var _DeesInputText = class _DeesInputText extends (_a21 = DeesInputBase, _value_dec4 = [n5({
|
|
@@ -148046,6 +148065,7 @@ var WysiwygHistory = class {
|
|
|
148046
148065
|
|
|
148047
148066
|
// ts_web/elements/00group-input/dees-input-wysiwyg/dees-wysiwyg-block.ts
|
|
148048
148067
|
init_dist_ts26();
|
|
148068
|
+
init_dees_contextmenu();
|
|
148049
148069
|
init_theme();
|
|
148050
148070
|
var _wysiwygComponent_dec, _handlers_dec, _isSelected_dec, _block_dec, _a39, _DeesWysiwygBlock_decorators, _init36, _block, _isSelected, _handlers, _wysiwygComponent;
|
|
148051
148071
|
_DeesWysiwygBlock_decorators = [customElement("dees-wysiwyg-block")];
|
|
@@ -151952,6 +151972,7 @@ __name(compileLucenePredicate, "compileLucenePredicate");
|
|
|
151952
151972
|
// ts_web/elements/00group-dataview/dees-table/dees-table.ts
|
|
151953
151973
|
init_plugins4();
|
|
151954
151974
|
init_dist_ts26();
|
|
151975
|
+
init_dees_contextmenu();
|
|
151955
151976
|
init_dees_modal();
|
|
151956
151977
|
init_dist_ts25();
|
|
151957
151978
|
init_dees_icon();
|
|
@@ -155662,6 +155683,7 @@ var DeesButton = _DeesButton;
|
|
|
155662
155683
|
init_plugins4();
|
|
155663
155684
|
init_dist_ts26();
|
|
155664
155685
|
init_dees_icon();
|
|
155686
|
+
init_dees_contextmenu();
|
|
155665
155687
|
init_theme();
|
|
155666
155688
|
init_dees_tile();
|
|
155667
155689
|
var _gridActions_dec, _gap_dec, _minTileWidth_dec, _tiles_dec, _a45, _DeesStatsGrid_decorators, _init42, _tiles, _minTileWidth, _gap, _gridActions;
|
|
@@ -157938,6 +157960,7 @@ var demoFunc33 = /* @__PURE__ */ __name(() => b2`
|
|
|
157938
157960
|
init_plugins4();
|
|
157939
157961
|
init_zindex();
|
|
157940
157962
|
init_dist_ts26();
|
|
157963
|
+
init_dees_contextmenu();
|
|
157941
157964
|
init_theme();
|
|
157942
157965
|
var _collapsed_dec, _selectedTab_dec, _tabs_dec, _bottomTabs_dec, _menuGroups_dec, _logoText_dec, _logoIcon_dec, _a47, _DeesAppuiMainmenu_decorators, _init47, _logoIcon, _logoText, _menuGroups, _bottomTabs, _tabs, _selectedTab, _collapsed;
|
|
157943
157966
|
_DeesAppuiMainmenu_decorators = [customElement("dees-appui-mainmenu")];
|
|
@@ -158516,6 +158539,7 @@ var demoFunc34 = /* @__PURE__ */ __name(() => b2`
|
|
|
158516
158539
|
|
|
158517
158540
|
// ts_web/elements/00group-appui/dees-appui-secondarymenu/dees-appui-secondarymenu.ts
|
|
158518
158541
|
init_plugins4();
|
|
158542
|
+
init_dees_contextmenu();
|
|
158519
158543
|
init_dees_icon();
|
|
158520
158544
|
init_dist_ts26();
|
|
158521
158545
|
init_theme();
|
|
@@ -166560,6 +166584,7 @@ var toUnifiedDiff = /* @__PURE__ */ __name((rows, options2 = {}) => {
|
|
|
166560
166584
|
init_dist_ts26();
|
|
166561
166585
|
init_theme();
|
|
166562
166586
|
init_dist_ts12();
|
|
166587
|
+
init_dees_contextmenu();
|
|
166563
166588
|
init_services();
|
|
166564
166589
|
init_dees_tile();
|
|
166565
166590
|
init_dees_icon();
|
|
@@ -167470,6 +167495,7 @@ init_colors();
|
|
|
167470
167495
|
init_plugins4();
|
|
167471
167496
|
init_dist_ts26();
|
|
167472
167497
|
init_dist_ts23();
|
|
167498
|
+
init_dees_contextmenu();
|
|
167473
167499
|
init_theme();
|
|
167474
167500
|
init_dees_tile();
|
|
167475
167501
|
var _copied_dec2, _statusObject_dec, _a64, _DeesDataviewStatusobject_decorators, _init65, _statusObject, _copied2;
|
|
@@ -168252,6 +168278,7 @@ __name(getPathSegments, "getPathSegments");
|
|
|
168252
168278
|
|
|
168253
168279
|
// ts_web/elements/00group-dataview/dees-storage-browser/dees-storage-columns.ts
|
|
168254
168280
|
init_dist_ts26();
|
|
168281
|
+
init_dees_contextmenu();
|
|
168255
168282
|
init_theme();
|
|
168256
168283
|
var _draggedItem_dec, _renameError_dec, _renameInProgress_dec, _renameName_dec, _renameSource_dec, _showRenameDialog_dec, _movePickerLoading_dec, _movePickerPrefixes_dec, _movePickerCurrentPrefix_dec, _movePickerSource_dec, _showMovePickerDialog_dec, _moveError_dec, _moveInProgress_dec, _moveDestination_dec, _moveSource_dec, _showMoveDialog_dec, _uploadProgress_dec, _uploading_dec, _dragOverFolderPrefix_dec, _dragOverColumnIndex_dec, _createDialogName_dec, _createDialogPrefix_dec, _createDialogType_dec, _showCreateDialog_dec, _loading_dec, _columns_dec2, _refreshKey_dec, _currentPrefix_dec, _bucketName_dec, _dataProvider_dec, _a66, _DeesStorageColumns_decorators, _init67, _dataProvider, _bucketName, _currentPrefix, _refreshKey, _columns2, _loading, _showCreateDialog, _createDialogType, _createDialogPrefix, _createDialogName, _dragOverColumnIndex, _dragOverFolderPrefix, _uploading, _uploadProgress, _showMoveDialog, _moveSource, _moveDestination, _moveInProgress, _moveError, _showMovePickerDialog, _movePickerSource, _movePickerCurrentPrefix, _movePickerPrefixes, _movePickerLoading, _showRenameDialog, _renameSource, _renameName, _renameInProgress, _renameError, _draggedItem;
|
|
168257
168284
|
_DeesStorageColumns_decorators = [customElement("dees-storage-columns")];
|
|
@@ -169764,6 +169791,7 @@ var DeesStorageColumns = _DeesStorageColumns;
|
|
|
169764
169791
|
|
|
169765
169792
|
// ts_web/elements/00group-dataview/dees-storage-browser/dees-storage-keys.ts
|
|
169766
169793
|
init_dist_ts26();
|
|
169794
|
+
init_dees_contextmenu();
|
|
169767
169795
|
init_theme();
|
|
169768
169796
|
var _renameError_dec2, _renameInProgress_dec2, _renameName_dec2, _renameSource_dec2, _showRenameDialog_dec2, _movePickerLoading_dec2, _movePickerPrefixes_dec2, _movePickerCurrentPrefix_dec2, _movePickerSource_dec2, _showMovePickerDialog_dec2, _moveError_dec2, _moveInProgress_dec2, _moveDestination_dec2, _moveSource_dec2, _showMoveDialog_dec2, _createDialogName_dec2, _createDialogPrefix_dec2, _createDialogType_dec2, _showCreateDialog_dec2, _filterText_dec2, _selectedKey_dec, _loading_dec2, _prefixes_dec, _allKeys_dec, _refreshKey_dec2, _currentPrefix_dec2, _bucketName_dec2, _dataProvider_dec2, _a67, _DeesStorageKeys_decorators, _init68, _dataProvider2, _bucketName2, _currentPrefix2, _refreshKey2, _allKeys, _prefixes, _loading2, _selectedKey, _filterText2, _showCreateDialog2, _createDialogType2, _createDialogPrefix2, _createDialogName2, _showMoveDialog2, _moveSource2, _moveDestination2, _moveInProgress2, _moveError2, _showMovePickerDialog2, _movePickerSource2, _movePickerCurrentPrefix2, _movePickerPrefixes2, _movePickerLoading2, _showRenameDialog2, _renameSource2, _renameName2, _renameInProgress2, _renameError2;
|
|
169769
169797
|
_DeesStorageKeys_decorators = [customElement("dees-storage-keys")];
|
|
@@ -179794,11 +179822,11 @@ var demoFunc62 = /* @__PURE__ */ __name(() => b2`
|
|
|
179794
179822
|
init_dist_ts26();
|
|
179795
179823
|
init_theme();
|
|
179796
179824
|
init_dees_icon();
|
|
179797
|
-
var _showModelControls_dec, _modeOptions_dec, _mode_dec2, _effortOptions_dec, _reasoningEffort_dec, _modelOptions_dec, _model_dec, _accountOptions_dec, _account_dec, _maxTotalAttachmentBytes_dec, _maxAttachmentBytes_dec, _attachments_dec, _queuedCount_dec, _busy_dec3, _disabled_dec5, _docked_dec, _placeholder_dec6, _value_dec17, _a87, _DeesHarnessComposer_decorators, _init88, _value17, _placeholder6, _docked, _disabled5, _busy3, _queuedCount, _attachments, _maxAttachmentBytes, _maxTotalAttachmentBytes, _account, _accountOptions, _model, _modelOptions, _reasoningEffort, _effortOptions, _mode2, _modeOptions, _showModelControls;
|
|
179825
|
+
var _showModelControls_dec, _modeOptions_dec, _mode_dec2, _effortOptions_dec, _reasoningEffort_dec, _modelOptions_dec, _model_dec, _accountOptions_dec, _account_dec, _maxAttachmentCount_dec, _maxTotalAttachmentBytes_dec, _maxAttachmentBytes_dec, _attachments_dec, _queuedCount_dec, _busy_dec3, _disabled_dec5, _docked_dec, _placeholder_dec6, _value_dec17, _a87, _DeesHarnessComposer_decorators, _init88, _value17, _placeholder6, _docked, _disabled5, _busy3, _queuedCount, _attachments, _maxAttachmentBytes, _maxTotalAttachmentBytes, _maxAttachmentCount, _account, _accountOptions, _model, _modelOptions, _reasoningEffort, _effortOptions, _mode2, _modeOptions, _showModelControls;
|
|
179798
179826
|
var toDropdownOptions = /* @__PURE__ */ __name((values) => values.map((value2) => ({ option: value2, key: value2 })), "toDropdownOptions");
|
|
179799
179827
|
var toLabeledDropdownOptions = /* @__PURE__ */ __name((values) => values.map((value2) => ({ option: value2.label, key: value2.value })), "toLabeledDropdownOptions");
|
|
179800
179828
|
_DeesHarnessComposer_decorators = [customElement("dees-harness-composer")];
|
|
179801
|
-
var _DeesHarnessComposer = class _DeesHarnessComposer extends (_a87 = DeesElement, _value_dec17 = [n5()], _placeholder_dec6 = [n5()], _docked_dec = [n5({ type: Boolean, reflect: true })], _disabled_dec5 = [n5({ type: Boolean })], _busy_dec3 = [n5({ type: Boolean })], _queuedCount_dec = [n5({ type: Number })], _attachments_dec = [n5({ attribute: false })], _maxAttachmentBytes_dec = [n5({ type: Number })], _maxTotalAttachmentBytes_dec = [n5({ type: Number })], _account_dec = [n5()], _accountOptions_dec = [n5({ attribute: false })], _model_dec = [n5()], _modelOptions_dec = [n5({ attribute: false })], _reasoningEffort_dec = [n5()], _effortOptions_dec = [n5({ attribute: false })], _mode_dec2 = [n5()], _modeOptions_dec = [n5({ attribute: false })], _showModelControls_dec = [n5({ type: Boolean })], _a87) {
|
|
179829
|
+
var _DeesHarnessComposer = class _DeesHarnessComposer extends (_a87 = DeesElement, _value_dec17 = [n5()], _placeholder_dec6 = [n5()], _docked_dec = [n5({ type: Boolean, reflect: true })], _disabled_dec5 = [n5({ type: Boolean })], _busy_dec3 = [n5({ type: Boolean })], _queuedCount_dec = [n5({ type: Number })], _attachments_dec = [n5({ attribute: false })], _maxAttachmentBytes_dec = [n5({ type: Number })], _maxTotalAttachmentBytes_dec = [n5({ type: Number })], _maxAttachmentCount_dec = [n5({ type: Number })], _account_dec = [n5()], _accountOptions_dec = [n5({ attribute: false })], _model_dec = [n5()], _modelOptions_dec = [n5({ attribute: false })], _reasoningEffort_dec = [n5()], _effortOptions_dec = [n5({ attribute: false })], _mode_dec2 = [n5()], _modeOptions_dec = [n5({ attribute: false })], _showModelControls_dec = [n5({ type: Boolean })], _a87) {
|
|
179802
179830
|
constructor() {
|
|
179803
179831
|
super(...arguments);
|
|
179804
179832
|
__privateAdd(this, _value17, __runInitializers(_init88, 8, this, "")), __runInitializers(_init88, 11, this);
|
|
@@ -179810,15 +179838,16 @@ var _DeesHarnessComposer = class _DeesHarnessComposer extends (_a87 = DeesElemen
|
|
|
179810
179838
|
__privateAdd(this, _attachments, __runInitializers(_init88, 32, this, [])), __runInitializers(_init88, 35, this);
|
|
179811
179839
|
__privateAdd(this, _maxAttachmentBytes, __runInitializers(_init88, 36, this, harnessMaxAttachmentBytes)), __runInitializers(_init88, 39, this);
|
|
179812
179840
|
__privateAdd(this, _maxTotalAttachmentBytes, __runInitializers(_init88, 40, this, harnessMaxTotalAttachmentBytes)), __runInitializers(_init88, 43, this);
|
|
179813
|
-
__privateAdd(this,
|
|
179814
|
-
__privateAdd(this,
|
|
179815
|
-
__privateAdd(this,
|
|
179816
|
-
__privateAdd(this,
|
|
179817
|
-
__privateAdd(this,
|
|
179818
|
-
__privateAdd(this,
|
|
179819
|
-
__privateAdd(this,
|
|
179820
|
-
__privateAdd(this,
|
|
179821
|
-
__privateAdd(this,
|
|
179841
|
+
__privateAdd(this, _maxAttachmentCount, __runInitializers(_init88, 44, this, Number.POSITIVE_INFINITY)), __runInitializers(_init88, 47, this);
|
|
179842
|
+
__privateAdd(this, _account, __runInitializers(_init88, 48, this, "")), __runInitializers(_init88, 51, this);
|
|
179843
|
+
__privateAdd(this, _accountOptions, __runInitializers(_init88, 52, this, [])), __runInitializers(_init88, 55, this);
|
|
179844
|
+
__privateAdd(this, _model, __runInitializers(_init88, 56, this, "")), __runInitializers(_init88, 59, this);
|
|
179845
|
+
__privateAdd(this, _modelOptions, __runInitializers(_init88, 60, this, [])), __runInitializers(_init88, 63, this);
|
|
179846
|
+
__privateAdd(this, _reasoningEffort, __runInitializers(_init88, 64, this, "")), __runInitializers(_init88, 67, this);
|
|
179847
|
+
__privateAdd(this, _effortOptions, __runInitializers(_init88, 68, this, [])), __runInitializers(_init88, 71, this);
|
|
179848
|
+
__privateAdd(this, _mode2, __runInitializers(_init88, 72, this, "")), __runInitializers(_init88, 75, this);
|
|
179849
|
+
__privateAdd(this, _modeOptions, __runInitializers(_init88, 76, this, [])), __runInitializers(_init88, 79, this);
|
|
179850
|
+
__privateAdd(this, _showModelControls, __runInitializers(_init88, 80, this, true)), __runInitializers(_init88, 83, this);
|
|
179822
179851
|
// ------------------------------------------------------------------ input
|
|
179823
179852
|
__publicField(this, "handleTextInput", /* @__PURE__ */ __name((event) => {
|
|
179824
179853
|
this.value = event.currentTarget.value;
|
|
@@ -179866,6 +179895,7 @@ var _DeesHarnessComposer = class _DeesHarnessComposer extends (_a87 = DeesElemen
|
|
|
179866
179895
|
event.preventDefault();
|
|
179867
179896
|
void this.addFiles(files);
|
|
179868
179897
|
}, "handleDrop"));
|
|
179898
|
+
__publicField(this, "attachmentAdditionTail", Promise.resolve());
|
|
179869
179899
|
}
|
|
179870
179900
|
async focusPrompt() {
|
|
179871
179901
|
await this.updateComplete;
|
|
@@ -180021,12 +180051,23 @@ var _DeesHarnessComposer = class _DeesHarnessComposer extends (_a87 = DeesElemen
|
|
|
180021
180051
|
textarea.style.height = "auto";
|
|
180022
180052
|
textarea.style.height = `${Math.min(textarea.scrollHeight, window.innerHeight * 0.4)}px`;
|
|
180023
180053
|
}
|
|
180024
|
-
|
|
180054
|
+
addFiles(fileList) {
|
|
180025
180055
|
const files = Array.from(fileList ?? []);
|
|
180026
|
-
if (!files.length) return;
|
|
180056
|
+
if (!files.length) return Promise.resolve();
|
|
180057
|
+
const addition = this.attachmentAdditionTail.then(() => this.addFilesSequential(files));
|
|
180058
|
+
this.attachmentAdditionTail = addition.catch(() => void 0);
|
|
180059
|
+
return addition;
|
|
180060
|
+
}
|
|
180061
|
+
async addFilesSequential(files) {
|
|
180027
180062
|
const added = [];
|
|
180028
180063
|
let totalBytes = this.attachments.reduce((sum, attachment) => sum + attachment.size, 0);
|
|
180029
180064
|
for (const file of files) {
|
|
180065
|
+
if (this.attachments.length + added.length >= this.maxAttachmentCount) {
|
|
180066
|
+
this.emit("harness-attachment-error", {
|
|
180067
|
+
message: `A maximum of ${this.maxAttachmentCount} attachments is allowed.`
|
|
180068
|
+
});
|
|
180069
|
+
break;
|
|
180070
|
+
}
|
|
180030
180071
|
const mediaType = harnessMediaTypeForFile(file);
|
|
180031
180072
|
if (file.size > this.maxAttachmentBytes) {
|
|
180032
180073
|
this.emit("harness-attachment-error", {
|
|
@@ -180098,6 +180139,7 @@ _queuedCount = new WeakMap();
|
|
|
180098
180139
|
_attachments = new WeakMap();
|
|
180099
180140
|
_maxAttachmentBytes = new WeakMap();
|
|
180100
180141
|
_maxTotalAttachmentBytes = new WeakMap();
|
|
180142
|
+
_maxAttachmentCount = new WeakMap();
|
|
180101
180143
|
_account = new WeakMap();
|
|
180102
180144
|
_accountOptions = new WeakMap();
|
|
180103
180145
|
_model = new WeakMap();
|
|
@@ -180116,6 +180158,7 @@ __decorateElement(_init88, 4, "queuedCount", _queuedCount_dec, _DeesHarnessCompo
|
|
|
180116
180158
|
__decorateElement(_init88, 4, "attachments", _attachments_dec, _DeesHarnessComposer, _attachments);
|
|
180117
180159
|
__decorateElement(_init88, 4, "maxAttachmentBytes", _maxAttachmentBytes_dec, _DeesHarnessComposer, _maxAttachmentBytes);
|
|
180118
180160
|
__decorateElement(_init88, 4, "maxTotalAttachmentBytes", _maxTotalAttachmentBytes_dec, _DeesHarnessComposer, _maxTotalAttachmentBytes);
|
|
180161
|
+
__decorateElement(_init88, 4, "maxAttachmentCount", _maxAttachmentCount_dec, _DeesHarnessComposer, _maxAttachmentCount);
|
|
180119
180162
|
__decorateElement(_init88, 4, "account", _account_dec, _DeesHarnessComposer, _account);
|
|
180120
180163
|
__decorateElement(_init88, 4, "accountOptions", _accountOptions_dec, _DeesHarnessComposer, _accountOptions);
|
|
180121
180164
|
__decorateElement(_init88, 4, "model", _model_dec, _DeesHarnessComposer, _model);
|
|
@@ -181427,9 +181470,9 @@ var DeesHarnessUsage = _DeesHarnessUsage;
|
|
|
181427
181470
|
init_dist_ts26();
|
|
181428
181471
|
init_theme();
|
|
181429
181472
|
init_dees_icon();
|
|
181430
|
-
var _toolRegistry_dec6, _modeOptions_dec2, _mode_dec3, _effortOptions_dec2, _reasoningEffort_dec2, _modelOptions_dec2, _model_dec2, _accountOptions_dec2, _account_dec2, _attachments_dec2, _composerValue_dec, _queuedCount_dec2, _busy_dec4, _disabled_dec7, _showTimestamps_dec2, _showRoles_dec2, _showToolbar_dec, _subheading_dec, _heading_dec6, _narrowSessionLayout_dec, _desktopSessionSidebarVisible_dec, _sessionSidebarOpen_dec, _intelligenceError_dec2, _intelligenceBusy_dec2, _intelligenceExchanges_dec2, _sessionIntelligenceEnabled_dec, _scratchpadError_dec2, _scratchpadBusy_dec2, _scratchpad_dec2, _sessionMetrics_dec, _showSessionSidebar_dec, _showTodosPanel_dec, _todos_dec3, _usage_dec2, _status_dec6, _questions_dec2, _permissions_dec2, _messages_dec2, _a90, _DeesHarnessChat_decorators, _init91, _messages2, _permissions2, _questions2, _status6, _usage2, _todos3, _showTodosPanel, _showSessionSidebar, _sessionMetrics, _scratchpad2, _scratchpadBusy2, _scratchpadError2, _sessionIntelligenceEnabled, _intelligenceExchanges2, _intelligenceBusy2, _intelligenceError2, _sessionSidebarOpen, _desktopSessionSidebarVisible, _narrowSessionLayout, _heading6, _subheading, _showToolbar, _showRoles2, _showTimestamps2, _disabled7, _busy4, _queuedCount2, _composerValue, _attachments2, _account2, _accountOptions2, _model2, _modelOptions2, _reasoningEffort2, _effortOptions2, _mode3, _modeOptions2, _toolRegistry6;
|
|
181473
|
+
var _toolRegistry_dec6, _modeOptions_dec2, _mode_dec3, _effortOptions_dec2, _reasoningEffort_dec2, _modelOptions_dec2, _model_dec2, _accountOptions_dec2, _account_dec2, _maxTotalAttachmentBytes_dec2, _maxAttachmentBytes_dec2, _maxAttachmentCount_dec2, _attachments_dec2, _composerValue_dec, _queuedCount_dec2, _busy_dec4, _disabled_dec7, _showTimestamps_dec2, _showRoles_dec2, _showToolbar_dec, _subheading_dec, _heading_dec6, _narrowSessionLayout_dec, _desktopSessionSidebarVisible_dec, _sessionSidebarOpen_dec, _intelligenceError_dec2, _intelligenceBusy_dec2, _intelligenceExchanges_dec2, _sessionIntelligenceEnabled_dec, _scratchpadError_dec2, _scratchpadBusy_dec2, _scratchpad_dec2, _sessionMetrics_dec, _showSessionSidebar_dec, _showTodosPanel_dec, _todos_dec3, _usage_dec2, _status_dec6, _questions_dec2, _permissions_dec2, _messages_dec2, _a90, _DeesHarnessChat_decorators, _init91, _messages2, _permissions2, _questions2, _status6, _usage2, _todos3, _showTodosPanel, _showSessionSidebar, _sessionMetrics, _scratchpad2, _scratchpadBusy2, _scratchpadError2, _sessionIntelligenceEnabled, _intelligenceExchanges2, _intelligenceBusy2, _intelligenceError2, _sessionSidebarOpen, _desktopSessionSidebarVisible, _narrowSessionLayout, _heading6, _subheading, _showToolbar, _showRoles2, _showTimestamps2, _disabled7, _busy4, _queuedCount2, _composerValue, _attachments2, _maxAttachmentCount2, _maxAttachmentBytes2, _maxTotalAttachmentBytes2, _account2, _accountOptions2, _model2, _modelOptions2, _reasoningEffort2, _effortOptions2, _mode3, _modeOptions2, _toolRegistry6;
|
|
181431
181474
|
_DeesHarnessChat_decorators = [customElement("dees-harness-chat")];
|
|
181432
|
-
var _DeesHarnessChat = class _DeesHarnessChat extends (_a90 = DeesElement, _messages_dec2 = [n5({ attribute: false })], _permissions_dec2 = [n5({ attribute: false })], _questions_dec2 = [n5({ attribute: false })], _status_dec6 = [n5({ attribute: false })], _usage_dec2 = [n5({ attribute: false })], _todos_dec3 = [n5({ attribute: false })], _showTodosPanel_dec = [n5({ type: Boolean })], _showSessionSidebar_dec = [n5({ type: Boolean })], _sessionMetrics_dec = [n5({ attribute: false })], _scratchpad_dec2 = [n5({ attribute: false })], _scratchpadBusy_dec2 = [n5({ type: Boolean })], _scratchpadError_dec2 = [n5()], _sessionIntelligenceEnabled_dec = [n5({ type: Boolean })], _intelligenceExchanges_dec2 = [n5({ attribute: false })], _intelligenceBusy_dec2 = [n5({ type: Boolean })], _intelligenceError_dec2 = [n5()], _sessionSidebarOpen_dec = [r5()], _desktopSessionSidebarVisible_dec = [r5()], _narrowSessionLayout_dec = [r5()], _heading_dec6 = [n5()], _subheading_dec = [n5()], _showToolbar_dec = [n5({ type: Boolean })], _showRoles_dec2 = [n5({ type: Boolean })], _showTimestamps_dec2 = [n5({ type: Boolean })], _disabled_dec7 = [n5({ type: Boolean })], _busy_dec4 = [n5({ type: Boolean })], _queuedCount_dec2 = [n5({ type: Number })], _composerValue_dec = [n5()], _attachments_dec2 = [n5({ attribute: false })], _account_dec2 = [n5()], _accountOptions_dec2 = [n5({ attribute: false })], _model_dec2 = [n5()], _modelOptions_dec2 = [n5({ attribute: false })], _reasoningEffort_dec2 = [n5()], _effortOptions_dec2 = [n5({ attribute: false })], _mode_dec3 = [n5()], _modeOptions_dec2 = [n5({ attribute: false })], _toolRegistry_dec6 = [n5({ attribute: false })], _a90) {
|
|
181475
|
+
var _DeesHarnessChat = class _DeesHarnessChat extends (_a90 = DeesElement, _messages_dec2 = [n5({ attribute: false })], _permissions_dec2 = [n5({ attribute: false })], _questions_dec2 = [n5({ attribute: false })], _status_dec6 = [n5({ attribute: false })], _usage_dec2 = [n5({ attribute: false })], _todos_dec3 = [n5({ attribute: false })], _showTodosPanel_dec = [n5({ type: Boolean })], _showSessionSidebar_dec = [n5({ type: Boolean })], _sessionMetrics_dec = [n5({ attribute: false })], _scratchpad_dec2 = [n5({ attribute: false })], _scratchpadBusy_dec2 = [n5({ type: Boolean })], _scratchpadError_dec2 = [n5()], _sessionIntelligenceEnabled_dec = [n5({ type: Boolean })], _intelligenceExchanges_dec2 = [n5({ attribute: false })], _intelligenceBusy_dec2 = [n5({ type: Boolean })], _intelligenceError_dec2 = [n5()], _sessionSidebarOpen_dec = [r5()], _desktopSessionSidebarVisible_dec = [r5()], _narrowSessionLayout_dec = [r5()], _heading_dec6 = [n5()], _subheading_dec = [n5()], _showToolbar_dec = [n5({ type: Boolean })], _showRoles_dec2 = [n5({ type: Boolean })], _showTimestamps_dec2 = [n5({ type: Boolean })], _disabled_dec7 = [n5({ type: Boolean })], _busy_dec4 = [n5({ type: Boolean })], _queuedCount_dec2 = [n5({ type: Number })], _composerValue_dec = [n5()], _attachments_dec2 = [n5({ attribute: false })], _maxAttachmentCount_dec2 = [n5({ type: Number })], _maxAttachmentBytes_dec2 = [n5({ type: Number })], _maxTotalAttachmentBytes_dec2 = [n5({ type: Number })], _account_dec2 = [n5()], _accountOptions_dec2 = [n5({ attribute: false })], _model_dec2 = [n5()], _modelOptions_dec2 = [n5({ attribute: false })], _reasoningEffort_dec2 = [n5()], _effortOptions_dec2 = [n5({ attribute: false })], _mode_dec3 = [n5()], _modeOptions_dec2 = [n5({ attribute: false })], _toolRegistry_dec6 = [n5({ attribute: false })], _a90) {
|
|
181433
181476
|
constructor() {
|
|
181434
181477
|
super(...arguments);
|
|
181435
181478
|
__privateAdd(this, _messages2, __runInitializers(_init91, 8, this, [])), __runInitializers(_init91, 11, this);
|
|
@@ -181462,15 +181505,18 @@ var _DeesHarnessChat = class _DeesHarnessChat extends (_a90 = DeesElement, _mess
|
|
|
181462
181505
|
__privateAdd(this, _queuedCount2, __runInitializers(_init91, 112, this, 0)), __runInitializers(_init91, 115, this);
|
|
181463
181506
|
__privateAdd(this, _composerValue, __runInitializers(_init91, 116, this, "")), __runInitializers(_init91, 119, this);
|
|
181464
181507
|
__privateAdd(this, _attachments2, __runInitializers(_init91, 120, this, [])), __runInitializers(_init91, 123, this);
|
|
181465
|
-
__privateAdd(this,
|
|
181466
|
-
__privateAdd(this,
|
|
181467
|
-
__privateAdd(this,
|
|
181468
|
-
__privateAdd(this,
|
|
181469
|
-
__privateAdd(this,
|
|
181470
|
-
__privateAdd(this,
|
|
181471
|
-
__privateAdd(this,
|
|
181472
|
-
__privateAdd(this,
|
|
181473
|
-
__privateAdd(this,
|
|
181508
|
+
__privateAdd(this, _maxAttachmentCount2, __runInitializers(_init91, 124, this, Number.POSITIVE_INFINITY)), __runInitializers(_init91, 127, this);
|
|
181509
|
+
__privateAdd(this, _maxAttachmentBytes2, __runInitializers(_init91, 128, this, harnessMaxAttachmentBytes)), __runInitializers(_init91, 131, this);
|
|
181510
|
+
__privateAdd(this, _maxTotalAttachmentBytes2, __runInitializers(_init91, 132, this, harnessMaxTotalAttachmentBytes)), __runInitializers(_init91, 135, this);
|
|
181511
|
+
__privateAdd(this, _account2, __runInitializers(_init91, 136, this, "")), __runInitializers(_init91, 139, this);
|
|
181512
|
+
__privateAdd(this, _accountOptions2, __runInitializers(_init91, 140, this, [])), __runInitializers(_init91, 143, this);
|
|
181513
|
+
__privateAdd(this, _model2, __runInitializers(_init91, 144, this, "")), __runInitializers(_init91, 147, this);
|
|
181514
|
+
__privateAdd(this, _modelOptions2, __runInitializers(_init91, 148, this, [])), __runInitializers(_init91, 151, this);
|
|
181515
|
+
__privateAdd(this, _reasoningEffort2, __runInitializers(_init91, 152, this, "")), __runInitializers(_init91, 155, this);
|
|
181516
|
+
__privateAdd(this, _effortOptions2, __runInitializers(_init91, 156, this, [])), __runInitializers(_init91, 159, this);
|
|
181517
|
+
__privateAdd(this, _mode3, __runInitializers(_init91, 160, this, "")), __runInitializers(_init91, 163, this);
|
|
181518
|
+
__privateAdd(this, _modeOptions2, __runInitializers(_init91, 164, this, [])), __runInitializers(_init91, 167, this);
|
|
181519
|
+
__privateAdd(this, _toolRegistry6, __runInitializers(_init91, 168, this, DeesHarnessToolRegistry.default)), __runInitializers(_init91, 171, this);
|
|
181474
181520
|
__publicField(this, "toggleSessionSidebar", /* @__PURE__ */ __name(() => {
|
|
181475
181521
|
if (!this.narrowSessionLayout) {
|
|
181476
181522
|
this.desktopSessionSidebarVisible = !this.desktopSessionSidebarVisible;
|
|
@@ -181656,6 +181702,9 @@ var _DeesHarnessChat = class _DeesHarnessChat extends (_a90 = DeesElement, _mess
|
|
|
181656
181702
|
docked
|
|
181657
181703
|
.value=${this.composerValue}
|
|
181658
181704
|
.attachments=${this.attachments}
|
|
181705
|
+
.maxAttachmentCount=${this.maxAttachmentCount}
|
|
181706
|
+
.maxAttachmentBytes=${this.maxAttachmentBytes}
|
|
181707
|
+
.maxTotalAttachmentBytes=${this.maxTotalAttachmentBytes}
|
|
181659
181708
|
.disabled=${this.disabled}
|
|
181660
181709
|
.busy=${this.busy || this.status.type === "busy"}
|
|
181661
181710
|
.queuedCount=${this.queuedCount}
|
|
@@ -181747,6 +181796,9 @@ _busy4 = new WeakMap();
|
|
|
181747
181796
|
_queuedCount2 = new WeakMap();
|
|
181748
181797
|
_composerValue = new WeakMap();
|
|
181749
181798
|
_attachments2 = new WeakMap();
|
|
181799
|
+
_maxAttachmentCount2 = new WeakMap();
|
|
181800
|
+
_maxAttachmentBytes2 = new WeakMap();
|
|
181801
|
+
_maxTotalAttachmentBytes2 = new WeakMap();
|
|
181750
181802
|
_account2 = new WeakMap();
|
|
181751
181803
|
_accountOptions2 = new WeakMap();
|
|
181752
181804
|
_model2 = new WeakMap();
|
|
@@ -181785,6 +181837,9 @@ __decorateElement(_init91, 4, "busy", _busy_dec4, _DeesHarnessChat, _busy4);
|
|
|
181785
181837
|
__decorateElement(_init91, 4, "queuedCount", _queuedCount_dec2, _DeesHarnessChat, _queuedCount2);
|
|
181786
181838
|
__decorateElement(_init91, 4, "composerValue", _composerValue_dec, _DeesHarnessChat, _composerValue);
|
|
181787
181839
|
__decorateElement(_init91, 4, "attachments", _attachments_dec2, _DeesHarnessChat, _attachments2);
|
|
181840
|
+
__decorateElement(_init91, 4, "maxAttachmentCount", _maxAttachmentCount_dec2, _DeesHarnessChat, _maxAttachmentCount2);
|
|
181841
|
+
__decorateElement(_init91, 4, "maxAttachmentBytes", _maxAttachmentBytes_dec2, _DeesHarnessChat, _maxAttachmentBytes2);
|
|
181842
|
+
__decorateElement(_init91, 4, "maxTotalAttachmentBytes", _maxTotalAttachmentBytes_dec2, _DeesHarnessChat, _maxTotalAttachmentBytes2);
|
|
181788
181843
|
__decorateElement(_init91, 4, "account", _account_dec2, _DeesHarnessChat, _account2);
|
|
181789
181844
|
__decorateElement(_init91, 4, "accountOptions", _accountOptions_dec2, _DeesHarnessChat, _accountOptions2);
|
|
181790
181845
|
__decorateElement(_init91, 4, "model", _model_dec2, _DeesHarnessChat, _model2);
|
|
@@ -182074,6 +182129,40 @@ var demoGroups = [
|
|
|
182074
182129
|
{ id: "active", name: "Active work", sessionIds: ["session-0", "session-1", "session-2"] },
|
|
182075
182130
|
{ id: "review", name: "Review", sessionIds: ["session-3", "session-4"] }
|
|
182076
182131
|
];
|
|
182132
|
+
var demoResources = [
|
|
182133
|
+
{
|
|
182134
|
+
id: "terminal:build",
|
|
182135
|
+
kind: "terminal",
|
|
182136
|
+
title: "Build shell",
|
|
182137
|
+
icon: "lucide:Terminal",
|
|
182138
|
+
preview: "pnpm run build",
|
|
182139
|
+
updatedAt: Date.now() - 9e4,
|
|
182140
|
+
state: "ready"
|
|
182141
|
+
},
|
|
182142
|
+
{
|
|
182143
|
+
id: "file:release-notes",
|
|
182144
|
+
kind: "file",
|
|
182145
|
+
title: "Release notes",
|
|
182146
|
+
icon: "lucide:FileText",
|
|
182147
|
+
preview: "6.7.0 controlled resource draft",
|
|
182148
|
+
updatedAt: Date.now() - 18e4
|
|
182149
|
+
},
|
|
182150
|
+
{
|
|
182151
|
+
id: "browser:preview",
|
|
182152
|
+
kind: "browser",
|
|
182153
|
+
title: "Documentation preview",
|
|
182154
|
+
icon: "lucide:Globe",
|
|
182155
|
+
preview: "localhost:3000",
|
|
182156
|
+
updatedAt: Date.now() - 24e4
|
|
182157
|
+
}
|
|
182158
|
+
];
|
|
182159
|
+
var demoResourceAssociations = [
|
|
182160
|
+
{ resourceId: "terminal:build", sessionId: "session-0" },
|
|
182161
|
+
{ resourceId: "file:release-notes", sessionId: "session-0" }
|
|
182162
|
+
];
|
|
182163
|
+
var demoResourceEligibleSessionIds = Object.fromEntries(
|
|
182164
|
+
demoResources.map((resource) => [resource.id, ["session-0", "session-1", "session-2"]])
|
|
182165
|
+
);
|
|
182077
182166
|
var handleSessionSelect = /* @__PURE__ */ __name((event) => {
|
|
182078
182167
|
const list5 = event.currentTarget;
|
|
182079
182168
|
list5.selectedSessionId = event.detail.session.id;
|
|
@@ -182093,6 +182182,60 @@ var handleSessionMove = /* @__PURE__ */ __name((event) => {
|
|
|
182093
182182
|
list5.groups = groups;
|
|
182094
182183
|
list5.ungroupedSessionIds = ungroupedSessionIds;
|
|
182095
182184
|
}, "handleSessionMove");
|
|
182185
|
+
var handleResourceAssociation = /* @__PURE__ */ __name((event) => {
|
|
182186
|
+
const list5 = event.currentTarget;
|
|
182187
|
+
const next2 = list5.resourceAssociations.filter(
|
|
182188
|
+
(association2) => association2.resourceId !== event.detail.resource.id
|
|
182189
|
+
);
|
|
182190
|
+
if (event.detail.toSessionId) {
|
|
182191
|
+
next2.push({
|
|
182192
|
+
resourceId: event.detail.resource.id,
|
|
182193
|
+
sessionId: event.detail.toSessionId
|
|
182194
|
+
});
|
|
182195
|
+
}
|
|
182196
|
+
list5.resourceAssociations = next2;
|
|
182197
|
+
}, "handleResourceAssociation");
|
|
182198
|
+
var handleResourceContext = /* @__PURE__ */ __name(async (event) => {
|
|
182199
|
+
const list5 = event.currentTarget;
|
|
182200
|
+
const { DeesContextmenu: DeesContextmenu2 } = await Promise.resolve().then(() => (init_dees_contextmenu(), dees_contextmenu_exports));
|
|
182201
|
+
const currentSessionId = event.detail.sessionId;
|
|
182202
|
+
const eligibleSessionIds = ["session-0", "session-1", "session-2"];
|
|
182203
|
+
const menu = await DeesContextmenu2.openContextMenuWithOptions(
|
|
182204
|
+
new MouseEvent("contextmenu", {
|
|
182205
|
+
clientX: event.detail.clientX,
|
|
182206
|
+
clientY: event.detail.clientY
|
|
182207
|
+
}),
|
|
182208
|
+
[
|
|
182209
|
+
...eligibleSessionIds.filter((sessionId) => sessionId !== currentSessionId).map((sessionId) => ({
|
|
182210
|
+
name: `${currentSessionId ? "Reassign" : "Attach"} to ${demoSessions.find((session) => session.id === sessionId)?.title}`,
|
|
182211
|
+
iconName: "lucide:Link",
|
|
182212
|
+
action: /* @__PURE__ */ __name(async () => {
|
|
182213
|
+
event.detail.requestAssociation(sessionId);
|
|
182214
|
+
event.detail.close();
|
|
182215
|
+
}, "action")
|
|
182216
|
+
})),
|
|
182217
|
+
...currentSessionId ? [{
|
|
182218
|
+
name: "Detach",
|
|
182219
|
+
iconName: "lucide:Unlink",
|
|
182220
|
+
action: /* @__PURE__ */ __name(async () => {
|
|
182221
|
+
event.detail.requestAssociation(null);
|
|
182222
|
+
event.detail.close();
|
|
182223
|
+
}, "action")
|
|
182224
|
+
}] : []
|
|
182225
|
+
]
|
|
182226
|
+
);
|
|
182227
|
+
if (!menu) {
|
|
182228
|
+
event.detail.close();
|
|
182229
|
+
} else {
|
|
182230
|
+
const observer = new MutationObserver(() => {
|
|
182231
|
+
if (menu.isConnected) return;
|
|
182232
|
+
observer.disconnect();
|
|
182233
|
+
event.detail.close();
|
|
182234
|
+
});
|
|
182235
|
+
observer.observe(document.body, { childList: true });
|
|
182236
|
+
}
|
|
182237
|
+
list5.selectedResourceId = event.detail.resource.id;
|
|
182238
|
+
}, "handleResourceContext");
|
|
182096
182239
|
var openModal = /* @__PURE__ */ __name(async () => {
|
|
182097
182240
|
const { DeesModal: DeesModal2 } = await Promise.resolve().then(() => (init_dees_modal(), dees_modal_exports));
|
|
182098
182241
|
const content3 = document.createElement("dees-harness-session-list");
|
|
@@ -182130,15 +182273,26 @@ var demoFunc65 = /* @__PURE__ */ __name(() => b2`
|
|
|
182130
182273
|
</style>
|
|
182131
182274
|
<div class="sessionDemo">
|
|
182132
182275
|
<dees-button @clicked=${openModal}>Open in a DeesModal</dees-button>
|
|
182133
|
-
<div class="demoHint">
|
|
182276
|
+
<div class="demoHint">
|
|
182277
|
+
Use a conversation grip to reorder sessions. Use a resource grip to associate it with a
|
|
182278
|
+
session, or open Actions with click, ContextMenu, or Shift+F10 for attach, reassign, and detach.
|
|
182279
|
+
</div>
|
|
182134
182280
|
<dees-harness-session-list
|
|
182135
182281
|
.sessions=${demoSessions}
|
|
182136
182282
|
.groups=${demoGroups}
|
|
182137
182283
|
.ungroupedSessionIds=${demoSessions.slice(5).map((session) => session.id)}
|
|
182284
|
+
.resources=${demoResources}
|
|
182285
|
+
.resourceAssociations=${demoResourceAssociations}
|
|
182286
|
+
.eligibleSessionIdsByResourceId=${demoResourceEligibleSessionIds}
|
|
182138
182287
|
.enableGrouping=${true}
|
|
182139
182288
|
selectedSessionId="session-2"
|
|
182140
182289
|
@harness-session-select=${handleSessionSelect}
|
|
182141
182290
|
@harness-session-move=${handleSessionMove}
|
|
182291
|
+
@harness-resource-select=${(event) => {
|
|
182292
|
+
event.currentTarget.selectedResourceId = event.detail.resource.id;
|
|
182293
|
+
}}
|
|
182294
|
+
@harness-resource-context=${handleResourceContext}
|
|
182295
|
+
@harness-resource-association-request=${handleResourceAssociation}
|
|
182142
182296
|
></dees-harness-session-list>
|
|
182143
182297
|
</div>
|
|
182144
182298
|
`, "demoFunc");
|
|
@@ -182147,12 +182301,12 @@ var demoFunc65 = /* @__PURE__ */ __name(() => b2`
|
|
|
182147
182301
|
init_dist_ts26();
|
|
182148
182302
|
init_theme();
|
|
182149
182303
|
init_dees_icon();
|
|
182150
|
-
var _moveAnnouncement_dec, _bottomScrollShadowVisible_dec, _topScrollShadowVisible_dec, _collapsedGroupIds_dec, _expandedSessionIds_dec, _draggedItemHeight_dec, _dropSlot_dec, _draggingSessionId_dec, _search_dec, _ungroupedSessionIds_dec, _enableGrouping_dec, _groups_dec2, _emptyText_dec2, _loading_dec4, _selectedSessionId_dec, _sessions_dec, _a91, _DeesHarnessSessionList_decorators, _init92, _sessions, _selectedSessionId, _loading4, _emptyText2, _groups2, _enableGrouping, _ungroupedSessionIds, _search, _draggingSessionId, _dropSlot, _draggedItemHeight, _expandedSessionIds, _collapsedGroupIds, _topScrollShadowVisible, _bottomScrollShadowVisible, _moveAnnouncement;
|
|
182304
|
+
var _resourceContextResourceId_dec, _moveAnnouncement_dec, _bottomScrollShadowVisible_dec, _topScrollShadowVisible_dec, _collapsedGroupIds_dec, _expandedSessionIds_dec, _draggedItemHeight_dec, _dropSlot_dec, _resourceDropTargetSessionId_dec, _draggingResourceId_dec, _draggingSessionId_dec, _search_dec, _eligibleSessionIdsByResourceId_dec, _selectedResourceId_dec, _resourceAssociations_dec, _resources_dec, _ungroupedSessionIds_dec, _enableGrouping_dec, _groups_dec2, _emptyText_dec2, _loading_dec4, _selectedSessionId_dec, _sessions_dec, _a91, _DeesHarnessSessionList_decorators, _init92, _sessions, _selectedSessionId, _loading4, _emptyText2, _groups2, _enableGrouping, _ungroupedSessionIds, _resources, _resourceAssociations, _selectedResourceId, _eligibleSessionIdsByResourceId, _search, _draggingSessionId, _draggingResourceId, _resourceDropTargetSessionId, _dropSlot, _draggedItemHeight, _expandedSessionIds, _collapsedGroupIds, _topScrollShadowVisible, _bottomScrollShadowVisible, _moveAnnouncement, _resourceContextResourceId;
|
|
182151
182305
|
var { repeat: repeat6 } = directives_exports;
|
|
182152
182306
|
var dragAutoScrollMaxPixelsPerSecond = 900;
|
|
182153
182307
|
var dragThresholdPixels = 4;
|
|
182154
182308
|
_DeesHarnessSessionList_decorators = [customElement("dees-harness-session-list")];
|
|
182155
|
-
var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = DeesElement, _sessions_dec = [n5({ attribute: false })], _selectedSessionId_dec = [n5()], _loading_dec4 = [n5({ type: Boolean })], _emptyText_dec2 = [n5()], _groups_dec2 = [n5({ attribute: false })], _enableGrouping_dec = [n5({ type: Boolean })], _ungroupedSessionIds_dec = [n5({ attribute: false })], _search_dec = [r5()], _draggingSessionId_dec = [r5()], _dropSlot_dec = [r5()], _draggedItemHeight_dec = [r5()], _expandedSessionIds_dec = [r5()], _collapsedGroupIds_dec = [r5()], _topScrollShadowVisible_dec = [r5()], _bottomScrollShadowVisible_dec = [r5()], _moveAnnouncement_dec = [r5()], _a91) {
|
|
182309
|
+
var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = DeesElement, _sessions_dec = [n5({ attribute: false })], _selectedSessionId_dec = [n5()], _loading_dec4 = [n5({ type: Boolean })], _emptyText_dec2 = [n5()], _groups_dec2 = [n5({ attribute: false })], _enableGrouping_dec = [n5({ type: Boolean })], _ungroupedSessionIds_dec = [n5({ attribute: false })], _resources_dec = [n5({ attribute: false })], _resourceAssociations_dec = [n5({ attribute: false })], _selectedResourceId_dec = [n5()], _eligibleSessionIdsByResourceId_dec = [n5({ attribute: false })], _search_dec = [r5()], _draggingSessionId_dec = [r5()], _draggingResourceId_dec = [r5()], _resourceDropTargetSessionId_dec = [r5()], _dropSlot_dec = [r5()], _draggedItemHeight_dec = [r5()], _expandedSessionIds_dec = [r5()], _collapsedGroupIds_dec = [r5()], _topScrollShadowVisible_dec = [r5()], _bottomScrollShadowVisible_dec = [r5()], _moveAnnouncement_dec = [r5()], _resourceContextResourceId_dec = [r5()], _a91) {
|
|
182156
182310
|
constructor() {
|
|
182157
182311
|
super(...arguments);
|
|
182158
182312
|
__privateAdd(this, _sessions, __runInitializers(_init92, 8, this, [])), __runInitializers(_init92, 11, this);
|
|
@@ -182162,18 +182316,29 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182162
182316
|
__privateAdd(this, _groups2, __runInitializers(_init92, 24, this, [])), __runInitializers(_init92, 27, this);
|
|
182163
182317
|
__privateAdd(this, _enableGrouping, __runInitializers(_init92, 28, this, false)), __runInitializers(_init92, 31, this);
|
|
182164
182318
|
__privateAdd(this, _ungroupedSessionIds, __runInitializers(_init92, 32, this, [])), __runInitializers(_init92, 35, this);
|
|
182165
|
-
__privateAdd(this,
|
|
182166
|
-
__privateAdd(this,
|
|
182167
|
-
__privateAdd(this,
|
|
182168
|
-
__privateAdd(this,
|
|
182169
|
-
__privateAdd(this,
|
|
182170
|
-
__privateAdd(this,
|
|
182171
|
-
__privateAdd(this,
|
|
182172
|
-
__privateAdd(this,
|
|
182173
|
-
__privateAdd(this,
|
|
182319
|
+
__privateAdd(this, _resources, __runInitializers(_init92, 36, this, [])), __runInitializers(_init92, 39, this);
|
|
182320
|
+
__privateAdd(this, _resourceAssociations, __runInitializers(_init92, 40, this, [])), __runInitializers(_init92, 43, this);
|
|
182321
|
+
__privateAdd(this, _selectedResourceId, __runInitializers(_init92, 44, this, "")), __runInitializers(_init92, 47, this);
|
|
182322
|
+
__privateAdd(this, _eligibleSessionIdsByResourceId, __runInitializers(_init92, 48, this, {})), __runInitializers(_init92, 51, this);
|
|
182323
|
+
__privateAdd(this, _search, __runInitializers(_init92, 52, this, "")), __runInitializers(_init92, 55, this);
|
|
182324
|
+
__privateAdd(this, _draggingSessionId, __runInitializers(_init92, 56, this, "")), __runInitializers(_init92, 59, this);
|
|
182325
|
+
__privateAdd(this, _draggingResourceId, __runInitializers(_init92, 60, this, "")), __runInitializers(_init92, 63, this);
|
|
182326
|
+
__privateAdd(this, _resourceDropTargetSessionId, __runInitializers(_init92, 64, this, "")), __runInitializers(_init92, 67, this);
|
|
182327
|
+
__privateAdd(this, _dropSlot, __runInitializers(_init92, 68, this)), __runInitializers(_init92, 71, this);
|
|
182328
|
+
__privateAdd(this, _draggedItemHeight, __runInitializers(_init92, 72, this, 0)), __runInitializers(_init92, 75, this);
|
|
182329
|
+
__privateAdd(this, _expandedSessionIds, __runInitializers(_init92, 76, this, /* @__PURE__ */ new Set())), __runInitializers(_init92, 79, this);
|
|
182330
|
+
__privateAdd(this, _collapsedGroupIds, __runInitializers(_init92, 80, this, /* @__PURE__ */ new Set())), __runInitializers(_init92, 83, this);
|
|
182331
|
+
__privateAdd(this, _topScrollShadowVisible, __runInitializers(_init92, 84, this, false)), __runInitializers(_init92, 87, this);
|
|
182332
|
+
__privateAdd(this, _bottomScrollShadowVisible, __runInitializers(_init92, 88, this, false)), __runInitializers(_init92, 91, this);
|
|
182333
|
+
__privateAdd(this, _moveAnnouncement, __runInitializers(_init92, 92, this, "")), __runInitializers(_init92, 95, this);
|
|
182334
|
+
__privateAdd(this, _resourceContextResourceId, __runInitializers(_init92, 96, this, "")), __runInitializers(_init92, 99, this);
|
|
182174
182335
|
__publicField(this, "reflowGeneration", 0);
|
|
182175
182336
|
__publicField(this, "reflowAnimations", /* @__PURE__ */ new Set());
|
|
182176
182337
|
__publicField(this, "pointerDragGesture");
|
|
182338
|
+
__publicField(this, "pendingResourceAssociationRequest");
|
|
182339
|
+
__publicField(this, "resourceContextFocusTarget");
|
|
182340
|
+
__publicField(this, "resourceContextFocusClass", "");
|
|
182341
|
+
__publicField(this, "resourceContextGeneration", 0);
|
|
182177
182342
|
__publicField(this, "keyboardMoveFocus");
|
|
182178
182343
|
__publicField(this, "scrollResizeObserver");
|
|
182179
182344
|
__publicField(this, "observedScrollContainer");
|
|
@@ -182194,8 +182359,16 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182194
182359
|
eventArg.clientX - gesture.startClientX,
|
|
182195
182360
|
eventArg.clientY - gesture.startClientY
|
|
182196
182361
|
) < dragThresholdPixels) return;
|
|
182197
|
-
if (gesture.phase === "pending" && !this.startPointerDrag(eventArg, gesture)) return;
|
|
182362
|
+
if (gesture.phase === "pending" && !(gesture.type === "session" ? this.startPointerDrag(eventArg, gesture) : this.startResourcePointerDrag(eventArg, gesture))) return;
|
|
182198
182363
|
eventArg.preventDefault();
|
|
182364
|
+
if (gesture.type === "resource") {
|
|
182365
|
+
this.moveResourceDragPreview(eventArg.clientX, eventArg.clientY, gesture);
|
|
182366
|
+
this.dragAutoScrollClientX = eventArg.clientX;
|
|
182367
|
+
this.dragAutoScrollClientY = eventArg.clientY;
|
|
182368
|
+
this.updateDragAutoScrollVelocity();
|
|
182369
|
+
this.updateResourceDropTargetFromPointer(eventArg.clientX, eventArg.clientY);
|
|
182370
|
+
return;
|
|
182371
|
+
}
|
|
182199
182372
|
this.moveDragPreview(eventArg.clientX, eventArg.clientY, gesture);
|
|
182200
182373
|
this.dragAutoScrollClientX = eventArg.clientX;
|
|
182201
182374
|
this.dragAutoScrollClientY = eventArg.clientY;
|
|
@@ -182206,6 +182379,14 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182206
182379
|
const gesture = this.pointerDragGesture;
|
|
182207
182380
|
if (!gesture || eventArg.pointerId !== gesture.pointerId) return;
|
|
182208
182381
|
if (gesture.phase === "active") {
|
|
182382
|
+
if (gesture.type === "resource") {
|
|
182383
|
+
this.dragAutoScrollClientX = eventArg.clientX;
|
|
182384
|
+
this.dragAutoScrollClientY = eventArg.clientY;
|
|
182385
|
+
this.moveResourceDragPreview(eventArg.clientX, eventArg.clientY, gesture);
|
|
182386
|
+
this.updateResourceDropTargetFromPointer(eventArg.clientX, eventArg.clientY);
|
|
182387
|
+
this.finishPointerDrag(true);
|
|
182388
|
+
return;
|
|
182389
|
+
}
|
|
182209
182390
|
this.dragAutoScrollClientX = eventArg.clientX;
|
|
182210
182391
|
this.dragAutoScrollClientY = eventArg.clientY;
|
|
182211
182392
|
this.moveDragPreview(eventArg.clientX, eventArg.clientY, gesture);
|
|
@@ -182233,7 +182414,8 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182233
182414
|
__publicField(this, "runDragAutoScroll", /* @__PURE__ */ __name((timestampArg) => {
|
|
182234
182415
|
this.dragAutoScrollFrame = void 0;
|
|
182235
182416
|
const container = this.scrollContainer;
|
|
182236
|
-
|
|
182417
|
+
const gesture = this.pointerDragGesture;
|
|
182418
|
+
if (!container || gesture?.phase !== "active" || this.dragAutoScrollVelocity === 0) return;
|
|
182237
182419
|
const elapsedMs = Math.min(34, Math.max(0, timestampArg - this.dragAutoScrollLastFrame));
|
|
182238
182420
|
this.dragAutoScrollLastFrame = timestampArg;
|
|
182239
182421
|
const previousScrollTop = container.scrollTop;
|
|
@@ -182244,7 +182426,14 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182244
182426
|
this.stopDragAutoScroll();
|
|
182245
182427
|
return;
|
|
182246
182428
|
}
|
|
182247
|
-
|
|
182429
|
+
if (gesture.type === "resource") {
|
|
182430
|
+
this.updateResourceDropTargetFromPointer(
|
|
182431
|
+
this.dragAutoScrollClientX,
|
|
182432
|
+
this.dragAutoScrollClientY
|
|
182433
|
+
);
|
|
182434
|
+
} else {
|
|
182435
|
+
this.updateDropSlotFromPointer();
|
|
182436
|
+
}
|
|
182248
182437
|
this.dragAutoScrollFrame = requestAnimationFrame(this.runDragAutoScroll);
|
|
182249
182438
|
}, "runDragAutoScroll"));
|
|
182250
182439
|
__publicField(this, "syncScrollShadowState", /* @__PURE__ */ __name(() => {
|
|
@@ -182259,6 +182448,48 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182259
182448
|
get sessionsById() {
|
|
182260
182449
|
return new Map(this.sessions.map((session) => [session.id, session]));
|
|
182261
182450
|
}
|
|
182451
|
+
get resourcesById() {
|
|
182452
|
+
const result = /* @__PURE__ */ new Map();
|
|
182453
|
+
for (const resource of this.resources) {
|
|
182454
|
+
if (!resource.id || !resource.kind || !resource.title || result.has(resource.id)) continue;
|
|
182455
|
+
result.set(resource.id, resource);
|
|
182456
|
+
}
|
|
182457
|
+
return result;
|
|
182458
|
+
}
|
|
182459
|
+
/** First valid record wins; unknown and duplicate records remain untouched but are not projected. */
|
|
182460
|
+
get acceptedResourceAssociations() {
|
|
182461
|
+
const resourcesById = this.resourcesById;
|
|
182462
|
+
const sessionsById = this.sessionsById;
|
|
182463
|
+
const result = /* @__PURE__ */ new Map();
|
|
182464
|
+
for (const association2 of this.resourceAssociations) {
|
|
182465
|
+
if (!resourcesById.has(association2.resourceId) || !sessionsById.has(association2.sessionId) || result.has(association2.resourceId)) continue;
|
|
182466
|
+
result.set(association2.resourceId, association2.sessionId);
|
|
182467
|
+
}
|
|
182468
|
+
return result;
|
|
182469
|
+
}
|
|
182470
|
+
get acceptedResources() {
|
|
182471
|
+
return [...this.resourcesById.values()];
|
|
182472
|
+
}
|
|
182473
|
+
resourceMatchesSearch(resourceArg, queryArg) {
|
|
182474
|
+
return [resourceArg.id, resourceArg.kind, resourceArg.title, resourceArg.preview].filter(Boolean).join(" ").toLowerCase().includes(queryArg);
|
|
182475
|
+
}
|
|
182476
|
+
sessionMatchesSearch(sessionArg, queryArg) {
|
|
182477
|
+
return [sessionArg.title, sessionArg.preview, sessionArg.id].filter(Boolean).join(" ").toLowerCase().includes(queryArg);
|
|
182478
|
+
}
|
|
182479
|
+
resourcesForSession(sessionArg) {
|
|
182480
|
+
const associations = this.acceptedResourceAssociations;
|
|
182481
|
+
const associated = this.acceptedResources.filter(
|
|
182482
|
+
(resource) => associations.get(resource.id) === sessionArg.id
|
|
182483
|
+
);
|
|
182484
|
+
const query3 = this.search.trim().toLowerCase();
|
|
182485
|
+
if (!query3 || this.sessionMatchesSearch(sessionArg, query3)) return associated;
|
|
182486
|
+
return associated.filter((resource) => this.resourceMatchesSearch(resource, query3));
|
|
182487
|
+
}
|
|
182488
|
+
get unattachedResources() {
|
|
182489
|
+
const associations = this.acceptedResourceAssociations;
|
|
182490
|
+
const query3 = this.search.trim().toLowerCase();
|
|
182491
|
+
return this.acceptedResources.filter((resource) => !associations.has(resource.id) && (!query3 || this.resourceMatchesSearch(resource, query3)));
|
|
182492
|
+
}
|
|
182262
182493
|
get groupedSessionIds() {
|
|
182263
182494
|
const ids = /* @__PURE__ */ new Set();
|
|
182264
182495
|
for (const group of this.groups) {
|
|
@@ -182288,17 +182519,64 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182288
182519
|
}
|
|
182289
182520
|
get filteredSessions() {
|
|
182290
182521
|
const query3 = this.search.trim().toLowerCase();
|
|
182522
|
+
const associations = this.acceptedResourceAssociations;
|
|
182523
|
+
const matchingAttachedSessionIds = new Set(
|
|
182524
|
+
this.acceptedResources.filter((resource) => query3 && this.resourceMatchesSearch(resource, query3)).map((resource) => associations.get(resource.id)).filter((sessionId) => sessionId !== void 0)
|
|
182525
|
+
);
|
|
182291
182526
|
const sorted = [...this.sessions].sort(
|
|
182292
182527
|
(left, right) => (right.updatedAt ?? right.createdAt ?? 0) - (left.updatedAt ?? left.createdAt ?? 0)
|
|
182293
182528
|
);
|
|
182294
182529
|
if (!query3) return sorted;
|
|
182295
182530
|
return sorted.filter(
|
|
182296
|
-
(session) =>
|
|
182531
|
+
(session) => this.sessionMatchesSearch(session, query3) || matchingAttachedSessionIds.has(session.id)
|
|
182297
182532
|
);
|
|
182298
182533
|
}
|
|
182299
182534
|
focusSearch() {
|
|
182300
182535
|
this.shadowRoot?.querySelector(".searchRow input")?.focus();
|
|
182301
182536
|
}
|
|
182537
|
+
requestResourceAssociation(resourceIdArg, toSessionIdArg, sourceArg = "action") {
|
|
182538
|
+
const resource = this.resourcesById.get(resourceIdArg);
|
|
182539
|
+
if (!resource) return false;
|
|
182540
|
+
const fromSessionId = this.acceptedResourceAssociations.get(resourceIdArg) ?? null;
|
|
182541
|
+
if (fromSessionId === toSessionIdArg) return false;
|
|
182542
|
+
if (toSessionIdArg !== null && (!this.sessionsById.has(toSessionIdArg) || !this.isResourceTargetEligible(resourceIdArg, toSessionIdArg))) return false;
|
|
182543
|
+
if (toSessionIdArg === null && fromSessionId === null) return false;
|
|
182544
|
+
const detail = fromSessionId === null ? {
|
|
182545
|
+
intent: "attach",
|
|
182546
|
+
resource,
|
|
182547
|
+
fromSessionId: null,
|
|
182548
|
+
toSessionId: toSessionIdArg,
|
|
182549
|
+
source: sourceArg
|
|
182550
|
+
} : toSessionIdArg === null ? {
|
|
182551
|
+
intent: "detach",
|
|
182552
|
+
resource,
|
|
182553
|
+
fromSessionId,
|
|
182554
|
+
toSessionId: null,
|
|
182555
|
+
source: sourceArg
|
|
182556
|
+
} : {
|
|
182557
|
+
intent: "reassign",
|
|
182558
|
+
resource,
|
|
182559
|
+
fromSessionId,
|
|
182560
|
+
toSessionId: toSessionIdArg,
|
|
182561
|
+
source: sourceArg
|
|
182562
|
+
};
|
|
182563
|
+
this.pendingResourceAssociationRequest = {
|
|
182564
|
+
resourceId: resource.id,
|
|
182565
|
+
resourceTitle: resource.title || resource.id,
|
|
182566
|
+
fromSessionId,
|
|
182567
|
+
toSessionId: toSessionIdArg,
|
|
182568
|
+
intent: detail.intent
|
|
182569
|
+
};
|
|
182570
|
+
this.moveAnnouncement = this.resourceAssociationAnnouncement(detail, false);
|
|
182571
|
+
this.dispatchEvent(
|
|
182572
|
+
new CustomEvent("harness-resource-association-request", {
|
|
182573
|
+
detail,
|
|
182574
|
+
bubbles: true,
|
|
182575
|
+
composed: true
|
|
182576
|
+
})
|
|
182577
|
+
);
|
|
182578
|
+
return true;
|
|
182579
|
+
}
|
|
182302
182580
|
updated(changedProperties) {
|
|
182303
182581
|
super.updated(changedProperties);
|
|
182304
182582
|
this.observeScrollGeometry();
|
|
@@ -182307,16 +182585,32 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182307
182585
|
if (this.pointerDragGesture && (!this.pointerDragGesture.source.isConnected || !this.pointerDragGesture.handle.isConnected)) {
|
|
182308
182586
|
this.finishPointerDrag(false);
|
|
182309
182587
|
}
|
|
182310
|
-
if (
|
|
182311
|
-
|
|
182312
|
-
|
|
182313
|
-
|
|
182588
|
+
if (changedProperties.has("sessions")) {
|
|
182589
|
+
const knownIds = new Set(this.sessions.map((session) => session.id));
|
|
182590
|
+
if (this.pointerDragGesture?.type === "session" && !knownIds.has(this.pointerDragGesture.sessionId)) {
|
|
182591
|
+
this.finishPointerDrag(false);
|
|
182592
|
+
}
|
|
182593
|
+
const nextExpanded = new Set(
|
|
182594
|
+
[...this.expandedSessionIds].filter((sessionId) => knownIds.has(sessionId))
|
|
182595
|
+
);
|
|
182596
|
+
if (nextExpanded.size !== this.expandedSessionIds.size || [...nextExpanded].some((sessionId) => !this.expandedSessionIds.has(sessionId))) {
|
|
182597
|
+
this.expandedSessionIds = nextExpanded;
|
|
182598
|
+
}
|
|
182314
182599
|
}
|
|
182315
|
-
|
|
182316
|
-
|
|
182317
|
-
|
|
182318
|
-
|
|
182319
|
-
|
|
182600
|
+
if (changedProperties.has("resources") || changedProperties.has("resourceAssociations")) {
|
|
182601
|
+
const gesture = this.pointerDragGesture;
|
|
182602
|
+
if (gesture?.type === "resource") {
|
|
182603
|
+
const currentSessionId = this.acceptedResourceAssociations.get(gesture.resourceId) ?? null;
|
|
182604
|
+
if (!this.resourcesById.has(gesture.resourceId) || currentSessionId !== gesture.fromSessionId) {
|
|
182605
|
+
this.finishPointerDrag(false);
|
|
182606
|
+
}
|
|
182607
|
+
}
|
|
182608
|
+
if (this.resourceContextResourceId && !this.resourcesById.has(this.resourceContextResourceId)) this.closeResourceContext(this.resourceContextGeneration);
|
|
182609
|
+
this.reconcilePendingResourceAssociation();
|
|
182610
|
+
}
|
|
182611
|
+
if (changedProperties.has("eligibleSessionIdsByResourceId")) {
|
|
182612
|
+
const gesture = this.pointerDragGesture;
|
|
182613
|
+
if (gesture?.type === "resource") this.finishPointerDrag(false);
|
|
182320
182614
|
}
|
|
182321
182615
|
}
|
|
182322
182616
|
async connectedCallback() {
|
|
@@ -182328,6 +182622,7 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182328
182622
|
}
|
|
182329
182623
|
async disconnectedCallback() {
|
|
182330
182624
|
this.finishPointerDrag(false);
|
|
182625
|
+
this.clearResourceContextState();
|
|
182331
182626
|
this.scrollResizeObserver?.disconnect();
|
|
182332
182627
|
this.scrollResizeObserver = void 0;
|
|
182333
182628
|
this.observedScrollContainer = void 0;
|
|
@@ -182340,7 +182635,8 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182340
182635
|
<div class="searchRow">
|
|
182341
182636
|
<dees-icon class="searchIcon" icon="lucide:Search" iconSize="13"></dees-icon>
|
|
182342
182637
|
<input
|
|
182343
|
-
placeholder
|
|
182638
|
+
placeholder=${this.acceptedResources.length ? "Search conversations and resources" : "Search conversations"}
|
|
182639
|
+
aria-label=${this.acceptedResources.length ? "Search conversations and resources" : "Search conversations"}
|
|
182344
182640
|
.value=${this.search}
|
|
182345
182641
|
@input=${(event) => {
|
|
182346
182642
|
this.search = event.currentTarget.value;
|
|
@@ -182383,9 +182679,10 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182383
182679
|
}
|
|
182384
182680
|
renderFlatList() {
|
|
182385
182681
|
const sessions = this.filteredSessions;
|
|
182386
|
-
|
|
182682
|
+
const unattachedResources = this.unattachedResources;
|
|
182683
|
+
if (!sessions.length && !unattachedResources.length) {
|
|
182387
182684
|
return b2`<div class="emptyNote">
|
|
182388
|
-
${this.sessions.length ? "No conversations match this search." : this.emptyText}
|
|
182685
|
+
${this.acceptedResources.length ? this.sessions.length ? "No conversations or resources match this search." : "No resources match this search." : this.sessions.length ? "No conversations match this search." : this.emptyText}
|
|
182389
182686
|
</div>`;
|
|
182390
182687
|
}
|
|
182391
182688
|
return b2`
|
|
@@ -182396,12 +182693,14 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182396
182693
|
(session) => this.renderItem(session, null, -1)
|
|
182397
182694
|
)}
|
|
182398
182695
|
</div>
|
|
182696
|
+
${this.renderUnattachedResources(unattachedResources)}
|
|
182399
182697
|
`;
|
|
182400
182698
|
}
|
|
182401
182699
|
renderGroupedList() {
|
|
182402
182700
|
const byId = this.sessionsById;
|
|
182403
182701
|
const ungrouped = this.ungroupedSessions;
|
|
182404
|
-
|
|
182702
|
+
const unattachedResources = this.unattachedResources;
|
|
182703
|
+
if (!this.sessions.length && !this.groups.length && !unattachedResources.length) {
|
|
182405
182704
|
return b2`<div class="emptyNote">${this.emptyText}</div>`;
|
|
182406
182705
|
}
|
|
182407
182706
|
return b2`
|
|
@@ -182451,6 +182750,7 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182451
182750
|
</button>
|
|
182452
182751
|
` : ""}
|
|
182453
182752
|
${this.renderSection(ungrouped, null)}
|
|
182753
|
+
${this.renderUnattachedResources(unattachedResources)}
|
|
182454
182754
|
`;
|
|
182455
182755
|
}
|
|
182456
182756
|
renderSection(sessions, groupId) {
|
|
@@ -182510,9 +182810,11 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182510
182810
|
const state5 = session.state ?? "normal";
|
|
182511
182811
|
const detailsId = `session-details-${session.id}`;
|
|
182512
182812
|
const dropIndex = index3 < 0 ? 0 : index3;
|
|
182813
|
+
const resources = this.resourcesForSession(session);
|
|
182814
|
+
const isResourceDropTarget = this.resourceDropTargetSessionId === session.id;
|
|
182513
182815
|
return b2`
|
|
182514
182816
|
<article
|
|
182515
|
-
class="item state-${state5} ${expanded ? "expanded" : ""} ${session.id === this.selectedSessionId ? "selected" : ""} ${this.draggingSessionId === session.id ? "dragging" : ""}"
|
|
182817
|
+
class="item state-${state5} ${expanded ? "expanded" : ""} ${session.id === this.selectedSessionId ? "selected" : ""} ${this.draggingSessionId === session.id ? "dragging" : ""} ${isResourceDropTarget ? "resourceDropTarget" : ""}"
|
|
182516
182818
|
data-session-id=${session.id}
|
|
182517
182819
|
data-drop-group-id=${groupId ?? ""}
|
|
182518
182820
|
data-drop-index=${dropIndex}
|
|
@@ -182593,6 +182895,16 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182593
182895
|
<dees-icon icon="lucide:ChevronDown" iconSize="15"></dees-icon>
|
|
182594
182896
|
</button>
|
|
182595
182897
|
</div>
|
|
182898
|
+
${isResourceDropTarget ? b2`<div class="resourceDropLabel">Associate resource with ${session.title || session.id}</div>` : ""}
|
|
182899
|
+
${resources.length ? b2`
|
|
182900
|
+
<ul class="resourceChildren" aria-label=${`Resources for ${session.title || session.id}`}>
|
|
182901
|
+
${repeat6(
|
|
182902
|
+
resources,
|
|
182903
|
+
(resource) => resource.id,
|
|
182904
|
+
(resource) => this.renderResource(resource, session.id)
|
|
182905
|
+
)}
|
|
182906
|
+
</ul>
|
|
182907
|
+
` : ""}
|
|
182596
182908
|
${expanded ? b2`
|
|
182597
182909
|
<div class="itemDetails" id=${detailsId}>
|
|
182598
182910
|
<div class="stateLine">
|
|
@@ -182609,6 +182921,113 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182609
182921
|
</article>
|
|
182610
182922
|
`;
|
|
182611
182923
|
}
|
|
182924
|
+
renderUnattachedResources(resourcesArg) {
|
|
182925
|
+
if (!resourcesArg.length) return b2``;
|
|
182926
|
+
return b2`
|
|
182927
|
+
<section class="resourceSection" aria-labelledby="unattached-resources-heading">
|
|
182928
|
+
<h2 class="resourceSectionTitle" id="unattached-resources-heading">Resources</h2>
|
|
182929
|
+
<ul class="resourceList" aria-label="Unattached resources">
|
|
182930
|
+
${repeat6(
|
|
182931
|
+
resourcesArg,
|
|
182932
|
+
(resource) => resource.id,
|
|
182933
|
+
(resource) => this.renderResource(resource, null)
|
|
182934
|
+
)}
|
|
182935
|
+
</ul>
|
|
182936
|
+
</section>
|
|
182937
|
+
`;
|
|
182938
|
+
}
|
|
182939
|
+
renderResource(resourceArg, sessionIdArg) {
|
|
182940
|
+
const selected = resourceArg.id === this.selectedResourceId;
|
|
182941
|
+
const dragging = resourceArg.id === this.draggingResourceId;
|
|
182942
|
+
const eligibleTargetCount = this.eligibleSessionIds(resourceArg.id).filter(
|
|
182943
|
+
(sessionId) => sessionId !== sessionIdArg
|
|
182944
|
+
).length;
|
|
182945
|
+
const contextOpen = resourceArg.id === this.resourceContextResourceId;
|
|
182946
|
+
return b2`
|
|
182947
|
+
<li
|
|
182948
|
+
class="resourceRow ${selected ? "selected" : ""} ${dragging ? "resourceDragging" : ""}"
|
|
182949
|
+
data-resource-id=${resourceArg.id}
|
|
182950
|
+
data-resource-session-id=${sessionIdArg ?? ""}
|
|
182951
|
+
@dblclick=${(event) => {
|
|
182952
|
+
event.stopPropagation();
|
|
182953
|
+
if (this.eventTargetsResourceControl(event)) return;
|
|
182954
|
+
this.emitResource("harness-resource-open", resourceArg, sessionIdArg);
|
|
182955
|
+
}}
|
|
182956
|
+
@contextmenu=${(event) => {
|
|
182957
|
+
event.preventDefault();
|
|
182958
|
+
event.stopPropagation();
|
|
182959
|
+
const focusTarget = event.composedPath().find((target) => target instanceof HTMLElement && target.matches("button:not(:disabled)")) ?? event.currentTarget.querySelector(".resourcePrimary") ?? event.currentTarget;
|
|
182960
|
+
this.emitResourceContext(event, resourceArg, sessionIdArg, "pointer", focusTarget);
|
|
182961
|
+
}}
|
|
182962
|
+
>
|
|
182963
|
+
<button
|
|
182964
|
+
class="resourceDragHandle"
|
|
182965
|
+
type="button"
|
|
182966
|
+
title=${eligibleTargetCount ? "Drag to associate with an eligible conversation" : "No eligible conversations"}
|
|
182967
|
+
aria-label=${`Associate ${resourceArg.title || resourceArg.id} by dragging`}
|
|
182968
|
+
aria-keyshortcuts="ContextMenu Shift+F10"
|
|
182969
|
+
?disabled=${eligibleTargetCount === 0}
|
|
182970
|
+
@pointerdown=${(event) => {
|
|
182971
|
+
this.handleResourcePointerDown(event, resourceArg, sessionIdArg);
|
|
182972
|
+
}}
|
|
182973
|
+
@pointermove=${this.handlePointerMove}
|
|
182974
|
+
@pointerup=${this.handlePointerUp}
|
|
182975
|
+
@pointercancel=${this.handlePointerCancel}
|
|
182976
|
+
@lostpointercapture=${this.handleLostPointerCapture}
|
|
182977
|
+
@keydown=${(event) => {
|
|
182978
|
+
this.handleResourceContextKey(event, resourceArg, sessionIdArg);
|
|
182979
|
+
}}
|
|
182980
|
+
>
|
|
182981
|
+
<dees-icon icon="lucide:GripVertical" iconSize="13"></dees-icon>
|
|
182982
|
+
</button>
|
|
182983
|
+
<button
|
|
182984
|
+
class="resourcePrimary"
|
|
182985
|
+
type="button"
|
|
182986
|
+
aria-current=${selected ? "true" : "false"}
|
|
182987
|
+
@click=${() => this.emitResource("harness-resource-select", resourceArg, sessionIdArg)}
|
|
182988
|
+
@keydown=${(event) => {
|
|
182989
|
+
if (event.key === "Enter") {
|
|
182990
|
+
event.preventDefault();
|
|
182991
|
+
this.emitResource("harness-resource-open", resourceArg, sessionIdArg);
|
|
182992
|
+
return;
|
|
182993
|
+
}
|
|
182994
|
+
this.handleResourceContextKey(event, resourceArg, sessionIdArg);
|
|
182995
|
+
}}
|
|
182996
|
+
>
|
|
182997
|
+
<dees-icon
|
|
182998
|
+
class="resourceIcon"
|
|
182999
|
+
icon=${resourceArg.icon || "lucide:Box"}
|
|
183000
|
+
iconSize="14"
|
|
183001
|
+
></dees-icon>
|
|
183002
|
+
<span class="resourceCopy">
|
|
183003
|
+
<span class="resourceTitle">${resourceArg.title || resourceArg.id}</span>
|
|
183004
|
+
${resourceArg.preview ? b2`<span class="resourcePreview">${resourceArg.preview}</span>` : ""}
|
|
183005
|
+
<span class="resourceMeta">
|
|
183006
|
+
${resourceArg.kind}${resourceArg.state ? ` \xB7 ${resourceArg.state}` : ""}${resourceArg.updatedAt || resourceArg.createdAt ? ` \xB7 ${harnessFormatRelativeTime(resourceArg.updatedAt ?? resourceArg.createdAt)}` : ""}
|
|
183007
|
+
</span>
|
|
183008
|
+
</span>
|
|
183009
|
+
</button>
|
|
183010
|
+
<button
|
|
183011
|
+
class="resourceActions"
|
|
183012
|
+
type="button"
|
|
183013
|
+
title="Resource actions"
|
|
183014
|
+
aria-label=${`Actions for ${resourceArg.title || resourceArg.id}`}
|
|
183015
|
+
aria-haspopup="menu"
|
|
183016
|
+
aria-expanded=${contextOpen ? "true" : "false"}
|
|
183017
|
+
aria-keyshortcuts="ContextMenu Shift+F10"
|
|
183018
|
+
@click=${(event) => {
|
|
183019
|
+
event.stopPropagation();
|
|
183020
|
+
this.emitResourceContext(event, resourceArg, sessionIdArg, "action", event.currentTarget);
|
|
183021
|
+
}}
|
|
183022
|
+
@keydown=${(event) => {
|
|
183023
|
+
this.handleResourceContextKey(event, resourceArg, sessionIdArg);
|
|
183024
|
+
}}
|
|
183025
|
+
>
|
|
183026
|
+
<dees-icon icon="lucide:Ellipsis" iconSize="15"></dees-icon>
|
|
183027
|
+
</button>
|
|
183028
|
+
</li>
|
|
183029
|
+
`;
|
|
183030
|
+
}
|
|
182612
183031
|
eventTargetsExpandToggle(event) {
|
|
182613
183032
|
return event.composedPath().some(
|
|
182614
183033
|
(target) => target instanceof HTMLElement && target.classList.contains("expandToggle")
|
|
@@ -182619,6 +183038,11 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182619
183038
|
(target) => target instanceof HTMLElement && target.classList.contains("dragHandle")
|
|
182620
183039
|
);
|
|
182621
183040
|
}
|
|
183041
|
+
eventTargetsResourceControl(event) {
|
|
183042
|
+
return event.composedPath().some(
|
|
183043
|
+
(target) => target instanceof HTMLElement && (target.classList.contains("resourceDragHandle") || target.classList.contains("resourceActions"))
|
|
183044
|
+
);
|
|
183045
|
+
}
|
|
182622
183046
|
sessionStateLabel(state5) {
|
|
182623
183047
|
switch (state5) {
|
|
182624
183048
|
case "working":
|
|
@@ -182665,6 +183089,7 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182665
183089
|
if (!source) return;
|
|
182666
183090
|
const sourceRect = source.getBoundingClientRect();
|
|
182667
183091
|
this.pointerDragGesture = {
|
|
183092
|
+
type: "session",
|
|
182668
183093
|
pointerId: eventArg.pointerId,
|
|
182669
183094
|
handle: handle3,
|
|
182670
183095
|
source,
|
|
@@ -182685,6 +183110,33 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182685
183110
|
this.finishPointerDrag(false);
|
|
182686
183111
|
}
|
|
182687
183112
|
}
|
|
183113
|
+
handleResourcePointerDown(eventArg, resourceArg, fromSessionIdArg) {
|
|
183114
|
+
if (this.pointerDragGesture || eventArg.button !== 0 || !eventArg.isPrimary || this.eligibleSessionIds(resourceArg.id).every((sessionId) => sessionId === fromSessionIdArg)) return;
|
|
183115
|
+
const handle3 = eventArg.currentTarget;
|
|
183116
|
+
const source = handle3.closest(".resourceRow");
|
|
183117
|
+
if (!source) return;
|
|
183118
|
+
const sourceRect = source.getBoundingClientRect();
|
|
183119
|
+
this.pointerDragGesture = {
|
|
183120
|
+
type: "resource",
|
|
183121
|
+
pointerId: eventArg.pointerId,
|
|
183122
|
+
handle: handle3,
|
|
183123
|
+
source,
|
|
183124
|
+
resourceId: resourceArg.id,
|
|
183125
|
+
fromSessionId: fromSessionIdArg,
|
|
183126
|
+
startClientX: eventArg.clientX,
|
|
183127
|
+
startClientY: eventArg.clientY,
|
|
183128
|
+
grabOffsetX: eventArg.clientX - sourceRect.left,
|
|
183129
|
+
grabOffsetY: eventArg.clientY - sourceRect.top,
|
|
183130
|
+
phase: "pending"
|
|
183131
|
+
};
|
|
183132
|
+
window.addEventListener("keydown", this.handleDragKeyDown, true);
|
|
183133
|
+
window.addEventListener("blur", this.handleDragWindowBlur);
|
|
183134
|
+
try {
|
|
183135
|
+
handle3.setPointerCapture(eventArg.pointerId);
|
|
183136
|
+
} catch {
|
|
183137
|
+
this.finishPointerDrag(false);
|
|
183138
|
+
}
|
|
183139
|
+
}
|
|
182688
183140
|
startPointerDrag(eventArg, gestureArg) {
|
|
182689
183141
|
const sourceRect = gestureArg.source.getBoundingClientRect();
|
|
182690
183142
|
gestureArg.source.classList.add("dragging");
|
|
@@ -182710,6 +183162,23 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182710
183162
|
};
|
|
182711
183163
|
return true;
|
|
182712
183164
|
}
|
|
183165
|
+
startResourcePointerDrag(eventArg, gestureArg) {
|
|
183166
|
+
const sourceRect = gestureArg.source.getBoundingClientRect();
|
|
183167
|
+
gestureArg.source.classList.add("resourceDragging");
|
|
183168
|
+
gestureArg.source.style.setProperty("--resource-drag-preview-width", `${sourceRect.width}px`);
|
|
183169
|
+
this.moveResourceDragPreview(eventArg.clientX, eventArg.clientY, gestureArg);
|
|
183170
|
+
gestureArg.source.setAttribute("popover", "manual");
|
|
183171
|
+
try {
|
|
183172
|
+
gestureArg.source.showPopover();
|
|
183173
|
+
} catch {
|
|
183174
|
+
this.finishPointerDrag(false);
|
|
183175
|
+
return false;
|
|
183176
|
+
}
|
|
183177
|
+
gestureArg.phase = "active";
|
|
183178
|
+
this.draggingResourceId = gestureArg.resourceId;
|
|
183179
|
+
this.resourceDropTargetSessionId = "";
|
|
183180
|
+
return true;
|
|
183181
|
+
}
|
|
182713
183182
|
moveDragPreview(clientXArg, clientYArg, gestureArg) {
|
|
182714
183183
|
gestureArg.source.style.setProperty(
|
|
182715
183184
|
"--drag-preview-x",
|
|
@@ -182720,6 +183189,24 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182720
183189
|
`${clientYArg - gestureArg.grabOffsetY}px`
|
|
182721
183190
|
);
|
|
182722
183191
|
}
|
|
183192
|
+
moveResourceDragPreview(clientXArg, clientYArg, gestureArg) {
|
|
183193
|
+
gestureArg.source.style.setProperty(
|
|
183194
|
+
"--resource-drag-preview-x",
|
|
183195
|
+
`${clientXArg - gestureArg.grabOffsetX}px`
|
|
183196
|
+
);
|
|
183197
|
+
gestureArg.source.style.setProperty(
|
|
183198
|
+
"--resource-drag-preview-y",
|
|
183199
|
+
`${clientYArg - gestureArg.grabOffsetY}px`
|
|
183200
|
+
);
|
|
183201
|
+
}
|
|
183202
|
+
updateResourceDropTargetFromPointer(clientXArg, clientYArg) {
|
|
183203
|
+
const gesture = this.pointerDragGesture;
|
|
183204
|
+
if (gesture?.type !== "resource" || gesture.phase !== "active") return;
|
|
183205
|
+
const hit = this.shadowRoot?.elementFromPoint(clientXArg, clientYArg);
|
|
183206
|
+
const target = hit?.closest(".item[data-session-id]");
|
|
183207
|
+
const sessionId = target?.dataset.sessionId ?? "";
|
|
183208
|
+
this.resourceDropTargetSessionId = sessionId && sessionId !== gesture.fromSessionId && this.isResourceTargetEligible(gesture.resourceId, sessionId) ? sessionId : "";
|
|
183209
|
+
}
|
|
182723
183210
|
setDropSlot(groupIdArg, indexArg) {
|
|
182724
183211
|
const current = this.dropSlot;
|
|
182725
183212
|
if (current && current.groupId === groupIdArg && current.index === indexArg) return;
|
|
@@ -182737,7 +183224,8 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182737
183224
|
}
|
|
182738
183225
|
updateDragAutoScrollVelocity() {
|
|
182739
183226
|
const container = this.scrollContainer;
|
|
182740
|
-
|
|
183227
|
+
const gesture = this.pointerDragGesture;
|
|
183228
|
+
if (!container || gesture?.phase !== "active") return;
|
|
182741
183229
|
const rect = container.getBoundingClientRect();
|
|
182742
183230
|
if (this.dragAutoScrollClientX < rect.left || this.dragAutoScrollClientX > rect.right) {
|
|
182743
183231
|
this.stopDragAutoScroll();
|
|
@@ -182911,6 +183399,120 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182911
183399
|
this.keyboardMoveFocus = void 0;
|
|
182912
183400
|
}
|
|
182913
183401
|
}
|
|
183402
|
+
eligibleSessionIds(resourceIdArg) {
|
|
183403
|
+
const knownSessionIds = new Set(this.sessions.map((session) => session.id));
|
|
183404
|
+
const result = [];
|
|
183405
|
+
const seen = /* @__PURE__ */ new Set();
|
|
183406
|
+
for (const sessionId of this.eligibleSessionIdsByResourceId[resourceIdArg] ?? []) {
|
|
183407
|
+
if (!knownSessionIds.has(sessionId) || seen.has(sessionId)) continue;
|
|
183408
|
+
seen.add(sessionId);
|
|
183409
|
+
result.push(sessionId);
|
|
183410
|
+
}
|
|
183411
|
+
return result;
|
|
183412
|
+
}
|
|
183413
|
+
isResourceTargetEligible(resourceIdArg, sessionIdArg) {
|
|
183414
|
+
return this.eligibleSessionIds(resourceIdArg).includes(sessionIdArg);
|
|
183415
|
+
}
|
|
183416
|
+
emitResource(nameArg, resourceArg, sessionIdArg) {
|
|
183417
|
+
const detail = {
|
|
183418
|
+
resource: resourceArg,
|
|
183419
|
+
sessionId: sessionIdArg
|
|
183420
|
+
};
|
|
183421
|
+
this.dispatchEvent(new CustomEvent(nameArg, { detail, bubbles: true, composed: true }));
|
|
183422
|
+
}
|
|
183423
|
+
handleResourceContextKey(eventArg, resourceArg, sessionIdArg) {
|
|
183424
|
+
if (!(eventArg.key === "ContextMenu" || eventArg.key === "F10" && eventArg.shiftKey)) return;
|
|
183425
|
+
eventArg.preventDefault();
|
|
183426
|
+
eventArg.stopPropagation();
|
|
183427
|
+
this.emitResourceContext(
|
|
183428
|
+
eventArg,
|
|
183429
|
+
resourceArg,
|
|
183430
|
+
sessionIdArg,
|
|
183431
|
+
"keyboard",
|
|
183432
|
+
eventArg.currentTarget
|
|
183433
|
+
);
|
|
183434
|
+
}
|
|
183435
|
+
emitResourceContext(eventArg, resourceArg, sessionIdArg, sourceArg, focusTargetArg) {
|
|
183436
|
+
const rect = focusTargetArg.getBoundingClientRect();
|
|
183437
|
+
const contextGeneration = ++this.resourceContextGeneration;
|
|
183438
|
+
this.resourceContextResourceId = resourceArg.id;
|
|
183439
|
+
this.resourceContextFocusTarget = focusTargetArg;
|
|
183440
|
+
this.resourceContextFocusClass = [
|
|
183441
|
+
"resourceActions",
|
|
183442
|
+
"resourcePrimary",
|
|
183443
|
+
"resourceDragHandle"
|
|
183444
|
+
].find((className) => focusTargetArg.classList.contains(className)) ?? "resourcePrimary";
|
|
183445
|
+
const detail = {
|
|
183446
|
+
resource: resourceArg,
|
|
183447
|
+
sessionId: sessionIdArg,
|
|
183448
|
+
clientX: sourceArg === "pointer" && eventArg instanceof MouseEvent ? eventArg.clientX : rect.left + rect.width / 2,
|
|
183449
|
+
clientY: sourceArg === "pointer" && eventArg instanceof MouseEvent ? eventArg.clientY : rect.bottom,
|
|
183450
|
+
source: sourceArg,
|
|
183451
|
+
originalEvent: eventArg,
|
|
183452
|
+
requestAssociation: /* @__PURE__ */ __name((toSessionIdArg) => this.requestResourceAssociation(
|
|
183453
|
+
resourceArg.id,
|
|
183454
|
+
toSessionIdArg,
|
|
183455
|
+
sourceArg === "keyboard" ? "keyboard" : "action"
|
|
183456
|
+
), "requestAssociation"),
|
|
183457
|
+
close: /* @__PURE__ */ __name(() => this.closeResourceContext(contextGeneration), "close")
|
|
183458
|
+
};
|
|
183459
|
+
this.dispatchEvent(
|
|
183460
|
+
new CustomEvent("harness-resource-context", { detail, bubbles: true, composed: true })
|
|
183461
|
+
);
|
|
183462
|
+
}
|
|
183463
|
+
closeResourceContext(contextGenerationArg) {
|
|
183464
|
+
if (!this.isConnected || contextGenerationArg !== this.resourceContextGeneration) return;
|
|
183465
|
+
const focusTarget = this.resourceContextFocusTarget;
|
|
183466
|
+
const resourceId = this.resourceContextResourceId;
|
|
183467
|
+
const focusClass = this.resourceContextFocusClass;
|
|
183468
|
+
this.clearResourceContextState();
|
|
183469
|
+
const closeGeneration = this.resourceContextGeneration;
|
|
183470
|
+
void this.updateComplete.then(() => {
|
|
183471
|
+
if (!this.isConnected || closeGeneration !== this.resourceContextGeneration) return;
|
|
183472
|
+
if (focusTarget?.isConnected) {
|
|
183473
|
+
focusTarget.focus();
|
|
183474
|
+
return;
|
|
183475
|
+
}
|
|
183476
|
+
const row = Array.from(
|
|
183477
|
+
this.shadowRoot?.querySelectorAll(".resourceRow[data-resource-id]") ?? []
|
|
183478
|
+
).find((candidate) => candidate.dataset.resourceId === resourceId);
|
|
183479
|
+
row?.querySelector(`.${focusClass || "resourcePrimary"}`)?.focus();
|
|
183480
|
+
});
|
|
183481
|
+
}
|
|
183482
|
+
clearResourceContextState() {
|
|
183483
|
+
this.resourceContextGeneration += 1;
|
|
183484
|
+
this.resourceContextResourceId = "";
|
|
183485
|
+
this.resourceContextFocusTarget = void 0;
|
|
183486
|
+
this.resourceContextFocusClass = "";
|
|
183487
|
+
}
|
|
183488
|
+
reconcilePendingResourceAssociation() {
|
|
183489
|
+
const pending = this.pendingResourceAssociationRequest;
|
|
183490
|
+
if (!pending) return;
|
|
183491
|
+
if (!this.resourcesById.has(pending.resourceId)) {
|
|
183492
|
+
this.pendingResourceAssociationRequest = void 0;
|
|
183493
|
+
return;
|
|
183494
|
+
}
|
|
183495
|
+
const currentSessionId = this.acceptedResourceAssociations.get(pending.resourceId) ?? null;
|
|
183496
|
+
if (currentSessionId !== pending.toSessionId) {
|
|
183497
|
+
if (currentSessionId !== pending.fromSessionId) {
|
|
183498
|
+
const controlledSession = currentSessionId ? this.sessionsById.get(currentSessionId)?.title ?? currentSessionId : "unattached";
|
|
183499
|
+
this.moveAnnouncement = `Association request for ${pending.resourceTitle} was not applied; controlled association is ${controlledSession}.`;
|
|
183500
|
+
this.pendingResourceAssociationRequest = void 0;
|
|
183501
|
+
}
|
|
183502
|
+
return;
|
|
183503
|
+
}
|
|
183504
|
+
const fromSession = pending.fromSessionId ? this.sessionsById.get(pending.fromSessionId)?.title ?? pending.fromSessionId : "";
|
|
183505
|
+
const toSession = pending.toSessionId ? this.sessionsById.get(pending.toSessionId)?.title ?? pending.toSessionId : "";
|
|
183506
|
+
this.moveAnnouncement = pending.intent === "attach" ? `${pending.resourceTitle} is now attached to ${toSession}.` : pending.intent === "detach" ? `${pending.resourceTitle} is now detached from ${fromSession}.` : `${pending.resourceTitle} is now reassigned from ${fromSession} to ${toSession}.`;
|
|
183507
|
+
this.pendingResourceAssociationRequest = void 0;
|
|
183508
|
+
}
|
|
183509
|
+
resourceAssociationAnnouncement(detailArg, completedArg) {
|
|
183510
|
+
const resourceTitle = detailArg.resource.title || detailArg.resource.id;
|
|
183511
|
+
const fromTitle = detailArg.fromSessionId ? this.sessionsById.get(detailArg.fromSessionId)?.title ?? detailArg.fromSessionId : "";
|
|
183512
|
+
const toTitle = detailArg.toSessionId ? this.sessionsById.get(detailArg.toSessionId)?.title ?? detailArg.toSessionId : "";
|
|
183513
|
+
const verb = completedArg ? "completed" : "requested";
|
|
183514
|
+
return detailArg.intent === "attach" ? `Attach ${verb} for ${resourceTitle} to ${toTitle}.` : detailArg.intent === "detach" ? `Detach ${verb} for ${resourceTitle} from ${fromTitle}.` : `Reassign ${verb} for ${resourceTitle} from ${fromTitle} to ${toTitle}.`;
|
|
183515
|
+
}
|
|
182914
183516
|
async animateCardReflow(previousRectsArg, generationArg) {
|
|
182915
183517
|
await this.updateComplete;
|
|
182916
183518
|
if (generationArg !== this.reflowGeneration || !this.isConnected || globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches) return;
|
|
@@ -182943,7 +183545,11 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182943
183545
|
finishPointerDrag(commitArg) {
|
|
182944
183546
|
const gesture = this.pointerDragGesture;
|
|
182945
183547
|
if (!gesture) return;
|
|
182946
|
-
const
|
|
183548
|
+
const sessionMoveDetail = gesture.type === "session" && commitArg && gesture.phase === "active" && this.dropSlot ? this.createMoveDetail(gesture.sessionId, this.dropSlot.groupId, this.dropSlot.index) : void 0;
|
|
183549
|
+
const resourceRequest = gesture.type === "resource" && commitArg && gesture.phase === "active" && this.resourceDropTargetSessionId ? {
|
|
183550
|
+
resourceId: gesture.resourceId,
|
|
183551
|
+
toSessionId: this.resourceDropTargetSessionId
|
|
183552
|
+
} : void 0;
|
|
182947
183553
|
this.pointerDragGesture = void 0;
|
|
182948
183554
|
window.removeEventListener("keydown", this.handleDragKeyDown, true);
|
|
182949
183555
|
window.removeEventListener("blur", this.handleDragWindowBlur);
|
|
@@ -182952,14 +183558,19 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182952
183558
|
this.cancelReflowAnimations();
|
|
182953
183559
|
if (gesture.source.matches(":popover-open")) gesture.source.hidePopover();
|
|
182954
183560
|
gesture.source.removeAttribute("popover");
|
|
182955
|
-
gesture.source.classList.remove("dragging");
|
|
183561
|
+
gesture.source.classList.remove("dragging", "resourceDragging");
|
|
182956
183562
|
for (const property2 of [
|
|
182957
183563
|
"--drag-preview-width",
|
|
182958
183564
|
"--drag-preview-height",
|
|
182959
183565
|
"--drag-preview-x",
|
|
182960
|
-
"--drag-preview-y"
|
|
183566
|
+
"--drag-preview-y",
|
|
183567
|
+
"--resource-drag-preview-width",
|
|
183568
|
+
"--resource-drag-preview-x",
|
|
183569
|
+
"--resource-drag-preview-y"
|
|
182961
183570
|
]) gesture.source.style.removeProperty(property2);
|
|
182962
183571
|
this.draggingSessionId = "";
|
|
183572
|
+
this.draggingResourceId = "";
|
|
183573
|
+
this.resourceDropTargetSessionId = "";
|
|
182963
183574
|
this.draggedItemHeight = 0;
|
|
182964
183575
|
this.dropSlot = void 0;
|
|
182965
183576
|
try {
|
|
@@ -182968,11 +183579,18 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
|
|
|
182968
183579
|
}
|
|
182969
183580
|
} catch {
|
|
182970
183581
|
}
|
|
182971
|
-
if (
|
|
183582
|
+
if (sessionMoveDetail) {
|
|
182972
183583
|
this.dispatchEvent(
|
|
182973
|
-
new CustomEvent("harness-session-move", {
|
|
183584
|
+
new CustomEvent("harness-session-move", {
|
|
183585
|
+
detail: sessionMoveDetail,
|
|
183586
|
+
bubbles: true,
|
|
183587
|
+
composed: true
|
|
183588
|
+
})
|
|
182974
183589
|
);
|
|
182975
183590
|
}
|
|
183591
|
+
if (resourceRequest) {
|
|
183592
|
+
this.requestResourceAssociation(resourceRequest.resourceId, resourceRequest.toSessionId, "drop");
|
|
183593
|
+
}
|
|
182976
183594
|
}
|
|
182977
183595
|
emit(name, session) {
|
|
182978
183596
|
this.dispatchEvent(new CustomEvent(name, { detail: { session }, bubbles: true, composed: true }));
|
|
@@ -182986,8 +183604,14 @@ _emptyText2 = new WeakMap();
|
|
|
182986
183604
|
_groups2 = new WeakMap();
|
|
182987
183605
|
_enableGrouping = new WeakMap();
|
|
182988
183606
|
_ungroupedSessionIds = new WeakMap();
|
|
183607
|
+
_resources = new WeakMap();
|
|
183608
|
+
_resourceAssociations = new WeakMap();
|
|
183609
|
+
_selectedResourceId = new WeakMap();
|
|
183610
|
+
_eligibleSessionIdsByResourceId = new WeakMap();
|
|
182989
183611
|
_search = new WeakMap();
|
|
182990
183612
|
_draggingSessionId = new WeakMap();
|
|
183613
|
+
_draggingResourceId = new WeakMap();
|
|
183614
|
+
_resourceDropTargetSessionId = new WeakMap();
|
|
182991
183615
|
_dropSlot = new WeakMap();
|
|
182992
183616
|
_draggedItemHeight = new WeakMap();
|
|
182993
183617
|
_expandedSessionIds = new WeakMap();
|
|
@@ -182995,6 +183619,7 @@ _collapsedGroupIds = new WeakMap();
|
|
|
182995
183619
|
_topScrollShadowVisible = new WeakMap();
|
|
182996
183620
|
_bottomScrollShadowVisible = new WeakMap();
|
|
182997
183621
|
_moveAnnouncement = new WeakMap();
|
|
183622
|
+
_resourceContextResourceId = new WeakMap();
|
|
182998
183623
|
__decorateElement(_init92, 4, "sessions", _sessions_dec, _DeesHarnessSessionList, _sessions);
|
|
182999
183624
|
__decorateElement(_init92, 4, "selectedSessionId", _selectedSessionId_dec, _DeesHarnessSessionList, _selectedSessionId);
|
|
183000
183625
|
__decorateElement(_init92, 4, "loading", _loading_dec4, _DeesHarnessSessionList, _loading4);
|
|
@@ -183002,8 +183627,14 @@ __decorateElement(_init92, 4, "emptyText", _emptyText_dec2, _DeesHarnessSessionL
|
|
|
183002
183627
|
__decorateElement(_init92, 4, "groups", _groups_dec2, _DeesHarnessSessionList, _groups2);
|
|
183003
183628
|
__decorateElement(_init92, 4, "enableGrouping", _enableGrouping_dec, _DeesHarnessSessionList, _enableGrouping);
|
|
183004
183629
|
__decorateElement(_init92, 4, "ungroupedSessionIds", _ungroupedSessionIds_dec, _DeesHarnessSessionList, _ungroupedSessionIds);
|
|
183630
|
+
__decorateElement(_init92, 4, "resources", _resources_dec, _DeesHarnessSessionList, _resources);
|
|
183631
|
+
__decorateElement(_init92, 4, "resourceAssociations", _resourceAssociations_dec, _DeesHarnessSessionList, _resourceAssociations);
|
|
183632
|
+
__decorateElement(_init92, 4, "selectedResourceId", _selectedResourceId_dec, _DeesHarnessSessionList, _selectedResourceId);
|
|
183633
|
+
__decorateElement(_init92, 4, "eligibleSessionIdsByResourceId", _eligibleSessionIdsByResourceId_dec, _DeesHarnessSessionList, _eligibleSessionIdsByResourceId);
|
|
183005
183634
|
__decorateElement(_init92, 4, "search", _search_dec, _DeesHarnessSessionList, _search);
|
|
183006
183635
|
__decorateElement(_init92, 4, "draggingSessionId", _draggingSessionId_dec, _DeesHarnessSessionList, _draggingSessionId);
|
|
183636
|
+
__decorateElement(_init92, 4, "draggingResourceId", _draggingResourceId_dec, _DeesHarnessSessionList, _draggingResourceId);
|
|
183637
|
+
__decorateElement(_init92, 4, "resourceDropTargetSessionId", _resourceDropTargetSessionId_dec, _DeesHarnessSessionList, _resourceDropTargetSessionId);
|
|
183007
183638
|
__decorateElement(_init92, 4, "dropSlot", _dropSlot_dec, _DeesHarnessSessionList, _dropSlot);
|
|
183008
183639
|
__decorateElement(_init92, 4, "draggedItemHeight", _draggedItemHeight_dec, _DeesHarnessSessionList, _draggedItemHeight);
|
|
183009
183640
|
__decorateElement(_init92, 4, "expandedSessionIds", _expandedSessionIds_dec, _DeesHarnessSessionList, _expandedSessionIds);
|
|
@@ -183011,6 +183642,7 @@ __decorateElement(_init92, 4, "collapsedGroupIds", _collapsedGroupIds_dec, _Dees
|
|
|
183011
183642
|
__decorateElement(_init92, 4, "topScrollShadowVisible", _topScrollShadowVisible_dec, _DeesHarnessSessionList, _topScrollShadowVisible);
|
|
183012
183643
|
__decorateElement(_init92, 4, "bottomScrollShadowVisible", _bottomScrollShadowVisible_dec, _DeesHarnessSessionList, _bottomScrollShadowVisible);
|
|
183013
183644
|
__decorateElement(_init92, 4, "moveAnnouncement", _moveAnnouncement_dec, _DeesHarnessSessionList, _moveAnnouncement);
|
|
183645
|
+
__decorateElement(_init92, 4, "resourceContextResourceId", _resourceContextResourceId_dec, _DeesHarnessSessionList, _resourceContextResourceId);
|
|
183014
183646
|
_DeesHarnessSessionList = __decorateElement(_init92, 0, "DeesHarnessSessionList", _DeesHarnessSessionList_decorators, _DeesHarnessSessionList);
|
|
183015
183647
|
__name(_DeesHarnessSessionList, "DeesHarnessSessionList");
|
|
183016
183648
|
__publicField(_DeesHarnessSessionList, "demo", demoFunc65);
|
|
@@ -183261,6 +183893,12 @@ __publicField(_DeesHarnessSessionList, "styles", [
|
|
|
183261
183893
|
--card-accent: var(--session-error);
|
|
183262
183894
|
}
|
|
183263
183895
|
|
|
183896
|
+
.item.resourceDropTarget {
|
|
183897
|
+
outline: 2px solid var(--dees-color-accent-primary);
|
|
183898
|
+
outline-offset: 2px;
|
|
183899
|
+
box-shadow: 0 0 0 5px var(--dees-color-focus-ring), var(--dees-shadow-lg);
|
|
183900
|
+
}
|
|
183901
|
+
|
|
183264
183902
|
@keyframes attentionPulse {
|
|
183265
183903
|
0%, 100% {
|
|
183266
183904
|
background: color-mix(in srgb, var(--dees-color-bg-primary) 94%, var(--session-attention) 6%);
|
|
@@ -183435,6 +184073,183 @@ __publicField(_DeesHarnessSessionList, "styles", [
|
|
|
183435
184073
|
font-size: var(--dees-font-caption2-size, 10px);
|
|
183436
184074
|
}
|
|
183437
184075
|
|
|
184076
|
+
.resourceDropLabel {
|
|
184077
|
+
margin: 0 10px 10px;
|
|
184078
|
+
padding: 6px 9px;
|
|
184079
|
+
border-radius: var(--dees-radius-md);
|
|
184080
|
+
background: color-mix(in srgb, var(--dees-color-accent-primary) 14%, transparent);
|
|
184081
|
+
color: var(--dees-color-accent-primary);
|
|
184082
|
+
font-size: var(--dees-font-caption1-size, 11px);
|
|
184083
|
+
font-weight: 680;
|
|
184084
|
+
text-align: center;
|
|
184085
|
+
}
|
|
184086
|
+
|
|
184087
|
+
.resourceChildren {
|
|
184088
|
+
display: grid;
|
|
184089
|
+
gap: 4px;
|
|
184090
|
+
margin: 0 8px 8px 24px;
|
|
184091
|
+
padding: 0;
|
|
184092
|
+
list-style: none;
|
|
184093
|
+
}
|
|
184094
|
+
|
|
184095
|
+
.resourceSection {
|
|
184096
|
+
margin-top: var(--dees-spacing-md);
|
|
184097
|
+
}
|
|
184098
|
+
|
|
184099
|
+
.resourceSectionTitle {
|
|
184100
|
+
margin: 0 0 7px;
|
|
184101
|
+
padding: var(--dees-spacing-xs) 6px;
|
|
184102
|
+
color: var(--dees-color-text-secondary);
|
|
184103
|
+
font-size: var(--dees-font-caption1-size, 11px);
|
|
184104
|
+
font-weight: 650;
|
|
184105
|
+
letter-spacing: 0.05em;
|
|
184106
|
+
text-transform: uppercase;
|
|
184107
|
+
}
|
|
184108
|
+
|
|
184109
|
+
.resourceList {
|
|
184110
|
+
display: grid;
|
|
184111
|
+
gap: var(--dees-spacing-sm);
|
|
184112
|
+
margin: 0;
|
|
184113
|
+
padding: 0;
|
|
184114
|
+
list-style: none;
|
|
184115
|
+
}
|
|
184116
|
+
|
|
184117
|
+
.resourceRow {
|
|
184118
|
+
display: grid;
|
|
184119
|
+
grid-template-columns: 26px minmax(0, 1fr) 38px;
|
|
184120
|
+
min-width: 0;
|
|
184121
|
+
overflow: hidden;
|
|
184122
|
+
border: 1px solid var(--dees-color-border-subtle);
|
|
184123
|
+
border-radius: var(--dees-radius-lg);
|
|
184124
|
+
background: color-mix(in srgb, var(--dees-color-bg-secondary) 76%, transparent);
|
|
184125
|
+
color: var(--dees-color-text-primary);
|
|
184126
|
+
box-shadow: var(--dees-shadow-xs);
|
|
184127
|
+
box-sizing: border-box;
|
|
184128
|
+
}
|
|
184129
|
+
|
|
184130
|
+
.resourceRow.selected {
|
|
184131
|
+
border-color: var(--dees-color-accent-primary);
|
|
184132
|
+
background: color-mix(in srgb, var(--dees-color-accent-primary) 10%, var(--dees-color-bg-secondary));
|
|
184133
|
+
}
|
|
184134
|
+
|
|
184135
|
+
.resourceRow.resourceDragging {
|
|
184136
|
+
position: fixed;
|
|
184137
|
+
inset: 0 auto auto 0;
|
|
184138
|
+
width: var(--resource-drag-preview-width);
|
|
184139
|
+
max-width: none;
|
|
184140
|
+
margin: 0;
|
|
184141
|
+
opacity: 0.96;
|
|
184142
|
+
pointer-events: none;
|
|
184143
|
+
transform: translate3d(var(--resource-drag-preview-x), var(--resource-drag-preview-y), 0);
|
|
184144
|
+
box-shadow: var(--dees-shadow-xl);
|
|
184145
|
+
}
|
|
184146
|
+
|
|
184147
|
+
.resourceDragHandle,
|
|
184148
|
+
.resourcePrimary,
|
|
184149
|
+
.resourceActions {
|
|
184150
|
+
appearance: none;
|
|
184151
|
+
border: 0;
|
|
184152
|
+
background: transparent;
|
|
184153
|
+
color: inherit;
|
|
184154
|
+
font-family: inherit;
|
|
184155
|
+
}
|
|
184156
|
+
|
|
184157
|
+
.resourceDragHandle {
|
|
184158
|
+
display: grid;
|
|
184159
|
+
place-items: center;
|
|
184160
|
+
min-width: 26px;
|
|
184161
|
+
padding: 0;
|
|
184162
|
+
color: var(--dees-color-text-muted);
|
|
184163
|
+
cursor: grab;
|
|
184164
|
+
touch-action: none;
|
|
184165
|
+
}
|
|
184166
|
+
|
|
184167
|
+
.resourceDragHandle:disabled {
|
|
184168
|
+
opacity: 0.35;
|
|
184169
|
+
cursor: default;
|
|
184170
|
+
}
|
|
184171
|
+
|
|
184172
|
+
.resourceDragHandle:not(:disabled):active {
|
|
184173
|
+
cursor: grabbing;
|
|
184174
|
+
}
|
|
184175
|
+
|
|
184176
|
+
.resourcePrimary {
|
|
184177
|
+
display: flex;
|
|
184178
|
+
min-width: 0;
|
|
184179
|
+
min-height: 38px;
|
|
184180
|
+
align-items: center;
|
|
184181
|
+
gap: 7px;
|
|
184182
|
+
padding: 5px 4px 5px 7px;
|
|
184183
|
+
text-align: left;
|
|
184184
|
+
cursor: pointer;
|
|
184185
|
+
}
|
|
184186
|
+
|
|
184187
|
+
.resourceIcon {
|
|
184188
|
+
flex: 0 0 auto;
|
|
184189
|
+
color: var(--dees-color-text-secondary);
|
|
184190
|
+
}
|
|
184191
|
+
|
|
184192
|
+
.resourceCopy {
|
|
184193
|
+
min-width: 0;
|
|
184194
|
+
flex: 1;
|
|
184195
|
+
}
|
|
184196
|
+
|
|
184197
|
+
.resourceTitle {
|
|
184198
|
+
display: block;
|
|
184199
|
+
overflow: hidden;
|
|
184200
|
+
color: var(--dees-color-text-primary);
|
|
184201
|
+
font-size: var(--dees-font-caption1-size, 11px);
|
|
184202
|
+
font-weight: 620;
|
|
184203
|
+
text-overflow: ellipsis;
|
|
184204
|
+
white-space: nowrap;
|
|
184205
|
+
}
|
|
184206
|
+
|
|
184207
|
+
.resourcePreview {
|
|
184208
|
+
display: block;
|
|
184209
|
+
overflow: hidden;
|
|
184210
|
+
margin-top: 1px;
|
|
184211
|
+
color: var(--dees-color-text-secondary);
|
|
184212
|
+
font-size: var(--dees-font-caption2-size, 10px);
|
|
184213
|
+
text-overflow: ellipsis;
|
|
184214
|
+
white-space: nowrap;
|
|
184215
|
+
}
|
|
184216
|
+
|
|
184217
|
+
.resourceMeta {
|
|
184218
|
+
display: block;
|
|
184219
|
+
overflow: hidden;
|
|
184220
|
+
margin-top: 1px;
|
|
184221
|
+
color: var(--dees-color-text-muted);
|
|
184222
|
+
font-size: var(--dees-font-caption2-size, 10px);
|
|
184223
|
+
text-overflow: ellipsis;
|
|
184224
|
+
white-space: nowrap;
|
|
184225
|
+
}
|
|
184226
|
+
|
|
184227
|
+
.resourceActions {
|
|
184228
|
+
display: grid;
|
|
184229
|
+
place-items: center;
|
|
184230
|
+
min-width: 34px;
|
|
184231
|
+
min-height: 34px;
|
|
184232
|
+
margin: 2px;
|
|
184233
|
+
padding: 0;
|
|
184234
|
+
border-radius: var(--dees-radius-md);
|
|
184235
|
+
color: var(--dees-color-text-muted);
|
|
184236
|
+
cursor: pointer;
|
|
184237
|
+
}
|
|
184238
|
+
|
|
184239
|
+
.resourceActions:hover {
|
|
184240
|
+
background: var(--dees-color-hover);
|
|
184241
|
+
color: var(--dees-color-text-primary);
|
|
184242
|
+
}
|
|
184243
|
+
|
|
184244
|
+
.resourceDragHandle:focus-visible,
|
|
184245
|
+
.resourcePrimary:focus-visible,
|
|
184246
|
+
.resourceActions:focus-visible {
|
|
184247
|
+
z-index: 1;
|
|
184248
|
+
outline: 2px solid var(--dees-color-accent-primary);
|
|
184249
|
+
outline-offset: -3px;
|
|
184250
|
+
border-radius: var(--dees-radius-md);
|
|
184251
|
+
}
|
|
184252
|
+
|
|
183438
184253
|
.visuallyHidden {
|
|
183439
184254
|
position: absolute;
|
|
183440
184255
|
width: 1px;
|
|
@@ -183561,6 +184376,33 @@ __publicField(_DeesHarnessSessionList, "styles", [
|
|
|
183561
184376
|
transition: none;
|
|
183562
184377
|
}
|
|
183563
184378
|
}
|
|
184379
|
+
|
|
184380
|
+
@media (pointer: coarse) {
|
|
184381
|
+
.resourceRow {
|
|
184382
|
+
grid-template-columns: 44px minmax(0, 1fr) 44px;
|
|
184383
|
+
}
|
|
184384
|
+
|
|
184385
|
+
.resourceDragHandle,
|
|
184386
|
+
.resourceActions {
|
|
184387
|
+
min-width: 44px;
|
|
184388
|
+
min-height: 44px;
|
|
184389
|
+
margin: 0;
|
|
184390
|
+
}
|
|
184391
|
+
|
|
184392
|
+
.resourcePrimary {
|
|
184393
|
+
min-height: 44px;
|
|
184394
|
+
}
|
|
184395
|
+
}
|
|
184396
|
+
|
|
184397
|
+
@media (max-width: 280px) {
|
|
184398
|
+
.resourceChildren {
|
|
184399
|
+
margin-left: 8px;
|
|
184400
|
+
}
|
|
184401
|
+
|
|
184402
|
+
.resourcePreview {
|
|
184403
|
+
display: none;
|
|
184404
|
+
}
|
|
184405
|
+
}
|
|
183564
184406
|
`
|
|
183565
184407
|
]);
|
|
183566
184408
|
__runInitializers(_init92, 1, _DeesHarnessSessionList);
|
|
@@ -186353,6 +187195,7 @@ var computeResizeDimensions = /* @__PURE__ */ __name(({
|
|
|
186353
187195
|
}, "computeResizeDimensions");
|
|
186354
187196
|
|
|
186355
187197
|
// ts_web/elements/00group-layout/dees-dashboardgrid/contextmenu.ts
|
|
187198
|
+
init_dees_contextmenu();
|
|
186356
187199
|
init_plugins4();
|
|
186357
187200
|
var openWidgetContextMenu = /* @__PURE__ */ __name(({
|
|
186358
187201
|
widget,
|
|
@@ -186375,6 +187218,7 @@ var openWidgetContextMenu = /* @__PURE__ */ __name(({
|
|
|
186375
187218
|
// ts_web/elements/00group-layout/dees-dashboardgrid/dees-dashboardgrid.ts
|
|
186376
187219
|
init_dist_ts26();
|
|
186377
187220
|
init_dees_icon();
|
|
187221
|
+
init_dees_contextmenu();
|
|
186378
187222
|
var _previewWidgets_dec, _resolvedMargins_dec, _metrics_dec3, _placeholderPosition_dec, _activeBreakpoint_dec, _layouts_dec, _showGridLines_dec, _rtl_dec, _cellHeightUnit_dec, _enableAnimation_dec, _editable_dec, _columns_dec3, _margin_dec, _cellHeight_dec, _widgets_dec2, _a96, _DeesDashboardgrid_decorators, _init97, _widgets2, _cellHeight, _margin, _columns3, _editable, _enableAnimation, _cellHeightUnit, _rtl, _showGridLines, _layouts, _activeBreakpoint, _placeholderPosition, _metrics3, _resolvedMargins, _previewWidgets;
|
|
186379
187223
|
_DeesDashboardgrid_decorators = [customElement("dees-dashboardgrid")];
|
|
186380
187224
|
var _DeesDashboardgrid = class _DeesDashboardgrid extends (_a96 = DeesElement, _widgets_dec2 = [n5({ type: Array })], _cellHeight_dec = [n5({ type: Number })], _margin_dec = [n5({ type: Object })], _columns_dec3 = [n5({ type: Number })], _editable_dec = [n5({ type: Boolean })], _enableAnimation_dec = [n5({ type: Boolean, reflect: true })], _cellHeightUnit_dec = [n5({ type: String })], _rtl_dec = [n5({ type: Boolean })], _showGridLines_dec = [n5({ type: Boolean })], _layouts_dec = [n5({ attribute: false })], _activeBreakpoint_dec = [n5({ type: String })], _placeholderPosition_dec = [r5()], _metrics_dec3 = [r5()], _resolvedMargins_dec = [r5()], _previewWidgets_dec = [r5()], _a96) {
|
|
@@ -196260,6 +197104,9 @@ __publicField(_DeesThumbnailFolder, "styles", [
|
|
|
196260
197104
|
__runInitializers(_init115, 1, _DeesThumbnailFolder);
|
|
196261
197105
|
var DeesThumbnailFolder = _DeesThumbnailFolder;
|
|
196262
197106
|
|
|
197107
|
+
// ts_web/elements/00group-overlay/dees-contextmenu/index.ts
|
|
197108
|
+
init_dees_contextmenu();
|
|
197109
|
+
|
|
196263
197110
|
// ts_web/elements/00group-overlay/dees-modal/index.ts
|
|
196264
197111
|
init_dees_modal();
|
|
196265
197112
|
|
|
@@ -200848,6 +201695,8 @@ init_dist_ts26();
|
|
|
200848
201695
|
init_dist_ts25();
|
|
200849
201696
|
init_theme();
|
|
200850
201697
|
init_dees_icon();
|
|
201698
|
+
init_dees_contextmenu();
|
|
201699
|
+
init_dees_contextmenu();
|
|
200851
201700
|
init_dees_modal();
|
|
200852
201701
|
var _errorMessage_dec, _isLoading_dec3, _treeData_dec, _selectedPath_dec, _rootPath_dec, _executionEnvironment_dec2, _a124, _DeesWorkspaceFiletree_decorators, _init127, _executionEnvironment2, _rootPath, _selectedPath, _treeData, _isLoading3, _errorMessage;
|
|
200853
201702
|
_DeesWorkspaceFiletree_decorators = [customElement("dees-workspace-filetree")];
|
|
@@ -202154,6 +203003,7 @@ var demoFunc82 = /* @__PURE__ */ __name(() => b2`
|
|
|
202154
203003
|
init_dist_ts26();
|
|
202155
203004
|
init_theme();
|
|
202156
203005
|
init_dees_icon();
|
|
203006
|
+
init_dees_contextmenu();
|
|
202157
203007
|
var _isCheckingPackages_dec, _outdatedPackages_dec, _packageStatus_dec, _scripts_dec, _executionEnvironment_dec3, _a126, _DeesWorkspaceBottombar_decorators, _init129, _executionEnvironment3, _scripts, _packageStatus, _outdatedPackages, _isCheckingPackages;
|
|
202158
203008
|
_DeesWorkspaceBottombar_decorators = [customElement("dees-workspace-bottombar")];
|
|
202159
203009
|
var _DeesWorkspaceBottombar = class _DeesWorkspaceBottombar extends (_a126 = DeesElement, _executionEnvironment_dec3 = [n5({ type: Object })], _scripts_dec = [r5()], _packageStatus_dec = [r5()], _outdatedPackages_dec = [r5()], _isCheckingPackages_dec = [r5()], _a126) {
|
|
@@ -203237,6 +204087,7 @@ init_group_runtime();
|
|
|
203237
204087
|
init_dees_workspace_terminal();
|
|
203238
204088
|
init_dees_workspace_terminal();
|
|
203239
204089
|
init_dees_icon();
|
|
204090
|
+
init_dees_contextmenu();
|
|
203240
204091
|
init_dees_actionbar();
|
|
203241
204092
|
var _diffViewConfig_dec, _showDiffView_dec, _isDraggingTerminal_dec, _isDraggingFileTree_dec, _currentTerminalHeight_dec, _currentFileTreeWidth_dec, _initOutput_dec, _initCommand_dec, _autoSave_dec, _diagnosticMarkers_dec, _activeBottomPanel_dec, _isInitializing_dec, _isFileTreeCollapsed_dec, _isTerminalCollapsed_dec, _activeFilePath_dec, _openFiles_dec, _terminalHeight_dec, _fileTreeWidth_dec, _showTerminal_dec, _showFileTree_dec, _initializationPromise_dec, _executionEnvironment_dec4, _a128, _DeesWorkspace_decorators, _init131, _executionEnvironment4, _initializationPromise, _showFileTree, _showTerminal, _fileTreeWidth, _terminalHeight, _openFiles, _activeFilePath, _isTerminalCollapsed, _isFileTreeCollapsed, _isInitializing, _activeBottomPanel, _diagnosticMarkers, _autoSave, _initCommand, _initOutput, _currentFileTreeWidth, _currentTerminalHeight, _isDraggingFileTree, _isDraggingTerminal, _showDiffView, _diffViewConfig;
|
|
203242
204093
|
_DeesWorkspace_decorators = [customElement("dees-workspace")];
|
|
@@ -205642,7 +206493,7 @@ init_group_runtime();
|
|
|
205642
206493
|
// ts_web/00_commitinfo_data.ts
|
|
205643
206494
|
var commitinfo = {
|
|
205644
206495
|
name: "@design.estate/dees-catalog",
|
|
205645
|
-
version: "6.
|
|
206496
|
+
version: "6.7.0",
|
|
205646
206497
|
description: "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript."
|
|
205647
206498
|
};
|
|
205648
206499
|
|