@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
@@ -7,82 +7,82 @@ import { IconButton as a } from "../icon-button/icon-button2.js";
7
7
  import { ResizeHandle as o } from "../resize-handle/resize-handle2.js";
8
8
  import { Tabs as s, TabsItem as c } from "../tabs/tabs2.js";
9
9
  import { TabsItemGroup as l } from "../tabs/tabs-item-group2.js";
10
- import { parseWorkspaceValue as u, sameSerializedWorkspaceLayout as d, serializeWorkspaceValue as f } from "./utils/model/value.utils.js";
10
+ import { parseWorkspaceValue as u, sameWorkspaceLayout as d, serializeWorkspaceValue as f } from "./utils/model/value.utils.js";
11
11
  import { closePanel as p, findGroup as m, openPanel as h, projectLayout as g, reconcilePanels as _, selectPanel as v } from "./utils/model/operations.utils.js";
12
12
  import { WorkspaceCommandController as y } from "./controllers/workspace-command.controller.js";
13
13
  import { WorkspacePanel as b } from "./panel/panel2.js";
14
- import { focusWorkspacePanel as x, getPanelLabel as S, isWorkspaceCompositionMutation as C, shouldFocusAfterWorkspaceClose as w } from "./utils/presentation/composition.utils.js";
14
+ import { focusWorkspacePanel as x, getPanelLabel as S, shouldFocusAfterWorkspaceClose as C } from "./utils/presentation/composition.utils.js";
15
+ import { getPanelMembershipKey as w } from "./utils/model/membership.utils.js";
15
16
  import { getAllocatedTabWidth as T, preserveRecipientSelection as E } from "./utils/presentation/groups.utils.js";
16
17
  import { WorkspaceCompositionController as D } from "./controllers/workspace-composition.controller.js";
17
18
  import { WorkspaceFullscreenController as O } from "./controllers/workspace-fullscreen.controller.js";
18
19
  import { WorkspaceMeasurementController as k } from "./controllers/workspace-measurement.controller.js";
19
- import { allocateContextProxies as A, getContextKey as j } from "./utils/placement/context.utils.js";
20
- import { getAdmissiblePlacementLayout as M } from "./utils/placement/preparation.utils.js";
21
- import { WorkspaceRearrangeController as N } from "./controllers/workspace-rearrange.controller.js";
22
- import { WorkspaceResizeController as P } from "./controllers/workspace-resize.controller.js";
23
- import { WorkspaceRestorationController as F } from "./controllers/workspace-restoration.controller.js";
24
- import { getRegionCornerStyle as I, shouldEmphasizeReservedDestination as L } from "./utils/presentation/preview.utils.js";
25
- import { WorkspaceEvaluation as R } from "./utils/evaluation.utils.js";
26
- import z from "./workspace.js";
27
- import { LitElement as B, html as V, isServer as H, svg as U } from "lit";
28
- import { property as W } from "lit/decorators/property.js";
29
- import { I18nController as G } from "@nvidia-elements/foundations/internal/i18n";
30
- import { ifDefined as K } from "lit/directives/if-defined.js";
31
- import { repeat as q } from "lit/directives/repeat.js";
32
- import { styleMap as J } from "lit/directives/style-map.js";
33
- import { scopedRegistry as Y } from "@nvidia-elements/foundations/internal/decorators";
34
- import { useStyles as X } from "@nvidia-elements/foundations/internal/styles";
20
+ import { getAdmissiblePlacementLayout as A } from "./utils/placement/preparation.utils.js";
21
+ import { WorkspaceRearrangeController as j } from "./controllers/workspace-rearrange.controller.js";
22
+ import { WorkspaceResizeController as M } from "./controllers/workspace-resize.controller.js";
23
+ import { WorkspaceRestorationController as N } from "./controllers/workspace-restoration.controller.js";
24
+ import { getRegionCornerStyle as P, preparePreviewBoundaries as F, shouldEmphasizeReservedDestination as I } from "./utils/presentation/preview.utils.js";
25
+ import { WorkspaceEvaluationCache as L } from "./utils/evaluation.utils.js";
26
+ import R from "./workspace.js";
27
+ import { LitElement as z, html as B, isServer as V, svg as H } from "lit";
28
+ import { property as U } from "lit/decorators/property.js";
29
+ import { I18nController as W } from "@nvidia-elements/foundations/internal/i18n";
30
+ import { ifDefined as G } from "lit/directives/if-defined.js";
31
+ import { repeat as K } from "lit/directives/repeat.js";
32
+ import { styleMap as q } from "lit/directives/style-map.js";
33
+ import { scopedRegistry as J } from "@nvidia-elements/foundations/internal/decorators";
34
+ import { useStyles as Y } from "@nvidia-elements/foundations/internal/styles";
35
35
  // src/workspace/workspace.ts
36
- var Z = {
36
+ var X = {
37
37
  close: "close",
38
38
  move: "move",
39
39
  enterFullscreen: "enter full screen",
40
40
  exitFullscreen: "exit full screen"
41
- }, Q = class extends B {
41
+ }, Z = class extends z {
42
42
  constructor(...e) {
43
- super(...e), this.#e = new G(this, Z), this.i18n = this.#e.i18n, this.resizable = !1, this.rearrangeable = !1, this.groupable = !1, this.fullscreenable = !1, this.detachThreshold = 48, this.closable = !1, this.resizePolicy = "stop", this.#n = "", this.#r = !1, this.#a = new F(this, {
43
+ super(...e), this.#e = new W(this, X), this.i18n = this.#e.i18n, this.resizable = !1, this.rearrangeable = !1, this.groupable = !1, this.fullscreenable = !1, this.detachThreshold = 48, this.closable = !1, this.resizePolicy = "stop", this.#n = "", this.#r = !1, this.#o = new L(this), this.#s = new N(this, {
44
44
  getLayout: () => this.#t,
45
- applyLayout: (e) => this.#A(e),
46
- getTransitionTargets: () => this.#m.getTransitionTargets()
47
- }), this.#o = new y(this, {
45
+ applyLayout: (e) => this.#k(e),
46
+ getTransitionTargets: () => this.#g.getTransitionTargets()
47
+ }), this.#c = new y(this, {
48
48
  getState: () => ({
49
49
  panels: this.#y,
50
50
  layout: this.#t
51
51
  }),
52
- isRearrangementAllowed: () => !this.#s.active,
53
- isPlacementAvailable: (e, t) => !!this.#H(e, t),
54
- canEnterFullscreen: (e) => this.#s.canEnter(e),
55
- canExitFullscreen: () => this.#s.canExit,
56
- isFullscreenGroup: (e) => this.#s.isSelectedGroup(e),
57
- enterFullscreen: (e) => this.#s.enter(e),
58
- exitFullscreen: () => this.#s.exit(),
59
- activatePanel: (e, t) => this.#P(e, t),
60
- closePanel: (e) => this.#L(e),
61
- placePanel: (e, t) => this.#I(e, t)
62
- }), this.#s = new O(this, {
63
- getGroup: (e) => m(this.#V(this.#v).root, e)?.panels ?? [],
52
+ isRearrangementAllowed: () => !this.#l.active,
53
+ isPlacementAvailable: (e, t) => !!this.#V(e, t),
54
+ canEnterFullscreen: (e) => this.#l.canEnter(e),
55
+ canExitFullscreen: () => this.#l.canExit,
56
+ isFullscreenGroup: (e) => this.#l.isSelectedGroup(e),
57
+ enterFullscreen: (e) => this.#l.enter(e),
58
+ exitFullscreen: () => this.#l.exit(),
59
+ activatePanel: (e, t) => this.#N(e, t),
60
+ closePanel: (e) => this.#I(e),
61
+ placePanel: (e, t) => this.#F(e, t)
62
+ }), this.#l = new O(this, {
63
+ getGroup: (e) => m(this.#B(this.#v).root, e)?.panels ?? [],
64
64
  cancelInteractions: () => {
65
- this.#a.finish(), this.#c.cancel(), this.#f.cancel();
65
+ this.#s.finish(), this.#u.cancel(), this.#m.cancel();
66
66
  },
67
67
  invalidateCommandAvailability: () => {
68
- this.#o.invalidateAvailability(), this.#p.invalidate();
68
+ this.#c.invalidateAvailability(), this.#h.invalidate();
69
69
  }
70
- }), this.#c = new N(this, {
71
- evaluateWithContext: (e) => this.#B(e),
72
- isRearrangementAllowed: () => !this.#s.active && !this.#a.active,
70
+ }), this.#u = new j(this, {
71
+ evaluateWithContext: (e) => this.#z(e),
72
+ isRearrangementAllowed: () => !this.#l.active && !this.#s.active,
73
73
  getLayout: () => this.#t,
74
74
  getMeasurements: () => this.#x,
75
75
  getAvailablePanels: () => this.#b,
76
- activateSource: (e, t) => this.#N(e, t),
76
+ activateSource: (e, t) => this.#M(e, t),
77
77
  applyPreview: (e) => {
78
- this.#i = e, this.requestUpdate();
78
+ e?.phase !== "detached" && (this.#o.clear(), this.#a = void 0), this.#i = e, this.requestUpdate();
79
79
  },
80
- commitPlacement: (e, t, n) => this.#I(e, t, {
80
+ commitPlacement: (e, t, n) => this.#F(e, t, {
81
81
  layout: n,
82
82
  capabilities: this.#S,
83
83
  focus: !1
84
84
  })
85
- }), this.#l = [], this.#u = [], this.#d = {
85
+ }), this.#d = [], this.#f = [], this.#p = {
86
86
  gap: 0,
87
87
  headerHeight: 0,
88
88
  gripWidth: 0,
@@ -92,10 +92,10 @@ var Z = {
92
92
  tabMinWidth: 0,
93
93
  width: 0,
94
94
  height: 0
95
- }, this.#f = new P(this, {
95
+ }, this.#m = new M(this, {
96
96
  isEnabled: () => this.#w,
97
97
  getLayout: () => this.#t,
98
- getBoundaries: () => this.#u,
98
+ getBoundaries: () => this.#f,
99
99
  getAvailablePanels: () => this.#b,
100
100
  getPresentation: () => ({
101
101
  measurements: this.#x,
@@ -103,34 +103,37 @@ var Z = {
103
103
  closable: this.closable,
104
104
  fullscreenable: this.fullscreenable
105
105
  }),
106
- cancelForUser: () => this.#a.transition(() => this.#f.cancel()),
107
- commitLayout: (e) => this.#M(e)
108
- }), this.#p = new k(this, {
106
+ cancelForUser: () => this.#s.transition(() => this.#m.cancel()),
107
+ commitLayout: (e) => this.#j(e)
108
+ }), this.#h = new k(this, {
109
109
  getPanels: () => this.#y,
110
- isPresented: (e) => !this.#W(e) && this.#l.some((t) => t.panels.some((t) => t.id === e)),
111
- isCarried: (e) => !this.#t?.closed.includes(e) && this.#W(e),
112
- applyMeasurements: (e) => this.#O(e)
113
- }), this.#m = new D(this, {
110
+ isPresented: (e) => !this.#U(e) && this.#d.some((t) => t.panels.some((t) => t.id === e)),
111
+ isCarried: (e) => !this.#t?.closed.includes(e) && this.#U(e),
112
+ applyMeasurements: (e) => this.#D(e)
113
+ }), this.#g = new D(this, {
114
114
  getPanels: () => this.#y,
115
- getGroups: () => this.#l,
115
+ getGroups: () => this.#d,
116
116
  getLayout: () => this.#t,
117
117
  getPreview: () => this.#i,
118
- scrollChanged: () => this.#c.refresh()
118
+ scrollChanged: () => this.#u.refresh(),
119
+ contentChanged: (e) => {
120
+ e === "panels" && (this.#s.finish(), this.#c.invalidateAvailability(), this.#m.cancel(), this.#u.cancel()), this.#h.invalidate(), this.requestUpdate();
121
+ }
119
122
  }), this.#_ = {
120
123
  getCurrentLayout: () => this.#v,
121
124
  getCurrentMeasurements: () => this.#x,
122
125
  getCurrentPreview: () => this.#i,
123
- getFullscreenTarget: () => this.#s.targetPanelId,
124
- getResizePreview: () => this.#f.preview
126
+ getFullscreenTarget: () => this.#l.targetPanelId,
127
+ getResizePreview: () => this.#m.preview
125
128
  };
126
129
  }
127
130
  static {
128
- this.styles = X([z]);
131
+ this.styles = Y([R]);
129
132
  }
130
133
  static {
131
134
  this.metadata = {
132
135
  tag: "nve-workspace",
133
- version: "2.23.5",
136
+ version: "2.24.0",
134
137
  children: ["nve-workspace-panel", "nve-dropdown-group"]
135
138
  };
136
139
  }
@@ -152,7 +155,7 @@ var Z = {
152
155
  }
153
156
  set value(e) {
154
157
  let t = u(e);
155
- this.#a.finish(), this.#A(t);
158
+ this.#s.finish(), this.#k(t);
156
159
  }
157
160
  #t;
158
161
  #n;
@@ -172,46 +175,35 @@ var Z = {
172
175
  #g;
173
176
  #_;
174
177
  connectedCallback() {
175
- super.connectedCallback(), this.#h = new MutationObserver((e) => this.#E(e)), this.#h.observe(this, {
176
- childList: !0,
177
- characterData: !0,
178
- attributes: !0,
179
- subtree: !0,
180
- attributeFilter: [
181
- "id",
182
- "min-width",
183
- "min-height",
184
- "slot"
185
- ]
186
- });
178
+ super.connectedCallback(), this.#g.startObserving();
187
179
  }
188
180
  disconnectedCallback() {
189
- this.#c.cancel(), this.#h?.disconnect(), super.disconnectedCallback();
181
+ this.#o.clear(), this.#a = void 0, this.#u.cancel(), this.#g.stopObserving(), super.disconnectedCallback();
190
182
  }
191
183
  willUpdate(e) {
192
- super.willUpdate(e), this.#m.captureFocus(), [
184
+ super.willUpdate(e), this.#g.captureFocus(), [
193
185
  "value",
194
186
  "fullscreenable",
195
187
  "closable",
196
188
  "rearrangeable",
197
189
  "groupable",
198
190
  "resizePolicy"
199
- ].some((t) => e.has(t)) && this.#o.invalidateAvailability(), [
191
+ ].some((t) => e.has(t)) && this.#c.invalidateAvailability(), [
200
192
  "fullscreenable",
201
193
  "closable",
202
194
  "rearrangeable",
203
195
  "groupable"
204
- ].some((t) => e.has(t)) && this.#p.invalidate(), this.#D(), this.#r = !1;
196
+ ].some((t) => e.has(t)) && this.#h.invalidate(), this.#E(), this.#r = !1;
205
197
  }
206
198
  updated() {
207
- this.#m.sync(), this.#o.flushAvailability();
199
+ this.#g.sync(), this.#c.flushAvailability();
208
200
  }
209
201
  animateTo(e, t = {}) {
210
202
  let n = u(e);
211
- this.#a.animateTo(n, t);
203
+ this.#s.animateTo(n, t);
212
204
  }
213
205
  isCommandAvailable(e, t = {}) {
214
- return this.#o.isCommandAvailable(e, t);
206
+ return this.#c.isCommandAvailable(e, t);
215
207
  }
216
208
  get #v() {
217
209
  return this.#t ?? {
@@ -221,38 +213,35 @@ var Z = {
221
213
  };
222
214
  }
223
215
  get #y() {
224
- return this.#g ? this.#g.panels : H ? [] : [...this.children].filter((t) => e(t, b));
216
+ let t = this.#o.current;
217
+ return t ? t.panels : V ? [] : [...this.children].filter((t) => e(t, b));
225
218
  }
226
219
  get #b() {
227
- return this.#g?.available ?? this.#y.map((e) => e.id);
220
+ return this.#o.current?.available ?? this.#y.map((e) => e.id);
228
221
  }
229
222
  get #x() {
230
- return this.#f.presentation?.measurements ?? this.#d;
223
+ return this.#m.presentation?.measurements ?? this.#p;
231
224
  }
232
225
  get #S() {
233
- return this.#c.capabilities ?? {
226
+ return this.#u.capabilities ?? {
234
227
  rearrangeable: this.rearrangeable,
235
228
  groupable: this.groupable
236
229
  };
237
230
  }
238
231
  get #C() {
239
- return this.#f.presentation?.closable ?? this.closable;
232
+ return this.#m.presentation?.closable ?? this.closable;
240
233
  }
241
234
  get #w() {
242
- return this.resizable && !this.#s.active;
235
+ return this.resizable && !this.#l.active;
243
236
  }
244
237
  get #T() {
245
- return this.#w || this.#f.retainingHandles;
238
+ return this.#w || this.#m.retainingHandles;
246
239
  }
247
- #E(t) {
248
- let n = t.some((t) => t.target === this || t.type === "attributes" && e(t.target, b) && t.target.parentElement === this), r = t.some((e) => C(this, e));
249
- n && (this.#a.finish(), this.#o.invalidateAvailability(), this.#f.cancel(), this.#c.cancel()), (n || r) && (this.#p.invalidate(), this.requestUpdate());
250
- }
251
- #D() {
240
+ #E() {
252
241
  let e = this.#b;
253
242
  if (!e.every(Boolean) || new Set(e).size !== e.length) return;
254
243
  if (!this.#t) {
255
- e.length && this.#k({
244
+ e.length && this.#O({
256
245
  version: 1,
257
246
  root: {
258
247
  type: "group",
@@ -264,93 +253,90 @@ var Z = {
264
253
  return;
265
254
  }
266
255
  let t = _(this.#t, e);
267
- t !== this.#t && (this.#k(t), this.#r || this.#j());
256
+ t !== this.#t && (this.#O(t), this.#r || this.#A());
268
257
  }
269
- #O(e) {
270
- this.#d = e.measurements, this.#o.invalidateAvailability(), this.requestUpdate(), this.#f.handleMeasurementsChange(e), this.#a.handleMeasurementsChange(e), this.#c.handleMeasurementsChange(e);
258
+ #D(e) {
259
+ this.#p = e.measurements, this.#c.invalidateAvailability(), this.requestUpdate(), this.#m.handleMeasurementsChange(e), this.#s.handleMeasurementsChange(e), this.#u.handleMeasurementsChange(e);
271
260
  }
272
- #k(e) {
261
+ #O(e) {
273
262
  if (e === this.#t) return;
274
263
  let t = f(e);
275
264
  this.#t = e, this.#n = t;
276
265
  }
277
- #A(e) {
278
- this.#c.cancel();
266
+ #k(e) {
267
+ this.#u.cancel();
279
268
  let t = this.value;
280
- this.#f.resetForRestore(), this.#k(e), this.#r = !0, this.requestUpdate("value", t);
269
+ this.#m.resetForRestore(), this.#O(e), this.#r = !0, this.requestUpdate("value", t);
281
270
  }
282
- #j() {
283
- this.#o.invalidateAvailability(), this.dispatchEvent(new Event("change", {
271
+ #A() {
272
+ this.#c.invalidateAvailability(), this.dispatchEvent(new Event("change", {
284
273
  bubbles: !0,
285
274
  composed: !0
286
275
  }));
287
276
  }
288
- #M(e) {
289
- d(this.#t, e) ? this.requestUpdate() : (this.#k(e), this.#j());
277
+ #j(e) {
278
+ d(this.#t, e) ? this.requestUpdate() : (this.#O(e), this.#A());
290
279
  }
291
- #N(e, t) {
280
+ #M(e, t) {
292
281
  if (t) return;
293
282
  let n = e.find((e) => !this.#t?.closed.includes(e) && this.#b.includes(e));
294
- n && this.shadowRoot?.querySelector(`nve-tabs-item[data-panel="${CSS.escape(n)}"]`) && (this.#P(n, "select"), this.#z(n));
283
+ n && this.shadowRoot?.querySelector(`nve-tabs-item[data-panel="${CSS.escape(n)}"]`) && (this.#N(n, "select"), this.#R(n));
295
284
  }
296
- #P(e, t) {
297
- if (this.#a.finish(), !this.#t || !this.#y.some((t) => t.id === e)) return;
285
+ #N(e, t) {
286
+ if (this.#s.finish(), !this.#t || !this.#y.some((t) => t.id === e)) return;
298
287
  let n = this.#t;
299
288
  t === "open" && (n = h(this.#t, e) ?? this.#t);
300
289
  let r = v(n, e);
301
- r === void 0 && n !== this.#t && (r = n), r && (this.#c.cancel(), this.#f.cancel(), this.#k(r), this.#j());
290
+ r === void 0 && n !== this.#t && (r = n), r && (this.#u.cancel(), this.#m.cancel(), this.#O(r), this.#A());
302
291
  }
303
- #F(e) {
304
- this.#c.suppressSelection || this.#P(e, "select");
292
+ #P(e) {
293
+ this.#u.suppressSelection || this.#N(e, "select");
305
294
  }
306
- #I(e, t, n = {}) {
295
+ #F(e, t, n = {}) {
307
296
  let r = n.capabilities ?? {
308
297
  rearrangeable: this.rearrangeable,
309
298
  groupable: this.groupable
310
299
  };
311
- if (!r.rearrangeable || this.#s.active) return !1;
312
- let i = this.#H(e, t, {
300
+ if (!r.rearrangeable || this.#l.active) return !1;
301
+ let i = this.#V(e, t, {
313
302
  candidate: n.layout,
314
303
  groupable: r.groupable
315
304
  });
316
- return i ? (this.#a.finish(), this.#c.cancel(), this.#f.cancel(), this.#k(i), this.#j(), this.#R(e, n), !0) : !1;
305
+ return i ? (this.#s.finish(), this.#u.cancel(), this.#m.cancel(), this.#O(i), this.#A(), this.#L(e, n), !0) : !1;
317
306
  }
318
- #L(e) {
319
- if (this.#a.finish(), !this.closable || !this.#t) return;
307
+ #I(e) {
308
+ if (this.#s.finish(), !this.closable || !this.#t) return;
320
309
  let t = p(this.#t, e);
321
310
  if (!t) return;
322
- let n = w(this, e);
323
- this.#c.cancel(), this.#f.cancel(), this.#k(t), this.#j();
324
- let r = this.#l.find((t) => t.panels.some((t) => t.id === e));
325
- n && this.#z(r?.panels.find((t) => t.id !== e)?.id);
311
+ let n = C(this, e);
312
+ this.#u.cancel(), this.#m.cancel(), this.#O(t), this.#A();
313
+ let r = this.#d.find((t) => t.panels.some((t) => t.id === e));
314
+ n && this.#R(r?.panels.find((t) => t.id !== e)?.id);
326
315
  }
327
- #R(e, t) {
328
- t.focus !== !1 && this.#z(e.find((e) => !this.#t?.closed.includes(e) && this.#y.some((t) => t.id === e)));
316
+ #L(e, t) {
317
+ t.focus !== !1 && this.#R(e.find((e) => !this.#t?.closed.includes(e) && this.#y.some((t) => t.id === e)));
329
318
  }
330
- #z(e) {
319
+ #R(e) {
331
320
  x(this, { id: e });
332
321
  }
333
- #B(e) {
334
- if (this.#g) return e(this.#g);
335
- this.#g = new R(this, {
322
+ #z(e) {
323
+ let t = this.#o.current;
324
+ if (t) return e(t);
325
+ let n = {
336
326
  panels: this.#y,
337
327
  layout: this.#v,
338
328
  source: this.#i?.source ?? [],
339
329
  measurements: this.#x,
340
- policy: this.#f.policy,
341
- strip: (e) => this.#m.findTabStrip(e)
342
- }, this.#_);
343
- try {
344
- return e(this.#g);
345
- } finally {
346
- this.#g = void 0;
347
- }
330
+ policy: this.#m.policy,
331
+ strip: (e) => this.#g.findTabStrip(e)
332
+ };
333
+ return this.#o.run(n, this.#_, e);
348
334
  }
349
- #V(e) {
350
- return this.#g ? this.#g.project(e) : g(e, this.#b);
335
+ #B(e) {
336
+ return this.#o.current?.project(e) ?? g(e, this.#b);
351
337
  }
352
- #H(e, t, n = {}) {
353
- if (this.#t) return this.#B((r) => M({
338
+ #V(e, t, n = {}) {
339
+ if (this.#t) return this.#z((r) => A({
354
340
  evaluation: r,
355
341
  layout: this.#v,
356
342
  measurements: this.#x,
@@ -360,28 +346,28 @@ var Z = {
360
346
  candidate: n.candidate
361
347
  }));
362
348
  }
363
- #U(e) {
364
- let t = e.filter((e) => !this.#t?.closed.includes(e) && this.#y.some((t) => t.id === e)), n = m(this.#t?.root ?? null, t[0])?.active, r = n && t.includes(n) ? n : t[0];
349
+ #H(e) {
350
+ let t = this.#y, n = e.filter((e) => !this.#t?.closed.includes(e) && t.some((t) => t.id === e)), r = m(this.#t?.root ?? null, n[0])?.active, i = r && n.includes(r) ? r : n[0], a = i ? t.find((e) => e.id === i) : void 0;
365
351
  return {
366
- title: r ? S(this.#y, r) : "",
367
- layers: Math.min(t.length, 3)
352
+ title: a ? S(a) : i ?? "",
353
+ layers: Math.min(n.length, 3)
368
354
  };
369
355
  }
370
- #W(e) {
356
+ #U(e) {
371
357
  return this.#i?.source.includes(e) ?? !1;
372
358
  }
373
- #G(e = this.#i) {
359
+ #W(e = this.#i) {
374
360
  return !!e && "allocation" in e && e.allocation !== "overlay";
375
361
  }
376
362
  render() {
377
- return this.#B((e) => this.#K(e));
363
+ return this.#z((e) => this.#G(e));
378
364
  }
379
- #K(e) {
365
+ #G(e) {
380
366
  let t = this.#i, n = e.presentationGeometry();
381
- this.#l = E(n.groups, this.#t?.root ?? null, this.#i?.source), this.#u = n.boundaries;
382
- let r = this.#q(n.regions, e);
383
- return this.#m.applyPresentation({
384
- groups: this.#l,
367
+ this.#d = E(n.groups, this.#t?.root ?? null, this.#i?.source), this.#f = n.boundaries;
368
+ let r = this.#J(n.regions, e);
369
+ return this.#g.applyPresentation({
370
+ groups: this.#d,
385
371
  extent: n,
386
372
  container: this.container,
387
373
  measurements: this.#x,
@@ -389,9 +375,25 @@ var Z = {
389
375
  animate: !!t,
390
376
  source: t?.source ?? [],
391
377
  scroll: (t) => e.scroll(t)
392
- }), V`<div internal-host ?data-resizing="${this.#f.resizing}" ?data-fullscreen="${this.#s.active}" ?data-rearranging="${!!t}" data-preview-allocation="${K(t && "allocation" in t ? t.allocation : void 0)}" style="${`--_minimum-height:${e.minimum(e.project(this.#v).root).height}px`}"><div class="viewport" @scroll="${() => this.#c.refresh()}"><div class="canvas" style="${`min-width:${n.minimum.width}px;min-height:${n.minimum.height}px`}">${q(this.#l, (e) => this.#m.getGroupIdentity(e), (e) => this.#$(e))}<slot @slotchange="${() => this.requestUpdate()}"></slot>${this.#ae()}<div class="preview-layer" data-drag-phase="${K(this.#i?.phase)}">${r}</div></div></div>${this.#se()}</div>`;
378
+ }), B`<div internal-host ?data-resizing="${this.#m.resizing}" ?data-fullscreen="${this.#l.active}" ?data-rearranging="${!!t}" data-preview-allocation="${G(t && "allocation" in t ? t.allocation : void 0)}" style="${`--_minimum-height:${e.minimum(e.project(this.#v).root).height}px`}"><div class="viewport" @scroll="${() => this.#u.refresh()}"><div class="canvas" style="${`min-width:${n.minimum.width}px;min-height:${n.minimum.height}px`}">${K(this.#d, (e) => this.#g.getGroupIdentity(e), (e) => this.#ee(e))}<slot @slotchange="${() => this.requestUpdate()}"></slot>${this.#oe()}<div class="preview-layer" data-drag-phase="${G(this.#i?.phase)}">${r}</div></div></div>${this.#ce()}</div>`;
379
+ }
380
+ #K(e, t, n) {
381
+ let r = this.isConnected && this.#i?.phase === "detached", i = this.#a;
382
+ if (r && i && i.catalogRegions === e && i.placedRegions === t && i.sourcePanelIds.length === n.length && i.sourcePanelIds.every((e, t) => e === n[t])) return i.boundaries;
383
+ this.#a = void 0;
384
+ let a = F(e, t, n);
385
+ return r && (this.#a = {
386
+ catalogRegions: e,
387
+ placedRegions: t,
388
+ sourcePanelIds: n.slice(),
389
+ boundaries: a
390
+ }), a;
393
391
  }
394
392
  #q(e, t) {
393
+ let n = t.scope && w(t.scope.members);
394
+ return K(e, (e) => e.key, (e) => B`<div class="scope-boundary" data-scope-boundary="${e.key}" ?data-active="${e.key === n}" inert aria-hidden="true" style="${e.style}"></div>`);
395
+ }
396
+ #J(e, t) {
395
397
  let n = this.#i;
396
398
  if (!n) return null;
397
399
  let { x: r, y: i } = t.client({
@@ -399,120 +401,112 @@ var Z = {
399
401
  y: 0,
400
402
  width: 0,
401
403
  height: 0
402
- }), { title: a, layers: o } = this.#U(n.source), s = this.#t ?? {
403
- version: 1,
404
- root: null,
405
- closed: []
406
- }, c = t.geometry(t.project(s)).regions, l = A({
407
- catalog: c,
408
- allocation: e,
409
- source: n.source
410
- }), u = t.bounds(), d = this.#c.getPreviewHint(n, t), { rect: f, kind: p } = n.cue, m = {
411
- ...f,
412
- x: f.x - r,
413
- y: f.y - i
414
- }, h = n.point;
415
- return V`${this.#J(d, r, i)}${q(l, (e) => e.key, (t) => V`<div class="context-boundary" data-context-boundary="${t.key}" ?data-active="${n.context && t.key === j(n.context.members)}" inert aria-hidden="true" style="${`left:${t.rect.x}px;top:${t.rect.y}px;width:${t.rect.width}px;height:${t.rect.height}px;${I(t.rect, e)}`}"></div>`)}<nve-ghost class="destination" part="ghost destination-ghost" data-destination-ghost ?data-cue-clipped="${f.width <= 0 || f.height <= 0}" data-drag-phase="${n.phase}" ?data-drop-blocked="${n.blocked}" data-destination-kind="${p}" ?data-reserved-placement="${L(n)}" style="${`transform:translate(${f.x - r}px,${f.y - i}px);width:${f.width}px;height:${f.height}px;${I(m, e)}`}">${n.blocked ? V`<nve-icon part="icon blocked-icon" name="cancel" status="danger" size="lg" aria-hidden="true"></nve-icon>` : null}${this.#Y(n)}</nve-ghost>${h ? this.#Q({
416
- point: h,
404
+ }), { title: a, layers: o } = this.#H(n.source), s = t.geometry(t.project(this.#v)).regions, c = this.#K(s, e, n.source), l = t.bounds(), u = this.#u.getPreviewHint(n, t), { rect: d, kind: f } = n.cue, p = {
405
+ ...d,
406
+ x: d.x - r,
407
+ y: d.y - i
408
+ }, m = n.point;
409
+ return B`${this.#Y(u, r, i)}${this.#q(c, n)}<nve-ghost class="destination" part="ghost destination-ghost" data-destination-ghost ?data-cue-clipped="${d.width <= 0 || d.height <= 0}" data-drag-phase="${n.phase}" ?data-drop-blocked="${n.blocked}" data-destination-kind="${f}" ?data-reserved-placement="${I(n)}" style="${`transform:translate(${d.x - r}px,${d.y - i}px);width:${d.width}px;height:${d.height}px;${P(p, e)}`}">${n.blocked ? B`<nve-icon part="icon blocked-icon" name="cancel" status="danger" size="lg" aria-hidden="true"></nve-icon>` : null}${this.#X(n)}</nve-ghost>${m ? this.#$({
410
+ point: m,
417
411
  x: r,
418
412
  y: i,
419
- bounds: u,
413
+ bounds: l,
420
414
  title: a,
421
415
  layers: o
422
416
  }) : null}`;
423
417
  }
424
- #J(e, t, n) {
425
- return e ? V`<div class="order-overlay" data-order-slot="${e.scope.index}" data-placement-hint="${e.kind}" inert aria-hidden="true" style="${`left:${e.rect.x - t}px;top:${e.rect.y - n}px;width:${e.rect.width}px;height:${e.rect.height}px`}"></div>` : null;
418
+ #Y(e, t, n) {
419
+ return e ? B`<div class="order-overlay" data-insertion-index="${e.insertion.index}" data-placement-hint="${e.kind}" inert aria-hidden="true" style="${`left:${e.rect.x - t}px;top:${e.rect.y - n}px;width:${e.rect.width}px;height:${e.rect.height}px`}"></div>` : null;
426
420
  }
427
- #Y(e) {
421
+ #X(e) {
428
422
  if (!e || e.phase !== "detached" || e.blocked || !e.seams) return null;
429
423
  let { kind: t, edges: n } = e.seams;
430
- return V`${n.map((e) => {
424
+ return B`${n.map((e) => {
431
425
  let n = e.side === "left" || e.side === "right", r = e.side === "left" || e.side === "top" ? `-${e.offset}px` : `calc(100% + ${e.offset}px)`, i = n ? `left:${r};top:${e.fraction * 100}%` : `left:${e.fraction * 100}%;top:${r}`, a = {
432
426
  right: 0,
433
427
  bottom: 90,
434
428
  left: 180,
435
429
  top: 270
436
430
  }[e.side];
437
- return V`<div class="seam-badge" data-seam-badge="${t}" data-seam-side="${e.side}" inert aria-hidden="true" style="${i}"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" style="${`transform:rotate(${a}deg)`}">${t === "split" ? this.#X() : this.#Z()}</svg></div>`;
431
+ return B`<div class="seam-badge" data-seam-badge="${t}" data-seam-side="${e.side}" inert aria-hidden="true" style="${i}"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" style="${`transform:rotate(${a}deg)`}">${t === "split" ? this.#Z() : this.#Q()}</svg></div>`;
438
432
  })}`;
439
433
  }
440
- #X() {
441
- return U`<path d="M3 4h9v16H3z" fill="currentColor" fill-opacity=".2" stroke="none"></path><rect x="2" y="4" width="20" height="16" rx="1"></rect><path d="M12 4v16"></path>`;
442
- }
443
434
  #Z() {
444
- return U`<rect x="2" y="7" width="7" height="10" rx="1" fill="currentColor" fill-opacity=".2"></rect><path d="M22 4h-9v16h9"></path>`;
435
+ return H`<path d="M3 4h9v16H3z" fill="currentColor" fill-opacity=".2" stroke="none"></path><rect x="2" y="4" width="20" height="16" rx="1"></rect><path d="M12 4v16"></path>`;
445
436
  }
446
- #Q(e) {
447
- let { point: t, x: n, y: r, bounds: i, title: a, layers: o } = e, s = i.x + i.width, c = i.y + i.height, l = Math.max(i.x, Math.min(t.x + 12, s)), u = Math.max(i.y, Math.min(t.y + 12, c));
448
- return V`<nve-ghost class="carried" part="ghost carried-ghost" data-carried-ghost .layers="${o}" style="${`left:${l - n}px;top:${u - r}px;width:max-content;max-width:${Math.max(0, Math.min(240, i.width))}px;max-height:${i.height}px;transform:translate(min(0px,calc(${s - l}px - 100%)),min(0px,calc(${c - u}px - 100%)))`}">${a}</nve-ghost>`;
437
+ #Q() {
438
+ return H`<rect x="2" y="7" width="7" height="10" rx="1" fill="currentColor" fill-opacity=".2"></rect><path d="M22 4h-9v16h9"></path>`;
449
439
  }
450
440
  #$(e) {
451
- let t = this.#x, { headerHeight: n } = t, r = this.#G() && e.panels.every((e) => this.#W(e.id)), i = this.#s.isSelectedGroup(e.active), a = (this.#f.presentation?.fullscreenable ?? this.fullscreenable) || i, o = a ? t.groupActionWidth ?? 0 : 0;
452
- return V`<div class="group-chrome" style="${`left:${e.rect.x}px;top:${e.rect.y}px;width:${e.rect.width}px;height:${e.rect.height}px`}"><div class="tabs" ?data-carried-reservation="${r}" ?inert="${r}" aria-hidden="${K(r ? "true" : void 0)}" style="${`height:${n}px`}">${this.#ee(e)} ${this.#te(e, o)} ${a ? this.#ie(e, i) : null}</div></div>`;
441
+ let { point: t, x: n, y: r, bounds: i, title: a, layers: o } = e, s = i.x + i.width, c = i.y + i.height, l = Math.max(i.x, Math.min(t.x + 12, s)), u = Math.max(i.y, Math.min(t.y + 12, c));
442
+ return B`<nve-ghost class="carried" part="ghost carried-ghost" data-carried-ghost .layers="${o}" style="${`left:${l - n}px;top:${u - r}px;width:max-content;max-width:${Math.max(0, Math.min(240, i.width))}px;max-height:${i.height}px;transform:translate(min(0px,calc(${s - l}px - 100%)),min(0px,calc(${c - u}px - 100%)))`}">${a}</nve-ghost>`;
453
443
  }
454
444
  #ee(e) {
455
- return (this.#f.presentation?.rearrangeable ?? this.#S.rearrangeable) && !this.#s.active && e.gripWidth > 0 ? V`<nve-drag-handle part="drag-handle" data-drag-group="${e.panels[0]?.id ?? ""}" draggable="false" aria-label="${K(this.i18n.move)}" @click="${(e) => e.preventDefault()}"></nve-drag-handle>` : null;
445
+ let t = this.#x, { headerHeight: n } = t, r = this.#W() && e.panels.every((e) => this.#U(e.id)), i = this.#l.isSelectedGroup(e.active), a = (this.#m.presentation?.fullscreenable ?? this.fullscreenable) || i, o = a ? t.groupActionWidth ?? 0 : 0;
446
+ return B`<div class="group-chrome" style="${`left:${e.rect.x}px;top:${e.rect.y}px;width:${e.rect.width}px;height:${e.rect.height}px`}"><div class="tabs" ?data-carried-reservation="${r}" ?inert="${r}" aria-hidden="${G(r ? "true" : void 0)}" style="${`height:${n}px`}">${this.#te(e)} ${this.#ne(e, o)} ${a ? this.#ae(e, i) : null}</div></div>`;
456
447
  }
457
- #te(e, t) {
458
- let n = T(e, this.#x), r = this.#x.panels?.[e.active]?.suffixWidth ?? 0;
459
- return V`<div class="tablist" ?data-scrollable="${e.panels.length > 1}" style="${`width:${Math.max(0, e.rect.width - e.gripWidth - r - t)}px;margin-right:${r}px`}" data-group="${this.#m.getGroupIdentity(e)}" @scroll="${(t) => this.#m.handleScroll(e, t)}">${this.#ne(e, n)}</div>`;
448
+ #te(e) {
449
+ return (this.#m.presentation?.rearrangeable ?? this.#S.rearrangeable) && !this.#l.active && e.gripWidth > 0 ? B`<nve-drag-handle part="drag-handle" data-drag-group="${e.panels[0]?.id ?? ""}" draggable="false" aria-label="${G(this.i18n.move)}" @click="${(e) => e.preventDefault()}"></nve-drag-handle>` : null;
460
450
  }
461
451
  #ne(e, t) {
462
- let n = q(e.panels, (e) => e.id, (n, r) => this.#re(e, n, {
452
+ let n = T(e, this.#x), r = this.#x.panels?.[e.active]?.suffixWidth ?? 0;
453
+ return B`<div class="tablist" ?data-scrollable="${e.panels.length > 1}" style="${`width:${Math.max(0, e.rect.width - e.gripWidth - r - t)}px;margin-right:${r}px`}" data-group="${this.#g.getGroupIdentity(e)}" @scroll="${(t) => this.#g.handleScroll(e, t)}">${this.#re(e, n)}</div>`;
454
+ }
455
+ #re(e, t) {
456
+ let n = K(e.panels, (e) => e.id, (n, r) => this.#ie(e, n, {
463
457
  left: r * t,
464
458
  width: t
465
459
  }));
466
- return e.tabbed ? V`<nve-tabs part="tabs" class="tab-track" @nve-key-change="${(e) => {
460
+ return e.tabbed ? B`<nve-tabs part="tabs" class="tab-track" @nve-key-change="${(e) => {
467
461
  let t = e.detail.activeItem.dataset.panel;
468
- t && this.#F(t);
469
- }}" style="${`width:${e.panels.length * t}px`}">${n}</nve-tabs>` : V`<div class="tab-track" style="${`width:${e.panels.length * t}px`}">${n}</div>`;
462
+ t && this.#P(t);
463
+ }}" style="${`width:${e.panels.length * t}px`}">${n}</nve-tabs>` : B`<div class="tab-track" style="${`width:${e.panels.length * t}px`}">${n}</div>`;
470
464
  }
471
- #re(e, t, n) {
472
- let r = J({
465
+ #ie(e, t, n) {
466
+ let r = q({
473
467
  left: `${n.left}px`,
474
468
  width: `${n.width}px`,
475
469
  "--height": `${this.#x.headerHeight}px`
476
- }), i = this.#W(t.id), a = t.querySelector(":scope > nve-workspace-panel-header") ? null : V`<span class="fallback-title">${t.id}</span>`, o = this.#C ? V`<nve-icon-button slot="${K(e.tabbed ? "suffix" : void 0)}" part="icon-button close-button" icon-name="cancel" container="flat" size="sm" data-close="${t.id}" aria-label="${`${this.i18n.close} ${S(this.#y, t.id)}`}" @click="${() => this.#L(t.id)}"></nve-icon-button>` : null;
477
- return e.tabbed ? V`<nve-tabs-item-group part="tabs-item-group" class="tab-entry" ?data-carried-tab="${i}" ?inert="${i}" aria-hidden="${K(i ? "true" : void 0)}" style="${r}"><nve-tabs-item part="tabs-item tab" data-panel="${t.id}" ?selected="${e.active === t.id}" aria-label="${t.id}" @pointerenter="${() => this.#m.setHeaderHovered(t.id, !0)}" @pointerleave="${() => this.#m.setHeaderHovered(t.id, !1)}" @click="${() => this.#F(t.id)}">${a}</nve-tabs-item>${o}</nve-tabs-item-group>` : V`<div class="tab-entry panel-entry" ?data-carried-tab="${i}" ?inert="${i}" aria-hidden="${K(i ? "true" : void 0)}" style="${r}"><div class="panel-title" data-panel="${t.id}" aria-hidden="true">${a}</div>${o}</div>`;
470
+ }), i = this.#U(t.id), a = t.querySelector(":scope > nve-workspace-panel-header") ? null : B`<span class="fallback-title">${t.id}</span>`, o = this.#C ? B`<nve-icon-button slot="${G(e.tabbed ? "suffix" : void 0)}" part="icon-button close-button" icon-name="cancel" container="flat" size="sm" data-close="${t.id}" aria-label="${`${this.i18n.close} ${S(t)}`}" @click="${() => this.#I(t.id)}"></nve-icon-button>` : null;
471
+ return e.tabbed ? B`<nve-tabs-item-group part="tabs-item-group" class="tab-entry" ?data-carried-tab="${i}" ?inert="${i}" aria-hidden="${G(i ? "true" : void 0)}" style="${r}"><nve-tabs-item part="tabs-item tab" data-panel="${t.id}" ?selected="${e.active === t.id}" aria-label="${t.id}" @pointerenter="${() => this.#g.setHeaderHovered(t.id, !0)}" @pointerleave="${() => this.#g.setHeaderHovered(t.id, !1)}" @click="${() => this.#P(t.id)}">${a}</nve-tabs-item>${o}</nve-tabs-item-group>` : B`<div class="tab-entry panel-entry" ?data-carried-tab="${i}" ?inert="${i}" aria-hidden="${G(i ? "true" : void 0)}" style="${r}"><div class="panel-title" data-panel="${t.id}" aria-hidden="true">${a}</div>${o}</div>`;
478
472
  }
479
- #ie(e, t) {
473
+ #ae(e, t) {
480
474
  let n = this.#x.panels?.[e.active]?.suffixWidth ?? 0, r = !this.isCommandAvailable("--toggle-fullscreen", { value: e.active });
481
- return V`<div class="group-actions" ?data-authored-suffix="${n > 0}"><nve-icon-button part="icon-button fullscreen-button" icon-name="${t ? "minimize" : "maximize"}" container="flat" size="sm" command="--toggle-fullscreen" .commandForElement="${e.panels.find((t) => t.id === e.active) ?? null}" ?disabled="${r}" aria-label="${K(t ? this.i18n.exitFullscreen : this.i18n.enterFullscreen)}"></nve-icon-button></div>`;
475
+ return B`<div class="group-actions" ?data-authored-suffix="${n > 0}"><nve-icon-button part="icon-button fullscreen-button" icon-name="${t ? "minimize" : "maximize"}" container="flat" size="sm" command="--toggle-fullscreen" .commandForElement="${e.panels.find((t) => t.id === e.active) ?? null}" ?disabled="${r}" aria-label="${G(t ? this.i18n.exitFullscreen : this.i18n.enterFullscreen)}"></nve-icon-button></div>`;
482
476
  }
483
- #ae() {
484
- return this.#T ? q(this.#u, (e) => e.key, (e) => this.#oe(e)) : null;
477
+ #oe() {
478
+ return this.#T ? K(this.#f, (e) => e.key, (e) => this.#se(e)) : null;
485
479
  }
486
- #oe(e) {
487
- return V`<div class="gutter" style="${`left:${e.rect.x}px;top:${e.rect.y}px;width:${e.rect.width}px;height:${e.rect.height}px`}"><nve-resize-handle data-boundary="${e.key}" part="resize-handle" orientation="${e.branch.axis === "horizontal" ? "vertical" : "horizontal"}" .min="${e.min}" .max="${e.max}" .step="${10}" .value="${e.value}" @nve-gesture-input="${this.#f.gesture}" @toggle="${(e) => e.preventDefault()}" @input="${(t) => this.#f.input(t, e)}" @change="${(t) => this.#f.change(t, e)}"></nve-resize-handle></div>`;
480
+ #se(e) {
481
+ return B`<div class="gutter" style="${`left:${e.rect.x}px;top:${e.rect.y}px;width:${e.rect.width}px;height:${e.rect.height}px`}"><nve-resize-handle data-boundary="${e.key}" part="resize-handle" orientation="${e.branch.axis === "horizontal" ? "vertical" : "horizontal"}" .min="${e.min}" .max="${e.max}" .step="${10}" .value="${e.value}" @nve-gesture-input="${this.#m.gesture}" @toggle="${(e) => e.preventDefault()}" @input="${(t) => this.#m.input(t, e)}" @change="${(t) => this.#m.change(t, e)}"></nve-resize-handle></div>`;
488
482
  }
489
- #se() {
490
- let { rearrangeable: e } = this.#S, t = this.fullscreenable || this.#l.some((e) => this.#s.isSelectedGroup(e.active));
491
- return V`<div class="chrome" data-chrome inert aria-hidden="true"><div class="gap-probe"></div><div class="tab-min-probe"></div><div class="chrome-header"><nve-tabs part="tabs"><nve-tabs-item-group part="tabs-item-group" class="tab-entry tab-probe"><nve-tabs-item part="tabs-item tab" tabindex="-1"> </nve-tabs-item>${this.closable ? V`<nve-icon-button slot="suffix" part="icon-button close-button" icon-name="cancel" container="flat" size="sm" tabindex="-1"></nve-icon-button>` : null}</nve-tabs-item-group></nve-tabs>${e ? V`<nve-drag-handle part="drag-handle" draggable="false"></nve-drag-handle>` : null}${t ? V`<div class="group-actions"><nve-icon-button part="icon-button fullscreen-button" icon-name="maximize" container="flat" size="sm" tabindex="-1"></nve-icon-button></div>` : null}</div></div>`;
483
+ #ce() {
484
+ let { rearrangeable: e } = this.#S, t = this.fullscreenable || this.#d.some((e) => this.#l.isSelectedGroup(e.active));
485
+ return B`<div class="chrome" data-chrome inert aria-hidden="true"><div class="gap-probe"></div><div class="tab-min-probe"></div><div class="chrome-header"><nve-tabs part="tabs"><nve-tabs-item-group part="tabs-item-group" class="tab-entry tab-probe"><nve-tabs-item part="tabs-item tab" tabindex="-1"> </nve-tabs-item>${this.closable ? B`<nve-icon-button slot="suffix" part="icon-button close-button" icon-name="cancel" container="flat" size="sm" tabindex="-1"></nve-icon-button>` : null}</nve-tabs-item-group></nve-tabs>${e ? B`<nve-drag-handle part="drag-handle" draggable="false"></nve-drag-handle>` : null}${t ? B`<div class="group-actions"><nve-icon-button part="icon-button fullscreen-button" icon-name="maximize" container="flat" size="sm" tabindex="-1"></nve-icon-button></div>` : null}</div></div>`;
492
486
  }
493
487
  };
494
- t([W({
488
+ t([U({
495
489
  type: Object,
496
490
  attribute: !1
497
- })], Q.prototype, "i18n", void 0), t([W({
491
+ })], Z.prototype, "i18n", void 0), t([U({
498
492
  type: Boolean,
499
493
  reflect: !0
500
- })], Q.prototype, "resizable", void 0), t([W({
494
+ })], Z.prototype, "resizable", void 0), t([U({
501
495
  type: Boolean,
502
496
  reflect: !0
503
- })], Q.prototype, "rearrangeable", void 0), t([W({
497
+ })], Z.prototype, "rearrangeable", void 0), t([U({
504
498
  type: Boolean,
505
499
  reflect: !0
506
- })], Q.prototype, "groupable", void 0), t([W({
500
+ })], Z.prototype, "groupable", void 0), t([U({
507
501
  type: Boolean,
508
502
  reflect: !0
509
- })], Q.prototype, "fullscreenable", void 0), t([W({
503
+ })], Z.prototype, "fullscreenable", void 0), t([U({
510
504
  type: Number,
511
505
  attribute: "detach-threshold"
512
- })], Q.prototype, "detachThreshold", void 0), t([W({
506
+ })], Z.prototype, "detachThreshold", void 0), t([U({
513
507
  type: Boolean,
514
508
  reflect: !0
515
- })], Q.prototype, "closable", void 0), t([W({ attribute: "resize-policy" })], Q.prototype, "resizePolicy", void 0), t([W({ reflect: !0 })], Q.prototype, "container", void 0), t([W({ type: String })], Q.prototype, "value", null), Q = t([Y()], Q);
516
- export { Q as Workspace };
509
+ })], Z.prototype, "closable", void 0), t([U({ attribute: "resize-policy" })], Z.prototype, "resizePolicy", void 0), t([U({ reflect: !0 })], Z.prototype, "container", void 0), t([U({ type: String })], Z.prototype, "value", null), Z = t([J()], Z);
510
+ export { Z as Workspace };
517
511
 
518
512
  //# sourceMappingURL=workspace2.js.map