flexdesk 0.8.0 → 0.8.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/README.md +2 -0
- package/dist/wm.js +10 -3
- package/dist/wm.js.map +2 -2
- package/package.json +1 -1
- package/src/tiling/shell.js +7 -0
- package/src/tiling/tile_renderer.js +9 -3
- package/src/tiling/wm.js +3 -1
package/README.md
CHANGED
|
@@ -122,6 +122,7 @@ await createShell({
|
|
|
122
122
|
backToOpenList: true, // Back in a record opened beside its list closes onto that list
|
|
123
123
|
floatActiveTab: true, // floating a tile takes the tab on screen, not the whole pane
|
|
124
124
|
tabLayout: 'header', // tabs in the tile header, in place of its title, with a + (0.8.0)
|
|
125
|
+
newTabButton: false, // …and without the + (0.8.1)
|
|
125
126
|
chrome: {
|
|
126
127
|
topNav: document.getElementById('nav'),
|
|
127
128
|
zoom: document.getElementById('status-bar'), // content zoom, 50–200%
|
|
@@ -158,6 +159,7 @@ editor tab bar between the header and the body, also from two tabs.
|
|
|
158
159
|
`'header'` (0.8.0) puts that tab bar inside the header in place of the title,
|
|
159
160
|
on every tile, one tab included, with a `+` after the last tab that opens the
|
|
160
161
|
taxonomy root in a new tab (`wm.newTab(leafId)`, the same seed a split uses).
|
|
162
|
+
Pass `newTabButton: false` (0.8.1) to leave the `+` out.
|
|
161
163
|
A panel tile has no tabs and keeps its title. Under `'header'` the tab, not
|
|
162
164
|
the header, is what you drag to move a single-tab pane; the empty part of the
|
|
163
165
|
header still floats the pane on a pull-down or a double-click. Set
|
package/dist/wm.js
CHANGED
|
@@ -2728,7 +2728,8 @@ var TileRenderer = class {
|
|
|
2728
2728
|
ctx,
|
|
2729
2729
|
onFocusChange,
|
|
2730
2730
|
onAfterRender,
|
|
2731
|
-
tabLayout = null
|
|
2731
|
+
tabLayout = null,
|
|
2732
|
+
newTabButton = true
|
|
2732
2733
|
}) {
|
|
2733
2734
|
if (!content || typeof content.mount !== "function") {
|
|
2734
2735
|
throw new Error("TileRenderer: a content registry is required");
|
|
@@ -2741,6 +2742,7 @@ var TileRenderer = class {
|
|
|
2741
2742
|
});
|
|
2742
2743
|
this.onAfterRender = onAfterRender || (() => {
|
|
2743
2744
|
});
|
|
2745
|
+
this.newTabButton = newTabButton !== false;
|
|
2744
2746
|
this._leafCache = /* @__PURE__ */ new Map();
|
|
2745
2747
|
this._drag = null;
|
|
2746
2748
|
this._tabDrag = null;
|
|
@@ -3318,7 +3320,7 @@ var TileRenderer = class {
|
|
|
3318
3320
|
);
|
|
3319
3321
|
}, true);
|
|
3320
3322
|
}
|
|
3321
|
-
if (this.tabLayout === "header" && !bar.querySelector(".twm-leaf__tab-new")) {
|
|
3323
|
+
if (this.tabLayout === "header" && this.newTabButton && !bar.querySelector(".twm-leaf__tab-new")) {
|
|
3322
3324
|
const add = document.createElement("button");
|
|
3323
3325
|
add.type = "button";
|
|
3324
3326
|
add.className = "twm-leaf__tab-new";
|
|
@@ -4051,7 +4053,8 @@ var WindowManager = class _WindowManager {
|
|
|
4051
4053
|
promoteInPlace = false,
|
|
4052
4054
|
tabLayout = null,
|
|
4053
4055
|
backToOpenList = false,
|
|
4054
|
-
floatActiveTab = false
|
|
4056
|
+
floatActiveTab = false,
|
|
4057
|
+
newTabButton = true
|
|
4055
4058
|
}) {
|
|
4056
4059
|
if (!taxonomy) throw new Error("WindowManager: a taxonomy is required");
|
|
4057
4060
|
if (!content || typeof content.mount !== "function") {
|
|
@@ -4102,6 +4105,8 @@ var WindowManager = class _WindowManager {
|
|
|
4102
4105
|
* `data-twm-tabs` and watches it, so an embedder can change it
|
|
4103
4106
|
* live without holding a renderer reference. */
|
|
4104
4107
|
tabLayout,
|
|
4108
|
+
/** C38. Whether the `header` strip draws its `+`. */
|
|
4109
|
+
newTabButton,
|
|
4105
4110
|
ctx: {
|
|
4106
4111
|
...this.ctx,
|
|
4107
4112
|
wm: this,
|
|
@@ -7691,6 +7696,7 @@ async function createShell({
|
|
|
7691
7696
|
backToOpenList = false,
|
|
7692
7697
|
floatActiveTab = false,
|
|
7693
7698
|
tabLayout = null,
|
|
7699
|
+
newTabButton = true,
|
|
7694
7700
|
chrome = {},
|
|
7695
7701
|
// An embedder that moved its sections out of the top bar — into an icon
|
|
7696
7702
|
// rail, say — passes the selector its own buttons match, and F1..F8 keep
|
|
@@ -7732,6 +7738,7 @@ async function createShell({
|
|
|
7732
7738
|
backToOpenList,
|
|
7733
7739
|
floatActiveTab,
|
|
7734
7740
|
tabLayout,
|
|
7741
|
+
newTabButton,
|
|
7735
7742
|
// `ctx` is the delivery vehicle for leaf-mounted chrome: tile_renderer
|
|
7736
7743
|
// spreads it into every content factory, which is how the breadcrumb
|
|
7737
7744
|
// gets `taxonomy` + `rootCrumb` without a content factory knowing they
|