react-dockable-desktop 7.11.0-next.1 → 7.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -5
- package/README.md +2 -2
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -11
- package/dist/index.d.ts +14 -11
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -649,7 +649,8 @@ interface WorkspaceActions {
|
|
|
649
649
|
/**
|
|
650
650
|
* Replaces the props an open panel was opened with (7.11.0), or derives them from the current
|
|
651
651
|
* ones. The panel re-renders with them, `serializable` is re-checked (see {@link PanelInfo.serializable}),
|
|
652
|
-
* and `layout:changed` is published. Does nothing for a panel that isn't open
|
|
652
|
+
* and `layout:changed` is published. Does nothing for a panel that isn't open, or for a managed
|
|
653
|
+
* widget's own panel (it has no props of its own).
|
|
653
654
|
* @param id - Panel instance ID.
|
|
654
655
|
* @param props - The new props, or a function of the current ones.
|
|
655
656
|
* @example
|
|
@@ -2571,8 +2572,9 @@ interface ManagedWidget {
|
|
|
2571
2572
|
/**
|
|
2572
2573
|
* The menu on the widget's title icon (7.11.0), in the app's own words: a "Dock below the map" or
|
|
2573
2574
|
* "Back into the map" item calls `w.move()`. With it, the title icon becomes a button that opens
|
|
2574
|
-
* these items. Out of the panel,
|
|
2575
|
-
* before the built-in Minimize and Close
|
|
2575
|
+
* these items. Out of the panel, its tab's icon and its floating title-bar icon open them too: they
|
|
2576
|
+
* lead the tab's menu (before the built-in Minimize and Close) and the floating window's ⋮ menu
|
|
2577
|
+
* (before Close). The built-in Float is left out, because these replace it.
|
|
2576
2578
|
* Called each time the menu opens, so items can depend on where the widget is.
|
|
2577
2579
|
* @example
|
|
2578
2580
|
* titleMenu: w => w.location === 'panel'
|
|
@@ -2602,7 +2604,8 @@ interface ManagedWidget {
|
|
|
2602
2604
|
/**
|
|
2603
2605
|
* Where a managed widget is, as plain JSON (7.11.0): from `useFloatingWidgets().placement(id)`,
|
|
2604
2606
|
* back to `open(id, { placement })`. Opaque: store it as it is (JSON-serialisable) and don't read
|
|
2605
|
-
* its fields; they may change between versions, and `v` says which. The same in
|
|
2607
|
+
* its fields; they may change between versions, and `v` says which. The same in the Vue and Angular
|
|
2608
|
+
* editions (vue-dockable-desktop, angular-dockable-desktop).
|
|
2606
2609
|
*/
|
|
2607
2610
|
type WidgetPlacement = {
|
|
2608
2611
|
readonly v: 1;
|
|
@@ -2632,8 +2635,8 @@ type WidgetLocation = 'panel' | 'docked' | 'tabbed' | 'floating' | 'minimized';
|
|
|
2632
2635
|
* Where to move a managed widget with `useFloatingWidgets().move()` (7.11.0). Its owner panel is
|
|
2633
2636
|
* always the reference: `'docked'` splits the owner's group on that side (`size` is the new
|
|
2634
2637
|
* panel's share, 0.1–0.9, as in `openPanel`'s `dockTo`), `'tabbed'` adds a tab to the owner's
|
|
2635
|
-
* group. `'floating'` opens a floating window at `rect` (workspace pixels), or
|
|
2636
|
-
* on screen. `'panel'` brings it back to where it last was inside the panel.
|
|
2638
|
+
* group. `'floating'` opens a floating window at `rect` (workspace pixels), or, without one, where
|
|
2639
|
+
* the widget is on screen, at its size. `'panel'` brings it back to where it last was inside the panel.
|
|
2637
2640
|
*/
|
|
2638
2641
|
type WidgetTarget = {
|
|
2639
2642
|
to: 'panel';
|
|
@@ -2943,7 +2946,7 @@ interface FloatingWidgetsApi {
|
|
|
2943
2946
|
* it goes back to). Give it back to `open(id, { placement })` after a reload. `null` if it isn't open.
|
|
2944
2947
|
* @example
|
|
2945
2948
|
* const saved = widgets.placement('table'); // store it
|
|
2946
|
-
* widgets.open('table', { ...config, placement: saved }); // later: it opens where it was
|
|
2949
|
+
* widgets.open('table', { ...config, placement: saved ?? undefined }); // later: it opens where it was
|
|
2947
2950
|
*/
|
|
2948
2951
|
placement(id: string): WidgetPlacement | null;
|
|
2949
2952
|
}
|
|
@@ -2982,10 +2985,10 @@ interface WidgetHandle {
|
|
|
2982
2985
|
ownerPanelId: string | null;
|
|
2983
2986
|
/**
|
|
2984
2987
|
* The id of the widget's own panel while it is out of its owner panel, for workspace calls such
|
|
2985
|
-
* as `updatePanelTitle`; `null` while it is in the panel (7.11.0
|
|
2988
|
+
* as `updatePanelTitle`; `null` while it is in the panel (7.11.0).
|
|
2986
2989
|
*/
|
|
2987
2990
|
panelId: string | null;
|
|
2988
|
-
/** Where it is shown now. A component that
|
|
2991
|
+
/** Where it is shown now. A component that calls `useWidget()` re-renders when it changes. */
|
|
2989
2992
|
location: WidgetLocation;
|
|
2990
2993
|
/**
|
|
2991
2994
|
* Called just before the widget's content element moves to another container: into or out of
|
|
@@ -2995,8 +2998,8 @@ interface WidgetHandle {
|
|
|
2995
2998
|
onWillMove(cb: () => void): () => void;
|
|
2996
2999
|
/**
|
|
2997
3000
|
* Called once the element is in its new container and has its new size (or, with no size, as
|
|
2998
|
-
* when minimised, on the next frames)
|
|
2999
|
-
* unsubscribe function.
|
|
3001
|
+
* when minimised, on the next frames), after every move that called `onWillMove`. Restore what
|
|
3002
|
+
* you saved in `onWillMove` here. Returns the unsubscribe function.
|
|
3000
3003
|
*/
|
|
3001
3004
|
onMoved(cb: () => void): () => void;
|
|
3002
3005
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -649,7 +649,8 @@ interface WorkspaceActions {
|
|
|
649
649
|
/**
|
|
650
650
|
* Replaces the props an open panel was opened with (7.11.0), or derives them from the current
|
|
651
651
|
* ones. The panel re-renders with them, `serializable` is re-checked (see {@link PanelInfo.serializable}),
|
|
652
|
-
* and `layout:changed` is published. Does nothing for a panel that isn't open
|
|
652
|
+
* and `layout:changed` is published. Does nothing for a panel that isn't open, or for a managed
|
|
653
|
+
* widget's own panel (it has no props of its own).
|
|
653
654
|
* @param id - Panel instance ID.
|
|
654
655
|
* @param props - The new props, or a function of the current ones.
|
|
655
656
|
* @example
|
|
@@ -2571,8 +2572,9 @@ interface ManagedWidget {
|
|
|
2571
2572
|
/**
|
|
2572
2573
|
* The menu on the widget's title icon (7.11.0), in the app's own words: a "Dock below the map" or
|
|
2573
2574
|
* "Back into the map" item calls `w.move()`. With it, the title icon becomes a button that opens
|
|
2574
|
-
* these items. Out of the panel,
|
|
2575
|
-
* before the built-in Minimize and Close
|
|
2575
|
+
* these items. Out of the panel, its tab's icon and its floating title-bar icon open them too: they
|
|
2576
|
+
* lead the tab's menu (before the built-in Minimize and Close) and the floating window's ⋮ menu
|
|
2577
|
+
* (before Close). The built-in Float is left out, because these replace it.
|
|
2576
2578
|
* Called each time the menu opens, so items can depend on where the widget is.
|
|
2577
2579
|
* @example
|
|
2578
2580
|
* titleMenu: w => w.location === 'panel'
|
|
@@ -2602,7 +2604,8 @@ interface ManagedWidget {
|
|
|
2602
2604
|
/**
|
|
2603
2605
|
* Where a managed widget is, as plain JSON (7.11.0): from `useFloatingWidgets().placement(id)`,
|
|
2604
2606
|
* back to `open(id, { placement })`. Opaque: store it as it is (JSON-serialisable) and don't read
|
|
2605
|
-
* its fields; they may change between versions, and `v` says which. The same in
|
|
2607
|
+
* its fields; they may change between versions, and `v` says which. The same in the Vue and Angular
|
|
2608
|
+
* editions (vue-dockable-desktop, angular-dockable-desktop).
|
|
2606
2609
|
*/
|
|
2607
2610
|
type WidgetPlacement = {
|
|
2608
2611
|
readonly v: 1;
|
|
@@ -2632,8 +2635,8 @@ type WidgetLocation = 'panel' | 'docked' | 'tabbed' | 'floating' | 'minimized';
|
|
|
2632
2635
|
* Where to move a managed widget with `useFloatingWidgets().move()` (7.11.0). Its owner panel is
|
|
2633
2636
|
* always the reference: `'docked'` splits the owner's group on that side (`size` is the new
|
|
2634
2637
|
* panel's share, 0.1–0.9, as in `openPanel`'s `dockTo`), `'tabbed'` adds a tab to the owner's
|
|
2635
|
-
* group. `'floating'` opens a floating window at `rect` (workspace pixels), or
|
|
2636
|
-
* on screen. `'panel'` brings it back to where it last was inside the panel.
|
|
2638
|
+
* group. `'floating'` opens a floating window at `rect` (workspace pixels), or, without one, where
|
|
2639
|
+
* the widget is on screen, at its size. `'panel'` brings it back to where it last was inside the panel.
|
|
2637
2640
|
*/
|
|
2638
2641
|
type WidgetTarget = {
|
|
2639
2642
|
to: 'panel';
|
|
@@ -2943,7 +2946,7 @@ interface FloatingWidgetsApi {
|
|
|
2943
2946
|
* it goes back to). Give it back to `open(id, { placement })` after a reload. `null` if it isn't open.
|
|
2944
2947
|
* @example
|
|
2945
2948
|
* const saved = widgets.placement('table'); // store it
|
|
2946
|
-
* widgets.open('table', { ...config, placement: saved }); // later: it opens where it was
|
|
2949
|
+
* widgets.open('table', { ...config, placement: saved ?? undefined }); // later: it opens where it was
|
|
2947
2950
|
*/
|
|
2948
2951
|
placement(id: string): WidgetPlacement | null;
|
|
2949
2952
|
}
|
|
@@ -2982,10 +2985,10 @@ interface WidgetHandle {
|
|
|
2982
2985
|
ownerPanelId: string | null;
|
|
2983
2986
|
/**
|
|
2984
2987
|
* The id of the widget's own panel while it is out of its owner panel, for workspace calls such
|
|
2985
|
-
* as `updatePanelTitle`; `null` while it is in the panel (7.11.0
|
|
2988
|
+
* as `updatePanelTitle`; `null` while it is in the panel (7.11.0).
|
|
2986
2989
|
*/
|
|
2987
2990
|
panelId: string | null;
|
|
2988
|
-
/** Where it is shown now. A component that
|
|
2991
|
+
/** Where it is shown now. A component that calls `useWidget()` re-renders when it changes. */
|
|
2989
2992
|
location: WidgetLocation;
|
|
2990
2993
|
/**
|
|
2991
2994
|
* Called just before the widget's content element moves to another container: into or out of
|
|
@@ -2995,8 +2998,8 @@ interface WidgetHandle {
|
|
|
2995
2998
|
onWillMove(cb: () => void): () => void;
|
|
2996
2999
|
/**
|
|
2997
3000
|
* Called once the element is in its new container and has its new size (or, with no size, as
|
|
2998
|
-
* when minimised, on the next frames)
|
|
2999
|
-
* unsubscribe function.
|
|
3001
|
+
* when minimised, on the next frames), after every move that called `onWillMove`. Restore what
|
|
3002
|
+
* you saved in `onWillMove` here. Returns the unsubscribe function.
|
|
3000
3003
|
*/
|
|
3001
3004
|
onMoved(cb: () => void): () => void;
|
|
3002
3005
|
}
|