nexus-shell 0.1.0 → 0.1.2
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 -1
- package/dist/core/registry/ComponentRegistry.d.ts +20 -0
- package/dist/index.d.ts +1 -0
- package/dist/nexus-shell.es.js +292 -263
- package/dist/nexus-shell.umd.js +37 -37
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/nexus-shell.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var ha = Object.defineProperty;
|
|
2
2
|
var fa = (n, e, t) => e in n ? ha(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
-
var
|
|
4
|
-
import B, { forwardRef as hs, createElement as $t, useState as je, useEffect as Pe, useRef as
|
|
3
|
+
var sn = (n, e, t) => fa(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import B, { forwardRef as hs, createElement as $t, useState as je, useEffect as Pe, useRef as gn } from "react";
|
|
5
5
|
import xi from "react-dom";
|
|
6
6
|
var Qn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
7
7
|
function ga(n) {
|
|
@@ -306,19 +306,19 @@ var Fe = {};
|
|
|
306
306
|
Object.defineProperty(Fe, "__esModule", { value: !0 });
|
|
307
307
|
Fe.Rect = void 0;
|
|
308
308
|
const _a = Ce;
|
|
309
|
-
class
|
|
309
|
+
class cn {
|
|
310
310
|
static empty() {
|
|
311
|
-
return new
|
|
311
|
+
return new cn(0, 0, 0, 0);
|
|
312
312
|
}
|
|
313
313
|
constructor(e, t, o, i) {
|
|
314
314
|
this.x = e, this.y = t, this.width = o, this.height = i;
|
|
315
315
|
}
|
|
316
316
|
static fromElement(e) {
|
|
317
317
|
let { x: t, y: o, width: i, height: r } = e.getBoundingClientRect();
|
|
318
|
-
return new
|
|
318
|
+
return new cn(t, o, i, r);
|
|
319
319
|
}
|
|
320
320
|
clone() {
|
|
321
|
-
return new
|
|
321
|
+
return new cn(this.x, this.y, this.width, this.height);
|
|
322
322
|
}
|
|
323
323
|
equals(e) {
|
|
324
324
|
return this.x === (e == null ? void 0 : e.x) && this.y === (e == null ? void 0 : e.y) && this.width === (e == null ? void 0 : e.width) && this.height === (e == null ? void 0 : e.height);
|
|
@@ -342,7 +342,7 @@ class dn {
|
|
|
342
342
|
return this.x <= e && e <= this.getRight() && this.y <= t && t <= this.getBottom();
|
|
343
343
|
}
|
|
344
344
|
removeInsets(e) {
|
|
345
|
-
return new
|
|
345
|
+
return new cn(this.x + e.left, this.y + e.top, Math.max(0, this.width - e.left - e.right), Math.max(0, this.height - e.top - e.bottom));
|
|
346
346
|
}
|
|
347
347
|
centerInRect(e) {
|
|
348
348
|
this.x = (e.width - this.width) / 2, this.y = (e.height - this.height) / 2;
|
|
@@ -356,7 +356,7 @@ class dn {
|
|
|
356
356
|
return "(Rect: x=" + this.x + ", y=" + this.y + ", width=" + this.width + ", height=" + this.height + ")";
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
|
-
Fe.Rect =
|
|
359
|
+
Fe.Rect = cn;
|
|
360
360
|
Object.defineProperty(ht, "__esModule", { value: !0 });
|
|
361
361
|
ht.DockLocation = void 0;
|
|
362
362
|
const Pn = Ce, nt = Fe;
|
|
@@ -2340,7 +2340,7 @@ vo.Tab = nl;
|
|
|
2340
2340
|
var Eo = {}, yo = {};
|
|
2341
2341
|
Object.defineProperty(yo, "__esModule", { value: !0 });
|
|
2342
2342
|
yo.TabButton = void 0;
|
|
2343
|
-
const Ct = B, ol = At, Yo = et, il = Fe, gr = bo,
|
|
2343
|
+
const Ct = B, ol = At, Yo = et, il = Fe, gr = bo, an = Le, Xo = Je, rl = (n) => {
|
|
2344
2344
|
const { layout: e, node: t, selected: o, iconFactory: i, titleFactory: r, icons: s, path: a } = n, c = Ct.useRef(null), f = Ct.useRef(null), m = (I) => {
|
|
2345
2345
|
!(0, Xo.isAuxMouseEvent)(I) && !e.getEditingTab() && e.dragStart(I, void 0, t, t.isEnableDrag(), d, l);
|
|
2346
2346
|
}, h = (I) => {
|
|
@@ -2375,14 +2375,14 @@ const Ct = B, ol = At, Yo = et, il = Fe, gr = bo, sn = Le, Xo = Je, rl = (n) =>
|
|
|
2375
2375
|
}, x = (I) => {
|
|
2376
2376
|
I.code === "Escape" ? e.setEditingTab(void 0) : I.code === "Enter" && (e.setEditingTab(void 0), e.doAction(Yo.Actions.renameTab(t.getId(), I.target.value)));
|
|
2377
2377
|
}, T = e.getClassName, w = t.getParent(), N = w.isEnableSingleTabStretch() && w.getChildren().length === 1;
|
|
2378
|
-
let A = N ?
|
|
2378
|
+
let A = N ? an.CLASSES.FLEXLAYOUT__TAB_BUTTON_STRETCH : an.CLASSES.FLEXLAYOUT__TAB_BUTTON, C = T(A);
|
|
2379
2379
|
C += " " + T(A + "_" + w.getTabLocation()), N || (o ? C += " " + T(A + "--selected") : C += " " + T(A + "--unselected")), t.getClassName() !== void 0 && (C += " " + t.getClassName());
|
|
2380
2380
|
const R = (0, Xo.getRenderStateEx)(e, t, i, r);
|
|
2381
|
-
let F = R.content ? Ct.createElement("div", { className: T(
|
|
2382
|
-
const k = R.leading ? Ct.createElement("div", { className: T(
|
|
2383
|
-
if (e.getEditingTab() === t && (F = Ct.createElement("input", { ref: f, className: T(
|
|
2381
|
+
let F = R.content ? Ct.createElement("div", { className: T(an.CLASSES.FLEXLAYOUT__TAB_BUTTON_CONTENT) }, R.content) : null;
|
|
2382
|
+
const k = R.leading ? Ct.createElement("div", { className: T(an.CLASSES.FLEXLAYOUT__TAB_BUTTON_LEADING) }, R.leading) : null;
|
|
2383
|
+
if (e.getEditingTab() === t && (F = Ct.createElement("input", { ref: f, className: T(an.CLASSES.FLEXLAYOUT__TAB_BUTTON_TEXTBOX), "data-layout-path": a + "/textbox", type: "text", autoFocus: !0, defaultValue: t.getName(), onKeyDown: x, onMouseDown: y, onTouchStart: y })), t.isEnableClose() && !N) {
|
|
2384
2384
|
const I = e.i18nName(ol.I18nLabel.Close_Tab);
|
|
2385
|
-
R.buttons.push(Ct.createElement("div", { key: "close", "data-layout-path": a + "/button/close", title: I, className: T(
|
|
2385
|
+
R.buttons.push(Ct.createElement("div", { key: "close", "data-layout-path": a + "/button/close", title: I, className: T(an.CLASSES.FLEXLAYOUT__TAB_BUTTON_TRAILING), onMouseDown: v, onClick: _, onTouchStart: v }, typeof s.close == "function" ? s.close(t) : s.close));
|
|
2386
2386
|
}
|
|
2387
2387
|
return Ct.createElement(
|
|
2388
2388
|
"div",
|
|
@@ -2700,7 +2700,7 @@ const Al = () => Ie.createElement(
|
|
|
2700
2700
|
$e.RestoreIcon = Al;
|
|
2701
2701
|
Object.defineProperty(fo, "__esModule", { value: !0 });
|
|
2702
2702
|
fo.Layout = void 0;
|
|
2703
|
-
const $ = B, Ol = xi, lt = ht, Dt = Zt,
|
|
2703
|
+
const $ = B, Ol = xi, lt = ht, Dt = Zt, ln = et, Nl = Rt(), br = Kt, It = Ut, Tr = jt(), no = Fe, Ge = Le, Cl = mo, vr = To, Er = vo, Ll = Eo, yr = xo, xr = So, Sr = wo, Zo = Ce, Gt = $e, Dl = Yn, Il = {
|
|
2704
2704
|
close: $.createElement(Gt.CloseIcon, null),
|
|
2705
2705
|
closeTabset: $.createElement(Gt.CloseIcon, null),
|
|
2706
2706
|
popout: $.createElement(Gt.PopoutIcon, null),
|
|
@@ -2732,7 +2732,7 @@ class zl extends $.Component {
|
|
|
2732
2732
|
t !== this.state.calculatedBorderBarSize && this.setState({ calculatedBorderBarSize: t });
|
|
2733
2733
|
}
|
|
2734
2734
|
}, this.getClassName = (t) => this.props.classNameMapper === void 0 ? t : this.props.classNameMapper(t), this.onCloseWindow = (t) => {
|
|
2735
|
-
this.doAction(
|
|
2735
|
+
this.doAction(ln.Actions.unFloatTab(t));
|
|
2736
2736
|
try {
|
|
2737
2737
|
this.props.model.getNodeById(t)._setWindow(void 0);
|
|
2738
2738
|
} catch {
|
|
@@ -2836,9 +2836,9 @@ class zl extends $.Component {
|
|
|
2836
2836
|
console.error(i);
|
|
2837
2837
|
}
|
|
2838
2838
|
} else if (this.newTabJson !== void 0) {
|
|
2839
|
-
const i = this.doAction(
|
|
2839
|
+
const i = this.doAction(ln.Actions.addNode(this.newTabJson, this.dropInfo.node.getId(), this.dropInfo.location, this.dropInfo.index));
|
|
2840
2840
|
this.fnNewNodeDropped != null && (this.fnNewNodeDropped(i, t), this.fnNewNodeDropped = void 0), this.newTabJson = void 0;
|
|
2841
|
-
} else this.dragNode !== void 0 && this.doAction(
|
|
2841
|
+
} else this.dragNode !== void 0 && this.doAction(ln.Actions.moveNode(this.dragNode.getId(), this.dropInfo.node.getId(), this.dropInfo.location, this.dropInfo.index));
|
|
2842
2842
|
this.setState({ showHiddenBorder: lt.DockLocation.CENTER });
|
|
2843
2843
|
}, this.props.model._setChangeListener(this.onModelChange), this.tabIds = [], this.selfRef = $.createRef(), this.findHeaderBarSizeRef = $.createRef(), this.findTabBarSizeRef = $.createRef(), this.findBorderBarSizeRef = $.createRef(), this.supportsPopout = e.supportsPopout !== void 0 ? e.supportsPopout : kl, this.popoutURL = e.popoutURL ? e.popoutURL : "popout.html", this.icons = Object.assign(Object.assign({}, Il), e.icons), this.state = {
|
|
2844
2844
|
rect: new no.Rect(0, 0, 0, 0),
|
|
@@ -3054,7 +3054,7 @@ class zl extends $.Component {
|
|
|
3054
3054
|
*/
|
|
3055
3055
|
addTabToTabSet(e, t) {
|
|
3056
3056
|
if (this.props.model.getNodeById(e) !== void 0)
|
|
3057
|
-
return this.doAction(
|
|
3057
|
+
return this.doAction(ln.Actions.addNode(t, e, lt.DockLocation.CENTER, -1));
|
|
3058
3058
|
}
|
|
3059
3059
|
/**
|
|
3060
3060
|
* Adds a new tab to the active tabset (if there is one)
|
|
@@ -3064,7 +3064,7 @@ class zl extends $.Component {
|
|
|
3064
3064
|
addTabToActiveTabSet(e) {
|
|
3065
3065
|
const t = this.props.model.getActiveTabset();
|
|
3066
3066
|
if (t !== void 0)
|
|
3067
|
-
return this.doAction(
|
|
3067
|
+
return this.doAction(ln.Actions.addNode(e, t.getId(), lt.DockLocation.CENTER, -1));
|
|
3068
3068
|
}
|
|
3069
3069
|
/**
|
|
3070
3070
|
* Adds a new tab by dragging a labeled panel to the drop location, dragging starts immediatelly
|
|
@@ -3154,7 +3154,7 @@ class zl extends $.Component {
|
|
|
3154
3154
|
}
|
|
3155
3155
|
/** @internal */
|
|
3156
3156
|
maximize(e) {
|
|
3157
|
-
this.doAction(
|
|
3157
|
+
this.doAction(ln.Actions.maximizeToggle(e.getId()));
|
|
3158
3158
|
}
|
|
3159
3159
|
/** @internal */
|
|
3160
3160
|
customizeTab(e, t) {
|
|
@@ -3274,7 +3274,7 @@ Object.defineProperty(ps, "__esModule", { value: !0 });
|
|
|
3274
3274
|
var Ro = {};
|
|
3275
3275
|
Object.defineProperty(Ro, "__esModule", { value: !0 });
|
|
3276
3276
|
Ro.Model = void 0;
|
|
3277
|
-
const q = xt, jl = St, Ko = ht, wr = Ce, Rr = Fe, Ve = et, On = Rt(), Ar = $n,
|
|
3277
|
+
const q = xt, jl = St, Ko = ht, wr = Ce, Rr = Fe, Ve = et, On = Rt(), Ar = $n, dn = Si(), Bt = Ut, dt = jt(), Qo = wi();
|
|
3278
3278
|
class qe {
|
|
3279
3279
|
/**
|
|
3280
3280
|
* Loads the model from the given json object
|
|
@@ -3283,7 +3283,7 @@ class qe {
|
|
|
3283
3283
|
*/
|
|
3284
3284
|
static fromJson(e) {
|
|
3285
3285
|
const t = new qe();
|
|
3286
|
-
return qe._attributeDefinitions.fromJson(e.global, t._attributes), e.borders && (t._borders = Ar.BorderSet._fromJson(e.borders, t)), t._root =
|
|
3286
|
+
return qe._attributeDefinitions.fromJson(e.global, t._attributes), e.borders && (t._borders = Ar.BorderSet._fromJson(e.borders, t)), t._root = dn.RowNode._fromJson(e.layout, t), t._tidy(), t;
|
|
3287
3287
|
}
|
|
3288
3288
|
/** @internal */
|
|
3289
3289
|
static _createAttributeDefinitions() {
|
|
@@ -3399,14 +3399,14 @@ class qe {
|
|
|
3399
3399
|
switch (e.type) {
|
|
3400
3400
|
case Ve.Actions.ADD_NODE: {
|
|
3401
3401
|
const o = new Bt.TabNode(this, e.data.json, !0), i = this._idMap[e.data.toNode];
|
|
3402
|
-
(i instanceof dt.TabSetNode || i instanceof On.BorderNode || i instanceof
|
|
3402
|
+
(i instanceof dt.TabSetNode || i instanceof On.BorderNode || i instanceof dn.RowNode) && (i.drop(o, Ko.DockLocation.getByName(e.data.location), e.data.index, e.data.select), t = o);
|
|
3403
3403
|
break;
|
|
3404
3404
|
}
|
|
3405
3405
|
case Ve.Actions.MOVE_NODE: {
|
|
3406
3406
|
const o = this._idMap[e.data.fromNode];
|
|
3407
3407
|
if (o instanceof Bt.TabNode || o instanceof dt.TabSetNode) {
|
|
3408
3408
|
const i = this._idMap[e.data.toNode];
|
|
3409
|
-
(i instanceof dt.TabSetNode || i instanceof On.BorderNode || i instanceof
|
|
3409
|
+
(i instanceof dt.TabSetNode || i instanceof On.BorderNode || i instanceof dn.RowNode) && i.drop(o, Ko.DockLocation.getByName(e.data.location), e.data.index, e.data.select);
|
|
3410
3410
|
}
|
|
3411
3411
|
break;
|
|
3412
3412
|
}
|
|
@@ -3461,7 +3461,7 @@ class qe {
|
|
|
3461
3461
|
}
|
|
3462
3462
|
case Ve.Actions.ADJUST_SPLIT: {
|
|
3463
3463
|
const o = this._idMap[e.data.node1], i = this._idMap[e.data.node2];
|
|
3464
|
-
(o instanceof dt.TabSetNode || o instanceof
|
|
3464
|
+
(o instanceof dt.TabSetNode || o instanceof dn.RowNode) && (i instanceof dt.TabSetNode || i instanceof dn.RowNode) && (this._adjustSplitSide(o, e.data.weight1, e.data.pixelWidth1), this._adjustSplitSide(i, e.data.weight2, e.data.pixelWidth2));
|
|
3465
3465
|
break;
|
|
3466
3466
|
}
|
|
3467
3467
|
case Ve.Actions.ADJUST_BORDER_SPLIT: {
|
|
@@ -3574,7 +3574,7 @@ class qe {
|
|
|
3574
3574
|
return this._onCreateTabSet;
|
|
3575
3575
|
}
|
|
3576
3576
|
static toTypescriptInterfaces() {
|
|
3577
|
-
console.log(qe._attributeDefinitions.toTypescriptInterface("Global", void 0)), console.log(
|
|
3577
|
+
console.log(qe._attributeDefinitions.toTypescriptInterface("Global", void 0)), console.log(dn.RowNode.getAttributeDefinitions().toTypescriptInterface("Row", qe._attributeDefinitions)), console.log(dt.TabSetNode.getAttributeDefinitions().toTypescriptInterface("TabSet", qe._attributeDefinitions)), console.log(Bt.TabNode.getAttributeDefinitions().toTypescriptInterface("Tab", qe._attributeDefinitions)), console.log(On.BorderNode.getAttributeDefinitions().toTypescriptInterface("Border", qe._attributeDefinitions));
|
|
3578
3578
|
}
|
|
3579
3579
|
toString() {
|
|
3580
3580
|
return JSON.stringify(this.toJson());
|
|
@@ -3598,7 +3598,7 @@ qe._attributeDefinitions = qe._createAttributeDefinitions();
|
|
|
3598
3598
|
})(zt);
|
|
3599
3599
|
class Pl {
|
|
3600
3600
|
constructor() {
|
|
3601
|
-
|
|
3601
|
+
sn(this, "menus", /* @__PURE__ */ new Map());
|
|
3602
3602
|
}
|
|
3603
3603
|
registerMenu(e, t) {
|
|
3604
3604
|
var o;
|
|
@@ -3617,10 +3617,10 @@ class Pl {
|
|
|
3617
3617
|
}), e;
|
|
3618
3618
|
}
|
|
3619
3619
|
}
|
|
3620
|
-
const
|
|
3620
|
+
const pn = new Pl();
|
|
3621
3621
|
class Hl {
|
|
3622
3622
|
constructor() {
|
|
3623
|
-
|
|
3623
|
+
sn(this, "commands", /* @__PURE__ */ new Map());
|
|
3624
3624
|
}
|
|
3625
3625
|
registerCommand(e) {
|
|
3626
3626
|
if (this.commands.has(e.id)) {
|
|
@@ -4012,9 +4012,9 @@ const Ao = be("X", [
|
|
|
4012
4012
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
4013
4013
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
4014
4014
|
]), hd = ({ rightContent: n }) => {
|
|
4015
|
-
const [e, t] = je(
|
|
4015
|
+
const [e, t] = je(pn.getAllMenus());
|
|
4016
4016
|
Pe(() => {
|
|
4017
|
-
t(
|
|
4017
|
+
t(pn.getAllMenus());
|
|
4018
4018
|
}, []);
|
|
4019
4019
|
const o = (s) => {
|
|
4020
4020
|
s && yt.executeCommand(s);
|
|
@@ -4585,7 +4585,7 @@ function zd(n, ...e) {
|
|
|
4585
4585
|
const Te = (n) => {
|
|
4586
4586
|
const e = (t) => t[n] || [];
|
|
4587
4587
|
return e.isThemeGetter = !0, e;
|
|
4588
|
-
}, Rs = /^\[(?:([a-z-]+):)?(.+)\]$/i, Fd = /^\d+\/\d+$/, Ud = /* @__PURE__ */ new Set(["px", "full", "screen"]), jd = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Pd = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Hd = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Wd = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Yd = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, _t = (n) =>
|
|
4588
|
+
}, Rs = /^\[(?:([a-z-]+):)?(.+)\]$/i, Fd = /^\d+\/\d+$/, Ud = /* @__PURE__ */ new Set(["px", "full", "screen"]), jd = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Pd = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Hd = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Wd = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Yd = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, _t = (n) => un(n) || Ud.has(n) || Fd.test(n), Mt = (n) => mn(n, "length", Kd), un = (n) => !!n && !Number.isNaN(Number(n)), ii = (n) => mn(n, "number", un), Nn = (n) => !!n && Number.isInteger(Number(n)), Xd = (n) => n.endsWith("%") && un(n.slice(0, -1)), K = (n) => Rs.test(n), kt = (n) => jd.test(n), Gd = /* @__PURE__ */ new Set(["length", "size", "percentage"]), Vd = (n) => mn(n, Gd, As), $d = (n) => mn(n, "position", As), Jd = /* @__PURE__ */ new Set(["image", "url"]), Zd = (n) => mn(n, Jd, ec), qd = (n) => mn(n, "", Qd), Cn = () => !0, mn = (n, e, t) => {
|
|
4589
4589
|
const o = Rs.exec(n);
|
|
4590
4590
|
return o ? o[1] ? typeof e == "string" ? o[1] === e : e.has(o[1]) : t(o[2]) : !1;
|
|
4591
4591
|
}, Kd = (n) => (
|
|
@@ -4594,7 +4594,7 @@ const Te = (n) => {
|
|
|
4594
4594
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
4595
4595
|
Pd.test(n) && !Hd.test(n)
|
|
4596
4596
|
), As = () => !1, Qd = (n) => Wd.test(n), ec = (n) => Yd.test(n), tc = () => {
|
|
4597
|
-
const n = Te("colors"), e = Te("spacing"), t = Te("blur"), o = Te("brightness"), i = Te("borderColor"), r = Te("borderRadius"), s = Te("borderSpacing"), a = Te("borderWidth"), c = Te("contrast"), f = Te("grayscale"), m = Te("hueRotate"), h = Te("invert"), b = Te("gap"), d = Te("gradientColorStops"), l = Te("gradientColorStopPositions"), g = Te("inset"), u = Te("margin"), p = Te("opacity"), _ = Te("padding"), v = Te("saturate"), S = Te("scale"), y = Te("sepia"), x = Te("skew"), T = Te("space"), w = Te("translate"), N = () => ["auto", "contain", "none"], A = () => ["auto", "hidden", "clip", "visible", "scroll"], C = () => ["auto", K, e], R = () => [K, e], F = () => ["", _t, Mt], k = () => ["auto",
|
|
4597
|
+
const n = Te("colors"), e = Te("spacing"), t = Te("blur"), o = Te("brightness"), i = Te("borderColor"), r = Te("borderRadius"), s = Te("borderSpacing"), a = Te("borderWidth"), c = Te("contrast"), f = Te("grayscale"), m = Te("hueRotate"), h = Te("invert"), b = Te("gap"), d = Te("gradientColorStops"), l = Te("gradientColorStopPositions"), g = Te("inset"), u = Te("margin"), p = Te("opacity"), _ = Te("padding"), v = Te("saturate"), S = Te("scale"), y = Te("sepia"), x = Te("skew"), T = Te("space"), w = Te("translate"), N = () => ["auto", "contain", "none"], A = () => ["auto", "hidden", "clip", "visible", "scroll"], C = () => ["auto", K, e], R = () => [K, e], F = () => ["", _t, Mt], k = () => ["auto", un, K], I = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], Y = () => ["solid", "dashed", "dotted", "double", "none"], P = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], z = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], V = () => ["", "0", K], se = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], O = () => [un, K];
|
|
4598
4598
|
return {
|
|
4599
4599
|
cacheSize: 500,
|
|
4600
4600
|
separator: ":",
|
|
@@ -5333,7 +5333,7 @@ const Te = (n) => {
|
|
|
5333
5333
|
* @see https://tailwindcss.com/docs/line-clamp
|
|
5334
5334
|
*/
|
|
5335
5335
|
"line-clamp": [{
|
|
5336
|
-
"line-clamp": ["none",
|
|
5336
|
+
"line-clamp": ["none", un, ii]
|
|
5337
5337
|
}],
|
|
5338
5338
|
/**
|
|
5339
5339
|
* Line Height
|
|
@@ -6786,7 +6786,7 @@ function si(...n) {
|
|
|
6786
6786
|
const sc = () => {
|
|
6787
6787
|
const { isChatOpen: n, setChatOpen: e } = Os(), { slashCommands: t } = Li(), [o, i] = je([
|
|
6788
6788
|
{ id: 1, sender: "Nexus", text: "Welcome to the Nexus Shell chat! How can I help you today?" }
|
|
6789
|
-
]), [r, s] = je(""), [a, c] = je(!1), [f, m] = je(0), h =
|
|
6789
|
+
]), [r, s] = je(""), [a, c] = je(!1), [f, m] = je(0), h = gn(null), b = t.filter(
|
|
6790
6790
|
(u) => `/${u.command}`.startsWith(r.toLowerCase())
|
|
6791
6791
|
);
|
|
6792
6792
|
if (Pe(() => {
|
|
@@ -6874,14 +6874,14 @@ const sc = () => {
|
|
|
6874
6874
|
onChange: (u) => s(u.target.value),
|
|
6875
6875
|
onKeyDown: g,
|
|
6876
6876
|
placeholder: "Ask Nexus... (Type / for commands)",
|
|
6877
|
-
className: "w-full bg-
|
|
6877
|
+
className: "w-full bg-secondary/50 border border-border rounded-md p-3 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-all resize-none min-h-[80px]"
|
|
6878
6878
|
}
|
|
6879
6879
|
),
|
|
6880
6880
|
/* @__PURE__ */ E.jsx(
|
|
6881
6881
|
"button",
|
|
6882
6882
|
{
|
|
6883
6883
|
onClick: d,
|
|
6884
|
-
className: "absolute right-
|
|
6884
|
+
className: "absolute right-3 bottom-3 inline-flex items-center justify-center p-2 rounded-md bg-primary text-primary-foreground hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background transition-colors",
|
|
6885
6885
|
children: /* @__PURE__ */ E.jsx(ad, { size: 14 })
|
|
6886
6886
|
}
|
|
6887
6887
|
)
|
|
@@ -6904,7 +6904,7 @@ const sc = () => {
|
|
|
6904
6904
|
addHistory: (e) => n((t) => ({ history: [...t.history, e] })),
|
|
6905
6905
|
clearHistory: () => n({ history: [] })
|
|
6906
6906
|
})), ac = () => {
|
|
6907
|
-
const { isOpen: n, setOpen: e, history: t, addHistory: o, clearHistory: i } = Ns(), [r, s] = je(""), a =
|
|
6907
|
+
const { isOpen: n, setOpen: e, history: t, addHistory: o, clearHistory: i } = Ns(), [r, s] = je(""), a = gn(null), c = gn(null);
|
|
6908
6908
|
if (Pe(() => {
|
|
6909
6909
|
a.current && (a.current.scrollTop = a.current.scrollHeight);
|
|
6910
6910
|
}, [t]), Pe(() => {
|
|
@@ -7022,14 +7022,39 @@ const sc = () => {
|
|
|
7022
7022
|
);
|
|
7023
7023
|
}
|
|
7024
7024
|
};
|
|
7025
|
-
})
|
|
7025
|
+
});
|
|
7026
|
+
class lc {
|
|
7027
|
+
constructor() {
|
|
7028
|
+
sn(this, "components", /* @__PURE__ */ new Map());
|
|
7029
|
+
}
|
|
7030
|
+
/**
|
|
7031
|
+
* Register a component with a unique ID.
|
|
7032
|
+
* This ID is what you use in your FlexLayout models.
|
|
7033
|
+
*/
|
|
7034
|
+
register(e, t) {
|
|
7035
|
+
this.components.has(e) && console.warn(`Component with ID "${e}" is already registered.`), this.components.set(e, t);
|
|
7036
|
+
}
|
|
7037
|
+
/**
|
|
7038
|
+
* Retrieve a registered component by its ID.
|
|
7039
|
+
*/
|
|
7040
|
+
get(e) {
|
|
7041
|
+
return this.components.get(e);
|
|
7042
|
+
}
|
|
7043
|
+
/**
|
|
7044
|
+
* Get all registered component IDs.
|
|
7045
|
+
*/
|
|
7046
|
+
getRegisteredIds() {
|
|
7047
|
+
return Array.from(this.components.keys());
|
|
7048
|
+
}
|
|
7049
|
+
}
|
|
7050
|
+
const dc = new lc(), Vu = ({ panels: n, slashCommands: e, menuConfig: t, statusBarConfig: o, rightMenuBarContent: i }) => {
|
|
7026
7051
|
const { model: r, setModel: s, isTabDirty: a, setTabDirty: c } = Cs(), { theme: f } = Ci(), { setPanels: m } = Oo(), { setSlashCommands: h } = Li(), { setWidgets: b } = Oi();
|
|
7027
7052
|
Pe(() => {
|
|
7028
7053
|
n && m(n);
|
|
7029
7054
|
}, [n, m]), Pe(() => {
|
|
7030
7055
|
e && h(e);
|
|
7031
7056
|
}, [e, h]), Pe(() => {
|
|
7032
|
-
t &&
|
|
7057
|
+
t && pn.setMenus(t);
|
|
7033
7058
|
}, [t]), Pe(() => {
|
|
7034
7059
|
o && b(o);
|
|
7035
7060
|
}, [o, b]);
|
|
@@ -7037,23 +7062,26 @@ const sc = () => {
|
|
|
7037
7062
|
try {
|
|
7038
7063
|
var u = g.getComponent();
|
|
7039
7064
|
const p = g.getId(), _ = a(p);
|
|
7040
|
-
|
|
7041
|
-
/* @__PURE__ */ E.
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
/* @__PURE__ */ E.
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7065
|
+
if (u === "welcome")
|
|
7066
|
+
return /* @__PURE__ */ E.jsxs("div", { className: "flex flex-col items-center justify-center h-full text-center space-y-4 p-8", children: [
|
|
7067
|
+
/* @__PURE__ */ E.jsx("h1", { className: "text-4xl font-bold text-primary", children: "Nexus Shell" }),
|
|
7068
|
+
/* @__PURE__ */ E.jsx("p", { className: "text-muted-foreground", children: "A professional-grade frontend framework built with React and TypeScript." }),
|
|
7069
|
+
/* @__PURE__ */ E.jsx("p", { className: "text-sm text-muted-foreground", children: "Start by exploring the menu or dragging tabs." }),
|
|
7070
|
+
/* @__PURE__ */ E.jsxs("div", { className: "mt-8 p-4 border rounded bg-muted/20", children: [
|
|
7071
|
+
/* @__PURE__ */ E.jsx("p", { className: "text-xs mb-2", children: "Tab Persistence & Lifecycle Test:" }),
|
|
7072
|
+
/* @__PURE__ */ E.jsx(
|
|
7073
|
+
"button",
|
|
7074
|
+
{
|
|
7075
|
+
onClick: () => c(p, !_),
|
|
7076
|
+
className: `inline-flex items-center justify-center px-4 py-2 text-sm font-medium transition-colors rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background ${_ ? "bg-destructive text-destructive-foreground hover:bg-destructive/90" : "bg-secondary text-secondary-foreground hover:bg-secondary/80"}`,
|
|
7077
|
+
children: _ ? "Mark as Saved (Clear Dirty)" : "Mark as Dirty (Unsaved Changes)"
|
|
7078
|
+
}
|
|
7079
|
+
),
|
|
7080
|
+
_ && /* @__PURE__ */ E.jsx("p", { className: "text-[10px] mt-1 text-destructive", children: "This tab will now prompt before closing." })
|
|
7081
|
+
] })
|
|
7082
|
+
] });
|
|
7083
|
+
const v = u ? dc.get(u) : void 0;
|
|
7084
|
+
return v ? /* @__PURE__ */ E.jsx(v, { node: g }) : /* @__PURE__ */ E.jsxs("div", { className: "p-4 text-sm", children: [
|
|
7057
7085
|
"Unknown Component: ",
|
|
7058
7086
|
u
|
|
7059
7087
|
] });
|
|
@@ -7095,11 +7123,11 @@ const sc = () => {
|
|
|
7095
7123
|
] }),
|
|
7096
7124
|
/* @__PURE__ */ E.jsx(oc, {})
|
|
7097
7125
|
] });
|
|
7098
|
-
}, No = 0, Pt = 1,
|
|
7126
|
+
}, No = 0, Pt = 1, _n = 2, Ls = 4;
|
|
7099
7127
|
function Wr(n) {
|
|
7100
7128
|
return () => n;
|
|
7101
7129
|
}
|
|
7102
|
-
function
|
|
7130
|
+
function cc(n) {
|
|
7103
7131
|
n();
|
|
7104
7132
|
}
|
|
7105
7133
|
function Ds(n, e) {
|
|
@@ -7108,23 +7136,23 @@ function Ds(n, e) {
|
|
|
7108
7136
|
function Yr(n, e) {
|
|
7109
7137
|
return () => n(e);
|
|
7110
7138
|
}
|
|
7111
|
-
function
|
|
7139
|
+
function uc(n, e) {
|
|
7112
7140
|
return (t) => n(e, t);
|
|
7113
7141
|
}
|
|
7114
7142
|
function Di(n) {
|
|
7115
7143
|
return n !== void 0;
|
|
7116
7144
|
}
|
|
7117
|
-
function
|
|
7145
|
+
function hc(...n) {
|
|
7118
7146
|
return () => {
|
|
7119
|
-
n.map(
|
|
7147
|
+
n.map(cc);
|
|
7120
7148
|
};
|
|
7121
7149
|
}
|
|
7122
|
-
function
|
|
7150
|
+
function bn() {
|
|
7123
7151
|
}
|
|
7124
7152
|
function Co(n, e) {
|
|
7125
7153
|
return e(n), n;
|
|
7126
7154
|
}
|
|
7127
|
-
function
|
|
7155
|
+
function fc(n, e) {
|
|
7128
7156
|
return e(n);
|
|
7129
7157
|
}
|
|
7130
7158
|
function Ee(...n) {
|
|
@@ -7137,13 +7165,13 @@ function Q(n, e) {
|
|
|
7137
7165
|
n(No, e);
|
|
7138
7166
|
}
|
|
7139
7167
|
function Ii(n) {
|
|
7140
|
-
n(
|
|
7168
|
+
n(_n);
|
|
7141
7169
|
}
|
|
7142
7170
|
function xe(n) {
|
|
7143
7171
|
return n(Ls);
|
|
7144
7172
|
}
|
|
7145
7173
|
function H(n, e) {
|
|
7146
|
-
return ue(n,
|
|
7174
|
+
return ue(n, uc(e, No));
|
|
7147
7175
|
}
|
|
7148
7176
|
function ct(n, e) {
|
|
7149
7177
|
const t = n(Pt, (o) => {
|
|
@@ -7182,10 +7210,10 @@ function ft(n) {
|
|
|
7182
7210
|
};
|
|
7183
7211
|
}
|
|
7184
7212
|
function L(n, ...e) {
|
|
7185
|
-
const t =
|
|
7213
|
+
const t = gc(...e);
|
|
7186
7214
|
return (o, i) => {
|
|
7187
7215
|
switch (o) {
|
|
7188
|
-
case
|
|
7216
|
+
case _n:
|
|
7189
7217
|
Ii(n);
|
|
7190
7218
|
return;
|
|
7191
7219
|
case Pt:
|
|
@@ -7228,17 +7256,17 @@ function ee(...n) {
|
|
|
7228
7256
|
t === i ? a() : o = a;
|
|
7229
7257
|
};
|
|
7230
7258
|
}
|
|
7231
|
-
function
|
|
7232
|
-
return (e) => n.reduceRight(
|
|
7259
|
+
function gc(...n) {
|
|
7260
|
+
return (e) => n.reduceRight(fc, e);
|
|
7233
7261
|
}
|
|
7234
|
-
function
|
|
7262
|
+
function pc(n) {
|
|
7235
7263
|
let e, t;
|
|
7236
7264
|
const o = () => e == null ? void 0 : e();
|
|
7237
7265
|
return function(i, r) {
|
|
7238
7266
|
switch (i) {
|
|
7239
7267
|
case Pt:
|
|
7240
|
-
return r ? t === r ? void 0 : (o(), t = r, e = ue(n, r), e) : (o(),
|
|
7241
|
-
case
|
|
7268
|
+
return r ? t === r ? void 0 : (o(), t = r, e = ue(n, r), e) : (o(), bn);
|
|
7269
|
+
case _n:
|
|
7242
7270
|
o(), t = null;
|
|
7243
7271
|
return;
|
|
7244
7272
|
}
|
|
@@ -7274,7 +7302,7 @@ function ie() {
|
|
|
7274
7302
|
o(t);
|
|
7275
7303
|
});
|
|
7276
7304
|
return;
|
|
7277
|
-
case
|
|
7305
|
+
case _n:
|
|
7278
7306
|
n.splice(0, n.length);
|
|
7279
7307
|
return;
|
|
7280
7308
|
case Pt:
|
|
@@ -7292,12 +7320,12 @@ function ae(n, e = [], { singleton: t } = { singleton: !0 }) {
|
|
|
7292
7320
|
return {
|
|
7293
7321
|
constructor: n,
|
|
7294
7322
|
dependencies: e,
|
|
7295
|
-
id:
|
|
7323
|
+
id: mc(),
|
|
7296
7324
|
singleton: t
|
|
7297
7325
|
};
|
|
7298
7326
|
}
|
|
7299
|
-
const
|
|
7300
|
-
function
|
|
7327
|
+
const mc = () => Symbol();
|
|
7328
|
+
function _c(n) {
|
|
7301
7329
|
const e = /* @__PURE__ */ new Map(), t = ({ constructor: o, dependencies: i, id: r, singleton: s }) => {
|
|
7302
7330
|
if (s && e.has(r))
|
|
7303
7331
|
return e.get(r);
|
|
@@ -7317,7 +7345,7 @@ function Ae(...n) {
|
|
|
7317
7345
|
});
|
|
7318
7346
|
}), function(r, s) {
|
|
7319
7347
|
switch (r) {
|
|
7320
|
-
case
|
|
7348
|
+
case _n: {
|
|
7321
7349
|
Ii(e);
|
|
7322
7350
|
return;
|
|
7323
7351
|
}
|
|
@@ -7332,20 +7360,20 @@ function X(n, e = Is) {
|
|
|
7332
7360
|
function _i(...n) {
|
|
7333
7361
|
return function(e, t) {
|
|
7334
7362
|
switch (e) {
|
|
7335
|
-
case
|
|
7363
|
+
case _n:
|
|
7336
7364
|
return;
|
|
7337
7365
|
case Pt:
|
|
7338
|
-
return
|
|
7366
|
+
return hc(...n.map((o) => ue(o, t)));
|
|
7339
7367
|
}
|
|
7340
7368
|
};
|
|
7341
7369
|
}
|
|
7342
7370
|
var Ze = /* @__PURE__ */ ((n) => (n[n.DEBUG = 0] = "DEBUG", n[n.INFO = 1] = "INFO", n[n.WARN = 2] = "WARN", n[n.ERROR = 3] = "ERROR", n))(Ze || {});
|
|
7343
|
-
const
|
|
7371
|
+
const bc = {
|
|
7344
7372
|
0: "debug",
|
|
7345
7373
|
3: "error",
|
|
7346
7374
|
1: "log",
|
|
7347
7375
|
2: "warn"
|
|
7348
|
-
},
|
|
7376
|
+
}, Tc = () => typeof globalThis > "u" ? window : globalThis, Ht = ae(
|
|
7349
7377
|
() => {
|
|
7350
7378
|
const n = D(
|
|
7351
7379
|
3
|
|
@@ -7354,8 +7382,8 @@ const mc = {
|
|
|
7354
7382
|
return {
|
|
7355
7383
|
log: D((e, t, o = 1) => {
|
|
7356
7384
|
var i;
|
|
7357
|
-
const r = (i =
|
|
7358
|
-
o >= r && console[
|
|
7385
|
+
const r = (i = Tc().VIRTUOSO_LOG_LEVEL) != null ? i : xe(n);
|
|
7386
|
+
o >= r && console[bc[o]](
|
|
7359
7387
|
"%creact-virtuoso: %c%s %o",
|
|
7360
7388
|
"color: #0253b3; font-weight: bold",
|
|
7361
7389
|
"color: initial",
|
|
@@ -7387,10 +7415,10 @@ function Bi(n, e, t) {
|
|
|
7387
7415
|
s && e ? (r == null || r.observe(s), o.current = s) : (o.current && (r == null || r.unobserve(o.current)), o.current = null);
|
|
7388
7416
|
}, { callbackRef: i, ref: o };
|
|
7389
7417
|
}
|
|
7390
|
-
function
|
|
7418
|
+
function vc(n, e, t, o, i, r, s, a, c) {
|
|
7391
7419
|
const f = B.useCallback(
|
|
7392
7420
|
(m) => {
|
|
7393
|
-
const h =
|
|
7421
|
+
const h = Ec(m.children, e, a ? "offsetWidth" : "offsetHeight", i);
|
|
7394
7422
|
let b = m.parentElement;
|
|
7395
7423
|
for (; !b.dataset.virtuosoScroller; )
|
|
7396
7424
|
b = b.parentElement;
|
|
@@ -7410,7 +7438,7 @@ function bc(n, e, t, o, i, r, s, a, c) {
|
|
|
7410
7438
|
);
|
|
7411
7439
|
return Bi(f, t, c);
|
|
7412
7440
|
}
|
|
7413
|
-
function
|
|
7441
|
+
function Ec(n, e, t, o) {
|
|
7414
7442
|
const i = n.length;
|
|
7415
7443
|
if (i === 0)
|
|
7416
7444
|
return null;
|
|
@@ -7546,14 +7574,14 @@ function ut(n, e, t = "k") {
|
|
|
7546
7574
|
function Ke(n, e, t) {
|
|
7547
7575
|
return ge(n) ? Fs(e, t, 1) : e === n.k ? Oe(n, { k: e, v: t }) : e < n.k ? Vr(Oe(n, { l: Ke(n.l, e, t) })) : Vr(Oe(n, { r: Ke(n.r, e, t) }));
|
|
7548
7576
|
}
|
|
7549
|
-
function
|
|
7577
|
+
function hn() {
|
|
7550
7578
|
return Bn;
|
|
7551
7579
|
}
|
|
7552
|
-
function
|
|
7580
|
+
function fn(n, e, t) {
|
|
7553
7581
|
if (ge(n))
|
|
7554
7582
|
return [];
|
|
7555
7583
|
const o = ut(n, e)[0];
|
|
7556
|
-
return
|
|
7584
|
+
return yc(Ti(n, o, t));
|
|
7557
7585
|
}
|
|
7558
7586
|
function bi(n, e) {
|
|
7559
7587
|
if (ge(n)) return Bn;
|
|
@@ -7645,7 +7673,7 @@ function vi(n) {
|
|
|
7645
7673
|
const { lvl: e, r: t } = n;
|
|
7646
7674
|
return !ge(t) && !ge(t.r) && t.lvl === e && t.r.lvl === e ? Oe(t, { l: Oe(n, { r: t.l }), lvl: e + 1 }) : n;
|
|
7647
7675
|
}
|
|
7648
|
-
function
|
|
7676
|
+
function yc(n) {
|
|
7649
7677
|
return Ms(n, ({ k: e, v: t }) => ({ index: e, value: t }));
|
|
7650
7678
|
}
|
|
7651
7679
|
function js(n, e) {
|
|
@@ -7680,7 +7708,7 @@ function uo(n, e, t, o = 0) {
|
|
|
7680
7708
|
}
|
|
7681
7709
|
throw new Error(`Failed binary finding record in array - ${n.join(",")}, searched for ${e}`);
|
|
7682
7710
|
}
|
|
7683
|
-
function
|
|
7711
|
+
function xc(n, e, t, o) {
|
|
7684
7712
|
const i = uo(n, e, o), r = uo(n, t, o, i);
|
|
7685
7713
|
return n.slice(i, r + 1);
|
|
7686
7714
|
}
|
|
@@ -7693,18 +7721,18 @@ function Lo(n) {
|
|
|
7693
7721
|
function ki({ index: n }, e) {
|
|
7694
7722
|
return e === n ? 0 : e < n ? -1 : 1;
|
|
7695
7723
|
}
|
|
7696
|
-
function
|
|
7724
|
+
function Sc() {
|
|
7697
7725
|
return {
|
|
7698
7726
|
groupIndices: [],
|
|
7699
|
-
groupOffsetTree:
|
|
7727
|
+
groupOffsetTree: hn(),
|
|
7700
7728
|
lastIndex: 0,
|
|
7701
7729
|
lastOffset: 0,
|
|
7702
7730
|
lastSize: 0,
|
|
7703
7731
|
offsetTree: [],
|
|
7704
|
-
sizeTree:
|
|
7732
|
+
sizeTree: hn()
|
|
7705
7733
|
};
|
|
7706
7734
|
}
|
|
7707
|
-
function
|
|
7735
|
+
function wc(n, e) {
|
|
7708
7736
|
let t = ge(n) ? 0 : 1 / 0;
|
|
7709
7737
|
for (const o of e) {
|
|
7710
7738
|
const { endIndex: i, size: r, startIndex: s } = o;
|
|
@@ -7712,8 +7740,8 @@ function xc(n, e) {
|
|
|
7712
7740
|
n = Ke(n, 0, r);
|
|
7713
7741
|
continue;
|
|
7714
7742
|
}
|
|
7715
|
-
const a =
|
|
7716
|
-
if (a.some(
|
|
7743
|
+
const a = fn(n, s - 1, i + 1);
|
|
7744
|
+
if (a.some(Dc(o)))
|
|
7717
7745
|
continue;
|
|
7718
7746
|
let c = !1, f = !1;
|
|
7719
7747
|
for (const { end: m, start: h, value: b } of a)
|
|
@@ -7722,10 +7750,10 @@ function xc(n, e) {
|
|
|
7722
7750
|
}
|
|
7723
7751
|
return [n, t];
|
|
7724
7752
|
}
|
|
7725
|
-
function
|
|
7753
|
+
function Rc(n) {
|
|
7726
7754
|
return typeof n.groupIndex < "u";
|
|
7727
7755
|
}
|
|
7728
|
-
function
|
|
7756
|
+
function Ac({ offset: n }, e) {
|
|
7729
7757
|
return e === n ? 0 : e < n ? -1 : 1;
|
|
7730
7758
|
}
|
|
7731
7759
|
function zn(n, e, t) {
|
|
@@ -7743,7 +7771,7 @@ function Hs(n, e) {
|
|
|
7743
7771
|
return n + t;
|
|
7744
7772
|
}
|
|
7745
7773
|
function Ws(n, e, t) {
|
|
7746
|
-
if (
|
|
7774
|
+
if (Rc(n))
|
|
7747
7775
|
return e.groupIndices[n.groupIndex] + 1;
|
|
7748
7776
|
{
|
|
7749
7777
|
const o = n.index === "LAST" ? t : n.index;
|
|
@@ -7751,10 +7779,10 @@ function Ws(n, e, t) {
|
|
|
7751
7779
|
return i = Math.max(0, i, Math.min(t, i)), i;
|
|
7752
7780
|
}
|
|
7753
7781
|
}
|
|
7754
|
-
function
|
|
7755
|
-
return o > 0 && (e = Math.max(e, Ps(n, o, ki).offset)), Ms(
|
|
7782
|
+
function Oc(n, e, t, o = 0) {
|
|
7783
|
+
return o > 0 && (e = Math.max(e, Ps(n, o, ki).offset)), Ms(xc(n, e, t, Ac), Lc);
|
|
7756
7784
|
}
|
|
7757
|
-
function
|
|
7785
|
+
function Nc(n, [e, t, o, i]) {
|
|
7758
7786
|
e.length > 0 && o("received item sizes", e, Ze.DEBUG);
|
|
7759
7787
|
const r = n.sizeTree;
|
|
7760
7788
|
let s = r, a = 0;
|
|
@@ -7762,13 +7790,13 @@ function Ac(n, [e, t, o, i]) {
|
|
|
7762
7790
|
const b = e[0].size, d = e[1].size;
|
|
7763
7791
|
s = t.reduce((l, g) => Ke(Ke(l, g, b), g + 1, d), s);
|
|
7764
7792
|
} else
|
|
7765
|
-
[s, a] =
|
|
7793
|
+
[s, a] = wc(s, e);
|
|
7766
7794
|
if (s === r)
|
|
7767
7795
|
return n;
|
|
7768
7796
|
const { lastIndex: c, lastOffset: f, lastSize: m, offsetTree: h } = Ei(n.offsetTree, a, s, i);
|
|
7769
7797
|
return {
|
|
7770
7798
|
groupIndices: t,
|
|
7771
|
-
groupOffsetTree: t.reduce((b, d) => Ke(b, d, zn(d, h, i)),
|
|
7799
|
+
groupOffsetTree: t.reduce((b, d) => Ke(b, d, zn(d, h, i)), hn()),
|
|
7772
7800
|
lastIndex: c,
|
|
7773
7801
|
lastOffset: f,
|
|
7774
7802
|
lastSize: m,
|
|
@@ -7776,7 +7804,7 @@ function Ac(n, [e, t, o, i]) {
|
|
|
7776
7804
|
sizeTree: s
|
|
7777
7805
|
};
|
|
7778
7806
|
}
|
|
7779
|
-
function
|
|
7807
|
+
function Cc(n) {
|
|
7780
7808
|
return Vt(n).map(({ k: e, v: t }, o, i) => {
|
|
7781
7809
|
const r = i[o + 1];
|
|
7782
7810
|
return { endIndex: r ? r.k - 1 : 1 / 0, size: t, startIndex: e };
|
|
@@ -7796,7 +7824,7 @@ function Ei(n, e, t, o) {
|
|
|
7796
7824
|
r = f[0], s = f[1], i.length && i[c].size === ut(t, e)[1] && (c -= 1), i = i.slice(0, c + 1);
|
|
7797
7825
|
} else
|
|
7798
7826
|
i = [];
|
|
7799
|
-
for (const { start: f, value: m } of
|
|
7827
|
+
for (const { start: f, value: m } of fn(t, e, 1 / 0)) {
|
|
7800
7828
|
const h = f - r, b = h * s + a + h * o;
|
|
7801
7829
|
i.push({
|
|
7802
7830
|
index: f,
|
|
@@ -7811,20 +7839,20 @@ function Ei(n, e, t, o) {
|
|
|
7811
7839
|
offsetTree: i
|
|
7812
7840
|
};
|
|
7813
7841
|
}
|
|
7814
|
-
function
|
|
7842
|
+
function Lc(n) {
|
|
7815
7843
|
return { index: n.index, value: n };
|
|
7816
7844
|
}
|
|
7817
|
-
function
|
|
7845
|
+
function Dc(n) {
|
|
7818
7846
|
const { endIndex: e, size: t, startIndex: o } = n;
|
|
7819
7847
|
return (i) => i.start === o && (i.end === e || i.end === 1 / 0) && i.value === t;
|
|
7820
7848
|
}
|
|
7821
|
-
const
|
|
7849
|
+
const Ic = {
|
|
7822
7850
|
offsetHeight: "height",
|
|
7823
7851
|
offsetWidth: "width"
|
|
7824
7852
|
}, pt = ae(
|
|
7825
7853
|
([{ log: n }, { recalcInProgress: e }]) => {
|
|
7826
|
-
const t = ie(), o = ie(), i = ze(o, 0), r = ie(), s = ie(), a = D(0), c = D([]), f = D(void 0), m = D(void 0), h = D(void 0), b = D(void 0), d = D((T, w) => Ft(T,
|
|
7827
|
-
L(t, ee(c, n, g), gt(
|
|
7854
|
+
const t = ie(), o = ie(), i = ze(o, 0), r = ie(), s = ie(), a = D(0), c = D([]), f = D(void 0), m = D(void 0), h = D(void 0), b = D(void 0), d = D((T, w) => Ft(T, Ic[w])), l = D(void 0), g = D(0), u = Sc(), p = ze(
|
|
7855
|
+
L(t, ee(c, n, g), gt(Nc, u), ve()),
|
|
7828
7856
|
u
|
|
7829
7857
|
), _ = ze(
|
|
7830
7858
|
L(
|
|
@@ -7844,7 +7872,7 @@ const Lc = {
|
|
|
7844
7872
|
G((T) => T.length > 0),
|
|
7845
7873
|
ee(p, g),
|
|
7846
7874
|
U(([T, w, N]) => {
|
|
7847
|
-
const A = T.reduce((C, R, F) => Ke(C, R, zn(R, w.offsetTree, N) || F),
|
|
7875
|
+
const A = T.reduce((C, R, F) => Ke(C, R, zn(R, w.offsetTree, N) || F), hn());
|
|
7848
7876
|
return {
|
|
7849
7877
|
...w,
|
|
7850
7878
|
groupIndices: T,
|
|
@@ -8054,7 +8082,7 @@ const Lc = {
|
|
|
8054
8082
|
if (w.groupIndices.length > 0) {
|
|
8055
8083
|
if (ge(w.sizeTree))
|
|
8056
8084
|
return w;
|
|
8057
|
-
let A =
|
|
8085
|
+
let A = hn();
|
|
8058
8086
|
const C = xe(_);
|
|
8059
8087
|
let R = 0, F = 0, k = 0;
|
|
8060
8088
|
for (; R < -T; ) {
|
|
@@ -8074,7 +8102,7 @@ const Lc = {
|
|
|
8074
8102
|
...Ei(w.offsetTree, 0, A, N)
|
|
8075
8103
|
};
|
|
8076
8104
|
} else {
|
|
8077
|
-
const A = Vt(w.sizeTree).reduce((C, { k: R, v: F }) => Ke(C, Math.max(0, R + T), F),
|
|
8105
|
+
const A = Vt(w.sizeTree).reduce((C, { k: R, v: F }) => Ke(C, Math.max(0, R + T), F), hn());
|
|
8078
8106
|
return {
|
|
8079
8107
|
...w,
|
|
8080
8108
|
sizeTree: A,
|
|
@@ -8111,7 +8139,7 @@ const Lc = {
|
|
|
8111
8139
|
Ee(Ht, Mi),
|
|
8112
8140
|
{ singleton: !0 }
|
|
8113
8141
|
);
|
|
8114
|
-
function
|
|
8142
|
+
function Bc(n) {
|
|
8115
8143
|
return n.reduce(
|
|
8116
8144
|
(e, t) => (e.groupIndices.push(e.totalCount), e.totalCount += t + 1, e),
|
|
8117
8145
|
{
|
|
@@ -8122,7 +8150,7 @@ function Dc(n) {
|
|
|
8122
8150
|
}
|
|
8123
8151
|
const Ys = ae(
|
|
8124
8152
|
([{ groupIndices: n, sizes: e, totalCount: t }, { headerHeight: o, scrollTop: i }]) => {
|
|
8125
|
-
const r = ie(), s = ie(), a = Qe(L(r, U(
|
|
8153
|
+
const r = ie(), s = ie(), a = Qe(L(r, U(Bc)));
|
|
8126
8154
|
return H(
|
|
8127
8155
|
L(
|
|
8128
8156
|
a,
|
|
@@ -8162,10 +8190,10 @@ const Ys = ae(
|
|
|
8162
8190
|
},
|
|
8163
8191
|
Ee(Ht),
|
|
8164
8192
|
{ singleton: !0 }
|
|
8165
|
-
),
|
|
8193
|
+
), Mc = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
|
|
8166
8194
|
function Xs(n) {
|
|
8167
8195
|
const e = typeof n == "number" ? { index: n } : n;
|
|
8168
|
-
return e.align || (e.align = "start"), (!e.behavior || !
|
|
8196
|
+
return e.align || (e.align = "start"), (!e.behavior || !Mc) && (e.behavior = "auto"), e.offset || (e.offset = 0), e;
|
|
8169
8197
|
}
|
|
8170
8198
|
const Jn = ae(
|
|
8171
8199
|
([
|
|
@@ -8213,7 +8241,7 @@ const Jn = ae(
|
|
|
8213
8241
|
W(ne);
|
|
8214
8242
|
});
|
|
8215
8243
|
} else
|
|
8216
|
-
u = ct(L(e,
|
|
8244
|
+
u = ct(L(e, kc(150)), W);
|
|
8217
8245
|
return p = setTimeout(() => {
|
|
8218
8246
|
v();
|
|
8219
8247
|
}, 1200), Q(c, !0), C("scrolling from index to", { behavior: P, index: se, top: O }, Ze.DEBUG), { behavior: P, top: O };
|
|
@@ -8230,7 +8258,7 @@ const Jn = ae(
|
|
|
8230
8258
|
Ee(pt, He, Ht),
|
|
8231
8259
|
{ singleton: !0 }
|
|
8232
8260
|
);
|
|
8233
|
-
function
|
|
8261
|
+
function kc(n) {
|
|
8234
8262
|
return (e) => {
|
|
8235
8263
|
const t = setTimeout(() => {
|
|
8236
8264
|
e(!1);
|
|
@@ -8296,7 +8324,7 @@ const Zn = ae(
|
|
|
8296
8324
|
function Gs(n, e) {
|
|
8297
8325
|
return Math.abs(n - e) < 1.01;
|
|
8298
8326
|
}
|
|
8299
|
-
const Fn = "up", Dn = "down",
|
|
8327
|
+
const Fn = "up", Dn = "down", zc = "none", Fc = {
|
|
8300
8328
|
atBottom: !1,
|
|
8301
8329
|
notAtBottomBecause: "NOT_SHOWING_LAST_ITEM",
|
|
8302
8330
|
state: {
|
|
@@ -8305,8 +8333,8 @@ const Fn = "up", Dn = "down", Mc = "none", kc = {
|
|
|
8305
8333
|
scrollTop: 0,
|
|
8306
8334
|
viewportHeight: 0
|
|
8307
8335
|
}
|
|
8308
|
-
},
|
|
8309
|
-
const s = D(!1), a = D(!0), c = ie(), f = ie(), m = D(4), h = D(
|
|
8336
|
+
}, Uc = 0, qn = ae(([{ footerHeight: n, headerHeight: e, scrollBy: t, scrollContainerState: o, scrollTop: i, viewportHeight: r }]) => {
|
|
8337
|
+
const s = D(!1), a = D(!0), c = ie(), f = ie(), m = D(4), h = D(Uc), b = ze(
|
|
8310
8338
|
L(
|
|
8311
8339
|
_i(L(X(i), Jt(1), ft(!0)), L(X(i), Jt(1), ft(!1), Xr(100))),
|
|
8312
8340
|
ve()
|
|
@@ -8348,7 +8376,7 @@ const Fn = "up", Dn = "down", Mc = "none", kc = {
|
|
|
8348
8376
|
notAtBottomBecause: C,
|
|
8349
8377
|
state: A
|
|
8350
8378
|
};
|
|
8351
|
-
},
|
|
8379
|
+
}, Fc),
|
|
8352
8380
|
ve((_, v) => _ && _.atBottom === v.atBottom)
|
|
8353
8381
|
)
|
|
8354
8382
|
), g = ze(
|
|
@@ -8405,7 +8433,7 @@ const Fn = "up", Dn = "down", Mc = "none", kc = {
|
|
|
8405
8433
|
U((_) => _.direction)
|
|
8406
8434
|
),
|
|
8407
8435
|
u
|
|
8408
|
-
), H(L(o, vt(50), ft(
|
|
8436
|
+
), H(L(o, vt(50), ft(zc)), u);
|
|
8409
8437
|
const p = D(0);
|
|
8410
8438
|
return H(
|
|
8411
8439
|
L(
|
|
@@ -8499,7 +8527,7 @@ const Ui = ae(
|
|
|
8499
8527
|
Ee(He),
|
|
8500
8528
|
{ singleton: !0 }
|
|
8501
8529
|
);
|
|
8502
|
-
function
|
|
8530
|
+
function jc(n, e, t) {
|
|
8503
8531
|
if (Lo(e)) {
|
|
8504
8532
|
const o = Hs(n, e);
|
|
8505
8533
|
return [
|
|
@@ -8562,7 +8590,7 @@ function Kr(n, e, t) {
|
|
|
8562
8590
|
return [];
|
|
8563
8591
|
if (!Lo(e))
|
|
8564
8592
|
return n.map((f) => ({ ...f, index: f.index + t, originalIndex: f.index }));
|
|
8565
|
-
const o = n[0].index, i = n[n.length - 1].index, r = [], s =
|
|
8593
|
+
const o = n[0].index, i = n[n.length - 1].index, r = [], s = fn(e.groupOffsetTree, o, i);
|
|
8566
8594
|
let a, c = 0;
|
|
8567
8595
|
for (const f of n) {
|
|
8568
8596
|
(!a || a.end < f.index) && (a = s.shift(), c = e.groupIndices.indexOf(a.start));
|
|
@@ -8643,7 +8671,7 @@ const on = ae(
|
|
|
8643
8671
|
return We === 0 ? { ...li, totalCount: N } : Vs(We, C, A, k, I, P || []);
|
|
8644
8672
|
if (ge(de))
|
|
8645
8673
|
return We > 0 ? null : lo(
|
|
8646
|
-
|
|
8674
|
+
jc(Fi(C, N), W, P),
|
|
8647
8675
|
[],
|
|
8648
8676
|
N,
|
|
8649
8677
|
I,
|
|
@@ -8654,7 +8682,7 @@ const on = ae(
|
|
|
8654
8682
|
if (F.length > 0) {
|
|
8655
8683
|
const Z = F[0], le = F[F.length - 1];
|
|
8656
8684
|
let we = 0;
|
|
8657
|
-
for (const Re of
|
|
8685
|
+
for (const Re of fn(de, Z, le)) {
|
|
8658
8686
|
const fe = Re.value, _e = Math.max(Re.start, Z), tt = Math.min(Re.end, le);
|
|
8659
8687
|
for (let De = _e; De <= tt; De++)
|
|
8660
8688
|
Ye.push({ data: P == null ? void 0 : P[De], index: De, offset: we, size: fe }), we += fe;
|
|
@@ -8662,7 +8690,7 @@ const on = ae(
|
|
|
8662
8690
|
}
|
|
8663
8691
|
if (!R)
|
|
8664
8692
|
return lo([], Ye, N, I, W, k);
|
|
8665
|
-
const oe = F.length > 0 ? F[F.length - 1] + 1 : 0, M =
|
|
8693
|
+
const oe = F.length > 0 ? F[F.length - 1] + 1 : 0, M = Oc(ne, T, w, oe);
|
|
8666
8694
|
if (M.length === 0)
|
|
8667
8695
|
return null;
|
|
8668
8696
|
const te = N - 1, he = Co([], (Z) => {
|
|
@@ -8687,7 +8715,7 @@ const on = ae(
|
|
|
8687
8715
|
const we = Math.min(Se, Z.index - oe), Re = [];
|
|
8688
8716
|
let fe = Z.offset;
|
|
8689
8717
|
for (let _e = Z.index - 1; _e >= Z.index - we; _e--) {
|
|
8690
|
-
const tt = (V = (z =
|
|
8718
|
+
const tt = (V = (z = fn(de, _e, _e)[0]) == null ? void 0 : z.value) != null ? V : Z.size;
|
|
8691
8719
|
fe -= tt + I, Re.unshift({ data: P == null ? void 0 : P[_e], index: _e, offset: fe, size: tt });
|
|
8692
8720
|
}
|
|
8693
8721
|
he.unshift(...Re);
|
|
@@ -8696,7 +8724,7 @@ const on = ae(
|
|
|
8696
8724
|
const we = Math.min(j, te - le.index);
|
|
8697
8725
|
let Re = le.offset + le.size + I;
|
|
8698
8726
|
for (let fe = le.index + 1; fe <= le.index + we; fe++) {
|
|
8699
|
-
const _e = (O = (se =
|
|
8727
|
+
const _e = (O = (se = fn(de, fe, fe)[0]) == null ? void 0 : se.value) != null ? O : le.size;
|
|
8700
8728
|
he.push({ data: P == null ? void 0 : P[fe], index: fe, offset: Re, size: _e }), Re += _e + I;
|
|
8701
8729
|
}
|
|
8702
8730
|
}
|
|
@@ -8808,7 +8836,7 @@ const on = ae(
|
|
|
8808
8836
|
},
|
|
8809
8837
|
Ee(He, on),
|
|
8810
8838
|
{ singleton: !0 }
|
|
8811
|
-
),
|
|
8839
|
+
), Pc = ae(
|
|
8812
8840
|
([{ viewportHeight: n }, { totalListHeight: e }]) => {
|
|
8813
8841
|
const t = D(!1), o = ze(
|
|
8814
8842
|
L(
|
|
@@ -8826,7 +8854,7 @@ const on = ae(
|
|
|
8826
8854
|
{ singleton: !0 }
|
|
8827
8855
|
), Js = ae(() => ({
|
|
8828
8856
|
context: D(null)
|
|
8829
|
-
})),
|
|
8857
|
+
})), Hc = ({
|
|
8830
8858
|
itemBottom: n,
|
|
8831
8859
|
itemTop: e,
|
|
8832
8860
|
locationParams: { align: t, behavior: o, ...i },
|
|
@@ -8845,7 +8873,7 @@ const on = ae(
|
|
|
8845
8873
|
ee(e, c, t, r, i, o, a),
|
|
8846
8874
|
ee(n),
|
|
8847
8875
|
U(([[h, b, d, l, g, u, p, _], v]) => {
|
|
8848
|
-
const { align: S, behavior: y, calculateViewLocation: x =
|
|
8876
|
+
const { align: S, behavior: y, calculateViewLocation: x = Hc, done: T, ...w } = h, N = Ws(h, b, l - 1), A = zn(N, b.offsetTree, v) + g + u, C = A + ut(b.sizeTree, N)[1], R = _ + u, F = _ + d - p, k = x({
|
|
8849
8877
|
itemBottom: C,
|
|
8850
8878
|
itemTop: A,
|
|
8851
8879
|
locationParams: { align: S, behavior: y, ...w },
|
|
@@ -8876,7 +8904,7 @@ const on = ae(
|
|
|
8876
8904
|
function es(n) {
|
|
8877
8905
|
return n ? n === "smooth" ? "smooth" : "auto" : !1;
|
|
8878
8906
|
}
|
|
8879
|
-
const
|
|
8907
|
+
const Wc = (n, e) => typeof n == "function" ? es(n(e)) : e && es(n), Yc = ae(
|
|
8880
8908
|
([
|
|
8881
8909
|
{ listRefresh: n, totalCount: e, fixedItemSize: t, data: o },
|
|
8882
8910
|
{ atBottomState: i, isAtBottom: r },
|
|
@@ -8903,7 +8931,7 @@ const Pc = (n, e) => typeof n == "function" ? es(n(e)) : e && es(n), Hc = ae(
|
|
|
8903
8931
|
ee(X(l), r, a, h),
|
|
8904
8932
|
U(([[y, x], T, w, N, A]) => {
|
|
8905
8933
|
let C = x && N, R = "auto";
|
|
8906
|
-
return C && (R =
|
|
8934
|
+
return C && (R = Wc(T, w || A), C = C && !!R), { followOutputBehavior: R, shouldFollow: C, totalCount: y };
|
|
8907
8935
|
}),
|
|
8908
8936
|
G(({ shouldFollow: y }) => y)
|
|
8909
8937
|
),
|
|
@@ -8981,7 +9009,7 @@ const Pc = (n, e) => typeof n == "function" ? es(n(e)) : e && es(n), Hc = ae(
|
|
|
8981
9009
|
Js,
|
|
8982
9010
|
Zs
|
|
8983
9011
|
)
|
|
8984
|
-
),
|
|
9012
|
+
), Xc = ae(
|
|
8985
9013
|
([{ data: n, firstItemIndex: e, gap: t, sizes: o }, { initialTopMostItemIndex: i }, { initialItemCount: r, listState: s }, { didMount: a }]) => (H(
|
|
8986
9014
|
L(
|
|
8987
9015
|
a,
|
|
@@ -8994,7 +9022,7 @@ const Pc = (n, e) => typeof n == "function" ? es(n(e)) : e && es(n), Hc = ae(
|
|
|
8994
9022
|
), {}),
|
|
8995
9023
|
Ee(pt, Zn, on, Wt),
|
|
8996
9024
|
{ singleton: !0 }
|
|
8997
|
-
),
|
|
9025
|
+
), Gc = ae(
|
|
8998
9026
|
([{ didMount: n }, { scrollTo: e }, { listState: t }]) => {
|
|
8999
9027
|
const o = D(0);
|
|
9000
9028
|
return ue(
|
|
@@ -9085,7 +9113,7 @@ const Pc = (n, e) => typeof n == "function" ? es(n(e)) : e && es(n), Hc = ae(
|
|
|
9085
9113
|
windowScrollTo: i,
|
|
9086
9114
|
windowViewportRect: o
|
|
9087
9115
|
};
|
|
9088
|
-
}, Ee(He)),
|
|
9116
|
+
}, Ee(He)), Vc = ae(
|
|
9089
9117
|
([
|
|
9090
9118
|
{ sizeRanges: n, sizes: e },
|
|
9091
9119
|
{ headerHeight: t, scrollTop: o },
|
|
@@ -9100,10 +9128,10 @@ const Pc = (n, e) => typeof n == "function" ? es(n(e)) : e && es(n), Hc = ae(
|
|
|
9100
9128
|
ee(e, o, s, h, b, t)
|
|
9101
9129
|
),
|
|
9102
9130
|
([d, l, g, u, p, _, v]) => {
|
|
9103
|
-
const S =
|
|
9131
|
+
const S = Cc(l.sizeTree);
|
|
9104
9132
|
u && p !== null && _ !== null && (g = p.scrollTop - _.offsetTop), g -= v, d({ ranges: S, scrollTop: g });
|
|
9105
9133
|
}
|
|
9106
|
-
), H(L(m, G(Di), U(
|
|
9134
|
+
), H(L(m, G(Di), U($c)), i), H(
|
|
9107
9135
|
L(
|
|
9108
9136
|
r,
|
|
9109
9137
|
ee(m),
|
|
@@ -9119,10 +9147,10 @@ const Pc = (n, e) => typeof n == "function" ? es(n(e)) : e && es(n), Hc = ae(
|
|
|
9119
9147
|
},
|
|
9120
9148
|
Ee(pt, He, Zn, Wt, ji)
|
|
9121
9149
|
);
|
|
9122
|
-
function
|
|
9150
|
+
function $c(n) {
|
|
9123
9151
|
return { align: "start", index: 0, offset: n.scrollTop };
|
|
9124
9152
|
}
|
|
9125
|
-
const
|
|
9153
|
+
const Jc = ae(([{ topItemsIndexes: n }]) => {
|
|
9126
9154
|
const e = D(0);
|
|
9127
9155
|
return H(
|
|
9128
9156
|
L(
|
|
@@ -9137,7 +9165,7 @@ function Ks(n) {
|
|
|
9137
9165
|
let e = !1, t;
|
|
9138
9166
|
return () => (e || (e = !0, t = n()), t);
|
|
9139
9167
|
}
|
|
9140
|
-
const
|
|
9168
|
+
const Zc = Ks(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), qc = ae(
|
|
9141
9169
|
([
|
|
9142
9170
|
{ deviation: n, scrollBy: e, scrollingInProgress: t, scrollTop: o },
|
|
9143
9171
|
{ isAtBottom: i, isScrolling: r, lastJumpDueToItemResize: s, scrollDirection: a },
|
|
@@ -9168,7 +9196,7 @@ const $c = Ks(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
9168
9196
|
p > 0 ? (Q(e, { behavior: "auto", top: -p }), Q(n, 0)) : (Q(n, 0), Q(e, { behavior: "auto", top: -p }));
|
|
9169
9197
|
}
|
|
9170
9198
|
return ue(L(g, ee(n, r)), ([p, _, v]) => {
|
|
9171
|
-
v &&
|
|
9199
|
+
v && Zc() ? Q(n, _ - p) : u(-p);
|
|
9172
9200
|
}), ue(
|
|
9173
9201
|
L(
|
|
9174
9202
|
Ae(ze(r, !1), n, l),
|
|
@@ -9216,7 +9244,7 @@ const $c = Ks(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
9216
9244
|
), { deviation: n };
|
|
9217
9245
|
},
|
|
9218
9246
|
Ee(He, qn, on, pt, Ht, Mi)
|
|
9219
|
-
),
|
|
9247
|
+
), Kc = ae(
|
|
9220
9248
|
([
|
|
9221
9249
|
n,
|
|
9222
9250
|
e,
|
|
@@ -9244,12 +9272,12 @@ const $c = Ks(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
9244
9272
|
}),
|
|
9245
9273
|
Ee(
|
|
9246
9274
|
Ui,
|
|
9247
|
-
|
|
9275
|
+
Xc,
|
|
9248
9276
|
Wt,
|
|
9249
9277
|
qs,
|
|
9250
9278
|
$s,
|
|
9251
|
-
|
|
9252
|
-
|
|
9279
|
+
Gc,
|
|
9280
|
+
Pc,
|
|
9253
9281
|
ji,
|
|
9254
9282
|
Zs,
|
|
9255
9283
|
Ht,
|
|
@@ -9331,17 +9359,17 @@ const $c = Ks(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
9331
9359
|
pt,
|
|
9332
9360
|
Zn,
|
|
9333
9361
|
He,
|
|
9334
|
-
|
|
9335
|
-
|
|
9362
|
+
Vc,
|
|
9363
|
+
Yc,
|
|
9336
9364
|
on,
|
|
9337
9365
|
Jn,
|
|
9366
|
+
qc,
|
|
9338
9367
|
Jc,
|
|
9339
|
-
Vc,
|
|
9340
9368
|
Ys,
|
|
9341
|
-
|
|
9369
|
+
Kc
|
|
9342
9370
|
)
|
|
9343
9371
|
);
|
|
9344
|
-
function
|
|
9372
|
+
function Qc(n, e) {
|
|
9345
9373
|
const t = {}, o = {};
|
|
9346
9374
|
let i = 0;
|
|
9347
9375
|
const r = n.length;
|
|
@@ -9374,10 +9402,10 @@ function ea(n, e, t) {
|
|
|
9374
9402
|
}, p), {});
|
|
9375
9403
|
}
|
|
9376
9404
|
function m(u) {
|
|
9377
|
-
return s.reduce((p, _) => (p[_] =
|
|
9405
|
+
return s.reduce((p, _) => (p[_] = pc(u[e.events[_]]), p), {});
|
|
9378
9406
|
}
|
|
9379
9407
|
const h = B.forwardRef((u, p) => {
|
|
9380
|
-
const { children: _, ...v } = u, [S] = B.useState(() => Co(
|
|
9408
|
+
const { children: _, ...v } = u, [S] = B.useState(() => Co(_c(n), (T) => {
|
|
9381
9409
|
c(T, v);
|
|
9382
9410
|
})), [y] = B.useState(Yr(m, S));
|
|
9383
9411
|
io(() => {
|
|
@@ -9390,7 +9418,7 @@ function ea(n, e, t) {
|
|
|
9390
9418
|
c(S, v);
|
|
9391
9419
|
}), B.useImperativeHandle(p, Wr(f(S)));
|
|
9392
9420
|
const x = t;
|
|
9393
|
-
return /* @__PURE__ */ E.jsx(a.Provider, { value: S, children: t ? /* @__PURE__ */ E.jsx(x, { ...
|
|
9421
|
+
return /* @__PURE__ */ E.jsx(a.Provider, { value: S, children: t ? /* @__PURE__ */ E.jsx(x, { ...Qc([...o, ...i, ...s], v), children: _ }) : _ });
|
|
9394
9422
|
}), b = (u) => {
|
|
9395
9423
|
const p = B.useContext(a);
|
|
9396
9424
|
return B.useCallback(
|
|
@@ -9432,15 +9460,15 @@ const ta = B.createContext(void 0), na = B.createContext(void 0), oa = typeof do
|
|
|
9432
9460
|
function di(n) {
|
|
9433
9461
|
return "self" in n;
|
|
9434
9462
|
}
|
|
9435
|
-
function
|
|
9463
|
+
function eu(n) {
|
|
9436
9464
|
return "body" in n;
|
|
9437
9465
|
}
|
|
9438
|
-
function ia(n, e, t, o =
|
|
9466
|
+
function ia(n, e, t, o = bn, i, r) {
|
|
9439
9467
|
const s = B.useRef(null), a = B.useRef(null), c = B.useRef(null), f = B.useCallback(
|
|
9440
9468
|
(b) => {
|
|
9441
9469
|
let d, l, g;
|
|
9442
9470
|
const u = b.target;
|
|
9443
|
-
if (
|
|
9471
|
+
if (eu(u) || di(u)) {
|
|
9444
9472
|
const _ = di(u) ? u : u.defaultView;
|
|
9445
9473
|
g = r ? _.scrollX : _.scrollY, d = r ? _.document.documentElement.scrollWidth : _.document.documentElement.scrollHeight, l = r ? _.innerWidth : _.innerHeight;
|
|
9446
9474
|
} else
|
|
@@ -9495,8 +9523,8 @@ const ci = "-webkit-sticky", ts = "sticky", Pi = Ks(() => {
|
|
|
9495
9523
|
function Hi(n) {
|
|
9496
9524
|
return n;
|
|
9497
9525
|
}
|
|
9498
|
-
const
|
|
9499
|
-
const n = D((a) => `Item ${a}`), e = D((a) => `Group ${a}`), t = D({}), o = D(Hi), i = D("div"), r = D(
|
|
9526
|
+
const tu = /* @__PURE__ */ ae(() => {
|
|
9527
|
+
const n = D((a) => `Item ${a}`), e = D((a) => `Group ${a}`), t = D({}), o = D(Hi), i = D("div"), r = D(bn), s = (a, c = null) => ze(
|
|
9500
9528
|
L(
|
|
9501
9529
|
t,
|
|
9502
9530
|
U((f) => f[a]),
|
|
@@ -9521,15 +9549,15 @@ const Qc = /* @__PURE__ */ ae(() => {
|
|
|
9521
9549
|
ScrollSeekPlaceholder: s("ScrollSeekPlaceholder"),
|
|
9522
9550
|
TopItemListComponent: s("TopItemList")
|
|
9523
9551
|
};
|
|
9524
|
-
}),
|
|
9552
|
+
}), nu = /* @__PURE__ */ ae(
|
|
9525
9553
|
([n, e]) => ({ ...n, ...e }),
|
|
9526
|
-
Ee(Qs,
|
|
9527
|
-
),
|
|
9528
|
-
const e = J("listState"), t = it("sizeRanges"), o = J("useWindowScroll"), i = J("customScrollParent"), r = it("windowScrollContainerState"), s = it("scrollContainerState"), a = i || o ? r : s, c = J("itemContent"), f = J("context"), m = J("groupContent"), h = J("trackItemSizes"), b = J("itemSize"), d = J("log"), l = it("gap"), g = J("horizontalDirection"), { callbackRef: u } =
|
|
9554
|
+
Ee(Qs, tu)
|
|
9555
|
+
), ou = ({ height: n }) => /* @__PURE__ */ E.jsx("div", { style: { height: n } }), iu = { overflowAnchor: "none", position: Pi(), zIndex: 1 }, ra = { overflowAnchor: "none" }, ru = { ...ra, display: "inline-block", height: "100%" }, ns = /* @__PURE__ */ B.memo(function({ showTopList: n = !1 }) {
|
|
9556
|
+
const e = J("listState"), t = it("sizeRanges"), o = J("useWindowScroll"), i = J("customScrollParent"), r = it("windowScrollContainerState"), s = it("scrollContainerState"), a = i || o ? r : s, c = J("itemContent"), f = J("context"), m = J("groupContent"), h = J("trackItemSizes"), b = J("itemSize"), d = J("log"), l = it("gap"), g = J("horizontalDirection"), { callbackRef: u } = vc(
|
|
9529
9557
|
t,
|
|
9530
9558
|
b,
|
|
9531
9559
|
h,
|
|
9532
|
-
n ?
|
|
9560
|
+
n ? bn : a,
|
|
9533
9561
|
d,
|
|
9534
9562
|
l,
|
|
9535
9563
|
i,
|
|
@@ -9539,7 +9567,7 @@ const Qc = /* @__PURE__ */ ae(() => {
|
|
|
9539
9567
|
Wi("deviation", (k) => {
|
|
9540
9568
|
p !== k && _(k);
|
|
9541
9569
|
});
|
|
9542
|
-
const v = J("EmptyPlaceholder"), S = J("ScrollSeekPlaceholder") ||
|
|
9570
|
+
const v = J("EmptyPlaceholder"), S = J("ScrollSeekPlaceholder") || ou, y = J("ListComponent"), x = J("ItemComponent"), T = J("GroupComponent"), w = J("computeItemKey"), N = J("isSeeking"), A = J("groupIndices").length > 0, C = J("alignToBottom"), R = J("initialItemFinalLocationReached"), F = n ? {} : {
|
|
9543
9571
|
boxSizing: "border-box",
|
|
9544
9572
|
...g ? {
|
|
9545
9573
|
display: "inline-block",
|
|
@@ -9582,33 +9610,33 @@ const Qc = /* @__PURE__ */ ae(() => {
|
|
|
9582
9610
|
"data-item-index": k.index,
|
|
9583
9611
|
"data-known-size": k.size,
|
|
9584
9612
|
key: Y,
|
|
9585
|
-
style:
|
|
9613
|
+
style: iu
|
|
9586
9614
|
},
|
|
9587
9615
|
m(k.index, f)
|
|
9588
9616
|
) : /* @__PURE__ */ $t(
|
|
9589
9617
|
x,
|
|
9590
9618
|
{
|
|
9591
9619
|
...ke(x, f),
|
|
9592
|
-
...
|
|
9620
|
+
...du(x, k.data),
|
|
9593
9621
|
"data-index": I,
|
|
9594
9622
|
"data-item-group-index": k.groupIndex,
|
|
9595
9623
|
"data-item-index": k.index,
|
|
9596
9624
|
"data-known-size": k.size,
|
|
9597
9625
|
key: Y,
|
|
9598
|
-
style: g ?
|
|
9626
|
+
style: g ? ru : ra
|
|
9599
9627
|
},
|
|
9600
9628
|
A ? c(k.index, k.groupIndex, k.data, f) : c(k.index, k.data, f)
|
|
9601
9629
|
);
|
|
9602
9630
|
})
|
|
9603
9631
|
}
|
|
9604
9632
|
);
|
|
9605
|
-
}),
|
|
9633
|
+
}), su = {
|
|
9606
9634
|
height: "100%",
|
|
9607
9635
|
outline: "none",
|
|
9608
9636
|
overflowY: "auto",
|
|
9609
9637
|
position: "relative",
|
|
9610
9638
|
WebkitOverflowScrolling: "touch"
|
|
9611
|
-
},
|
|
9639
|
+
}, au = {
|
|
9612
9640
|
outline: "none",
|
|
9613
9641
|
overflowX: "auto",
|
|
9614
9642
|
position: "relative"
|
|
@@ -9618,7 +9646,7 @@ const Qc = /* @__PURE__ */ ae(() => {
|
|
|
9618
9646
|
top: 0,
|
|
9619
9647
|
width: "100%",
|
|
9620
9648
|
...n ? { display: "flex", flexDirection: "column" } : {}
|
|
9621
|
-
}),
|
|
9649
|
+
}), lu = {
|
|
9622
9650
|
position: Pi(),
|
|
9623
9651
|
top: 0,
|
|
9624
9652
|
width: "100%",
|
|
@@ -9628,10 +9656,10 @@ function ke(n, e) {
|
|
|
9628
9656
|
if (typeof n != "string")
|
|
9629
9657
|
return { context: e };
|
|
9630
9658
|
}
|
|
9631
|
-
function
|
|
9659
|
+
function du(n, e) {
|
|
9632
9660
|
return { item: typeof n == "string" ? void 0 : e };
|
|
9633
9661
|
}
|
|
9634
|
-
const
|
|
9662
|
+
const cu = /* @__PURE__ */ B.memo(function() {
|
|
9635
9663
|
const n = J("HeaderComponent"), e = it("headerHeight"), t = J("HeaderFooterTag"), o = nn(
|
|
9636
9664
|
B.useMemo(
|
|
9637
9665
|
() => (r) => {
|
|
@@ -9643,7 +9671,7 @@ const lu = /* @__PURE__ */ B.memo(function() {
|
|
|
9643
9671
|
J("skipAnimationFrameInResizeObserver")
|
|
9644
9672
|
), i = J("context");
|
|
9645
9673
|
return n ? /* @__PURE__ */ E.jsx(t, { ref: o, children: /* @__PURE__ */ E.jsx(n, { ...ke(n, i) }) }) : null;
|
|
9646
|
-
}),
|
|
9674
|
+
}), uu = /* @__PURE__ */ B.memo(function() {
|
|
9647
9675
|
const n = J("FooterComponent"), e = it("footerHeight"), t = J("HeaderFooterTag"), o = nn(
|
|
9648
9676
|
B.useMemo(
|
|
9649
9677
|
() => (r) => {
|
|
@@ -9672,7 +9700,7 @@ function sa({ useEmitter: n, useEmitterValue: e, usePublisher: t }) {
|
|
|
9672
9700
|
"data-testid": "virtuoso-scroller",
|
|
9673
9701
|
"data-virtuoso-scroller": !0,
|
|
9674
9702
|
ref: d,
|
|
9675
|
-
style: { ...h ?
|
|
9703
|
+
style: { ...h ? au : su, ...i },
|
|
9676
9704
|
tabIndex: 0,
|
|
9677
9705
|
...s,
|
|
9678
9706
|
...ke(c, r),
|
|
@@ -9708,7 +9736,7 @@ function aa({ useEmitter: n, useEmitterValue: e, usePublisher: t }) {
|
|
|
9708
9736
|
);
|
|
9709
9737
|
});
|
|
9710
9738
|
}
|
|
9711
|
-
const
|
|
9739
|
+
const hu = ({ children: n }) => {
|
|
9712
9740
|
const e = B.useContext(ta), t = it("viewportHeight"), o = it("fixedItemHeight"), i = J("alignToBottom"), r = J("horizontalDirection"), s = B.useMemo(
|
|
9713
9741
|
() => Ds(t, (c) => Ft(c, r ? "width" : "height")),
|
|
9714
9742
|
[t, r]
|
|
@@ -9716,7 +9744,7 @@ const cu = ({ children: n }) => {
|
|
|
9716
9744
|
return B.useEffect(() => {
|
|
9717
9745
|
e && (t(e.viewportHeight), o(e.itemHeight));
|
|
9718
9746
|
}, [e, t, o]), /* @__PURE__ */ E.jsx("div", { "data-viewport-type": "element", ref: a, style: Do(i), children: n });
|
|
9719
|
-
},
|
|
9747
|
+
}, fu = ({ children: n }) => {
|
|
9720
9748
|
const e = B.useContext(ta), t = it("windowViewportRect"), o = it("fixedItemHeight"), i = J("customScrollParent"), r = Bs(
|
|
9721
9749
|
t,
|
|
9722
9750
|
i,
|
|
@@ -9725,26 +9753,26 @@ const cu = ({ children: n }) => {
|
|
|
9725
9753
|
return B.useEffect(() => {
|
|
9726
9754
|
e && (o(e.itemHeight), t({ offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
|
|
9727
9755
|
}, [e, t, o]), /* @__PURE__ */ E.jsx("div", { "data-viewport-type": "window", ref: r, style: Do(s), children: n });
|
|
9728
|
-
},
|
|
9729
|
-
const e = J("TopItemListComponent") || "div", t = J("headerHeight"), o = { ...
|
|
9756
|
+
}, gu = ({ children: n }) => {
|
|
9757
|
+
const e = J("TopItemListComponent") || "div", t = J("headerHeight"), o = { ...lu, marginTop: `${t}px` }, i = J("context");
|
|
9730
9758
|
return /* @__PURE__ */ E.jsx(e, { style: o, ...ke(e, i), children: n });
|
|
9731
|
-
},
|
|
9759
|
+
}, pu = /* @__PURE__ */ B.memo(function(n) {
|
|
9732
9760
|
const e = J("useWindowScroll"), t = J("topItemsIndexes").length > 0, o = J("customScrollParent"), i = J("context");
|
|
9733
|
-
return /* @__PURE__ */ E.jsxs(o || e ?
|
|
9734
|
-
t && /* @__PURE__ */ E.jsx(
|
|
9735
|
-
/* @__PURE__ */ E.jsxs(o || e ?
|
|
9736
|
-
/* @__PURE__ */ E.jsx(
|
|
9761
|
+
return /* @__PURE__ */ E.jsxs(o || e ? bu : _u, { ...n, context: i, children: [
|
|
9762
|
+
t && /* @__PURE__ */ E.jsx(gu, { children: /* @__PURE__ */ E.jsx(ns, { showTopList: !0 }) }),
|
|
9763
|
+
/* @__PURE__ */ E.jsxs(o || e ? fu : hu, { children: [
|
|
9764
|
+
/* @__PURE__ */ E.jsx(cu, {}),
|
|
9737
9765
|
/* @__PURE__ */ E.jsx(ns, {}),
|
|
9738
|
-
/* @__PURE__ */ E.jsx(
|
|
9766
|
+
/* @__PURE__ */ E.jsx(uu, {})
|
|
9739
9767
|
] })
|
|
9740
9768
|
] });
|
|
9741
9769
|
}), {
|
|
9742
|
-
Component:
|
|
9770
|
+
Component: mu,
|
|
9743
9771
|
useEmitter: Wi,
|
|
9744
9772
|
useEmitterValue: J,
|
|
9745
9773
|
usePublisher: it
|
|
9746
9774
|
} = /* @__PURE__ */ ea(
|
|
9747
|
-
|
|
9775
|
+
nu,
|
|
9748
9776
|
{
|
|
9749
9777
|
required: {},
|
|
9750
9778
|
optional: {
|
|
@@ -9805,15 +9833,15 @@ const cu = ({ children: n }) => {
|
|
|
9805
9833
|
groupIndices: "groupIndices"
|
|
9806
9834
|
}
|
|
9807
9835
|
},
|
|
9808
|
-
|
|
9809
|
-
),
|
|
9836
|
+
pu
|
|
9837
|
+
), _u = /* @__PURE__ */ sa({ useEmitter: Wi, useEmitterValue: J, usePublisher: it }), bu = /* @__PURE__ */ aa({ useEmitter: Wi, useEmitterValue: J, usePublisher: it }), Tu = mu, vu = /* @__PURE__ */ ae(() => {
|
|
9810
9838
|
const n = D((f) => /* @__PURE__ */ E.jsxs("td", { children: [
|
|
9811
9839
|
"Item $",
|
|
9812
9840
|
f
|
|
9813
9841
|
] })), e = D(null), t = D((f) => /* @__PURE__ */ E.jsxs("td", { colSpan: 1e3, children: [
|
|
9814
9842
|
"Group ",
|
|
9815
9843
|
f
|
|
9816
|
-
] })), o = D(null), i = D(null), r = D({}), s = D(Hi), a = D(
|
|
9844
|
+
] })), o = D(null), i = D(null), r = D({}), s = D(Hi), a = D(bn), c = (f, m = null) => ze(
|
|
9817
9845
|
L(
|
|
9818
9846
|
r,
|
|
9819
9847
|
U((h) => h[f]),
|
|
@@ -9842,7 +9870,7 @@ const cu = ({ children: n }) => {
|
|
|
9842
9870
|
GroupComponent: c("Group", "tr")
|
|
9843
9871
|
};
|
|
9844
9872
|
});
|
|
9845
|
-
Ee(Qs,
|
|
9873
|
+
Ee(Qs, vu);
|
|
9846
9874
|
Pi();
|
|
9847
9875
|
const os = {
|
|
9848
9876
|
bottom: 0,
|
|
@@ -9852,7 +9880,7 @@ const os = {
|
|
|
9852
9880
|
offsetBottom: 0,
|
|
9853
9881
|
offsetTop: 0,
|
|
9854
9882
|
top: 0
|
|
9855
|
-
},
|
|
9883
|
+
}, Eu = {
|
|
9856
9884
|
bottom: 0,
|
|
9857
9885
|
itemHeight: 0,
|
|
9858
9886
|
items: [{ index: 0 }],
|
|
@@ -9864,19 +9892,19 @@ const os = {
|
|
|
9864
9892
|
function ss(n, e, t) {
|
|
9865
9893
|
return Array.from({ length: e - n + 1 }).map((o, i) => ({ data: t === null ? null : t[i + n], index: i + n }));
|
|
9866
9894
|
}
|
|
9867
|
-
function
|
|
9895
|
+
function yu(n) {
|
|
9868
9896
|
return {
|
|
9869
|
-
...
|
|
9897
|
+
...Eu,
|
|
9870
9898
|
items: n
|
|
9871
9899
|
};
|
|
9872
9900
|
}
|
|
9873
9901
|
function ro(n, e) {
|
|
9874
9902
|
return n && n.width === e.width && n.height === e.height;
|
|
9875
9903
|
}
|
|
9876
|
-
function
|
|
9904
|
+
function xu(n, e) {
|
|
9877
9905
|
return n && n.column === e.column && n.row === e.row;
|
|
9878
9906
|
}
|
|
9879
|
-
const
|
|
9907
|
+
const Su = /* @__PURE__ */ ae(
|
|
9880
9908
|
([
|
|
9881
9909
|
{ increaseViewportBy: n, listBoundary: e, overscan: t, visibleRange: o },
|
|
9882
9910
|
{ footerHeight: i, headerHeight: r, scrollBy: s, scrollContainerState: a, scrollTo: c, scrollTop: f, smoothScrollTargetReached: m, viewportHeight: h },
|
|
@@ -9953,7 +9981,7 @@ const yu = /* @__PURE__ */ ae(
|
|
|
9953
9981
|
Ae(
|
|
9954
9982
|
X(x),
|
|
9955
9983
|
o,
|
|
9956
|
-
X(I,
|
|
9984
|
+
X(I, xu),
|
|
9957
9985
|
X(A, ro),
|
|
9958
9986
|
X(N, ro),
|
|
9959
9987
|
X(k),
|
|
@@ -9981,7 +10009,7 @@ const yu = /* @__PURE__ */ ae(
|
|
|
9981
10009
|
return os;
|
|
9982
10010
|
if (Io === 0) {
|
|
9983
10011
|
const Ji = Fi(fe, M), ua = Ji + Math.max(we - 1, 0);
|
|
9984
|
-
return
|
|
10012
|
+
return yu(ss(Ji, ua, le));
|
|
9985
10013
|
}
|
|
9986
10014
|
const Kn = la(Yi, Io, _e);
|
|
9987
10015
|
let rn, Yt;
|
|
@@ -10137,8 +10165,8 @@ function yi(n, e, t, o) {
|
|
|
10137
10165
|
const i = la(n.width, t.width, e.column), r = ho(o / i), s = r * t.height + In(0, r - 1) * e.row;
|
|
10138
10166
|
return s > 0 ? s + e.row : s;
|
|
10139
10167
|
}
|
|
10140
|
-
const
|
|
10141
|
-
const n = D((h) => `Item ${h}`), e = D({}), t = D(null), o = D("virtuoso-grid-item"), i = D("virtuoso-grid-list"), r = D(Hi), s = D("div"), a = D(
|
|
10168
|
+
const wu = /* @__PURE__ */ ae(() => {
|
|
10169
|
+
const n = D((h) => `Item ${h}`), e = D({}), t = D(null), o = D("virtuoso-grid-item"), i = D("virtuoso-grid-list"), r = D(Hi), s = D("div"), a = D(bn), c = (h, b = null) => ze(
|
|
10142
10170
|
L(
|
|
10143
10171
|
e,
|
|
10144
10172
|
U((d) => d[h]),
|
|
@@ -10164,10 +10192,10 @@ const xu = /* @__PURE__ */ ae(() => {
|
|
|
10164
10192
|
scrollerRef: a,
|
|
10165
10193
|
ScrollSeekPlaceholder: c("ScrollSeekPlaceholder", "div")
|
|
10166
10194
|
};
|
|
10167
|
-
}),
|
|
10195
|
+
}), Ru = /* @__PURE__ */ ae(
|
|
10168
10196
|
([n, e]) => ({ ...n, ...e }),
|
|
10169
|
-
Ee(
|
|
10170
|
-
),
|
|
10197
|
+
Ee(Su, wu)
|
|
10198
|
+
), Au = /* @__PURE__ */ B.memo(function() {
|
|
10171
10199
|
const n = ye("gridState"), e = ye("listClassName"), t = ye("itemClassName"), o = ye("itemContent"), i = ye("computeItemKey"), r = ye("isSeeking"), s = rt("scrollHeight"), a = ye("ItemComponent"), c = ye("ListComponent"), f = ye("ScrollSeekPlaceholder"), m = ye("context"), h = rt("itemDimensions"), b = rt("gap"), d = ye("log"), l = ye("stateRestoreInProgress"), g = rt("reportReadyState"), u = nn(
|
|
10172
10200
|
B.useMemo(
|
|
10173
10201
|
() => (p) => {
|
|
@@ -10222,7 +10250,7 @@ const xu = /* @__PURE__ */ ae(() => {
|
|
|
10222
10250
|
})
|
|
10223
10251
|
}
|
|
10224
10252
|
);
|
|
10225
|
-
}),
|
|
10253
|
+
}), Ou = B.memo(function() {
|
|
10226
10254
|
const n = ye("HeaderComponent"), e = rt("headerHeight"), t = ye("headerFooterTag"), o = nn(
|
|
10227
10255
|
B.useMemo(
|
|
10228
10256
|
() => (r) => {
|
|
@@ -10234,7 +10262,7 @@ const xu = /* @__PURE__ */ ae(() => {
|
|
|
10234
10262
|
!1
|
|
10235
10263
|
), i = ye("context");
|
|
10236
10264
|
return n ? /* @__PURE__ */ E.jsx(t, { ref: o, children: /* @__PURE__ */ E.jsx(n, { ...ke(n, i) }) }) : null;
|
|
10237
|
-
}),
|
|
10265
|
+
}), Nu = B.memo(function() {
|
|
10238
10266
|
const n = ye("FooterComponent"), e = rt("footerHeight"), t = ye("headerFooterTag"), o = nn(
|
|
10239
10267
|
B.useMemo(
|
|
10240
10268
|
() => (r) => {
|
|
@@ -10246,7 +10274,7 @@ const xu = /* @__PURE__ */ ae(() => {
|
|
|
10246
10274
|
!1
|
|
10247
10275
|
), i = ye("context");
|
|
10248
10276
|
return n ? /* @__PURE__ */ E.jsx(t, { ref: o, children: /* @__PURE__ */ E.jsx(n, { ...ke(n, i) }) }) : null;
|
|
10249
|
-
}),
|
|
10277
|
+
}), Cu = ({ children: n }) => {
|
|
10250
10278
|
const e = B.useContext(na), t = rt("itemDimensions"), o = rt("viewportDimensions"), i = nn(
|
|
10251
10279
|
B.useMemo(
|
|
10252
10280
|
() => (r) => {
|
|
@@ -10260,24 +10288,24 @@ const xu = /* @__PURE__ */ ae(() => {
|
|
|
10260
10288
|
return B.useEffect(() => {
|
|
10261
10289
|
e && (o({ height: e.viewportHeight, width: e.viewportWidth }), t({ height: e.itemHeight, width: e.itemWidth }));
|
|
10262
10290
|
}, [e, o, t]), /* @__PURE__ */ E.jsx("div", { ref: i, style: Do(!1), children: n });
|
|
10263
|
-
},
|
|
10291
|
+
}, Lu = ({ children: n }) => {
|
|
10264
10292
|
const e = B.useContext(na), t = rt("windowViewportRect"), o = rt("itemDimensions"), i = ye("customScrollParent"), r = Bs(t, i, !1);
|
|
10265
10293
|
return B.useEffect(() => {
|
|
10266
10294
|
e && (o({ height: e.itemHeight, width: e.itemWidth }), t({ offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: e.viewportWidth }));
|
|
10267
10295
|
}, [e, t, o]), /* @__PURE__ */ E.jsx("div", { ref: r, style: Do(!1), children: n });
|
|
10268
|
-
},
|
|
10269
|
-
const e = ye("useWindowScroll"), t = ye("customScrollParent"), o = t || e ?
|
|
10296
|
+
}, Du = /* @__PURE__ */ B.memo(function({ ...n }) {
|
|
10297
|
+
const e = ye("useWindowScroll"), t = ye("customScrollParent"), o = t || e ? Bu : Iu, i = t || e ? Lu : Cu, r = ye("context");
|
|
10270
10298
|
return /* @__PURE__ */ E.jsx(o, { ...n, ...ke(o, r), children: /* @__PURE__ */ E.jsxs(i, { children: [
|
|
10271
|
-
/* @__PURE__ */ E.jsx(
|
|
10272
|
-
/* @__PURE__ */ E.jsx(
|
|
10273
|
-
/* @__PURE__ */ E.jsx(
|
|
10299
|
+
/* @__PURE__ */ E.jsx(Ou, {}),
|
|
10300
|
+
/* @__PURE__ */ E.jsx(Au, {}),
|
|
10301
|
+
/* @__PURE__ */ E.jsx(Nu, {})
|
|
10274
10302
|
] }) });
|
|
10275
10303
|
}), {
|
|
10276
10304
|
useEmitter: da,
|
|
10277
10305
|
useEmitterValue: ye,
|
|
10278
10306
|
usePublisher: rt
|
|
10279
10307
|
} = /* @__PURE__ */ ea(
|
|
10280
|
-
|
|
10308
|
+
Ru,
|
|
10281
10309
|
{
|
|
10282
10310
|
optional: {
|
|
10283
10311
|
context: "context",
|
|
@@ -10316,13 +10344,13 @@ const xu = /* @__PURE__ */ ae(() => {
|
|
|
10316
10344
|
readyStateChanged: "readyStateChanged"
|
|
10317
10345
|
}
|
|
10318
10346
|
},
|
|
10319
|
-
|
|
10320
|
-
),
|
|
10347
|
+
Du
|
|
10348
|
+
), Iu = /* @__PURE__ */ sa({ useEmitter: da, useEmitterValue: ye, usePublisher: rt }), Bu = /* @__PURE__ */ aa({ useEmitter: da, useEmitterValue: ye, usePublisher: rt });
|
|
10321
10349
|
function ls(n, e, t) {
|
|
10322
10350
|
return e !== "normal" && !(e != null && e.endsWith("px")) && t(`${n} was not resolved to pixel value correctly`, e, Ze.WARN), e === "normal" ? 0 : parseInt(e ?? "0", 10);
|
|
10323
10351
|
}
|
|
10324
|
-
const
|
|
10325
|
-
const i =
|
|
10352
|
+
const Mu = ({ x: n, y: e, items: t, onClose: o }) => {
|
|
10353
|
+
const i = gn(null);
|
|
10326
10354
|
return Pe(() => {
|
|
10327
10355
|
const r = (s) => {
|
|
10328
10356
|
i.current && !i.current.contains(s.target) && o();
|
|
@@ -10353,10 +10381,10 @@ const Iu = ({ x: n, y: e, items: t, onClose: o }) => {
|
|
|
10353
10381
|
}
|
|
10354
10382
|
);
|
|
10355
10383
|
};
|
|
10356
|
-
function
|
|
10384
|
+
function ku(...n) {
|
|
10357
10385
|
return tn(en(n));
|
|
10358
10386
|
}
|
|
10359
|
-
const
|
|
10387
|
+
const zu = ({
|
|
10360
10388
|
data: n,
|
|
10361
10389
|
onMoveNode: e,
|
|
10362
10390
|
onNewFile: t,
|
|
@@ -10414,7 +10442,7 @@ const Mu = ({
|
|
|
10414
10442
|
];
|
|
10415
10443
|
return /* @__PURE__ */ E.jsxs("div", { className: "h-full w-full bg-muted/30", children: [
|
|
10416
10444
|
/* @__PURE__ */ E.jsx(
|
|
10417
|
-
|
|
10445
|
+
Tu,
|
|
10418
10446
|
{
|
|
10419
10447
|
style: { height: "100%" },
|
|
10420
10448
|
totalCount: s.length,
|
|
@@ -10428,7 +10456,7 @@ const Mu = ({
|
|
|
10428
10456
|
onDragOver: (x) => g(x, y.id, y.type),
|
|
10429
10457
|
onDragLeave: u,
|
|
10430
10458
|
onDrop: (x) => p(x, y.id, y.type),
|
|
10431
|
-
className:
|
|
10459
|
+
className: ku(
|
|
10432
10460
|
"flex items-center py-1 px-2 cursor-pointer hover:bg-accent hover:text-accent-foreground select-none text-xs",
|
|
10433
10461
|
"transition-colors duration-150 relative",
|
|
10434
10462
|
m === y.id && "bg-primary/20 ring-1 ring-primary/50 rounded-sm"
|
|
@@ -10447,7 +10475,7 @@ const Mu = ({
|
|
|
10447
10475
|
}
|
|
10448
10476
|
),
|
|
10449
10477
|
c && /* @__PURE__ */ E.jsx(
|
|
10450
|
-
|
|
10478
|
+
Mu,
|
|
10451
10479
|
{
|
|
10452
10480
|
x: c.x,
|
|
10453
10481
|
y: c.y,
|
|
@@ -10460,7 +10488,7 @@ const Mu = ({
|
|
|
10460
10488
|
function ds(...n) {
|
|
10461
10489
|
return tn(en(n));
|
|
10462
10490
|
}
|
|
10463
|
-
const
|
|
10491
|
+
const $u = ({
|
|
10464
10492
|
placeholder: n = "Search...",
|
|
10465
10493
|
onSearch: e,
|
|
10466
10494
|
results: t,
|
|
@@ -10469,7 +10497,7 @@ const Gu = ({
|
|
|
10469
10497
|
loading: r = !1,
|
|
10470
10498
|
className: s
|
|
10471
10499
|
}) => {
|
|
10472
|
-
const [a, c] = je(""), [f, m] = je(!1), [h, b] = je(-1), d =
|
|
10500
|
+
const [a, c] = je(""), [f, m] = je(!1), [h, b] = je(-1), d = gn(null);
|
|
10473
10501
|
Pe(() => {
|
|
10474
10502
|
const u = setTimeout(() => {
|
|
10475
10503
|
e(a);
|
|
@@ -10489,7 +10517,7 @@ const Gu = ({
|
|
|
10489
10517
|
"input",
|
|
10490
10518
|
{
|
|
10491
10519
|
type: "text",
|
|
10492
|
-
className: "w-full bg-
|
|
10520
|
+
className: "w-full bg-secondary/50 border border-border rounded-md pl-9 pr-8 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-all",
|
|
10493
10521
|
placeholder: n,
|
|
10494
10522
|
value: a,
|
|
10495
10523
|
onChange: (u) => {
|
|
@@ -10554,8 +10582,8 @@ const Gu = ({
|
|
|
10554
10582
|
function cs(...n) {
|
|
10555
10583
|
return tn(en(n));
|
|
10556
10584
|
}
|
|
10557
|
-
const
|
|
10558
|
-
const [t, o] = je(e), [i, r] = je(""), [s, a] = je(0), c =
|
|
10585
|
+
const Ju = ({ commands: n, forcedOpen: e = !1 }) => {
|
|
10586
|
+
const [t, o] = je(e), [i, r] = je(""), [s, a] = je(0), c = gn(null), f = (n || yt.getCommands()).filter(
|
|
10559
10587
|
(b) => b.label.toLowerCase().includes(i.toLowerCase()) || b.id.toLowerCase().includes(i.toLowerCase())
|
|
10560
10588
|
);
|
|
10561
10589
|
Pe(() => {
|
|
@@ -10586,7 +10614,7 @@ const Vu = ({ commands: n, forcedOpen: e = !1 }) => {
|
|
|
10586
10614
|
ref: c,
|
|
10587
10615
|
type: "text",
|
|
10588
10616
|
placeholder: "Type a command to run...",
|
|
10589
|
-
className: "flex-1 h-
|
|
10617
|
+
className: "flex-1 h-14 bg-transparent outline-none text-base text-foreground placeholder:text-muted-foreground",
|
|
10590
10618
|
value: i,
|
|
10591
10619
|
onChange: (b) => {
|
|
10592
10620
|
r(b.target.value), a(0);
|
|
@@ -10633,10 +10661,10 @@ const Vu = ({ commands: n, forcedOpen: e = !1 }) => {
|
|
|
10633
10661
|
] })
|
|
10634
10662
|
] }) }) : null;
|
|
10635
10663
|
};
|
|
10636
|
-
function
|
|
10664
|
+
function Fu(...n) {
|
|
10637
10665
|
return tn(en(n));
|
|
10638
10666
|
}
|
|
10639
|
-
const
|
|
10667
|
+
const Zu = ({
|
|
10640
10668
|
name: n,
|
|
10641
10669
|
avatarUrl: e,
|
|
10642
10670
|
role: t,
|
|
@@ -10647,7 +10675,7 @@ const $u = ({
|
|
|
10647
10675
|
"div",
|
|
10648
10676
|
{
|
|
10649
10677
|
onClick: o,
|
|
10650
|
-
className:
|
|
10678
|
+
className: Fu(
|
|
10651
10679
|
"flex items-center space-x-2 px-2 py-1 rounded hover:bg-accent hover:text-accent-foreground cursor-pointer transition-colors select-none",
|
|
10652
10680
|
i
|
|
10653
10681
|
),
|
|
@@ -10660,10 +10688,10 @@ const $u = ({
|
|
|
10660
10688
|
]
|
|
10661
10689
|
}
|
|
10662
10690
|
);
|
|
10663
|
-
class
|
|
10691
|
+
class Uu {
|
|
10664
10692
|
constructor() {
|
|
10665
|
-
|
|
10666
|
-
|
|
10693
|
+
sn(this, "plugins", /* @__PURE__ */ new Map());
|
|
10694
|
+
sn(this, "loaders", /* @__PURE__ */ new Map());
|
|
10667
10695
|
}
|
|
10668
10696
|
registerPlugin(e) {
|
|
10669
10697
|
if (this.plugins.has(e.id)) {
|
|
@@ -10704,7 +10732,7 @@ class zu {
|
|
|
10704
10732
|
return Array.from(this.plugins.values());
|
|
10705
10733
|
}
|
|
10706
10734
|
}
|
|
10707
|
-
const us = new
|
|
10735
|
+
const us = new Uu(), ju = {
|
|
10708
10736
|
id: "plugin-example",
|
|
10709
10737
|
name: "Example Plugin",
|
|
10710
10738
|
activate: () => {
|
|
@@ -10714,7 +10742,7 @@ const us = new zu(), Fu = {
|
|
|
10714
10742
|
execute: () => {
|
|
10715
10743
|
alert("Hello from Example Plugin!");
|
|
10716
10744
|
}
|
|
10717
|
-
}),
|
|
10745
|
+
}), pn.registerMenu("View", {
|
|
10718
10746
|
id: "view.greet",
|
|
10719
10747
|
label: "Greet from Plugin",
|
|
10720
10748
|
commandId: "plugin.hello"
|
|
@@ -10723,7 +10751,7 @@ const us = new zu(), Fu = {
|
|
|
10723
10751
|
deactivate: () => {
|
|
10724
10752
|
console.log("Example Plugin Deactivated");
|
|
10725
10753
|
}
|
|
10726
|
-
},
|
|
10754
|
+
}, Pu = [
|
|
10727
10755
|
{
|
|
10728
10756
|
id: "src",
|
|
10729
10757
|
label: "src",
|
|
@@ -10755,16 +10783,16 @@ const us = new zu(), Fu = {
|
|
|
10755
10783
|
},
|
|
10756
10784
|
{ id: "package", label: "package.json", type: "file" },
|
|
10757
10785
|
{ id: "readme", label: "README.md", type: "file" }
|
|
10758
|
-
],
|
|
10759
|
-
|
|
10786
|
+
], Hu = () => /* @__PURE__ */ E.jsx(
|
|
10787
|
+
zu,
|
|
10760
10788
|
{
|
|
10761
|
-
data:
|
|
10789
|
+
data: Pu,
|
|
10762
10790
|
onNewFile: (n) => window.prompt("New File Name:"),
|
|
10763
10791
|
onNewFolder: (n) => window.prompt("New Folder Name:"),
|
|
10764
10792
|
onRename: (n) => window.prompt("New Name:"),
|
|
10765
10793
|
onDelete: (n) => window.confirm("Delete this item?")
|
|
10766
10794
|
}
|
|
10767
|
-
),
|
|
10795
|
+
), qu = async () => {
|
|
10768
10796
|
Oi.getState().setWidgets([
|
|
10769
10797
|
{
|
|
10770
10798
|
id: "git-branch",
|
|
@@ -10819,7 +10847,7 @@ const us = new zu(), Fu = {
|
|
|
10819
10847
|
id: "files",
|
|
10820
10848
|
label: "Explorer",
|
|
10821
10849
|
icon: ql,
|
|
10822
|
-
component:
|
|
10850
|
+
component: Hu
|
|
10823
10851
|
},
|
|
10824
10852
|
{
|
|
10825
10853
|
id: "search",
|
|
@@ -10876,21 +10904,21 @@ const us = new zu(), Fu = {
|
|
|
10876
10904
|
keybinding: "Control+H",
|
|
10877
10905
|
execute: () => alert(`Nexus-Shell Framework v0.1.0
|
|
10878
10906
|
Professional-grade Workbench UI`)
|
|
10879
|
-
}),
|
|
10907
|
+
}), pn.registerMenu("File", {
|
|
10880
10908
|
id: "file.new-tab",
|
|
10881
10909
|
label: "New Welcome Tab",
|
|
10882
10910
|
commandId: "nexus.new-tab"
|
|
10883
|
-
}),
|
|
10911
|
+
}), pn.registerMenu("Help", {
|
|
10884
10912
|
id: "help.about",
|
|
10885
10913
|
label: "About",
|
|
10886
10914
|
commandId: "nexus.about"
|
|
10887
|
-
}), us.registerLazyPlugin("plugin-example", async () =>
|
|
10888
|
-
},
|
|
10915
|
+
}), us.registerLazyPlugin("plugin-example", async () => ju), await us.activatePlugin("plugin-example"), console.log("Nexus Shell Core Initialized");
|
|
10916
|
+
}, Ku = () => {
|
|
10889
10917
|
Pe(() => {
|
|
10890
10918
|
const n = (e) => {
|
|
10891
10919
|
const t = yt.getCommands();
|
|
10892
10920
|
for (const o of t)
|
|
10893
|
-
if (o.keybinding &&
|
|
10921
|
+
if (o.keybinding && Wu(e, o.keybinding)) {
|
|
10894
10922
|
e.preventDefault(), o.execute();
|
|
10895
10923
|
break;
|
|
10896
10924
|
}
|
|
@@ -10898,7 +10926,7 @@ Professional-grade Workbench UI`)
|
|
|
10898
10926
|
return window.addEventListener("keydown", n), () => window.removeEventListener("keydown", n);
|
|
10899
10927
|
}, []);
|
|
10900
10928
|
};
|
|
10901
|
-
function
|
|
10929
|
+
function Wu(n, e) {
|
|
10902
10930
|
var b;
|
|
10903
10931
|
const t = e.split("+"), o = (b = t.pop()) == null ? void 0 : b.toLowerCase(), i = t.includes("Control") || t.includes("Ctrl"), r = t.includes("Shift"), s = t.includes("Alt"), a = t.includes("Meta") || t.includes("Cmd"), c = n.ctrlKey, f = n.shiftKey, m = n.altKey, h = n.metaKey;
|
|
10904
10932
|
return n.key.toLowerCase() === o && c === i && f === r && m === s && h === a;
|
|
@@ -10906,21 +10934,22 @@ function Pu(n, e) {
|
|
|
10906
10934
|
export {
|
|
10907
10935
|
ic as ActivityBar,
|
|
10908
10936
|
sc as ChatPane,
|
|
10909
|
-
|
|
10937
|
+
Ju as CommandPalette,
|
|
10910
10938
|
hd as MenuBar,
|
|
10911
|
-
|
|
10912
|
-
|
|
10939
|
+
$u as SearchWidget,
|
|
10940
|
+
Vu as ShellLayout,
|
|
10913
10941
|
rc as SidebarPane,
|
|
10914
10942
|
oc as StatusBar,
|
|
10915
10943
|
ac as TerminalPane,
|
|
10916
|
-
|
|
10917
|
-
|
|
10944
|
+
zu as TreeWidget,
|
|
10945
|
+
Zu as UserProfile,
|
|
10918
10946
|
yt as commandRegistry,
|
|
10919
|
-
|
|
10920
|
-
|
|
10947
|
+
dc as componentRegistry,
|
|
10948
|
+
qu as initializeShell,
|
|
10949
|
+
pn as menuRegistry,
|
|
10921
10950
|
us as pluginRegistry,
|
|
10922
10951
|
Li as useChatStore,
|
|
10923
|
-
|
|
10952
|
+
Ku as useKeyboardShortcuts,
|
|
10924
10953
|
Cs as useLayoutStore,
|
|
10925
10954
|
Os as useRightSidebarStore,
|
|
10926
10955
|
Oo as useSidebarStore,
|