@nvidia-elements/core 2.23.5 → 2.23.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/accordion/accordion2.js +4 -4
  3. package/dist/alert/alert-group2.js +1 -1
  4. package/dist/alert/alert2.js +1 -1
  5. package/dist/avatar/avatar-group2.js +1 -1
  6. package/dist/avatar/avatar2.js +1 -1
  7. package/dist/badge/badge2.js +1 -1
  8. package/dist/breadcrumb/breadcrumb2.js +1 -1
  9. package/dist/bundles/index.js +7 -7
  10. package/dist/button/button2.js +1 -1
  11. package/dist/button-group/button-group2.js +1 -1
  12. package/dist/card/card2.js +4 -4
  13. package/dist/chat-message/chat-message2.js +1 -1
  14. package/dist/checkbox/checkbox-group2.js +1 -1
  15. package/dist/checkbox/checkbox2.js +1 -1
  16. package/dist/color/color2.js +1 -1
  17. package/dist/combobox/combobox2.js +1 -1
  18. package/dist/copy-button/copy-button2.js +1 -1
  19. package/dist/custom-elements.json +1000 -229
  20. package/dist/date/date2.js +1 -1
  21. package/dist/datetime/datetime2.js +1 -1
  22. package/dist/dialog/dialog-footer2.js +1 -1
  23. package/dist/dialog/dialog-header2.js +1 -1
  24. package/dist/dialog/dialog2.js +1 -1
  25. package/dist/divider/divider2.js +1 -1
  26. package/dist/dot/dot2.js +1 -1
  27. package/dist/drag-handle/drag-handle2.js +1 -1
  28. package/dist/drawer/drawer-content2.js +1 -1
  29. package/dist/drawer/drawer-footer2.js +1 -1
  30. package/dist/drawer/drawer-header2.js +1 -1
  31. package/dist/drawer/drawer2.js +1 -1
  32. package/dist/dropdown/dropdown-footer2.js +1 -1
  33. package/dist/dropdown/dropdown-header2.js +1 -1
  34. package/dist/dropdown/dropdown2.js +1 -1
  35. package/dist/dropdown-group/dropdown-group.js +1 -1
  36. package/dist/dropzone/dropzone2.js +1 -1
  37. package/dist/file/file2.js +1 -1
  38. package/dist/format-bytes/format-bytes2.js +1 -1
  39. package/dist/format-datetime/format-datetime2.js +1 -1
  40. package/dist/format-number/format-number2.js +1 -1
  41. package/dist/format-relative-time/format-relative-time2.js +1 -1
  42. package/dist/format-truncate/format-truncate2.js +1 -1
  43. package/dist/forms/control/control2.js +1 -1
  44. package/dist/forms/control-group/control-group2.js +1 -1
  45. package/dist/forms/control-message/control-message2.js +1 -1
  46. package/dist/gauge/gauge2.js +1 -1
  47. package/dist/ghost/ghost2.js +1 -1
  48. package/dist/grid/cell/cell2.js +1 -1
  49. package/dist/grid/column/column2.js +1 -1
  50. package/dist/grid/footer/footer2.js +1 -1
  51. package/dist/grid/grid2.js +1 -1
  52. package/dist/grid/header/header2.js +1 -1
  53. package/dist/grid/placeholder/placeholder2.js +1 -1
  54. package/dist/grid/row/row2.js +1 -1
  55. package/dist/icon/icon2.js +1 -1
  56. package/dist/icon-button/icon-button2.js +1 -1
  57. package/dist/iframe/iframe2.js +1 -1
  58. package/dist/index.js +1 -1
  59. package/dist/input/input-group2.js +1 -1
  60. package/dist/input/input2.js +1 -1
  61. package/dist/joystick/joystick2.js +1 -1
  62. package/dist/logo/logo2.js +1 -1
  63. package/dist/menu/menu-group2.js +1 -1
  64. package/dist/menu/menu-item2.js +1 -1
  65. package/dist/menu/menu2.js +1 -1
  66. package/dist/month/month2.js +1 -1
  67. package/dist/notification/notification-group2.js +1 -1
  68. package/dist/notification/notification2.js +1 -1
  69. package/dist/page/page-panel/page-panel-content2.js +1 -1
  70. package/dist/page/page-panel/page-panel-footer2.js +1 -1
  71. package/dist/page/page-panel/page-panel-header2.js +1 -1
  72. package/dist/page/page-panel/page-panel2.js +1 -1
  73. package/dist/page/page2.js +1 -1
  74. package/dist/page-header/page-header2.js +1 -1
  75. package/dist/page-loader/page-loader2.js +1 -1
  76. package/dist/pagination/pagination2.js +1 -1
  77. package/dist/panel/panel2.js +4 -4
  78. package/dist/password/password2.js +1 -1
  79. package/dist/preferences-input/preferences-input2.js +1 -1
  80. package/dist/progress-bar/progress-bar2.js +1 -1
  81. package/dist/progress-dot/progress-dot2.js +1 -1
  82. package/dist/progress-ring/progress-ring2.js +1 -1
  83. package/dist/progressive-filter-chip/progressive-filter-chip2.js +1 -1
  84. package/dist/pulse/pulse2.js +1 -1
  85. package/dist/radio/radio-group2.js +1 -1
  86. package/dist/radio/radio2.js +1 -1
  87. package/dist/range/range2.js +1 -1
  88. package/dist/resize-handle/resize-handle2.js +1 -1
  89. package/dist/search/search2.js +1 -1
  90. package/dist/select/select2.js +1 -1
  91. package/dist/skeleton/skeleton2.js +1 -1
  92. package/dist/sort-button/sort-button2.js +1 -1
  93. package/dist/sparkline/sparkline2.js +1 -1
  94. package/dist/star-rating/star-rating2.js +1 -1
  95. package/dist/steps/steps2.js +2 -2
  96. package/dist/switch/switch-group2.js +1 -1
  97. package/dist/switch/switch2.js +1 -1
  98. package/dist/tabs/tabs-group2.js +1 -1
  99. package/dist/tabs/tabs-item-group2.js +1 -1
  100. package/dist/tabs/tabs2.js +2 -2
  101. package/dist/tag/tag2.js +1 -1
  102. package/dist/textarea/textarea2.js +1 -1
  103. package/dist/time/time2.js +1 -1
  104. package/dist/toast/toast2.js +1 -1
  105. package/dist/toggletip/toggletip-footer2.js +1 -1
  106. package/dist/toggletip/toggletip-header2.js +1 -1
  107. package/dist/toggletip/toggletip2.js +1 -1
  108. package/dist/toolbar/toolbar2.js +1 -1
  109. package/dist/tooltip/tooltip2.js +1 -1
  110. package/dist/tree/tree-node2.js +1 -1
  111. package/dist/tree/tree2.js +1 -1
  112. package/dist/week/week2.js +1 -1
  113. package/dist/workspace/controllers/workspace-composition.controller.d.ts +4 -1
  114. package/dist/workspace/controllers/workspace-composition.controller.js +69 -39
  115. package/dist/workspace/controllers/workspace-composition.controller.js.map +1 -1
  116. package/dist/workspace/controllers/workspace-rearrange.controller.js +27 -27
  117. package/dist/workspace/controllers/workspace-rearrange.controller.js.map +1 -1
  118. package/dist/workspace/controllers/workspace-restoration.controller.js +2 -2
  119. package/dist/workspace/controllers/workspace-restoration.controller.js.map +1 -1
  120. package/dist/workspace/panel/panel2.js +2 -2
  121. package/dist/workspace/panel/panel2.js.map +1 -1
  122. package/dist/workspace/panel-content/panel-content2.js +1 -1
  123. package/dist/workspace/panel-footer/panel-footer2.js +1 -1
  124. package/dist/workspace/panel-header/panel-header2.js +1 -1
  125. package/dist/workspace/utils/comparison.utils.d.ts +3 -0
  126. package/dist/workspace/utils/comparison.utils.js +13 -0
  127. package/dist/workspace/utils/comparison.utils.js.map +1 -0
  128. package/dist/workspace/utils/evaluation.utils.d.ts +65 -6
  129. package/dist/workspace/utils/evaluation.utils.js +334 -99
  130. package/dist/workspace/utils/evaluation.utils.js.map +1 -1
  131. package/dist/workspace/utils/geometry/allocation.utils.js +15 -13
  132. package/dist/workspace/utils/geometry/allocation.utils.js.map +1 -1
  133. package/dist/workspace/utils/geometry/sizing.utils.d.ts +2 -0
  134. package/dist/workspace/utils/geometry/sizing.utils.js +37 -17
  135. package/dist/workspace/utils/geometry/sizing.utils.js.map +1 -1
  136. package/dist/workspace/utils/interaction/boundary.utils.d.ts +2 -2
  137. package/dist/workspace/utils/interaction/boundary.utils.js +2 -2
  138. package/dist/workspace/utils/interaction/boundary.utils.js.map +1 -1
  139. package/dist/workspace/utils/interaction/drag-preview.utils.d.ts +3 -3
  140. package/dist/workspace/utils/interaction/drag-preview.utils.js.map +1 -1
  141. package/dist/workspace/utils/interaction/insertion-offers.utils.d.ts +11 -9
  142. package/dist/workspace/utils/interaction/insertion-offers.utils.js +37 -43
  143. package/dist/workspace/utils/interaction/insertion-offers.utils.js.map +1 -1
  144. package/dist/workspace/utils/interaction/placement-decision.utils.d.ts +6 -1
  145. package/dist/workspace/utils/interaction/placement-decision.utils.js +94 -87
  146. package/dist/workspace/utils/interaction/placement-decision.utils.js.map +1 -1
  147. package/dist/workspace/utils/model/layout.utils.d.ts +2 -1
  148. package/dist/workspace/utils/model/layout.utils.js +12 -10
  149. package/dist/workspace/utils/model/layout.utils.js.map +1 -1
  150. package/dist/workspace/utils/model/membership.utils.d.ts +4 -0
  151. package/dist/workspace/utils/model/membership.utils.js +13 -4
  152. package/dist/workspace/utils/model/membership.utils.js.map +1 -1
  153. package/dist/workspace/utils/model/operations.utils.d.ts +1 -0
  154. package/dist/workspace/utils/model/operations.utils.js +51 -46
  155. package/dist/workspace/utils/model/operations.utils.js.map +1 -1
  156. package/dist/workspace/utils/model/projection.utils.d.ts +4 -2
  157. package/dist/workspace/utils/model/projection.utils.js +49 -40
  158. package/dist/workspace/utils/model/projection.utils.js.map +1 -1
  159. package/dist/workspace/utils/model/value.utils.d.ts +4 -3
  160. package/dist/workspace/utils/model/value.utils.js +15 -50
  161. package/dist/workspace/utils/model/value.utils.js.map +1 -1
  162. package/dist/workspace/utils/placement/acquisition-sizing.utils.d.ts +2 -0
  163. package/dist/workspace/utils/placement/acquisition-sizing.utils.js +30 -22
  164. package/dist/workspace/utils/placement/acquisition-sizing.utils.js.map +1 -1
  165. package/dist/workspace/utils/placement/group-insertion.utils.d.ts +19 -13
  166. package/dist/workspace/utils/placement/group-insertion.utils.js +50 -47
  167. package/dist/workspace/utils/placement/group-insertion.utils.js.map +1 -1
  168. package/dist/workspace/utils/placement/planner.utils.d.ts +13 -2
  169. package/dist/workspace/utils/placement/planner.utils.js +79 -73
  170. package/dist/workspace/utils/placement/planner.utils.js.map +1 -1
  171. package/dist/workspace/utils/placement/preparation.utils.d.ts +5 -2
  172. package/dist/workspace/utils/placement/preparation.utils.js +45 -41
  173. package/dist/workspace/utils/placement/preparation.utils.js.map +1 -1
  174. package/dist/workspace/utils/placement/region.utils.js +32 -32
  175. package/dist/workspace/utils/placement/region.utils.js.map +1 -1
  176. package/dist/workspace/utils/placement/scope.utils.d.ts +34 -0
  177. package/dist/workspace/utils/placement/scope.utils.js +155 -0
  178. package/dist/workspace/utils/placement/scope.utils.js.map +1 -0
  179. package/dist/workspace/utils/placement/session.utils.d.ts +11 -0
  180. package/dist/workspace/utils/placement/session.utils.js +78 -0
  181. package/dist/workspace/utils/placement/session.utils.js.map +1 -0
  182. package/dist/workspace/utils/placement/split-sizing.utils.d.ts +2 -2
  183. package/dist/workspace/utils/placement/split-sizing.utils.js +19 -19
  184. package/dist/workspace/utils/placement/split-sizing.utils.js.map +1 -1
  185. package/dist/workspace/utils/presentation/composition.utils.d.ts +1 -1
  186. package/dist/workspace/utils/presentation/composition.utils.js +4 -2
  187. package/dist/workspace/utils/presentation/composition.utils.js.map +1 -1
  188. package/dist/workspace/utils/presentation/groups.utils.d.ts +3 -3
  189. package/dist/workspace/utils/presentation/groups.utils.js +40 -30
  190. package/dist/workspace/utils/presentation/groups.utils.js.map +1 -1
  191. package/dist/workspace/utils/presentation/measurements.utils.d.ts +1 -0
  192. package/dist/workspace/utils/presentation/measurements.utils.js +6 -14
  193. package/dist/workspace/utils/presentation/measurements.utils.js.map +1 -1
  194. package/dist/workspace/utils/presentation/offers.utils.d.ts +1 -1
  195. package/dist/workspace/utils/presentation/offers.utils.js +3 -3
  196. package/dist/workspace/utils/presentation/offers.utils.js.map +1 -1
  197. package/dist/workspace/utils/presentation/preview.utils.d.ts +6 -0
  198. package/dist/workspace/utils/presentation/preview.utils.js +14 -3
  199. package/dist/workspace/utils/presentation/preview.utils.js.map +1 -1
  200. package/dist/workspace/workspace.examples.js.map +1 -1
  201. package/dist/workspace/workspace.examples.json +4 -4
  202. package/dist/workspace/workspace.js +1 -1
  203. package/dist/workspace/workspace.js.map +1 -1
  204. package/dist/workspace/workspace2.js +206 -212
  205. package/dist/workspace/workspace2.js.map +1 -1
  206. package/package.json +1 -1
  207. package/dist/workspace/utils/placement/context.utils.d.ts +0 -36
  208. package/dist/workspace/utils/placement/context.utils.js +0 -135
  209. package/dist/workspace/utils/placement/context.utils.js.map +0 -1
@@ -16,7 +16,7 @@ var c = { loading: "loading" }, l = class extends r {
16
16
  static {
17
17
  this.metadata = {
18
18
  tag: "nve-progress-dot",
19
- version: "2.23.5"
19
+ version: "2.23.6"
20
20
  };
21
21
  }
22
22
  #e;
@@ -24,7 +24,7 @@ var d = {
24
24
  static {
25
25
  this.metadata = {
26
26
  tag: "nve-progress-ring",
27
- version: "2.23.5"
27
+ version: "2.23.6"
28
28
  };
29
29
  }
30
30
  static {
@@ -23,7 +23,7 @@ var b = { close: "close" }, x = class extends f {
23
23
  static {
24
24
  this.metadata = {
25
25
  tag: "nve-progressive-filter-chip",
26
- version: "2.23.5"
26
+ version: "2.23.6"
27
27
  };
28
28
  }
29
29
  static {
@@ -13,7 +13,7 @@ var c = class extends i {
13
13
  static {
14
14
  this.metadata = {
15
15
  tag: "nve-pulse",
16
- version: "2.23.5"
16
+ version: "2.23.6"
17
17
  };
18
18
  }
19
19
  static {
@@ -12,7 +12,7 @@ var o = class extends r {
12
12
  static {
13
13
  this.metadata = {
14
14
  tag: "nve-radio-group",
15
- version: "2.23.5",
15
+ version: "2.23.6",
16
16
  children: [
17
17
  "label",
18
18
  "nve-control-message",
@@ -15,7 +15,7 @@ var o = class extends r {
15
15
  static {
16
16
  this.metadata = {
17
17
  tag: "nve-radio",
18
- version: "2.23.5",
18
+ version: "2.23.6",
19
19
  children: [
20
20
  "label",
21
21
  "input",
@@ -17,7 +17,7 @@ var d = class extends r {
17
17
  static {
18
18
  this.metadata = {
19
19
  tag: "nve-range",
20
- version: "2.23.5"
20
+ version: "2.23.6"
21
21
  };
22
22
  }
23
23
  connectedCallback() {
@@ -18,7 +18,7 @@ var u = { resize: "resize" }, d = class extends l(r) {
18
18
  static {
19
19
  this.metadata = {
20
20
  tag: "nve-resize-handle",
21
- version: "2.23.5",
21
+ version: "2.23.6",
22
22
  valueSchema: { type: "number" }
23
23
  };
24
24
  }
@@ -22,7 +22,7 @@ var l = class extends n {
22
22
  static {
23
23
  this.metadata = {
24
24
  tag: "nve-search",
25
- version: "2.23.5"
25
+ version: "2.23.6"
26
26
  };
27
27
  }
28
28
  static {
@@ -30,7 +30,7 @@ var S = {
30
30
  static {
31
31
  this.metadata = {
32
32
  tag: "nve-select",
33
- version: "2.23.5"
33
+ version: "2.23.6"
34
34
  };
35
35
  }
36
36
  static {
@@ -15,7 +15,7 @@ var s = class extends r {
15
15
  static {
16
16
  this.metadata = {
17
17
  tag: "nve-skeleton",
18
- version: "2.23.5"
18
+ version: "2.23.6"
19
19
  };
20
20
  }
21
21
  render() {
@@ -19,7 +19,7 @@ var u = { sort: "sort" }, d = {
19
19
  static {
20
20
  this.metadata = {
21
21
  tag: "nve-sort-button",
22
- version: "2.23.5"
22
+ version: "2.23.6"
23
23
  };
24
24
  }
25
25
  static {
@@ -22,7 +22,7 @@ var C = class extends g {
22
22
  static {
23
23
  this.metadata = {
24
24
  tag: "nve-sparkline",
25
- version: "2.23.5"
25
+ version: "2.23.6"
26
26
  };
27
27
  }
28
28
  render() {
@@ -18,7 +18,7 @@ var l = class extends r {
18
18
  static {
19
19
  this.metadata = {
20
20
  tag: "nve-star-rating",
21
- version: "2.23.5"
21
+ version: "2.23.6"
22
22
  };
23
23
  }
24
24
  static {
@@ -23,7 +23,7 @@ var v = class extends m(l) {
23
23
  static {
24
24
  this.metadata = {
25
25
  tag: "nve-steps-item",
26
- version: "2.23.5",
26
+ version: "2.23.6",
27
27
  parents: ["nve-steps"]
28
28
  };
29
29
  }
@@ -69,7 +69,7 @@ var y = class extends l {
69
69
  static {
70
70
  this.metadata = {
71
71
  tag: "nve-steps",
72
- version: "2.23.5",
72
+ version: "2.23.6",
73
73
  children: ["nve-steps-item"]
74
74
  };
75
75
  }
@@ -11,7 +11,7 @@ var a = class extends n {
11
11
  static {
12
12
  this.metadata = {
13
13
  tag: "nve-switch-group",
14
- version: "2.23.5",
14
+ version: "2.23.6",
15
15
  children: [
16
16
  "label",
17
17
  "nve-control-message",
@@ -15,7 +15,7 @@ var o = class extends r {
15
15
  static {
16
16
  this.metadata = {
17
17
  tag: "nve-switch",
18
- version: "2.23.5",
18
+ version: "2.23.6",
19
19
  children: [
20
20
  "label",
21
21
  "input",
@@ -34,7 +34,7 @@ var h, g = class extends l {
34
34
  static {
35
35
  this.metadata = {
36
36
  tag: "nve-tabs-group",
37
- version: "2.23.5",
37
+ version: "2.23.6",
38
38
  children: ["nve-tabs"]
39
39
  };
40
40
  }
@@ -15,7 +15,7 @@ var c = class extends r {
15
15
  static {
16
16
  this.metadata = {
17
17
  tag: "nve-tabs-item-group",
18
- version: "2.23.5",
18
+ version: "2.23.6",
19
19
  parents: ["nve-tabs"],
20
20
  children: ["nve-tabs-item"]
21
21
  };
@@ -21,7 +21,7 @@ var y = class extends _(p) {
21
21
  static {
22
22
  this.metadata = {
23
23
  tag: "nve-tabs-item",
24
- version: "2.23.5",
24
+ version: "2.23.6",
25
25
  parents: ["nve-tabs", "nve-tabs-item-group"]
26
26
  };
27
27
  }
@@ -65,7 +65,7 @@ var b = class extends p {
65
65
  static {
66
66
  this.metadata = {
67
67
  tag: "nve-tabs",
68
- version: "2.23.5",
68
+ version: "2.23.6",
69
69
  children: ["nve-tabs-item", "nve-tabs-item-group"]
70
70
  };
71
71
  }
package/dist/tag/tag2.js CHANGED
@@ -18,7 +18,7 @@ var p = { close: "close" }, m = class extends f(a) {
18
18
  static {
19
19
  this.metadata = {
20
20
  tag: "nve-tag",
21
- version: "2.23.5"
21
+ version: "2.23.6"
22
22
  };
23
23
  }
24
24
  static {
@@ -16,7 +16,7 @@ var i = class extends e {
16
16
  static {
17
17
  this.metadata = {
18
18
  tag: "nve-textarea",
19
- version: "2.23.5"
19
+ version: "2.23.6"
20
20
  };
21
21
  }
22
22
  };
@@ -22,7 +22,7 @@ var l = { expand: "expand" }, u = class extends n {
22
22
  static {
23
23
  this.metadata = {
24
24
  tag: "nve-time",
25
- version: "2.23.5"
25
+ version: "2.23.6"
26
26
  };
27
27
  }
28
28
  static {
@@ -29,7 +29,7 @@ var g = {
29
29
  static {
30
30
  this.metadata = {
31
31
  tag: "nve-toast",
32
- version: "2.23.5"
32
+ version: "2.23.6"
33
33
  };
34
34
  }
35
35
  static {
@@ -9,7 +9,7 @@ var i = class extends t {
9
9
  static {
10
10
  this.metadata = {
11
11
  tag: "nve-toggletip-footer",
12
- version: "2.23.5",
12
+ version: "2.23.6",
13
13
  parents: ["nve-toggletip"]
14
14
  };
15
15
  }
@@ -9,7 +9,7 @@ var i = class extends t {
9
9
  static {
10
10
  this.metadata = {
11
11
  tag: "nve-toggletip-header",
12
- version: "2.23.5",
12
+ version: "2.23.6",
13
13
  parents: ["nve-toggletip"]
14
14
  };
15
15
  }
@@ -24,7 +24,7 @@ var g = { close: "close" }, _ = class extends l {
24
24
  static {
25
25
  this.metadata = {
26
26
  tag: "nve-toggletip",
27
- version: "2.23.5"
27
+ version: "2.23.6"
28
28
  };
29
29
  }
30
30
  static {
@@ -22,7 +22,7 @@ var f = class extends s {
22
22
  static {
23
23
  this.metadata = {
24
24
  tag: "nve-toolbar",
25
- version: "2.23.5"
25
+ version: "2.23.6"
26
26
  };
27
27
  }
28
28
  static {
@@ -19,7 +19,7 @@ var d = class extends o {
19
19
  static {
20
20
  this.metadata = {
21
21
  tag: "nve-tooltip",
22
- version: "2.23.5"
22
+ version: "2.23.6"
23
23
  };
24
24
  }
25
25
  render() {
@@ -47,7 +47,7 @@ var O = { expand: "expand" }, k = class extends v {
47
47
  static {
48
48
  this.metadata = {
49
49
  tag: "nve-tree-node",
50
- version: "2.23.5",
50
+ version: "2.23.6",
51
51
  parents: ["nve-tree", "nve-tree-node"]
52
52
  };
53
53
  }
@@ -22,7 +22,7 @@ var m = class extends u {
22
22
  static {
23
23
  this.metadata = {
24
24
  tag: "nve-tree",
25
- version: "2.23.5",
25
+ version: "2.23.6",
26
26
  children: ["nve-tree-node"]
27
27
  };
28
28
  }
@@ -22,7 +22,7 @@ var l = { expand: "expand" }, u = class extends n {
22
22
  static {
23
23
  this.metadata = {
24
24
  tag: "nve-week",
25
- version: "2.23.5"
25
+ version: "2.23.6"
26
26
  };
27
27
  }
28
28
  static {
@@ -1,10 +1,10 @@
1
1
  import type { ReactiveControllerHost } from 'lit';
2
+ import { WorkspacePanel } from '../panel/panel.js';
2
3
  import type { WorkspaceDragPreview } from '../utils/interaction/drag-preview.utils.js';
3
4
  import type { WorkspaceLayout } from '../utils/model/layout.utils.js';
4
5
  import type { WorkspacePresentedGroup } from '../utils/presentation/groups.utils.js';
5
6
  import type { WorkspaceMeasurements } from '../utils/presentation/measurements.utils.js';
6
7
  import type { WorkspacePanelHeader } from '../panel-header/panel-header.js';
7
- import type { WorkspacePanel } from '../panel/panel.js';
8
8
  export interface WorkspacePanelTransitionTargets {
9
9
  element: WorkspacePanel;
10
10
  header: ReturnType<WorkspacePanelHeader['_getTransitionTargets']> | undefined;
@@ -23,6 +23,7 @@ interface WorkspaceCompositionDelegate {
23
23
  readonly getLayout: () => WorkspaceLayout | undefined;
24
24
  readonly getPreview: () => WorkspaceDragPreview | undefined;
25
25
  readonly scrollChanged: () => void;
26
+ readonly contentChanged: (kind: 'panels' | 'chrome') => void;
26
27
  }
27
28
  interface WorkspaceCompositionPresentation {
28
29
  groups: WorkspacePresentedGroup[];
@@ -42,6 +43,8 @@ export declare class WorkspaceCompositionController {
42
43
  #private;
43
44
  constructor(host: HTMLElement & ReactiveControllerHost, delegate: WorkspaceCompositionDelegate);
44
45
  hostDisconnected(): void;
46
+ startObserving(): void;
47
+ stopObserving(): void;
45
48
  captureFocus(): void;
46
49
  applyPresentation(input: WorkspaceCompositionPresentation): void;
47
50
  sync(): void;
@@ -1,40 +1,66 @@
1
1
  import { getActiveElement as e } from "../../internal/utils/focus.js";
2
- import { focusWorkspacePanel as t, getPanelLabel as n } from "../utils/presentation/composition.utils.js";
3
- import { getAllocatedTabWidth as r, getTabStripIdentity as i } from "../utils/presentation/groups.utils.js";
2
+ import { matchesElementName as t } from "../../internal/utils/dom.js";
3
+ import { WorkspacePanel as n } from "../panel/panel2.js";
4
+ import { focusWorkspacePanel as r, getPanelLabel as i, isWorkspaceCompositionMutation as a } from "../utils/presentation/composition.utils.js";
5
+ import { createTabStripIdentityResolver as o, getAllocatedTabWidth as s } from "../utils/presentation/groups.utils.js";
4
6
  // src/workspace/controllers/workspace-composition.controller.ts
5
- var a = class {
7
+ var c = class {
6
8
  #e;
7
9
  #t;
8
10
  #n;
11
+ #r;
12
+ #i;
9
13
  constructor(e, t) {
10
14
  this.#e = e, this.#t = t, e.addController(this);
11
15
  }
12
16
  hostDisconnected() {
13
- this.#n = void 0;
17
+ this.#n = void 0, this.#r = void 0;
18
+ }
19
+ startObserving() {
20
+ this.#i = new MutationObserver((e) => this.#a(e)), this.#i.observe(this.#e, {
21
+ childList: !0,
22
+ characterData: !0,
23
+ attributes: !0,
24
+ subtree: !0,
25
+ attributeFilter: [
26
+ "id",
27
+ "min-width",
28
+ "min-height",
29
+ "slot"
30
+ ]
31
+ });
32
+ }
33
+ stopObserving() {
34
+ this.#i?.disconnect(), this.#i = void 0;
35
+ }
36
+ #a(e) {
37
+ let r = e.some((e) => e.type === "childList" && e.target === this.#e || e.type === "attributes" && t(e.target, n) && e.target.parentElement === this.#e), i = e.some((e) => e.type === "attributes" && e.target === this.#e || a(this.#e, e));
38
+ (r || i) && this.#t.contentChanged(r ? "panels" : "chrome");
14
39
  }
15
40
  captureFocus() {
16
- this.#n = this.#t.getPreview() ? void 0 : l(this.#e);
41
+ this.#n = this.#t.getPreview() ? void 0 : f(this.#e);
17
42
  }
18
43
  applyPresentation(e) {
19
44
  let t = e.groups.map((t) => ({
20
45
  group: t,
21
46
  scrollLeft: e.scroll(t)
22
47
  }));
23
- for (let { group: n, scrollLeft: r } of t) o(e, n, r);
48
+ for (let { group: n, scrollLeft: r } of t) l(e, n, r);
24
49
  let n = new Set(e.groups.flatMap((e) => e.panels));
25
50
  this.#t.getPanels().forEach((t) => {
26
51
  t._present(n.has(t) && !e.source.includes(t.id));
27
52
  });
28
53
  }
29
54
  sync() {
55
+ this.#r?.root !== (this.#t.getLayout()?.root ?? null) && (this.#r = void 0);
30
56
  let e = this.#t.getPanels(), t = this.#t.getGroups(), n = this.#t.getPreview();
31
- s(e, t.map((e) => ({
57
+ u(e, t.map((e) => ({
32
58
  group: e,
33
59
  strip: this.findTabStrip(e)
34
- }))), c(this.#e, t, {
60
+ }))), d(this.#e, t, {
35
61
  panels: e,
36
62
  carried: (e) => n?.source.includes(e) ?? !1
37
- }), n || u(this.#e, t, this.#n), this.#n = void 0;
63
+ }), n || p(this.#e, t, this.#n), this.#n = void 0;
38
64
  }
39
65
  getTransitionTargets() {
40
66
  let e = /* @__PURE__ */ new Map();
@@ -50,12 +76,16 @@ var a = class {
50
76
  for (let e of this.#e.shadowRoot?.querySelectorAll("[data-boundary]") ?? []) e.parentElement && t.set(e.dataset.boundary, e.parentElement);
51
77
  return {
52
78
  panels: e,
53
- groups: f(this.#e),
79
+ groups: h(this.#e),
54
80
  gutters: t
55
81
  };
56
82
  }
57
83
  getGroupIdentity(e) {
58
- return i(this.#t.getLayout()?.root ?? null, e.panels.map((e) => e.id), this.#t.getPreview()?.source ?? []);
84
+ let t = this.#t.getLayout()?.root ?? null;
85
+ return this.#r && this.#r.root === t || (this.#r = {
86
+ root: t,
87
+ resolve: o(t)
88
+ }), this.#r.resolve(e.panels.map((e) => e.id), this.#t.getPreview()?.source ?? []);
59
89
  }
60
90
  findTabStrip(e) {
61
91
  return this.#e.shadowRoot?.querySelector(`[data-group="${CSS.escape(this.getGroupIdentity(e))}"]`);
@@ -71,31 +101,31 @@ var a = class {
71
101
  this.#t.getPanels().find((t) => t.id === e)?.querySelector(":scope > nve-workspace-panel-header")?._hover(t);
72
102
  }
73
103
  };
74
- function o(e, t, n) {
75
- let { headerHeight: i, actionWidth: a } = e.measurements, o = r(t, e.measurements), s = e.measurements.groupActionWidth ?? 0, c = (e.measurements.panels?.[t.active]?.suffixWidth ?? 0) + s;
76
- t.panels.forEach((r, l) => {
77
- if (e.source.includes(r.id)) return;
78
- e.container && r.getAttribute("container") !== e.container ? r.setAttribute("container", e.container) : e.container || r.removeAttribute("container"), r.setAttribute("role", t.tabbed ? "tabpanel" : "group"), r.setAttribute("aria-hidden", String(t.active !== r.id));
104
+ function l(e, t, n) {
105
+ let { headerHeight: r, actionWidth: i } = e.measurements, a = s(t, e.measurements), o = e.measurements.groupActionWidth ?? 0, c = (e.measurements.panels?.[t.active]?.suffixWidth ?? 0) + o;
106
+ t.panels.forEach((s, l) => {
107
+ if (e.source.includes(s.id)) return;
108
+ e.container && s.getAttribute("container") !== e.container ? s.setAttribute("container", e.container) : e.container || s.removeAttribute("container"), s.setAttribute("role", t.tabbed ? "tabpanel" : "group"), s.setAttribute("aria-hidden", String(t.active !== s.id));
79
109
  let u = t.rect;
80
- Object.assign(r.style, {
110
+ Object.assign(s.style, {
81
111
  left: `${u.x}px`,
82
112
  top: `${u.y}px`,
83
113
  width: `${u.width}px`,
84
114
  height: `${u.height}px`
85
- }), r.style.setProperty("--_workspace-border-right", e.measurements.gap === 0 && u.x + u.width < e.extent.width - 1e-6 ? "none" : "var(--border)"), r.style.setProperty("--_workspace-border-bottom", e.measurements.gap === 0 && u.y + u.height < e.extent.height - 1e-6 ? "none" : "var(--border)"), r._configure({
86
- selected: t.active === r.id,
87
- offset: t.gripWidth + l * o,
115
+ }), s.style.setProperty("--_workspace-border-right", e.measurements.gap === 0 && u.x + u.width < e.extent.width - 1e-6 ? "none" : "var(--border)"), s.style.setProperty("--_workspace-border-bottom", e.measurements.gap === 0 && u.y + u.height < e.extent.height - 1e-6 ? "none" : "var(--border)"), s._configure({
116
+ selected: t.active === s.id,
117
+ offset: t.gripWidth + l * a,
88
118
  scrollLeft: n,
89
119
  animate: e.animate,
90
- tabWidth: Math.max(0, o - a * Number(e.closable)),
91
- headerHeight: i,
92
- suffixEnd: s,
120
+ tabWidth: Math.max(0, a - i * Number(e.closable)),
121
+ headerHeight: r,
122
+ suffixEnd: o,
93
123
  clipLeft: t.gripWidth,
94
124
  clipWidth: Math.max(0, u.width - t.gripWidth - c)
95
125
  });
96
126
  });
97
127
  }
98
- function s(e, t) {
128
+ function u(e, t) {
99
129
  let n = /* @__PURE__ */ new Map();
100
130
  for (let { group: e, strip: r } of t) {
101
131
  if (!r || e.panels.length < 2) continue;
@@ -110,16 +140,16 @@ function s(e, t) {
110
140
  t.querySelector(":scope > nve-workspace-panel-header")?._bindScroll(e?.source, e?.extent ?? 0);
111
141
  }
112
142
  }
113
- function c(e, t, r) {
114
- r.panels.forEach((e) => {
143
+ function d(e, t, n) {
144
+ n.panels.forEach((e) => {
115
145
  e.hasAttribute("aria-labelledby") && e.removeAttribute("aria-labelledby");
116
- }), t.forEach((t) => t.panels.forEach((i) => {
117
- if (r.carried(i.id)) return;
118
- let a = e.shadowRoot?.querySelector(`[data-panel="${CSS.escape(i.id)}"]`), o = n(r.panels, i.id);
119
- i.setAttribute("aria-label", o), t.tabbed && a?.localName === "nve-tabs-item" && (a.ariaControlsElements = [i], a.setAttribute("aria-label", o));
146
+ }), t.forEach((t) => t.panels.forEach((r) => {
147
+ if (n.carried(r.id)) return;
148
+ let a = e.shadowRoot?.querySelector(`[data-panel="${CSS.escape(r.id)}"]`), o = i(r);
149
+ r.setAttribute("aria-label", o), t.tabbed && a?.localName === "nve-tabs-item" && (a.ariaControlsElements = [r], a.setAttribute("aria-label", o));
120
150
  }));
121
151
  }
122
- function l(e) {
152
+ function f(e) {
123
153
  let t = e.shadowRoot?.activeElement;
124
154
  if (!t || !(t instanceof HTMLElement) || !t.closest(".tabs")) return;
125
155
  let n = t.dataset.panel ?? t.dataset.close ?? t.dataset.dragGroup;
@@ -130,17 +160,17 @@ function l(e) {
130
160
  members: [...t.closest(".tabs")?.querySelectorAll("[data-panel]") ?? []].map((e) => e.dataset.panel)
131
161
  };
132
162
  }
133
- function u(e, n, r) {
134
- if (!r || !d(e, r)) return;
135
- let i = n.find((e) => e.panels.some((e) => e.id === r.id)) ?? n.find((e) => e.panels.some((e) => r.members.includes(e.id)));
163
+ function p(e, t, n) {
164
+ if (!n || !m(e, n)) return;
165
+ let i = t.find((e) => e.panels.some((e) => e.id === n.id)) ?? t.find((e) => e.panels.some((e) => n.members.includes(e.id)));
136
166
  if (!i) return;
137
- let a = i.panels.some((e) => e.id === r.id) ? r.id : i.active, o = r.close && a === r.id ? e.shadowRoot?.querySelector(`[data-close="${CSS.escape(a)}"]`) : void 0;
138
- o ? o.focus({ preventScroll: !0 }) : t(e, {
167
+ let a = i.panels.some((e) => e.id === n.id) ? n.id : i.active, o = n.close && a === n.id ? e.shadowRoot?.querySelector(`[data-close="${CSS.escape(a)}"]`) : void 0;
168
+ o ? o.focus({ preventScroll: !0 }) : r(e, {
139
169
  id: a,
140
170
  preserveScroll: !0
141
171
  });
142
172
  }
143
- function d(t, n) {
173
+ function m(t, n) {
144
174
  if (n.element.isConnected && !n.element.closest("[inert]")) return !1;
145
175
  let r = e(t.ownerDocument);
146
176
  return !r || [
@@ -149,7 +179,7 @@ function d(t, n) {
149
179
  n.element
150
180
  ].some((e) => e === r) ? !0 : !(r.isConnected && !r.closest("[inert]"));
151
181
  }
152
- function f(e) {
182
+ function h(e) {
153
183
  let t = [];
154
184
  for (let n of e.shadowRoot?.querySelectorAll(".group-chrome") ?? []) {
155
185
  let e = /* @__PURE__ */ new Map();
@@ -164,6 +194,6 @@ function f(e) {
164
194
  }
165
195
  return t;
166
196
  }
167
- export { a as WorkspaceCompositionController };
197
+ export { c as WorkspaceCompositionController };
168
198
 
169
199
  //# sourceMappingURL=workspace-composition.controller.js.map