@design.estate/dees-catalog 6.6.0 → 6.7.1

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.
@@ -510,7 +510,7 @@ var init_reactive_element = __esm({
510
510
  }
511
511
  });
512
512
 
513
- // node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js
513
+ // node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/lit-html.js
514
514
  function V(t8, i11) {
515
515
  if (!u2(t8) || !t8.hasOwnProperty("raw")) throw Error("invalid template strings array");
516
516
  return void 0 !== e3 ? e3.createHTML(i11) : i11;
@@ -523,7 +523,7 @@ function M(t8, i11, s9 = t8, e10) {
523
523
  }
524
524
  var t2, i3, s2, e3, h2, o3, n3, r3, l2, c3, a2, u2, d2, f2, v, _, m, p2, g, $, y2, x, b2, w, T, E, A, C, P, N, S2, R, k, H, I, L, z, Z, j, B, D;
525
525
  var init_lit_html = __esm({
526
- "node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js"() {
526
+ "node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/lit-html.js"() {
527
527
  t2 = globalThis, i3 = /* @__PURE__ */ __name((t8) => t8, "i"), s2 = t2.trustedTypes, e3 = s2 ? s2.createPolicy("lit-html", { createHTML: /* @__PURE__ */ __name((t8) => t8, "createHTML") }) : void 0, h2 = "$lit$", o3 = `lit$${Math.random().toFixed(9).slice(2)}$`, n3 = "?" + o3, r3 = `<${n3}>`, l2 = document, c3 = /* @__PURE__ */ __name(() => l2.createComment(""), "c"), a2 = /* @__PURE__ */ __name((t8) => null === t8 || "object" != typeof t8 && "function" != typeof t8, "a"), u2 = Array.isArray, d2 = /* @__PURE__ */ __name((t8) => u2(t8) || "function" == typeof t8?.[Symbol.iterator], "d"), f2 = "[ \n\f\r]", v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, _ = /-->/g, m = />/g, p2 = RegExp(`>|${f2}(?:([^\\s"'>=/]+)(${f2}*=${f2}*(?:[^
528
528
  \f\r"'\`<>=]|("|')|))|$)`, "g"), g = /'/g, $ = /"/g, y2 = /^(?:script|style|textarea|title)$/i, x = /* @__PURE__ */ __name((t8) => (i11, ...s9) => ({ _$litType$: t8, strings: i11, values: s9 }), "x"), b2 = x(1), w = x(2), T = x(3), E = /* @__PURE__ */ Symbol.for("lit-noChange"), A = /* @__PURE__ */ Symbol.for("lit-nothing"), C = /* @__PURE__ */ new WeakMap(), P = l2.createTreeWalker(l2, 129);
529
529
  __name(V, "V");
@@ -754,7 +754,7 @@ var init_lit_html = __esm({
754
754
  }
755
755
  };
756
756
  j = { M: h2, P: o3, A: n3, C: 1, L: N, R, D: d2, V: M, I: k, H, N: L, U: z, B: I, F: Z }, B = t2.litHtmlPolyfillSupport;
757
- B?.(S2, k), (t2.litHtmlVersions ??= []).push("3.3.2");
757
+ B?.(S2, k), (t2.litHtmlVersions ??= []).push("3.3.3");
758
758
  D = /* @__PURE__ */ __name((t8, i11, s9) => {
759
759
  const e10 = s9?.renderBefore ?? i11;
760
760
  let h7 = e10._$litPart$;
@@ -811,17 +811,17 @@ var init_lit_element = __esm({
811
811
  }
812
812
  });
813
813
 
814
- // node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/is-server.js
814
+ // node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/is-server.js
815
815
  var o5;
816
816
  var init_is_server = __esm({
817
- "node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/is-server.js"() {
817
+ "node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/is-server.js"() {
818
818
  o5 = false;
819
819
  }
820
820
  });
821
821
 
822
- // node_modules/.pnpm/lit@3.3.2/node_modules/lit/index.js
822
+ // node_modules/.pnpm/lit@3.3.3/node_modules/lit/index.js
823
823
  var init_lit = __esm({
824
- "node_modules/.pnpm/lit@3.3.2/node_modules/lit/index.js"() {
824
+ "node_modules/.pnpm/lit@3.3.3/node_modules/lit/index.js"() {
825
825
  init_reactive_element();
826
826
  init_lit_html();
827
827
  init_lit_element();
@@ -6674,9 +6674,9 @@ var init_property = __esm({
6674
6674
  }
6675
6675
  });
6676
6676
 
6677
- // node_modules/.pnpm/lit@3.3.2/node_modules/lit/decorators/property.js
6677
+ // node_modules/.pnpm/lit@3.3.3/node_modules/lit/decorators/property.js
6678
6678
  var init_property2 = __esm({
6679
- "node_modules/.pnpm/lit@3.3.2/node_modules/lit/decorators/property.js"() {
6679
+ "node_modules/.pnpm/lit@3.3.3/node_modules/lit/decorators/property.js"() {
6680
6680
  init_property();
6681
6681
  }
6682
6682
  });
@@ -59707,10 +59707,10 @@ var init_classes_cssmanager = __esm({
59707
59707
  }
59708
59708
  });
59709
59709
 
59710
- // node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/static.js
59710
+ // node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/static.js
59711
59711
  var a3, o7, s5, i5, l3, n6, u3, c4, $2;
59712
59712
  var init_static = __esm({
59713
- "node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/static.js"() {
59713
+ "node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/static.js"() {
59714
59714
  init_lit_html();
59715
59715
  a3 = /* @__PURE__ */ Symbol.for(""), o7 = /* @__PURE__ */ __name((t8) => {
59716
59716
  if (t8?.r === a3) return t8?._$litStatic$;
@@ -59736,17 +59736,17 @@ var init_static = __esm({
59736
59736
  }
59737
59737
  });
59738
59738
 
59739
- // node_modules/.pnpm/lit@3.3.2/node_modules/lit/static-html.js
59739
+ // node_modules/.pnpm/lit@3.3.3/node_modules/lit/static-html.js
59740
59740
  var init_static_html = __esm({
59741
- "node_modules/.pnpm/lit@3.3.2/node_modules/lit/static-html.js"() {
59741
+ "node_modules/.pnpm/lit@3.3.3/node_modules/lit/static-html.js"() {
59742
59742
  init_static();
59743
59743
  }
59744
59744
  });
59745
59745
 
59746
- // node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive.js
59746
+ // node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directive.js
59747
59747
  var t3, e4, i6;
59748
59748
  var init_directive = __esm({
59749
- "node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive.js"() {
59749
+ "node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directive.js"() {
59750
59750
  t3 = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, e4 = /* @__PURE__ */ __name((t8) => (...e10) => ({ _$litDirective$: t8, values: e10 }), "e");
59751
59751
  i6 = class {
59752
59752
  static {
@@ -59770,10 +59770,10 @@ var init_directive = __esm({
59770
59770
  }
59771
59771
  });
59772
59772
 
59773
- // node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/unsafe-html.js
59773
+ // node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directives/unsafe-html.js
59774
59774
  var e5, o8;
59775
59775
  var init_unsafe_html = __esm({
59776
- "node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/unsafe-html.js"() {
59776
+ "node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directives/unsafe-html.js"() {
59777
59777
  init_lit_html();
59778
59778
  init_directive();
59779
59779
  e5 = class extends i6 {
@@ -59798,9 +59798,9 @@ var init_unsafe_html = __esm({
59798
59798
  }
59799
59799
  });
59800
59800
 
59801
- // node_modules/.pnpm/lit@3.3.2/node_modules/lit/directives/unsafe-html.js
59801
+ // node_modules/.pnpm/lit@3.3.3/node_modules/lit/directives/unsafe-html.js
59802
59802
  var init_unsafe_html2 = __esm({
59803
- "node_modules/.pnpm/lit@3.3.2/node_modules/lit/directives/unsafe-html.js"() {
59803
+ "node_modules/.pnpm/lit@3.3.3/node_modules/lit/directives/unsafe-html.js"() {
59804
59804
  init_unsafe_html();
59805
59805
  }
59806
59806
  });
@@ -59817,9 +59817,9 @@ var init_custom_element = __esm({
59817
59817
  }
59818
59818
  });
59819
59819
 
59820
- // node_modules/.pnpm/lit@3.3.2/node_modules/lit/decorators/custom-element.js
59820
+ // node_modules/.pnpm/lit@3.3.3/node_modules/lit/decorators/custom-element.js
59821
59821
  var init_custom_element2 = __esm({
59822
- "node_modules/.pnpm/lit@3.3.2/node_modules/lit/decorators/custom-element.js"() {
59822
+ "node_modules/.pnpm/lit@3.3.3/node_modules/lit/decorators/custom-element.js"() {
59823
59823
  init_custom_element();
59824
59824
  }
59825
59825
  });
@@ -59969,9 +59969,9 @@ var init_query_assigned_nodes = __esm({
59969
59969
  }
59970
59970
  });
59971
59971
 
59972
- // node_modules/.pnpm/lit@3.3.2/node_modules/lit/decorators.js
59972
+ // node_modules/.pnpm/lit@3.3.3/node_modules/lit/decorators.js
59973
59973
  var init_decorators = __esm({
59974
- "node_modules/.pnpm/lit@3.3.2/node_modules/lit/decorators.js"() {
59974
+ "node_modules/.pnpm/lit@3.3.3/node_modules/lit/decorators.js"() {
59975
59975
  init_custom_element();
59976
59976
  init_property();
59977
59977
  init_state2();
@@ -60177,10 +60177,10 @@ var init_decorators_containerresponsive = __esm({
60177
60177
  }
60178
60178
  });
60179
60179
 
60180
- // node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive-helpers.js
60180
+ // node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directive-helpers.js
60181
60181
  var t6, i7, n8, e9, l4, d3, c5, f4, r8, s6, v3, u4, m3, p5, M2, h3, j2;
60182
60182
  var init_directive_helpers = __esm({
60183
- "node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive-helpers.js"() {
60183
+ "node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directive-helpers.js"() {
60184
60184
  init_lit_html();
60185
60185
  ({ I: t6 } = j), i7 = /* @__PURE__ */ __name((o12) => o12, "i"), n8 = /* @__PURE__ */ __name((o12) => null === o12 || "object" != typeof o12 && "function" != typeof o12, "n"), e9 = { HTML: 1, SVG: 2, MATHML: 3 }, l4 = /* @__PURE__ */ __name((o12, t8) => void 0 === t8 ? void 0 !== o12?._$litType$ : o12?._$litType$ === t8, "l"), d3 = /* @__PURE__ */ __name((o12) => null != o12?._$litType$?.h, "d"), c5 = /* @__PURE__ */ __name((o12) => void 0 !== o12?._$litDirective$, "c"), f4 = /* @__PURE__ */ __name((o12) => o12?._$litDirective$, "f"), r8 = /* @__PURE__ */ __name((o12) => void 0 === o12.strings, "r"), s6 = /* @__PURE__ */ __name(() => document.createComment(""), "s"), v3 = /* @__PURE__ */ __name((o12, n11, e10) => {
60186
60186
  const l6 = o12._$AA.parentNode, d5 = void 0 === n11 ? o12._$AB : n11._$AA;
@@ -60210,7 +60210,7 @@ var init_directive_helpers = __esm({
60210
60210
  }
60211
60211
  });
60212
60212
 
60213
- // node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/async-directive.js
60213
+ // node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/async-directive.js
60214
60214
  function h4(i11) {
60215
60215
  void 0 !== this._$AN ? (o10(this), this._$AM = i11, r9(this)) : this._$AM = i11;
60216
60216
  }
@@ -60222,7 +60222,7 @@ function n9(i11, t8 = false, e10 = 0) {
60222
60222
  }
60223
60223
  var s7, o10, r9, c6, f5;
60224
60224
  var init_async_directive = __esm({
60225
- "node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/async-directive.js"() {
60225
+ "node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/async-directive.js"() {
60226
60226
  init_directive_helpers();
60227
60227
  init_directive();
60228
60228
  init_directive();
@@ -60278,9 +60278,9 @@ var init_async_directive = __esm({
60278
60278
  }
60279
60279
  });
60280
60280
 
60281
- // node_modules/.pnpm/lit@3.3.2/node_modules/lit/async-directive.js
60281
+ // node_modules/.pnpm/lit@3.3.3/node_modules/lit/async-directive.js
60282
60282
  var init_async_directive2 = __esm({
60283
- "node_modules/.pnpm/lit@3.3.2/node_modules/lit/async-directive.js"() {
60283
+ "node_modules/.pnpm/lit@3.3.3/node_modules/lit/async-directive.js"() {
60284
60284
  init_async_directive();
60285
60285
  }
60286
60286
  });
@@ -60418,10 +60418,10 @@ var init_classes_subscribewithtemplate = __esm({
60418
60418
  }
60419
60419
  });
60420
60420
 
60421
- // node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/private-async-helpers.js
60421
+ // node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directives/private-async-helpers.js
60422
60422
  var t7, s8, i8;
60423
60423
  var init_private_async_helpers = __esm({
60424
- "node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/private-async-helpers.js"() {
60424
+ "node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directives/private-async-helpers.js"() {
60425
60425
  t7 = /* @__PURE__ */ __name(async (t8, s9) => {
60426
60426
  for await (const i11 of t8) if (false === await s9(i11)) return;
60427
60427
  }, "t");
@@ -60462,10 +60462,10 @@ var init_private_async_helpers = __esm({
60462
60462
  }
60463
60463
  });
60464
60464
 
60465
- // node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/until.js
60465
+ // node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directives/until.js
60466
60466
  var n10, h5, c7, m4;
60467
60467
  var init_until = __esm({
60468
- "node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/until.js"() {
60468
+ "node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directives/until.js"() {
60469
60469
  init_lit_html();
60470
60470
  init_directive_helpers();
60471
60471
  init_async_directive();
@@ -60513,17 +60513,17 @@ var init_until = __esm({
60513
60513
  }
60514
60514
  });
60515
60515
 
60516
- // node_modules/.pnpm/lit@3.3.2/node_modules/lit/directives/until.js
60516
+ // node_modules/.pnpm/lit@3.3.3/node_modules/lit/directives/until.js
60517
60517
  var init_until2 = __esm({
60518
- "node_modules/.pnpm/lit@3.3.2/node_modules/lit/directives/until.js"() {
60518
+ "node_modules/.pnpm/lit@3.3.3/node_modules/lit/directives/until.js"() {
60519
60519
  init_until();
60520
60520
  }
60521
60521
  });
60522
60522
 
60523
- // node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/async-replace.js
60523
+ // node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directives/async-replace.js
60524
60524
  var o11, h6;
60525
60525
  var init_async_replace = __esm({
60526
- "node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/async-replace.js"() {
60526
+ "node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directives/async-replace.js"() {
60527
60527
  init_lit_html();
60528
60528
  init_async_directive();
60529
60529
  init_private_async_helpers();
@@ -60567,10 +60567,10 @@ var init_async_replace = __esm({
60567
60567
  }
60568
60568
  });
60569
60569
 
60570
- // node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/async-append.js
60570
+ // node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directives/async-append.js
60571
60571
  var c8;
60572
60572
  var init_async_append = __esm({
60573
- "node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/async-append.js"() {
60573
+ "node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directives/async-append.js"() {
60574
60574
  init_directive();
60575
60575
  init_async_replace();
60576
60576
  init_directive_helpers();
@@ -60590,17 +60590,17 @@ var init_async_append = __esm({
60590
60590
  }
60591
60591
  });
60592
60592
 
60593
- // node_modules/.pnpm/lit@3.3.2/node_modules/lit/directives/async-append.js
60593
+ // node_modules/.pnpm/lit@3.3.3/node_modules/lit/directives/async-append.js
60594
60594
  var init_async_append2 = __esm({
60595
- "node_modules/.pnpm/lit@3.3.2/node_modules/lit/directives/async-append.js"() {
60595
+ "node_modules/.pnpm/lit@3.3.3/node_modules/lit/directives/async-append.js"() {
60596
60596
  init_async_append();
60597
60597
  }
60598
60598
  });
60599
60599
 
60600
- // node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/keyed.js
60600
+ // node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directives/keyed.js
60601
60601
  var i9;
60602
60602
  var init_keyed = __esm({
60603
- "node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/keyed.js"() {
60603
+ "node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directives/keyed.js"() {
60604
60604
  init_lit_html();
60605
60605
  init_directive();
60606
60606
  init_directive_helpers();
@@ -60618,17 +60618,17 @@ var init_keyed = __esm({
60618
60618
  }
60619
60619
  });
60620
60620
 
60621
- // node_modules/.pnpm/lit@3.3.2/node_modules/lit/directives/keyed.js
60621
+ // node_modules/.pnpm/lit@3.3.3/node_modules/lit/directives/keyed.js
60622
60622
  var init_keyed2 = __esm({
60623
- "node_modules/.pnpm/lit@3.3.2/node_modules/lit/directives/keyed.js"() {
60623
+ "node_modules/.pnpm/lit@3.3.3/node_modules/lit/directives/keyed.js"() {
60624
60624
  init_keyed();
60625
60625
  }
60626
60626
  });
60627
60627
 
60628
- // node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/repeat.js
60628
+ // node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directives/repeat.js
60629
60629
  var u5, c9;
60630
60630
  var init_repeat2 = __esm({
60631
- "node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/repeat.js"() {
60631
+ "node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directives/repeat.js"() {
60632
60632
  init_lit_html();
60633
60633
  init_directive();
60634
60634
  init_directive_helpers();
@@ -60685,9 +60685,9 @@ var init_repeat2 = __esm({
60685
60685
  }
60686
60686
  });
60687
60687
 
60688
- // node_modules/.pnpm/lit@3.3.2/node_modules/lit/directives/repeat.js
60688
+ // node_modules/.pnpm/lit@3.3.3/node_modules/lit/directives/repeat.js
60689
60689
  var init_repeat3 = __esm({
60690
- "node_modules/.pnpm/lit@3.3.2/node_modules/lit/directives/repeat.js"() {
60690
+ "node_modules/.pnpm/lit@3.3.3/node_modules/lit/directives/repeat.js"() {
60691
60691
  init_repeat2();
60692
60692
  }
60693
60693
  });
@@ -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")];
@@ -173737,17 +173765,19 @@ var harnessCardStyles = i`
173737
173765
  .harness-card.outcomeScan::before {
173738
173766
  content: '';
173739
173767
  position: absolute;
173740
- inset: 0;
173768
+ inset: 0 auto 0 0;
173769
+ width: 250%;
173741
173770
  pointer-events: none;
173742
- background:
173743
- linear-gradient(
173744
- 105deg,
173745
- transparent 40%,
173746
- color-mix(in srgb, var(--dees-color-accent-primary) 6%, transparent) 45%,
173747
- color-mix(in srgb, var(--dees-color-accent-primary) 20%, transparent) 50%,
173748
- color-mix(in srgb, var(--dees-color-accent-primary) 6%, transparent) 55%,
173749
- transparent 60%
173750
- ) 100% 0 / 250% 100% no-repeat;
173771
+ background: linear-gradient(
173772
+ 105deg,
173773
+ transparent 40%,
173774
+ color-mix(in srgb, var(--dees-color-accent-primary) 6%, transparent) 45%,
173775
+ color-mix(in srgb, var(--dees-color-accent-primary) 20%, transparent) 50%,
173776
+ color-mix(in srgb, var(--dees-color-accent-primary) 6%, transparent) 55%,
173777
+ transparent 60%
173778
+ );
173779
+ transform: translate3d(-60%, 0, 0);
173780
+ will-change: transform;
173751
173781
  animation: harness-card-running-scan 2s linear infinite;
173752
173782
  opacity: 1;
173753
173783
  transition: opacity 0.18s var(--dees-ease-out);
@@ -173766,8 +173796,8 @@ var harnessCardStyles = i`
173766
173796
  }
173767
173797
 
173768
173798
  @keyframes harness-card-running-scan {
173769
- from { background-position: 100% 0; }
173770
- to { background-position: 0 0; }
173799
+ from { transform: translate3d(-60%, 0, 0); }
173800
+ to { transform: translate3d(0, 0, 0); }
173771
173801
  }
173772
173802
 
173773
173803
  @media (prefers-reduced-motion: reduce) {
@@ -173785,6 +173815,7 @@ var harnessCardStyles = i`
173785
173815
  animation: none;
173786
173816
  opacity: 0;
173787
173817
  transition: none;
173818
+ will-change: auto;
173788
173819
  }
173789
173820
  }
173790
173821
  `;
@@ -177280,18 +177311,18 @@ __publicField(_DeesHarnessToolCard, "styles", [
177280
177311
 
177281
177312
  @keyframes harness-card-open-chat-scan {
177282
177313
  0% {
177283
- background-position: 100% 0;
177314
+ transform: translate3d(-60%, 0, 0);
177284
177315
  opacity: 0;
177285
177316
  }
177286
177317
  1% {
177287
177318
  opacity: 0.35;
177288
177319
  }
177289
177320
  20% {
177290
- background-position: 0 0;
177321
+ transform: translate3d(0, 0, 0);
177291
177322
  opacity: 0.35;
177292
177323
  }
177293
177324
  24%, 100% {
177294
- background-position: 0 0;
177325
+ transform: translate3d(0, 0, 0);
177295
177326
  opacity: 0;
177296
177327
  }
177297
177328
  }
@@ -177680,7 +177711,8 @@ __publicField(_DeesHarnessToolCard, "styles", [
177680
177711
  .harness-card.outcomeScan::after {
177681
177712
  content: '';
177682
177713
  position: absolute;
177683
- inset: 0;
177714
+ inset: 0 auto 0 0;
177715
+ width: 250%;
177684
177716
  pointer-events: none;
177685
177717
  background: linear-gradient(
177686
177718
  105deg,
@@ -177689,7 +177721,9 @@ __publicField(_DeesHarnessToolCard, "styles", [
177689
177721
  color-mix(in srgb, var(--harness-outcome-scan-color) 14%, transparent) 50%,
177690
177722
  color-mix(in srgb, var(--harness-outcome-scan-color) 3%, transparent) 55%,
177691
177723
  transparent 60%
177692
- ) 100% 0 / 250% 100% no-repeat;
177724
+ );
177725
+ transform: translate3d(-60%, 0, 0);
177726
+ will-change: transform;
177693
177727
  animation: harness-tool-outcome-scan 0.48s linear 0.08s both;
177694
177728
  }
177695
177729
 
@@ -177703,8 +177737,8 @@ __publicField(_DeesHarnessToolCard, "styles", [
177703
177737
  }
177704
177738
 
177705
177739
  @keyframes harness-tool-outcome-scan {
177706
- from { background-position: 100% 0; }
177707
- to { background-position: 0 0; }
177740
+ from { transform: translate3d(-60%, 0, 0); }
177741
+ to { transform: translate3d(0, 0, 0); }
177708
177742
  }
177709
177743
 
177710
177744
  @media (prefers-reduced-motion: reduce) {
@@ -177719,6 +177753,7 @@ __publicField(_DeesHarnessToolCard, "styles", [
177719
177753
  .harness-card.outcomeScan::after {
177720
177754
  animation: none;
177721
177755
  opacity: 0;
177756
+ will-change: auto;
177722
177757
  }
177723
177758
  }
177724
177759
  `
@@ -177812,6 +177847,7 @@ var _DeesHarnessMessage = class _DeesHarnessMessage extends (_a82 = DeesElement,
177812
177847
  const roleClass = `role-${message2.role}`;
177813
177848
  return b2`
177814
177849
  <div class="message ${roleClass} ${message2.streaming ? "streaming" : ""} ${message2.error ? "has-error" : ""}">
177850
+ ${message2.role === "assistant" && message2.streaming ? b2`<span class="assistantActivityRail" aria-hidden="true"></span>` : ""}
177815
177851
  ${this.showRole || this.showTimestamp || message2.model ? b2`
177816
177852
  <div class="roleRow">
177817
177853
  ${this.showRole ? b2`<span class="roleLabel">${message2.role}</span>` : ""}
@@ -178051,35 +178087,43 @@ __publicField(_DeesHarnessMessage, "styles", [
178051
178087
  background: transparent;
178052
178088
  }
178053
178089
 
178054
- .message.role-assistant::before {
178055
- content: '';
178090
+ .assistantActivityRail {
178056
178091
  position: absolute;
178057
178092
  inset: 0 auto 0 0;
178058
178093
  width: 1px;
178059
- background: transparent;
178094
+ overflow: hidden;
178060
178095
  pointer-events: none;
178061
178096
  }
178062
178097
 
178063
- .message.role-assistant.streaming::before {
178064
- background:
178065
- linear-gradient(
178066
- to bottom,
178067
- transparent 40%,
178068
- color-mix(in srgb, var(--dees-color-accent-primary) 85%, transparent) 50%,
178069
- transparent 60%
178070
- ) 0 100% / 100% 250% no-repeat;
178098
+ .assistantActivityRail::before {
178099
+ content: '';
178100
+ position: absolute;
178101
+ inset: 0 auto auto 0;
178102
+ width: 100%;
178103
+ height: 250%;
178104
+ background: linear-gradient(
178105
+ to bottom,
178106
+ transparent 40%,
178107
+ color-mix(in srgb, var(--dees-color-accent-primary) 85%, transparent) 50%,
178108
+ transparent 60%
178109
+ );
178110
+ transform: translate3d(0, -60%, 0);
178111
+ will-change: transform;
178071
178112
  animation: assistantActivityScan 2s linear infinite;
178072
178113
  }
178073
178114
 
178074
178115
  @keyframes assistantActivityScan {
178075
- from { background-position: 0 100%; }
178076
- to { background-position: 0 0; }
178116
+ from { transform: translate3d(0, -60%, 0); }
178117
+ to { transform: translate3d(0, 0, 0); }
178077
178118
  }
178078
178119
 
178079
178120
  @media (prefers-reduced-motion: reduce) {
178080
- .message.role-assistant.streaming::before {
178121
+ .assistantActivityRail::before {
178081
178122
  animation: none;
178082
178123
  background: color-mix(in srgb, var(--dees-color-accent-primary) 65%, transparent);
178124
+ transform: none;
178125
+ height: 100%;
178126
+ will-change: auto;
178083
178127
  }
178084
178128
  }
178085
178129
 
@@ -182101,6 +182145,40 @@ var demoGroups = [
182101
182145
  { id: "active", name: "Active work", sessionIds: ["session-0", "session-1", "session-2"] },
182102
182146
  { id: "review", name: "Review", sessionIds: ["session-3", "session-4"] }
182103
182147
  ];
182148
+ var demoResources = [
182149
+ {
182150
+ id: "terminal:build",
182151
+ kind: "terminal",
182152
+ title: "Build shell",
182153
+ icon: "lucide:Terminal",
182154
+ preview: "pnpm run build",
182155
+ updatedAt: Date.now() - 9e4,
182156
+ state: "ready"
182157
+ },
182158
+ {
182159
+ id: "file:release-notes",
182160
+ kind: "file",
182161
+ title: "Release notes",
182162
+ icon: "lucide:FileText",
182163
+ preview: "6.7.0 controlled resource draft",
182164
+ updatedAt: Date.now() - 18e4
182165
+ },
182166
+ {
182167
+ id: "browser:preview",
182168
+ kind: "browser",
182169
+ title: "Documentation preview",
182170
+ icon: "lucide:Globe",
182171
+ preview: "localhost:3000",
182172
+ updatedAt: Date.now() - 24e4
182173
+ }
182174
+ ];
182175
+ var demoResourceAssociations = [
182176
+ { resourceId: "terminal:build", sessionId: "session-0" },
182177
+ { resourceId: "file:release-notes", sessionId: "session-0" }
182178
+ ];
182179
+ var demoResourceEligibleSessionIds = Object.fromEntries(
182180
+ demoResources.map((resource) => [resource.id, ["session-0", "session-1", "session-2"]])
182181
+ );
182104
182182
  var handleSessionSelect = /* @__PURE__ */ __name((event) => {
182105
182183
  const list5 = event.currentTarget;
182106
182184
  list5.selectedSessionId = event.detail.session.id;
@@ -182120,6 +182198,60 @@ var handleSessionMove = /* @__PURE__ */ __name((event) => {
182120
182198
  list5.groups = groups;
182121
182199
  list5.ungroupedSessionIds = ungroupedSessionIds;
182122
182200
  }, "handleSessionMove");
182201
+ var handleResourceAssociation = /* @__PURE__ */ __name((event) => {
182202
+ const list5 = event.currentTarget;
182203
+ const next2 = list5.resourceAssociations.filter(
182204
+ (association2) => association2.resourceId !== event.detail.resource.id
182205
+ );
182206
+ if (event.detail.toSessionId) {
182207
+ next2.push({
182208
+ resourceId: event.detail.resource.id,
182209
+ sessionId: event.detail.toSessionId
182210
+ });
182211
+ }
182212
+ list5.resourceAssociations = next2;
182213
+ }, "handleResourceAssociation");
182214
+ var handleResourceContext = /* @__PURE__ */ __name(async (event) => {
182215
+ const list5 = event.currentTarget;
182216
+ const { DeesContextmenu: DeesContextmenu2 } = await Promise.resolve().then(() => (init_dees_contextmenu(), dees_contextmenu_exports));
182217
+ const currentSessionId = event.detail.sessionId;
182218
+ const eligibleSessionIds = ["session-0", "session-1", "session-2"];
182219
+ const menu = await DeesContextmenu2.openContextMenuWithOptions(
182220
+ new MouseEvent("contextmenu", {
182221
+ clientX: event.detail.clientX,
182222
+ clientY: event.detail.clientY
182223
+ }),
182224
+ [
182225
+ ...eligibleSessionIds.filter((sessionId) => sessionId !== currentSessionId).map((sessionId) => ({
182226
+ name: `${currentSessionId ? "Reassign" : "Attach"} to ${demoSessions.find((session) => session.id === sessionId)?.title}`,
182227
+ iconName: "lucide:Link",
182228
+ action: /* @__PURE__ */ __name(async () => {
182229
+ event.detail.requestAssociation(sessionId);
182230
+ event.detail.close();
182231
+ }, "action")
182232
+ })),
182233
+ ...currentSessionId ? [{
182234
+ name: "Detach",
182235
+ iconName: "lucide:Unlink",
182236
+ action: /* @__PURE__ */ __name(async () => {
182237
+ event.detail.requestAssociation(null);
182238
+ event.detail.close();
182239
+ }, "action")
182240
+ }] : []
182241
+ ]
182242
+ );
182243
+ if (!menu) {
182244
+ event.detail.close();
182245
+ } else {
182246
+ const observer = new MutationObserver(() => {
182247
+ if (menu.isConnected) return;
182248
+ observer.disconnect();
182249
+ event.detail.close();
182250
+ });
182251
+ observer.observe(document.body, { childList: true });
182252
+ }
182253
+ list5.selectedResourceId = event.detail.resource.id;
182254
+ }, "handleResourceContext");
182123
182255
  var openModal = /* @__PURE__ */ __name(async () => {
182124
182256
  const { DeesModal: DeesModal2 } = await Promise.resolve().then(() => (init_dees_modal(), dees_modal_exports));
182125
182257
  const content3 = document.createElement("dees-harness-session-list");
@@ -182157,15 +182289,26 @@ var demoFunc65 = /* @__PURE__ */ __name(() => b2`
182157
182289
  </style>
182158
182290
  <div class="sessionDemo">
182159
182291
  <dees-button @clicked=${openModal}>Open in a DeesModal</dees-button>
182160
- <div class="demoHint">Drag the grip to reorder conversations or move them between groups.</div>
182292
+ <div class="demoHint">
182293
+ Use a conversation grip to reorder sessions. Use a resource grip to associate it with a
182294
+ session, or open Actions with click, ContextMenu, or Shift+F10 for attach, reassign, and detach.
182295
+ </div>
182161
182296
  <dees-harness-session-list
182162
182297
  .sessions=${demoSessions}
182163
182298
  .groups=${demoGroups}
182164
182299
  .ungroupedSessionIds=${demoSessions.slice(5).map((session) => session.id)}
182300
+ .resources=${demoResources}
182301
+ .resourceAssociations=${demoResourceAssociations}
182302
+ .eligibleSessionIdsByResourceId=${demoResourceEligibleSessionIds}
182165
182303
  .enableGrouping=${true}
182166
182304
  selectedSessionId="session-2"
182167
182305
  @harness-session-select=${handleSessionSelect}
182168
182306
  @harness-session-move=${handleSessionMove}
182307
+ @harness-resource-select=${(event) => {
182308
+ event.currentTarget.selectedResourceId = event.detail.resource.id;
182309
+ }}
182310
+ @harness-resource-context=${handleResourceContext}
182311
+ @harness-resource-association-request=${handleResourceAssociation}
182169
182312
  ></dees-harness-session-list>
182170
182313
  </div>
182171
182314
  `, "demoFunc");
@@ -182174,12 +182317,12 @@ var demoFunc65 = /* @__PURE__ */ __name(() => b2`
182174
182317
  init_dist_ts26();
182175
182318
  init_theme();
182176
182319
  init_dees_icon();
182177
- 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;
182320
+ 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;
182178
182321
  var { repeat: repeat6 } = directives_exports;
182179
182322
  var dragAutoScrollMaxPixelsPerSecond = 900;
182180
182323
  var dragThresholdPixels = 4;
182181
182324
  _DeesHarnessSessionList_decorators = [customElement("dees-harness-session-list")];
182182
- 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) {
182325
+ 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) {
182183
182326
  constructor() {
182184
182327
  super(...arguments);
182185
182328
  __privateAdd(this, _sessions, __runInitializers(_init92, 8, this, [])), __runInitializers(_init92, 11, this);
@@ -182189,18 +182332,29 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182189
182332
  __privateAdd(this, _groups2, __runInitializers(_init92, 24, this, [])), __runInitializers(_init92, 27, this);
182190
182333
  __privateAdd(this, _enableGrouping, __runInitializers(_init92, 28, this, false)), __runInitializers(_init92, 31, this);
182191
182334
  __privateAdd(this, _ungroupedSessionIds, __runInitializers(_init92, 32, this, [])), __runInitializers(_init92, 35, this);
182192
- __privateAdd(this, _search, __runInitializers(_init92, 36, this, "")), __runInitializers(_init92, 39, this);
182193
- __privateAdd(this, _draggingSessionId, __runInitializers(_init92, 40, this, "")), __runInitializers(_init92, 43, this);
182194
- __privateAdd(this, _dropSlot, __runInitializers(_init92, 44, this)), __runInitializers(_init92, 47, this);
182195
- __privateAdd(this, _draggedItemHeight, __runInitializers(_init92, 48, this, 0)), __runInitializers(_init92, 51, this);
182196
- __privateAdd(this, _expandedSessionIds, __runInitializers(_init92, 52, this, /* @__PURE__ */ new Set())), __runInitializers(_init92, 55, this);
182197
- __privateAdd(this, _collapsedGroupIds, __runInitializers(_init92, 56, this, /* @__PURE__ */ new Set())), __runInitializers(_init92, 59, this);
182198
- __privateAdd(this, _topScrollShadowVisible, __runInitializers(_init92, 60, this, false)), __runInitializers(_init92, 63, this);
182199
- __privateAdd(this, _bottomScrollShadowVisible, __runInitializers(_init92, 64, this, false)), __runInitializers(_init92, 67, this);
182200
- __privateAdd(this, _moveAnnouncement, __runInitializers(_init92, 68, this, "")), __runInitializers(_init92, 71, this);
182335
+ __privateAdd(this, _resources, __runInitializers(_init92, 36, this, [])), __runInitializers(_init92, 39, this);
182336
+ __privateAdd(this, _resourceAssociations, __runInitializers(_init92, 40, this, [])), __runInitializers(_init92, 43, this);
182337
+ __privateAdd(this, _selectedResourceId, __runInitializers(_init92, 44, this, "")), __runInitializers(_init92, 47, this);
182338
+ __privateAdd(this, _eligibleSessionIdsByResourceId, __runInitializers(_init92, 48, this, {})), __runInitializers(_init92, 51, this);
182339
+ __privateAdd(this, _search, __runInitializers(_init92, 52, this, "")), __runInitializers(_init92, 55, this);
182340
+ __privateAdd(this, _draggingSessionId, __runInitializers(_init92, 56, this, "")), __runInitializers(_init92, 59, this);
182341
+ __privateAdd(this, _draggingResourceId, __runInitializers(_init92, 60, this, "")), __runInitializers(_init92, 63, this);
182342
+ __privateAdd(this, _resourceDropTargetSessionId, __runInitializers(_init92, 64, this, "")), __runInitializers(_init92, 67, this);
182343
+ __privateAdd(this, _dropSlot, __runInitializers(_init92, 68, this)), __runInitializers(_init92, 71, this);
182344
+ __privateAdd(this, _draggedItemHeight, __runInitializers(_init92, 72, this, 0)), __runInitializers(_init92, 75, this);
182345
+ __privateAdd(this, _expandedSessionIds, __runInitializers(_init92, 76, this, /* @__PURE__ */ new Set())), __runInitializers(_init92, 79, this);
182346
+ __privateAdd(this, _collapsedGroupIds, __runInitializers(_init92, 80, this, /* @__PURE__ */ new Set())), __runInitializers(_init92, 83, this);
182347
+ __privateAdd(this, _topScrollShadowVisible, __runInitializers(_init92, 84, this, false)), __runInitializers(_init92, 87, this);
182348
+ __privateAdd(this, _bottomScrollShadowVisible, __runInitializers(_init92, 88, this, false)), __runInitializers(_init92, 91, this);
182349
+ __privateAdd(this, _moveAnnouncement, __runInitializers(_init92, 92, this, "")), __runInitializers(_init92, 95, this);
182350
+ __privateAdd(this, _resourceContextResourceId, __runInitializers(_init92, 96, this, "")), __runInitializers(_init92, 99, this);
182201
182351
  __publicField(this, "reflowGeneration", 0);
182202
182352
  __publicField(this, "reflowAnimations", /* @__PURE__ */ new Set());
182203
182353
  __publicField(this, "pointerDragGesture");
182354
+ __publicField(this, "pendingResourceAssociationRequest");
182355
+ __publicField(this, "resourceContextFocusTarget");
182356
+ __publicField(this, "resourceContextFocusClass", "");
182357
+ __publicField(this, "resourceContextGeneration", 0);
182204
182358
  __publicField(this, "keyboardMoveFocus");
182205
182359
  __publicField(this, "scrollResizeObserver");
182206
182360
  __publicField(this, "observedScrollContainer");
@@ -182221,8 +182375,16 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182221
182375
  eventArg.clientX - gesture.startClientX,
182222
182376
  eventArg.clientY - gesture.startClientY
182223
182377
  ) < dragThresholdPixels) return;
182224
- if (gesture.phase === "pending" && !this.startPointerDrag(eventArg, gesture)) return;
182378
+ if (gesture.phase === "pending" && !(gesture.type === "session" ? this.startPointerDrag(eventArg, gesture) : this.startResourcePointerDrag(eventArg, gesture))) return;
182225
182379
  eventArg.preventDefault();
182380
+ if (gesture.type === "resource") {
182381
+ this.moveResourceDragPreview(eventArg.clientX, eventArg.clientY, gesture);
182382
+ this.dragAutoScrollClientX = eventArg.clientX;
182383
+ this.dragAutoScrollClientY = eventArg.clientY;
182384
+ this.updateDragAutoScrollVelocity();
182385
+ this.updateResourceDropTargetFromPointer(eventArg.clientX, eventArg.clientY);
182386
+ return;
182387
+ }
182226
182388
  this.moveDragPreview(eventArg.clientX, eventArg.clientY, gesture);
182227
182389
  this.dragAutoScrollClientX = eventArg.clientX;
182228
182390
  this.dragAutoScrollClientY = eventArg.clientY;
@@ -182233,6 +182395,14 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182233
182395
  const gesture = this.pointerDragGesture;
182234
182396
  if (!gesture || eventArg.pointerId !== gesture.pointerId) return;
182235
182397
  if (gesture.phase === "active") {
182398
+ if (gesture.type === "resource") {
182399
+ this.dragAutoScrollClientX = eventArg.clientX;
182400
+ this.dragAutoScrollClientY = eventArg.clientY;
182401
+ this.moveResourceDragPreview(eventArg.clientX, eventArg.clientY, gesture);
182402
+ this.updateResourceDropTargetFromPointer(eventArg.clientX, eventArg.clientY);
182403
+ this.finishPointerDrag(true);
182404
+ return;
182405
+ }
182236
182406
  this.dragAutoScrollClientX = eventArg.clientX;
182237
182407
  this.dragAutoScrollClientY = eventArg.clientY;
182238
182408
  this.moveDragPreview(eventArg.clientX, eventArg.clientY, gesture);
@@ -182260,7 +182430,8 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182260
182430
  __publicField(this, "runDragAutoScroll", /* @__PURE__ */ __name((timestampArg) => {
182261
182431
  this.dragAutoScrollFrame = void 0;
182262
182432
  const container = this.scrollContainer;
182263
- if (!container || !this.draggingSessionId || this.dragAutoScrollVelocity === 0) return;
182433
+ const gesture = this.pointerDragGesture;
182434
+ if (!container || gesture?.phase !== "active" || this.dragAutoScrollVelocity === 0) return;
182264
182435
  const elapsedMs = Math.min(34, Math.max(0, timestampArg - this.dragAutoScrollLastFrame));
182265
182436
  this.dragAutoScrollLastFrame = timestampArg;
182266
182437
  const previousScrollTop = container.scrollTop;
@@ -182271,7 +182442,14 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182271
182442
  this.stopDragAutoScroll();
182272
182443
  return;
182273
182444
  }
182274
- this.updateDropSlotFromPointer();
182445
+ if (gesture.type === "resource") {
182446
+ this.updateResourceDropTargetFromPointer(
182447
+ this.dragAutoScrollClientX,
182448
+ this.dragAutoScrollClientY
182449
+ );
182450
+ } else {
182451
+ this.updateDropSlotFromPointer();
182452
+ }
182275
182453
  this.dragAutoScrollFrame = requestAnimationFrame(this.runDragAutoScroll);
182276
182454
  }, "runDragAutoScroll"));
182277
182455
  __publicField(this, "syncScrollShadowState", /* @__PURE__ */ __name(() => {
@@ -182286,6 +182464,48 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182286
182464
  get sessionsById() {
182287
182465
  return new Map(this.sessions.map((session) => [session.id, session]));
182288
182466
  }
182467
+ get resourcesById() {
182468
+ const result = /* @__PURE__ */ new Map();
182469
+ for (const resource of this.resources) {
182470
+ if (!resource.id || !resource.kind || !resource.title || result.has(resource.id)) continue;
182471
+ result.set(resource.id, resource);
182472
+ }
182473
+ return result;
182474
+ }
182475
+ /** First valid record wins; unknown and duplicate records remain untouched but are not projected. */
182476
+ get acceptedResourceAssociations() {
182477
+ const resourcesById = this.resourcesById;
182478
+ const sessionsById = this.sessionsById;
182479
+ const result = /* @__PURE__ */ new Map();
182480
+ for (const association2 of this.resourceAssociations) {
182481
+ if (!resourcesById.has(association2.resourceId) || !sessionsById.has(association2.sessionId) || result.has(association2.resourceId)) continue;
182482
+ result.set(association2.resourceId, association2.sessionId);
182483
+ }
182484
+ return result;
182485
+ }
182486
+ get acceptedResources() {
182487
+ return [...this.resourcesById.values()];
182488
+ }
182489
+ resourceMatchesSearch(resourceArg, queryArg) {
182490
+ return [resourceArg.id, resourceArg.kind, resourceArg.title, resourceArg.preview].filter(Boolean).join(" ").toLowerCase().includes(queryArg);
182491
+ }
182492
+ sessionMatchesSearch(sessionArg, queryArg) {
182493
+ return [sessionArg.title, sessionArg.preview, sessionArg.id].filter(Boolean).join(" ").toLowerCase().includes(queryArg);
182494
+ }
182495
+ resourcesForSession(sessionArg) {
182496
+ const associations = this.acceptedResourceAssociations;
182497
+ const associated = this.acceptedResources.filter(
182498
+ (resource) => associations.get(resource.id) === sessionArg.id
182499
+ );
182500
+ const query3 = this.search.trim().toLowerCase();
182501
+ if (!query3 || this.sessionMatchesSearch(sessionArg, query3)) return associated;
182502
+ return associated.filter((resource) => this.resourceMatchesSearch(resource, query3));
182503
+ }
182504
+ get unattachedResources() {
182505
+ const associations = this.acceptedResourceAssociations;
182506
+ const query3 = this.search.trim().toLowerCase();
182507
+ return this.acceptedResources.filter((resource) => !associations.has(resource.id) && (!query3 || this.resourceMatchesSearch(resource, query3)));
182508
+ }
182289
182509
  get groupedSessionIds() {
182290
182510
  const ids = /* @__PURE__ */ new Set();
182291
182511
  for (const group of this.groups) {
@@ -182315,17 +182535,64 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182315
182535
  }
182316
182536
  get filteredSessions() {
182317
182537
  const query3 = this.search.trim().toLowerCase();
182538
+ const associations = this.acceptedResourceAssociations;
182539
+ const matchingAttachedSessionIds = new Set(
182540
+ this.acceptedResources.filter((resource) => query3 && this.resourceMatchesSearch(resource, query3)).map((resource) => associations.get(resource.id)).filter((sessionId) => sessionId !== void 0)
182541
+ );
182318
182542
  const sorted = [...this.sessions].sort(
182319
182543
  (left, right) => (right.updatedAt ?? right.createdAt ?? 0) - (left.updatedAt ?? left.createdAt ?? 0)
182320
182544
  );
182321
182545
  if (!query3) return sorted;
182322
182546
  return sorted.filter(
182323
- (session) => [session.title, session.preview, session.id].filter(Boolean).join(" ").toLowerCase().includes(query3)
182547
+ (session) => this.sessionMatchesSearch(session, query3) || matchingAttachedSessionIds.has(session.id)
182324
182548
  );
182325
182549
  }
182326
182550
  focusSearch() {
182327
182551
  this.shadowRoot?.querySelector(".searchRow input")?.focus();
182328
182552
  }
182553
+ requestResourceAssociation(resourceIdArg, toSessionIdArg, sourceArg = "action") {
182554
+ const resource = this.resourcesById.get(resourceIdArg);
182555
+ if (!resource) return false;
182556
+ const fromSessionId = this.acceptedResourceAssociations.get(resourceIdArg) ?? null;
182557
+ if (fromSessionId === toSessionIdArg) return false;
182558
+ if (toSessionIdArg !== null && (!this.sessionsById.has(toSessionIdArg) || !this.isResourceTargetEligible(resourceIdArg, toSessionIdArg))) return false;
182559
+ if (toSessionIdArg === null && fromSessionId === null) return false;
182560
+ const detail = fromSessionId === null ? {
182561
+ intent: "attach",
182562
+ resource,
182563
+ fromSessionId: null,
182564
+ toSessionId: toSessionIdArg,
182565
+ source: sourceArg
182566
+ } : toSessionIdArg === null ? {
182567
+ intent: "detach",
182568
+ resource,
182569
+ fromSessionId,
182570
+ toSessionId: null,
182571
+ source: sourceArg
182572
+ } : {
182573
+ intent: "reassign",
182574
+ resource,
182575
+ fromSessionId,
182576
+ toSessionId: toSessionIdArg,
182577
+ source: sourceArg
182578
+ };
182579
+ this.pendingResourceAssociationRequest = {
182580
+ resourceId: resource.id,
182581
+ resourceTitle: resource.title || resource.id,
182582
+ fromSessionId,
182583
+ toSessionId: toSessionIdArg,
182584
+ intent: detail.intent
182585
+ };
182586
+ this.moveAnnouncement = this.resourceAssociationAnnouncement(detail, false);
182587
+ this.dispatchEvent(
182588
+ new CustomEvent("harness-resource-association-request", {
182589
+ detail,
182590
+ bubbles: true,
182591
+ composed: true
182592
+ })
182593
+ );
182594
+ return true;
182595
+ }
182329
182596
  updated(changedProperties) {
182330
182597
  super.updated(changedProperties);
182331
182598
  this.observeScrollGeometry();
@@ -182334,16 +182601,32 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182334
182601
  if (this.pointerDragGesture && (!this.pointerDragGesture.source.isConnected || !this.pointerDragGesture.handle.isConnected)) {
182335
182602
  this.finishPointerDrag(false);
182336
182603
  }
182337
- if (!changedProperties.has("sessions")) return;
182338
- const knownIds = new Set(this.sessions.map((session) => session.id));
182339
- if (this.pointerDragGesture && !knownIds.has(this.pointerDragGesture.sessionId)) {
182340
- this.finishPointerDrag(false);
182604
+ if (changedProperties.has("sessions")) {
182605
+ const knownIds = new Set(this.sessions.map((session) => session.id));
182606
+ if (this.pointerDragGesture?.type === "session" && !knownIds.has(this.pointerDragGesture.sessionId)) {
182607
+ this.finishPointerDrag(false);
182608
+ }
182609
+ const nextExpanded = new Set(
182610
+ [...this.expandedSessionIds].filter((sessionId) => knownIds.has(sessionId))
182611
+ );
182612
+ if (nextExpanded.size !== this.expandedSessionIds.size || [...nextExpanded].some((sessionId) => !this.expandedSessionIds.has(sessionId))) {
182613
+ this.expandedSessionIds = nextExpanded;
182614
+ }
182341
182615
  }
182342
- const nextExpanded = new Set(
182343
- [...this.expandedSessionIds].filter((sessionId) => knownIds.has(sessionId))
182344
- );
182345
- if (nextExpanded.size !== this.expandedSessionIds.size || [...nextExpanded].some((sessionId) => !this.expandedSessionIds.has(sessionId))) {
182346
- this.expandedSessionIds = nextExpanded;
182616
+ if (changedProperties.has("resources") || changedProperties.has("resourceAssociations")) {
182617
+ const gesture = this.pointerDragGesture;
182618
+ if (gesture?.type === "resource") {
182619
+ const currentSessionId = this.acceptedResourceAssociations.get(gesture.resourceId) ?? null;
182620
+ if (!this.resourcesById.has(gesture.resourceId) || currentSessionId !== gesture.fromSessionId) {
182621
+ this.finishPointerDrag(false);
182622
+ }
182623
+ }
182624
+ if (this.resourceContextResourceId && !this.resourcesById.has(this.resourceContextResourceId)) this.closeResourceContext(this.resourceContextGeneration);
182625
+ this.reconcilePendingResourceAssociation();
182626
+ }
182627
+ if (changedProperties.has("eligibleSessionIdsByResourceId")) {
182628
+ const gesture = this.pointerDragGesture;
182629
+ if (gesture?.type === "resource") this.finishPointerDrag(false);
182347
182630
  }
182348
182631
  }
182349
182632
  async connectedCallback() {
@@ -182355,6 +182638,7 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182355
182638
  }
182356
182639
  async disconnectedCallback() {
182357
182640
  this.finishPointerDrag(false);
182641
+ this.clearResourceContextState();
182358
182642
  this.scrollResizeObserver?.disconnect();
182359
182643
  this.scrollResizeObserver = void 0;
182360
182644
  this.observedScrollContainer = void 0;
@@ -182367,7 +182651,8 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182367
182651
  <div class="searchRow">
182368
182652
  <dees-icon class="searchIcon" icon="lucide:Search" iconSize="13"></dees-icon>
182369
182653
  <input
182370
- placeholder="Search conversations"
182654
+ placeholder=${this.acceptedResources.length ? "Search conversations and resources" : "Search conversations"}
182655
+ aria-label=${this.acceptedResources.length ? "Search conversations and resources" : "Search conversations"}
182371
182656
  .value=${this.search}
182372
182657
  @input=${(event) => {
182373
182658
  this.search = event.currentTarget.value;
@@ -182410,9 +182695,10 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182410
182695
  }
182411
182696
  renderFlatList() {
182412
182697
  const sessions = this.filteredSessions;
182413
- if (!sessions.length) {
182698
+ const unattachedResources = this.unattachedResources;
182699
+ if (!sessions.length && !unattachedResources.length) {
182414
182700
  return b2`<div class="emptyNote">
182415
- ${this.sessions.length ? "No conversations match this search." : this.emptyText}
182701
+ ${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}
182416
182702
  </div>`;
182417
182703
  }
182418
182704
  return b2`
@@ -182423,12 +182709,14 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182423
182709
  (session) => this.renderItem(session, null, -1)
182424
182710
  )}
182425
182711
  </div>
182712
+ ${this.renderUnattachedResources(unattachedResources)}
182426
182713
  `;
182427
182714
  }
182428
182715
  renderGroupedList() {
182429
182716
  const byId = this.sessionsById;
182430
182717
  const ungrouped = this.ungroupedSessions;
182431
- if (!this.sessions.length && !this.groups.length) {
182718
+ const unattachedResources = this.unattachedResources;
182719
+ if (!this.sessions.length && !this.groups.length && !unattachedResources.length) {
182432
182720
  return b2`<div class="emptyNote">${this.emptyText}</div>`;
182433
182721
  }
182434
182722
  return b2`
@@ -182478,6 +182766,7 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182478
182766
  </button>
182479
182767
  ` : ""}
182480
182768
  ${this.renderSection(ungrouped, null)}
182769
+ ${this.renderUnattachedResources(unattachedResources)}
182481
182770
  `;
182482
182771
  }
182483
182772
  renderSection(sessions, groupId) {
@@ -182537,9 +182826,11 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182537
182826
  const state5 = session.state ?? "normal";
182538
182827
  const detailsId = `session-details-${session.id}`;
182539
182828
  const dropIndex = index3 < 0 ? 0 : index3;
182829
+ const resources = this.resourcesForSession(session);
182830
+ const isResourceDropTarget = this.resourceDropTargetSessionId === session.id;
182540
182831
  return b2`
182541
182832
  <article
182542
- class="item state-${state5} ${expanded ? "expanded" : ""} ${session.id === this.selectedSessionId ? "selected" : ""} ${this.draggingSessionId === session.id ? "dragging" : ""}"
182833
+ class="item state-${state5} ${expanded ? "expanded" : ""} ${session.id === this.selectedSessionId ? "selected" : ""} ${this.draggingSessionId === session.id ? "dragging" : ""} ${isResourceDropTarget ? "resourceDropTarget" : ""}"
182543
182834
  data-session-id=${session.id}
182544
182835
  data-drop-group-id=${groupId ?? ""}
182545
182836
  data-drop-index=${dropIndex}
@@ -182620,6 +182911,16 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182620
182911
  <dees-icon icon="lucide:ChevronDown" iconSize="15"></dees-icon>
182621
182912
  </button>
182622
182913
  </div>
182914
+ ${isResourceDropTarget ? b2`<div class="resourceDropLabel">Associate resource with ${session.title || session.id}</div>` : ""}
182915
+ ${resources.length ? b2`
182916
+ <ul class="resourceChildren" aria-label=${`Resources for ${session.title || session.id}`}>
182917
+ ${repeat6(
182918
+ resources,
182919
+ (resource) => resource.id,
182920
+ (resource) => this.renderResource(resource, session.id)
182921
+ )}
182922
+ </ul>
182923
+ ` : ""}
182623
182924
  ${expanded ? b2`
182624
182925
  <div class="itemDetails" id=${detailsId}>
182625
182926
  <div class="stateLine">
@@ -182636,6 +182937,113 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182636
182937
  </article>
182637
182938
  `;
182638
182939
  }
182940
+ renderUnattachedResources(resourcesArg) {
182941
+ if (!resourcesArg.length) return b2``;
182942
+ return b2`
182943
+ <section class="resourceSection" aria-labelledby="unattached-resources-heading">
182944
+ <h2 class="resourceSectionTitle" id="unattached-resources-heading">Resources</h2>
182945
+ <ul class="resourceList" aria-label="Unattached resources">
182946
+ ${repeat6(
182947
+ resourcesArg,
182948
+ (resource) => resource.id,
182949
+ (resource) => this.renderResource(resource, null)
182950
+ )}
182951
+ </ul>
182952
+ </section>
182953
+ `;
182954
+ }
182955
+ renderResource(resourceArg, sessionIdArg) {
182956
+ const selected = resourceArg.id === this.selectedResourceId;
182957
+ const dragging = resourceArg.id === this.draggingResourceId;
182958
+ const eligibleTargetCount = this.eligibleSessionIds(resourceArg.id).filter(
182959
+ (sessionId) => sessionId !== sessionIdArg
182960
+ ).length;
182961
+ const contextOpen = resourceArg.id === this.resourceContextResourceId;
182962
+ return b2`
182963
+ <li
182964
+ class="resourceRow ${selected ? "selected" : ""} ${dragging ? "resourceDragging" : ""}"
182965
+ data-resource-id=${resourceArg.id}
182966
+ data-resource-session-id=${sessionIdArg ?? ""}
182967
+ @dblclick=${(event) => {
182968
+ event.stopPropagation();
182969
+ if (this.eventTargetsResourceControl(event)) return;
182970
+ this.emitResource("harness-resource-open", resourceArg, sessionIdArg);
182971
+ }}
182972
+ @contextmenu=${(event) => {
182973
+ event.preventDefault();
182974
+ event.stopPropagation();
182975
+ const focusTarget = event.composedPath().find((target) => target instanceof HTMLElement && target.matches("button:not(:disabled)")) ?? event.currentTarget.querySelector(".resourcePrimary") ?? event.currentTarget;
182976
+ this.emitResourceContext(event, resourceArg, sessionIdArg, "pointer", focusTarget);
182977
+ }}
182978
+ >
182979
+ <button
182980
+ class="resourceDragHandle"
182981
+ type="button"
182982
+ title=${eligibleTargetCount ? "Drag to associate with an eligible conversation" : "No eligible conversations"}
182983
+ aria-label=${`Associate ${resourceArg.title || resourceArg.id} by dragging`}
182984
+ aria-keyshortcuts="ContextMenu Shift+F10"
182985
+ ?disabled=${eligibleTargetCount === 0}
182986
+ @pointerdown=${(event) => {
182987
+ this.handleResourcePointerDown(event, resourceArg, sessionIdArg);
182988
+ }}
182989
+ @pointermove=${this.handlePointerMove}
182990
+ @pointerup=${this.handlePointerUp}
182991
+ @pointercancel=${this.handlePointerCancel}
182992
+ @lostpointercapture=${this.handleLostPointerCapture}
182993
+ @keydown=${(event) => {
182994
+ this.handleResourceContextKey(event, resourceArg, sessionIdArg);
182995
+ }}
182996
+ >
182997
+ <dees-icon icon="lucide:GripVertical" iconSize="13"></dees-icon>
182998
+ </button>
182999
+ <button
183000
+ class="resourcePrimary"
183001
+ type="button"
183002
+ aria-current=${selected ? "true" : "false"}
183003
+ @click=${() => this.emitResource("harness-resource-select", resourceArg, sessionIdArg)}
183004
+ @keydown=${(event) => {
183005
+ if (event.key === "Enter") {
183006
+ event.preventDefault();
183007
+ this.emitResource("harness-resource-open", resourceArg, sessionIdArg);
183008
+ return;
183009
+ }
183010
+ this.handleResourceContextKey(event, resourceArg, sessionIdArg);
183011
+ }}
183012
+ >
183013
+ <dees-icon
183014
+ class="resourceIcon"
183015
+ icon=${resourceArg.icon || "lucide:Box"}
183016
+ iconSize="14"
183017
+ ></dees-icon>
183018
+ <span class="resourceCopy">
183019
+ <span class="resourceTitle">${resourceArg.title || resourceArg.id}</span>
183020
+ ${resourceArg.preview ? b2`<span class="resourcePreview">${resourceArg.preview}</span>` : ""}
183021
+ <span class="resourceMeta">
183022
+ ${resourceArg.kind}${resourceArg.state ? ` \xB7 ${resourceArg.state}` : ""}${resourceArg.updatedAt || resourceArg.createdAt ? ` \xB7 ${harnessFormatRelativeTime(resourceArg.updatedAt ?? resourceArg.createdAt)}` : ""}
183023
+ </span>
183024
+ </span>
183025
+ </button>
183026
+ <button
183027
+ class="resourceActions"
183028
+ type="button"
183029
+ title="Resource actions"
183030
+ aria-label=${`Actions for ${resourceArg.title || resourceArg.id}`}
183031
+ aria-haspopup="menu"
183032
+ aria-expanded=${contextOpen ? "true" : "false"}
183033
+ aria-keyshortcuts="ContextMenu Shift+F10"
183034
+ @click=${(event) => {
183035
+ event.stopPropagation();
183036
+ this.emitResourceContext(event, resourceArg, sessionIdArg, "action", event.currentTarget);
183037
+ }}
183038
+ @keydown=${(event) => {
183039
+ this.handleResourceContextKey(event, resourceArg, sessionIdArg);
183040
+ }}
183041
+ >
183042
+ <dees-icon icon="lucide:Ellipsis" iconSize="15"></dees-icon>
183043
+ </button>
183044
+ </li>
183045
+ `;
183046
+ }
182639
183047
  eventTargetsExpandToggle(event) {
182640
183048
  return event.composedPath().some(
182641
183049
  (target) => target instanceof HTMLElement && target.classList.contains("expandToggle")
@@ -182646,6 +183054,11 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182646
183054
  (target) => target instanceof HTMLElement && target.classList.contains("dragHandle")
182647
183055
  );
182648
183056
  }
183057
+ eventTargetsResourceControl(event) {
183058
+ return event.composedPath().some(
183059
+ (target) => target instanceof HTMLElement && (target.classList.contains("resourceDragHandle") || target.classList.contains("resourceActions"))
183060
+ );
183061
+ }
182649
183062
  sessionStateLabel(state5) {
182650
183063
  switch (state5) {
182651
183064
  case "working":
@@ -182692,6 +183105,7 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182692
183105
  if (!source) return;
182693
183106
  const sourceRect = source.getBoundingClientRect();
182694
183107
  this.pointerDragGesture = {
183108
+ type: "session",
182695
183109
  pointerId: eventArg.pointerId,
182696
183110
  handle: handle3,
182697
183111
  source,
@@ -182712,6 +183126,33 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182712
183126
  this.finishPointerDrag(false);
182713
183127
  }
182714
183128
  }
183129
+ handleResourcePointerDown(eventArg, resourceArg, fromSessionIdArg) {
183130
+ if (this.pointerDragGesture || eventArg.button !== 0 || !eventArg.isPrimary || this.eligibleSessionIds(resourceArg.id).every((sessionId) => sessionId === fromSessionIdArg)) return;
183131
+ const handle3 = eventArg.currentTarget;
183132
+ const source = handle3.closest(".resourceRow");
183133
+ if (!source) return;
183134
+ const sourceRect = source.getBoundingClientRect();
183135
+ this.pointerDragGesture = {
183136
+ type: "resource",
183137
+ pointerId: eventArg.pointerId,
183138
+ handle: handle3,
183139
+ source,
183140
+ resourceId: resourceArg.id,
183141
+ fromSessionId: fromSessionIdArg,
183142
+ startClientX: eventArg.clientX,
183143
+ startClientY: eventArg.clientY,
183144
+ grabOffsetX: eventArg.clientX - sourceRect.left,
183145
+ grabOffsetY: eventArg.clientY - sourceRect.top,
183146
+ phase: "pending"
183147
+ };
183148
+ window.addEventListener("keydown", this.handleDragKeyDown, true);
183149
+ window.addEventListener("blur", this.handleDragWindowBlur);
183150
+ try {
183151
+ handle3.setPointerCapture(eventArg.pointerId);
183152
+ } catch {
183153
+ this.finishPointerDrag(false);
183154
+ }
183155
+ }
182715
183156
  startPointerDrag(eventArg, gestureArg) {
182716
183157
  const sourceRect = gestureArg.source.getBoundingClientRect();
182717
183158
  gestureArg.source.classList.add("dragging");
@@ -182737,6 +183178,23 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182737
183178
  };
182738
183179
  return true;
182739
183180
  }
183181
+ startResourcePointerDrag(eventArg, gestureArg) {
183182
+ const sourceRect = gestureArg.source.getBoundingClientRect();
183183
+ gestureArg.source.classList.add("resourceDragging");
183184
+ gestureArg.source.style.setProperty("--resource-drag-preview-width", `${sourceRect.width}px`);
183185
+ this.moveResourceDragPreview(eventArg.clientX, eventArg.clientY, gestureArg);
183186
+ gestureArg.source.setAttribute("popover", "manual");
183187
+ try {
183188
+ gestureArg.source.showPopover();
183189
+ } catch {
183190
+ this.finishPointerDrag(false);
183191
+ return false;
183192
+ }
183193
+ gestureArg.phase = "active";
183194
+ this.draggingResourceId = gestureArg.resourceId;
183195
+ this.resourceDropTargetSessionId = "";
183196
+ return true;
183197
+ }
182740
183198
  moveDragPreview(clientXArg, clientYArg, gestureArg) {
182741
183199
  gestureArg.source.style.setProperty(
182742
183200
  "--drag-preview-x",
@@ -182747,6 +183205,24 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182747
183205
  `${clientYArg - gestureArg.grabOffsetY}px`
182748
183206
  );
182749
183207
  }
183208
+ moveResourceDragPreview(clientXArg, clientYArg, gestureArg) {
183209
+ gestureArg.source.style.setProperty(
183210
+ "--resource-drag-preview-x",
183211
+ `${clientXArg - gestureArg.grabOffsetX}px`
183212
+ );
183213
+ gestureArg.source.style.setProperty(
183214
+ "--resource-drag-preview-y",
183215
+ `${clientYArg - gestureArg.grabOffsetY}px`
183216
+ );
183217
+ }
183218
+ updateResourceDropTargetFromPointer(clientXArg, clientYArg) {
183219
+ const gesture = this.pointerDragGesture;
183220
+ if (gesture?.type !== "resource" || gesture.phase !== "active") return;
183221
+ const hit = this.shadowRoot?.elementFromPoint(clientXArg, clientYArg);
183222
+ const target = hit?.closest(".item[data-session-id]");
183223
+ const sessionId = target?.dataset.sessionId ?? "";
183224
+ this.resourceDropTargetSessionId = sessionId && sessionId !== gesture.fromSessionId && this.isResourceTargetEligible(gesture.resourceId, sessionId) ? sessionId : "";
183225
+ }
182750
183226
  setDropSlot(groupIdArg, indexArg) {
182751
183227
  const current = this.dropSlot;
182752
183228
  if (current && current.groupId === groupIdArg && current.index === indexArg) return;
@@ -182764,7 +183240,8 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182764
183240
  }
182765
183241
  updateDragAutoScrollVelocity() {
182766
183242
  const container = this.scrollContainer;
182767
- if (!container || !this.draggingSessionId) return;
183243
+ const gesture = this.pointerDragGesture;
183244
+ if (!container || gesture?.phase !== "active") return;
182768
183245
  const rect = container.getBoundingClientRect();
182769
183246
  if (this.dragAutoScrollClientX < rect.left || this.dragAutoScrollClientX > rect.right) {
182770
183247
  this.stopDragAutoScroll();
@@ -182938,6 +183415,120 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182938
183415
  this.keyboardMoveFocus = void 0;
182939
183416
  }
182940
183417
  }
183418
+ eligibleSessionIds(resourceIdArg) {
183419
+ const knownSessionIds = new Set(this.sessions.map((session) => session.id));
183420
+ const result = [];
183421
+ const seen = /* @__PURE__ */ new Set();
183422
+ for (const sessionId of this.eligibleSessionIdsByResourceId[resourceIdArg] ?? []) {
183423
+ if (!knownSessionIds.has(sessionId) || seen.has(sessionId)) continue;
183424
+ seen.add(sessionId);
183425
+ result.push(sessionId);
183426
+ }
183427
+ return result;
183428
+ }
183429
+ isResourceTargetEligible(resourceIdArg, sessionIdArg) {
183430
+ return this.eligibleSessionIds(resourceIdArg).includes(sessionIdArg);
183431
+ }
183432
+ emitResource(nameArg, resourceArg, sessionIdArg) {
183433
+ const detail = {
183434
+ resource: resourceArg,
183435
+ sessionId: sessionIdArg
183436
+ };
183437
+ this.dispatchEvent(new CustomEvent(nameArg, { detail, bubbles: true, composed: true }));
183438
+ }
183439
+ handleResourceContextKey(eventArg, resourceArg, sessionIdArg) {
183440
+ if (!(eventArg.key === "ContextMenu" || eventArg.key === "F10" && eventArg.shiftKey)) return;
183441
+ eventArg.preventDefault();
183442
+ eventArg.stopPropagation();
183443
+ this.emitResourceContext(
183444
+ eventArg,
183445
+ resourceArg,
183446
+ sessionIdArg,
183447
+ "keyboard",
183448
+ eventArg.currentTarget
183449
+ );
183450
+ }
183451
+ emitResourceContext(eventArg, resourceArg, sessionIdArg, sourceArg, focusTargetArg) {
183452
+ const rect = focusTargetArg.getBoundingClientRect();
183453
+ const contextGeneration = ++this.resourceContextGeneration;
183454
+ this.resourceContextResourceId = resourceArg.id;
183455
+ this.resourceContextFocusTarget = focusTargetArg;
183456
+ this.resourceContextFocusClass = [
183457
+ "resourceActions",
183458
+ "resourcePrimary",
183459
+ "resourceDragHandle"
183460
+ ].find((className) => focusTargetArg.classList.contains(className)) ?? "resourcePrimary";
183461
+ const detail = {
183462
+ resource: resourceArg,
183463
+ sessionId: sessionIdArg,
183464
+ clientX: sourceArg === "pointer" && eventArg instanceof MouseEvent ? eventArg.clientX : rect.left + rect.width / 2,
183465
+ clientY: sourceArg === "pointer" && eventArg instanceof MouseEvent ? eventArg.clientY : rect.bottom,
183466
+ source: sourceArg,
183467
+ originalEvent: eventArg,
183468
+ requestAssociation: /* @__PURE__ */ __name((toSessionIdArg) => this.requestResourceAssociation(
183469
+ resourceArg.id,
183470
+ toSessionIdArg,
183471
+ sourceArg === "keyboard" ? "keyboard" : "action"
183472
+ ), "requestAssociation"),
183473
+ close: /* @__PURE__ */ __name(() => this.closeResourceContext(contextGeneration), "close")
183474
+ };
183475
+ this.dispatchEvent(
183476
+ new CustomEvent("harness-resource-context", { detail, bubbles: true, composed: true })
183477
+ );
183478
+ }
183479
+ closeResourceContext(contextGenerationArg) {
183480
+ if (!this.isConnected || contextGenerationArg !== this.resourceContextGeneration) return;
183481
+ const focusTarget = this.resourceContextFocusTarget;
183482
+ const resourceId = this.resourceContextResourceId;
183483
+ const focusClass = this.resourceContextFocusClass;
183484
+ this.clearResourceContextState();
183485
+ const closeGeneration = this.resourceContextGeneration;
183486
+ void this.updateComplete.then(() => {
183487
+ if (!this.isConnected || closeGeneration !== this.resourceContextGeneration) return;
183488
+ if (focusTarget?.isConnected) {
183489
+ focusTarget.focus();
183490
+ return;
183491
+ }
183492
+ const row = Array.from(
183493
+ this.shadowRoot?.querySelectorAll(".resourceRow[data-resource-id]") ?? []
183494
+ ).find((candidate) => candidate.dataset.resourceId === resourceId);
183495
+ row?.querySelector(`.${focusClass || "resourcePrimary"}`)?.focus();
183496
+ });
183497
+ }
183498
+ clearResourceContextState() {
183499
+ this.resourceContextGeneration += 1;
183500
+ this.resourceContextResourceId = "";
183501
+ this.resourceContextFocusTarget = void 0;
183502
+ this.resourceContextFocusClass = "";
183503
+ }
183504
+ reconcilePendingResourceAssociation() {
183505
+ const pending = this.pendingResourceAssociationRequest;
183506
+ if (!pending) return;
183507
+ if (!this.resourcesById.has(pending.resourceId)) {
183508
+ this.pendingResourceAssociationRequest = void 0;
183509
+ return;
183510
+ }
183511
+ const currentSessionId = this.acceptedResourceAssociations.get(pending.resourceId) ?? null;
183512
+ if (currentSessionId !== pending.toSessionId) {
183513
+ if (currentSessionId !== pending.fromSessionId) {
183514
+ const controlledSession = currentSessionId ? this.sessionsById.get(currentSessionId)?.title ?? currentSessionId : "unattached";
183515
+ this.moveAnnouncement = `Association request for ${pending.resourceTitle} was not applied; controlled association is ${controlledSession}.`;
183516
+ this.pendingResourceAssociationRequest = void 0;
183517
+ }
183518
+ return;
183519
+ }
183520
+ const fromSession = pending.fromSessionId ? this.sessionsById.get(pending.fromSessionId)?.title ?? pending.fromSessionId : "";
183521
+ const toSession = pending.toSessionId ? this.sessionsById.get(pending.toSessionId)?.title ?? pending.toSessionId : "";
183522
+ 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}.`;
183523
+ this.pendingResourceAssociationRequest = void 0;
183524
+ }
183525
+ resourceAssociationAnnouncement(detailArg, completedArg) {
183526
+ const resourceTitle = detailArg.resource.title || detailArg.resource.id;
183527
+ const fromTitle = detailArg.fromSessionId ? this.sessionsById.get(detailArg.fromSessionId)?.title ?? detailArg.fromSessionId : "";
183528
+ const toTitle = detailArg.toSessionId ? this.sessionsById.get(detailArg.toSessionId)?.title ?? detailArg.toSessionId : "";
183529
+ const verb = completedArg ? "completed" : "requested";
183530
+ 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}.`;
183531
+ }
182941
183532
  async animateCardReflow(previousRectsArg, generationArg) {
182942
183533
  await this.updateComplete;
182943
183534
  if (generationArg !== this.reflowGeneration || !this.isConnected || globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches) return;
@@ -182970,7 +183561,11 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182970
183561
  finishPointerDrag(commitArg) {
182971
183562
  const gesture = this.pointerDragGesture;
182972
183563
  if (!gesture) return;
182973
- const detail = commitArg && gesture.phase === "active" && this.dropSlot ? this.createMoveDetail(gesture.sessionId, this.dropSlot.groupId, this.dropSlot.index) : void 0;
183564
+ const sessionMoveDetail = gesture.type === "session" && commitArg && gesture.phase === "active" && this.dropSlot ? this.createMoveDetail(gesture.sessionId, this.dropSlot.groupId, this.dropSlot.index) : void 0;
183565
+ const resourceRequest = gesture.type === "resource" && commitArg && gesture.phase === "active" && this.resourceDropTargetSessionId ? {
183566
+ resourceId: gesture.resourceId,
183567
+ toSessionId: this.resourceDropTargetSessionId
183568
+ } : void 0;
182974
183569
  this.pointerDragGesture = void 0;
182975
183570
  window.removeEventListener("keydown", this.handleDragKeyDown, true);
182976
183571
  window.removeEventListener("blur", this.handleDragWindowBlur);
@@ -182979,14 +183574,19 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182979
183574
  this.cancelReflowAnimations();
182980
183575
  if (gesture.source.matches(":popover-open")) gesture.source.hidePopover();
182981
183576
  gesture.source.removeAttribute("popover");
182982
- gesture.source.classList.remove("dragging");
183577
+ gesture.source.classList.remove("dragging", "resourceDragging");
182983
183578
  for (const property2 of [
182984
183579
  "--drag-preview-width",
182985
183580
  "--drag-preview-height",
182986
183581
  "--drag-preview-x",
182987
- "--drag-preview-y"
183582
+ "--drag-preview-y",
183583
+ "--resource-drag-preview-width",
183584
+ "--resource-drag-preview-x",
183585
+ "--resource-drag-preview-y"
182988
183586
  ]) gesture.source.style.removeProperty(property2);
182989
183587
  this.draggingSessionId = "";
183588
+ this.draggingResourceId = "";
183589
+ this.resourceDropTargetSessionId = "";
182990
183590
  this.draggedItemHeight = 0;
182991
183591
  this.dropSlot = void 0;
182992
183592
  try {
@@ -182995,11 +183595,18 @@ var _DeesHarnessSessionList = class _DeesHarnessSessionList extends (_a91 = Dees
182995
183595
  }
182996
183596
  } catch {
182997
183597
  }
182998
- if (detail) {
183598
+ if (sessionMoveDetail) {
182999
183599
  this.dispatchEvent(
183000
- new CustomEvent("harness-session-move", { detail, bubbles: true, composed: true })
183600
+ new CustomEvent("harness-session-move", {
183601
+ detail: sessionMoveDetail,
183602
+ bubbles: true,
183603
+ composed: true
183604
+ })
183001
183605
  );
183002
183606
  }
183607
+ if (resourceRequest) {
183608
+ this.requestResourceAssociation(resourceRequest.resourceId, resourceRequest.toSessionId, "drop");
183609
+ }
183003
183610
  }
183004
183611
  emit(name, session) {
183005
183612
  this.dispatchEvent(new CustomEvent(name, { detail: { session }, bubbles: true, composed: true }));
@@ -183013,8 +183620,14 @@ _emptyText2 = new WeakMap();
183013
183620
  _groups2 = new WeakMap();
183014
183621
  _enableGrouping = new WeakMap();
183015
183622
  _ungroupedSessionIds = new WeakMap();
183623
+ _resources = new WeakMap();
183624
+ _resourceAssociations = new WeakMap();
183625
+ _selectedResourceId = new WeakMap();
183626
+ _eligibleSessionIdsByResourceId = new WeakMap();
183016
183627
  _search = new WeakMap();
183017
183628
  _draggingSessionId = new WeakMap();
183629
+ _draggingResourceId = new WeakMap();
183630
+ _resourceDropTargetSessionId = new WeakMap();
183018
183631
  _dropSlot = new WeakMap();
183019
183632
  _draggedItemHeight = new WeakMap();
183020
183633
  _expandedSessionIds = new WeakMap();
@@ -183022,6 +183635,7 @@ _collapsedGroupIds = new WeakMap();
183022
183635
  _topScrollShadowVisible = new WeakMap();
183023
183636
  _bottomScrollShadowVisible = new WeakMap();
183024
183637
  _moveAnnouncement = new WeakMap();
183638
+ _resourceContextResourceId = new WeakMap();
183025
183639
  __decorateElement(_init92, 4, "sessions", _sessions_dec, _DeesHarnessSessionList, _sessions);
183026
183640
  __decorateElement(_init92, 4, "selectedSessionId", _selectedSessionId_dec, _DeesHarnessSessionList, _selectedSessionId);
183027
183641
  __decorateElement(_init92, 4, "loading", _loading_dec4, _DeesHarnessSessionList, _loading4);
@@ -183029,8 +183643,14 @@ __decorateElement(_init92, 4, "emptyText", _emptyText_dec2, _DeesHarnessSessionL
183029
183643
  __decorateElement(_init92, 4, "groups", _groups_dec2, _DeesHarnessSessionList, _groups2);
183030
183644
  __decorateElement(_init92, 4, "enableGrouping", _enableGrouping_dec, _DeesHarnessSessionList, _enableGrouping);
183031
183645
  __decorateElement(_init92, 4, "ungroupedSessionIds", _ungroupedSessionIds_dec, _DeesHarnessSessionList, _ungroupedSessionIds);
183646
+ __decorateElement(_init92, 4, "resources", _resources_dec, _DeesHarnessSessionList, _resources);
183647
+ __decorateElement(_init92, 4, "resourceAssociations", _resourceAssociations_dec, _DeesHarnessSessionList, _resourceAssociations);
183648
+ __decorateElement(_init92, 4, "selectedResourceId", _selectedResourceId_dec, _DeesHarnessSessionList, _selectedResourceId);
183649
+ __decorateElement(_init92, 4, "eligibleSessionIdsByResourceId", _eligibleSessionIdsByResourceId_dec, _DeesHarnessSessionList, _eligibleSessionIdsByResourceId);
183032
183650
  __decorateElement(_init92, 4, "search", _search_dec, _DeesHarnessSessionList, _search);
183033
183651
  __decorateElement(_init92, 4, "draggingSessionId", _draggingSessionId_dec, _DeesHarnessSessionList, _draggingSessionId);
183652
+ __decorateElement(_init92, 4, "draggingResourceId", _draggingResourceId_dec, _DeesHarnessSessionList, _draggingResourceId);
183653
+ __decorateElement(_init92, 4, "resourceDropTargetSessionId", _resourceDropTargetSessionId_dec, _DeesHarnessSessionList, _resourceDropTargetSessionId);
183034
183654
  __decorateElement(_init92, 4, "dropSlot", _dropSlot_dec, _DeesHarnessSessionList, _dropSlot);
183035
183655
  __decorateElement(_init92, 4, "draggedItemHeight", _draggedItemHeight_dec, _DeesHarnessSessionList, _draggedItemHeight);
183036
183656
  __decorateElement(_init92, 4, "expandedSessionIds", _expandedSessionIds_dec, _DeesHarnessSessionList, _expandedSessionIds);
@@ -183038,6 +183658,7 @@ __decorateElement(_init92, 4, "collapsedGroupIds", _collapsedGroupIds_dec, _Dees
183038
183658
  __decorateElement(_init92, 4, "topScrollShadowVisible", _topScrollShadowVisible_dec, _DeesHarnessSessionList, _topScrollShadowVisible);
183039
183659
  __decorateElement(_init92, 4, "bottomScrollShadowVisible", _bottomScrollShadowVisible_dec, _DeesHarnessSessionList, _bottomScrollShadowVisible);
183040
183660
  __decorateElement(_init92, 4, "moveAnnouncement", _moveAnnouncement_dec, _DeesHarnessSessionList, _moveAnnouncement);
183661
+ __decorateElement(_init92, 4, "resourceContextResourceId", _resourceContextResourceId_dec, _DeesHarnessSessionList, _resourceContextResourceId);
183041
183662
  _DeesHarnessSessionList = __decorateElement(_init92, 0, "DeesHarnessSessionList", _DeesHarnessSessionList_decorators, _DeesHarnessSessionList);
183042
183663
  __name(_DeesHarnessSessionList, "DeesHarnessSessionList");
183043
183664
  __publicField(_DeesHarnessSessionList, "demo", demoFunc65);
@@ -183208,6 +183829,8 @@ __publicField(_DeesHarnessSessionList, "styles", [
183208
183829
  }
183209
183830
 
183210
183831
  .itemInner {
183832
+ position: relative;
183833
+ isolation: isolate;
183211
183834
  min-width: 0;
183212
183835
  overflow: hidden;
183213
183836
  border: 1px solid var(--card-inner-border);
@@ -183240,24 +183863,34 @@ __publicField(_DeesHarnessSessionList, "styles", [
183240
183863
 
183241
183864
  @keyframes workingBackgroundScan {
183242
183865
  from {
183243
- background-position: 100% 0;
183866
+ transform: translate3d(-60%, 0, 0);
183244
183867
  }
183245
183868
  to {
183246
- background-position: 0 0;
183869
+ transform: translate3d(0, 0, 0);
183247
183870
  }
183248
183871
  }
183249
183872
 
183250
183873
  .item.state-working .itemInner {
183251
- background:
183252
- linear-gradient(
183253
- 105deg,
183254
- transparent 40%,
183255
- color-mix(in srgb, var(--session-working) 6%, transparent) 45%,
183256
- color-mix(in srgb, var(--session-working) 20%, transparent) 50%,
183257
- color-mix(in srgb, var(--session-working) 6%, transparent) 55%,
183258
- transparent 60%
183259
- ) 100% 0 / 250% 100% no-repeat,
183260
- var(--dees-color-bg-primary);
183874
+ background: var(--dees-color-bg-primary);
183875
+ }
183876
+
183877
+ .item.state-working .itemInner::before {
183878
+ content: '';
183879
+ position: absolute;
183880
+ z-index: -1;
183881
+ inset: 0 auto 0 0;
183882
+ width: 250%;
183883
+ pointer-events: none;
183884
+ background: linear-gradient(
183885
+ 105deg,
183886
+ transparent 40%,
183887
+ color-mix(in srgb, var(--session-working) 6%, transparent) 45%,
183888
+ color-mix(in srgb, var(--session-working) 20%, transparent) 50%,
183889
+ color-mix(in srgb, var(--session-working) 6%, transparent) 55%,
183890
+ transparent 60%
183891
+ );
183892
+ transform: translate3d(-60%, 0, 0);
183893
+ will-change: transform;
183261
183894
  animation: workingBackgroundScan 2s linear infinite;
183262
183895
  }
183263
183896
 
@@ -183288,6 +183921,12 @@ __publicField(_DeesHarnessSessionList, "styles", [
183288
183921
  --card-accent: var(--session-error);
183289
183922
  }
183290
183923
 
183924
+ .item.resourceDropTarget {
183925
+ outline: 2px solid var(--dees-color-accent-primary);
183926
+ outline-offset: 2px;
183927
+ box-shadow: 0 0 0 5px var(--dees-color-focus-ring), var(--dees-shadow-lg);
183928
+ }
183929
+
183291
183930
  @keyframes attentionPulse {
183292
183931
  0%, 100% {
183293
183932
  background: color-mix(in srgb, var(--dees-color-bg-primary) 94%, var(--session-attention) 6%);
@@ -183462,6 +184101,183 @@ __publicField(_DeesHarnessSessionList, "styles", [
183462
184101
  font-size: var(--dees-font-caption2-size, 10px);
183463
184102
  }
183464
184103
 
184104
+ .resourceDropLabel {
184105
+ margin: 0 10px 10px;
184106
+ padding: 6px 9px;
184107
+ border-radius: var(--dees-radius-md);
184108
+ background: color-mix(in srgb, var(--dees-color-accent-primary) 14%, transparent);
184109
+ color: var(--dees-color-accent-primary);
184110
+ font-size: var(--dees-font-caption1-size, 11px);
184111
+ font-weight: 680;
184112
+ text-align: center;
184113
+ }
184114
+
184115
+ .resourceChildren {
184116
+ display: grid;
184117
+ gap: 4px;
184118
+ margin: 0 8px 8px 24px;
184119
+ padding: 0;
184120
+ list-style: none;
184121
+ }
184122
+
184123
+ .resourceSection {
184124
+ margin-top: var(--dees-spacing-md);
184125
+ }
184126
+
184127
+ .resourceSectionTitle {
184128
+ margin: 0 0 7px;
184129
+ padding: var(--dees-spacing-xs) 6px;
184130
+ color: var(--dees-color-text-secondary);
184131
+ font-size: var(--dees-font-caption1-size, 11px);
184132
+ font-weight: 650;
184133
+ letter-spacing: 0.05em;
184134
+ text-transform: uppercase;
184135
+ }
184136
+
184137
+ .resourceList {
184138
+ display: grid;
184139
+ gap: var(--dees-spacing-sm);
184140
+ margin: 0;
184141
+ padding: 0;
184142
+ list-style: none;
184143
+ }
184144
+
184145
+ .resourceRow {
184146
+ display: grid;
184147
+ grid-template-columns: 26px minmax(0, 1fr) 38px;
184148
+ min-width: 0;
184149
+ overflow: hidden;
184150
+ border: 1px solid var(--dees-color-border-subtle);
184151
+ border-radius: var(--dees-radius-lg);
184152
+ background: color-mix(in srgb, var(--dees-color-bg-secondary) 76%, transparent);
184153
+ color: var(--dees-color-text-primary);
184154
+ box-shadow: var(--dees-shadow-xs);
184155
+ box-sizing: border-box;
184156
+ }
184157
+
184158
+ .resourceRow.selected {
184159
+ border-color: var(--dees-color-accent-primary);
184160
+ background: color-mix(in srgb, var(--dees-color-accent-primary) 10%, var(--dees-color-bg-secondary));
184161
+ }
184162
+
184163
+ .resourceRow.resourceDragging {
184164
+ position: fixed;
184165
+ inset: 0 auto auto 0;
184166
+ width: var(--resource-drag-preview-width);
184167
+ max-width: none;
184168
+ margin: 0;
184169
+ opacity: 0.96;
184170
+ pointer-events: none;
184171
+ transform: translate3d(var(--resource-drag-preview-x), var(--resource-drag-preview-y), 0);
184172
+ box-shadow: var(--dees-shadow-xl);
184173
+ }
184174
+
184175
+ .resourceDragHandle,
184176
+ .resourcePrimary,
184177
+ .resourceActions {
184178
+ appearance: none;
184179
+ border: 0;
184180
+ background: transparent;
184181
+ color: inherit;
184182
+ font-family: inherit;
184183
+ }
184184
+
184185
+ .resourceDragHandle {
184186
+ display: grid;
184187
+ place-items: center;
184188
+ min-width: 26px;
184189
+ padding: 0;
184190
+ color: var(--dees-color-text-muted);
184191
+ cursor: grab;
184192
+ touch-action: none;
184193
+ }
184194
+
184195
+ .resourceDragHandle:disabled {
184196
+ opacity: 0.35;
184197
+ cursor: default;
184198
+ }
184199
+
184200
+ .resourceDragHandle:not(:disabled):active {
184201
+ cursor: grabbing;
184202
+ }
184203
+
184204
+ .resourcePrimary {
184205
+ display: flex;
184206
+ min-width: 0;
184207
+ min-height: 38px;
184208
+ align-items: center;
184209
+ gap: 7px;
184210
+ padding: 5px 4px 5px 7px;
184211
+ text-align: left;
184212
+ cursor: pointer;
184213
+ }
184214
+
184215
+ .resourceIcon {
184216
+ flex: 0 0 auto;
184217
+ color: var(--dees-color-text-secondary);
184218
+ }
184219
+
184220
+ .resourceCopy {
184221
+ min-width: 0;
184222
+ flex: 1;
184223
+ }
184224
+
184225
+ .resourceTitle {
184226
+ display: block;
184227
+ overflow: hidden;
184228
+ color: var(--dees-color-text-primary);
184229
+ font-size: var(--dees-font-caption1-size, 11px);
184230
+ font-weight: 620;
184231
+ text-overflow: ellipsis;
184232
+ white-space: nowrap;
184233
+ }
184234
+
184235
+ .resourcePreview {
184236
+ display: block;
184237
+ overflow: hidden;
184238
+ margin-top: 1px;
184239
+ color: var(--dees-color-text-secondary);
184240
+ font-size: var(--dees-font-caption2-size, 10px);
184241
+ text-overflow: ellipsis;
184242
+ white-space: nowrap;
184243
+ }
184244
+
184245
+ .resourceMeta {
184246
+ display: block;
184247
+ overflow: hidden;
184248
+ margin-top: 1px;
184249
+ color: var(--dees-color-text-muted);
184250
+ font-size: var(--dees-font-caption2-size, 10px);
184251
+ text-overflow: ellipsis;
184252
+ white-space: nowrap;
184253
+ }
184254
+
184255
+ .resourceActions {
184256
+ display: grid;
184257
+ place-items: center;
184258
+ min-width: 34px;
184259
+ min-height: 34px;
184260
+ margin: 2px;
184261
+ padding: 0;
184262
+ border-radius: var(--dees-radius-md);
184263
+ color: var(--dees-color-text-muted);
184264
+ cursor: pointer;
184265
+ }
184266
+
184267
+ .resourceActions:hover {
184268
+ background: var(--dees-color-hover);
184269
+ color: var(--dees-color-text-primary);
184270
+ }
184271
+
184272
+ .resourceDragHandle:focus-visible,
184273
+ .resourcePrimary:focus-visible,
184274
+ .resourceActions:focus-visible {
184275
+ z-index: 1;
184276
+ outline: 2px solid var(--dees-color-accent-primary);
184277
+ outline-offset: -3px;
184278
+ border-radius: var(--dees-radius-md);
184279
+ }
184280
+
183465
184281
  .visuallyHidden {
183466
184282
  position: absolute;
183467
184283
  width: 1px;
@@ -183581,12 +184397,45 @@ __publicField(_DeesHarnessSessionList, "styles", [
183581
184397
  .item,
183582
184398
  .itemInner,
183583
184399
  .item.state-attention .itemInner,
184400
+ .item.state-working .itemInner::before,
183584
184401
  .item.state-working .itemHeader .stateDot,
183585
184402
  .scrollShadow,
183586
184403
  .expandToggle dees-icon {
183587
184404
  animation: none;
183588
184405
  transition: none;
183589
184406
  }
184407
+
184408
+ .item.state-working .itemInner::before {
184409
+ transform: translate3d(-60%, 0, 0);
184410
+ will-change: auto;
184411
+ }
184412
+ }
184413
+
184414
+ @media (pointer: coarse) {
184415
+ .resourceRow {
184416
+ grid-template-columns: 44px minmax(0, 1fr) 44px;
184417
+ }
184418
+
184419
+ .resourceDragHandle,
184420
+ .resourceActions {
184421
+ min-width: 44px;
184422
+ min-height: 44px;
184423
+ margin: 0;
184424
+ }
184425
+
184426
+ .resourcePrimary {
184427
+ min-height: 44px;
184428
+ }
184429
+ }
184430
+
184431
+ @media (max-width: 280px) {
184432
+ .resourceChildren {
184433
+ margin-left: 8px;
184434
+ }
184435
+
184436
+ .resourcePreview {
184437
+ display: none;
184438
+ }
183590
184439
  }
183591
184440
  `
183592
184441
  ]);
@@ -186380,6 +187229,7 @@ var computeResizeDimensions = /* @__PURE__ */ __name(({
186380
187229
  }, "computeResizeDimensions");
186381
187230
 
186382
187231
  // ts_web/elements/00group-layout/dees-dashboardgrid/contextmenu.ts
187232
+ init_dees_contextmenu();
186383
187233
  init_plugins4();
186384
187234
  var openWidgetContextMenu = /* @__PURE__ */ __name(({
186385
187235
  widget,
@@ -186402,6 +187252,7 @@ var openWidgetContextMenu = /* @__PURE__ */ __name(({
186402
187252
  // ts_web/elements/00group-layout/dees-dashboardgrid/dees-dashboardgrid.ts
186403
187253
  init_dist_ts26();
186404
187254
  init_dees_icon();
187255
+ init_dees_contextmenu();
186405
187256
  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;
186406
187257
  _DeesDashboardgrid_decorators = [customElement("dees-dashboardgrid")];
186407
187258
  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) {
@@ -196287,6 +197138,9 @@ __publicField(_DeesThumbnailFolder, "styles", [
196287
197138
  __runInitializers(_init115, 1, _DeesThumbnailFolder);
196288
197139
  var DeesThumbnailFolder = _DeesThumbnailFolder;
196289
197140
 
197141
+ // ts_web/elements/00group-overlay/dees-contextmenu/index.ts
197142
+ init_dees_contextmenu();
197143
+
196290
197144
  // ts_web/elements/00group-overlay/dees-modal/index.ts
196291
197145
  init_dees_modal();
196292
197146
 
@@ -200875,6 +201729,8 @@ init_dist_ts26();
200875
201729
  init_dist_ts25();
200876
201730
  init_theme();
200877
201731
  init_dees_icon();
201732
+ init_dees_contextmenu();
201733
+ init_dees_contextmenu();
200878
201734
  init_dees_modal();
200879
201735
  var _errorMessage_dec, _isLoading_dec3, _treeData_dec, _selectedPath_dec, _rootPath_dec, _executionEnvironment_dec2, _a124, _DeesWorkspaceFiletree_decorators, _init127, _executionEnvironment2, _rootPath, _selectedPath, _treeData, _isLoading3, _errorMessage;
200880
201736
  _DeesWorkspaceFiletree_decorators = [customElement("dees-workspace-filetree")];
@@ -202181,6 +203037,7 @@ var demoFunc82 = /* @__PURE__ */ __name(() => b2`
202181
203037
  init_dist_ts26();
202182
203038
  init_theme();
202183
203039
  init_dees_icon();
203040
+ init_dees_contextmenu();
202184
203041
  var _isCheckingPackages_dec, _outdatedPackages_dec, _packageStatus_dec, _scripts_dec, _executionEnvironment_dec3, _a126, _DeesWorkspaceBottombar_decorators, _init129, _executionEnvironment3, _scripts, _packageStatus, _outdatedPackages, _isCheckingPackages;
202185
203042
  _DeesWorkspaceBottombar_decorators = [customElement("dees-workspace-bottombar")];
202186
203043
  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) {
@@ -203264,6 +204121,7 @@ init_group_runtime();
203264
204121
  init_dees_workspace_terminal();
203265
204122
  init_dees_workspace_terminal();
203266
204123
  init_dees_icon();
204124
+ init_dees_contextmenu();
203267
204125
  init_dees_actionbar();
203268
204126
  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;
203269
204127
  _DeesWorkspace_decorators = [customElement("dees-workspace")];
@@ -205669,7 +206527,7 @@ init_group_runtime();
205669
206527
  // ts_web/00_commitinfo_data.ts
205670
206528
  var commitinfo = {
205671
206529
  name: "@design.estate/dees-catalog",
205672
- version: "6.6.0",
206530
+ version: "6.7.1",
205673
206531
  description: "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript."
205674
206532
  };
205675
206533