@nvidia-elements/core 2.23.5 → 2.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (298) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/accordion/accordion-group.js.map +1 -1
  3. package/dist/accordion/accordion.js.map +1 -1
  4. package/dist/accordion/accordion2.js +4 -4
  5. package/dist/alert/alert-group2.js +1 -1
  6. package/dist/alert/alert2.js +1 -1
  7. package/dist/avatar/avatar-group2.js +1 -1
  8. package/dist/avatar/avatar2.js +1 -1
  9. package/dist/badge/badge2.js +1 -1
  10. package/dist/breadcrumb/breadcrumb2.js +1 -1
  11. package/dist/bundle.d.ts +2 -0
  12. package/dist/bundles/index.d.ts +323 -56
  13. package/dist/bundles/index.js +9 -9
  14. package/dist/button/button2.js +1 -1
  15. package/dist/button-group/button-group2.js +1 -1
  16. package/dist/card/card2.js +4 -4
  17. package/dist/chat-message/chat-message2.js +1 -1
  18. package/dist/checkbox/checkbox-group2.js +1 -1
  19. package/dist/checkbox/checkbox2.js +1 -1
  20. package/dist/color/color2.js +1 -1
  21. package/dist/combobox/combobox2.js +1 -1
  22. package/dist/copy-button/copy-button2.js +1 -1
  23. package/dist/custom-elements-jsx.d.ts +167 -1
  24. package/dist/custom-elements-vue.d.ts +161 -1
  25. package/dist/custom-elements.json +5017 -268
  26. package/dist/dashboard/controllers/arrangement.controller.d.ts +30 -0
  27. package/dist/dashboard/controllers/arrangement.controller.js +68 -0
  28. package/dist/dashboard/controllers/arrangement.controller.js.map +1 -0
  29. package/dist/dashboard/controllers/command.controller.d.ts +28 -0
  30. package/dist/dashboard/controllers/command.controller.js +69 -0
  31. package/dist/dashboard/controllers/command.controller.js.map +1 -0
  32. package/dist/dashboard/controllers/composition.controller.d.ts +61 -0
  33. package/dist/dashboard/controllers/composition.controller.js +285 -0
  34. package/dist/dashboard/controllers/composition.controller.js.map +1 -0
  35. package/dist/dashboard/controllers/fullscreen.controller.d.ts +23 -0
  36. package/dist/dashboard/controllers/fullscreen.controller.js +46 -0
  37. package/dist/dashboard/controllers/fullscreen.controller.js.map +1 -0
  38. package/dist/dashboard/controllers/interaction.controller.d.ts +53 -0
  39. package/dist/dashboard/controllers/interaction.controller.js +407 -0
  40. package/dist/dashboard/controllers/interaction.controller.js.map +1 -0
  41. package/dist/dashboard/controllers/measurement.controller.d.ts +28 -0
  42. package/dist/dashboard/controllers/measurement.controller.js +77 -0
  43. package/dist/dashboard/controllers/measurement.controller.js.map +1 -0
  44. package/dist/dashboard/dashboard.d.ts +83 -0
  45. package/dist/dashboard/dashboard.examples.js +5 -0
  46. package/dist/dashboard/dashboard.examples.js.map +1 -0
  47. package/dist/dashboard/dashboard.examples.json +138 -0
  48. package/dist/dashboard/dashboard.js +5 -0
  49. package/dist/dashboard/dashboard.js.map +1 -0
  50. package/dist/dashboard/dashboard.types.d.ts +33 -0
  51. package/dist/dashboard/dashboard2.js +352 -0
  52. package/dist/dashboard/dashboard2.js.map +1 -0
  53. package/dist/dashboard/define.d.ts +10 -0
  54. package/dist/dashboard/define.js +9 -0
  55. package/dist/dashboard/define.js.map +1 -0
  56. package/dist/dashboard/index.d.ts +8 -0
  57. package/dist/dashboard/index.js +6 -0
  58. package/dist/dashboard/panel/panel.d.ts +88 -0
  59. package/dist/dashboard/panel/panel.js +5 -0
  60. package/dist/dashboard/panel/panel.js.map +1 -0
  61. package/dist/dashboard/panel/panel2.js +110 -0
  62. package/dist/dashboard/panel/panel2.js.map +1 -0
  63. package/dist/dashboard/panel-content/panel-content.d.ts +20 -0
  64. package/dist/dashboard/panel-content/panel-content.js +5 -0
  65. package/dist/dashboard/panel-content/panel-content.js.map +1 -0
  66. package/dist/dashboard/panel-content/panel-content2.js +22 -0
  67. package/dist/dashboard/panel-content/panel-content2.js.map +1 -0
  68. package/dist/dashboard/panel-footer/panel-footer.d.ts +25 -0
  69. package/dist/dashboard/panel-footer/panel-footer.js +5 -0
  70. package/dist/dashboard/panel-footer/panel-footer.js.map +1 -0
  71. package/dist/dashboard/panel-footer/panel-footer2.js +28 -0
  72. package/dist/dashboard/panel-footer/panel-footer2.js.map +1 -0
  73. package/dist/dashboard/panel-header/panel-header.d.ts +27 -0
  74. package/dist/dashboard/panel-header/panel-header.js +5 -0
  75. package/dist/dashboard/panel-header/panel-header.js.map +1 -0
  76. package/dist/dashboard/panel-header/panel-header2.js +28 -0
  77. package/dist/dashboard/panel-header/panel-header2.js.map +1 -0
  78. package/dist/dashboard/utils/action.utils.d.ts +17 -0
  79. package/dist/dashboard/utils/action.utils.js +144 -0
  80. package/dist/dashboard/utils/action.utils.js.map +1 -0
  81. package/dist/dashboard/utils/geometry.utils.d.ts +110 -0
  82. package/dist/dashboard/utils/geometry.utils.js +208 -0
  83. package/dist/dashboard/utils/geometry.utils.js.map +1 -0
  84. package/dist/dashboard/utils/intent.types.d.ts +67 -0
  85. package/dist/dashboard/utils/layout.utils.d.ts +20 -0
  86. package/dist/dashboard/utils/layout.utils.js +224 -0
  87. package/dist/dashboard/utils/layout.utils.js.map +1 -0
  88. package/dist/dashboard/utils/movement.utils.d.ts +7 -0
  89. package/dist/dashboard/utils/movement.utils.js +15 -0
  90. package/dist/dashboard/utils/movement.utils.js.map +1 -0
  91. package/dist/dashboard/utils/mutation.utils.d.ts +2 -0
  92. package/dist/dashboard/utils/mutation.utils.js +19 -0
  93. package/dist/dashboard/utils/mutation.utils.js.map +1 -0
  94. package/dist/dashboard/utils/packing.utils.d.ts +13 -0
  95. package/dist/dashboard/utils/packing.utils.js +421 -0
  96. package/dist/dashboard/utils/packing.utils.js.map +1 -0
  97. package/dist/data.html.json +141 -1
  98. package/dist/date/date2.js +1 -1
  99. package/dist/datetime/datetime2.js +1 -1
  100. package/dist/dialog/dialog-footer2.js +1 -1
  101. package/dist/dialog/dialog-header2.js +1 -1
  102. package/dist/dialog/dialog2.js +1 -1
  103. package/dist/divider/divider2.js +1 -1
  104. package/dist/dot/dot2.js +1 -1
  105. package/dist/drag-handle/drag-handle2.js +1 -1
  106. package/dist/drawer/drawer-content2.js +1 -1
  107. package/dist/drawer/drawer-footer2.js +1 -1
  108. package/dist/drawer/drawer-header2.js +1 -1
  109. package/dist/drawer/drawer2.js +1 -1
  110. package/dist/dropdown/dropdown-footer2.js +1 -1
  111. package/dist/dropdown/dropdown-header2.js +1 -1
  112. package/dist/dropdown/dropdown.examples.js.map +1 -1
  113. package/dist/dropdown/dropdown2.js +1 -1
  114. package/dist/dropdown-group/dropdown-group.js +1 -1
  115. package/dist/dropzone/dropzone2.js +1 -1
  116. package/dist/file/file2.js +1 -1
  117. package/dist/format-bytes/format-bytes2.js +1 -1
  118. package/dist/format-datetime/format-datetime2.js +1 -1
  119. package/dist/format-number/format-number2.js +1 -1
  120. package/dist/format-relative-time/format-relative-time2.js +1 -1
  121. package/dist/format-truncate/format-truncate2.js +1 -1
  122. package/dist/forms/control/control2.js +1 -1
  123. package/dist/forms/control-group/control-group2.js +1 -1
  124. package/dist/forms/control-message/control-message2.js +1 -1
  125. package/dist/gauge/gauge2.js +1 -1
  126. package/dist/ghost/ghost2.js +1 -1
  127. package/dist/grid/cell/cell2.js +1 -1
  128. package/dist/grid/column/column2.js +1 -1
  129. package/dist/grid/footer/footer2.js +1 -1
  130. package/dist/grid/grid.js.map +1 -1
  131. package/dist/grid/grid2.js +1 -1
  132. package/dist/grid/header/header2.js +1 -1
  133. package/dist/grid/placeholder/placeholder2.js +1 -1
  134. package/dist/grid/row/row2.js +1 -1
  135. package/dist/icon/icon2.js +1 -1
  136. package/dist/icon-button/icon-button2.js +1 -1
  137. package/dist/iframe/iframe2.js +1 -1
  138. package/dist/index.js +1 -1
  139. package/dist/input/input-group2.js +1 -1
  140. package/dist/input/input2.js +1 -1
  141. package/dist/internal/controllers/native-fullscreen.controller.d.ts +13 -0
  142. package/dist/internal/controllers/native-fullscreen.controller.js +73 -0
  143. package/dist/internal/controllers/native-fullscreen.controller.js.map +1 -0
  144. package/dist/internal/index.d.ts +1 -0
  145. package/dist/internal/index.js +59 -57
  146. package/dist/internal/index.js.map +1 -1
  147. package/dist/joystick/joystick2.js +1 -1
  148. package/dist/logo/logo2.js +1 -1
  149. package/dist/menu/menu-group2.js +1 -1
  150. package/dist/menu/menu-item2.js +1 -1
  151. package/dist/menu/menu2.js +1 -1
  152. package/dist/month/month2.js +1 -1
  153. package/dist/notification/notification-group2.js +1 -1
  154. package/dist/notification/notification2.js +1 -1
  155. package/dist/page/page-panel/page-panel-content2.js +1 -1
  156. package/dist/page/page-panel/page-panel-footer2.js +1 -1
  157. package/dist/page/page-panel/page-panel-header2.js +1 -1
  158. package/dist/page/page-panel/page-panel2.js +1 -1
  159. package/dist/page/page2.js +1 -1
  160. package/dist/page-header/page-header2.js +1 -1
  161. package/dist/page-loader/page-loader2.js +1 -1
  162. package/dist/pagination/pagination2.js +1 -1
  163. package/dist/panel/panel2.js +4 -4
  164. package/dist/password/password2.js +1 -1
  165. package/dist/preferences-input/preferences-input2.js +1 -1
  166. package/dist/progress-bar/progress-bar2.js +1 -1
  167. package/dist/progress-dot/progress-dot2.js +1 -1
  168. package/dist/progress-ring/progress-ring2.js +1 -1
  169. package/dist/progressive-filter-chip/progressive-filter-chip2.js +1 -1
  170. package/dist/pulse/pulse2.js +1 -1
  171. package/dist/radio/radio-group2.js +1 -1
  172. package/dist/radio/radio2.js +1 -1
  173. package/dist/range/range2.js +1 -1
  174. package/dist/resize-handle/resize-handle2.js +1 -1
  175. package/dist/search/search2.js +1 -1
  176. package/dist/select/select2.js +1 -1
  177. package/dist/skeleton/skeleton2.js +1 -1
  178. package/dist/sort-button/sort-button2.js +1 -1
  179. package/dist/sparkline/sparkline2.js +1 -1
  180. package/dist/star-rating/star-rating2.js +1 -1
  181. package/dist/steps/steps2.js +2 -2
  182. package/dist/switch/switch-group2.js +1 -1
  183. package/dist/switch/switch2.js +1 -1
  184. package/dist/tabs/tabs-group2.js +1 -1
  185. package/dist/tabs/tabs-item-group2.js +1 -1
  186. package/dist/tabs/tabs2.js +2 -2
  187. package/dist/tag/tag2.js +1 -1
  188. package/dist/textarea/textarea2.js +1 -1
  189. package/dist/time/time2.js +1 -1
  190. package/dist/toast/toast2.js +1 -1
  191. package/dist/toggletip/toggletip-footer2.js +1 -1
  192. package/dist/toggletip/toggletip-header2.js +1 -1
  193. package/dist/toggletip/toggletip2.js +1 -1
  194. package/dist/toolbar/toolbar2.js +1 -1
  195. package/dist/tooltip/tooltip2.js +1 -1
  196. package/dist/tree/tree-node2.js +1 -1
  197. package/dist/tree/tree2.js +1 -1
  198. package/dist/week/week2.js +1 -1
  199. package/dist/workspace/controllers/workspace-composition.controller.d.ts +4 -1
  200. package/dist/workspace/controllers/workspace-composition.controller.js +69 -39
  201. package/dist/workspace/controllers/workspace-composition.controller.js.map +1 -1
  202. package/dist/workspace/controllers/workspace-fullscreen.controller.d.ts +2 -4
  203. package/dist/workspace/controllers/workspace-fullscreen.controller.js +17 -47
  204. package/dist/workspace/controllers/workspace-fullscreen.controller.js.map +1 -1
  205. package/dist/workspace/controllers/workspace-rearrange.controller.js +27 -27
  206. package/dist/workspace/controllers/workspace-rearrange.controller.js.map +1 -1
  207. package/dist/workspace/controllers/workspace-restoration.controller.js +2 -2
  208. package/dist/workspace/controllers/workspace-restoration.controller.js.map +1 -1
  209. package/dist/workspace/panel/panel2.js +2 -2
  210. package/dist/workspace/panel/panel2.js.map +1 -1
  211. package/dist/workspace/panel-content/panel-content2.js +1 -1
  212. package/dist/workspace/panel-footer/panel-footer2.js +1 -1
  213. package/dist/workspace/panel-header/panel-header2.js +1 -1
  214. package/dist/workspace/utils/comparison.utils.d.ts +3 -0
  215. package/dist/workspace/utils/comparison.utils.js +13 -0
  216. package/dist/workspace/utils/comparison.utils.js.map +1 -0
  217. package/dist/workspace/utils/evaluation.utils.d.ts +65 -6
  218. package/dist/workspace/utils/evaluation.utils.js +334 -99
  219. package/dist/workspace/utils/evaluation.utils.js.map +1 -1
  220. package/dist/workspace/utils/geometry/allocation.utils.js +15 -13
  221. package/dist/workspace/utils/geometry/allocation.utils.js.map +1 -1
  222. package/dist/workspace/utils/geometry/sizing.utils.d.ts +2 -0
  223. package/dist/workspace/utils/geometry/sizing.utils.js +37 -17
  224. package/dist/workspace/utils/geometry/sizing.utils.js.map +1 -1
  225. package/dist/workspace/utils/interaction/boundary.utils.d.ts +2 -2
  226. package/dist/workspace/utils/interaction/boundary.utils.js +2 -2
  227. package/dist/workspace/utils/interaction/boundary.utils.js.map +1 -1
  228. package/dist/workspace/utils/interaction/drag-preview.utils.d.ts +3 -3
  229. package/dist/workspace/utils/interaction/drag-preview.utils.js.map +1 -1
  230. package/dist/workspace/utils/interaction/insertion-offers.utils.d.ts +11 -9
  231. package/dist/workspace/utils/interaction/insertion-offers.utils.js +37 -43
  232. package/dist/workspace/utils/interaction/insertion-offers.utils.js.map +1 -1
  233. package/dist/workspace/utils/interaction/placement-decision.utils.d.ts +6 -1
  234. package/dist/workspace/utils/interaction/placement-decision.utils.js +94 -87
  235. package/dist/workspace/utils/interaction/placement-decision.utils.js.map +1 -1
  236. package/dist/workspace/utils/model/layout.utils.d.ts +2 -1
  237. package/dist/workspace/utils/model/layout.utils.js +12 -10
  238. package/dist/workspace/utils/model/layout.utils.js.map +1 -1
  239. package/dist/workspace/utils/model/membership.utils.d.ts +4 -0
  240. package/dist/workspace/utils/model/membership.utils.js +13 -4
  241. package/dist/workspace/utils/model/membership.utils.js.map +1 -1
  242. package/dist/workspace/utils/model/operations.utils.d.ts +1 -0
  243. package/dist/workspace/utils/model/operations.utils.js +51 -46
  244. package/dist/workspace/utils/model/operations.utils.js.map +1 -1
  245. package/dist/workspace/utils/model/projection.utils.d.ts +4 -2
  246. package/dist/workspace/utils/model/projection.utils.js +49 -40
  247. package/dist/workspace/utils/model/projection.utils.js.map +1 -1
  248. package/dist/workspace/utils/model/value.utils.d.ts +4 -3
  249. package/dist/workspace/utils/model/value.utils.js +15 -50
  250. package/dist/workspace/utils/model/value.utils.js.map +1 -1
  251. package/dist/workspace/utils/placement/acquisition-sizing.utils.d.ts +2 -0
  252. package/dist/workspace/utils/placement/acquisition-sizing.utils.js +30 -22
  253. package/dist/workspace/utils/placement/acquisition-sizing.utils.js.map +1 -1
  254. package/dist/workspace/utils/placement/group-insertion.utils.d.ts +19 -13
  255. package/dist/workspace/utils/placement/group-insertion.utils.js +50 -47
  256. package/dist/workspace/utils/placement/group-insertion.utils.js.map +1 -1
  257. package/dist/workspace/utils/placement/planner.utils.d.ts +13 -2
  258. package/dist/workspace/utils/placement/planner.utils.js +79 -73
  259. package/dist/workspace/utils/placement/planner.utils.js.map +1 -1
  260. package/dist/workspace/utils/placement/preparation.utils.d.ts +5 -2
  261. package/dist/workspace/utils/placement/preparation.utils.js +45 -41
  262. package/dist/workspace/utils/placement/preparation.utils.js.map +1 -1
  263. package/dist/workspace/utils/placement/region.utils.js +32 -32
  264. package/dist/workspace/utils/placement/region.utils.js.map +1 -1
  265. package/dist/workspace/utils/placement/scope.utils.d.ts +34 -0
  266. package/dist/workspace/utils/placement/scope.utils.js +155 -0
  267. package/dist/workspace/utils/placement/scope.utils.js.map +1 -0
  268. package/dist/workspace/utils/placement/session.utils.d.ts +11 -0
  269. package/dist/workspace/utils/placement/session.utils.js +78 -0
  270. package/dist/workspace/utils/placement/session.utils.js.map +1 -0
  271. package/dist/workspace/utils/placement/split-sizing.utils.d.ts +2 -2
  272. package/dist/workspace/utils/placement/split-sizing.utils.js +19 -19
  273. package/dist/workspace/utils/placement/split-sizing.utils.js.map +1 -1
  274. package/dist/workspace/utils/presentation/composition.utils.d.ts +1 -1
  275. package/dist/workspace/utils/presentation/composition.utils.js +4 -2
  276. package/dist/workspace/utils/presentation/composition.utils.js.map +1 -1
  277. package/dist/workspace/utils/presentation/groups.utils.d.ts +3 -3
  278. package/dist/workspace/utils/presentation/groups.utils.js +40 -30
  279. package/dist/workspace/utils/presentation/groups.utils.js.map +1 -1
  280. package/dist/workspace/utils/presentation/measurements.utils.d.ts +1 -0
  281. package/dist/workspace/utils/presentation/measurements.utils.js +6 -14
  282. package/dist/workspace/utils/presentation/measurements.utils.js.map +1 -1
  283. package/dist/workspace/utils/presentation/offers.utils.d.ts +1 -1
  284. package/dist/workspace/utils/presentation/offers.utils.js +3 -3
  285. package/dist/workspace/utils/presentation/offers.utils.js.map +1 -1
  286. package/dist/workspace/utils/presentation/preview.utils.d.ts +6 -0
  287. package/dist/workspace/utils/presentation/preview.utils.js +14 -3
  288. package/dist/workspace/utils/presentation/preview.utils.js.map +1 -1
  289. package/dist/workspace/workspace.examples.js.map +1 -1
  290. package/dist/workspace/workspace.examples.json +4 -4
  291. package/dist/workspace/workspace.js +1 -1
  292. package/dist/workspace/workspace.js.map +1 -1
  293. package/dist/workspace/workspace2.js +206 -212
  294. package/dist/workspace/workspace2.js.map +1 -1
  295. package/package.json +16 -4
  296. package/dist/workspace/utils/placement/context.utils.d.ts +0 -36
  297. package/dist/workspace/utils/placement/context.utils.js +0 -135
  298. package/dist/workspace/utils/placement/context.utils.js.map +0 -1
@@ -0,0 +1,110 @@
1
+ import e from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
2
+ import { DragHandle as t } from "../../drag-handle/drag-handle2.js";
3
+ import { IconButton as n } from "../../icon-button/icon-button2.js";
4
+ import r from "./panel.js";
5
+ import { attachInternals as i } from "@nvidia-elements/foundations/internal/a11y";
6
+ import { LitElement as a, html as o, isServer as s } from "lit";
7
+ import { property as c } from "lit/decorators/property.js";
8
+ import { scopedRegistry as l } from "@nvidia-elements/foundations/internal/decorators";
9
+ import { useStyles as u } from "@nvidia-elements/foundations/internal/styles";
10
+ import { state as d } from "lit/decorators/state.js";
11
+ // src/dashboard/panel/panel.ts
12
+ var f = class extends a {
13
+ constructor(...e) {
14
+ super(...e), this.minColumnSpan = 1, this.minRowSpan = 1, this.maxColumnSpan = 1e6, this.maxRowSpan = 1e6, this.moveDisabled = !1, this.resizeDisabled = !1, this.#e = (e) => {
15
+ e.currentTarget instanceof HTMLElement && e.currentTarget.removeAttribute("data-pointer-focus");
16
+ };
17
+ }
18
+ static {
19
+ this.styles = u([r]);
20
+ }
21
+ static {
22
+ this.metadata = {
23
+ tag: "nve-dashboard-panel",
24
+ version: "2.24.0",
25
+ parents: ["nve-dashboard"],
26
+ children: [
27
+ "nve-dashboard-panel-header",
28
+ "nve-dashboard-panel-content",
29
+ "nve-dashboard-panel-footer"
30
+ ]
31
+ };
32
+ }
33
+ static {
34
+ this.elementDefinitions = {
35
+ [t.metadata.tag]: t,
36
+ [n.metadata.tag]: n
37
+ };
38
+ }
39
+ connectedCallback() {
40
+ super.connectedCallback(), i(this), this._internals.role = "region";
41
+ }
42
+ disconnectedCallback() {
43
+ for (let e of this.shadowRoot?.querySelectorAll(".grip > [data-pointer-focus]") ?? []) e.removeAttribute("data-pointer-focus");
44
+ this._internals.states.delete("placed"), this._internals.states.delete("fullscreen"), this._internals.states.delete("fullscreen-excluded"), super.disconnectedCallback();
45
+ }
46
+ #e;
47
+ _getSpanConstraints() {
48
+ return {
49
+ id: this.id,
50
+ minColumnSpan: this.minColumnSpan,
51
+ minRowSpan: this.minRowSpan,
52
+ maxColumnSpan: this.maxColumnSpan,
53
+ maxRowSpan: this.maxRowSpan
54
+ };
55
+ }
56
+ _configure(e) {
57
+ let t = this.presentation;
58
+ this.#n(e.fullscreen), this.#t(e.placed), e.carried ? this._internals.states.add("carried") : this._internals.states.delete("carried"), e.lifted ? this._internals.states.add("lifted") : this._internals.states.delete("lifted"), this._internals.ariaLabel = this._getLabel(), t && t.placed === e.placed && t.movable === e.movable && t.resizable === e.resizable && t.mode === e.mode && t.fullscreenControl === e.fullscreenControl && t.labels === e.labels || (this.presentation = e);
59
+ }
60
+ #t(e) {
61
+ e ? this._internals.states.add("placed") : this._internals.states.delete("placed");
62
+ }
63
+ #n(e) {
64
+ e === "selected" ? this._internals.states.add("fullscreen") : this._internals.states.delete("fullscreen"), e === "excluded" ? this._internals.states.add("fullscreen-excluded") : this._internals.states.delete("fullscreen-excluded");
65
+ }
66
+ #r() {
67
+ let e = this.presentation?.fullscreenControl;
68
+ if (!e) return null;
69
+ let t = e === "exit";
70
+ return o`<div class="fullscreen-action"><nve-icon-button part="fullscreen-button" icon-name="${t ? "minimize" : "maximize"}" container="flat" size="sm" command="--toggle-fullscreen" .commandForElement="${this}" .disabled="${e === "unavailable"}" aria-label="${this.presentation?.labels[t ? "exitFullscreen" : "enterFullscreen"]}"></nve-icon-button></div>`;
71
+ }
72
+ _getLabel() {
73
+ return [...this.querySelector(":scope > nve-dashboard-panel-header")?.childNodes ?? []].filter((e) => !(e instanceof Element) || !e.getAttribute("slot")).map((e) => e.textContent ?? "").join("").trim() || this.id;
74
+ }
75
+ #i(e) {
76
+ return e ? o`<div class="resize-edge left" data-dashboard-action="resize" data-dashboard-edge="left" aria-hidden="true"></div><div class="resize-edge right" data-dashboard-action="resize" data-dashboard-edge="right" aria-hidden="true"></div><div class="resize-edge top" data-dashboard-action="resize" data-dashboard-edge="top" aria-hidden="true"></div><div class="resize-edge bottom" data-dashboard-action="resize" data-dashboard-edge="bottom" aria-hidden="true"></div>` : null;
77
+ }
78
+ render() {
79
+ let e = this.presentation, t = !!e?.movable, n = !!e?.resizable, r = !s && [...this.children].some((e) => e.slot === "footer"), i = !n && !r, a = e?.labels ?? {}, c = e?.placed !== !1;
80
+ return o`<div internal-host ?hidden="${!c}" ?inert="${!c}"><div class="header"><div class="grip move-grip" ?inert="${!t}"><nve-drag-handle data-dashboard-action="move" @focusout="${this.#e}" part="drag-handle" draggable="false" nofocus .pressed="${e?.mode === "move"}" aria-label="${a.move}"></nve-drag-handle></div><span class="control-divider move-divider" aria-hidden="true" ?inert="${!t}"></span><slot name="header"></slot>${this.#r()}</div><div class="body" tabindex="0"><slot></slot></div><div class="footer" ?inert="${i}"><slot name="footer" @slotchange="${() => this.requestUpdate()}"></slot><span class="control-divider resize-divider" aria-hidden="true" ?inert="${!n}"></span><div class="grip resize-grip" ?inert="${!n}"><nve-icon-button type="button" data-dashboard-action="resize" @focusout="${this.#e}" class="resize" part="resize-button" icon-name="arrow-both" container="flat" size="sm" nofocus .pressed="${e?.mode === "resize"}" aria-label="${a.resize}"></nve-icon-button></div></div></div>${this.#i(n)}`;
81
+ }
82
+ };
83
+ e([c({
84
+ type: Number,
85
+ attribute: "min-column-span",
86
+ reflect: !0
87
+ })], f.prototype, "minColumnSpan", void 0), e([c({
88
+ type: Number,
89
+ attribute: "min-row-span",
90
+ reflect: !0
91
+ })], f.prototype, "minRowSpan", void 0), e([c({
92
+ type: Number,
93
+ attribute: "max-column-span",
94
+ reflect: !0
95
+ })], f.prototype, "maxColumnSpan", void 0), e([c({
96
+ type: Number,
97
+ attribute: "max-row-span",
98
+ reflect: !0
99
+ })], f.prototype, "maxRowSpan", void 0), e([c({
100
+ type: Boolean,
101
+ attribute: "move-disabled",
102
+ reflect: !0
103
+ })], f.prototype, "moveDisabled", void 0), e([c({
104
+ type: Boolean,
105
+ attribute: "resize-disabled",
106
+ reflect: !0
107
+ })], f.prototype, "resizeDisabled", void 0), e([d()], f.prototype, "presentation", void 0), f = e([l()], f);
108
+ export { f as DashboardPanel };
109
+
110
+ //# sourceMappingURL=panel2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"panel2.js","names":["styles","_decorate","__decorate","panel_default","DashboardPanel","LitElement","_args","#controlFocusOut","event","useStyles","DragHandle","IconButton","attachInternals","control","previous","#configureFullscreen","presentation","#configurePlacement","placed","fullscreen","selected","node","resizable","movable","hasFooter","isServer","child","footerCollapsed","labels","#renderFullscreenControl","#renderResizeEdges","property","state","scopedRegistry"],"sources":["../../../src/dashboard/panel/panel.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, isServer, LitElement } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { state } from 'lit/decorators/state.js';\n\nimport { attachInternals } from '@nvidia-elements/foundations/internal/a11y';\nimport { scopedRegistry } from '@nvidia-elements/foundations/internal/decorators';\nimport { useStyles } from '@nvidia-elements/foundations/internal/styles';\n\nimport { DragHandle } from '@nvidia-elements/core/drag-handle';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\n\nimport type { DashboardSpanConstraints } from '../dashboard.types.js';\n\nimport styles from './panel.css?inline';\n\ninterface DashboardPanelPresentation {\n readonly placed: boolean;\n readonly movable: boolean;\n readonly resizable: boolean;\n readonly mode?: 'move' | 'resize';\n readonly carried?: boolean;\n readonly lifted?: boolean;\n readonly fullscreen?: 'selected' | 'excluded';\n readonly fullscreenControl?: 'enter' | 'exit' | 'unavailable';\n readonly labels: Readonly<Record<string, string>>;\n}\n\n/**\n * @element nve-dashboard-panel\n * @description A stable application surface identified by a durable panel ID.\n * @documentation https://nvidia.github.io/elements/docs/elements/dashboard/\n * @since 0.0.0\n * @stable false\n * @entrypoint \\@nvidia-elements/core/dashboard\n * @command --enter-fullscreen - Present this panel in native fullscreen.\n * @command --exit-fullscreen - Exit native fullscreen.\n * @command --toggle-fullscreen - Toggle native fullscreen for this panel.\n * @command --place - Apply the invoking control's integer grid placement without pointer target snapping. Anchored span changes require resizing; other position changes require movement.\n * @command --move-left - Move left through the same contact-aware movement step as a movement-handle arrow key. The containing dashboard applies its capabilities and layout policy.\n * @command --move-right - Move right through the same contact-aware movement step as a movement-handle arrow key. The containing dashboard applies its capabilities and layout policy.\n * @command --move-up - Move up through the same contact-aware movement step as a movement-handle arrow key. The containing dashboard applies its capabilities and layout policy.\n * @command --move-down - Move down through the same contact-aware movement step as a movement-handle arrow key. The containing dashboard applies its capabilities and layout policy.\n * @command --move-to-start - Place at the growth-axis start, using available space before making room. Keep the bounded-axis coordinate unless placement supplies another. Uses the same operation as Home on the movement grip.\n * @command --increase-width - Increase width by one cell, subject to panel constraints and the containing dashboard capabilities.\n * @command --decrease-width - Decrease width by one cell, subject to panel constraints and the containing dashboard capabilities.\n * @command --increase-height - Increase height by one cell, subject to panel constraints and the containing dashboard capabilities.\n * @command --decrease-height - Decrease height by one cell, subject to panel constraints and the containing dashboard capabilities.\n * @slot - Application content in the scrolling body. Content, data, and native hidden state remain application owned.\n * @slot header - Required panel header with a title and optional application controls.\n * @slot footer - Optional status and actions outside the body.\n * @cssprop --background\n * @cssprop --border\n * @cssprop --border-radius\n * @cssprop --control-width - Width shared by the move and resize controls. Defaults to 36px.\n * @cssprop --control-height - Height shared by the move and resize controls. Defaults to 48px.\n * @cssprop --resize-target-size - Extra pointer resize reach on each side of the panel edge. Defaults to 3px; outward reach stops halfway across the cell gap. Configure on the panel. Inward reach covers application content at the edge, including on hybrid touch devices.\n * @cssprop --box-shadow\n * @csspart drag-handle - Movement control.\n * @csspart resize-button - Resize control.\n * @csspart fullscreen-button - Panel fullscreen control.\n */\n@scopedRegistry()\nexport class DashboardPanel extends LitElement {\n static styles = useStyles([styles]);\n static readonly metadata = {\n tag: 'nve-dashboard-panel',\n version: '0.0.0',\n parents: ['nve-dashboard'],\n children: ['nve-dashboard-panel-header', 'nve-dashboard-panel-content', 'nve-dashboard-panel-footer']\n };\n static elementDefinitions = { [DragHandle.metadata.tag]: DragHandle, [IconButton.metadata.tag]: IconButton };\n\n /** Smallest width in columns. */\n @property({ type: Number, attribute: 'min-column-span', reflect: true }) minColumnSpan = 1;\n\n /** Smallest height in rows. */\n @property({ type: Number, attribute: 'min-row-span', reflect: true }) minRowSpan = 1;\n\n /** Largest width in columns. */\n @property({ type: Number, attribute: 'max-column-span', reflect: true }) maxColumnSpan = 1_000_000;\n\n /** Largest height in rows. */\n @property({ type: Number, attribute: 'max-row-span', reflect: true }) maxRowSpan = 1_000_000;\n\n /** Disables direct movement. Collision displacement remains available. */\n @property({ type: Boolean, attribute: 'move-disabled', reflect: true }) moveDisabled = false;\n\n /** Disables direct resizing. */\n @property({ type: Boolean, attribute: 'resize-disabled', reflect: true }) resizeDisabled = false;\n\n @state() private presentation?: DashboardPanelPresentation;\n\n /** @internal */\n declare _internals: ElementInternals;\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'region';\n }\n\n disconnectedCallback() {\n for (const control of this.shadowRoot?.querySelectorAll('.grip > [data-pointer-focus]') ?? []) {\n control.removeAttribute('data-pointer-focus');\n }\n\n this._internals.states.delete('placed');\n this._internals.states.delete('fullscreen');\n this._internals.states.delete('fullscreen-excluded');\n super.disconnectedCallback();\n }\n\n #controlFocusOut = (event: FocusEvent) => {\n if (event.currentTarget instanceof HTMLElement) {\n event.currentTarget.removeAttribute('data-pointer-focus');\n }\n };\n\n /** @internal */\n _getSpanConstraints(): DashboardSpanConstraints {\n return {\n id: this.id,\n minColumnSpan: this.minColumnSpan,\n minRowSpan: this.minRowSpan,\n maxColumnSpan: this.maxColumnSpan,\n maxRowSpan: this.maxRowSpan\n };\n }\n\n /** @internal */\n _configure(presentation: DashboardPanelPresentation) {\n const previous = this.presentation;\n\n this.#configureFullscreen(presentation.fullscreen);\n this.#configurePlacement(presentation.placed);\n\n if (presentation.carried) {\n this._internals.states.add('carried');\n } else {\n this._internals.states.delete('carried');\n }\n\n if (presentation.lifted) {\n this._internals.states.add('lifted');\n } else {\n this._internals.states.delete('lifted');\n }\n\n this._internals.ariaLabel = this._getLabel();\n\n if (\n !previous ||\n previous.placed !== presentation.placed ||\n previous.movable !== presentation.movable ||\n previous.resizable !== presentation.resizable ||\n previous.mode !== presentation.mode ||\n previous.fullscreenControl !== presentation.fullscreenControl ||\n previous.labels !== presentation.labels\n ) {\n this.presentation = presentation;\n }\n }\n\n #configurePlacement(placed: boolean) {\n if (placed) {\n this._internals.states.add('placed');\n } else {\n this._internals.states.delete('placed');\n }\n }\n\n #configureFullscreen(fullscreen: DashboardPanelPresentation['fullscreen']) {\n if (fullscreen === 'selected') {\n this._internals.states.add('fullscreen');\n } else {\n this._internals.states.delete('fullscreen');\n }\n\n if (fullscreen === 'excluded') {\n this._internals.states.add('fullscreen-excluded');\n } else {\n this._internals.states.delete('fullscreen-excluded');\n }\n }\n\n #renderFullscreenControl() {\n const control = this.presentation?.fullscreenControl;\n if (!control) return null;\n\n const selected = control === 'exit';\n\n return html`<div class=\"fullscreen-action\"><nve-icon-button\n part=\"fullscreen-button\" icon-name=${selected ? 'minimize' : 'maximize'}\n container=\"flat\" size=\"sm\" command=\"--toggle-fullscreen\"\n .commandForElement=${this} .disabled=${control === 'unavailable'}\n aria-label=${this.presentation?.labels[selected ? 'exitFullscreen' : 'enterFullscreen']}\n ></nve-icon-button></div>`;\n }\n\n /** @internal */\n _getLabel(): string {\n const header = this.querySelector(':scope > nve-dashboard-panel-header');\n return (\n [...(header?.childNodes ?? [])]\n .filter(node => !(node instanceof Element) || !node.getAttribute('slot'))\n .map(node => node.textContent ?? '')\n .join('')\n .trim() || this.id\n );\n }\n\n #renderResizeEdges(resizable: boolean) {\n return resizable\n ? html`\n <div class=\"resize-edge left\" data-dashboard-action=\"resize\" data-dashboard-edge=\"left\" aria-hidden=\"true\"></div>\n <div class=\"resize-edge right\" data-dashboard-action=\"resize\" data-dashboard-edge=\"right\" aria-hidden=\"true\"></div>\n <div class=\"resize-edge top\" data-dashboard-action=\"resize\" data-dashboard-edge=\"top\" aria-hidden=\"true\"></div>\n <div class=\"resize-edge bottom\" data-dashboard-action=\"resize\" data-dashboard-edge=\"bottom\" aria-hidden=\"true\"></div>\n `\n : null;\n }\n\n render() {\n const presentation = this.presentation;\n const movable = !!presentation?.movable;\n const resizable = !!presentation?.resizable;\n const hasFooter = !isServer && [...this.children].some(child => child.slot === 'footer');\n const footerCollapsed = !resizable && !hasFooter;\n const labels = presentation?.labels ?? {};\n const placed = presentation?.placed !== false;\n\n return html`\n <div internal-host ?hidden=${!placed} ?inert=${!placed}>\n <div class=\"header\">\n <div class=\"grip move-grip\" ?inert=${!movable}>\n <nve-drag-handle data-dashboard-action=\"move\" @focusout=${this.#controlFocusOut} part=\"drag-handle\" draggable=\"false\" nofocus .pressed=${presentation?.mode === 'move'} aria-label=${labels.move}></nve-drag-handle>\n </div>\n <span class=\"control-divider move-divider\" aria-hidden=\"true\" ?inert=${!movable}></span>\n <slot name=\"header\"></slot>\n ${this.#renderFullscreenControl()}\n </div>\n <div class=\"body\" tabindex=\"0\"><slot></slot></div>\n <div class=\"footer\" ?inert=${footerCollapsed}>\n <slot name=\"footer\" @slotchange=${() => this.requestUpdate()}></slot>\n <span class=\"control-divider resize-divider\" aria-hidden=\"true\" ?inert=${!resizable}></span>\n <div class=\"grip resize-grip\" ?inert=${!resizable}>\n <nve-icon-button type=\"button\" data-dashboard-action=\"resize\" @focusout=${this.#controlFocusOut} class=\"resize\" part=\"resize-button\" icon-name=\"arrow-both\" container=\"flat\" size=\"sm\" nofocus .pressed=${presentation?.mode === 'resize'} aria-label=${labels.resize}></nve-icon-button>\n </div>\n </div>\n </div>\n ${this.#renderResizeEdges(resizable)}\n `;\n }\n}\n"],"mappings":";;;;;;;;;;;AAiEO,IAAMI,IAAN,cAA6BC,EAAW;;EAkDzB,A,aAvCqE,KAAA,gBAAA,GAGN,KAAA,aAAA,GAGM,KAAA,gBAAA,KAGN,KAAA,aAAA,KAGI,KAAA,eAAA,IAGI,KAAA,iBAAA,IAwBvE,KAAAE,MAAA,MAAsB;GACxC,AAAIC,EAAM,yBAAyB,eACjCA,EAAM,cAAc,gBAAgB,oBAAoB;EAE5D;;;EArDgB,KAAA,SAAAC,EAAU,CAACT,CAAM,CAAC;;;EACP,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;GACT,SAAS,CAAC,eAAe;GACzB,UAAU;IAAC;IAA8B;IAA+B;GAA4B;EACtG;;;EAC4B,KAAA,qBAAA;IAAGU,EAAW,SAAS,MAAMA;IAAaC,EAAW,SAAS,MAAMA;EAAW;;CAyB3G,oBAAoB;EAGlB,AAFA,MAAM,kBAAkB,GACxBC,EAAgB,IAAI,GACpB,KAAK,WAAW,OAAO;CACzB;CAEA,uBAAuB;EACrB,KAAK,IAAMC,KAAW,KAAK,YAAY,iBAAiB,8BAA8B,KAAK,CAAC,GAC1F,EAAQ,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AAK,CAAC,CAAA,GAAA3B,EAAA,WAAA,iBAAA,KAAA,CAAA,GAGtEH,EAAA,CAAA8B,EAAS;CAAE,MAAM;CAAQ,WAAW;CAAgB,SAAS;AAAK,CAAC,CAAA,GAAA3B,EAAA,WAAA,cAAA,KAAA,CAAA,GAGnEH,EAAA,CAAA8B,EAAS;CAAE,MAAM;CAAQ,WAAW;CAAmB,SAAS;AAAK,CAAC,CAAA,GAAA3B,EAAA,WAAA,iBAAA,KAAA,CAAA,GAGtEH,EAAA,CAAA8B,EAAS;CAAE,MAAM;CAAQ,WAAW;CAAgB,SAAS;AAAK,CAAC,CAAA,GAAA3B,EAAA,WAAA,cAAA,KAAA,CAAA,GAGnEH,EAAA,CAAA8B,EAAS;CAAE,MAAM;CAAS,WAAW;CAAiB,SAAS;AAAK,CAAC,CAAA,GAAA3B,EAAA,WAAA,gBAAA,KAAA,CAAA,GAGrEH,EAAA,CAAA8B,EAAS;CAAE,MAAM;CAAS,WAAW;CAAmB,SAAS;AAAK,CAAC,CAAA,GAAA3B,EAAA,WAAA,kBAAA,KAAA,CAAA,GAEvEH,EAAA,CAAA+B,EAAM,CAAA,GAAA5B,EAAA,WAAA,gBAAA,KAAA,CAAA,GA7BR,IAAAH,EAAA,CAAAgC,EAAe,CAAA,GAAA7B,CAAA"}
@@ -0,0 +1,20 @@
1
+ import { LitElement } from 'lit';
2
+ /**
3
+ * @element nve-dashboard-panel-content
4
+ * @description Provides padding for dashboard panel content.
5
+ * @documentation https://nvidia.github.io/elements/docs/elements/dashboard/
6
+ * @since 0.0.0
7
+ * @stable false
8
+ * @entrypoint \@nvidia-elements/core/dashboard
9
+ * @slot - Application content.
10
+ * @cssprop --padding
11
+ */
12
+ export declare class DashboardPanelContent extends LitElement {
13
+ static styles: import("lit").CSSResult[];
14
+ static readonly metadata: {
15
+ tag: string;
16
+ version: string;
17
+ parents: string[];
18
+ };
19
+ render(): import("lit-html").TemplateResult<1>;
20
+ }
@@ -0,0 +1,5 @@
1
+ // src/dashboard/panel-content/panel-content.css?inline
2
+ var e = ":host{--padding: var(--nve-ref-space-sm);display:block;contain:none}[internal-host]{padding:var(--padding)}";
3
+ export { e as default };
4
+
5
+ //# sourceMappingURL=panel-content.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"panel-content.js","names":["panel_content_default"],"sources":["../../../src/dashboard/panel-content/panel-content.css?inline"],"sourcesContent":["/* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. */\n/* SPDX-License-Identifier: Apache-2.0 */\n:host {\n --padding: var(--nve-ref-space-sm);\n display: block;\n contain: none;\n}\n\n[internal-host] {\n padding: var(--padding);\n}\n"],"mappings":""}
@@ -0,0 +1,22 @@
1
+ import e from "./panel-content.js";
2
+ import { LitElement as t, html as n } from "lit";
3
+ import { useStyles as r } from "@nvidia-elements/foundations/internal/styles";
4
+ // src/dashboard/panel-content/panel-content.ts
5
+ var i = class extends t {
6
+ static {
7
+ this.styles = r([e]);
8
+ }
9
+ static {
10
+ this.metadata = {
11
+ tag: "nve-dashboard-panel-content",
12
+ version: "2.24.0",
13
+ parents: ["nve-dashboard-panel"]
14
+ };
15
+ }
16
+ render() {
17
+ return n`<div internal-host><slot></slot></div>`;
18
+ }
19
+ };
20
+ export { i as DashboardPanelContent };
21
+
22
+ //# sourceMappingURL=panel-content2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"panel-content2.js","names":["styles","panel_content_default","DashboardPanelContent","LitElement","useStyles"],"sources":["../../../src/dashboard/panel-content/panel-content.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement } from 'lit';\n\nimport { useStyles } from '@nvidia-elements/foundations/internal/styles';\n\nimport styles from './panel-content.css?inline';\n\n/**\n * @element nve-dashboard-panel-content\n * @description Provides padding for dashboard panel content.\n * @documentation https://nvidia.github.io/elements/docs/elements/dashboard/\n * @since 0.0.0\n * @stable false\n * @entrypoint \\@nvidia-elements/core/dashboard\n * @slot - Application content.\n * @cssprop --padding\n */\nexport class DashboardPanelContent extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = { tag: 'nve-dashboard-panel-content', version: '0.0.0', parents: ['nve-dashboard-panel'] };\n\n render() {\n return html`\n <div internal-host><slot></slot></div>\n `;\n }\n}\n"],"mappings":";;;;AAmBA,IAAaE,IAAb,cAA2CC,EAAW;;EACpC,KAAA,SAAAC,EAAU,CAACJ,CAAM,CAAC;;;EAEP,KAAA,WAAA;GAAE,KAAK;GAA+B,SAAS;GAAS,SAAS,CAAC,qBAAqB;EAAE;;CAEpH,SAAS;EACP,OAAO,CAAI;CAGb;AACF"}
@@ -0,0 +1,25 @@
1
+ import { LitElement } from 'lit';
2
+ /**
3
+ * @element nve-dashboard-panel-footer
4
+ * @description Provides dashboard panel status and actions outside the scrolling body.
5
+ * @documentation https://nvidia.github.io/elements/docs/elements/dashboard/
6
+ * @since 0.0.0
7
+ * @stable false
8
+ * @entrypoint \@nvidia-elements/core/dashboard
9
+ * @slot - Status and supporting content in a bounded scrolling area.
10
+ * @slot suffix - Application actions in a bounded scrolling area before the reserved resize control.
11
+ * @cssprop --padding
12
+ * @cssprop --suffix-padding - Padding around application actions. Defaults to 4px.
13
+ * @cssprop --gap
14
+ */
15
+ export declare class DashboardPanelFooter extends LitElement {
16
+ static styles: import("lit").CSSResult[];
17
+ static readonly metadata: {
18
+ tag: string;
19
+ version: string;
20
+ parents: string[];
21
+ };
22
+ /** @private */
23
+ slot: string;
24
+ render(): import("lit-html").TemplateResult<1>;
25
+ }
@@ -0,0 +1,5 @@
1
+ // src/dashboard/panel-footer/panel-footer.css?inline
2
+ var e = ":host{--padding: var(--nve-ref-space-sm);--suffix-padding: var(--nve-ref-size-100);--gap: var(--nve-ref-space-xs);display:block;contain:none}[internal-host]{display:flex;align-items:stretch;height:100%}.content{align-self:center;padding:var(--padding);box-sizing:border-box;flex:1;min-width:0;overflow:auto}slot[name=suffix]{display:flex;align-items:center;flex:0 1 auto;min-width:0;overflow-x:auto;gap:var(--gap)}slot[name=suffix]::slotted(*){flex:none}.suffix{display:flex;align-items:center;flex:0 1 auto;min-width:0;padding:var(--suffix-padding);box-sizing:border-box;border-inline-start:var(--nve-ref-border-width-sm) solid var(--nve-ref-border-color-muted)}.suffix[data-empty]{display:none}";
3
+ export { e as default };
4
+
5
+ //# sourceMappingURL=panel-footer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"panel-footer.js","names":["panel_footer_default"],"sources":["../../../src/dashboard/panel-footer/panel-footer.css?inline"],"sourcesContent":["/* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. */\n/* SPDX-License-Identifier: Apache-2.0 */\n:host {\n --padding: var(--nve-ref-space-sm);\n --suffix-padding: var(--nve-ref-size-100);\n --gap: var(--nve-ref-space-xs);\n display: block;\n contain: none;\n}\n\n[internal-host] {\n display: flex;\n align-items: stretch;\n height: 100%;\n}\n\n.content {\n align-self: center;\n padding: var(--padding);\n box-sizing: border-box;\n flex: 1;\n min-width: 0;\n overflow: auto;\n}\n\nslot[name='suffix'] {\n display: flex;\n align-items: center;\n flex: 0 1 auto;\n min-width: 0;\n overflow-x: auto;\n gap: var(--gap);\n}\n\nslot[name='suffix']::slotted(*) {\n flex: none;\n}\n\n.suffix {\n display: flex;\n align-items: center;\n flex: 0 1 auto;\n min-width: 0;\n padding: var(--suffix-padding);\n box-sizing: border-box;\n border-inline-start: var(--nve-ref-border-width-sm) solid var(--nve-ref-border-color-muted);\n}\n\n.suffix[data-empty] {\n display: none;\n}\n"],"mappings":""}
@@ -0,0 +1,28 @@
1
+ import { hostAttr as e } from "../../internal/decorators/host-attr.js";
2
+ import t from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
3
+ import n from "./panel-footer.js";
4
+ import { LitElement as r, html as i, isServer as a } from "lit";
5
+ import { useStyles as o } from "@nvidia-elements/foundations/internal/styles";
6
+ // src/dashboard/panel-footer/panel-footer.ts
7
+ var s = class extends r {
8
+ constructor(...e) {
9
+ super(...e), this.slot = "footer";
10
+ }
11
+ static {
12
+ this.styles = o([n]);
13
+ }
14
+ static {
15
+ this.metadata = {
16
+ tag: "nve-dashboard-panel-footer",
17
+ version: "2.24.0",
18
+ parents: ["nve-dashboard-panel"]
19
+ };
20
+ }
21
+ render() {
22
+ return i`<div internal-host><div class="content"><slot></slot></div><div class="suffix" ?data-empty="${!a && !this.querySelector(":scope > [slot=\"suffix\"]")}"><slot name="suffix" @slotchange="${() => this.requestUpdate()}"></slot></div></div>`;
23
+ }
24
+ };
25
+ t([e()], s.prototype, "slot", void 0);
26
+ export { s as DashboardPanelFooter };
27
+
28
+ //# sourceMappingURL=panel-footer2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"panel-footer2.js","names":["styles","_decorate","__decorate","panel_footer_default","DashboardPanelFooter","LitElement","_args","useStyles","isServer","hostAttr"],"sources":["../../../src/dashboard/panel-footer/panel-footer.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, isServer, LitElement } from 'lit';\n\nimport { hostAttr } from '@nvidia-elements/core/internal';\nimport { useStyles } from '@nvidia-elements/foundations/internal/styles';\n\nimport styles from './panel-footer.css?inline';\n\n/**\n * @element nve-dashboard-panel-footer\n * @description Provides dashboard panel status and actions outside the scrolling body.\n * @documentation https://nvidia.github.io/elements/docs/elements/dashboard/\n * @since 0.0.0\n * @stable false\n * @entrypoint \\@nvidia-elements/core/dashboard\n * @slot - Status and supporting content in a bounded scrolling area.\n * @slot suffix - Application actions in a bounded scrolling area before the reserved resize control.\n * @cssprop --padding\n * @cssprop --suffix-padding - Padding around application actions. Defaults to 4px.\n * @cssprop --gap\n */\nexport class DashboardPanelFooter extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = { tag: 'nve-dashboard-panel-footer', version: '0.0.0', parents: ['nve-dashboard-panel'] };\n\n /** @private */\n @hostAttr() slot = 'footer';\n\n render() {\n return html`\n <div internal-host><div class=\"content\"><slot></slot></div><div class=\"suffix\" ?data-empty=${!isServer && !this.querySelector(':scope > [slot=\"suffix\"]')}><slot name=\"suffix\" @slotchange=${() => this.requestUpdate()}></slot></div></div>\n `;\n }\n}\n"],"mappings":";;;;;;AAuBA,IAAaI,IAAb,cAA0CC,EAAW;;EAMhC,A,aAAA,KAAA,OAAA;;;EALH,KAAA,SAAAE,EAAU,CAACP,CAAM,CAAC;;;EAEP,KAAA,WAAA;GAAE,KAAK;GAA8B,SAAS;GAAS,SAAS,CAAC,qBAAqB;EAAE;;CAKnH,SAAS;EACP,OAAO,CAAI,+FACoF,CAACQ,KAAY,CAAC,KAAK,cAAc,4BAA0B,EAAE,2CAAyC,KAAK,cAAc,EAAE;CAE5N;AACF;AAPGP,EAAA,CAAAQ,EAAS,CAAA,GAAAL,EAAA,WAAA,QAAA,KAAA,CAAA"}
@@ -0,0 +1,27 @@
1
+ import { LitElement } from 'lit';
2
+ /**
3
+ * @element nve-dashboard-panel-header
4
+ * @description Supplies the required dashboard panel title and application controls.
5
+ * @documentation https://nvidia.github.io/elements/docs/elements/dashboard/
6
+ * @since 0.0.0
7
+ * @stable false
8
+ * @entrypoint \@nvidia-elements/core/dashboard
9
+ * @slot - Noninteractive title used as the default accessible panel name. Heading semantics remain application owned.
10
+ * @slot prefix - Title decoration.
11
+ * @slot suffix - Application controls.
12
+ * @cssprop --padding
13
+ * @cssprop --suffix-padding - Padding around application actions. Defaults to 4px.
14
+ * @cssprop --gap
15
+ * @cssprop --min-height
16
+ */
17
+ export declare class DashboardPanelHeader extends LitElement {
18
+ static styles: import("lit").CSSResult[];
19
+ static readonly metadata: {
20
+ tag: string;
21
+ version: string;
22
+ parents: string[];
23
+ };
24
+ /** @private */
25
+ slot: string;
26
+ render(): import("lit-html").TemplateResult<1>;
27
+ }
@@ -0,0 +1,5 @@
1
+ // src/dashboard/panel-header/panel-header.css?inline
2
+ var e = ":host{--padding: var(--nve-ref-size-300) var(--nve-ref-size-400);--suffix-padding: var(--nve-ref-size-100);--gap: var(--nve-ref-space-xs);--min-height: calc(var(--nve-ref-size-1000) + var(--nve-ref-size-200));display:block;min-width:0;contain:none}[internal-host]{display:flex;align-items:stretch;box-sizing:border-box;height:100%;min-height:var(--min-height)}.title-group{display:flex;align-items:center;flex:1;min-width:0;gap:var(--gap);padding:var(--padding);box-sizing:border-box}slot[name=prefix]{display:flex;align-items:center;flex:none;gap:var(--gap)}.suffix[data-empty],slot[data-empty]{display:none}.suffix{display:flex;align-items:center;flex:0 1 auto;min-width:0;padding:var(--suffix-padding);box-sizing:border-box;border-inline-start:var(--nve-ref-border-width-sm) solid var(--nve-ref-border-color-muted)}.title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}slot[name=suffix]{display:flex;flex:0 1 auto;min-width:0;overflow-x:auto;align-items:center;gap:var(--gap)}slot[name=suffix]::slotted(*){flex:none}";
3
+ export { e as default };
4
+
5
+ //# sourceMappingURL=panel-header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"panel-header.js","names":["panel_header_default"],"sources":["../../../src/dashboard/panel-header/panel-header.css?inline"],"sourcesContent":["/* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. */\n/* SPDX-License-Identifier: Apache-2.0 */\n:host {\n --padding: var(--nve-ref-size-300) var(--nve-ref-size-400);\n --suffix-padding: var(--nve-ref-size-100);\n --gap: var(--nve-ref-space-xs);\n --min-height: calc(var(--nve-ref-size-1000) + var(--nve-ref-size-200));\n display: block;\n min-width: 0;\n contain: none;\n}\n\n[internal-host] {\n display: flex;\n align-items: stretch;\n box-sizing: border-box;\n height: 100%;\n min-height: var(--min-height);\n}\n\n.title-group {\n display: flex;\n align-items: center;\n flex: 1;\n min-width: 0;\n gap: var(--gap);\n padding: var(--padding);\n box-sizing: border-box;\n}\n\nslot[name='prefix'] {\n display: flex;\n align-items: center;\n flex: none;\n gap: var(--gap);\n}\n\n.suffix[data-empty],\nslot[data-empty] {\n display: none;\n}\n\n.suffix {\n display: flex;\n align-items: center;\n flex: 0 1 auto;\n min-width: 0;\n padding: var(--suffix-padding);\n box-sizing: border-box;\n border-inline-start: var(--nve-ref-border-width-sm) solid var(--nve-ref-border-color-muted);\n}\n\n.title {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\nslot[name='suffix'] {\n display: flex;\n flex: 0 1 auto;\n min-width: 0;\n overflow-x: auto;\n align-items: center;\n gap: var(--gap);\n}\n\nslot[name='suffix']::slotted(*) {\n flex: none;\n}\n"],"mappings":""}
@@ -0,0 +1,28 @@
1
+ import { hostAttr as e } from "../../internal/decorators/host-attr.js";
2
+ import t from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
3
+ import n from "./panel-header.js";
4
+ import { LitElement as r, html as i, isServer as a } from "lit";
5
+ import { useStyles as o } from "@nvidia-elements/foundations/internal/styles";
6
+ // src/dashboard/panel-header/panel-header.ts
7
+ var s = class extends r {
8
+ constructor(...e) {
9
+ super(...e), this.slot = "header";
10
+ }
11
+ static {
12
+ this.styles = o([n]);
13
+ }
14
+ static {
15
+ this.metadata = {
16
+ tag: "nve-dashboard-panel-header",
17
+ version: "2.24.0",
18
+ parents: ["nve-dashboard-panel"]
19
+ };
20
+ }
21
+ render() {
22
+ return i`<div internal-host><div class="title-group"><slot name="prefix" ?data-empty="${!a && !this.querySelector(":scope > [slot=\"prefix\"]")}" @slotchange="${() => this.requestUpdate()}"></slot><div class="title"><slot></slot></div></div><div class="suffix" ?data-empty="${!a && !this.querySelector(":scope > [slot=\"suffix\"]")}"><slot name="suffix" @slotchange="${() => this.requestUpdate()}"></slot></div></div>`;
23
+ }
24
+ };
25
+ t([e()], s.prototype, "slot", void 0);
26
+ export { s as DashboardPanelHeader };
27
+
28
+ //# sourceMappingURL=panel-header2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"panel-header2.js","names":["styles","_decorate","__decorate","panel_header_default","DashboardPanelHeader","LitElement","_args","useStyles","isServer","hostAttr"],"sources":["../../../src/dashboard/panel-header/panel-header.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, isServer, LitElement } from 'lit';\n\nimport { hostAttr } from '@nvidia-elements/core/internal';\nimport { useStyles } from '@nvidia-elements/foundations/internal/styles';\n\nimport styles from './panel-header.css?inline';\n\n/**\n * @element nve-dashboard-panel-header\n * @description Supplies the required dashboard panel title and application controls.\n * @documentation https://nvidia.github.io/elements/docs/elements/dashboard/\n * @since 0.0.0\n * @stable false\n * @entrypoint \\@nvidia-elements/core/dashboard\n * @slot - Noninteractive title used as the default accessible panel name. Heading semantics remain application owned.\n * @slot prefix - Title decoration.\n * @slot suffix - Application controls.\n * @cssprop --padding\n * @cssprop --suffix-padding - Padding around application actions. Defaults to 4px.\n * @cssprop --gap\n * @cssprop --min-height\n */\nexport class DashboardPanelHeader extends LitElement {\n static styles = useStyles([styles]);\n static readonly metadata = { tag: 'nve-dashboard-panel-header', version: '0.0.0', parents: ['nve-dashboard-panel'] };\n\n /** @private */\n @hostAttr() slot = 'header';\n\n render() {\n return html`<div internal-host>\n <div class=\"title-group\"><slot name=\"prefix\" ?data-empty=${!isServer && !this.querySelector(':scope > [slot=\"prefix\"]')} @slotchange=${() => this.requestUpdate()}></slot><div class=\"title\"><slot></slot></div></div>\n <div class=\"suffix\" ?data-empty=${!isServer && !this.querySelector(':scope > [slot=\"suffix\"]')}><slot name=\"suffix\" @slotchange=${() => this.requestUpdate()}></slot></div>\n </div>`;\n }\n}\n"],"mappings":";;;;;;AAyBA,IAAaI,IAAb,cAA0CC,EAAW;;EAKhC,A,aAAA,KAAA,OAAA;;;EAJH,KAAA,SAAAE,EAAU,CAACP,CAAM,CAAC;;;EACP,KAAA,WAAA;GAAE,KAAK;GAA8B,SAAS;GAAS,SAAS,CAAC,qBAAqB;EAAE;;CAKnH,SAAS;EACP,OAAO,CAAI,gFACkD,CAACQ,KAAY,CAAC,KAAK,cAAc,4BAA0B,EAAE,uBAAqB,KAAK,cAAc,EAAE,wFAChI,CAACA,KAAY,CAAC,KAAK,cAAc,4BAA0B,EAAE,2CAAyC,KAAK,cAAc,EAAE;CAEjK;AACF;AARGP,EAAA,CAAAQ,EAAS,CAAA,GAAAL,EAAA,WAAA,QAAA,KAAA,CAAA"}
@@ -0,0 +1,17 @@
1
+ import type { DashboardReadingDirection, DashboardResizeEdge } from './geometry.utils.js';
2
+ import type { DashboardArrangementRequest } from './intent.types.js';
3
+ import type { DashboardLayout, DashboardSpanConstraints } from '../dashboard.types.js';
4
+ interface DashboardActionInput {
5
+ readonly layout: DashboardLayout;
6
+ readonly panels: readonly DashboardSpanConstraints[];
7
+ readonly id: string;
8
+ readonly request: DashboardArrangementRequest;
9
+ readonly movable: boolean;
10
+ readonly resizable: boolean;
11
+ readonly autoSettle: boolean;
12
+ readonly readingDirection: DashboardReadingDirection;
13
+ readonly resizeEdge: DashboardResizeEdge;
14
+ }
15
+ /** Applies movement and resize permissions before planning a layout proposal. */
16
+ export declare function planDashboardAction(input: DashboardActionInput): DashboardLayout | undefined;
17
+ export {};
@@ -0,0 +1,144 @@
1
+ import { getDashboardResizeBoundaries as e, preservesDashboardResizeAnchors as t } from "./geometry.utils.js";
2
+ import { isDashboardGridPlacement as n, placeDashboard as r } from "./layout.utils.js";
3
+ // src/dashboard/utils/action.utils.ts
4
+ var i = {
5
+ "--move-left": {
6
+ kind: "move",
7
+ column: -1,
8
+ row: 0
9
+ },
10
+ "--move-right": {
11
+ kind: "move",
12
+ column: 1,
13
+ row: 0
14
+ },
15
+ "--move-up": {
16
+ kind: "move",
17
+ column: 0,
18
+ row: -1
19
+ },
20
+ "--move-down": {
21
+ kind: "move",
22
+ column: 0,
23
+ row: 1
24
+ },
25
+ "--increase-width": {
26
+ kind: "resize",
27
+ column: 1,
28
+ row: 0
29
+ },
30
+ "--decrease-width": {
31
+ kind: "resize",
32
+ column: -1,
33
+ row: 0
34
+ },
35
+ "--increase-height": {
36
+ kind: "resize",
37
+ column: 0,
38
+ row: 1
39
+ },
40
+ "--decrease-height": {
41
+ kind: "resize",
42
+ column: 0,
43
+ row: -1
44
+ }
45
+ }, a = [
46
+ "left",
47
+ "right",
48
+ "top",
49
+ "bottom",
50
+ "bottom-right",
51
+ "bottom-left"
52
+ ];
53
+ function o(e) {
54
+ let { layout: t, panels: i, id: a, movable: o, resizable: c, request: l } = e, u = t.items.find((e) => e.id === a);
55
+ if (!u || !i.some((e) => e.id === a)) return;
56
+ let d = s(e, u);
57
+ if (d && n(d.geometry) && (d.kind === "start" || l.kind === "anchored-resize" || f(u, d.geometry, {
58
+ movable: o,
59
+ resizable: c,
60
+ readingDirection: e.readingDirection
61
+ }))) return r(t, i, {
62
+ id: a,
63
+ intent: d,
64
+ autoSettle: e.autoSettle
65
+ });
66
+ }
67
+ function s(e, n) {
68
+ let { request: r, resizable: i } = e;
69
+ switch (r.kind) {
70
+ case "pointer": return r;
71
+ case "start": return d(e, n, r.geometry);
72
+ case "anchored-resize": return i && t(n, r.geometry, {
73
+ edge: r.edge,
74
+ readingDirection: e.readingDirection
75
+ }) ? {
76
+ kind: "resize",
77
+ geometry: r.geometry
78
+ } : void 0;
79
+ case "command": return c(e, n, r);
80
+ default: return r;
81
+ }
82
+ }
83
+ function c(t, n, r) {
84
+ if (r.command === "--move-to-start" || r.command === "--place") return u(t, n, r);
85
+ let i = l(r.command, t.readingDirection);
86
+ if (!i) return;
87
+ let a = e(t.resizeEdge, t.readingDirection);
88
+ return i.kind === "move" ? {
89
+ kind: "advance",
90
+ geometry: {
91
+ ...n,
92
+ column: n.column + i.column,
93
+ row: n.row + i.row
94
+ },
95
+ step: {
96
+ column: i.column,
97
+ row: i.row
98
+ }
99
+ } : {
100
+ kind: "resize",
101
+ geometry: {
102
+ ...n,
103
+ column: n.column - (a.column === "minimum" ? i.column : 0),
104
+ columnSpan: n.columnSpan + i.column,
105
+ rowSpan: n.rowSpan + i.row
106
+ }
107
+ };
108
+ }
109
+ function l(e, t) {
110
+ let n = i[e];
111
+ return n?.kind !== "move" || t !== "rtl" ? n : {
112
+ ...n,
113
+ column: -n.column
114
+ };
115
+ }
116
+ function u(e, t, r) {
117
+ let i = r.placement;
118
+ if (i === void 0 || n(i)) return r.command === "--move-to-start" ? d(e, t, i) : i && {
119
+ kind: "coordinate",
120
+ geometry: i
121
+ };
122
+ }
123
+ function d(e, t, n) {
124
+ if (e.movable) return {
125
+ kind: "start",
126
+ geometry: {
127
+ column: n?.column ?? t.column,
128
+ row: n?.row ?? t.row,
129
+ columnSpan: t.columnSpan,
130
+ rowSpan: t.rowSpan,
131
+ [e.layout.grid.flow === "vertical" ? "row" : "column"]: 0
132
+ }
133
+ };
134
+ }
135
+ function f(e, n, r) {
136
+ let i = e.column !== n.column || e.row !== n.row, o = e.columnSpan !== n.columnSpan || e.rowSpan !== n.rowSpan, s = o && r.resizable && a.some((i) => t(e, n, {
137
+ edge: i,
138
+ readingDirection: r.readingDirection
139
+ }));
140
+ return (!i || r.movable || s) && (!o || r.resizable);
141
+ }
142
+ export { o as planDashboardAction };
143
+
144
+ //# sourceMappingURL=action.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action.utils.js","names":["exhaustive","actions","resizeEdges","planDashboardAction","input","source","layout","item","id","panels","panel","intent","createRequestIntent","isDashboardGridPlacement","request","isPlacementAllowed","placeDashboard","createStartIntent","resizable","preservesDashboardResizeAnchors","createCommandIntent","createPlacementIntent","action","getCommandAction","boundaries","getDashboardResizeBoundaries","command","readingDirection","supplied","moving","geometry","resizing","anchoredResize","permissions"],"sources":["../../../src/dashboard/utils/action.utils.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { getDashboardResizeBoundaries, preservesDashboardResizeAnchors } from './geometry.utils.js';\nimport { isDashboardGridPlacement, placeDashboard } from './layout.utils.js';\n\nimport type { DashboardReadingDirection, DashboardResizeEdge } from './geometry.utils.js';\nimport type { DashboardArrangementRequest, DashboardIntent } from './intent.types.js';\n\nimport type {\n DashboardGridPlacement,\n DashboardItem,\n DashboardLayout,\n DashboardSpanConstraints\n} from '../dashboard.types.js';\n\nconst actions: Readonly<Record<string, { kind: 'move' | 'resize'; column: number; row: number }>> = {\n '--move-left': { kind: 'move', column: -1, row: 0 },\n '--move-right': { kind: 'move', column: 1, row: 0 },\n '--move-up': { kind: 'move', column: 0, row: -1 },\n '--move-down': { kind: 'move', column: 0, row: 1 },\n '--increase-width': { kind: 'resize', column: 1, row: 0 },\n '--decrease-width': { kind: 'resize', column: -1, row: 0 },\n '--increase-height': { kind: 'resize', column: 0, row: 1 },\n '--decrease-height': { kind: 'resize', column: 0, row: -1 }\n};\n\nconst resizeEdges: readonly DashboardResizeEdge[] = ['left', 'right', 'top', 'bottom', 'bottom-right', 'bottom-left'];\n\ninterface DashboardActionInput {\n readonly layout: DashboardLayout;\n readonly panels: readonly DashboardSpanConstraints[];\n readonly id: string;\n readonly request: DashboardArrangementRequest;\n readonly movable: boolean;\n readonly resizable: boolean;\n readonly autoSettle: boolean;\n readonly readingDirection: DashboardReadingDirection;\n readonly resizeEdge: DashboardResizeEdge;\n}\n\n/** Applies movement and resize permissions before planning a layout proposal. */\nexport function planDashboardAction(input: DashboardActionInput): DashboardLayout | undefined {\n const { layout, panels, id, movable, resizable, request } = input;\n const source = layout.items.find(item => item.id === id);\n if (!source || !panels.some(panel => panel.id === id)) return undefined;\n\n const intent = createRequestIntent(input, source);\n if (!intent || !isDashboardGridPlacement(intent.geometry)) return undefined;\n\n const explicit = intent.kind === 'start' || request.kind === 'anchored-resize';\n if (\n !explicit &&\n !isPlacementAllowed(source, intent.geometry, { movable, resizable, readingDirection: input.readingDirection })\n ) {\n return undefined;\n }\n\n return placeDashboard(layout, panels, { id, intent, autoSettle: input.autoSettle });\n}\n\nfunction createRequestIntent(input: DashboardActionInput, source: DashboardItem): DashboardIntent | undefined {\n const { request, resizable } = input;\n\n switch (request.kind) {\n case 'pointer':\n return request;\n case 'start':\n return createStartIntent(input, source, request.geometry);\n case 'anchored-resize':\n return resizable &&\n preservesDashboardResizeAnchors(source, request.geometry, {\n edge: request.edge,\n readingDirection: input.readingDirection\n })\n ? { kind: 'resize', geometry: request.geometry }\n : undefined;\n case 'command':\n return createCommandIntent(input, source, request);\n default: {\n const exhaustive: never = request;\n return exhaustive;\n }\n }\n}\n\nfunction createCommandIntent(\n input: DashboardActionInput,\n source: DashboardItem,\n request: Extract<DashboardArrangementRequest, { kind: 'command' }>\n): DashboardIntent | undefined {\n if (request.command === '--move-to-start' || request.command === '--place') {\n return createPlacementIntent(input, source, request);\n }\n\n const action = getCommandAction(request.command, input.readingDirection);\n if (!action) return undefined;\n\n const boundaries = getDashboardResizeBoundaries(input.resizeEdge, input.readingDirection);\n\n return action.kind === 'move'\n ? {\n kind: 'advance',\n geometry: { ...source, column: source.column + action.column, row: source.row + action.row },\n step: { column: action.column, row: action.row }\n }\n : {\n kind: 'resize',\n geometry: {\n ...source,\n column: source.column - (boundaries.column === 'minimum' ? action.column : 0),\n columnSpan: source.columnSpan + action.column,\n rowSpan: source.rowSpan + action.row\n }\n };\n}\n\nfunction getCommandAction(command: string, readingDirection: DashboardActionInput['readingDirection']) {\n const action = actions[command];\n if (action?.kind !== 'move' || readingDirection !== 'rtl') return action;\n\n return { ...action, column: -action.column };\n}\n\nfunction createPlacementIntent(\n input: DashboardActionInput,\n source: DashboardItem,\n request: Extract<DashboardArrangementRequest, { kind: 'command' }>\n): DashboardIntent | undefined {\n const supplied = request.placement;\n if (supplied !== undefined && !isDashboardGridPlacement(supplied)) return undefined;\n\n return request.command === '--move-to-start'\n ? createStartIntent(input, source, supplied)\n : supplied && { kind: 'coordinate', geometry: supplied };\n}\n\nfunction createStartIntent(\n input: DashboardActionInput,\n source: DashboardItem,\n supplied?: DashboardGridPlacement\n): DashboardIntent | undefined {\n if (!input.movable) return undefined;\n\n const geometry = {\n column: supplied?.column ?? source.column,\n row: supplied?.row ?? source.row,\n columnSpan: source.columnSpan,\n rowSpan: source.rowSpan,\n [input.layout.grid.flow === 'vertical' ? 'row' : 'column']: 0\n };\n\n return { kind: 'start', geometry };\n}\n\nfunction isPlacementAllowed(\n source: DashboardGridPlacement,\n geometry: DashboardGridPlacement,\n permissions: { movable: boolean; resizable: boolean; readingDirection: DashboardReadingDirection }\n): boolean {\n const moving = source.column !== geometry.column || source.row !== geometry.row;\n const resizing = source.columnSpan !== geometry.columnSpan || source.rowSpan !== geometry.rowSpan;\n const anchoredResize =\n resizing &&\n permissions.resizable &&\n resizeEdges.some(edge =>\n preservesDashboardResizeAnchors(source, geometry, { edge, readingDirection: permissions.readingDirection })\n );\n\n return (!moving || permissions.movable || anchoredResize) && (!resizing || permissions.resizable);\n}\n"],"mappings":";;;AAgBA,IAAMC,IAA8F;CAClG,eAAe;EAAE,MAAM;EAAQ,QAAQ;EAAI,KAAK;CAAE;CAClD,gBAAgB;EAAE,MAAM;EAAQ,QAAQ;EAAG,KAAK;CAAE;CAClD,aAAa;EAAE,MAAM;EAAQ,QAAQ;EAAG,KAAK;CAAG;CAChD,eAAe;EAAE,MAAM;EAAQ,QAAQ;EAAG,KAAK;CAAE;CACjD,oBAAoB;EAAE,MAAM;EAAU,QAAQ;EAAG,KAAK;CAAE;CACxD,oBAAoB;EAAE,MAAM;EAAU,QAAQ;EAAI,KAAK;CAAE;CACzD,qBAAqB;EAAE,MAAM;EAAU,QAAQ;EAAG,KAAK;CAAE;CACzD,qBAAqB;EAAE,MAAM;EAAU,QAAQ;EAAG,KAAK;CAAG;AAC5D,GAEMC,IAA8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