react-dockable-desktop 7.12.0 → 7.12.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.
package/dist/index.d.cts CHANGED
@@ -1278,13 +1278,15 @@ interface HostedPopOut {
1278
1278
  interface HostedPopOutOptions {
1279
1279
  /** Called once the window is open, before the panel moves in: takes the widget out of its panel if needed. */
1280
1280
  prepare: () => boolean;
1281
- /** Where the widget is on the main page (client pixels), for the window's place and size. */
1281
+ /** Where the widget is (client pixels of `view`, else of the main page), for the window's place and size. */
1282
1282
  rect?: {
1283
1283
  left: number;
1284
1284
  top: number;
1285
1285
  width: number;
1286
1286
  height: number;
1287
1287
  } | null;
1288
+ /** The window `rect` was measured in, when not the main page's (7.12.1): its owner panel's pop-out. */
1289
+ view?: Window;
1288
1290
  }
1289
1291
  /** @internal A workspace's pop-out windows: what `WorkspaceClient` and the provider use. */
1290
1292
  interface PopOutWindows {
@@ -1559,10 +1561,11 @@ declare class WorkspaceClient<TUserEvents extends object = Record<string, unknow
1559
1561
  * the panel's state, scroll offsets and a canvas's WebGL context go with it. A docked panel
1560
1562
  * remembers its group and goes back into it on return.
1561
1563
  *
1562
- * Call it inside the user's click or key press: browsers only open a window then. It is
1563
- * synchronous, and says what happened (see {@link PopOutResult}); on a refusal the panel stays
1564
- * where it is and nothing is shown to the user, so the app decides what to say. Calling it for a
1565
- * panel that is already out brings its window forward.
1564
+ * Call it inside the user's click or key press: browsers only open a window then. A click in
1565
+ * one of the app's pop-out windows counts too (7.12.1). It is synchronous, and says what
1566
+ * happened (see {@link PopOutResult}); on a refusal the panel stays where it is and nothing is
1567
+ * shown to the user, so the app decides what to say. Calling it for a panel that is already out
1568
+ * brings its window forward.
1566
1569
  *
1567
1570
  * Needs `createWorkspace({ popOut: true })` and the panel type's `defaultOptions.canPopOut`.
1568
1571
  * The window opens `<DockableDesktopProvider popoutUrl>`, or a blank window. When that page can't
@@ -3324,11 +3327,12 @@ interface FloatingWidgetsApi {
3324
3327
  placement(id: string): WidgetPlacement | null;
3325
3328
  /**
3326
3329
  * Moves a widget into its own browser window (7.12.0), for a second monitor, without remounting
3327
- * its content. Synchronous: call it inside the user's click. From inside its panel it leaves the
3328
- * panel and goes into the window as one move; from docked, tabbed, floating or minimised, its
3329
- * panel moves. The same result and reasons as `workspace.popOutPanel` (`'not-allowed'` without
3330
- * {@link ManagedWidget.canPopOut}, or when its owner panel can't hold it out); a refusal changes
3331
- * nothing. While out, `location()` is `'floating'` and `useWidget().isPoppedOut` is true.
3330
+ * its content. Synchronous: call it inside the user's click, in the page or in a pop-out window
3331
+ * (its owner's, say: 7.12.1). From inside its panel it leaves the panel and goes into the window
3332
+ * as one move; from docked, tabbed, floating or minimised, its panel moves. The same result and
3333
+ * reasons as `workspace.popOutPanel` (`'not-allowed'` without {@link ManagedWidget.canPopOut}, or
3334
+ * when its owner panel can't hold it out); a refusal changes nothing. While out, `location()` is
3335
+ * `'floating'` and `useWidget().isPoppedOut` is true.
3332
3336
  *
3333
3337
  * Back: `move()` to any place returns it first, as one move; closing the window, or its "Back into
3334
3338
  * the panel" button, puts it back into its panel where it was (D17). `onWillMove` / `onMoved` run
package/dist/index.d.ts CHANGED
@@ -1278,13 +1278,15 @@ interface HostedPopOut {
1278
1278
  interface HostedPopOutOptions {
1279
1279
  /** Called once the window is open, before the panel moves in: takes the widget out of its panel if needed. */
1280
1280
  prepare: () => boolean;
1281
- /** Where the widget is on the main page (client pixels), for the window's place and size. */
1281
+ /** Where the widget is (client pixels of `view`, else of the main page), for the window's place and size. */
1282
1282
  rect?: {
1283
1283
  left: number;
1284
1284
  top: number;
1285
1285
  width: number;
1286
1286
  height: number;
1287
1287
  } | null;
1288
+ /** The window `rect` was measured in, when not the main page's (7.12.1): its owner panel's pop-out. */
1289
+ view?: Window;
1288
1290
  }
1289
1291
  /** @internal A workspace's pop-out windows: what `WorkspaceClient` and the provider use. */
1290
1292
  interface PopOutWindows {
@@ -1559,10 +1561,11 @@ declare class WorkspaceClient<TUserEvents extends object = Record<string, unknow
1559
1561
  * the panel's state, scroll offsets and a canvas's WebGL context go with it. A docked panel
1560
1562
  * remembers its group and goes back into it on return.
1561
1563
  *
1562
- * Call it inside the user's click or key press: browsers only open a window then. It is
1563
- * synchronous, and says what happened (see {@link PopOutResult}); on a refusal the panel stays
1564
- * where it is and nothing is shown to the user, so the app decides what to say. Calling it for a
1565
- * panel that is already out brings its window forward.
1564
+ * Call it inside the user's click or key press: browsers only open a window then. A click in
1565
+ * one of the app's pop-out windows counts too (7.12.1). It is synchronous, and says what
1566
+ * happened (see {@link PopOutResult}); on a refusal the panel stays where it is and nothing is
1567
+ * shown to the user, so the app decides what to say. Calling it for a panel that is already out
1568
+ * brings its window forward.
1566
1569
  *
1567
1570
  * Needs `createWorkspace({ popOut: true })` and the panel type's `defaultOptions.canPopOut`.
1568
1571
  * The window opens `<DockableDesktopProvider popoutUrl>`, or a blank window. When that page can't
@@ -3324,11 +3327,12 @@ interface FloatingWidgetsApi {
3324
3327
  placement(id: string): WidgetPlacement | null;
3325
3328
  /**
3326
3329
  * Moves a widget into its own browser window (7.12.0), for a second monitor, without remounting
3327
- * its content. Synchronous: call it inside the user's click. From inside its panel it leaves the
3328
- * panel and goes into the window as one move; from docked, tabbed, floating or minimised, its
3329
- * panel moves. The same result and reasons as `workspace.popOutPanel` (`'not-allowed'` without
3330
- * {@link ManagedWidget.canPopOut}, or when its owner panel can't hold it out); a refusal changes
3331
- * nothing. While out, `location()` is `'floating'` and `useWidget().isPoppedOut` is true.
3330
+ * its content. Synchronous: call it inside the user's click, in the page or in a pop-out window
3331
+ * (its owner's, say: 7.12.1). From inside its panel it leaves the panel and goes into the window
3332
+ * as one move; from docked, tabbed, floating or minimised, its panel moves. The same result and
3333
+ * reasons as `workspace.popOutPanel` (`'not-allowed'` without {@link ManagedWidget.canPopOut}, or
3334
+ * when its owner panel can't hold it out); a refusal changes nothing. While out, `location()` is
3335
+ * `'floating'` and `useWidget().isPoppedOut` is true.
3332
3336
  *
3333
3337
  * Back: `move()` to any place returns it first, as one move; closing the window, or its "Back into
3334
3338
  * the panel" button, puts it back into its panel where it was (D17). `onWillMove` / `onMoved` run