@atlaskit/navigation-system 11.7.3 → 11.7.5

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 (123) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/components/badge-container.js +1 -1
  3. package/dist/cjs/components/list-item.js +1 -1
  4. package/dist/cjs/components/list.js +1 -1
  5. package/dist/cjs/components/skip-links/skip-link.js +1 -1
  6. package/dist/cjs/components/skip-links/skip-links-container.js +1 -1
  7. package/dist/cjs/components/skip-links/skip-links-popup.js +1 -1
  8. package/dist/cjs/ui/page-layout/aside.js +1 -1
  9. package/dist/cjs/ui/page-layout/banner.js +1 -1
  10. package/dist/cjs/ui/page-layout/calculate-layout-area-states.js +3 -3
  11. package/dist/cjs/ui/page-layout/chat-panel.compiled.css +1 -0
  12. package/dist/cjs/ui/page-layout/chat-panel.js +20 -10
  13. package/dist/cjs/ui/page-layout/layout-area-sizing-runtime.js +11 -1
  14. package/dist/cjs/ui/page-layout/local-panel-surface.js +1 -1
  15. package/dist/cjs/ui/page-layout/main/main-sticky-header.js +1 -1
  16. package/dist/cjs/ui/page-layout/main/main.js +1 -1
  17. package/dist/cjs/ui/page-layout/panel-layout-shell.js +1 -1
  18. package/dist/cjs/ui/page-layout/panel-splitter/panel-splitter.js +3 -2
  19. package/dist/cjs/ui/page-layout/panel.js +1 -1
  20. package/dist/cjs/ui/page-layout/ribbon.js +1 -1
  21. package/dist/cjs/ui/page-layout/root.js +1 -1
  22. package/dist/cjs/ui/page-layout/side-nav/side-nav-content.js +1 -1
  23. package/dist/cjs/ui/page-layout/side-nav/side-nav-footer.js +1 -1
  24. package/dist/cjs/ui/page-layout/side-nav/side-nav-header.js +1 -1
  25. package/dist/cjs/ui/page-layout/side-nav/side-nav.js +1 -1
  26. package/dist/cjs/ui/page-layout/side-nav/toggle-button.js +1 -1
  27. package/dist/cjs/ui/page-layout/top-nav/top-nav-end.js +1 -1
  28. package/dist/cjs/ui/page-layout/top-nav/top-nav-middle.js +1 -1
  29. package/dist/cjs/ui/page-layout/top-nav/top-nav-start.js +1 -1
  30. package/dist/cjs/ui/page-layout/top-nav/top-nav.js +1 -1
  31. package/dist/cjs/ui/top-nav-items/custom-title.js +1 -1
  32. package/dist/cjs/ui/top-nav-items/nav-logo/app-logo.js +1 -1
  33. package/dist/cjs/ui/top-nav-items/nav-logo/custom-logo.js +1 -1
  34. package/dist/cjs/ui/top-nav-items/nav-logo/logo-renderer.js +1 -1
  35. package/dist/cjs/ui/top-nav-items/search.js +1 -1
  36. package/dist/cjs/ui/top-nav-items/themed/responsive-icon-button.js +1 -1
  37. package/dist/cjs/ui/top-nav-items/themed/themed-anchor.js +1 -1
  38. package/dist/cjs/ui/top-nav-items/themed/themed-button.js +1 -1
  39. package/dist/cjs/ui/top-nav-items/themed/themed-icon-button.js +1 -1
  40. package/dist/cjs/ui/top-nav-items/themed/themed-link-button.js +1 -1
  41. package/dist/cjs/ui/top-nav-items/themed/themed-pressable.js +1 -1
  42. package/dist/es2019/components/badge-container.js +1 -1
  43. package/dist/es2019/components/list-item.js +1 -1
  44. package/dist/es2019/components/list.js +1 -1
  45. package/dist/es2019/components/skip-links/skip-link.js +1 -1
  46. package/dist/es2019/components/skip-links/skip-links-container.js +1 -1
  47. package/dist/es2019/components/skip-links/skip-links-popup.js +1 -1
  48. package/dist/es2019/ui/page-layout/aside.js +1 -1
  49. package/dist/es2019/ui/page-layout/banner.js +1 -1
  50. package/dist/es2019/ui/page-layout/calculate-layout-area-states.js +3 -3
  51. package/dist/es2019/ui/page-layout/chat-panel.compiled.css +1 -0
  52. package/dist/es2019/ui/page-layout/chat-panel.js +15 -6
  53. package/dist/es2019/ui/page-layout/layout-area-sizing-runtime.js +15 -1
  54. package/dist/es2019/ui/page-layout/local-panel-surface.js +1 -1
  55. package/dist/es2019/ui/page-layout/main/main-sticky-header.js +1 -1
  56. package/dist/es2019/ui/page-layout/main/main.js +1 -1
  57. package/dist/es2019/ui/page-layout/panel-layout-shell.js +1 -1
  58. package/dist/es2019/ui/page-layout/panel-splitter/panel-splitter.js +3 -2
  59. package/dist/es2019/ui/page-layout/panel.js +1 -1
  60. package/dist/es2019/ui/page-layout/ribbon.js +1 -1
  61. package/dist/es2019/ui/page-layout/root.js +1 -1
  62. package/dist/es2019/ui/page-layout/side-nav/side-nav-content.js +1 -1
  63. package/dist/es2019/ui/page-layout/side-nav/side-nav-footer.js +1 -1
  64. package/dist/es2019/ui/page-layout/side-nav/side-nav-header.js +1 -1
  65. package/dist/es2019/ui/page-layout/side-nav/side-nav.js +1 -1
  66. package/dist/es2019/ui/page-layout/side-nav/toggle-button.js +1 -1
  67. package/dist/es2019/ui/page-layout/top-nav/top-nav-end.js +1 -1
  68. package/dist/es2019/ui/page-layout/top-nav/top-nav-middle.js +1 -1
  69. package/dist/es2019/ui/page-layout/top-nav/top-nav-start.js +1 -1
  70. package/dist/es2019/ui/page-layout/top-nav/top-nav.js +1 -1
  71. package/dist/es2019/ui/top-nav-items/custom-title.js +1 -1
  72. package/dist/es2019/ui/top-nav-items/nav-logo/app-logo.js +1 -1
  73. package/dist/es2019/ui/top-nav-items/nav-logo/custom-logo.js +1 -1
  74. package/dist/es2019/ui/top-nav-items/nav-logo/logo-renderer.js +1 -1
  75. package/dist/es2019/ui/top-nav-items/search.js +1 -1
  76. package/dist/es2019/ui/top-nav-items/themed/responsive-icon-button.js +1 -1
  77. package/dist/es2019/ui/top-nav-items/themed/themed-anchor.js +1 -1
  78. package/dist/es2019/ui/top-nav-items/themed/themed-button.js +1 -1
  79. package/dist/es2019/ui/top-nav-items/themed/themed-icon-button.js +1 -1
  80. package/dist/es2019/ui/top-nav-items/themed/themed-link-button.js +1 -1
  81. package/dist/es2019/ui/top-nav-items/themed/themed-pressable.js +1 -1
  82. package/dist/esm/components/badge-container.js +1 -1
  83. package/dist/esm/components/list-item.js +1 -1
  84. package/dist/esm/components/list.js +1 -1
  85. package/dist/esm/components/skip-links/skip-link.js +1 -1
  86. package/dist/esm/components/skip-links/skip-links-container.js +1 -1
  87. package/dist/esm/components/skip-links/skip-links-popup.js +1 -1
  88. package/dist/esm/ui/page-layout/aside.js +1 -1
  89. package/dist/esm/ui/page-layout/banner.js +1 -1
  90. package/dist/esm/ui/page-layout/calculate-layout-area-states.js +3 -3
  91. package/dist/esm/ui/page-layout/chat-panel.compiled.css +1 -0
  92. package/dist/esm/ui/page-layout/chat-panel.js +20 -10
  93. package/dist/esm/ui/page-layout/layout-area-sizing-runtime.js +11 -1
  94. package/dist/esm/ui/page-layout/local-panel-surface.js +1 -1
  95. package/dist/esm/ui/page-layout/main/main-sticky-header.js +1 -1
  96. package/dist/esm/ui/page-layout/main/main.js +1 -1
  97. package/dist/esm/ui/page-layout/panel-layout-shell.js +1 -1
  98. package/dist/esm/ui/page-layout/panel-splitter/panel-splitter.js +3 -2
  99. package/dist/esm/ui/page-layout/panel.js +1 -1
  100. package/dist/esm/ui/page-layout/ribbon.js +1 -1
  101. package/dist/esm/ui/page-layout/root.js +1 -1
  102. package/dist/esm/ui/page-layout/side-nav/side-nav-content.js +1 -1
  103. package/dist/esm/ui/page-layout/side-nav/side-nav-footer.js +1 -1
  104. package/dist/esm/ui/page-layout/side-nav/side-nav-header.js +1 -1
  105. package/dist/esm/ui/page-layout/side-nav/side-nav.js +1 -1
  106. package/dist/esm/ui/page-layout/side-nav/toggle-button.js +1 -1
  107. package/dist/esm/ui/page-layout/top-nav/top-nav-end.js +1 -1
  108. package/dist/esm/ui/page-layout/top-nav/top-nav-middle.js +1 -1
  109. package/dist/esm/ui/page-layout/top-nav/top-nav-start.js +1 -1
  110. package/dist/esm/ui/page-layout/top-nav/top-nav.js +1 -1
  111. package/dist/esm/ui/top-nav-items/custom-title.js +1 -1
  112. package/dist/esm/ui/top-nav-items/nav-logo/app-logo.js +1 -1
  113. package/dist/esm/ui/top-nav-items/nav-logo/custom-logo.js +1 -1
  114. package/dist/esm/ui/top-nav-items/nav-logo/logo-renderer.js +1 -1
  115. package/dist/esm/ui/top-nav-items/search.js +1 -1
  116. package/dist/esm/ui/top-nav-items/themed/responsive-icon-button.js +1 -1
  117. package/dist/esm/ui/top-nav-items/themed/themed-anchor.js +1 -1
  118. package/dist/esm/ui/top-nav-items/themed/themed-button.js +1 -1
  119. package/dist/esm/ui/top-nav-items/themed/themed-icon-button.js +1 -1
  120. package/dist/esm/ui/top-nav-items/themed/themed-link-button.js +1 -1
  121. package/dist/esm/ui/top-nav-items/themed/themed-pressable.js +1 -1
  122. package/dist/types/ui/page-layout/chat-panel.d.ts +2 -0
  123. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- /* chat-panel.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* chat-panel.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./chat-panel.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -29,6 +29,7 @@ function getPixelCustomProperty(element, propertyName, fallback) {
29
29
  }
30
30
  const styles = {
31
31
  root: "_nd5lquub _10fph9n0 _vchhusvi _p12f1osq _1pbyqfx8 _4t3i56xv _kqsw1if8 _152t1nws _bfhk1bhr _1bsb1ky5 _qhdr1ym0 _m5h51wug _1ttbvuon _1mxh8rg1",
32
+ refinedOverlay: "_p12fglyw",
32
33
  managedInline: "_12xt1ym0 _qo371wug _16hgvuon _w1ap8rg1",
33
34
  managedOverlay: "_12xtquub _qo37qfx8 _16hg1bhr _w1ap1ky5",
34
35
  scrollContainer: "_1reo1wug _18m91wug _4t3i1osq",
@@ -44,6 +45,8 @@ const styles = {
44
45
  * full-height column in the page layout grid.
45
46
  *
46
47
  * You can optionally render a `PanelSplitter` as a child to make the chat panel resizable.
48
+ * With chat layout enabled, Root retains separate inline and overlay resize preferences
49
+ * when ChatPanel is closed and remounted during the same layout session.
47
50
  */
48
51
  export function ChatPanel({
49
52
  children,
@@ -82,6 +85,7 @@ export function ChatPanel({
82
85
  const ref = useRef(null);
83
86
  const [inlineWidth, setInlineWidth] = useState(defaultWidth);
84
87
  const [hasInlinePreference, setHasInlinePreference] = useState(false);
88
+ const [hasOverlayPreference, setHasOverlayPreference] = useState(false);
85
89
  const [overlayWidth, setOverlayWidth] = useState(compactDefaultWidth);
86
90
  const [isInline, setIsInline] = useState(false);
87
91
  const {
@@ -158,13 +162,16 @@ export function ChatPanel({
158
162
  }, [getManagedResizeBounds, maxWidth, minWidth]);
159
163
  const configuredMaxWidth = maxWidth !== null && maxWidth !== void 0 ? maxWidth : '100vw';
160
164
  const chatPanelVariableWidth = managedSizing ? `${renderedWidth}px` : `clamp(${minWidth}, ${inlineWidth}px, ${configuredMaxWidth})`;
161
- const chatPanelOverlayVariableWidth = managedSizing ? `${renderedWidth}px` : `clamp(${minWidth}, ${overlayWidth}px, min(90vw, ${configuredMaxWidth}))`;
165
+ const overlayDefault = `var(--n_chatDefaultW, ${compactDefaultWidth}px)`;
166
+ const overlayMaximum = `max(${minWidth}, min(${configuredMaxWidth}, var(--n_layoutW, 100vw), max(${overlayDefault}, calc(var(--n_layoutW, 100vw) * 0.9))))`;
167
+ const chatPanelOverlayVariableWidth = managedSizing ? `${renderedWidth}px` : fg('platform-dst-chat-panel-layout') ? `clamp(${minWidth}, ${hasOverlayPreference ? `${overlayWidth}px` : overlayDefault}, ${overlayMaximum})` : `clamp(${minWidth}, ${overlayWidth}px, min(90vw, ${configuredMaxWidth}))`;
162
168
  const onCompleteResize = useCallback(finalWidth => {
163
169
  if (mode === 'inline') {
164
170
  setInlineWidth(finalWidth);
165
171
  setHasInlinePreference(true);
166
172
  } else {
167
173
  setOverlayWidth(finalWidth);
174
+ setHasOverlayPreference(true);
168
175
  }
169
176
  completeResize(mode, finalWidth);
170
177
  }, [completeResize, mode]);
@@ -176,7 +183,7 @@ export function ChatPanel({
176
183
  id: id,
177
184
  "data-layout-slot": true,
178
185
  "aria-label": label,
179
- className: ax([styles.root, hasBorder && styles.border, (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'inline' && styles.managedInline, (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'overlay' && styles.managedOverlay, hasBorder && (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'inline' && styles.managedInlineBorder, hasBorder && (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'overlay' && styles.managedOverlayBorder, xcss]),
186
+ className: ax([styles.root, hasBorder && styles.border, (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'inline' && styles.managedInline, (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'overlay' && styles.managedOverlay, fg('platform-dst-chat-panel-layout') && (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'overlay' && styles.refinedOverlay, hasBorder && (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'inline' && styles.managedInlineBorder, hasBorder && (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'overlay' && styles.managedOverlayBorder, xcss]),
180
187
  style: {
181
188
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Shared layout CSS variable name.
182
189
  [chatPanelVar]: chatPanelVariableWidth,
@@ -194,14 +201,15 @@ export function ChatPanel({
194
201
  React.createElement("style", null, managedSizing ? `
195
202
  #${gridRootId} { --n_chatTrack: ${mode === 'inline' ? `${renderedWidth}px` : '0px'}; ${chatPanelLiveWidthVar}: var(--n_chatTrack); }
196
203
  ` : `
197
- #${gridRootFitId} { --n_chatPreferredW: ${fg('platform-dst-chat-panel-layout') && !hasInlinePreference ? `clamp(${minWidth}, ${compactDefaultWidth}px, ${configuredMaxWidth})` : chatPanelVariableWidth}; --n_clearanceChatMin: ${minWidth}; --n_clearanceChatTarget: var(--n_chatPreferredW); }
204
+ #${gridRootFitId} { --n_chatDefaultW: ${compactDefaultWidth}px; --n_chatPreferredW: ${fg('platform-dst-chat-panel-layout') && !hasInlinePreference ? `clamp(${minWidth}, ${compactDefaultWidth}px, ${configuredMaxWidth})` : chatPanelVariableWidth}; --n_clearanceChatMin: ${minWidth}; --n_clearanceChatTarget: var(--n_chatPreferredW); }
198
205
  @media (min-width: 64rem) {
199
- #${gridRootFitId} { --n_chatPreferredW: ${chatPanelVariableWidth}; }
206
+ #${gridRootFitId} { --n_chatDefaultW: ${defaultWidth}px; --n_chatPreferredW: ${chatPanelVariableWidth}; }
200
207
  }
201
208
  #${gridRootId} { --n_chatTrack: 0px; ${chatPanelLiveWidthVar}: 0px; }
202
209
  #${gridRootId} [data-layout-chat-panel] {
203
210
  grid-area: 2 / 1 / -1 / -1;
204
- width: min(calc(var(--n_layoutW) * 0.9), ${chatPanelOverlayVariableWidth});
211
+ width: ${fg('platform-dst-chat-panel-layout') ? chatPanelOverlayVariableWidth : `min(calc(var(--n_layoutW) * 0.9), ${chatPanelOverlayVariableWidth})`};
212
+ ${fg('platform-dst-chat-panel-layout') ? 'max-width: none;' : ''}
205
213
  z-index: ${localSlotLayers.chatPanelOverlay};
206
214
  background-color: ${"var(--ds-surface-overlay, #FFFFFF)"};
207
215
  ${hasBorder ? `box-shadow: ${"var(--ds-shadow-overlay, 0px 8px 12px #1E1F2126, 0px 0px 1px #1E1F214f)"}; border-inline-start: none;` : ''}
@@ -212,6 +220,7 @@ export function ChatPanel({
212
220
  #${gridRootId} [data-layout-chat-panel] {
213
221
  grid-area: chat-panel;
214
222
  width: min(100cqw, var(${panelSplitterResizingVar}, var(--n_chatPreferredW)));
223
+ max-width: 100%;
215
224
  z-index: auto;
216
225
  background-color: ${"var(--ds-surface, #FFFFFF)"};
217
226
  ${hasBorder ? `box-shadow: initial; border-inline-start: ${"var(--ds-border-width, 1px)"} solid ${"var(--ds-border, #0B120E24)"};` : ''}
@@ -1,5 +1,6 @@
1
1
  import React, { useCallback, useEffect, useMemo, useState } from 'react';
2
2
  import { bind } from 'bind-event-listener';
3
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
3
4
  import { calculateLayoutAreaStates } from './calculate-layout-area-states';
4
5
  import { defaultMainMinWidth } from './constants';
5
6
  import { LayoutAreaSizingContext } from './layout-area-sizing-context';
@@ -152,8 +153,21 @@ export function LayoutAreaSizingRuntime({
152
153
  if (!current[area]) {
153
154
  return current;
154
155
  }
156
+ if (area === 'chat-panel' && fg('platform-dst-chat-panel-layout')) {
157
+ // Chat's public close contract unmounts the slot. Keep preferences in Root,
158
+ // but release its allocation, in-progress resize and dismissal callback.
159
+ return {
160
+ ...current,
161
+ [area]: {
162
+ ...current[area],
163
+ isOpen: false,
164
+ liveResize: undefined,
165
+ onRequestClose: undefined
166
+ }
167
+ };
168
+ }
155
169
  // Closing uses isOpen: false and retains preferences. Unregistering means
156
- // the owning component unmounted; a replacement must start with its own defaults.
170
+ // the owning component unmounted. Only Chat retains preferences across this close path.
157
171
  const next = {
158
172
  ...current
159
173
  };
@@ -1,4 +1,4 @@
1
- /* local-panel-surface.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* local-panel-surface.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./local-panel-surface.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* main-sticky-header.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* main-sticky-header.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./main-sticky-header.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* main.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* main.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./main.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* panel-layout-shell.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* panel-layout-shell.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./panel-layout-shell.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* panel-splitter.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* panel-splitter.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./panel-splitter.compiled.css";
4
4
  import * as React from 'react';
@@ -40,6 +40,7 @@ function signPanelSplitterDragData(data) {
40
40
  }
41
41
  const containerStyles = {
42
42
  root: "_12ji1r31 _1qu2glyw _12y31o36 _1e0cglyw _kqswstnw _u7coidpf _152tidpf _1pbykb7n _181n1ule",
43
+ visibleOnSmallScreens: "_1e0c1ule",
43
44
  positionEnd: "_rjxpftgi",
44
45
  positionStart: "_1e02zeo2"
45
46
  };
@@ -511,7 +512,7 @@ const PortaledPanelSplitter = ({
511
512
  })}% width`, [rangeInputValue, rangeInputBounds]);
512
513
  return /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement("div", {
513
514
  "data-testid": testId ? `${testId}-container` : undefined,
514
- className: ax([containerStyles.root, position === 'start' && containerStyles.positionStart, position === 'end' && containerStyles.positionEnd])
515
+ className: ax([containerStyles.root, fg('platform-dst-chat-panel-layout') && onResizeInternal && position === 'start' && containerStyles.visibleOnSmallScreens, position === 'start' && containerStyles.positionStart, position === 'end' && containerStyles.positionEnd])
515
516
  }, /*#__PURE__*/React.createElement(MaybeTooltip, {
516
517
  tooltipContent: tooltipContent,
517
518
  shortcut: shortcut,
@@ -1,4 +1,4 @@
1
- /* panel.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* panel.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./panel.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* ribbon.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* ribbon.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./ribbon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* root.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* root.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./root.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useEffect, useRef } from 'react';
@@ -1,4 +1,4 @@
1
- /* side-nav-content.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* side-nav-content.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./side-nav-content.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { forwardRef } from 'react';
@@ -1,4 +1,4 @@
1
- /* side-nav-footer.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* side-nav-footer.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./side-nav-footer.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* side-nav-header.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* side-nav-header.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./side-nav-header.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* side-nav.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* side-nav.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./side-nav.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* toggle-button.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* toggle-button.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./toggle-button.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react';
@@ -1,4 +1,4 @@
1
- /* top-nav-end.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* top-nav-end.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./top-nav-end.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* top-nav-middle.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* top-nav-middle.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./top-nav-middle.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* top-nav-start.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* top-nav-start.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./top-nav-start.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useContext, useEffect, useRef } from 'react';
@@ -1,4 +1,4 @@
1
- /* top-nav.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* top-nav.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./top-nav.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* custom-title.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* custom-title.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./custom-title.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* app-logo.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* app-logo.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./app-logo.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback, useRef } from 'react';
@@ -1,4 +1,4 @@
1
- /* custom-logo.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* custom-logo.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./custom-logo.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useEffect, useRef } from 'react';
@@ -1,4 +1,4 @@
1
- /* logo-renderer.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* logo-renderer.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import * as React from 'react';
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import { useHasCustomTheme } from '../themed/has-custom-theme-context';
@@ -1,4 +1,4 @@
1
- /* search.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* search.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./search.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { Fragment } from 'react';
@@ -1,4 +1,4 @@
1
- /* responsive-icon-button.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* responsive-icon-button.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./responsive-icon-button.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* themed-anchor.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* themed-anchor.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./themed-anchor.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* themed-button.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* themed-button.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./themed-button.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* themed-icon-button.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* themed-icon-button.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./themed-icon-button.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* themed-link-button.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* themed-link-button.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./themed-link-button.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* themed-pressable.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* themed-pressable.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./themed-pressable.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* badge-container.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* badge-container.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./badge-container.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* list-item.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* list-item.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import * as React from 'react';
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import { forwardRef } from 'react';
@@ -1,4 +1,4 @@
1
- /* list.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* list.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import * as React from 'react';
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import { forwardRef } from 'react';
@@ -1,4 +1,4 @@
1
- /* skip-link.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* skip-link.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./skip-link.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback } from 'react';
@@ -1,4 +1,4 @@
1
- /* skip-links-container.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* skip-links-container.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import "./skip-links-container.compiled.css";
@@ -1,4 +1,4 @@
1
- /* skip-links-popup.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* skip-links-popup.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import "./skip-links-popup.compiled.css";
@@ -1,4 +1,4 @@
1
- /* aside.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* aside.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import "./aside.compiled.css";
@@ -1,4 +1,4 @@
1
- /* banner.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* banner.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./banner.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -226,9 +226,9 @@ export function calculateLayoutAreaStates(_ref4) {
226
226
  // Occupied tracks and inline chat are not part of that covered region.
227
227
  var layoutMax = (_areaName2 === 'chat-panel' ? layoutWidth : mainAreaWidth) * 0.9;
228
228
  var defaultWidth = isSideNavOverlay ? (_area$compactDefaultW3 = _area.compactDefaultWidth) !== null && _area$compactDefaultW3 !== void 0 ? _area$compactDefaultW3 : _area.defaultWidth : _area.defaultWidth;
229
- var overlayMax = isRefinedLayout && _areaName2 === 'panel' ? hasPanelClearance ? Math.min(availableWidth - sideNavMinWidth - inlineChatPanelWidth - 32, Math.max(defaultWidth, (availableWidth - sideNavMinWidth - inlineChatPanelWidth) * 0.9)) : Math.min(mainAreaWidth, Math.max(defaultWidth, layoutMax)) : layoutMax;
230
- var _max = isRefinedLayout && _areaName2 === 'panel' ? Math.max(_min2, Math.min(configuredMax, overlayMax)) : Math.max(0, Math.min(configuredMax, overlayMax));
231
- var effectiveMin = isRefinedLayout && _areaName2 === 'panel' ? _min2 : Math.min(_min2, _max);
229
+ var overlayMax = isRefinedLayout && _areaName2 === 'panel' ? hasPanelClearance ? Math.min(availableWidth - sideNavMinWidth - inlineChatPanelWidth - 32, Math.max(defaultWidth, (availableWidth - sideNavMinWidth - inlineChatPanelWidth) * 0.9)) : Math.min(mainAreaWidth, Math.max(defaultWidth, layoutMax)) : isRefinedLayout && _areaName2 === 'chat-panel' ? Math.min(layoutWidth, Math.max(defaultWidth, layoutMax)) : layoutMax;
230
+ var _max = isRefinedLayout && (_areaName2 === 'panel' || _areaName2 === 'chat-panel') ? Math.max(_min2, Math.min(configuredMax, overlayMax)) : Math.max(0, Math.min(configuredMax, overlayMax));
231
+ var effectiveMin = isRefinedLayout && (_areaName2 === 'panel' || _areaName2 === 'chat-panel') ? _min2 : Math.min(_min2, _max);
232
232
  var _target = getOverlayTargetWidth(_area, isSideNavOverlay, _areaName2);
233
233
  var _width2 = clampTargetWidth({
234
234
  target: _target,
@@ -17,6 +17,7 @@
17
17
  ._bfhk1bhr{background-color:var(--ds-surface-overlay,#fff)}
18
18
  ._kqsw1if8{position:sticky}
19
19
  ._p12f1osq{max-width:100%}
20
+ ._p12fglyw{max-width:none}
20
21
  ._qo371wug._qo371wug{z-index:auto}
21
22
  ._qo37qfx8._qo37qfx8{z-index:5}
22
23
  ._so1e130s._so1e130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}
@@ -1,4 +1,4 @@
1
- /* chat-panel.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* chat-panel.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import "./chat-panel.compiled.css";
@@ -31,6 +31,7 @@ function getPixelCustomProperty(element, propertyName, fallback) {
31
31
  }
32
32
  var styles = {
33
33
  root: "_nd5lquub _10fph9n0 _vchhusvi _p12f1osq _1pbyqfx8 _4t3i56xv _kqsw1if8 _152t1nws _bfhk1bhr _1bsb1ky5 _qhdr1ym0 _m5h51wug _1ttbvuon _1mxh8rg1",
34
+ refinedOverlay: "_p12fglyw",
34
35
  managedInline: "_12xt1ym0 _qo371wug _16hgvuon _w1ap8rg1",
35
36
  managedOverlay: "_12xtquub _qo37qfx8 _16hg1bhr _w1ap1ky5",
36
37
  scrollContainer: "_1reo1wug _18m91wug _4t3i1osq",
@@ -46,6 +47,8 @@ var styles = {
46
47
  * full-height column in the page layout grid.
47
48
  *
48
49
  * You can optionally render a `PanelSplitter` as a child to make the chat panel resizable.
50
+ * With chat layout enabled, Root retains separate inline and overlay resize preferences
51
+ * when ChatPanel is closed and remounted during the same layout session.
49
52
  */
50
53
  export function ChatPanel(_ref) {
51
54
  var _managedSizing$mode, _managedSizing$width;
@@ -93,14 +96,18 @@ export function ChatPanel(_ref) {
93
96
  _useState4 = _slicedToArray(_useState3, 2),
94
97
  hasInlinePreference = _useState4[0],
95
98
  setHasInlinePreference = _useState4[1];
96
- var _useState5 = useState(compactDefaultWidth),
99
+ var _useState5 = useState(false),
97
100
  _useState6 = _slicedToArray(_useState5, 2),
98
- overlayWidth = _useState6[0],
99
- setOverlayWidth = _useState6[1];
100
- var _useState7 = useState(false),
101
+ hasOverlayPreference = _useState6[0],
102
+ setHasOverlayPreference = _useState6[1];
103
+ var _useState7 = useState(compactDefaultWidth),
101
104
  _useState8 = _slicedToArray(_useState7, 2),
102
- isInline = _useState8[0],
103
- setIsInline = _useState8[1];
105
+ overlayWidth = _useState8[0],
106
+ setOverlayWidth = _useState8[1];
107
+ var _useState9 = useState(false),
108
+ _useState0 = _slicedToArray(_useState9, 2),
109
+ isInline = _useState0[0],
110
+ setIsInline = _useState0[1];
104
111
  var _useLayoutAreaSizing = useLayoutAreaSizing({
105
112
  area: 'chat-panel',
106
113
  config: {
@@ -174,13 +181,16 @@ export function ChatPanel(_ref) {
174
181
  }, [getManagedResizeBounds, maxWidth, minWidth]);
175
182
  var configuredMaxWidth = maxWidth !== null && maxWidth !== void 0 ? maxWidth : '100vw';
176
183
  var chatPanelVariableWidth = managedSizing ? "".concat(renderedWidth, "px") : "clamp(".concat(minWidth, ", ").concat(inlineWidth, "px, ").concat(configuredMaxWidth, ")");
177
- var chatPanelOverlayVariableWidth = managedSizing ? "".concat(renderedWidth, "px") : "clamp(".concat(minWidth, ", ").concat(overlayWidth, "px, min(90vw, ").concat(configuredMaxWidth, "))");
184
+ var overlayDefault = "var(--n_chatDefaultW, ".concat(compactDefaultWidth, "px)");
185
+ var overlayMaximum = "max(".concat(minWidth, ", min(").concat(configuredMaxWidth, ", var(--n_layoutW, 100vw), max(").concat(overlayDefault, ", calc(var(--n_layoutW, 100vw) * 0.9))))");
186
+ var chatPanelOverlayVariableWidth = managedSizing ? "".concat(renderedWidth, "px") : fg('platform-dst-chat-panel-layout') ? "clamp(".concat(minWidth, ", ").concat(hasOverlayPreference ? "".concat(overlayWidth, "px") : overlayDefault, ", ").concat(overlayMaximum, ")") : "clamp(".concat(minWidth, ", ").concat(overlayWidth, "px, min(90vw, ").concat(configuredMaxWidth, "))");
178
187
  var onCompleteResize = useCallback(function (finalWidth) {
179
188
  if (mode === 'inline') {
180
189
  setInlineWidth(finalWidth);
181
190
  setHasInlinePreference(true);
182
191
  } else {
183
192
  setOverlayWidth(finalWidth);
193
+ setHasOverlayPreference(true);
184
194
  }
185
195
  completeResize(mode, finalWidth);
186
196
  }, [completeResize, mode]);
@@ -194,7 +204,7 @@ export function ChatPanel(_ref) {
194
204
  id: id,
195
205
  "data-layout-slot": true,
196
206
  "aria-label": label,
197
- className: ax([styles.root, hasBorder && styles.border, (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'inline' && styles.managedInline, (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'overlay' && styles.managedOverlay, hasBorder && (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'inline' && styles.managedInlineBorder, hasBorder && (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'overlay' && styles.managedOverlayBorder, xcss]),
207
+ className: ax([styles.root, hasBorder && styles.border, (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'inline' && styles.managedInline, (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'overlay' && styles.managedOverlay, fg('platform-dst-chat-panel-layout') && (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'overlay' && styles.refinedOverlay, hasBorder && (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'inline' && styles.managedInlineBorder, hasBorder && (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'overlay' && styles.managedOverlayBorder, xcss]),
198
208
  style: _defineProperty(_defineProperty({}, chatPanelVar, chatPanelVariableWidth), chatPanelOverlayWidthVar, chatPanelOverlayVariableWidth),
199
209
  "data-testid": testId,
200
210
  "data-layout-chat-panel": "",
@@ -204,7 +214,7 @@ export function ChatPanel(_ref) {
204
214
  // Hoist the committed or actively resizing inline width so SideNav can yield
205
215
  // space to ChatPanel without allowing the page layout to overflow.
206
216
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles
207
- React.createElement("style", null, managedSizing ? "\n#".concat(gridRootId, " { --n_chatTrack: ").concat(mode === 'inline' ? "".concat(renderedWidth, "px") : '0px', "; ").concat(chatPanelLiveWidthVar, ": var(--n_chatTrack); }\n") : "\n#".concat(gridRootFitId, " { --n_chatPreferredW: ").concat(fg('platform-dst-chat-panel-layout') && !hasInlinePreference ? "clamp(".concat(minWidth, ", ").concat(compactDefaultWidth, "px, ").concat(configuredMaxWidth, ")") : chatPanelVariableWidth, "; --n_clearanceChatMin: ").concat(minWidth, "; --n_clearanceChatTarget: var(--n_chatPreferredW); }\n@media (min-width: 64rem) {\n #").concat(gridRootFitId, " { --n_chatPreferredW: ").concat(chatPanelVariableWidth, "; }\n}\n#").concat(gridRootId, " { --n_chatTrack: 0px; ").concat(chatPanelLiveWidthVar, ": 0px; }\n#").concat(gridRootId, " [data-layout-chat-panel] {\n grid-area: 2 / 1 / -1 / -1;\n width: min(calc(var(--n_layoutW) * 0.9), ").concat(chatPanelOverlayVariableWidth, ");\n z-index: ").concat(localSlotLayers.chatPanelOverlay, ";\n background-color: ", "var(--ds-surface-overlay, #FFFFFF)", ";\n ").concat(hasBorder ? "box-shadow: ".concat("var(--ds-shadow-overlay, 0px 8px 12px #1E1F2126, 0px 0px 1px #1E1F214f)", "; border-inline-start: none;") : '', "\n}\n@media (min-width: 40rem) {\n @container navigation-chat-space (min-width: ").concat(minWidth, ") {\n #").concat(gridRootId, " { --n_chatTrack: min(100cqw, var(").concat(panelSplitterResizingVar, ", var(--n_chatPreferredW))); ").concat(chatPanelLiveWidthVar, ": var(--n_chatTrack); }\n #").concat(gridRootId, " [data-layout-chat-panel] {\n grid-area: chat-panel;\n width: min(100cqw, var(").concat(panelSplitterResizingVar, ", var(--n_chatPreferredW)));\n z-index: auto;\n background-color: ", "var(--ds-surface, #FFFFFF)", ";\n ").concat(hasBorder ? "box-shadow: initial; border-inline-start: ".concat("var(--ds-border-width, 1px)", " solid ", "var(--ds-border, #0B120E24)", ";") : '', "\n }\n }\n}\n")), /*#__PURE__*/React.createElement(PanelSplitterProvider, {
217
+ React.createElement("style", null, managedSizing ? "\n#".concat(gridRootId, " { --n_chatTrack: ").concat(mode === 'inline' ? "".concat(renderedWidth, "px") : '0px', "; ").concat(chatPanelLiveWidthVar, ": var(--n_chatTrack); }\n") : "\n#".concat(gridRootFitId, " { --n_chatDefaultW: ").concat(compactDefaultWidth, "px; --n_chatPreferredW: ").concat(fg('platform-dst-chat-panel-layout') && !hasInlinePreference ? "clamp(".concat(minWidth, ", ").concat(compactDefaultWidth, "px, ").concat(configuredMaxWidth, ")") : chatPanelVariableWidth, "; --n_clearanceChatMin: ").concat(minWidth, "; --n_clearanceChatTarget: var(--n_chatPreferredW); }\n@media (min-width: 64rem) {\n #").concat(gridRootFitId, " { --n_chatDefaultW: ").concat(defaultWidth, "px; --n_chatPreferredW: ").concat(chatPanelVariableWidth, "; }\n}\n#").concat(gridRootId, " { --n_chatTrack: 0px; ").concat(chatPanelLiveWidthVar, ": 0px; }\n#").concat(gridRootId, " [data-layout-chat-panel] {\n grid-area: 2 / 1 / -1 / -1;\n width: ").concat(fg('platform-dst-chat-panel-layout') ? chatPanelOverlayVariableWidth : "min(calc(var(--n_layoutW) * 0.9), ".concat(chatPanelOverlayVariableWidth, ")"), ";\n ").concat(fg('platform-dst-chat-panel-layout') ? 'max-width: none;' : '', "\n z-index: ").concat(localSlotLayers.chatPanelOverlay, ";\n background-color: ", "var(--ds-surface-overlay, #FFFFFF)", ";\n ").concat(hasBorder ? "box-shadow: ".concat("var(--ds-shadow-overlay, 0px 8px 12px #1E1F2126, 0px 0px 1px #1E1F214f)", "; border-inline-start: none;") : '', "\n}\n@media (min-width: 40rem) {\n @container navigation-chat-space (min-width: ").concat(minWidth, ") {\n #").concat(gridRootId, " { --n_chatTrack: min(100cqw, var(").concat(panelSplitterResizingVar, ", var(--n_chatPreferredW))); ").concat(chatPanelLiveWidthVar, ": var(--n_chatTrack); }\n #").concat(gridRootId, " [data-layout-chat-panel] {\n grid-area: chat-panel;\n width: min(100cqw, var(").concat(panelSplitterResizingVar, ", var(--n_chatPreferredW)));\n max-width: 100%;\n z-index: auto;\n background-color: ", "var(--ds-surface, #FFFFFF)", ";\n ").concat(hasBorder ? "box-shadow: initial; border-inline-start: ".concat("var(--ds-border-width, 1px)", " solid ", "var(--ds-border, #0B120E24)", ";") : '', "\n }\n }\n}\n")), /*#__PURE__*/React.createElement(PanelSplitterProvider, {
208
218
  panelId: chatPanelPanelSplitterId,
209
219
  panelRef: ref,
210
220
  panelWidth: renderedWidth,
@@ -7,6 +7,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
7
7
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
8
  import React, { useCallback, useEffect, useMemo, useState } from 'react';
9
9
  import { bind } from 'bind-event-listener';
10
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
10
11
  import { calculateLayoutAreaStates } from './calculate-layout-area-states';
11
12
  import { defaultMainMinWidth } from './constants';
12
13
  import { LayoutAreaSizingContext } from './layout-area-sizing-context';
@@ -180,8 +181,17 @@ export function LayoutAreaSizingRuntime(_ref2) {
180
181
  if (!current[area]) {
181
182
  return current;
182
183
  }
184
+ if (area === 'chat-panel' && fg('platform-dst-chat-panel-layout')) {
185
+ // Chat's public close contract unmounts the slot. Keep preferences in Root,
186
+ // but release its allocation, in-progress resize and dismissal callback.
187
+ return _objectSpread(_objectSpread({}, current), {}, _defineProperty({}, area, _objectSpread(_objectSpread({}, current[area]), {}, {
188
+ isOpen: false,
189
+ liveResize: undefined,
190
+ onRequestClose: undefined
191
+ })));
192
+ }
183
193
  // Closing uses isOpen: false and retains preferences. Unregistering means
184
- // the owning component unmounted; a replacement must start with its own defaults.
194
+ // the owning component unmounted. Only Chat retains preferences across this close path.
185
195
  var next = _objectSpread({}, current);
186
196
  delete next[area];
187
197
  return next;
@@ -1,4 +1,4 @@
1
- /* local-panel-surface.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* local-panel-surface.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import "./local-panel-surface.compiled.css";
@@ -1,4 +1,4 @@
1
- /* main-sticky-header.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* main-sticky-header.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./main-sticky-header.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* main.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* main.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./main.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* panel-layout-shell.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* panel-layout-shell.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import "./panel-layout-shell.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* panel-splitter.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* panel-splitter.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
3
  import _extends from "@babel/runtime/helpers/extends";
4
4
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
@@ -45,6 +45,7 @@ function signPanelSplitterDragData(data) {
45
45
  }
46
46
  var containerStyles = {
47
47
  root: "_12ji1r31 _1qu2glyw _12y31o36 _1e0cglyw _kqswstnw _u7coidpf _152tidpf _1pbykb7n _181n1ule",
48
+ visibleOnSmallScreens: "_1e0c1ule",
48
49
  positionEnd: "_rjxpftgi",
49
50
  positionStart: "_1e02zeo2"
50
51
  };
@@ -623,7 +624,7 @@ var PortaledPanelSplitter = function PortaledPanelSplitter(_ref3) {
623
624
  }, [rangeInputValue, rangeInputBounds]);
624
625
  return /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement("div", {
625
626
  "data-testid": testId ? "".concat(testId, "-container") : undefined,
626
- className: ax([containerStyles.root, position === 'start' && containerStyles.positionStart, position === 'end' && containerStyles.positionEnd])
627
+ className: ax([containerStyles.root, fg('platform-dst-chat-panel-layout') && onResizeInternal && position === 'start' && containerStyles.visibleOnSmallScreens, position === 'start' && containerStyles.positionStart, position === 'end' && containerStyles.positionEnd])
627
628
  }, /*#__PURE__*/React.createElement(MaybeTooltip, {
628
629
  tooltipContent: tooltipContent,
629
630
  shortcut: shortcut,
@@ -1,4 +1,4 @@
1
- /* panel.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* panel.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import "./panel.compiled.css";