@nvidia-elements/core 2.22.5 → 2.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/accordion/accordion2.js +4 -4
  3. package/dist/alert/alert-group2.js +1 -1
  4. package/dist/alert/alert2.js +1 -1
  5. package/dist/avatar/avatar-group2.js +1 -1
  6. package/dist/avatar/avatar2.js +1 -1
  7. package/dist/badge/badge2.js +1 -1
  8. package/dist/breadcrumb/breadcrumb2.js +1 -1
  9. package/dist/bundle.d.ts +4 -0
  10. package/dist/bundles/index.d.ts +357 -1
  11. package/dist/bundles/index.js +14 -14
  12. package/dist/button/button2.js +1 -1
  13. package/dist/button-group/button-group2.js +1 -1
  14. package/dist/card/card2.js +4 -4
  15. package/dist/chat-message/chat-message2.js +1 -1
  16. package/dist/checkbox/checkbox-group2.js +1 -1
  17. package/dist/checkbox/checkbox2.js +1 -1
  18. package/dist/color/color2.js +6 -6
  19. package/dist/combobox/combobox2.js +1 -1
  20. package/dist/copy-button/copy-button2.js +1 -1
  21. package/dist/custom-elements-jsx.d.ts +189 -0
  22. package/dist/custom-elements-vue.d.ts +189 -0
  23. package/dist/custom-elements.json +6561 -339
  24. package/dist/data.html.json +133 -0
  25. package/dist/date/date2.js +6 -6
  26. package/dist/datetime/datetime2.js +6 -6
  27. package/dist/dialog/dialog-footer2.js +1 -1
  28. package/dist/dialog/dialog-header2.js +1 -1
  29. package/dist/dialog/dialog2.js +1 -1
  30. package/dist/divider/divider2.js +1 -1
  31. package/dist/dot/dot2.js +1 -1
  32. package/dist/drag-handle/drag-handle2.js +1 -1
  33. package/dist/drawer/drawer-content2.js +1 -1
  34. package/dist/drawer/drawer-footer2.js +1 -1
  35. package/dist/drawer/drawer-header2.js +1 -1
  36. package/dist/drawer/drawer2.js +1 -1
  37. package/dist/dropdown/dropdown-footer2.js +1 -1
  38. package/dist/dropdown/dropdown-header2.js +1 -1
  39. package/dist/dropdown/dropdown2.js +1 -1
  40. package/dist/dropdown-group/dropdown-group.js +1 -1
  41. package/dist/dropzone/dropzone2.js +1 -1
  42. package/dist/file/file2.js +1 -1
  43. package/dist/format-bytes/format-bytes2.js +1 -1
  44. package/dist/format-datetime/format-datetime2.js +1 -1
  45. package/dist/format-number/format-number2.js +1 -1
  46. package/dist/format-relative-time/format-relative-time2.js +1 -1
  47. package/dist/format-truncate/format-truncate2.js +1 -1
  48. package/dist/forms/control/control2.js +1 -1
  49. package/dist/forms/control-group/control-group2.js +1 -1
  50. package/dist/forms/control-message/control-message2.js +1 -1
  51. package/dist/forms/utils/layout.d.ts +0 -1
  52. package/dist/forms/utils/layout.js.map +1 -1
  53. package/dist/forms/utils/states.d.ts +0 -1
  54. package/dist/forms/utils/states.js.map +1 -1
  55. package/dist/gauge/gauge2.js +1 -1
  56. package/dist/ghost/define.d.ts +6 -0
  57. package/dist/ghost/define.js +6 -0
  58. package/dist/ghost/define.js.map +1 -0
  59. package/dist/ghost/ghost.d.ts +27 -0
  60. package/dist/ghost/ghost.examples.js +5 -0
  61. package/dist/ghost/ghost.examples.js.map +1 -0
  62. package/dist/ghost/ghost.examples.json +37 -0
  63. package/dist/ghost/ghost.js +5 -0
  64. package/dist/ghost/ghost.js.map +1 -0
  65. package/dist/ghost/ghost2.js +28 -0
  66. package/dist/ghost/ghost2.js.map +1 -0
  67. package/dist/ghost/index.d.ts +1 -0
  68. package/dist/ghost/index.js +1 -0
  69. package/dist/grid/cell/cell2.js +1 -1
  70. package/dist/grid/column/column2.js +1 -1
  71. package/dist/grid/footer/footer2.js +1 -1
  72. package/dist/grid/grid2.js +1 -1
  73. package/dist/grid/header/header2.js +1 -1
  74. package/dist/grid/placeholder/placeholder2.js +1 -1
  75. package/dist/grid/row/row2.js +1 -1
  76. package/dist/icon/icon2.js +2 -2
  77. package/dist/icon-button/icon-button2.js +1 -1
  78. package/dist/iframe/iframe2.js +1 -1
  79. package/dist/index.d.ts +4 -0
  80. package/dist/index.js +1 -1
  81. package/dist/index.js.map +1 -1
  82. package/dist/input/input-group2.js +1 -1
  83. package/dist/input/input2.js +1 -1
  84. package/dist/internal/controllers/keynav-spatial.controller.d.ts +0 -1
  85. package/dist/internal/controllers/keynav-spatial.controller.js.map +1 -1
  86. package/dist/internal/controllers/type-native-popover.utils.d.ts +0 -1
  87. package/dist/internal/controllers/type-native-popover.utils.js.map +1 -1
  88. package/dist/internal/index.d.ts +0 -1
  89. package/dist/internal/index.js +116 -128
  90. package/dist/internal/index.js.map +1 -1
  91. package/dist/internal/types/index.d.ts +37 -3
  92. package/dist/internal/types/index.js.map +1 -1
  93. package/dist/internal/utils/audit-logs.d.ts +0 -1
  94. package/dist/internal/utils/audit-logs.js.map +1 -1
  95. package/dist/internal/utils/dom.d.ts +0 -5
  96. package/dist/internal/utils/dom.js +30 -46
  97. package/dist/internal/utils/dom.js.map +1 -1
  98. package/dist/internal/utils/events.d.ts +0 -1
  99. package/dist/internal/utils/events.js +4 -7
  100. package/dist/internal/utils/events.js.map +1 -1
  101. package/dist/internal/utils/keynav.d.ts +0 -1
  102. package/dist/internal/utils/keynav.js +2 -5
  103. package/dist/internal/utils/keynav.js.map +1 -1
  104. package/dist/internal/utils/objects.d.ts +0 -2
  105. package/dist/internal/utils/objects.js +2 -8
  106. package/dist/internal/utils/objects.js.map +1 -1
  107. package/dist/joystick/joystick2.js +5 -5
  108. package/dist/logo/logo2.js +1 -1
  109. package/dist/menu/menu-group2.js +1 -1
  110. package/dist/menu/menu-item2.js +1 -1
  111. package/dist/menu/menu2.js +1 -1
  112. package/dist/month/month2.js +6 -6
  113. package/dist/notification/notification-group2.js +1 -1
  114. package/dist/notification/notification2.js +1 -1
  115. package/dist/page/page-panel/page-panel-content2.js +1 -1
  116. package/dist/page/page-panel/page-panel-footer2.js +1 -1
  117. package/dist/page/page-panel/page-panel-header2.js +1 -1
  118. package/dist/page/page-panel/page-panel2.js +1 -1
  119. package/dist/page/page2.js +1 -1
  120. package/dist/page-header/page-header2.js +1 -1
  121. package/dist/page-loader/page-loader2.js +1 -1
  122. package/dist/pagination/pagination2.js +1 -1
  123. package/dist/panel/panel2.js +4 -4
  124. package/dist/password/password2.js +6 -6
  125. package/dist/preferences-input/preferences-input2.js +5 -5
  126. package/dist/progress-bar/progress-bar2.js +1 -1
  127. package/dist/progress-dot/progress-dot2.js +1 -1
  128. package/dist/progress-ring/progress-ring2.js +1 -1
  129. package/dist/progressive-filter-chip/progressive-filter-chip2.js +1 -1
  130. package/dist/pulse/pulse2.js +1 -1
  131. package/dist/radio/radio-group2.js +1 -1
  132. package/dist/radio/radio2.js +1 -1
  133. package/dist/range/range2.js +1 -1
  134. package/dist/resize-handle/resize-handle2.js +5 -5
  135. package/dist/search/search2.js +6 -6
  136. package/dist/select/select2.js +1 -1
  137. package/dist/skeleton/skeleton2.js +1 -1
  138. package/dist/sort-button/sort-button2.js +1 -1
  139. package/dist/sparkline/sparkline2.js +1 -1
  140. package/dist/star-rating/star-rating2.js +1 -1
  141. package/dist/steps/steps2.js +6 -6
  142. package/dist/switch/switch-group2.js +1 -1
  143. package/dist/switch/switch2.js +1 -1
  144. package/dist/tabs/tabs-group2.js +1 -1
  145. package/dist/tabs/tabs-item-group2.js +1 -1
  146. package/dist/tabs/tabs2.js +2 -2
  147. package/dist/tag/tag2.js +5 -5
  148. package/dist/textarea/textarea2.js +1 -1
  149. package/dist/time/time2.js +6 -6
  150. package/dist/toast/toast2.js +1 -1
  151. package/dist/toggletip/toggletip-footer2.js +1 -1
  152. package/dist/toggletip/toggletip-header2.js +1 -1
  153. package/dist/toggletip/toggletip2.js +1 -1
  154. package/dist/toolbar/toolbar2.js +1 -1
  155. package/dist/tooltip/tooltip2.js +1 -1
  156. package/dist/tree/tree-node2.js +1 -1
  157. package/dist/tree/tree2.js +1 -1
  158. package/dist/week/week2.js +6 -6
  159. package/dist/workspace/controllers/workspace-command.controller.d.ts +34 -0
  160. package/dist/workspace/controllers/workspace-command.controller.js +87 -0
  161. package/dist/workspace/controllers/workspace-command.controller.js.map +1 -0
  162. package/dist/workspace/controllers/workspace-composition.controller.d.ts +54 -0
  163. package/dist/workspace/controllers/workspace-composition.controller.js +169 -0
  164. package/dist/workspace/controllers/workspace-composition.controller.js.map +1 -0
  165. package/dist/workspace/controllers/workspace-fullscreen.controller.d.ts +25 -0
  166. package/dist/workspace/controllers/workspace-fullscreen.controller.js +84 -0
  167. package/dist/workspace/controllers/workspace-fullscreen.controller.js.map +1 -0
  168. package/dist/workspace/controllers/workspace-measurement.controller.d.ts +19 -0
  169. package/dist/workspace/controllers/workspace-measurement.controller.js +188 -0
  170. package/dist/workspace/controllers/workspace-measurement.controller.js.map +1 -0
  171. package/dist/workspace/controllers/workspace-rearrange.controller.d.ts +40 -0
  172. package/dist/workspace/controllers/workspace-rearrange.controller.js +385 -0
  173. package/dist/workspace/controllers/workspace-rearrange.controller.js.map +1 -0
  174. package/dist/workspace/controllers/workspace-resize.controller.d.ts +43 -0
  175. package/dist/workspace/controllers/workspace-resize.controller.js +168 -0
  176. package/dist/workspace/controllers/workspace-resize.controller.js.map +1 -0
  177. package/dist/workspace/controllers/workspace-restoration.controller.d.ts +24 -0
  178. package/dist/workspace/controllers/workspace-restoration.controller.js +193 -0
  179. package/dist/workspace/controllers/workspace-restoration.controller.js.map +1 -0
  180. package/dist/workspace/define.d.ts +10 -0
  181. package/dist/workspace/define.js +9 -0
  182. package/dist/workspace/define.js.map +1 -0
  183. package/dist/workspace/index.d.ts +11 -0
  184. package/dist/workspace/index.js +6 -0
  185. package/dist/workspace/panel/panel.d.ts +48 -0
  186. package/dist/workspace/panel/panel.js +5 -0
  187. package/dist/workspace/panel/panel.js.map +1 -0
  188. package/dist/workspace/panel/panel2.js +53 -0
  189. package/dist/workspace/panel/panel2.js.map +1 -0
  190. package/dist/workspace/panel-content/panel-content.d.ts +20 -0
  191. package/dist/workspace/panel-content/panel-content.js +5 -0
  192. package/dist/workspace/panel-content/panel-content.js.map +1 -0
  193. package/dist/workspace/panel-content/panel-content2.js +22 -0
  194. package/dist/workspace/panel-content/panel-content2.js.map +1 -0
  195. package/dist/workspace/panel-footer/panel-footer.d.ts +24 -0
  196. package/dist/workspace/panel-footer/panel-footer.js +5 -0
  197. package/dist/workspace/panel-footer/panel-footer.js.map +1 -0
  198. package/dist/workspace/panel-footer/panel-footer2.js +28 -0
  199. package/dist/workspace/panel-footer/panel-footer2.js.map +1 -0
  200. package/dist/workspace/panel-header/panel-header.d.ts +61 -0
  201. package/dist/workspace/panel-header/panel-header.js +5 -0
  202. package/dist/workspace/panel-header/panel-header.js.map +1 -0
  203. package/dist/workspace/panel-header/panel-header2.js +102 -0
  204. package/dist/workspace/panel-header/panel-header2.js.map +1 -0
  205. package/dist/workspace/utils/evaluation.utils.d.ts +83 -0
  206. package/dist/workspace/utils/evaluation.utils.js +294 -0
  207. package/dist/workspace/utils/evaluation.utils.js.map +1 -0
  208. package/dist/workspace/utils/geometry/allocation.utils.d.ts +40 -0
  209. package/dist/workspace/utils/geometry/allocation.utils.js +73 -0
  210. package/dist/workspace/utils/geometry/allocation.utils.js.map +1 -0
  211. package/dist/workspace/utils/geometry/partition.utils.d.ts +10 -0
  212. package/dist/workspace/utils/geometry/partition.utils.js +40 -0
  213. package/dist/workspace/utils/geometry/partition.utils.js.map +1 -0
  214. package/dist/workspace/utils/geometry/sizing.utils.d.ts +35 -0
  215. package/dist/workspace/utils/geometry/sizing.utils.js +42 -0
  216. package/dist/workspace/utils/geometry/sizing.utils.js.map +1 -0
  217. package/dist/workspace/utils/interaction/boundary.utils.d.ts +40 -0
  218. package/dist/workspace/utils/interaction/boundary.utils.js +91 -0
  219. package/dist/workspace/utils/interaction/boundary.utils.js.map +1 -0
  220. package/dist/workspace/utils/interaction/command.utils.d.ts +74 -0
  221. package/dist/workspace/utils/interaction/command.utils.js +189 -0
  222. package/dist/workspace/utils/interaction/command.utils.js.map +1 -0
  223. package/dist/workspace/utils/interaction/drag-preview.utils.d.ts +79 -0
  224. package/dist/workspace/utils/interaction/drag-preview.utils.js +16 -0
  225. package/dist/workspace/utils/interaction/drag-preview.utils.js.map +1 -0
  226. package/dist/workspace/utils/interaction/insertion-offers.utils.d.ts +58 -0
  227. package/dist/workspace/utils/interaction/insertion-offers.utils.js +259 -0
  228. package/dist/workspace/utils/interaction/insertion-offers.utils.js.map +1 -0
  229. package/dist/workspace/utils/interaction/placement-decision.utils.d.ts +55 -0
  230. package/dist/workspace/utils/interaction/placement-decision.utils.js +242 -0
  231. package/dist/workspace/utils/interaction/placement-decision.utils.js.map +1 -0
  232. package/dist/workspace/utils/interaction/resize-input.utils.d.ts +1 -0
  233. package/dist/workspace/utils/interaction/resize-input.utils.js +17 -0
  234. package/dist/workspace/utils/interaction/resize-input.utils.js.map +1 -0
  235. package/dist/workspace/utils/model/layout.utils.d.ts +22 -0
  236. package/dist/workspace/utils/model/layout.utils.js +41 -0
  237. package/dist/workspace/utils/model/layout.utils.js.map +1 -0
  238. package/dist/workspace/utils/model/membership.utils.d.ts +14 -0
  239. package/dist/workspace/utils/model/membership.utils.js +17 -0
  240. package/dist/workspace/utils/model/membership.utils.js.map +1 -0
  241. package/dist/workspace/utils/model/operations.utils.d.ts +31 -0
  242. package/dist/workspace/utils/model/operations.utils.js +178 -0
  243. package/dist/workspace/utils/model/operations.utils.js.map +1 -0
  244. package/dist/workspace/utils/model/projection.utils.d.ts +7 -0
  245. package/dist/workspace/utils/model/projection.utils.js +87 -0
  246. package/dist/workspace/utils/model/projection.utils.js.map +1 -0
  247. package/dist/workspace/utils/model/value.utils.d.ts +5 -0
  248. package/dist/workspace/utils/model/value.utils.js +68 -0
  249. package/dist/workspace/utils/model/value.utils.js.map +1 -0
  250. package/dist/workspace/utils/placement/acquisition-sizing.utils.d.ts +32 -0
  251. package/dist/workspace/utils/placement/acquisition-sizing.utils.js +152 -0
  252. package/dist/workspace/utils/placement/acquisition-sizing.utils.js.map +1 -0
  253. package/dist/workspace/utils/placement/context.utils.d.ts +36 -0
  254. package/dist/workspace/utils/placement/context.utils.js +135 -0
  255. package/dist/workspace/utils/placement/context.utils.js.map +1 -0
  256. package/dist/workspace/utils/placement/group-insertion.utils.d.ts +26 -0
  257. package/dist/workspace/utils/placement/group-insertion.utils.js +171 -0
  258. package/dist/workspace/utils/placement/group-insertion.utils.js.map +1 -0
  259. package/dist/workspace/utils/placement/origin.utils.d.ts +13 -0
  260. package/dist/workspace/utils/placement/origin.utils.js +49 -0
  261. package/dist/workspace/utils/placement/origin.utils.js.map +1 -0
  262. package/dist/workspace/utils/placement/planner.utils.d.ts +22 -0
  263. package/dist/workspace/utils/placement/planner.utils.js +184 -0
  264. package/dist/workspace/utils/placement/planner.utils.js.map +1 -0
  265. package/dist/workspace/utils/placement/preparation.utils.d.ts +28 -0
  266. package/dist/workspace/utils/placement/preparation.utils.js +140 -0
  267. package/dist/workspace/utils/placement/preparation.utils.js.map +1 -0
  268. package/dist/workspace/utils/placement/region.utils.d.ts +15 -0
  269. package/dist/workspace/utils/placement/region.utils.js +111 -0
  270. package/dist/workspace/utils/placement/region.utils.js.map +1 -0
  271. package/dist/workspace/utils/placement/split-sizing.utils.d.ts +18 -0
  272. package/dist/workspace/utils/placement/split-sizing.utils.js +108 -0
  273. package/dist/workspace/utils/placement/split-sizing.utils.js.map +1 -0
  274. package/dist/workspace/utils/presentation/composition.utils.d.ts +17 -0
  275. package/dist/workspace/utils/presentation/composition.utils.js +95 -0
  276. package/dist/workspace/utils/presentation/composition.utils.js.map +1 -0
  277. package/dist/workspace/utils/presentation/groups.utils.d.ts +91 -0
  278. package/dist/workspace/utils/presentation/groups.utils.js +169 -0
  279. package/dist/workspace/utils/presentation/groups.utils.js.map +1 -0
  280. package/dist/workspace/utils/presentation/header-configuration.utils.d.ts +11 -0
  281. package/dist/workspace/utils/presentation/header-configuration.utils.js +7 -0
  282. package/dist/workspace/utils/presentation/header-configuration.utils.js.map +1 -0
  283. package/dist/workspace/utils/presentation/measurements.utils.d.ts +21 -0
  284. package/dist/workspace/utils/presentation/measurements.utils.js +28 -0
  285. package/dist/workspace/utils/presentation/measurements.utils.js.map +1 -0
  286. package/dist/workspace/utils/presentation/offers.utils.d.ts +43 -0
  287. package/dist/workspace/utils/presentation/offers.utils.js +137 -0
  288. package/dist/workspace/utils/presentation/offers.utils.js.map +1 -0
  289. package/dist/workspace/utils/presentation/preview.utils.d.ts +6 -0
  290. package/dist/workspace/utils/presentation/preview.utils.js +36 -0
  291. package/dist/workspace/utils/presentation/preview.utils.js.map +1 -0
  292. package/dist/workspace/workspace.d.ts +103 -0
  293. package/dist/workspace/workspace.examples.js +5 -0
  294. package/dist/workspace/workspace.examples.js.map +1 -0
  295. package/dist/workspace/workspace.examples.json +133 -0
  296. package/dist/workspace/workspace.js +5 -0
  297. package/dist/workspace/workspace.js.map +1 -0
  298. package/dist/workspace/workspace.types.d.ts +3 -0
  299. package/dist/workspace/workspace2.js +518 -0
  300. package/dist/workspace/workspace2.js.map +1 -0
  301. package/package.json +27 -3
  302. package/dist/internal/utils/supports.d.ts +0 -3
  303. package/dist/internal/utils/supports.js +0 -13
  304. package/dist/internal/utils/supports.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace2.js","names":["styles","_decorate","__decorate","workspace_default","i18nDefaults","Workspace","LitElement","_args","#i18nController","I18nController","#value","#restoring","#restoration","WorkspaceRestorationController","#layout","#restore","layout","#composition","#commands","WorkspaceCommandController","#panels","#fullscreen","#getPlacementLayout","source","intent","targetPanelId","#activatePanel","anchor","operation","#close","#move","WorkspaceFullscreenController","findGroup","#getProjectedLayout","#currentLayout","#rearrange","#resize","#measurementController","WorkspaceRearrangeController","#withEvaluation","work","#measurements","#available","#activateSource","group","#dragPreview","preview","#placementCapabilities","#presentedGroups","#boundaries","#latestMeasurements","WorkspaceResizeController","#canResize","#commitResize","WorkspaceMeasurementController","#isCarried","id","panel","#applyMeasurements","change","WorkspaceCompositionController","#evaluationDelegate","useStyles","DragHandle","Ghost","Icon","IconButton","ResizeHandle","Tabs","TabsItem","TabsItemGroup","next","parseWorkspaceValue","value","#contentObserver","#observeContent","records","changed","key","#reconcile","options","command","context","#evaluation","isServer","matchesElementName","child","WorkspacePanel","#presentationClosable","#showResizeHandles","catalogue","record","labels","isWorkspaceCompositionMutation","ids","#setLayout","reconcilePanels","#commit","serializeWorkspaceValue","old","sameSerializedWorkspaceLayout","#focusPanel","opened","openPanel","selectPanel","capabilities","#focusPlacement","closePanel","recoverFocus","shouldFocusAfterWorkspaceClose","item","WorkspaceEvaluation","projectLayout","getAdmissiblePlacementLayout","carried","active","front","getPanelLabel","#renderWorkspace","evaluation","drag","geometry","preserveRecipientSelection","#renderDragPreview","ifDefined","repeat","#renderTabs","#renderResizeHandles","#renderMeasurementProbe","#getCarriedPreviewContent","currentLayout","catalog","contexts","allocateContextProxies","bounds","hint","destination","rect","x","y","point","#renderPlacementHint","getContextKey","getRegionCornerStyle","allocation","kind","shouldEmphasizeReservedDestination","#renderSeamBadges","#renderCarriedPreview","edges","vertical","edge","normal","position","rotation","#renderSplitSeamBadge","#renderInsertSeamBadge","input","right","bottom","px","py","layers","title","measurements","#retainsPreviewSpace","fullscreenSelected","fullscreen","actionWidth","headerHeight","#renderGroupGrip","#renderTabStrip","#renderFullscreenControl","event","width","getAllocatedTabWidth","suffixWidth","#renderTabTrack","entries","#renderTabEntry","index","#selectTab","style","styleMap","close","disabled","selected","#renderHandle","fullscreenable","rearrangeable","property","scopedRegistry"],"sources":["../../src/workspace/workspace.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, type PropertyValues, svg } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { repeat } from 'lit/directives/repeat.js';\nimport { styleMap } from 'lit/directives/style-map.js';\n\nimport { matchesElementName, type Point, type Rect, scopedRegistry, useStyles } from '@nvidia-elements/core/internal';\nimport { I18nController, type I18nDefaults } from '@nvidia-elements/foundations/internal/i18n';\n\nimport { DragHandle } from '@nvidia-elements/core/drag-handle';\nimport { Ghost } from '@nvidia-elements/core/ghost';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport { ResizeHandle } from '@nvidia-elements/core/resize-handle';\nimport { Tabs, TabsItem, TabsItemGroup } from '@nvidia-elements/core/tabs';\n\nimport { WorkspaceCommandController } from './controllers/workspace-command.controller.js';\nimport { WorkspaceCompositionController } from './controllers/workspace-composition.controller.js';\nimport { WorkspaceFullscreenController } from './controllers/workspace-fullscreen.controller.js';\nimport { WorkspaceMeasurementController } from './controllers/workspace-measurement.controller.js';\nimport { WorkspaceRearrangeController } from './controllers/workspace-rearrange.controller.js';\nimport { WorkspaceResizeController } from './controllers/workspace-resize.controller.js';\nimport { WorkspaceRestorationController } from './controllers/workspace-restoration.controller.js';\nimport {\n closePanel,\n findGroup,\n openPanel,\n projectLayout,\n reconcilePanels,\n selectPanel\n} from './utils/model/operations.utils.js';\nimport {\n parseWorkspaceValue,\n sameSerializedWorkspaceLayout,\n serializeWorkspaceValue\n} from './utils/model/value.utils.js';\nimport { allocateContextProxies, getContextKey } from './utils/placement/context.utils.js';\nimport { getAdmissiblePlacementLayout } from './utils/placement/preparation.utils.js';\nimport {\n focusWorkspacePanel,\n getPanelLabel,\n isWorkspaceCompositionMutation,\n shouldFocusAfterWorkspaceClose\n} from './utils/presentation/composition.utils.js';\nimport { getAllocatedTabWidth, preserveRecipientSelection } from './utils/presentation/groups.utils.js';\nimport { getRegionCornerStyle, shouldEmphasizeReservedDestination } from './utils/presentation/preview.utils.js';\nimport { WorkspaceEvaluation } from './utils/evaluation.utils.js';\n\nimport { WorkspacePanel } from './panel/panel.js';\n\nimport type { WorkspaceRearrangeCapabilities } from './controllers/workspace-rearrange.controller.js';\nimport type { WorkspaceBoundary, WorkspacePlacedRegion } from './utils/geometry/allocation.utils.js';\nimport type { WorkspaceCommandContext, WorkspacePlacementIntent } from './utils/interaction/command.utils.js';\nimport type { WorkspaceDragPreview } from './utils/interaction/drag-preview.utils.js';\nimport type { WorkspaceInsertionOffer } from './utils/interaction/insertion-offers.utils.js';\nimport type { WorkspaceLayout } from './utils/model/layout.utils.js';\nimport type { WorkspacePresentedGroup } from './utils/presentation/groups.utils.js';\nimport type { WorkspaceMeasurementChange, WorkspaceMeasurements } from './utils/presentation/measurements.utils.js';\nimport type { WorkspaceEvaluationDelegate } from './utils/evaluation.utils.js';\n\nimport type { WorkspaceAnimationOptions } from './workspace.types.js';\n\nimport styles from './workspace.css?inline';\n\nconst i18nDefaults = {\n close: 'close',\n move: 'move',\n enterFullscreen: 'enter full screen',\n exitFullscreen: 'exit full screen'\n} satisfies I18nDefaults;\n\n/**\n * @element nve-workspace\n * @description A workspace provides a malleable arrangement of application panels in a restorable layout.\n * @documentation https://nvidia.github.io/elements/docs/elements/workspace/\n * @since 0.0.0\n * @stable false\n * @entrypoint \\@nvidia-elements/core/workspace\n * @command --enter-fullscreen - Present the invoking panel's group in native fullscreen.\n * @command --exit-fullscreen - Exit native fullscreen.\n * @command --toggle-fullscreen - Toggle native fullscreen for the invoking panel's group.\n * @command --open - Open and activate the targeted supplied panel. Repeated activation is silent.\n * @command --close - Close the targeted panel when its workspace is closable.\n * @command --select - Activate an open supplied panel without reopening a closed panel.\n * @command --place - Apply the invoker's typed placement request when rearrangeable; membership changes also require groupable.\n * @slot - Workspace panels with durable IDs and application dropdown groups.\n * @event change - Announces a committed arrangement value after interaction, commands, or reconciliation of newly supplied panels. Read value on the workspace.\n * @event commandavailabilitychange - Command availability may have changed; query relevant commands again.\n * @cssprop --gap - Space between groups as one nonnegative CSS length.\n * @cssprop --border-radius - Corner radius of contained groups.\n * @cssprop --tab-min-width - Smallest tab width before scrolling.\n * @cssprop --tab-border - Border between tabs, after the drag handle, and before group controls without an authored suffix.\n * @cssprop --header-control-size - Size of built-in header buttons and the base drag handle width.\n * @cssprop --header-control-inset - Horizontal spacing around fullscreen and the drag handle.\n * @cssprop --close-button-inset - Space after each panel close control.\n * @cssprop --animation-duration - Duration of coordinated layout and placement transitions.\n * @cssprop --animation-easing - Easing of coordinated layout and placement transitions.\n * @cssprop --gutter-background - Idle separator fill.\n * @cssprop --gutter-hover-background - Separator fill on hover.\n * @csspart tabs - Tab strips.\n * @csspart tabs-item - Panel selection controls.\n * @csspart tab - Alias for panel selection controls.\n * @csspart tabs-item-group - Tab and accessory layouts.\n * @csspart icon-button - Built-in header icon controls.\n * @csspart fullscreen-button - Group fullscreen control.\n * @csspart close-button - Panel closing controls.\n * @csspart resize-handle - Separator control.\n * @csspart ghost - Destination and carried previews.\n * @csspart destination-ghost - Animated insertion cue.\n * @csspart carried-ghost - Pointer-following carried panel previews.\n * @csspart icon - Placement status icons.\n * @csspart blocked-icon - Unavailable placement indicator.\n * @csspart drag-handle - Group movement control.\n */\n@scopedRegistry()\nexport class Workspace extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-workspace',\n version: '0.0.0',\n children: ['nve-workspace-panel', 'nve-dropdown-group']\n };\n\n static elementDefinitions = {\n [DragHandle.metadata.tag]: DragHandle,\n [Ghost.metadata.tag]: Ghost,\n [Icon.metadata.tag]: Icon,\n [IconButton.metadata.tag]: IconButton,\n [ResizeHandle.metadata.tag]: ResizeHandle,\n [Tabs.metadata.tag]: Tabs,\n [TabsItem.metadata.tag]: TabsItem,\n [TabsItemGroup.metadata.tag]: TabsItemGroup\n };\n\n readonly #i18nController: I18nController<this> = new I18nController<this>(this, i18nDefaults);\n\n /** Overrides localized workspace controls. */\n @property({ type: Object, attribute: false }) i18n = this.#i18nController.i18n;\n\n /** Enables separator resizing. */\n @property({ type: Boolean, reflect: true }) resizable = false;\n\n /** Enables moving groups and placement commands. Dragging individual tabs also requires groupable. */\n @property({ type: Boolean, reflect: true }) rearrangeable = false;\n\n /** Enables dragging individual tabs, joining panels, and extracting panels when rearrangeable. */\n @property({ type: Boolean, reflect: true }) groupable = false;\n\n /** Enables native fullscreen commands and one persistent control per group. Turning this off preserves an accepted session and its exit control. Fullscreen does not change the saved arrangement. */\n @property({ type: Boolean, reflect: true }) fullscreenable = false;\n\n /** Radial pointer distance in CSS pixels before a carried source detaches. Captured at gesture press. */\n @property({ type: Number, attribute: 'detach-threshold' }) detachThreshold = 48;\n\n /** Enables closing supplied panels. */\n @property({ type: Boolean, reflect: true }) closable = false;\n\n /** Selects separator constraint behavior. */\n @property({ attribute: 'resize-policy' }) resizePolicy: 'stop' | 'propagate' = 'stop';\n\n /** Selects panel content framing. */\n @property({ reflect: true }) container?: 'inset' | 'flat' | 'full';\n\n /** Versioned JSON arrangement. Assignment restores without emitting change. */\n @property({ type: String })\n get value(): string {\n return this.#value;\n }\n\n set value(value: string) {\n const next = parseWorkspaceValue(value);\n this.#restoration.finish();\n this.#restore(next);\n }\n\n #layout?: WorkspaceLayout;\n #value = '';\n #restoring = false;\n #dragPreview?: WorkspaceDragPreview;\n\n readonly #restoration = new WorkspaceRestorationController(this, {\n getLayout: () => this.#layout,\n applyLayout: layout => this.#restore(layout),\n getTransitionTargets: () => this.#composition.getTransitionTargets()\n });\n\n readonly #commands = new WorkspaceCommandController(this, {\n getState: () => ({\n panels: this.#panels,\n layout: this.#layout\n }),\n isRearrangementAllowed: () => !this.#fullscreen.active,\n isPlacementAvailable: (source, intent) => !!this.#getPlacementLayout(source, intent),\n canEnterFullscreen: targetPanelId => this.#fullscreen.canEnter(targetPanelId),\n canExitFullscreen: () => this.#fullscreen.canExit,\n isFullscreenGroup: targetPanelId => this.#fullscreen.isSelectedGroup(targetPanelId),\n enterFullscreen: targetPanelId => this.#fullscreen.enter(targetPanelId),\n exitFullscreen: () => this.#fullscreen.exit(),\n activatePanel: (anchor, operation) => this.#activatePanel(anchor, operation),\n closePanel: anchor => this.#close(anchor),\n placePanel: (source, intent) => this.#move(source, intent)\n });\n\n readonly #fullscreen = new WorkspaceFullscreenController(this, {\n getGroup: targetPanelId =>\n findGroup(this.#getProjectedLayout(this.#currentLayout).root, targetPanelId)?.panels ?? [],\n cancelInteractions: () => {\n this.#restoration.finish();\n this.#rearrange.cancel();\n this.#resize.cancel();\n },\n invalidateCommandAvailability: () => {\n this.#commands.invalidateAvailability();\n this.#measurementController.invalidate();\n }\n });\n\n readonly #rearrange: WorkspaceRearrangeController = new WorkspaceRearrangeController(this, {\n evaluateWithContext: work => this.#withEvaluation(work),\n isRearrangementAllowed: () => !this.#fullscreen.active && !this.#restoration.active,\n getLayout: () => this.#layout,\n getMeasurements: () => this.#measurements,\n getAvailablePanels: () => this.#available,\n activateSource: (source, group) => this.#activateSource(source, group),\n applyPreview: preview => {\n this.#dragPreview = preview;\n this.requestUpdate();\n },\n commitPlacement: (source, intent, layout) =>\n this.#move(source, intent, { layout, capabilities: this.#placementCapabilities, focus: false })\n });\n\n #presentedGroups: WorkspacePresentedGroup[] = [];\n #boundaries: WorkspaceBoundary[] = [];\n\n #latestMeasurements: WorkspaceMeasurements = {\n gap: 0,\n headerHeight: 0,\n gripWidth: 0,\n actionWidth: 0,\n groupActionWidth: 0,\n tabWidth: 0,\n tabMinWidth: 0,\n width: 0,\n height: 0\n };\n\n readonly #resize: WorkspaceResizeController = new WorkspaceResizeController(this, {\n isEnabled: () => this.#canResize,\n getLayout: () => this.#layout,\n getBoundaries: () => this.#boundaries,\n getAvailablePanels: () => this.#available,\n getPresentation: () => ({\n measurements: this.#measurements,\n rearrangeable: this.#placementCapabilities.rearrangeable,\n closable: this.closable,\n fullscreenable: this.fullscreenable\n }),\n cancelForUser: () => this.#restoration.transition(() => this.#resize.cancel()),\n commitLayout: layout => this.#commitResize(layout)\n });\n\n readonly #measurementController = new WorkspaceMeasurementController(this, {\n getPanels: () => this.#panels,\n isPresented: id =>\n !this.#isCarried(id) && this.#presentedGroups.some(group => group.panels.some(panel => panel.id === id)),\n isCarried: id => !this.#layout?.closed.includes(id) && this.#isCarried(id),\n applyMeasurements: change => this.#applyMeasurements(change)\n });\n\n readonly #composition = new WorkspaceCompositionController(this, {\n getPanels: () => this.#panels,\n getGroups: () => this.#presentedGroups,\n getLayout: () => this.#layout,\n getPreview: () => this.#dragPreview,\n scrollChanged: () => this.#rearrange.refresh()\n });\n\n #contentObserver?: MutationObserver;\n #evaluation?: WorkspaceEvaluation;\n\n readonly #evaluationDelegate: WorkspaceEvaluationDelegate = {\n getCurrentLayout: () => this.#currentLayout,\n getCurrentMeasurements: () => this.#measurements,\n getCurrentPreview: () => this.#dragPreview,\n getFullscreenTarget: () => this.#fullscreen.targetPanelId,\n getResizePreview: () => this.#resize.preview\n };\n\n connectedCallback() {\n super.connectedCallback();\n this.#contentObserver = new MutationObserver(records => this.#observeContent(records));\n this.#contentObserver.observe(this, {\n childList: true,\n characterData: true,\n attributes: true,\n subtree: true,\n attributeFilter: ['id', 'min-width', 'min-height', 'slot']\n });\n }\n\n disconnectedCallback() {\n this.#rearrange.cancel();\n this.#contentObserver?.disconnect();\n super.disconnectedCallback();\n }\n\n protected willUpdate(changed: PropertyValues) {\n super.willUpdate(changed);\n this.#composition.captureFocus();\n\n if (\n ['value', 'fullscreenable', 'closable', 'rearrangeable', 'groupable', 'resizePolicy'].some(key =>\n changed.has(key)\n )\n ) {\n this.#commands.invalidateAvailability();\n }\n if (['fullscreenable', 'closable', 'rearrangeable', 'groupable'].some(key => changed.has(key))) {\n this.#measurementController.invalidate();\n }\n\n this.#reconcile();\n this.#restoring = false;\n }\n\n protected updated() {\n this.#composition.sync();\n this.#commands.flushAvailability();\n }\n\n /** Restores an arrangement with animated geometry while retaining application content. */\n animateTo(value: string, options: WorkspaceAnimationOptions = {}): void {\n const next = parseWorkspaceValue(value);\n this.#restoration.animateTo(next, options);\n }\n\n /** Reports whether a command can change the panel identified by `context.value` in the current arrangement. Native fullscreen admission remains subject to browser permission. */\n isCommandAvailable(command: string, context: WorkspaceCommandContext = {}): boolean {\n return this.#commands.isCommandAvailable(command, context);\n }\n\n get #currentLayout(): WorkspaceLayout {\n return this.#layout ?? { version: 1, root: null, closed: [] };\n }\n\n get #panels(): WorkspacePanel[] {\n if (this.#evaluation) return this.#evaluation.panels;\n return isServer\n ? []\n : [...this.children].filter((child): child is WorkspacePanel => matchesElementName(child, WorkspacePanel));\n }\n\n get #available() {\n return this.#evaluation?.available ?? this.#panels.map(panel => panel.id);\n }\n\n get #measurements(): WorkspaceMeasurements {\n return this.#resize.presentation?.measurements ?? this.#latestMeasurements;\n }\n\n get #placementCapabilities() {\n return this.#rearrange.capabilities ?? { rearrangeable: this.rearrangeable, groupable: this.groupable };\n }\n\n get #presentationClosable() {\n return this.#resize.presentation?.closable ?? this.closable;\n }\n\n get #canResize() {\n return this.resizable && !this.#fullscreen.active;\n }\n\n get #showResizeHandles() {\n return this.#canResize || this.#resize.retainingHandles;\n }\n\n #observeContent(records: MutationRecord[]) {\n const catalogue = records.some(\n record =>\n record.target === this ||\n (record.type === 'attributes' &&\n matchesElementName(record.target as Element, WorkspacePanel) &&\n record.target.parentElement === this)\n );\n const labels = records.some(record => isWorkspaceCompositionMutation(this, record));\n\n if (catalogue) {\n this.#restoration.finish();\n this.#commands.invalidateAvailability();\n this.#resize.cancel();\n this.#rearrange.cancel();\n }\n if (catalogue || labels) {\n this.#measurementController.invalidate();\n this.requestUpdate();\n }\n }\n\n #reconcile() {\n const ids = this.#available;\n if (!ids.every(Boolean) || new Set(ids).size !== ids.length) return;\n if (!this.#layout) {\n if (ids.length) {\n this.#setLayout({ version: 1, root: { type: 'group', panels: ids, active: ids[0]! }, closed: [] });\n }\n return;\n }\n const next = reconcilePanels(this.#layout, ids);\n if (next === this.#layout) return;\n this.#setLayout(next);\n if (!this.#restoring) {\n this.#commit();\n }\n }\n\n #applyMeasurements(change: WorkspaceMeasurementChange) {\n this.#latestMeasurements = change.measurements;\n this.#commands.invalidateAvailability();\n this.requestUpdate();\n this.#resize.handleMeasurementsChange(change);\n this.#restoration.handleMeasurementsChange(change);\n this.#rearrange.handleMeasurementsChange(change);\n }\n\n #setLayout(layout: WorkspaceLayout | undefined) {\n if (layout === this.#layout) {\n return;\n }\n const value = serializeWorkspaceValue(layout);\n this.#layout = layout;\n this.#value = value;\n }\n\n #restore(next: WorkspaceLayout | undefined) {\n this.#rearrange.cancel();\n const old = this.value;\n this.#resize.resetForRestore();\n this.#setLayout(next);\n this.#restoring = true;\n this.requestUpdate('value', old);\n }\n\n #commit() {\n this.#commands.invalidateAvailability();\n this.dispatchEvent(new Event('change', { bubbles: true, composed: true }));\n }\n\n #commitResize(layout: WorkspaceLayout) {\n const changed = !sameSerializedWorkspaceLayout(this.#layout, layout);\n if (changed) {\n this.#setLayout(layout);\n this.#commit();\n } else {\n this.requestUpdate();\n }\n }\n\n #activateSource(source: string[], group: boolean) {\n if (group) return;\n\n const anchor = source.find(id => !this.#layout?.closed.includes(id) && this.#available.includes(id));\n if (!anchor || !this.shadowRoot?.querySelector(`nve-tabs-item[data-panel=\"${CSS.escape(anchor)}\"]`)) return;\n\n this.#activatePanel(anchor, 'select');\n this.#focusPanel(anchor);\n }\n\n #activatePanel(id: string, operation: 'open' | 'select') {\n this.#restoration.finish();\n if (!this.#layout || !this.#panels.some(panel => panel.id === id)) return;\n\n let opened = this.#layout;\n if (operation === 'open') {\n opened = openPanel(this.#layout, id) ?? this.#layout;\n }\n let next = selectPanel(opened, id);\n if (next === undefined && opened !== this.#layout) {\n next = opened;\n }\n if (!next) return;\n\n this.#rearrange.cancel();\n this.#resize.cancel();\n this.#setLayout(next);\n this.#commit();\n }\n\n #selectTab(id: string) {\n if (!this.#rearrange.suppressSelection) {\n this.#activatePanel(id, 'select');\n }\n }\n\n #move(\n source: string[],\n intent: WorkspacePlacementIntent,\n options: { layout?: WorkspaceLayout; capabilities?: WorkspaceRearrangeCapabilities; focus?: boolean } = {}\n ) {\n const capabilities = options.capabilities ?? { rearrangeable: this.rearrangeable, groupable: this.groupable };\n if (!capabilities.rearrangeable || this.#fullscreen.active) {\n return false;\n }\n\n const next = this.#getPlacementLayout(source, intent, {\n candidate: options.layout,\n groupable: capabilities.groupable\n });\n if (!next) {\n return false;\n }\n\n this.#restoration.finish();\n this.#rearrange.cancel();\n this.#resize.cancel();\n this.#setLayout(next);\n this.#commit();\n this.#focusPlacement(source, options);\n return true;\n }\n\n #close(id: string) {\n this.#restoration.finish();\n if (!this.closable || !this.#layout) return;\n const next = closePanel(this.#layout, id);\n if (!next) return;\n const recoverFocus = shouldFocusAfterWorkspaceClose(this, id);\n this.#rearrange.cancel();\n this.#resize.cancel();\n this.#setLayout(next);\n this.#commit();\n const group = this.#presentedGroups.find(item => item.panels.some(panel => panel.id === id));\n if (recoverFocus) {\n this.#focusPanel(group?.panels.find(panel => panel.id !== id)?.id);\n }\n }\n\n #focusPlacement(source: string[], options: { focus?: boolean }) {\n if (options.focus === false) return;\n this.#focusPanel(\n source.find(id => !this.#layout?.closed.includes(id) && this.#panels.some(panel => panel.id === id))\n );\n }\n\n #focusPanel(id?: string) {\n void focusWorkspacePanel(this, { id });\n }\n\n #withEvaluation<T>(work: (evaluation: WorkspaceEvaluation) => T): T {\n if (this.#evaluation) return work(this.#evaluation);\n this.#evaluation = new WorkspaceEvaluation(\n this,\n {\n panels: this.#panels,\n layout: this.#currentLayout,\n source: this.#dragPreview?.source ?? [],\n measurements: this.#measurements,\n policy: this.#resize.policy,\n strip: group => this.#composition.findTabStrip(group)\n },\n this.#evaluationDelegate\n );\n try {\n return work(this.#evaluation);\n } finally {\n this.#evaluation = undefined;\n }\n }\n\n #getProjectedLayout(layout: WorkspaceLayout) {\n if (this.#evaluation) return this.#evaluation.project(layout);\n return projectLayout(layout, this.#available);\n }\n\n #getPlacementLayout(\n source: string[],\n intent: WorkspacePlacementIntent,\n options: { candidate?: WorkspaceLayout; groupable?: boolean } = {}\n ) {\n if (!this.#layout) {\n return undefined;\n }\n return this.#withEvaluation(evaluation =>\n getAdmissiblePlacementLayout({\n evaluation,\n layout: this.#currentLayout,\n measurements: this.#measurements,\n source,\n intent,\n groupable: options.groupable ?? this.groupable,\n candidate: options.candidate\n })\n );\n }\n\n #getCarriedPreviewContent(source: string[]) {\n const carried = source.filter(\n id => !this.#layout?.closed.includes(id) && this.#panels.some(panel => panel.id === id)\n );\n const active = findGroup(this.#layout?.root ?? null, carried[0])?.active;\n const front = active && carried.includes(active) ? active : carried[0];\n return { title: front ? getPanelLabel(this.#panels, front) : '', layers: Math.min(carried.length, 3) };\n }\n\n #isCarried(id: string) {\n return this.#dragPreview?.source.includes(id) ?? false;\n }\n\n #retainsPreviewSpace(preview = this.#dragPreview) {\n return !!preview && 'allocation' in preview && preview.allocation !== 'overlay';\n }\n\n render() {\n return this.#withEvaluation(evaluation => this.#renderWorkspace(evaluation));\n }\n\n #renderWorkspace(evaluation: WorkspaceEvaluation) {\n const drag = this.#dragPreview;\n const geometry = evaluation.presentationGeometry();\n this.#presentedGroups = preserveRecipientSelection(\n geometry.groups,\n this.#layout?.root ?? null,\n this.#dragPreview?.source\n );\n this.#boundaries = geometry.boundaries;\n const preview = this.#renderDragPreview(geometry.regions, evaluation);\n this.#composition.applyPresentation({\n groups: this.#presentedGroups,\n extent: geometry,\n container: this.container,\n measurements: this.#measurements,\n closable: this.#presentationClosable,\n animate: !!drag,\n source: drag?.source ?? [],\n scroll: group => evaluation.scroll(group)\n });\n return html`\n <div\n internal-host\n ?data-resizing=${this.#resize.resizing}\n ?data-fullscreen=${this.#fullscreen.active}\n ?data-rearranging=${!!drag}\n data-preview-allocation=${ifDefined(drag && 'allocation' in drag ? drag.allocation : undefined)}\n style=${`--_minimum-height:${evaluation.minimum(evaluation.project(this.#currentLayout).root).height}px`}>\n <div class=\"viewport\" @scroll=${() => this.#rearrange.refresh()}>\n <div class=\"canvas\" style=${`min-width:${geometry.minimum.width}px;min-height:${geometry.minimum.height}px`}>\n ${repeat(\n this.#presentedGroups,\n group => this.#composition.getGroupIdentity(group),\n group => this.#renderTabs(group)\n )}\n <slot @slotchange=${() => this.requestUpdate()}></slot>\n ${this.#renderResizeHandles()}\n <div class=\"preview-layer\" data-drag-phase=${ifDefined(this.#dragPreview?.phase)}>${preview}</div>\n </div>\n </div>\n ${this.#renderMeasurementProbe()}\n </div>\n `;\n }\n\n #renderDragPreview(allocation: WorkspacePlacedRegion[], evaluation: WorkspaceEvaluation) {\n const preview = this.#dragPreview;\n if (!preview) return null;\n const { x, y } = evaluation.client({ x: 0, y: 0, width: 0, height: 0 });\n const { title, layers } = this.#getCarriedPreviewContent(preview.source);\n const currentLayout = this.#layout ?? { version: 1 as const, root: null, closed: [] };\n const catalog = evaluation.geometry(evaluation.project(currentLayout)).regions;\n const contexts = allocateContextProxies({ catalog, allocation, source: preview.source });\n const bounds = evaluation.bounds();\n const hint = this.#rearrange.getPreviewHint(preview, evaluation);\n const { rect, kind } = preview.cue;\n const destination = { ...rect, x: rect.x - x, y: rect.y - y };\n const point = preview.point;\n return html`\n ${this.#renderPlacementHint(hint, x, y)}${repeat(\n contexts,\n context => context.key,\n context => html`\n <div\n class=\"context-boundary\"\n data-context-boundary=${context.key}\n ?data-active=${preview.context && context.key === getContextKey(preview.context.members)}\n inert aria-hidden=\"true\"\n style=${`left:${context.rect.x}px;top:${context.rect.y}px;width:${context.rect.width}px;height:${context.rect.height}px;${getRegionCornerStyle(context.rect, allocation)}`}></div>\n `\n )}\n <nve-ghost\n class=\"destination\" part=\"ghost destination-ghost\" data-destination-ghost\n ?data-cue-clipped=${rect.width <= 0 || rect.height <= 0}\n data-drag-phase=${preview.phase}\n ?data-drop-blocked=${preview.blocked}\n data-destination-kind=${kind}\n ?data-reserved-placement=${shouldEmphasizeReservedDestination(preview)}\n style=${`transform:translate(${rect.x - x}px,${rect.y - y}px);width:${rect.width}px;height:${rect.height}px;${getRegionCornerStyle(destination, allocation)}`}>\n ${\n preview.blocked\n ? html`\n <nve-icon part=\"icon blocked-icon\" name=\"cancel\" status=\"danger\" size=\"lg\" aria-hidden=\"true\"></nve-icon>\n `\n : null\n }${this.#renderSeamBadges(preview)}\n </nve-ghost>\n ${point ? this.#renderCarriedPreview({ point, x, y, bounds, title, layers }) : null}\n `;\n }\n\n #renderPlacementHint(hint: WorkspaceInsertionOffer | undefined, x: number, y: number) {\n if (!hint) return null;\n\n return html`\n <div\n class=\"order-overlay\"\n data-order-slot=${hint.scope.index}\n data-placement-hint=${hint.kind}\n inert aria-hidden=\"true\"\n style=${`left:${hint.rect.x - x}px;top:${hint.rect.y - y}px;width:${hint.rect.width}px;height:${hint.rect.height}px`}></div>\n `;\n }\n\n #renderSeamBadges(preview: WorkspaceDragPreview | undefined) {\n if (!preview || preview.phase !== 'detached' || preview.blocked || !preview.seams) return null;\n const { kind, edges } = preview.seams;\n return html`\n ${edges.map(edge => {\n const vertical = edge.side === 'left' || edge.side === 'right';\n const normal =\n edge.side === 'left' || edge.side === 'top' ? `-${edge.offset}px` : `calc(100% + ${edge.offset}px)`;\n const position = vertical\n ? `left:${normal};top:${edge.fraction * 100}%`\n : `left:${edge.fraction * 100}%;top:${normal}`;\n const rotation = { right: 0, bottom: 90, left: 180, top: 270 }[edge.side];\n return html`\n <div\n class=\"seam-badge\"\n data-seam-badge=${kind}\n data-seam-side=${edge.side}\n inert aria-hidden=\"true\"\n style=${position}>\n <svg\n viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n style=${`transform:rotate(${rotation}deg)`}>\n ${kind === 'split' ? this.#renderSplitSeamBadge() : this.#renderInsertSeamBadge()}\n </svg>\n </div>\n `;\n })}\n `;\n }\n\n #renderSplitSeamBadge() {\n return svg`<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>`;\n }\n\n #renderInsertSeamBadge() {\n return svg`<rect x=\"2\" y=\"7\" width=\"7\" height=\"10\" rx=\"1\" fill=\"currentColor\" fill-opacity=\".2\"></rect><path d=\"M22 4h-9v16h9\"></path>`;\n }\n\n #renderCarriedPreview(input: { point: Point; x: number; y: number; bounds: Rect; title: string; layers: number }) {\n const { point, x, y, bounds, title, layers } = input;\n const right = bounds.x + bounds.width;\n const bottom = bounds.y + bounds.height;\n const px = Math.max(bounds.x, Math.min(point.x + 12, right));\n const py = Math.max(bounds.y, Math.min(point.y + 12, bottom));\n return html`\n <nve-ghost\n class=\"carried\" part=\"ghost carried-ghost\" data-carried-ghost .layers=${layers}\n style=${`left:${px - x}px;top:${py - y}px;width:max-content;max-width:${Math.max(0, Math.min(240, bounds.width))}px;max-height:${bounds.height}px;transform:translate(min(0px,calc(${right - px}px - 100%)),min(0px,calc(${bottom - py}px - 100%)))`}>${title}</nve-ghost>\n `;\n }\n\n #renderTabs(group: WorkspacePresentedGroup) {\n const measurements = this.#measurements;\n const { headerHeight } = measurements;\n const carried = this.#retainsPreviewSpace() && group.panels.every(panel => this.#isCarried(panel.id));\n const fullscreenSelected = this.#fullscreen.isSelectedGroup(group.active);\n const fullscreen = (this.#resize.presentation?.fullscreenable ?? this.fullscreenable) || fullscreenSelected;\n const actionWidth = fullscreen ? (measurements.groupActionWidth ?? 0) : 0;\n return html`\n <div\n class=\"group-chrome\"\n style=${`left:${group.rect.x}px;top:${group.rect.y}px;width:${group.rect.width}px;height:${group.rect.height}px`}>\n <div\n class=\"tabs\"\n ?data-carried-reservation=${carried}\n ?inert=${carried}\n aria-hidden=${ifDefined(carried ? 'true' : undefined)}\n style=${`height:${headerHeight}px`}>\n ${this.#renderGroupGrip(group)} ${this.#renderTabStrip(group, actionWidth)}\n ${fullscreen ? this.#renderFullscreenControl(group, fullscreenSelected) : null}\n </div>\n </div>\n `;\n }\n\n #renderGroupGrip(group: WorkspacePresentedGroup) {\n const rearrangeable =\n (this.#resize.presentation?.rearrangeable ?? this.#placementCapabilities.rearrangeable) &&\n !this.#fullscreen.active;\n return rearrangeable && group.gripWidth > 0\n ? html`\n <nve-drag-handle\n part=\"drag-handle\"\n data-drag-group=${group.panels[0]?.id ?? ''}\n draggable=\"false\"\n aria-label=${ifDefined(this.i18n.move)}\n @click=${(event: Event) => event.preventDefault()}></nve-drag-handle>\n `\n : null;\n }\n\n #renderTabStrip(group: WorkspacePresentedGroup, actionWidth: number) {\n const width = getAllocatedTabWidth(group, this.#measurements);\n const suffixWidth = this.#measurements.panels?.[group.active]?.suffixWidth ?? 0;\n return html`\n <div\n class=\"tablist\"\n ?data-scrollable=${group.panels.length > 1}\n style=${`width:${Math.max(0, group.rect.width - group.gripWidth - suffixWidth - actionWidth)}px;margin-right:${suffixWidth}px`}\n data-group=${this.#composition.getGroupIdentity(group)}\n @scroll=${(event: Event) => this.#composition.handleScroll(group, event)}>\n ${this.#renderTabTrack(group, width)}\n </div>\n `;\n }\n\n #renderTabTrack(group: WorkspacePresentedGroup, width: number) {\n const entries = repeat(\n group.panels,\n panel => panel.id,\n (panel, index) => this.#renderTabEntry(group, panel, { left: index * width, width })\n );\n return group.tabbed\n ? html`\n <nve-tabs\n part=\"tabs\" class=\"tab-track\"\n @nve-key-change=${(event: CustomEvent<{ activeItem: HTMLElement }>) => {\n const id = event.detail.activeItem.dataset.panel;\n if (id) {\n this.#selectTab(id);\n }\n }}\n style=${`width:${group.panels.length * width}px`}>\n ${entries}\n </nve-tabs>\n `\n : html`\n <div class=\"tab-track\" style=${`width:${group.panels.length * width}px`}>${entries}</div>\n `;\n }\n\n #renderTabEntry(group: WorkspacePresentedGroup, panel: WorkspacePanel, position: { left: number; width: number }) {\n const style = styleMap({\n left: `${position.left}px`,\n width: `${position.width}px`,\n '--height': `${this.#measurements.headerHeight}px`\n });\n const carried = this.#isCarried(panel.id);\n const title = panel.querySelector(':scope > nve-workspace-panel-header')\n ? null\n : html`<span class=\"fallback-title\">${panel.id}</span>`;\n const close = this.#presentationClosable\n ? html`\n <nve-icon-button\n slot=${ifDefined(group.tabbed ? 'suffix' : undefined)}\n part=\"icon-button close-button\" icon-name=\"cancel\" container=\"flat\" size=\"sm\"\n data-close=${panel.id}\n aria-label=${`${this.i18n.close} ${getPanelLabel(this.#panels, panel.id)}`}\n @click=${() => this.#close(panel.id)}></nve-icon-button>\n `\n : null;\n return group.tabbed\n ? html`\n <nve-tabs-item-group\n part=\"tabs-item-group\" class=\"tab-entry\"\n ?data-carried-tab=${carried} ?inert=${carried}\n aria-hidden=${ifDefined(carried ? 'true' : undefined)}\n style=${style}>\n <nve-tabs-item\n part=\"tabs-item tab\"\n data-panel=${panel.id}\n ?selected=${group.active === panel.id}\n aria-label=${panel.id}\n @pointerenter=${() => this.#composition.setHeaderHovered(panel.id, true)}\n @pointerleave=${() => this.#composition.setHeaderHovered(panel.id, false)}\n @click=${() => this.#selectTab(panel.id)}>${title}</nve-tabs-item>\n ${close}\n </nve-tabs-item-group>\n `\n : html`\n <div\n class=\"tab-entry panel-entry\"\n ?data-carried-tab=${carried} ?inert=${carried}\n aria-hidden=${ifDefined(carried ? 'true' : undefined)}\n style=${style}>\n <div class=\"panel-title\" data-panel=${panel.id} aria-hidden=\"true\">${title}</div>\n ${close}\n </div>\n `;\n }\n\n #renderFullscreenControl(group: WorkspacePresentedGroup, selected: boolean) {\n const suffixWidth = this.#measurements.panels?.[group.active]?.suffixWidth ?? 0;\n const disabled = !this.isCommandAvailable('--toggle-fullscreen', { value: group.active });\n return html`\n <div class=\"group-actions\" ?data-authored-suffix=${suffixWidth > 0}>\n <nve-icon-button\n part=\"icon-button fullscreen-button\"\n icon-name=${selected ? 'minimize' : 'maximize'}\n container=\"flat\" size=\"sm\" command=\"--toggle-fullscreen\"\n .commandForElement=${group.panels.find(panel => panel.id === group.active) ?? null}\n ?disabled=${disabled}\n aria-label=${ifDefined(selected ? this.i18n.exitFullscreen : this.i18n.enterFullscreen)}></nve-icon-button>\n </div>\n `;\n }\n\n #renderResizeHandles() {\n if (!this.#showResizeHandles) return null;\n\n return repeat(\n this.#boundaries,\n item => item.key,\n item => this.#renderHandle(item)\n );\n }\n\n #renderHandle(item: WorkspaceBoundary) {\n return html`\n <div\n class=\"gutter\"\n style=${`left:${item.rect.x}px;top:${item.rect.y}px;width:${item.rect.width}px;height:${item.rect.height}px`}>\n <nve-resize-handle\n data-boundary=${item.key}\n part=\"resize-handle\"\n orientation=${item.branch.axis === 'horizontal' ? 'vertical' : 'horizontal'}\n .min=${item.min}\n .max=${item.max}\n .step=${10}\n .value=${item.value}\n @nve-gesture-input=${this.#resize.gesture}\n @toggle=${(event: Event) => event.preventDefault()}\n @input=${(event: Event) => this.#resize.input(event, item)}\n @change=${(event: Event) => this.#resize.change(event, item)}></nve-resize-handle>\n </div>\n `;\n }\n\n #renderMeasurementProbe() {\n const { rearrangeable } = this.#placementCapabilities;\n const fullscreenable =\n this.fullscreenable || this.#presentedGroups.some(group => this.#fullscreen.isSelectedGroup(group.active));\n return html`\n <div class=\"chrome\" data-chrome inert aria-hidden=\"true\">\n <div class=\"gap-probe\"></div>\n <div class=\"tab-min-probe\"></div>\n <div class=\"chrome-header\">\n <nve-tabs part=\"tabs\">\n <nve-tabs-item-group part=\"tabs-item-group\" class=\"tab-entry tab-probe\">\n <nve-tabs-item part=\"tabs-item tab\" tabindex=\"-1\">&nbsp;</nve-tabs-item>\n ${\n this.closable\n ? html`\n <nve-icon-button\n slot=\"suffix\" part=\"icon-button close-button\" icon-name=\"cancel\" container=\"flat\" size=\"sm\"\n tabindex=\"-1\"></nve-icon-button>\n `\n : null\n }\n </nve-tabs-item-group>\n </nve-tabs>\n ${\n rearrangeable\n ? html`\n <nve-drag-handle part=\"drag-handle\" draggable=\"false\"></nve-drag-handle>\n `\n : null\n }${\n fullscreenable\n ? html`\n <div class=\"group-actions\">\n <nve-icon-button\n part=\"icon-button fullscreen-button\" icon-name=\"maximize\" container=\"flat\" size=\"sm\"\n tabindex=\"-1\"></nve-icon-button>\n </div>\n `\n : null\n }\n </div>\n </div>\n `;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEA,IAAMI,IAAe;CACnB,OAA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C,CAAA,GAAAzL,EAAA,WAAA,aAAA,KAAA,CAAA,GAGzCJ,EAAA,CAAA6L,EAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAAzL,EAAA,WAAA,kBAAA,KAAA,CAAA,GAGzCJ,EAAA,CAAA6L,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAmB,CAAC,CAAA,GAAAzL,EAAA,WAAA,mBAAA,KAAA,CAAA,GAGxDJ,EAAA,CAAA6L,EAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAAzL,EAAA,WAAA,YAAA,KAAA,CAAA,GAGzCJ,EAAA,CAAA6L,EAAS,EAAE,WAAW,gBAAgB,CAAC,CAAA,GAAAzL,EAAA,WAAA,gBAAA,KAAA,CAAA,GAGvCJ,EAAA,CAAA6L,EAAS,EAAE,SAAS,GAAK,CAAC,CAAA,GAAAzL,EAAA,WAAA,aAAA,KAAA,CAAA,GAG1BJ,EAAA,CAAA6L,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAAzL,EAAA,WAAA,SAAA,IAAA,GAnD3B,IAAAJ,EAAA,CAAA8L,EAAe,CAAA,GAAA1L,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nvidia-elements/core",
3
- "version": "2.22.5",
3
+ "version": "2.23.1",
4
4
  "release": {
5
5
  "extends": "../../release.config.js"
6
6
  },
@@ -457,6 +457,18 @@
457
457
  "types": "./dist/gauge/define.d.ts",
458
458
  "default": "./dist/gauge/define.js"
459
459
  },
460
+ "./ghost": {
461
+ "types": "./dist/ghost/index.d.ts",
462
+ "default": "./dist/ghost/index.js"
463
+ },
464
+ "./ghost/index.js": {
465
+ "types": "./dist/ghost/index.d.ts",
466
+ "default": "./dist/ghost/index.js"
467
+ },
468
+ "./ghost/define.js": {
469
+ "types": "./dist/ghost/define.d.ts",
470
+ "default": "./dist/ghost/define.js"
471
+ },
460
472
  "./grid": {
461
473
  "types": "./dist/grid/index.d.ts",
462
474
  "default": "./dist/grid/index.js"
@@ -984,6 +996,18 @@
984
996
  "./internal/index.js": {
985
997
  "types": "./dist/internal/index.d.ts",
986
998
  "default": "./dist/internal/index.js"
999
+ },
1000
+ "./workspace": {
1001
+ "types": "./dist/workspace/index.d.ts",
1002
+ "default": "./dist/workspace/index.js"
1003
+ },
1004
+ "./workspace/index.js": {
1005
+ "types": "./dist/workspace/index.d.ts",
1006
+ "default": "./dist/workspace/index.js"
1007
+ },
1008
+ "./workspace/define.js": {
1009
+ "types": "./dist/workspace/define.d.ts",
1010
+ "default": "./dist/workspace/define.js"
987
1011
  }
988
1012
  },
989
1013
  "typesVersions": {
@@ -1007,12 +1031,12 @@
1007
1031
  },
1008
1032
  "dependencies": {
1009
1033
  "@nvidia-elements/foundations": "^1.1.0",
1010
- "@nvidia-elements/forms": "^2.0.12",
1034
+ "@nvidia-elements/forms": "^2.0.13",
1011
1035
  "lit": "^3.3.3",
1012
1036
  "lit-html": "^3.3.3"
1013
1037
  },
1014
1038
  "peerDependencies": {
1015
- "@nvidia-elements/themes": "^2.0.1"
1039
+ "@nvidia-elements/themes": "^2.0.2"
1016
1040
  },
1017
1041
  "optionalDependencies": {
1018
1042
  "@lit-labs/scoped-registry-mixin": "^1.0.4",
@@ -1,3 +0,0 @@
1
- export declare function supportsNativeCSSAnchorPosition(): boolean;
2
- export declare function supportsCSSPositionArea(): boolean;
3
- export declare function supportsCSSLegacyInsetArea(): boolean;
@@ -1,13 +0,0 @@
1
- // src/internal/utils/supports.ts
2
- function e() {
3
- return globalThis.CSS?.supports?.("position-area", "top") || globalThis.CSS?.supports?.("inset-area", "top");
4
- }
5
- function t() {
6
- return globalThis.CSS?.supports?.("position-area", "top");
7
- }
8
- function n() {
9
- return globalThis.CSS?.supports?.("inset-area", "top");
10
- }
11
- export { n as supportsCSSLegacyInsetArea, t as supportsCSSPositionArea, e as supportsNativeCSSAnchorPosition };
12
-
13
- //# sourceMappingURL=supports.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"supports.js","names":["supportsNativeCSSAnchorPosition","supportsCSSPositionArea","supportsCSSLegacyInsetArea"],"sources":["../../../src/internal/utils/supports.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport function supportsNativeCSSAnchorPosition() {\n return globalThis.CSS?.supports?.('position-area', 'top') || globalThis.CSS?.supports?.('inset-area', 'top');\n}\n\nexport function supportsCSSPositionArea() {\n return globalThis.CSS?.supports?.('position-area', 'top');\n}\n\nexport function supportsCSSLegacyInsetArea() {\n return globalThis.CSS?.supports?.('inset-area', 'top');\n}\n"],"mappings":";AAGA,SAAgBA,IAAkC;CAChD,OAAO,WAAW,KAAK,WAAW,iBAAiB,KAAK,KAAK,WAAW,KAAK,WAAW,cAAc,KAAK;AAC7G;AAEA,SAAgBC,IAA0B;CACxC,OAAO,WAAW,KAAK,WAAW,iBAAiB,KAAK;AAC1D;AAEA,SAAgBC,IAA6B;CAC3C,OAAO,WAAW,KAAK,WAAW,cAAc,KAAK;AACvD"}