@aperture-browser/session-react 0.0.0-nightly.96.6277b64804e5 → 0.0.0-nightly.97.4e0ac6c83ab5

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.
package/dist/index.js CHANGED
@@ -369,7 +369,7 @@ function HoverCardContent({ className, side = "bottom", sideOffset = 4, align =
369
369
  const createHoverCardHandle = PreviewCard.createHandle;
370
370
  //#endregion
371
371
  //#region ../ui/src/components/scroll-area.tsx
372
- function ScrollArea$1({ className, viewportClassName, scrollbars = "vertical", children, ...props }) {
372
+ function ScrollArea$1({ className, viewportClassName, viewportRef, scrollbars = "vertical", children, ...props }) {
373
373
  const vertical = scrollbars === "vertical" || scrollbars === "both";
374
374
  const horizontal = scrollbars === "horizontal" || scrollbars === "both";
375
375
  return /* @__PURE__ */ jsxs(ScrollArea.Root, {
@@ -378,6 +378,7 @@ function ScrollArea$1({ className, viewportClassName, scrollbars = "vertical", c
378
378
  ...props,
379
379
  children: [
380
380
  /* @__PURE__ */ jsx(ScrollArea.Viewport, {
381
+ ref: viewportRef,
381
382
  "data-slot": "scroll-area-viewport",
382
383
  style: {
383
384
  overflowX: horizontal ? "scroll" : "hidden",
@@ -1813,6 +1814,8 @@ function BrowserToolbar({ control, leading, features, collaborationRole, cdpUrl,
1813
1814
  const browserMutationEnabled = connected && collaborationRole !== "viewer";
1814
1815
  const drawingAvailable = connected && control.collaboration.phase === "connected" && Boolean(control.activeTargetId);
1815
1816
  const loading = control.activeTarget?.loading ?? false;
1817
+ const canGoBack = control.activeTarget?.canGoBack ?? true;
1818
+ const canGoForward = control.activeTarget?.canGoForward ?? true;
1816
1819
  const runningRecordings = control.recordings.filter((recording) => recording.status === "starting" || recording.status === "running");
1817
1820
  const hasRunningRecordings = runningRecordings.length > 0;
1818
1821
  const recordingTargetIds = new Set(runningRecordings.map((recording) => recording.targetId));
@@ -1856,13 +1859,13 @@ function BrowserToolbar({ control, leading, features, collaborationRole, cdpUrl,
1856
1859
  children: [
1857
1860
  /* @__PURE__ */ jsx(ToolbarButton, {
1858
1861
  label: "Back",
1859
- disabled: !browserMutationEnabled,
1862
+ disabled: !browserMutationEnabled || !canGoBack,
1860
1863
  onClick: () => control.historyBack(),
1861
1864
  children: /* @__PURE__ */ jsx(ArrowLeft, {})
1862
1865
  }),
1863
1866
  /* @__PURE__ */ jsx(ToolbarButton, {
1864
1867
  label: "Forward",
1865
- disabled: !browserMutationEnabled,
1868
+ disabled: !browserMutationEnabled || !canGoForward,
1866
1869
  onClick: () => control.historyForward(),
1867
1870
  children: /* @__PURE__ */ jsx(ArrowRight, {})
1868
1871
  }),