@xenosystem/blocks 0.11.4 → 0.11.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/edit/index.d.ts +8 -5
- package/dist/edit/index.js +518 -847
- package/package.json +3 -3
package/dist/edit/index.js
CHANGED
|
@@ -1201,6 +1201,7 @@ var LayersPanelController = class {
|
|
|
1201
1201
|
|
|
1202
1202
|
// src/edit/layers/react/LayersPanelView.tsx
|
|
1203
1203
|
import { useCallback, useEffect as useEffect2, useRef as useRef2, useState, useSyncExternalStore } from "react";
|
|
1204
|
+
import { Badge, ChipToggle, ColorTag, Column, EmptyState, IconButton, Input, RowList, Row, ScrollArea, SearchField, StatusBar, Text, Toolbar, VirtualWindow } from "@xenosystem/components/chrome";
|
|
1204
1205
|
|
|
1205
1206
|
// src/edit/layers/react/icons.tsx
|
|
1206
1207
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1215,9 +1216,6 @@ var base = (size) => ({
|
|
|
1215
1216
|
strokeLinejoin: "round",
|
|
1216
1217
|
"aria-hidden": true
|
|
1217
1218
|
});
|
|
1218
|
-
function ChevronIcon({ size = 12, className }) {
|
|
1219
|
-
return /* @__PURE__ */ jsx("svg", { ...base(size), className, children: /* @__PURE__ */ jsx("path", { d: "m9 18 6-6-6-6" }) });
|
|
1220
|
-
}
|
|
1221
1219
|
function EyeIcon({ size = 12, className }) {
|
|
1222
1220
|
return /* @__PURE__ */ jsxs("svg", { ...base(size), className, children: [
|
|
1223
1221
|
/* @__PURE__ */ jsx("path", { d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z" }),
|
|
@@ -1243,21 +1241,8 @@ function UnlockIcon({ size = 12, className }) {
|
|
|
1243
1241
|
/* @__PURE__ */ jsx("path", { d: "M8 11V7a4 4 0 0 1 7.5-2" })
|
|
1244
1242
|
] });
|
|
1245
1243
|
}
|
|
1246
|
-
function KindGlyph({ size =
|
|
1247
|
-
return /* @__PURE__ */ jsx(
|
|
1248
|
-
"span",
|
|
1249
|
-
{
|
|
1250
|
-
"aria-hidden": true,
|
|
1251
|
-
style: {
|
|
1252
|
-
width: size,
|
|
1253
|
-
height: size,
|
|
1254
|
-
borderRadius: 2,
|
|
1255
|
-
border: "1px solid currentColor",
|
|
1256
|
-
opacity: 0.5,
|
|
1257
|
-
flex: "0 0 auto"
|
|
1258
|
-
}
|
|
1259
|
-
}
|
|
1260
|
-
);
|
|
1244
|
+
function KindGlyph({ size = 10 }) {
|
|
1245
|
+
return /* @__PURE__ */ jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx("rect", { x: "4", y: "4", width: "16", height: "16", rx: "2" }) });
|
|
1261
1246
|
}
|
|
1262
1247
|
|
|
1263
1248
|
// src/edit/layers/react/Thumbnail.tsx
|
|
@@ -1317,7 +1302,7 @@ function Thumbnail({ size, data }) {
|
|
|
1317
1302
|
}
|
|
1318
1303
|
|
|
1319
1304
|
// src/edit/layers/react/LayersPanelView.tsx
|
|
1320
|
-
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1305
|
+
import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1321
1306
|
var DRAG_THRESHOLD = 4;
|
|
1322
1307
|
function LayersPanelView({ controller }) {
|
|
1323
1308
|
const subscribe = useCallback((cb) => controller.subscribe(cb), [controller]);
|
|
@@ -1371,6 +1356,7 @@ function LayersPanelView({ controller }) {
|
|
|
1371
1356
|
const onRowPointerDown = useCallback(
|
|
1372
1357
|
(e, row) => {
|
|
1373
1358
|
if (e.button !== 0) return;
|
|
1359
|
+
if (e.target?.closest?.("button,input")) return;
|
|
1374
1360
|
pressRef.current = { id: row.id, x: e.clientX, y: e.clientY, dragging: false };
|
|
1375
1361
|
controller.selectNode(row.id, { ctrl: e.ctrlKey, meta: e.metaKey, shift: e.shiftKey });
|
|
1376
1362
|
e.currentTarget.setPointerCapture(e.pointerId);
|
|
@@ -1419,61 +1405,41 @@ function LayersPanelView({ controller }) {
|
|
|
1419
1405
|
},
|
|
1420
1406
|
[controller, renamingId]
|
|
1421
1407
|
);
|
|
1422
|
-
return /* @__PURE__ */ jsxs2(
|
|
1423
|
-
controller.isSearchShown()
|
|
1424
|
-
|
|
1425
|
-
{
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1408
|
+
return /* @__PURE__ */ jsxs2(Column, { className: "xeno-layers-panel", children: [
|
|
1409
|
+
controller.isSearchShown() ? /* @__PURE__ */ jsx3(Toolbar, { children: /* @__PURE__ */ jsx3(SearchField, { value: controller.getFilter(), onChange: (v) => controller.setFilter(v), placeholder: "Search layers", label: "Search layers" }) }) : null,
|
|
1410
|
+
/* @__PURE__ */ jsxs2(ScrollArea, { ref: scrollRef, onScroll, onKeyDown, tabIndex: 0, children: [
|
|
1411
|
+
/* @__PURE__ */ jsx3(RowList, { role: "tree", "aria-label": "Layers", children: /* @__PURE__ */ jsx3(VirtualWindow, { totalHeight: window_.totalHeight, offsetTop: window_.offsetTop, children: windowRows.map((row) => /* @__PURE__ */ jsx3(
|
|
1412
|
+
LayerRow,
|
|
1413
|
+
{
|
|
1414
|
+
row,
|
|
1415
|
+
controller,
|
|
1416
|
+
columns,
|
|
1417
|
+
rowHeight,
|
|
1418
|
+
selected: controller.isSelected(row.id),
|
|
1419
|
+
active: controller.getActiveId() === row.id,
|
|
1420
|
+
renaming: renamingId === row.id,
|
|
1421
|
+
renameDraft,
|
|
1422
|
+
onRenameDraft: setRenameDraft,
|
|
1423
|
+
dropHint: drag?.target && drag.target.targetId === row.id ? drag.target.position : null,
|
|
1424
|
+
onPointerDown: onRowPointerDown,
|
|
1425
|
+
onPointerMove: onRowPointerMove,
|
|
1426
|
+
onPointerUp: onRowPointerUp
|
|
1427
|
+
},
|
|
1428
|
+
row.id
|
|
1429
|
+
)) }) }),
|
|
1430
|
+
rows.length === 0 ? /* @__PURE__ */ jsx3(EmptyState, { title: "No layers" }) : null
|
|
1431
|
+
] }),
|
|
1432
|
+
/* @__PURE__ */ jsx3(
|
|
1433
|
+
StatusBar,
|
|
1437
1434
|
{
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
role: "
|
|
1444
|
-
"aria-label": "Layers",
|
|
1445
|
-
children: [
|
|
1446
|
-
/* @__PURE__ */ jsx3("div", { style: { height: window_.totalHeight, position: "relative" }, children: /* @__PURE__ */ jsx3("div", { style: { transform: `translateY(${window_.offsetTop}px)` }, children: windowRows.map((row) => /* @__PURE__ */ jsx3(
|
|
1447
|
-
LayerRow,
|
|
1448
|
-
{
|
|
1449
|
-
row,
|
|
1450
|
-
controller,
|
|
1451
|
-
columns,
|
|
1452
|
-
rowHeight,
|
|
1453
|
-
selected: controller.isSelected(row.id),
|
|
1454
|
-
active: controller.getActiveId() === row.id,
|
|
1455
|
-
renaming: renamingId === row.id,
|
|
1456
|
-
renameDraft,
|
|
1457
|
-
onRenameDraft: setRenameDraft,
|
|
1458
|
-
dropHint: drag?.target && drag.target.targetId === row.id ? drag.target.position : null,
|
|
1459
|
-
onPointerDown: onRowPointerDown,
|
|
1460
|
-
onPointerMove: onRowPointerMove,
|
|
1461
|
-
onPointerUp: onRowPointerUp
|
|
1462
|
-
},
|
|
1463
|
-
row.id
|
|
1464
|
-
)) }) }),
|
|
1465
|
-
rows.length === 0 && /* @__PURE__ */ jsx3("div", { style: S.empty, children: "No layers" })
|
|
1466
|
-
]
|
|
1435
|
+
left: /* @__PURE__ */ jsxs2(Text, { role: "number", children: [
|
|
1436
|
+
rows.length,
|
|
1437
|
+
" ",
|
|
1438
|
+
rows.length === 1 ? "layer" : "layers"
|
|
1439
|
+
] }),
|
|
1440
|
+
right: controller.getOrderLabel() ? /* @__PURE__ */ jsx3(Text, { role: "meta", children: controller.getOrderLabel() }) : null
|
|
1467
1441
|
}
|
|
1468
|
-
)
|
|
1469
|
-
/* @__PURE__ */ jsxs2("div", { style: S.footer, children: [
|
|
1470
|
-
/* @__PURE__ */ jsxs2("span", { children: [
|
|
1471
|
-
rows.length,
|
|
1472
|
-
" ",
|
|
1473
|
-
rows.length === 1 ? "layer" : "layers"
|
|
1474
|
-
] }),
|
|
1475
|
-
controller.getOrderLabel() && /* @__PURE__ */ jsx3("span", { style: S.dim, children: controller.getOrderLabel() })
|
|
1476
|
-
] })
|
|
1442
|
+
)
|
|
1477
1443
|
] });
|
|
1478
1444
|
}
|
|
1479
1445
|
function LayerRow(props) {
|
|
@@ -1481,25 +1447,49 @@ function LayerRow(props) {
|
|
|
1481
1447
|
const node = row.node;
|
|
1482
1448
|
const container = isContainer(node);
|
|
1483
1449
|
const thumb = controller.getThumbnail(node.thumbnailKey);
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
height: rowHeight,
|
|
1487
|
-
paddingLeft: 4 + row.depth * 10,
|
|
1488
|
-
background: selected ? "var(--xeno-border)" : "transparent",
|
|
1489
|
-
opacity: row.matched ? 1 : 0.45,
|
|
1490
|
-
boxShadow: active ? "inset 0 0 0 1px var(--xeno-control)" : void 0,
|
|
1491
|
-
borderTop: dropHint === "before" ? "1px solid var(--xeno-muted)" : "1px solid transparent",
|
|
1492
|
-
borderBottom: dropHint === "after" ? "1px solid var(--xeno-muted)" : "1px solid transparent",
|
|
1493
|
-
outline: dropHint === "into" ? "1px solid var(--xeno-active)" : void 0
|
|
1494
|
-
};
|
|
1495
|
-
return /* @__PURE__ */ jsxs2(
|
|
1496
|
-
"div",
|
|
1450
|
+
return /* @__PURE__ */ jsx3(
|
|
1451
|
+
Row,
|
|
1497
1452
|
{
|
|
1498
1453
|
"data-layer-row": row.id,
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1454
|
+
height: rowHeight,
|
|
1455
|
+
depth: row.depth,
|
|
1456
|
+
selected,
|
|
1457
|
+
active,
|
|
1458
|
+
dimmed: !row.matched,
|
|
1459
|
+
dropHint,
|
|
1460
|
+
expanded: container ? row.expanded : void 0,
|
|
1461
|
+
onExpandedChange: container ? () => controller.toggleExpanded(row.id) : void 0,
|
|
1462
|
+
icon: columns.includes("thumbnail") && node.thumbnailKey ? /* @__PURE__ */ jsx3(Thumbnail, { size: controller.getThumbnailSize(), data: thumb }) : /* @__PURE__ */ jsx3(KindGlyph, {}),
|
|
1463
|
+
leading: /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
1464
|
+
columns.includes("visibility") && node.visible !== void 0 ? /* @__PURE__ */ jsx3(IconButton, { size: "sm", icon: node.visible ? /* @__PURE__ */ jsx3(EyeIcon, {}) : /* @__PURE__ */ jsx3(EyeOffIcon, {}), label: node.visible ? "Hide layer" : "Show layer", active: node.visible, onClick: () => controller.toggleProp("visible", row.id) }) : null,
|
|
1465
|
+
columns.includes("lock") && node.locked !== void 0 ? /* @__PURE__ */ jsx3(IconButton, { size: "sm", icon: node.locked ? /* @__PURE__ */ jsx3(LockIcon, {}) : /* @__PURE__ */ jsx3(UnlockIcon, {}), label: node.locked ? "Unlock layer" : "Lock layer", active: node.locked, onClick: () => controller.toggleProp("locked", row.id) }) : null,
|
|
1466
|
+
columns.includes("solo") && node.solo !== void 0 ? /* @__PURE__ */ jsx3(ChipToggle, { glyph: "S", label: "Solo", on: !!node.solo, onChange: () => controller.toggleProp("solo", row.id) }) : null,
|
|
1467
|
+
columns.includes("mute") && node.muted !== void 0 ? /* @__PURE__ */ jsx3(ChipToggle, { glyph: "M", label: "Mute", on: !!node.muted, onChange: () => controller.toggleProp("muted", row.id) }) : null,
|
|
1468
|
+
columns.includes("arm") && node.armed !== void 0 ? /* @__PURE__ */ jsx3(ChipToggle, { glyph: "R", label: "Arm", on: !!node.armed, onChange: () => controller.toggleProp("armed", row.id) }) : null,
|
|
1469
|
+
columns.includes("colorLabel") && node.colorLabel !== void 0 ? /* @__PURE__ */ jsx3(ColorTag, { color: node.colorLabel }) : null
|
|
1470
|
+
] }),
|
|
1471
|
+
label: renaming ? /* @__PURE__ */ jsx3(
|
|
1472
|
+
Input,
|
|
1473
|
+
{
|
|
1474
|
+
autoFocus: true,
|
|
1475
|
+
value: props.renameDraft,
|
|
1476
|
+
onChange: (v) => props.onRenameDraft(v),
|
|
1477
|
+
onBlur: () => controller.commitRename(props.renameDraft),
|
|
1478
|
+
onKeyDown: (e) => {
|
|
1479
|
+
e.stopPropagation();
|
|
1480
|
+
if (e.key === "Enter") controller.commitRename(props.renameDraft);
|
|
1481
|
+
if (e.key === "Escape") controller.cancelRename();
|
|
1482
|
+
},
|
|
1483
|
+
label: "Layer name"
|
|
1484
|
+
}
|
|
1485
|
+
) : node.name,
|
|
1486
|
+
trailing: /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
1487
|
+
node.adornments?.map((a, i) => /* @__PURE__ */ jsx3(Badge, { size: "sm", title: a.tooltip, children: a.kind === "spinner" ? "\u2026" : a.label ?? "" }, a.id ?? `${a.kind}-${i}`)),
|
|
1488
|
+
columns.includes("opacity") && node.opacity !== void 0 ? /* @__PURE__ */ jsxs2(Text, { role: "number", children: [
|
|
1489
|
+
Math.round(node.opacity * 100),
|
|
1490
|
+
"%"
|
|
1491
|
+
] }) : null
|
|
1492
|
+
] }),
|
|
1503
1493
|
onPointerDown: (e) => props.onPointerDown(e, row),
|
|
1504
1494
|
onPointerMove: props.onPointerMove,
|
|
1505
1495
|
onPointerUp: props.onPointerUp,
|
|
@@ -1508,228 +1498,10 @@ function LayerRow(props) {
|
|
|
1508
1498
|
e.preventDefault();
|
|
1509
1499
|
controller.requestContextMenu(row.id, e.clientX, e.clientY);
|
|
1510
1500
|
},
|
|
1511
|
-
title: node.name
|
|
1512
|
-
children: [
|
|
1513
|
-
/* @__PURE__ */ jsx3("span", { style: S.twistyCell, children: container && /* @__PURE__ */ jsx3(
|
|
1514
|
-
"button",
|
|
1515
|
-
{
|
|
1516
|
-
type: "button",
|
|
1517
|
-
style: {
|
|
1518
|
-
...S.iconBtn,
|
|
1519
|
-
transform: row.expanded ? "rotate(90deg)" : "none"
|
|
1520
|
-
},
|
|
1521
|
-
onPointerDown: (e) => e.stopPropagation(),
|
|
1522
|
-
onClick: (e) => {
|
|
1523
|
-
e.stopPropagation();
|
|
1524
|
-
controller.toggleExpanded(row.id);
|
|
1525
|
-
},
|
|
1526
|
-
"aria-label": row.expanded ? "Collapse" : "Expand",
|
|
1527
|
-
children: /* @__PURE__ */ jsx3(ChevronIcon, {})
|
|
1528
|
-
}
|
|
1529
|
-
) }),
|
|
1530
|
-
columns.includes("visibility") && node.visible !== void 0 && /* @__PURE__ */ jsx3(
|
|
1531
|
-
"button",
|
|
1532
|
-
{
|
|
1533
|
-
type: "button",
|
|
1534
|
-
style: { ...S.iconBtn, opacity: node.visible ? 0.85 : 0.35 },
|
|
1535
|
-
onPointerDown: (e) => e.stopPropagation(),
|
|
1536
|
-
onClick: (e) => {
|
|
1537
|
-
e.stopPropagation();
|
|
1538
|
-
controller.toggleProp("visible", row.id);
|
|
1539
|
-
},
|
|
1540
|
-
"aria-label": node.visible ? "Hide layer" : "Show layer",
|
|
1541
|
-
children: node.visible ? /* @__PURE__ */ jsx3(EyeIcon, {}) : /* @__PURE__ */ jsx3(EyeOffIcon, {})
|
|
1542
|
-
}
|
|
1543
|
-
),
|
|
1544
|
-
columns.includes("lock") && node.locked !== void 0 && /* @__PURE__ */ jsx3(
|
|
1545
|
-
"button",
|
|
1546
|
-
{
|
|
1547
|
-
type: "button",
|
|
1548
|
-
style: { ...S.iconBtn, opacity: node.locked ? 0.85 : 0.3 },
|
|
1549
|
-
onPointerDown: (e) => e.stopPropagation(),
|
|
1550
|
-
onClick: (e) => {
|
|
1551
|
-
e.stopPropagation();
|
|
1552
|
-
controller.toggleProp("locked", row.id);
|
|
1553
|
-
},
|
|
1554
|
-
"aria-label": node.locked ? "Unlock layer" : "Lock layer",
|
|
1555
|
-
children: node.locked ? /* @__PURE__ */ jsx3(LockIcon, {}) : /* @__PURE__ */ jsx3(UnlockIcon, {})
|
|
1556
|
-
}
|
|
1557
|
-
),
|
|
1558
|
-
columns.includes("solo") && node.solo !== void 0 && /* @__PURE__ */ jsx3(ToggleChip, { label: "S", on: !!node.solo, onClick: () => controller.toggleProp("solo", row.id) }),
|
|
1559
|
-
columns.includes("mute") && node.muted !== void 0 && /* @__PURE__ */ jsx3(ToggleChip, { label: "M", on: !!node.muted, onClick: () => controller.toggleProp("muted", row.id) }),
|
|
1560
|
-
columns.includes("arm") && node.armed !== void 0 && /* @__PURE__ */ jsx3(ToggleChip, { label: "R", on: !!node.armed, onClick: () => controller.toggleProp("armed", row.id) }),
|
|
1561
|
-
columns.includes("colorLabel") && node.colorLabel !== void 0 && /* @__PURE__ */ jsx3(
|
|
1562
|
-
"span",
|
|
1563
|
-
{
|
|
1564
|
-
style: {
|
|
1565
|
-
...S.colorLabel,
|
|
1566
|
-
background: node.colorLabel || "transparent",
|
|
1567
|
-
border: node.colorLabel ? "none" : "1px solid var(--xeno-control)"
|
|
1568
|
-
},
|
|
1569
|
-
"aria-hidden": true
|
|
1570
|
-
}
|
|
1571
|
-
),
|
|
1572
|
-
columns.includes("thumbnail") && node.thumbnailKey && /* @__PURE__ */ jsx3(Thumbnail, { size: controller.getThumbnailSize(), data: thumb }),
|
|
1573
|
-
!node.thumbnailKey && /* @__PURE__ */ jsx3(KindGlyph, {}),
|
|
1574
|
-
renaming ? /* @__PURE__ */ jsx3(
|
|
1575
|
-
"input",
|
|
1576
|
-
{
|
|
1577
|
-
autoFocus: true,
|
|
1578
|
-
value: props.renameDraft,
|
|
1579
|
-
onChange: (e) => props.onRenameDraft(e.target.value),
|
|
1580
|
-
onPointerDown: (e) => e.stopPropagation(),
|
|
1581
|
-
onBlur: () => controller.commitRename(props.renameDraft),
|
|
1582
|
-
onKeyDown: (e) => {
|
|
1583
|
-
e.stopPropagation();
|
|
1584
|
-
if (e.key === "Enter") controller.commitRename(props.renameDraft);
|
|
1585
|
-
if (e.key === "Escape") controller.cancelRename();
|
|
1586
|
-
},
|
|
1587
|
-
style: S.renameInput,
|
|
1588
|
-
"aria-label": "Layer name"
|
|
1589
|
-
}
|
|
1590
|
-
) : /* @__PURE__ */ jsx3("span", { style: S.name, children: node.name }),
|
|
1591
|
-
node.adornments?.map((a, i) => /* @__PURE__ */ jsx3("span", { style: S.badge, title: a.tooltip, children: a.kind === "spinner" ? "\u2026" : a.label ?? "" }, a.id ?? `${a.kind}-${i}`)),
|
|
1592
|
-
columns.includes("opacity") && node.opacity !== void 0 && /* @__PURE__ */ jsxs2("span", { style: S.opacity, children: [
|
|
1593
|
-
Math.round(node.opacity * 100),
|
|
1594
|
-
"%"
|
|
1595
|
-
] })
|
|
1596
|
-
]
|
|
1597
|
-
}
|
|
1598
|
-
);
|
|
1599
|
-
}
|
|
1600
|
-
function ToggleChip({
|
|
1601
|
-
label,
|
|
1602
|
-
on,
|
|
1603
|
-
onClick
|
|
1604
|
-
}) {
|
|
1605
|
-
return /* @__PURE__ */ jsx3(
|
|
1606
|
-
"button",
|
|
1607
|
-
{
|
|
1608
|
-
type: "button",
|
|
1609
|
-
style: { ...S.chip, opacity: on ? 1 : 0.35, background: on ? "var(--xeno-control)" : "transparent" },
|
|
1610
|
-
onPointerDown: (e) => e.stopPropagation(),
|
|
1611
|
-
onClick: (e) => {
|
|
1612
|
-
e.stopPropagation();
|
|
1613
|
-
onClick();
|
|
1614
|
-
},
|
|
1615
|
-
"aria-pressed": on,
|
|
1616
|
-
"aria-label": label,
|
|
1617
|
-
children: label
|
|
1501
|
+
title: node.name
|
|
1618
1502
|
}
|
|
1619
1503
|
);
|
|
1620
1504
|
}
|
|
1621
|
-
var S = {
|
|
1622
|
-
root: {
|
|
1623
|
-
display: "flex",
|
|
1624
|
-
flexDirection: "column",
|
|
1625
|
-
height: "100%",
|
|
1626
|
-
minHeight: 0,
|
|
1627
|
-
fontSize: 11,
|
|
1628
|
-
color: "var(--xeno-text)",
|
|
1629
|
-
background: "var(--xeno-canvas)",
|
|
1630
|
-
userSelect: "none"
|
|
1631
|
-
},
|
|
1632
|
-
header: {
|
|
1633
|
-
display: "flex",
|
|
1634
|
-
alignItems: "center",
|
|
1635
|
-
padding: "4px 6px",
|
|
1636
|
-
background: "var(--xeno-panel-header)",
|
|
1637
|
-
flex: "0 0 auto"
|
|
1638
|
-
},
|
|
1639
|
-
search: {
|
|
1640
|
-
width: "100%",
|
|
1641
|
-
height: 20,
|
|
1642
|
-
background: "var(--xeno-canvas)",
|
|
1643
|
-
color: "inherit",
|
|
1644
|
-
border: "1px solid var(--xeno-border)",
|
|
1645
|
-
borderRadius: 2,
|
|
1646
|
-
fontSize: 11,
|
|
1647
|
-
padding: "0 6px",
|
|
1648
|
-
outline: "none"
|
|
1649
|
-
},
|
|
1650
|
-
scroll: { flex: "1 1 auto", minHeight: 0, overflowY: "auto", overflowX: "hidden", outline: "none" },
|
|
1651
|
-
row: {
|
|
1652
|
-
display: "flex",
|
|
1653
|
-
alignItems: "center",
|
|
1654
|
-
gap: 4,
|
|
1655
|
-
paddingRight: 6,
|
|
1656
|
-
boxSizing: "border-box",
|
|
1657
|
-
cursor: "default",
|
|
1658
|
-
overflow: "hidden"
|
|
1659
|
-
},
|
|
1660
|
-
twistyCell: { width: 12, display: "flex", alignItems: "center", flex: "0 0 auto" },
|
|
1661
|
-
iconBtn: {
|
|
1662
|
-
display: "flex",
|
|
1663
|
-
alignItems: "center",
|
|
1664
|
-
justifyContent: "center",
|
|
1665
|
-
width: 14,
|
|
1666
|
-
height: 14,
|
|
1667
|
-
padding: 0,
|
|
1668
|
-
border: "none",
|
|
1669
|
-
borderRadius: 2,
|
|
1670
|
-
background: "transparent",
|
|
1671
|
-
color: "inherit",
|
|
1672
|
-
cursor: "pointer",
|
|
1673
|
-
flex: "0 0 auto"
|
|
1674
|
-
},
|
|
1675
|
-
chip: {
|
|
1676
|
-
width: 14,
|
|
1677
|
-
height: 14,
|
|
1678
|
-
padding: 0,
|
|
1679
|
-
border: "none",
|
|
1680
|
-
borderRadius: 2,
|
|
1681
|
-
color: "inherit",
|
|
1682
|
-
fontSize: 9,
|
|
1683
|
-
lineHeight: "14px",
|
|
1684
|
-
cursor: "pointer",
|
|
1685
|
-
flex: "0 0 auto"
|
|
1686
|
-
},
|
|
1687
|
-
colorLabel: { width: 4, height: 14, borderRadius: 2, flex: "0 0 auto" },
|
|
1688
|
-
name: { flex: "1 1 auto", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", minWidth: 0 },
|
|
1689
|
-
renameInput: {
|
|
1690
|
-
flex: "1 1 auto",
|
|
1691
|
-
minWidth: 0,
|
|
1692
|
-
height: 16,
|
|
1693
|
-
background: "var(--xeno-canvas)",
|
|
1694
|
-
color: "inherit",
|
|
1695
|
-
border: "1px solid var(--xeno-control)",
|
|
1696
|
-
borderRadius: 2,
|
|
1697
|
-
fontSize: 11,
|
|
1698
|
-
padding: "0 4px",
|
|
1699
|
-
outline: "none"
|
|
1700
|
-
},
|
|
1701
|
-
badge: {
|
|
1702
|
-
fontSize: 9,
|
|
1703
|
-
padding: "0 4px",
|
|
1704
|
-
height: 14,
|
|
1705
|
-
lineHeight: "14px",
|
|
1706
|
-
borderRadius: 2,
|
|
1707
|
-
background: "var(--xeno-border-subtle)",
|
|
1708
|
-
color: "var(--xeno-muted)",
|
|
1709
|
-
flex: "0 0 auto"
|
|
1710
|
-
},
|
|
1711
|
-
opacity: {
|
|
1712
|
-
fontSize: 10,
|
|
1713
|
-
color: "var(--xeno-muted)",
|
|
1714
|
-
fontVariantNumeric: "tabular-nums",
|
|
1715
|
-
flex: "0 0 auto",
|
|
1716
|
-
minWidth: 30,
|
|
1717
|
-
textAlign: "right"
|
|
1718
|
-
},
|
|
1719
|
-
empty: { padding: 12, fontSize: 10, opacity: 0.4, textTransform: "uppercase", letterSpacing: "0.08em" },
|
|
1720
|
-
footer: {
|
|
1721
|
-
display: "flex",
|
|
1722
|
-
alignItems: "center",
|
|
1723
|
-
justifyContent: "space-between",
|
|
1724
|
-
gap: 8,
|
|
1725
|
-
padding: "2px 6px",
|
|
1726
|
-
fontSize: 9,
|
|
1727
|
-
color: "var(--xeno-muted)",
|
|
1728
|
-
background: "var(--xeno-panel-header)",
|
|
1729
|
-
flex: "0 0 auto"
|
|
1730
|
-
},
|
|
1731
|
-
dim: { opacity: 0.7 }
|
|
1732
|
-
};
|
|
1733
1505
|
|
|
1734
1506
|
// src/edit/layers/panel.ts
|
|
1735
1507
|
function createLayersPanel(options = {}) {
|
|
@@ -3038,7 +2810,7 @@ var InspectorPanelController = class {
|
|
|
3038
2810
|
|
|
3039
2811
|
// src/edit/inspector/react/InspectorPanelView.tsx
|
|
3040
2812
|
import { useCallback as useCallback3, useSyncExternalStore as useSyncExternalStore2 } from "react";
|
|
3041
|
-
import { Badge, Column, EmptyState, Field, FieldGroup, IconButton as
|
|
2813
|
+
import { Badge as Badge2, Column as Column2, EmptyState as EmptyState2, Field, FieldGroup, IconButton as IconButton3, ScrollArea as ScrollArea2, SearchField as SearchField2, Section, Select as Select2, Stack as Stack2, Text as Text3 } from "@xenosystem/components/chrome";
|
|
3042
2814
|
|
|
3043
2815
|
// src/edit/inspector/react/icons.tsx
|
|
3044
2816
|
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
@@ -3092,19 +2864,19 @@ function XIcon({ size = 10 }) {
|
|
|
3092
2864
|
import { useCallback as useCallback2, useRef as useRef3 } from "react";
|
|
3093
2865
|
import {
|
|
3094
2866
|
AxisLabel,
|
|
3095
|
-
IconButton,
|
|
3096
|
-
Input,
|
|
2867
|
+
IconButton as IconButton2,
|
|
2868
|
+
Input as Input2,
|
|
3097
2869
|
ProportionBar,
|
|
3098
2870
|
SegmentedControl,
|
|
3099
2871
|
Select,
|
|
3100
2872
|
Stack,
|
|
3101
2873
|
Swatch,
|
|
3102
|
-
Text,
|
|
2874
|
+
Text as Text2,
|
|
3103
2875
|
TextArea,
|
|
3104
2876
|
TextButton,
|
|
3105
2877
|
Toggle
|
|
3106
2878
|
} from "@xenosystem/components/chrome";
|
|
3107
|
-
import { Fragment, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2879
|
+
import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
3108
2880
|
function displayText(field, controller) {
|
|
3109
2881
|
const draft = controller.getDraft(field.id);
|
|
3110
2882
|
if (draft !== void 0) return draft;
|
|
@@ -3216,7 +2988,7 @@ function NumberWidget({ field, controller, component }) {
|
|
|
3216
2988
|
return /* @__PURE__ */ jsxs4(Stack, { direction: "row", gap: 2, pad: "none", children: [
|
|
3217
2989
|
component !== void 0 && field.components?.[component] ? /* @__PURE__ */ jsx5(AxisLabel, { scrubbable: editable, onPointerDown, onPointerMove, onPointerUp, children: field.components[component] }) : null,
|
|
3218
2990
|
/* @__PURE__ */ jsx5(
|
|
3219
|
-
|
|
2991
|
+
Input2,
|
|
3220
2992
|
{
|
|
3221
2993
|
inputMode: "decimal",
|
|
3222
2994
|
value: text,
|
|
@@ -3240,7 +3012,7 @@ function VectorWidget({ field, controller }) {
|
|
|
3240
3012
|
const expanded = controller.isExpanded(field.id) || !controller.isUniformVector(field.id);
|
|
3241
3013
|
const value = controller.getFieldValue(field.id);
|
|
3242
3014
|
const count = Array.isArray(value) ? value.length : field.components?.length ?? 0;
|
|
3243
|
-
const toggle = (label, title) => /* @__PURE__ */ jsx5(
|
|
3015
|
+
const toggle = (label, title) => /* @__PURE__ */ jsx5(IconButton2, { size: "sm", icon: /* @__PURE__ */ jsx5("span", { "aria-hidden": true, children: "\u22EF" }), label, onClick: () => controller.toggleExpanded(field.id) });
|
|
3244
3016
|
if (!expanded && field.expandable) {
|
|
3245
3017
|
return /* @__PURE__ */ jsxs4(Stack, { direction: "row", gap: 3, pad: "none", children: [
|
|
3246
3018
|
/* @__PURE__ */ jsx5(NumberWidget, { field, controller, component: 0 }),
|
|
@@ -3269,7 +3041,7 @@ function TextWidget({ field, controller }) {
|
|
|
3269
3041
|
onKeyDown: handlers.onKeyDown
|
|
3270
3042
|
};
|
|
3271
3043
|
if (field.type === "textarea") return /* @__PURE__ */ jsx5(TextArea, { ...shared, rows: field.rows ?? 3 });
|
|
3272
|
-
return /* @__PURE__ */ jsx5(
|
|
3044
|
+
return /* @__PURE__ */ jsx5(Input2, { ...shared });
|
|
3273
3045
|
}
|
|
3274
3046
|
function CodeWidget({ field, controller }) {
|
|
3275
3047
|
const editable = isFieldEditable(field);
|
|
@@ -3369,11 +3141,11 @@ function ListWidget({ field, controller }) {
|
|
|
3369
3141
|
};
|
|
3370
3142
|
return /* @__PURE__ */ jsxs4(Stack, { gap: 2, pad: "none", children: [
|
|
3371
3143
|
items.map((item, i) => /* @__PURE__ */ jsxs4(Stack, { direction: "row", gap: 2, pad: "none", children: [
|
|
3372
|
-
/* @__PURE__ */ jsx5(
|
|
3373
|
-
editable ? /* @__PURE__ */ jsxs4(
|
|
3374
|
-
/* @__PURE__ */ jsx5(
|
|
3375
|
-
/* @__PURE__ */ jsx5(
|
|
3376
|
-
/* @__PURE__ */ jsx5(
|
|
3144
|
+
/* @__PURE__ */ jsx5(Text2, { role: "meta", children: typeof item === "string" ? item : JSON.stringify(item) }),
|
|
3145
|
+
editable ? /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
3146
|
+
/* @__PURE__ */ jsx5(IconButton2, { size: "sm", icon: /* @__PURE__ */ jsx5("span", { "aria-hidden": true, children: "\u2191" }), label: "Move up", disabled: i === 0, onClick: () => move(i, i - 1) }),
|
|
3147
|
+
/* @__PURE__ */ jsx5(IconButton2, { size: "sm", icon: /* @__PURE__ */ jsx5("span", { "aria-hidden": true, children: "\u2193" }), label: "Move down", disabled: i === items.length - 1, onClick: () => move(i, i + 1) }),
|
|
3148
|
+
/* @__PURE__ */ jsx5(IconButton2, { size: "sm", icon: /* @__PURE__ */ jsx5(XIcon, {}), label: "Remove", onClick: () => write(items.filter((_, j) => j !== i)) })
|
|
3377
3149
|
] }) : null
|
|
3378
3150
|
] }, i)),
|
|
3379
3151
|
editable ? /* @__PURE__ */ jsx5(TextButton, { onClick: () => write([...items, ""]), children: "+ Add" }) : null
|
|
@@ -3381,7 +3153,7 @@ function ListWidget({ field, controller }) {
|
|
|
3381
3153
|
}
|
|
3382
3154
|
function InfoWidget({ field, controller }) {
|
|
3383
3155
|
const value = controller.getFieldValue(field.id);
|
|
3384
|
-
return /* @__PURE__ */ jsx5(
|
|
3156
|
+
return /* @__PURE__ */ jsx5(Text2, { role: "meta", children: value === void 0 || value === null ? "\u2014" : String(value) });
|
|
3385
3157
|
}
|
|
3386
3158
|
function JsonWidget({ field, controller }) {
|
|
3387
3159
|
const editable = isFieldEditable(field);
|
|
@@ -3403,7 +3175,7 @@ function JsonWidget({ field, controller }) {
|
|
|
3403
3175
|
}
|
|
3404
3176
|
|
|
3405
3177
|
// src/edit/inspector/react/InspectorPanelView.tsx
|
|
3406
|
-
import { Fragment as
|
|
3178
|
+
import { Fragment as Fragment3, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
3407
3179
|
function InspectorPanelView({ controller }) {
|
|
3408
3180
|
const subscribe = useCallback3((cb) => controller.subscribe(cb), [controller]);
|
|
3409
3181
|
const getSnapshot = useCallback3(() => controller.getRevision(), [controller]);
|
|
@@ -3421,15 +3193,15 @@ function InspectorPanelView({ controller }) {
|
|
|
3421
3193
|
);
|
|
3422
3194
|
const multi = targets.length > 1;
|
|
3423
3195
|
const blocked = multi && !controller.canEditTargets();
|
|
3424
|
-
return /* @__PURE__ */ jsxs5(
|
|
3196
|
+
return /* @__PURE__ */ jsxs5(Column2, { className: "xeno-inspector-panel", children: [
|
|
3425
3197
|
controller.isSearchShown() ? /* @__PURE__ */ jsxs5(Stack2, { direction: "row", gap: 6, children: [
|
|
3426
|
-
/* @__PURE__ */ jsx6(
|
|
3427
|
-
targets.length > 0 ? /* @__PURE__ */ jsx6(
|
|
3198
|
+
/* @__PURE__ */ jsx6(SearchField2, { value: controller.getFilter(), onChange: (v) => controller.setFilter(v), placeholder: "Search properties", label: "Search properties" }),
|
|
3199
|
+
targets.length > 0 ? /* @__PURE__ */ jsx6(Badge2, { children: multi ? `${targets.length} selected` : targets[0]?.label ?? targets[0]?.id }) : null
|
|
3428
3200
|
] }) : null,
|
|
3429
|
-
multi ? /* @__PURE__ */ jsx6(Stack2, { pad: "inset", children: /* @__PURE__ */ jsx6(
|
|
3430
|
-
/* @__PURE__ */ jsx6(
|
|
3201
|
+
multi ? /* @__PURE__ */ jsx6(Stack2, { pad: "inset", children: /* @__PURE__ */ jsx6(Text3, { role: "caption", children: blocked ? `${targets.length} selected \u2014 multi-editing is disabled` : `${targets.length} selected \xB7 shared values shown` }) }) : null,
|
|
3202
|
+
/* @__PURE__ */ jsx6(ScrollArea2, { children: /* @__PURE__ */ jsxs5("div", { onKeyDown, tabIndex: 0, role: "group", "aria-label": "Properties", className: "xeno-inspector-properties", children: [
|
|
3431
3203
|
sections.map((projected) => /* @__PURE__ */ jsx6(SectionView, { projected, controller }, projected.section.id)),
|
|
3432
|
-
sections.length === 0 ? /* @__PURE__ */ jsx6(
|
|
3204
|
+
sections.length === 0 ? /* @__PURE__ */ jsx6(EmptyState2, { title: targets.length === 0 ? "Nothing selected" : "No properties" }) : null
|
|
3433
3205
|
] }) })
|
|
3434
3206
|
] });
|
|
3435
3207
|
}
|
|
@@ -3445,13 +3217,13 @@ function SectionView({ projected, controller }) {
|
|
|
3445
3217
|
onCollapsedChange: () => controller.toggleSectionCollapsed(section.id),
|
|
3446
3218
|
enabled: section.enabled?.value,
|
|
3447
3219
|
onEnabledChange: section.enabled ? () => controller.toggleSectionEnabled(section.id) : void 0,
|
|
3448
|
-
badge: section.badge ? /* @__PURE__ */ jsx6(
|
|
3449
|
-
actions: /* @__PURE__ */ jsxs5(
|
|
3450
|
-
section.actions?.map((action) => /* @__PURE__ */ jsx6(
|
|
3220
|
+
badge: section.badge ? /* @__PURE__ */ jsx6(Badge2, { children: section.badge }) : null,
|
|
3221
|
+
actions: /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
|
3222
|
+
section.actions?.map((action) => /* @__PURE__ */ jsx6(IconButton3, { size: "sm", icon: /* @__PURE__ */ jsx6("span", { "aria-hidden": true, children: action.label.slice(0, 1) }), label: action.label, disabled: action.disabled, onClick: () => controller.runAction(section.id, action.id) }, action.id)),
|
|
3451
3223
|
section.addMenu && section.addMenu.length > 0 ? /* @__PURE__ */ jsx6(AddMenu, { section, controller }) : null
|
|
3452
3224
|
] }),
|
|
3453
3225
|
children: [
|
|
3454
|
-
empty && section.emptyHint ? /* @__PURE__ */ jsx6(Stack2, { pad: "inset", children: /* @__PURE__ */ jsx6(
|
|
3226
|
+
empty && section.emptyHint ? /* @__PURE__ */ jsx6(Stack2, { pad: "inset", children: /* @__PURE__ */ jsx6(Text3, { role: "caption", children: section.emptyHint }) }) : null,
|
|
3455
3227
|
/* @__PURE__ */ jsx6(FieldGroup, { labelWidth: controller.getLabelWidth(), children: fields.map((field) => /* @__PURE__ */ jsx6(FieldRow, { field, controller }, field.id)) })
|
|
3456
3228
|
]
|
|
3457
3229
|
}
|
|
@@ -3469,7 +3241,7 @@ function FieldRow({ field, controller }) {
|
|
|
3469
3241
|
const easingOptions = anim?.easingOptions ?? [];
|
|
3470
3242
|
const easing = anim?.easing ?? "";
|
|
3471
3243
|
const easingAll = easingOptions.some((o) => o.value === easing) ? easingOptions : [{ value: easing, label: easing || "\u2014" }, ...easingOptions];
|
|
3472
|
-
return /* @__PURE__ */ jsxs5(
|
|
3244
|
+
return /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
|
3473
3245
|
/* @__PURE__ */ jsx6(
|
|
3474
3246
|
Field,
|
|
3475
3247
|
{
|
|
@@ -3478,24 +3250,24 @@ function FieldRow({ field, controller }) {
|
|
|
3478
3250
|
focused,
|
|
3479
3251
|
onLabelClick: () => controller.focusField(field.id),
|
|
3480
3252
|
onContextMenu: (x, y) => controller.requestContextMenu(field.id, x, y),
|
|
3481
|
-
leading: showKeyframes ? /* @__PURE__ */ jsxs5(
|
|
3482
|
-
/* @__PURE__ */ jsx6(
|
|
3483
|
-
anim.animated ? /* @__PURE__ */ jsxs5(
|
|
3484
|
-
/* @__PURE__ */ jsx6(
|
|
3485
|
-
/* @__PURE__ */ jsx6(
|
|
3486
|
-
/* @__PURE__ */ jsx6(
|
|
3253
|
+
leading: showKeyframes ? /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
|
3254
|
+
/* @__PURE__ */ jsx6(IconButton3, { size: "sm", icon: /* @__PURE__ */ jsx6(StopwatchIcon, {}), label: "Toggle animation", active: anim.animated, onClick: () => controller.keyframe(field.id, "toggleAnim") }),
|
|
3255
|
+
anim.animated ? /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
|
3256
|
+
/* @__PURE__ */ jsx6(IconButton3, { size: "sm", icon: /* @__PURE__ */ jsx6(PrevIcon, {}), label: "Previous keyframe", disabled: anim.canPrev === false, onClick: () => controller.keyframe(field.id, "prev") }),
|
|
3257
|
+
/* @__PURE__ */ jsx6(IconButton3, { size: "sm", icon: /* @__PURE__ */ jsx6(DiamondIcon, { filled: !!anim.onKeyframe }), label: anim.onKeyframe ? "Remove keyframe" : "Add keyframe", onClick: () => controller.keyframe(field.id, anim.onKeyframe ? "remove" : "add") }),
|
|
3258
|
+
/* @__PURE__ */ jsx6(IconButton3, { size: "sm", icon: /* @__PURE__ */ jsx6(NextIcon, {}), label: "Next keyframe", disabled: anim.canNext === false, onClick: () => controller.keyframe(field.id, "next") })
|
|
3487
3259
|
] }) : null
|
|
3488
3260
|
] }) : null,
|
|
3489
|
-
trailing: /* @__PURE__ */ jsxs5(
|
|
3261
|
+
trailing: /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
|
3490
3262
|
showKeyframes && anim.animated && anim.onKeyframe ? /* @__PURE__ */ jsx6(Select2, { size: "sm", options: easingAll, value: easing, label: "Easing", onChange: (v) => controller.keyframe(field.id, "setEasing", v) }) : null,
|
|
3491
|
-
showKeyframes ? /* @__PURE__ */ jsx6(
|
|
3492
|
-
controller.areTokensShown() && field.token?.bindable !== false ? /* @__PURE__ */ jsx6(
|
|
3493
|
-
field.defaultValue !== void 0 && isFieldEditable(field) ? /* @__PURE__ */ jsx6(
|
|
3263
|
+
showKeyframes ? /* @__PURE__ */ jsx6(Badge2, { size: "sm", children: controller.keyframeChip(field.id) }) : null,
|
|
3264
|
+
controller.areTokensShown() && field.token?.bindable !== false ? /* @__PURE__ */ jsx6(IconButton3, { size: "sm", icon: /* @__PURE__ */ jsx6(LinkIcon, {}), label: bound ? "Unbind token" : "Bind token", active: bound, onClick: () => controller.bindToken(field.id, bound ? null : controller.getTokens()[0]?.id ?? null) }) : null,
|
|
3265
|
+
field.defaultValue !== void 0 && isFieldEditable(field) ? /* @__PURE__ */ jsx6(IconButton3, { size: "sm", icon: /* @__PURE__ */ jsx6(ResetIcon, {}), label: "Reset to default", onClick: () => controller.resetField(field.id) }) : null
|
|
3494
3266
|
] }),
|
|
3495
|
-
children: bound ? /* @__PURE__ */ jsx6(
|
|
3267
|
+
children: bound ? /* @__PURE__ */ jsx6(Badge2, { title: `Bound to ${field.token?.tokenName ?? field.token?.tokenId}`, children: field.token?.tokenName ?? field.token?.tokenId }) : /* @__PURE__ */ jsx6(FieldWidget, { field, controller })
|
|
3496
3268
|
}
|
|
3497
3269
|
),
|
|
3498
|
-
field.description && field.type === "info" ? /* @__PURE__ */ jsx6(Stack2, { pad: "inset", children: /* @__PURE__ */ jsx6(
|
|
3270
|
+
field.description && field.type === "info" ? /* @__PURE__ */ jsx6(Stack2, { pad: "inset", children: /* @__PURE__ */ jsx6(Text3, { role: "caption", children: field.description }) }) : null
|
|
3499
3271
|
] });
|
|
3500
3272
|
}
|
|
3501
3273
|
function FieldWidget({
|
|
@@ -4483,7 +4255,7 @@ var HistoryPanelController = class {
|
|
|
4483
4255
|
|
|
4484
4256
|
// src/edit/history/react/HistoryPanelView.tsx
|
|
4485
4257
|
import { useCallback as useCallback4, useEffect as useEffect3, useRef as useRef4, useSyncExternalStore as useSyncExternalStore3 } from "react";
|
|
4486
|
-
import { Badge as
|
|
4258
|
+
import { Badge as Badge3, Column as Column3, EmptyState as EmptyState3, IconButton as IconButton4, InlineConfirm, RowList as RowList2, Row as Row2, ScrollArea as ScrollArea3, SearchField as SearchField3, StatusBar as StatusBar2, Text as Text4, Toolbar as Toolbar2, VirtualWindow as VirtualWindow2 } from "@xenosystem/components/chrome";
|
|
4487
4259
|
|
|
4488
4260
|
// src/edit/history/react/icons.tsx
|
|
4489
4261
|
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
@@ -4579,7 +4351,7 @@ function PendingGlyph({ size = 9 }) {
|
|
|
4579
4351
|
}
|
|
4580
4352
|
|
|
4581
4353
|
// src/edit/history/react/HistoryPanelView.tsx
|
|
4582
|
-
import { Fragment as
|
|
4354
|
+
import { Fragment as Fragment4, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
4583
4355
|
function HistoryPanelView({ controller }) {
|
|
4584
4356
|
const subscribe = useCallback4((cb) => controller.subscribe(cb), [controller]);
|
|
4585
4357
|
const getSnapshot = useCallback4(() => controller.getRevision(), [controller]);
|
|
@@ -4628,29 +4400,29 @@ function HistoryPanelView({ controller }) {
|
|
|
4628
4400
|
},
|
|
4629
4401
|
[controller]
|
|
4630
4402
|
);
|
|
4631
|
-
return /* @__PURE__ */ jsxs7(
|
|
4403
|
+
return /* @__PURE__ */ jsxs7(Column3, { className: "xeno-history-panel", children: [
|
|
4632
4404
|
/* @__PURE__ */ jsx8(
|
|
4633
|
-
|
|
4405
|
+
Toolbar2,
|
|
4634
4406
|
{
|
|
4635
|
-
left: /* @__PURE__ */ jsxs7(
|
|
4636
|
-
/* @__PURE__ */ jsx8(
|
|
4637
|
-
/* @__PURE__ */ jsx8(
|
|
4407
|
+
left: /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
4408
|
+
/* @__PURE__ */ jsx8(IconButton4, { size: "sm", icon: /* @__PURE__ */ jsx8(UndoIcon, {}), label: "Undo", disabled: !controller.canUndo(), onClick: () => controller.undo() }),
|
|
4409
|
+
/* @__PURE__ */ jsx8(IconButton4, { size: "sm", icon: /* @__PURE__ */ jsx8(RedoIcon, {}), label: "Redo", disabled: !controller.canRedo(), onClick: () => controller.redo() })
|
|
4638
4410
|
] }),
|
|
4639
|
-
right: /* @__PURE__ */ jsxs7(
|
|
4640
|
-
/* @__PURE__ */ jsxs7(
|
|
4411
|
+
right: /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
4412
|
+
/* @__PURE__ */ jsxs7(Text4, { role: "number", children: [
|
|
4641
4413
|
controller.getAppliedCount(),
|
|
4642
4414
|
" / ",
|
|
4643
4415
|
controller.getTotalCount()
|
|
4644
4416
|
] }),
|
|
4645
|
-
controller.isClearAllowed() ? /* @__PURE__ */ jsx8(
|
|
4417
|
+
controller.isClearAllowed() ? /* @__PURE__ */ jsx8(IconButton4, { size: "sm", icon: /* @__PURE__ */ jsx8(TrashIcon, {}), label: "Clear history", onClick: () => controller.requestClear() }) : null
|
|
4646
4418
|
] }),
|
|
4647
|
-
children: controller.isSearchShown() ? /* @__PURE__ */ jsx8(
|
|
4419
|
+
children: controller.isSearchShown() ? /* @__PURE__ */ jsx8(SearchField3, { value: controller.getFilter(), onChange: (v) => controller.setFilter(v), placeholder: "Search history", label: "Search history" }) : null
|
|
4648
4420
|
}
|
|
4649
4421
|
),
|
|
4650
4422
|
controller.isConfirmingClear() ? /* @__PURE__ */ jsx8(InlineConfirm, { message: "Clear all history?", label: "Confirm clear history", confirmLabel: "Clear", onConfirm: () => controller.confirmClearNow(), onCancel: () => controller.cancelClear() }) : null,
|
|
4651
|
-
controller.isPruned() ? /* @__PURE__ */ jsx8(
|
|
4652
|
-
/* @__PURE__ */ jsxs7(
|
|
4653
|
-
/* @__PURE__ */ jsx8(
|
|
4423
|
+
controller.isPruned() ? /* @__PURE__ */ jsx8(Text4, { role: "caption", children: "Earlier history discarded (limit reached)" }) : null,
|
|
4424
|
+
/* @__PURE__ */ jsxs7(ScrollArea3, { ref: scrollRef, onScroll, onKeyDown, onMouseLeave: () => controller.setHovered(null), tabIndex: 0, children: [
|
|
4425
|
+
/* @__PURE__ */ jsx8(RowList2, { role: "listbox", "aria-label": "History", children: /* @__PURE__ */ jsx8(VirtualWindow2, { totalHeight: window_.totalHeight, offsetTop: window_.offsetTop, children: windowRows.map((row) => /* @__PURE__ */ jsx8(
|
|
4654
4426
|
HistoryRowView,
|
|
4655
4427
|
{
|
|
4656
4428
|
row,
|
|
@@ -4660,17 +4432,17 @@ function HistoryPanelView({ controller }) {
|
|
|
4660
4432
|
},
|
|
4661
4433
|
row.entryId ?? "__original__"
|
|
4662
4434
|
)) }) }),
|
|
4663
|
-
rows.length === 0 ? /* @__PURE__ */ jsx8(
|
|
4435
|
+
rows.length === 0 ? /* @__PURE__ */ jsx8(EmptyState3, { title: "No history" }) : null
|
|
4664
4436
|
] }),
|
|
4665
4437
|
memory ? /* @__PURE__ */ jsx8(
|
|
4666
|
-
|
|
4438
|
+
StatusBar2,
|
|
4667
4439
|
{
|
|
4668
|
-
left: /* @__PURE__ */ jsxs7(
|
|
4440
|
+
left: /* @__PURE__ */ jsxs7(Text4, { role: "number", children: [
|
|
4669
4441
|
memory.usedMB.toFixed(1),
|
|
4670
4442
|
" MB",
|
|
4671
4443
|
memory.limitMB ? ` / ${memory.limitMB} MB` : ""
|
|
4672
4444
|
] }),
|
|
4673
|
-
right: memory.onDiskCount !== void 0 ? /* @__PURE__ */ jsxs7(
|
|
4445
|
+
right: memory.onDiskCount !== void 0 ? /* @__PURE__ */ jsxs7(Text4, { role: "meta", children: [
|
|
4674
4446
|
memory.onDiskCount,
|
|
4675
4447
|
" on disk"
|
|
4676
4448
|
] }) : null
|
|
@@ -4684,7 +4456,7 @@ function HistoryRowView({ row, controller, rowHeight, focused }) {
|
|
|
4684
4456
|
const failed = entry?.status === "failed";
|
|
4685
4457
|
const jumpable = controller.isJumpAllowed() && entry?.caps?.jumpable !== false;
|
|
4686
4458
|
return /* @__PURE__ */ jsx8(
|
|
4687
|
-
|
|
4459
|
+
Row2,
|
|
4688
4460
|
{
|
|
4689
4461
|
height: rowHeight,
|
|
4690
4462
|
selected: row.current,
|
|
@@ -4702,17 +4474,17 @@ function HistoryRowView({ row, controller, rowHeight, focused }) {
|
|
|
4702
4474
|
controller.requestContextMenu(row.entryId, e.clientX, e.clientY);
|
|
4703
4475
|
},
|
|
4704
4476
|
title: row.label,
|
|
4705
|
-
trailing: /* @__PURE__ */ jsxs7(
|
|
4477
|
+
trailing: /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
4706
4478
|
pending ? /* @__PURE__ */ jsx8(PendingGlyph, {}) : null,
|
|
4707
|
-
failed ? /* @__PURE__ */ jsx8(
|
|
4708
|
-
controller.isSourceShown() && entry?.source && entry.source !== "user" ? /* @__PURE__ */ jsx8(
|
|
4709
|
-
entry?.coalesced && entry.coalesced > 1 ? /* @__PURE__ */ jsxs7(
|
|
4479
|
+
failed ? /* @__PURE__ */ jsx8(Badge3, { size: "sm", tone: "error", children: "failed" }) : null,
|
|
4480
|
+
controller.isSourceShown() && entry?.source && entry.source !== "user" ? /* @__PURE__ */ jsx8(Badge3, { size: "sm", title: `Source: ${entry.source}`, children: entry.source === "agent" ? "AI" : "S" }) : null,
|
|
4481
|
+
entry?.coalesced && entry.coalesced > 1 ? /* @__PURE__ */ jsxs7(Badge3, { size: "sm", title: `${entry.coalesced} actions coalesced`, children: [
|
|
4710
4482
|
"\xD7",
|
|
4711
4483
|
entry.coalesced
|
|
4712
4484
|
] }) : null,
|
|
4713
|
-
controller.areTimestampsShown() && entry?.at !== void 0 ? /* @__PURE__ */ jsx8(
|
|
4485
|
+
controller.areTimestampsShown() && entry?.at !== void 0 ? /* @__PURE__ */ jsx8(Text4, { role: "meta", children: formatTime(entry.at) }) : null,
|
|
4714
4486
|
pending ? /* @__PURE__ */ jsx8(
|
|
4715
|
-
|
|
4487
|
+
IconButton4,
|
|
4716
4488
|
{
|
|
4717
4489
|
size: "sm",
|
|
4718
4490
|
icon: /* @__PURE__ */ jsx8(XIcon2, {}),
|
|
@@ -5814,7 +5586,29 @@ function drawAlphaStrip(ctx, w, h, hsv) {
|
|
|
5814
5586
|
}
|
|
5815
5587
|
|
|
5816
5588
|
// src/edit/color/react/ColorPanelView.tsx
|
|
5817
|
-
import {
|
|
5589
|
+
import { CanvasSurface, ColorChip, Column as Column4, Field as Field2, IconButton as IconButton5, Input as Input3, NumberInput, Section as Section2, Select as Select3, Stack as Stack3, SwatchGrid, TextButton as TextButton2 } from "@xenosystem/components/chrome";
|
|
5590
|
+
|
|
5591
|
+
// src/edit/color/react/icons.tsx
|
|
5592
|
+
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
5593
|
+
var svg = { width: 11, height: 11, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true };
|
|
5594
|
+
function EyedropperIcon() {
|
|
5595
|
+
return /* @__PURE__ */ jsxs8("svg", { ...svg, children: [
|
|
5596
|
+
/* @__PURE__ */ jsx9("path", { d: "m2 22 1-1h3l9-9" }),
|
|
5597
|
+
/* @__PURE__ */ jsx9("path", { d: "M3 21v-3l9-9" }),
|
|
5598
|
+
/* @__PURE__ */ jsx9("path", { d: "m15 6 3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z" })
|
|
5599
|
+
] });
|
|
5600
|
+
}
|
|
5601
|
+
function SwapIcon() {
|
|
5602
|
+
return /* @__PURE__ */ jsxs8("svg", { ...svg, children: [
|
|
5603
|
+
/* @__PURE__ */ jsx9("path", { d: "m16 3 4 4-4 4" }),
|
|
5604
|
+
/* @__PURE__ */ jsx9("path", { d: "M20 7H4" }),
|
|
5605
|
+
/* @__PURE__ */ jsx9("path", { d: "m8 21-4-4 4-4" }),
|
|
5606
|
+
/* @__PURE__ */ jsx9("path", { d: "M4 17h16" })
|
|
5607
|
+
] });
|
|
5608
|
+
}
|
|
5609
|
+
|
|
5610
|
+
// src/edit/color/react/ColorPanelView.tsx
|
|
5611
|
+
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
5818
5612
|
var SPACE_LABEL = {
|
|
5819
5613
|
hex: "HEX",
|
|
5820
5614
|
rgb: "RGB",
|
|
@@ -5904,193 +5698,96 @@ function ColorPanelView({ controller }) {
|
|
|
5904
5698
|
}
|
|
5905
5699
|
}, [controller]);
|
|
5906
5700
|
const onHexInput = useCallback5(
|
|
5907
|
-
(
|
|
5908
|
-
controller.setFromColor(
|
|
5701
|
+
(raw) => {
|
|
5702
|
+
controller.setFromColor(raw, void 0, { commit: true });
|
|
5909
5703
|
},
|
|
5910
5704
|
[controller]
|
|
5911
5705
|
);
|
|
5912
5706
|
const onComponentInput = useCallback5(
|
|
5913
|
-
(index,
|
|
5707
|
+
(index, n) => {
|
|
5914
5708
|
const comps2 = [...value.components ?? [0, 0, 0]];
|
|
5915
|
-
comps2[index] =
|
|
5709
|
+
comps2[index] = n;
|
|
5916
5710
|
controller.setFromComponents(space, comps2, { commit: true });
|
|
5917
5711
|
},
|
|
5918
5712
|
[controller, space, value.components]
|
|
5919
5713
|
);
|
|
5920
5714
|
const componentLabels = COMPONENT_LABELS[space];
|
|
5921
5715
|
const comps = value.components ?? [];
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
}
|
|
5933
|
-
),
|
|
5934
|
-
/* @__PURE__ */ jsx9(
|
|
5935
|
-
"button",
|
|
5936
|
-
{
|
|
5937
|
-
type: "button",
|
|
5938
|
-
style: S2.swap,
|
|
5939
|
-
onClick: () => controller.swapChannels(),
|
|
5940
|
-
title: "Swap FG/BG (X)",
|
|
5941
|
-
children: "\u21C4"
|
|
5942
|
-
}
|
|
5943
|
-
),
|
|
5944
|
-
/* @__PURE__ */ jsx9(
|
|
5945
|
-
"button",
|
|
5946
|
-
{
|
|
5947
|
-
type: "button",
|
|
5948
|
-
"aria-pressed": controller.getActiveChannel() === "bg",
|
|
5949
|
-
style: { ...S2.chip, ...controller.getActiveChannel() === "bg" ? S2.chipActive : null },
|
|
5950
|
-
onClick: () => controller.setChannel("bg"),
|
|
5951
|
-
title: "Background"
|
|
5952
|
-
}
|
|
5953
|
-
)
|
|
5954
|
-
] }),
|
|
5955
|
-
/* @__PURE__ */ jsxs8("div", { style: S2.pickerRow, children: [
|
|
5956
|
-
/* @__PURE__ */ jsx9(
|
|
5957
|
-
"canvas",
|
|
5716
|
+
const activeChannel = controller.getActiveChannel();
|
|
5717
|
+
return /* @__PURE__ */ jsx10(Column4, { className: "xeno-color-panel", children: /* @__PURE__ */ jsxs9(Stack3, { gap: 8, children: [
|
|
5718
|
+
controller.getChannelsMode() === "fg-bg" ? /* @__PURE__ */ jsxs9(Stack3, { direction: "row", pad: "none", children: [
|
|
5719
|
+
/* @__PURE__ */ jsx10(ColorChip, { color: value.hex, label: "Foreground", pressed: activeChannel === "fg", onClick: () => controller.setChannel("fg") }),
|
|
5720
|
+
/* @__PURE__ */ jsx10(IconButton5, { size: "sm", icon: /* @__PURE__ */ jsx10(SwapIcon, {}), label: "Swap FG/BG (X)", onClick: () => controller.swapChannels() }),
|
|
5721
|
+
/* @__PURE__ */ jsx10(ColorChip, { color: null, label: "Background", pressed: activeChannel === "bg", onClick: () => controller.setChannel("bg") })
|
|
5722
|
+
] }) : null,
|
|
5723
|
+
/* @__PURE__ */ jsxs9(Stack3, { direction: "row", pad: "none", children: [
|
|
5724
|
+
/* @__PURE__ */ jsx10(
|
|
5725
|
+
CanvasSurface,
|
|
5958
5726
|
{
|
|
5959
5727
|
ref: spectrumRef,
|
|
5960
5728
|
width: 200,
|
|
5961
5729
|
height: 140,
|
|
5962
|
-
|
|
5730
|
+
grow: true,
|
|
5731
|
+
cursor: "crosshair",
|
|
5732
|
+
disabled: bound,
|
|
5733
|
+
"aria-label": "Saturation and value",
|
|
5963
5734
|
onPointerDown: (e) => onSpectrumPointer(e, true),
|
|
5964
5735
|
onPointerMove: (e) => onSpectrumPointer(e, false),
|
|
5965
5736
|
onPointerUp: endDrag
|
|
5966
5737
|
}
|
|
5967
5738
|
),
|
|
5968
|
-
/* @__PURE__ */
|
|
5969
|
-
|
|
5739
|
+
/* @__PURE__ */ jsx10(
|
|
5740
|
+
CanvasSurface,
|
|
5970
5741
|
{
|
|
5971
5742
|
ref: hueRef,
|
|
5972
5743
|
width: 14,
|
|
5973
5744
|
height: 140,
|
|
5974
|
-
|
|
5745
|
+
cursor: "ns-resize",
|
|
5746
|
+
disabled: bound,
|
|
5747
|
+
"aria-label": "Hue",
|
|
5975
5748
|
onPointerDown: (e) => onHuePointer(e, true),
|
|
5976
5749
|
onPointerMove: (e) => onHuePointer(e, false),
|
|
5977
5750
|
onPointerUp: endDrag
|
|
5978
5751
|
}
|
|
5979
5752
|
),
|
|
5980
|
-
controller.isAlphaShown()
|
|
5981
|
-
|
|
5753
|
+
controller.isAlphaShown() ? /* @__PURE__ */ jsx10(
|
|
5754
|
+
CanvasSurface,
|
|
5982
5755
|
{
|
|
5983
5756
|
ref: alphaRef,
|
|
5984
5757
|
width: 14,
|
|
5985
5758
|
height: 140,
|
|
5986
|
-
|
|
5759
|
+
cursor: "ns-resize",
|
|
5760
|
+
disabled: bound,
|
|
5761
|
+
"aria-label": "Alpha",
|
|
5987
5762
|
onPointerDown: (e) => onAlphaPointer(e, true),
|
|
5988
5763
|
onPointerMove: (e) => onAlphaPointer(e, false),
|
|
5989
5764
|
onPointerUp: endDrag
|
|
5990
5765
|
}
|
|
5991
|
-
)
|
|
5766
|
+
) : null
|
|
5992
5767
|
] }),
|
|
5993
|
-
/* @__PURE__ */
|
|
5994
|
-
/* @__PURE__ */
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
onChange: (e) => controller.setSpace(e.target.value),
|
|
5999
|
-
style: S2.select,
|
|
6000
|
-
"aria-label": "Color model",
|
|
6001
|
-
children: EDIT_SPACES.map((s) => /* @__PURE__ */ jsx9("option", { value: s, children: SPACE_LABEL[s] }, s))
|
|
6002
|
-
}
|
|
6003
|
-
),
|
|
6004
|
-
space === "hex" ? /* @__PURE__ */ jsx9(
|
|
6005
|
-
"input",
|
|
6006
|
-
{
|
|
6007
|
-
type: "text",
|
|
6008
|
-
value: value.hex,
|
|
6009
|
-
onChange: onHexInput,
|
|
6010
|
-
disabled: bound,
|
|
6011
|
-
style: S2.hexInput,
|
|
6012
|
-
"aria-label": "Hex",
|
|
6013
|
-
spellCheck: false
|
|
6014
|
-
}
|
|
6015
|
-
) : /* @__PURE__ */ jsx9("div", { style: S2.componentRow, children: (componentLabels ?? []).map((label, i) => /* @__PURE__ */ jsxs8("label", { style: S2.componentField, children: [
|
|
6016
|
-
/* @__PURE__ */ jsx9("span", { style: S2.componentLabel, children: label }),
|
|
6017
|
-
/* @__PURE__ */ jsx9(
|
|
6018
|
-
"input",
|
|
6019
|
-
{
|
|
6020
|
-
type: "number",
|
|
6021
|
-
value: roundForSpace(space, i, comps[i] ?? 0),
|
|
6022
|
-
onChange: (e) => onComponentInput(i, e.target.value),
|
|
6023
|
-
disabled: bound,
|
|
6024
|
-
style: S2.numInput
|
|
6025
|
-
}
|
|
6026
|
-
)
|
|
6027
|
-
] }, label)) }),
|
|
6028
|
-
controller.isAlphaShown() && /* @__PURE__ */ jsxs8("label", { style: S2.alphaField, children: [
|
|
6029
|
-
/* @__PURE__ */ jsx9("span", { style: S2.componentLabel, children: "A" }),
|
|
6030
|
-
/* @__PURE__ */ jsx9(
|
|
6031
|
-
"input",
|
|
6032
|
-
{
|
|
6033
|
-
type: "number",
|
|
6034
|
-
min: 0,
|
|
6035
|
-
max: 100,
|
|
6036
|
-
value: Math.round(value.alpha * 100),
|
|
6037
|
-
onChange: (e) => controller.setAlpha(Number(e.target.value) / 100, { commit: true }),
|
|
6038
|
-
disabled: bound,
|
|
6039
|
-
style: S2.numInput
|
|
6040
|
-
}
|
|
6041
|
-
)
|
|
6042
|
-
] }),
|
|
6043
|
-
/* @__PURE__ */ jsx9("button", { type: "button", style: S2.iconBtn, title: "Pick from screen", onClick: () => controller.requestEyedropper(), children: "\u29BF" })
|
|
5768
|
+
/* @__PURE__ */ jsxs9(Stack3, { direction: "row", pad: "none", gap: 4, children: [
|
|
5769
|
+
/* @__PURE__ */ jsx10(Select3, { size: "sm", label: "Color model", value: space, options: EDIT_SPACES.map((sp) => ({ value: sp, label: SPACE_LABEL[sp] })), onChange: (v) => controller.setSpace(v) }),
|
|
5770
|
+
space === "hex" ? /* @__PURE__ */ jsx10(Input3, { variant: "mono", label: "Hex", value: value.hex, onChange: onHexInput, disabled: bound }) : (componentLabels ?? []).map((label, i) => /* @__PURE__ */ jsx10(NumberInput, { caption: label, value: roundForSpace(space, i, comps[i] ?? 0), onChange: (n) => onComponentInput(i, n), disabled: bound }, label)),
|
|
5771
|
+
controller.isAlphaShown() ? /* @__PURE__ */ jsx10(NumberInput, { caption: "A", label: "Alpha", min: 0, max: 100, value: Math.round(value.alpha * 100), onChange: (n) => controller.setAlpha(n / 100, { commit: true }), disabled: bound }) : null,
|
|
5772
|
+
/* @__PURE__ */ jsx10(IconButton5, { size: "sm", icon: /* @__PURE__ */ jsx10(EyedropperIcon, {}), label: "Pick from screen", onClick: () => controller.requestEyedropper() })
|
|
6044
5773
|
] }),
|
|
6045
|
-
controller.hasTokens()
|
|
6046
|
-
/* @__PURE__ */
|
|
6047
|
-
|
|
6048
|
-
"select",
|
|
5774
|
+
controller.hasTokens() ? /* @__PURE__ */ jsx10(Field2, { label: "Token", htmlFor: "xeno-color-token", children: /* @__PURE__ */ jsxs9(Stack3, { direction: "row", pad: "none", gap: 4, children: [
|
|
5775
|
+
/* @__PURE__ */ jsx10(
|
|
5776
|
+
Select3,
|
|
6049
5777
|
{
|
|
5778
|
+
size: "sm",
|
|
5779
|
+
label: "Bind token",
|
|
6050
5780
|
value: controller.getBoundTokenId() ?? "",
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
children: [
|
|
6055
|
-
/* @__PURE__ */ jsx9("option", { value: "", children: "\u2014 raw \u2014" }),
|
|
6056
|
-
controller.getTokens().map((t) => /* @__PURE__ */ jsx9("option", { value: t.id, children: t.name }, t.id))
|
|
6057
|
-
]
|
|
5781
|
+
placeholder: "\u2014 raw \u2014",
|
|
5782
|
+
options: controller.getTokens().map((t) => ({ value: t.id, label: t.name })),
|
|
5783
|
+
onChange: (id) => id ? controller.bindToken(id) : controller.unbindToken()
|
|
6058
5784
|
}
|
|
6059
5785
|
),
|
|
6060
|
-
bound
|
|
6061
|
-
] }),
|
|
6062
|
-
/* @__PURE__ */
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
] }),
|
|
6066
|
-
/* @__PURE__ */ jsx9("div", { style: S2.swatchGrid, children: controller.getSwatches().map((hex) => /* @__PURE__ */ jsx9(
|
|
6067
|
-
"button",
|
|
6068
|
-
{
|
|
6069
|
-
type: "button",
|
|
6070
|
-
style: { ...S2.swatch, background: hex },
|
|
6071
|
-
title: hex,
|
|
6072
|
-
onClick: () => controller.selectColor(hex),
|
|
6073
|
-
onContextMenu: (e) => {
|
|
6074
|
-
e.preventDefault();
|
|
6075
|
-
void controller.removeSwatch(hex);
|
|
6076
|
-
}
|
|
6077
|
-
},
|
|
6078
|
-
hex
|
|
6079
|
-
)) }),
|
|
6080
|
-
controller.getRecent().length > 0 && /* @__PURE__ */ jsxs8(Fragment4, { children: [
|
|
6081
|
-
/* @__PURE__ */ jsx9("div", { style: S2.sectionLabel, children: "Recent" }),
|
|
6082
|
-
/* @__PURE__ */ jsx9("div", { style: S2.swatchGrid, children: controller.getRecent().map((hex, i) => /* @__PURE__ */ jsx9(
|
|
6083
|
-
"button",
|
|
6084
|
-
{
|
|
6085
|
-
type: "button",
|
|
6086
|
-
style: { ...S2.swatch, background: hex },
|
|
6087
|
-
title: hex,
|
|
6088
|
-
onClick: () => controller.selectColor(hex)
|
|
6089
|
-
},
|
|
6090
|
-
`${hex}-${i}`
|
|
6091
|
-
)) })
|
|
6092
|
-
] })
|
|
6093
|
-
] });
|
|
5786
|
+
bound ? /* @__PURE__ */ jsx10(TextButton2, { onClick: () => controller.unbindToken(), children: "Unbind" }) : null
|
|
5787
|
+
] }) }) : null,
|
|
5788
|
+
/* @__PURE__ */ jsx10(Section2, { title: "Swatches", flush: true, actions: /* @__PURE__ */ jsx10(TextButton2, { onClick: () => void controller.addSwatch(), children: "+ Save" }), children: /* @__PURE__ */ jsx10(SwatchGrid, { label: "Swatches", children: controller.getSwatches().map((hex) => /* @__PURE__ */ jsx10(ColorChip, { size: "grid", color: hex, label: hex, onClick: () => controller.selectColor(hex), onContextMenu: () => void controller.removeSwatch(hex) }, hex)) }) }),
|
|
5789
|
+
controller.getRecent().length > 0 ? /* @__PURE__ */ jsx10(Section2, { title: "Recent", flush: true, children: /* @__PURE__ */ jsx10(SwatchGrid, { label: "Recent", children: controller.getRecent().map((hex, i) => /* @__PURE__ */ jsx10(ColorChip, { size: "grid", color: hex, label: hex, onClick: () => controller.selectColor(hex) }, `${hex}-${i}`)) }) }) : null
|
|
5790
|
+
] }) });
|
|
6094
5791
|
}
|
|
6095
5792
|
function clamp01(n) {
|
|
6096
5793
|
return Math.max(0, Math.min(1, Number.isFinite(n) ? n : 0));
|
|
@@ -6099,32 +5796,6 @@ function roundForSpace(space, index, v) {
|
|
|
6099
5796
|
if (space === "oklch") return Math.round(v * 10) / 10;
|
|
6100
5797
|
return Math.round(v);
|
|
6101
5798
|
}
|
|
6102
|
-
var S2 = {
|
|
6103
|
-
root: { display: "flex", flexDirection: "column", gap: 8, padding: 8, fontSize: 11, color: "var(--xeno-text)", background: "var(--xeno-canvas)", minWidth: 232, userSelect: "none" },
|
|
6104
|
-
channels: { display: "flex", alignItems: "center", gap: 6 },
|
|
6105
|
-
chip: { width: 28, height: 20, borderRadius: 2, border: "1px solid var(--xeno-control)", background: "var(--xeno-canvas)", cursor: "pointer", padding: 0 },
|
|
6106
|
-
chipActive: { outline: "1px solid var(--xeno-text)" },
|
|
6107
|
-
swap: { width: 18, height: 18, borderRadius: 2, border: "1px solid var(--xeno-control)", background: "transparent", color: "inherit", cursor: "pointer", fontSize: 11, lineHeight: "16px", padding: 0 },
|
|
6108
|
-
pickerRow: { display: "flex", gap: 6 },
|
|
6109
|
-
spectrum: { borderRadius: 2, cursor: "crosshair", flex: 1, touchAction: "none" },
|
|
6110
|
-
strip: { borderRadius: 2, cursor: "ns-resize", touchAction: "none" },
|
|
6111
|
-
disabled: { opacity: 0.4, cursor: "not-allowed" },
|
|
6112
|
-
controls: { display: "flex", alignItems: "center", gap: 4, flexWrap: "wrap" },
|
|
6113
|
-
select: { background: "var(--xeno-border-subtle)", color: "inherit", border: "1px solid var(--xeno-control)", borderRadius: 2, fontSize: 11, padding: "2px 4px" },
|
|
6114
|
-
hexInput: { flex: 1, minWidth: 72, background: "var(--xeno-border-subtle)", color: "inherit", border: "1px solid var(--xeno-control)", borderRadius: 2, fontSize: 11, padding: "2px 4px", fontVariantNumeric: "tabular-nums" },
|
|
6115
|
-
componentRow: { display: "flex", gap: 4, flex: 1 },
|
|
6116
|
-
componentField: { display: "flex", flexDirection: "column", alignItems: "center", gap: 1 },
|
|
6117
|
-
componentLabel: { fontSize: 9, opacity: 0.6 },
|
|
6118
|
-
sectionLabel: { fontSize: 9, opacity: 0.6, textTransform: "uppercase", letterSpacing: 0.4 },
|
|
6119
|
-
numInput: { width: 40, background: "var(--xeno-border-subtle)", color: "inherit", border: "1px solid var(--xeno-control)", borderRadius: 2, fontSize: 11, padding: "2px 3px", textAlign: "center", fontVariantNumeric: "tabular-nums" },
|
|
6120
|
-
alphaField: { display: "flex", flexDirection: "column", alignItems: "center", gap: 1 },
|
|
6121
|
-
iconBtn: { width: 22, height: 22, borderRadius: 2, border: "1px solid var(--xeno-control)", background: "var(--xeno-border-subtle)", color: "inherit", cursor: "pointer", fontSize: 12, padding: 0 },
|
|
6122
|
-
tokenRow: { display: "flex", alignItems: "center", gap: 6 },
|
|
6123
|
-
swatchHeader: { display: "flex", alignItems: "center", justifyContent: "space-between" },
|
|
6124
|
-
textBtn: { background: "transparent", border: "none", color: "inherit", opacity: 0.7, cursor: "pointer", fontSize: 10, padding: 0 },
|
|
6125
|
-
swatchGrid: { display: "grid", gridTemplateColumns: "repeat(8, 1fr)", gap: 3 },
|
|
6126
|
-
swatch: { width: "100%", aspectRatio: "1 / 1", borderRadius: 2, border: "1px solid var(--xeno-control)", cursor: "pointer", padding: 0 }
|
|
6127
|
-
};
|
|
6128
5799
|
|
|
6129
5800
|
// src/edit/color/panel.ts
|
|
6130
5801
|
function createColorPanel(options = {}) {
|
|
@@ -7396,9 +7067,9 @@ var curveManifest = {
|
|
|
7396
7067
|
|
|
7397
7068
|
// src/edit/curve/react/CurvePanelView.tsx
|
|
7398
7069
|
import { useCallback as useCallback6, useEffect as useEffect5, useRef as useRef6, useSyncExternalStore as useSyncExternalStore5 } from "react";
|
|
7399
|
-
import { EmptyState as
|
|
7070
|
+
import { EmptyState as EmptyState4, StatusBar as StatusBar3, Toolbar as Toolbar3, ToolbarGroup } from "@xenosystem/components/chrome";
|
|
7400
7071
|
import { formatTick } from "@xenosystem/time-core";
|
|
7401
|
-
import { Fragment as Fragment5, jsx as
|
|
7072
|
+
import { Fragment as Fragment5, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
7402
7073
|
var DASHES = ["none", "4 2", "1 2", "6 2 1 2"];
|
|
7403
7074
|
function CurvePanelView({ controller, showPresets = true }) {
|
|
7404
7075
|
const state = useSyncExternalStore5(controller.subscribe, controller.getState, controller.getState);
|
|
@@ -7477,21 +7148,21 @@ function CurvePanelView({ controller, showPresets = true }) {
|
|
|
7477
7148
|
const preview = state.preview;
|
|
7478
7149
|
const selected = new Set(state.selection.keys.map(keyRefId));
|
|
7479
7150
|
const channels = state.curves?.channels ?? [];
|
|
7480
|
-
return /* @__PURE__ */
|
|
7481
|
-
/* @__PURE__ */
|
|
7482
|
-
|
|
7151
|
+
return /* @__PURE__ */ jsxs10("div", { style: SHELL, children: [
|
|
7152
|
+
/* @__PURE__ */ jsx11(
|
|
7153
|
+
Toolbar3,
|
|
7483
7154
|
{
|
|
7484
|
-
left: /* @__PURE__ */
|
|
7485
|
-
right: /* @__PURE__ */
|
|
7486
|
-
["aligned", "broken", "flat"].map((mode) => /* @__PURE__ */
|
|
7487
|
-
/* @__PURE__ */
|
|
7155
|
+
left: /* @__PURE__ */ jsx11(ToolbarGroup, { children: ["linear", "bezier", "hold", "step"].map((mode) => /* @__PURE__ */ jsx11("button", { type: "button", style: button(), onClick: () => controller.setInterpolation(mode), children: mode }, mode)) }),
|
|
7156
|
+
right: /* @__PURE__ */ jsxs10(ToolbarGroup, { end: true, children: [
|
|
7157
|
+
["aligned", "broken", "flat"].map((mode) => /* @__PURE__ */ jsx11("button", { type: "button", style: button(), onClick: () => controller.setTangentMode(mode), children: mode }, mode)),
|
|
7158
|
+
/* @__PURE__ */ jsx11("button", { type: "button", style: button(), onClick: () => controller.fitAll(), children: "Fit" })
|
|
7488
7159
|
] })
|
|
7489
7160
|
}
|
|
7490
7161
|
),
|
|
7491
|
-
showPresets ? /* @__PURE__ */
|
|
7492
|
-
|
|
7162
|
+
showPresets ? /* @__PURE__ */ jsx11(
|
|
7163
|
+
Toolbar3,
|
|
7493
7164
|
{
|
|
7494
|
-
left: /* @__PURE__ */
|
|
7165
|
+
left: /* @__PURE__ */ jsx11(ToolbarGroup, { children: EASING_PRESETS.slice(0, 6).map((preset) => /* @__PURE__ */ jsx11(
|
|
7495
7166
|
"button",
|
|
7496
7167
|
{
|
|
7497
7168
|
type: "button",
|
|
@@ -7504,7 +7175,7 @@ function CurvePanelView({ controller, showPresets = true }) {
|
|
|
7504
7175
|
)) })
|
|
7505
7176
|
}
|
|
7506
7177
|
) : null,
|
|
7507
|
-
channels.length === 0 ? /* @__PURE__ */
|
|
7178
|
+
channels.length === 0 ? /* @__PURE__ */ jsx11(EmptyState4, { title: "No curves", hint: "Wire an animated property into this panel's input." }) : /* @__PURE__ */ jsx11(
|
|
7508
7179
|
"div",
|
|
7509
7180
|
{
|
|
7510
7181
|
ref: containerRef,
|
|
@@ -7518,7 +7189,7 @@ function CurvePanelView({ controller, showPresets = true }) {
|
|
|
7518
7189
|
onPointerUp,
|
|
7519
7190
|
onPointerCancel: onPointerUp,
|
|
7520
7191
|
onKeyDown,
|
|
7521
|
-
children: /* @__PURE__ */
|
|
7192
|
+
children: /* @__PURE__ */ jsxs10(
|
|
7522
7193
|
"svg",
|
|
7523
7194
|
{
|
|
7524
7195
|
"data-canvas": "curve-plot",
|
|
@@ -7526,7 +7197,7 @@ function CurvePanelView({ controller, showPresets = true }) {
|
|
|
7526
7197
|
height: "100%",
|
|
7527
7198
|
style: { position: "absolute", inset: 0, display: "block" },
|
|
7528
7199
|
children: [
|
|
7529
|
-
/* @__PURE__ */
|
|
7200
|
+
/* @__PURE__ */ jsx11(
|
|
7530
7201
|
"line",
|
|
7531
7202
|
{
|
|
7532
7203
|
x1: scale.gutterPx,
|
|
@@ -7536,7 +7207,7 @@ function CurvePanelView({ controller, showPresets = true }) {
|
|
|
7536
7207
|
stroke: "var(--xeno-control)"
|
|
7537
7208
|
}
|
|
7538
7209
|
),
|
|
7539
|
-
scale.minValue < 0 && scale.maxValue > 0 ? /* @__PURE__ */
|
|
7210
|
+
scale.minValue < 0 && scale.maxValue > 0 ? /* @__PURE__ */ jsx11(
|
|
7540
7211
|
"line",
|
|
7541
7212
|
{
|
|
7542
7213
|
x1: scale.gutterPx,
|
|
@@ -7551,7 +7222,7 @@ function CurvePanelView({ controller, showPresets = true }) {
|
|
|
7551
7222
|
const channel = channels.find((c) => c.id === series.channelId);
|
|
7552
7223
|
if (!channel || series.points.length === 0) return null;
|
|
7553
7224
|
const d = series.points.map((p, i) => `${i === 0 ? "M" : "L"}${scale.tickToX(p.tick).toFixed(2)},${scale.valueToY(p.value).toFixed(2)}`).join(" ");
|
|
7554
|
-
return /* @__PURE__ */
|
|
7225
|
+
return /* @__PURE__ */ jsx11(
|
|
7555
7226
|
"path",
|
|
7556
7227
|
{
|
|
7557
7228
|
d,
|
|
@@ -7571,9 +7242,9 @@ function CurvePanelView({ controller, showPresets = true }) {
|
|
|
7571
7242
|
const x = scale.tickToX(shown.tick);
|
|
7572
7243
|
const y = scale.valueToY(shown.value);
|
|
7573
7244
|
const isSelected = selected.has(id);
|
|
7574
|
-
return /* @__PURE__ */
|
|
7575
|
-
isSelected ? /* @__PURE__ */
|
|
7576
|
-
/* @__PURE__ */
|
|
7245
|
+
return /* @__PURE__ */ jsxs10("g", { children: [
|
|
7246
|
+
isSelected ? /* @__PURE__ */ jsx11(Handles, { keyframe: key, x, y, scale }) : null,
|
|
7247
|
+
/* @__PURE__ */ jsx11(
|
|
7577
7248
|
"rect",
|
|
7578
7249
|
{
|
|
7579
7250
|
x: x - 3,
|
|
@@ -7589,7 +7260,7 @@ function CurvePanelView({ controller, showPresets = true }) {
|
|
|
7589
7260
|
] }, id);
|
|
7590
7261
|
})
|
|
7591
7262
|
),
|
|
7592
|
-
preview?.marquee ? /* @__PURE__ */
|
|
7263
|
+
preview?.marquee ? /* @__PURE__ */ jsx11(
|
|
7593
7264
|
"rect",
|
|
7594
7265
|
{
|
|
7595
7266
|
x: Math.min(scale.tickToX(preview.marquee.fromTick), scale.tickToX(preview.marquee.toTick)),
|
|
@@ -7602,7 +7273,7 @@ function CurvePanelView({ controller, showPresets = true }) {
|
|
|
7602
7273
|
stroke: "var(--xeno-active)"
|
|
7603
7274
|
}
|
|
7604
7275
|
) : null,
|
|
7605
|
-
state.playheadTick !== null ? /* @__PURE__ */
|
|
7276
|
+
state.playheadTick !== null ? /* @__PURE__ */ jsx11(
|
|
7606
7277
|
"line",
|
|
7607
7278
|
{
|
|
7608
7279
|
x1: scale.tickToX(state.playheadTick),
|
|
@@ -7617,11 +7288,11 @@ function CurvePanelView({ controller, showPresets = true }) {
|
|
|
7617
7288
|
)
|
|
7618
7289
|
}
|
|
7619
7290
|
),
|
|
7620
|
-
/* @__PURE__ */
|
|
7621
|
-
|
|
7291
|
+
/* @__PURE__ */ jsx11(
|
|
7292
|
+
StatusBar3,
|
|
7622
7293
|
{
|
|
7623
7294
|
left: `${channels.length} channel${channels.length === 1 ? "" : "s"}`,
|
|
7624
|
-
right: /* @__PURE__ */
|
|
7295
|
+
right: /* @__PURE__ */ jsx11("span", { className: "tabular-nums", children: state.playheadTick !== null ? formatTick(state.playheadTick, state.timebase) : "" })
|
|
7625
7296
|
}
|
|
7626
7297
|
)
|
|
7627
7298
|
] });
|
|
@@ -7633,14 +7304,14 @@ function Handles({
|
|
|
7633
7304
|
scale
|
|
7634
7305
|
}) {
|
|
7635
7306
|
const sides = ["in", "out"];
|
|
7636
|
-
return /* @__PURE__ */
|
|
7307
|
+
return /* @__PURE__ */ jsx11(Fragment5, { children: sides.map((side) => {
|
|
7637
7308
|
const tangent = side === "in" ? keyframe.tangentIn : keyframe.tangentOut;
|
|
7638
7309
|
if (!tangent) return null;
|
|
7639
7310
|
const hx = scale.tickToX(keyframe.tick + tangent.x);
|
|
7640
7311
|
const hy = scale.valueToY(keyframe.value + tangent.y);
|
|
7641
|
-
return /* @__PURE__ */
|
|
7642
|
-
/* @__PURE__ */
|
|
7643
|
-
/* @__PURE__ */
|
|
7312
|
+
return /* @__PURE__ */ jsxs10("g", { children: [
|
|
7313
|
+
/* @__PURE__ */ jsx11("line", { x1: x, y1: y, x2: hx, y2: hy, stroke: "var(--xeno-active)", strokeWidth: 1 }),
|
|
7314
|
+
/* @__PURE__ */ jsx11("rect", { x: hx - 2, y: hy - 2, width: 4, height: 4, fill: "var(--xeno-text)" })
|
|
7644
7315
|
] }, side);
|
|
7645
7316
|
}) });
|
|
7646
7317
|
}
|
|
@@ -8273,8 +7944,8 @@ var viewportManifest = {
|
|
|
8273
7944
|
|
|
8274
7945
|
// src/edit/viewport/react/ViewportPanelView.tsx
|
|
8275
7946
|
import { useEffect as useEffect6, useRef as useRef7, useSyncExternalStore as useSyncExternalStore6 } from "react";
|
|
8276
|
-
import { Badge as
|
|
8277
|
-
import { jsx as
|
|
7947
|
+
import { Badge as Badge4, StatusBar as StatusBar4 } from "@xenosystem/components/chrome";
|
|
7948
|
+
import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
8278
7949
|
var SLOT_STYLE = {
|
|
8279
7950
|
"top-left": { top: 8, left: 8 },
|
|
8280
7951
|
"top-center": { top: 8, left: "50%", transform: "translateX(-50%)" },
|
|
@@ -8302,7 +7973,7 @@ function ViewportPanelView({
|
|
|
8302
7973
|
return controller.mount(canvas, container);
|
|
8303
7974
|
}, [controller]);
|
|
8304
7975
|
const hidden = new Set(state.hiddenSlots);
|
|
8305
|
-
return /* @__PURE__ */
|
|
7976
|
+
return /* @__PURE__ */ jsxs11(
|
|
8306
7977
|
"div",
|
|
8307
7978
|
{
|
|
8308
7979
|
ref: containerRef,
|
|
@@ -8341,7 +8012,7 @@ function ViewportPanelView({
|
|
|
8341
8012
|
touchAction: "none"
|
|
8342
8013
|
},
|
|
8343
8014
|
children: [
|
|
8344
|
-
/* @__PURE__ */
|
|
8015
|
+
/* @__PURE__ */ jsx12(
|
|
8345
8016
|
"canvas",
|
|
8346
8017
|
{
|
|
8347
8018
|
ref: canvasRef,
|
|
@@ -8352,7 +8023,7 @@ function ViewportPanelView({
|
|
|
8352
8023
|
VIEWPORT_SLOTS.map((slot) => {
|
|
8353
8024
|
const content = overlays?.[slot];
|
|
8354
8025
|
if (!content || hidden.has(slot)) return null;
|
|
8355
|
-
return /* @__PURE__ */
|
|
8026
|
+
return /* @__PURE__ */ jsx12(
|
|
8356
8027
|
"div",
|
|
8357
8028
|
{
|
|
8358
8029
|
"data-viewport-slot": slot,
|
|
@@ -8370,7 +8041,7 @@ function ViewportPanelView({
|
|
|
8370
8041
|
slot
|
|
8371
8042
|
);
|
|
8372
8043
|
}),
|
|
8373
|
-
state.contextLost ? /* @__PURE__ */
|
|
8044
|
+
state.contextLost ? /* @__PURE__ */ jsx12(
|
|
8374
8045
|
"div",
|
|
8375
8046
|
{
|
|
8376
8047
|
style: {
|
|
@@ -8383,11 +8054,11 @@ function ViewportPanelView({
|
|
|
8383
8054
|
fontSize: 11,
|
|
8384
8055
|
zIndex: 20
|
|
8385
8056
|
},
|
|
8386
|
-
children: /* @__PURE__ */
|
|
8057
|
+
children: /* @__PURE__ */ jsx12(Badge4, { tone: "error", children: "graphics context lost \u2014 restoring" })
|
|
8387
8058
|
}
|
|
8388
8059
|
) : null,
|
|
8389
|
-
showStats && state.stats ? /* @__PURE__ */
|
|
8390
|
-
|
|
8060
|
+
showStats && state.stats ? /* @__PURE__ */ jsx12("div", { style: { position: "absolute", left: 0, right: 0, bottom: 0, zIndex: 10 }, children: /* @__PURE__ */ jsx12(
|
|
8061
|
+
StatusBar4,
|
|
8391
8062
|
{
|
|
8392
8063
|
left: state.stats.fps !== void 0 ? `${Math.round(state.stats.fps)} fps` : void 0,
|
|
8393
8064
|
right: state.surface ? `${state.surface.cssWidth}\xD7${state.surface.cssHeight} @${state.surface.dpr}\xD7` : void 0
|
|
@@ -9040,48 +8711,48 @@ var findManifest = {
|
|
|
9040
8711
|
// src/edit/find/react/FindPanelView.tsx
|
|
9041
8712
|
import { useSyncExternalStore as useSyncExternalStore7 } from "react";
|
|
9042
8713
|
import {
|
|
9043
|
-
Badge as
|
|
9044
|
-
EmptyState as
|
|
9045
|
-
IconButton as
|
|
9046
|
-
Row as
|
|
9047
|
-
RowList as
|
|
9048
|
-
ScrollArea as
|
|
9049
|
-
SearchField as
|
|
9050
|
-
Section as
|
|
9051
|
-
StatusBar as
|
|
9052
|
-
TextButton as
|
|
9053
|
-
Toolbar as
|
|
8714
|
+
Badge as Badge5,
|
|
8715
|
+
EmptyState as EmptyState5,
|
|
8716
|
+
IconButton as IconButton6,
|
|
8717
|
+
Row as Row3,
|
|
8718
|
+
RowList as RowList3,
|
|
8719
|
+
ScrollArea as ScrollArea4,
|
|
8720
|
+
SearchField as SearchField4,
|
|
8721
|
+
Section as Section3,
|
|
8722
|
+
StatusBar as StatusBar5,
|
|
8723
|
+
TextButton as TextButton3,
|
|
8724
|
+
Toolbar as Toolbar4,
|
|
9054
8725
|
ToolbarGroup as ToolbarGroup2
|
|
9055
8726
|
} from "@xenosystem/components/chrome";
|
|
9056
|
-
import { jsx as
|
|
8727
|
+
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
9057
8728
|
function CaseIcon() {
|
|
9058
|
-
return /* @__PURE__ */
|
|
9059
|
-
/* @__PURE__ */
|
|
9060
|
-
/* @__PURE__ */
|
|
9061
|
-
/* @__PURE__ */
|
|
9062
|
-
/* @__PURE__ */
|
|
8729
|
+
return /* @__PURE__ */ jsxs12("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
|
|
8730
|
+
/* @__PURE__ */ jsx13("path", { d: "m3 15 4-8 4 8" }),
|
|
8731
|
+
/* @__PURE__ */ jsx13("path", { d: "M4 13h6" }),
|
|
8732
|
+
/* @__PURE__ */ jsx13("circle", { cx: "18", cy: "12", r: "3" }),
|
|
8733
|
+
/* @__PURE__ */ jsx13("path", { d: "M21 9v6" })
|
|
9063
8734
|
] });
|
|
9064
8735
|
}
|
|
9065
8736
|
function WordIcon() {
|
|
9066
|
-
return /* @__PURE__ */
|
|
9067
|
-
/* @__PURE__ */
|
|
9068
|
-
/* @__PURE__ */
|
|
9069
|
-
/* @__PURE__ */
|
|
8737
|
+
return /* @__PURE__ */ jsxs12("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
|
|
8738
|
+
/* @__PURE__ */ jsx13("path", { d: "M7 12h10" }),
|
|
8739
|
+
/* @__PURE__ */ jsx13("path", { d: "M3 7v10" }),
|
|
8740
|
+
/* @__PURE__ */ jsx13("path", { d: "M21 7v10" })
|
|
9070
8741
|
] });
|
|
9071
8742
|
}
|
|
9072
8743
|
function RegexIcon() {
|
|
9073
|
-
return /* @__PURE__ */
|
|
9074
|
-
/* @__PURE__ */
|
|
9075
|
-
/* @__PURE__ */
|
|
9076
|
-
/* @__PURE__ */
|
|
9077
|
-
/* @__PURE__ */
|
|
8744
|
+
return /* @__PURE__ */ jsxs12("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
|
|
8745
|
+
/* @__PURE__ */ jsx13("path", { d: "M12 4v8" }),
|
|
8746
|
+
/* @__PURE__ */ jsx13("path", { d: "m8.5 6 7 4" }),
|
|
8747
|
+
/* @__PURE__ */ jsx13("path", { d: "m8.5 10 7-4" }),
|
|
8748
|
+
/* @__PURE__ */ jsx13("path", { d: "M5 18h2" })
|
|
9078
8749
|
] });
|
|
9079
8750
|
}
|
|
9080
8751
|
function UpIcon() {
|
|
9081
|
-
return /* @__PURE__ */
|
|
8752
|
+
return /* @__PURE__ */ jsx13("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ jsx13("path", { d: "m18 15-6-6-6 6" }) });
|
|
9082
8753
|
}
|
|
9083
8754
|
function DownIcon() {
|
|
9084
|
-
return /* @__PURE__ */
|
|
8755
|
+
return /* @__PURE__ */ jsx13("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ jsx13("path", { d: "m6 9 6 6 6-6" }) });
|
|
9085
8756
|
}
|
|
9086
8757
|
function StatusLine({
|
|
9087
8758
|
status,
|
|
@@ -9092,14 +8763,14 @@ function StatusLine({
|
|
|
9092
8763
|
hasText
|
|
9093
8764
|
}) {
|
|
9094
8765
|
if (status === "invalidPattern") {
|
|
9095
|
-
return /* @__PURE__ */
|
|
8766
|
+
return /* @__PURE__ */ jsx13(Badge5, { tone: "error", title: message ?? void 0, children: "invalid pattern" });
|
|
9096
8767
|
}
|
|
9097
8768
|
if (status === "failed") {
|
|
9098
|
-
return /* @__PURE__ */
|
|
8769
|
+
return /* @__PURE__ */ jsx13(Badge5, { tone: "error", title: message ?? void 0, children: "search failed" });
|
|
9099
8770
|
}
|
|
9100
|
-
if (status === "searching") return /* @__PURE__ */
|
|
8771
|
+
if (status === "searching") return /* @__PURE__ */ jsx13(Badge5, { children: "searching\u2026" });
|
|
9101
8772
|
if (!hasText || status === "idle") return null;
|
|
9102
|
-
return /* @__PURE__ */
|
|
8773
|
+
return /* @__PURE__ */ jsxs12("span", { style: { fontVariantNumeric: "tabular-nums", fontSize: 10, opacity: 0.55 }, children: [
|
|
9103
8774
|
displayIndex,
|
|
9104
8775
|
"/",
|
|
9105
8776
|
count,
|
|
@@ -9122,8 +8793,8 @@ function FindPanelView({
|
|
|
9122
8793
|
controller.clear();
|
|
9123
8794
|
}
|
|
9124
8795
|
};
|
|
9125
|
-
const renderMatch = (match, index) => /* @__PURE__ */
|
|
9126
|
-
|
|
8796
|
+
const renderMatch = (match, index) => /* @__PURE__ */ jsx13(
|
|
8797
|
+
Row3,
|
|
9127
8798
|
{
|
|
9128
8799
|
noIcon: true,
|
|
9129
8800
|
selected: index === state.index,
|
|
@@ -9132,7 +8803,7 @@ function FindPanelView({
|
|
|
9132
8803
|
event.preventDefault();
|
|
9133
8804
|
controller.requestContextMenu?.(match.id, event.clientX, event.clientY);
|
|
9134
8805
|
},
|
|
9135
|
-
label: /* @__PURE__ */
|
|
8806
|
+
label: /* @__PURE__ */ jsx13("span", { children: highlightSegments(match.snippet ?? "", match.ranges).map((segment, i) => /* @__PURE__ */ jsx13(
|
|
9136
8807
|
"span",
|
|
9137
8808
|
{
|
|
9138
8809
|
style: segment.hit ? { background: "var(--xeno-control)", borderRadius: 2 } : void 0,
|
|
@@ -9145,54 +8816,54 @@ function FindPanelView({
|
|
|
9145
8816
|
match.id
|
|
9146
8817
|
);
|
|
9147
8818
|
let flatIndex = -1;
|
|
9148
|
-
return /* @__PURE__ */
|
|
9149
|
-
/* @__PURE__ */
|
|
9150
|
-
|
|
8819
|
+
return /* @__PURE__ */ jsxs12("div", { style: { display: "flex", flexDirection: "column", height: "100%", minHeight: 0 }, onKeyDown, children: [
|
|
8820
|
+
/* @__PURE__ */ jsx13(
|
|
8821
|
+
Toolbar4,
|
|
9151
8822
|
{
|
|
9152
|
-
left: /* @__PURE__ */
|
|
9153
|
-
|
|
8823
|
+
left: /* @__PURE__ */ jsx13(
|
|
8824
|
+
SearchField4,
|
|
9154
8825
|
{
|
|
9155
8826
|
value: state.text,
|
|
9156
8827
|
onChange: (value) => controller.setText(value),
|
|
9157
8828
|
placeholder
|
|
9158
8829
|
}
|
|
9159
8830
|
),
|
|
9160
|
-
right: /* @__PURE__ */
|
|
9161
|
-
/* @__PURE__ */
|
|
9162
|
-
|
|
8831
|
+
right: /* @__PURE__ */ jsxs12(ToolbarGroup2, { end: true, children: [
|
|
8832
|
+
/* @__PURE__ */ jsx13(
|
|
8833
|
+
IconButton6,
|
|
9163
8834
|
{
|
|
9164
8835
|
label: "Match case",
|
|
9165
8836
|
active: state.options.caseSensitive,
|
|
9166
8837
|
onClick: () => controller.setOptions({ caseSensitive: !state.options.caseSensitive }),
|
|
9167
|
-
icon: /* @__PURE__ */
|
|
8838
|
+
icon: /* @__PURE__ */ jsx13(CaseIcon, {})
|
|
9168
8839
|
}
|
|
9169
8840
|
),
|
|
9170
|
-
/* @__PURE__ */
|
|
9171
|
-
|
|
8841
|
+
/* @__PURE__ */ jsx13(
|
|
8842
|
+
IconButton6,
|
|
9172
8843
|
{
|
|
9173
8844
|
label: "Whole word",
|
|
9174
8845
|
active: state.options.wholeWord,
|
|
9175
8846
|
onClick: () => controller.setOptions({ wholeWord: !state.options.wholeWord }),
|
|
9176
|
-
icon: /* @__PURE__ */
|
|
8847
|
+
icon: /* @__PURE__ */ jsx13(WordIcon, {})
|
|
9177
8848
|
}
|
|
9178
8849
|
),
|
|
9179
|
-
/* @__PURE__ */
|
|
9180
|
-
|
|
8850
|
+
/* @__PURE__ */ jsx13(
|
|
8851
|
+
IconButton6,
|
|
9181
8852
|
{
|
|
9182
8853
|
label: "Regular expression",
|
|
9183
8854
|
active: state.options.regex,
|
|
9184
8855
|
onClick: () => controller.setOptions({ regex: !state.options.regex }),
|
|
9185
|
-
icon: /* @__PURE__ */
|
|
8856
|
+
icon: /* @__PURE__ */ jsx13(RegexIcon, {})
|
|
9186
8857
|
}
|
|
9187
8858
|
)
|
|
9188
8859
|
] })
|
|
9189
8860
|
}
|
|
9190
8861
|
),
|
|
9191
|
-
/* @__PURE__ */
|
|
9192
|
-
|
|
8862
|
+
/* @__PURE__ */ jsx13(
|
|
8863
|
+
Toolbar4,
|
|
9193
8864
|
{
|
|
9194
8865
|
divided: false,
|
|
9195
|
-
left: /* @__PURE__ */
|
|
8866
|
+
left: /* @__PURE__ */ jsx13(
|
|
9196
8867
|
StatusLine,
|
|
9197
8868
|
{
|
|
9198
8869
|
status: state.status,
|
|
@@ -9203,44 +8874,44 @@ function FindPanelView({
|
|
|
9203
8874
|
hasText: state.text !== ""
|
|
9204
8875
|
}
|
|
9205
8876
|
),
|
|
9206
|
-
right: /* @__PURE__ */
|
|
9207
|
-
/* @__PURE__ */
|
|
9208
|
-
|
|
8877
|
+
right: /* @__PURE__ */ jsxs12(ToolbarGroup2, { end: true, children: [
|
|
8878
|
+
/* @__PURE__ */ jsx13(
|
|
8879
|
+
IconButton6,
|
|
9209
8880
|
{
|
|
9210
8881
|
label: "Previous match",
|
|
9211
8882
|
disabled: state.matches.length === 0,
|
|
9212
8883
|
onClick: () => controller.previous(),
|
|
9213
|
-
icon: /* @__PURE__ */
|
|
8884
|
+
icon: /* @__PURE__ */ jsx13(UpIcon, {})
|
|
9214
8885
|
}
|
|
9215
8886
|
),
|
|
9216
|
-
/* @__PURE__ */
|
|
9217
|
-
|
|
8887
|
+
/* @__PURE__ */ jsx13(
|
|
8888
|
+
IconButton6,
|
|
9218
8889
|
{
|
|
9219
8890
|
label: "Next match",
|
|
9220
8891
|
disabled: state.matches.length === 0,
|
|
9221
8892
|
onClick: () => controller.next(),
|
|
9222
|
-
icon: /* @__PURE__ */
|
|
8893
|
+
icon: /* @__PURE__ */ jsx13(DownIcon, {})
|
|
9223
8894
|
}
|
|
9224
8895
|
),
|
|
9225
|
-
/* @__PURE__ */
|
|
8896
|
+
/* @__PURE__ */ jsx13(TextButton3, { onClick: () => controller.setReplaceVisible(!state.replaceVisible), children: state.replaceVisible ? "Hide replace" : "Replace" })
|
|
9226
8897
|
] })
|
|
9227
8898
|
}
|
|
9228
8899
|
),
|
|
9229
|
-
state.message && state.status === "invalidPattern" ? /* @__PURE__ */
|
|
9230
|
-
state.replaceVisible ? /* @__PURE__ */
|
|
9231
|
-
|
|
8900
|
+
state.message && state.status === "invalidPattern" ? /* @__PURE__ */ jsx13("div", { style: { padding: "2px 8px 4px", fontSize: 9, opacity: 0.6 }, children: state.message }) : null,
|
|
8901
|
+
state.replaceVisible ? /* @__PURE__ */ jsx13(
|
|
8902
|
+
Toolbar4,
|
|
9232
8903
|
{
|
|
9233
|
-
left: /* @__PURE__ */
|
|
9234
|
-
|
|
8904
|
+
left: /* @__PURE__ */ jsx13(
|
|
8905
|
+
SearchField4,
|
|
9235
8906
|
{
|
|
9236
8907
|
value: state.replaceText,
|
|
9237
8908
|
onChange: (value) => controller.setReplaceText(value),
|
|
9238
8909
|
placeholder: "Replace with"
|
|
9239
8910
|
}
|
|
9240
8911
|
),
|
|
9241
|
-
right: /* @__PURE__ */
|
|
9242
|
-
/* @__PURE__ */
|
|
9243
|
-
/* @__PURE__ */
|
|
8912
|
+
right: /* @__PURE__ */ jsxs12(ToolbarGroup2, { end: true, children: [
|
|
8913
|
+
/* @__PURE__ */ jsx13(TextButton3, { disabled: !state.canReplace, onClick: () => controller.replaceCurrent(), children: "Replace" }),
|
|
8914
|
+
/* @__PURE__ */ jsxs12(TextButton3, { disabled: !state.canReplace, onClick: () => controller.replaceAll(), children: [
|
|
9244
8915
|
"All (",
|
|
9245
8916
|
state.matches.length,
|
|
9246
8917
|
")"
|
|
@@ -9248,24 +8919,24 @@ function FindPanelView({
|
|
|
9248
8919
|
] })
|
|
9249
8920
|
}
|
|
9250
8921
|
) : null,
|
|
9251
|
-
showResults ? /* @__PURE__ */
|
|
9252
|
-
|
|
8922
|
+
showResults ? /* @__PURE__ */ jsx13(ScrollArea4, { children: state.status === "idle" ? /* @__PURE__ */ jsx13(EmptyState5, { title: "Find", hint: "Type to search. Enter goes to the next match." }) : state.status === "invalidPattern" ? /* @__PURE__ */ jsx13(
|
|
8923
|
+
EmptyState5,
|
|
9253
8924
|
{
|
|
9254
8925
|
title: "Invalid pattern",
|
|
9255
8926
|
hint: state.message ?? "The expression could not be read. Fix it to search."
|
|
9256
8927
|
}
|
|
9257
|
-
) : state.status === "failed" ? /* @__PURE__ */
|
|
9258
|
-
|
|
8928
|
+
) : state.status === "failed" ? /* @__PURE__ */ jsx13(EmptyState5, { title: "Search failed", hint: state.message ?? "The host could not complete the search." }) : state.noResults ? /* @__PURE__ */ jsx13(EmptyState5, { title: "No matches", hint: `Nothing in scope matches \u201C${state.text}\u201D.` }) : state.groups.length === 1 && state.groups[0].id === "" ? /* @__PURE__ */ jsx13(RowList3, { children: state.matches.map((m) => renderMatch(m, ++flatIndex)) }) : state.groups.map((group) => /* @__PURE__ */ jsx13(
|
|
8929
|
+
Section3,
|
|
9259
8930
|
{
|
|
9260
8931
|
title: group.label || "Results",
|
|
9261
8932
|
flush: true,
|
|
9262
|
-
badge: /* @__PURE__ */
|
|
9263
|
-
children: /* @__PURE__ */
|
|
8933
|
+
badge: /* @__PURE__ */ jsx13(Badge5, { children: group.matches.length }),
|
|
8934
|
+
children: /* @__PURE__ */ jsx13(RowList3, { children: group.matches.map((m) => renderMatch(m, ++flatIndex)) })
|
|
9264
8935
|
},
|
|
9265
8936
|
group.id
|
|
9266
8937
|
)) }) : null,
|
|
9267
|
-
/* @__PURE__ */
|
|
9268
|
-
|
|
8938
|
+
/* @__PURE__ */ jsx13(
|
|
8939
|
+
StatusBar5,
|
|
9269
8940
|
{
|
|
9270
8941
|
left: state.truncated ? `showing first ${state.matches.length}` : void 0,
|
|
9271
8942
|
right: state.options.scope
|
|
@@ -9915,17 +9586,17 @@ var commentsManifest = {
|
|
|
9915
9586
|
// src/edit/comments/react/CommentsPanelView.tsx
|
|
9916
9587
|
import { useSyncExternalStore as useSyncExternalStore8 } from "react";
|
|
9917
9588
|
import {
|
|
9918
|
-
Badge as
|
|
9919
|
-
EmptyState as
|
|
9920
|
-
ScrollArea as
|
|
9921
|
-
Section as
|
|
9589
|
+
Badge as Badge6,
|
|
9590
|
+
EmptyState as EmptyState6,
|
|
9591
|
+
ScrollArea as ScrollArea5,
|
|
9592
|
+
Section as Section4,
|
|
9922
9593
|
SegmentedControl as SegmentedControl2,
|
|
9923
|
-
StatusBar as
|
|
9924
|
-
TextButton as
|
|
9925
|
-
Toolbar as
|
|
9594
|
+
StatusBar as StatusBar6,
|
|
9595
|
+
TextButton as TextButton4,
|
|
9596
|
+
Toolbar as Toolbar5,
|
|
9926
9597
|
ToolbarGroup as ToolbarGroup3
|
|
9927
9598
|
} from "@xenosystem/components/chrome";
|
|
9928
|
-
import { Fragment as Fragment6, jsx as
|
|
9599
|
+
import { Fragment as Fragment6, jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
9929
9600
|
var ANCHOR_BADGE = {
|
|
9930
9601
|
live: null,
|
|
9931
9602
|
stale: {
|
|
@@ -9949,7 +9620,7 @@ function ThreadCard({
|
|
|
9949
9620
|
const badge = ANCHOR_BADGE[anchorState];
|
|
9950
9621
|
const replying = controller.getState().replyingTo === thread.id;
|
|
9951
9622
|
const orphaned = anchorState === "orphaned";
|
|
9952
|
-
return /* @__PURE__ */
|
|
9623
|
+
return /* @__PURE__ */ jsx14(
|
|
9953
9624
|
"div",
|
|
9954
9625
|
{
|
|
9955
9626
|
style: {
|
|
@@ -9963,13 +9634,13 @@ function ThreadCard({
|
|
|
9963
9634
|
event.preventDefault();
|
|
9964
9635
|
controller.requestContextMenu(thread.id, event.clientX, event.clientY);
|
|
9965
9636
|
},
|
|
9966
|
-
children: /* @__PURE__ */
|
|
9967
|
-
/* @__PURE__ */
|
|
9968
|
-
badge ? /* @__PURE__ */
|
|
9969
|
-
thread.resolved ? /* @__PURE__ */
|
|
9970
|
-
/* @__PURE__ */
|
|
9637
|
+
children: /* @__PURE__ */ jsxs13("div", { style: { padding: "6px 8px", display: "flex", flexDirection: "column", gap: 4 }, children: [
|
|
9638
|
+
/* @__PURE__ */ jsxs13("div", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
|
|
9639
|
+
badge ? /* @__PURE__ */ jsx14(Badge6, { tone: badge.tone, title: badge.title, children: badge.label }) : null,
|
|
9640
|
+
thread.resolved ? /* @__PURE__ */ jsx14(Badge6, { children: "resolved" }) : null,
|
|
9641
|
+
/* @__PURE__ */ jsx14("span", { style: { marginLeft: "auto", fontSize: 9, opacity: 0.4 }, children: formatAge(thread.createdAt, now) })
|
|
9971
9642
|
] }),
|
|
9972
|
-
thread.anchorLabel ? /* @__PURE__ */
|
|
9643
|
+
thread.anchorLabel ? /* @__PURE__ */ jsx14(
|
|
9973
9644
|
"button",
|
|
9974
9645
|
{
|
|
9975
9646
|
type: "button",
|
|
@@ -9992,16 +9663,16 @@ function ThreadCard({
|
|
|
9992
9663
|
children: thread.anchorLabel
|
|
9993
9664
|
}
|
|
9994
9665
|
) : null,
|
|
9995
|
-
view.messages.map((message) => /* @__PURE__ */
|
|
9996
|
-
/* @__PURE__ */
|
|
9997
|
-
/* @__PURE__ */
|
|
9998
|
-
/* @__PURE__ */
|
|
9999
|
-
message.editedAt ? /* @__PURE__ */
|
|
9666
|
+
view.messages.map((message) => /* @__PURE__ */ jsxs13("div", { style: { display: "flex", flexDirection: "column", gap: 1 }, children: [
|
|
9667
|
+
/* @__PURE__ */ jsxs13("div", { style: { display: "flex", alignItems: "baseline", gap: 4 }, children: [
|
|
9668
|
+
/* @__PURE__ */ jsx14("span", { style: { fontSize: 10, fontWeight: 600 }, children: message.authorName ?? message.authorId }),
|
|
9669
|
+
/* @__PURE__ */ jsx14("span", { style: { fontSize: 9, opacity: 0.35 }, children: formatAge(message.createdAt, now) }),
|
|
9670
|
+
message.editedAt ? /* @__PURE__ */ jsx14("span", { style: { fontSize: 9, opacity: 0.3 }, children: "edited" }) : null
|
|
10000
9671
|
] }),
|
|
10001
|
-
/* @__PURE__ */
|
|
9672
|
+
/* @__PURE__ */ jsx14("p", { style: { fontSize: 11, opacity: 0.75, margin: 0, whiteSpace: "pre-wrap" }, children: message.body })
|
|
10002
9673
|
] }, message.id)),
|
|
10003
|
-
allowReactions && thread.reactions?.length ? /* @__PURE__ */
|
|
10004
|
-
|
|
9674
|
+
allowReactions && thread.reactions?.length ? /* @__PURE__ */ jsx14("div", { style: { display: "flex", gap: 4 }, children: thread.reactions.map((reaction) => /* @__PURE__ */ jsxs13(
|
|
9675
|
+
TextButton4,
|
|
10005
9676
|
{
|
|
10006
9677
|
onClick: () => controller.react(
|
|
10007
9678
|
thread.id,
|
|
@@ -10016,8 +9687,8 @@ function ThreadCard({
|
|
|
10016
9687
|
},
|
|
10017
9688
|
reaction.emoji
|
|
10018
9689
|
)) }) : null,
|
|
10019
|
-
replying ? /* @__PURE__ */
|
|
10020
|
-
/* @__PURE__ */
|
|
9690
|
+
replying ? /* @__PURE__ */ jsxs13("div", { style: { display: "flex", gap: 4 }, children: [
|
|
9691
|
+
/* @__PURE__ */ jsx14(
|
|
10021
9692
|
"input",
|
|
10022
9693
|
{
|
|
10023
9694
|
value: controller.getState().replyDraft,
|
|
@@ -10044,11 +9715,11 @@ function ThreadCard({
|
|
|
10044
9715
|
}
|
|
10045
9716
|
}
|
|
10046
9717
|
),
|
|
10047
|
-
/* @__PURE__ */
|
|
10048
|
-
] }) : /* @__PURE__ */
|
|
10049
|
-
/* @__PURE__ */
|
|
10050
|
-
/* @__PURE__ */
|
|
10051
|
-
/* @__PURE__ */
|
|
9718
|
+
/* @__PURE__ */ jsx14(TextButton4, { onClick: () => controller.reply(thread.id), children: "Send" })
|
|
9719
|
+
] }) : /* @__PURE__ */ jsxs13("div", { style: { display: "flex", gap: 6 }, children: [
|
|
9720
|
+
/* @__PURE__ */ jsx14(TextButton4, { onClick: () => controller.setReplyingTo(thread.id), children: "Reply" }),
|
|
9721
|
+
/* @__PURE__ */ jsx14(TextButton4, { onClick: () => controller.resolve(thread.id, !thread.resolved), children: thread.resolved ? "Reopen" : "Resolve" }),
|
|
9722
|
+
/* @__PURE__ */ jsx14(TextButton4, { onClick: () => controller.remove(thread.id), children: "Delete" })
|
|
10052
9723
|
] })
|
|
10053
9724
|
] })
|
|
10054
9725
|
}
|
|
@@ -10064,11 +9735,11 @@ function CommentsPanelView({
|
|
|
10064
9735
|
const now = controller.clock();
|
|
10065
9736
|
const open = state.threads.filter((t) => !t.thread.resolved);
|
|
10066
9737
|
const resolved = state.threads.filter((t) => t.thread.resolved);
|
|
10067
|
-
return /* @__PURE__ */
|
|
10068
|
-
/* @__PURE__ */
|
|
10069
|
-
|
|
9738
|
+
return /* @__PURE__ */ jsxs13("div", { style: { display: "flex", flexDirection: "column", height: "100%", minHeight: 0 }, children: [
|
|
9739
|
+
/* @__PURE__ */ jsx14(
|
|
9740
|
+
Toolbar5,
|
|
10070
9741
|
{
|
|
10071
|
-
left: /* @__PURE__ */
|
|
9742
|
+
left: /* @__PURE__ */ jsx14(
|
|
10072
9743
|
SegmentedControl2,
|
|
10073
9744
|
{
|
|
10074
9745
|
label: "Show",
|
|
@@ -10081,7 +9752,7 @@ function CommentsPanelView({
|
|
|
10081
9752
|
]
|
|
10082
9753
|
}
|
|
10083
9754
|
),
|
|
10084
|
-
right: /* @__PURE__ */
|
|
9755
|
+
right: /* @__PURE__ */ jsx14(ToolbarGroup3, { end: true, children: /* @__PURE__ */ jsx14(
|
|
10085
9756
|
SegmentedControl2,
|
|
10086
9757
|
{
|
|
10087
9758
|
label: "Sort",
|
|
@@ -10096,33 +9767,33 @@ function CommentsPanelView({
|
|
|
10096
9767
|
) })
|
|
10097
9768
|
}
|
|
10098
9769
|
),
|
|
10099
|
-
state.totals.orphaned > 0 ? /* @__PURE__ */
|
|
9770
|
+
state.totals.orphaned > 0 ? /* @__PURE__ */ jsxs13("div", { style: { padding: "2px 8px", fontSize: 9, opacity: 0.6 }, children: [
|
|
10100
9771
|
state.totals.orphaned,
|
|
10101
9772
|
" comment",
|
|
10102
9773
|
state.totals.orphaned === 1 ? "" : "s",
|
|
10103
9774
|
" lost the content",
|
|
10104
9775
|
state.totals.orphaned === 1 ? " it was" : " they were",
|
|
10105
9776
|
" about.",
|
|
10106
|
-
state.filter.includeOrphaned === false ? /* @__PURE__ */
|
|
9777
|
+
state.filter.includeOrphaned === false ? /* @__PURE__ */ jsx14(TextButton4, { onClick: () => controller.setFilter({ includeOrphaned: true }), children: "Show" }) : null
|
|
10107
9778
|
] }) : null,
|
|
10108
|
-
/* @__PURE__ */
|
|
9779
|
+
/* @__PURE__ */ jsx14(ScrollArea5, { children: state.threads.length === 0 ? state.filteredEmpty ? (
|
|
10109
9780
|
// NOT "no comments". There are comments; this filter hides them, and telling a
|
|
10110
9781
|
// reviewer their feedback is gone is worse than telling them nothing.
|
|
10111
|
-
/* @__PURE__ */
|
|
10112
|
-
|
|
9782
|
+
/* @__PURE__ */ jsx14(
|
|
9783
|
+
EmptyState6,
|
|
10113
9784
|
{
|
|
10114
9785
|
title: "Nothing matches this filter",
|
|
10115
9786
|
hint: `${state.totals.all} comment${state.totals.all === 1 ? "" : "s"} on this document.`
|
|
10116
9787
|
}
|
|
10117
9788
|
)
|
|
10118
|
-
) : /* @__PURE__ */
|
|
10119
|
-
|
|
9789
|
+
) : /* @__PURE__ */ jsx14(
|
|
9790
|
+
EmptyState6,
|
|
10120
9791
|
{
|
|
10121
9792
|
title: "No comments",
|
|
10122
9793
|
hint: emptyHint ?? "Select something and add a comment."
|
|
10123
9794
|
}
|
|
10124
|
-
) : /* @__PURE__ */
|
|
10125
|
-
open.map((view) => /* @__PURE__ */
|
|
9795
|
+
) : /* @__PURE__ */ jsxs13(Fragment6, { children: [
|
|
9796
|
+
open.map((view) => /* @__PURE__ */ jsx14(
|
|
10126
9797
|
ThreadCard,
|
|
10127
9798
|
{
|
|
10128
9799
|
view,
|
|
@@ -10132,7 +9803,7 @@ function CommentsPanelView({
|
|
|
10132
9803
|
},
|
|
10133
9804
|
view.thread.id
|
|
10134
9805
|
)),
|
|
10135
|
-
showResolved && resolved.length > 0 ? /* @__PURE__ */
|
|
9806
|
+
showResolved && resolved.length > 0 ? /* @__PURE__ */ jsx14(Section4, { title: `Resolved (${resolved.length})`, flush: true, children: resolved.map((view) => /* @__PURE__ */ jsx14(
|
|
10136
9807
|
ThreadCard,
|
|
10137
9808
|
{
|
|
10138
9809
|
view,
|
|
@@ -10143,8 +9814,8 @@ function CommentsPanelView({
|
|
|
10143
9814
|
view.thread.id
|
|
10144
9815
|
)) }) : null
|
|
10145
9816
|
] }) }),
|
|
10146
|
-
/* @__PURE__ */
|
|
10147
|
-
/* @__PURE__ */
|
|
9817
|
+
/* @__PURE__ */ jsxs13("div", { style: { borderTop: "1px solid var(--xeno-border-subtle)", padding: 6 }, children: [
|
|
9818
|
+
/* @__PURE__ */ jsx14(
|
|
10148
9819
|
"textarea",
|
|
10149
9820
|
{
|
|
10150
9821
|
value: state.draft,
|
|
@@ -10172,8 +9843,8 @@ function CommentsPanelView({
|
|
|
10172
9843
|
}
|
|
10173
9844
|
}
|
|
10174
9845
|
),
|
|
10175
|
-
/* @__PURE__ */
|
|
10176
|
-
|
|
9846
|
+
/* @__PURE__ */ jsx14("div", { style: { display: "flex", justifyContent: "flex-end", marginTop: 2 }, children: /* @__PURE__ */ jsx14(
|
|
9847
|
+
TextButton4,
|
|
10177
9848
|
{
|
|
10178
9849
|
strong: true,
|
|
10179
9850
|
disabled: state.activeAnchor === null || state.draft.trim() === "",
|
|
@@ -10182,8 +9853,8 @@ function CommentsPanelView({
|
|
|
10182
9853
|
}
|
|
10183
9854
|
) })
|
|
10184
9855
|
] }),
|
|
10185
|
-
/* @__PURE__ */
|
|
10186
|
-
|
|
9856
|
+
/* @__PURE__ */ jsx14(
|
|
9857
|
+
StatusBar6,
|
|
10187
9858
|
{
|
|
10188
9859
|
left: `${state.totals.open} open`,
|
|
10189
9860
|
right: state.totals.stale > 0 ? `${state.totals.stale} edited` : void 0
|
|
@@ -11355,8 +11026,8 @@ var nodegraphManifest = {
|
|
|
11355
11026
|
|
|
11356
11027
|
// src/edit/nodegraph/react/NodeGraphPanelView.tsx
|
|
11357
11028
|
import { useCallback as useCallback7, useEffect as useEffect7, useRef as useRef8, useSyncExternalStore as useSyncExternalStore9 } from "react";
|
|
11358
|
-
import { EmptyState as
|
|
11359
|
-
import { Fragment as Fragment7, jsx as
|
|
11029
|
+
import { EmptyState as EmptyState7, StatusBar as StatusBar7, Toolbar as Toolbar6, ToolbarGroup as ToolbarGroup4 } from "@xenosystem/components/chrome";
|
|
11030
|
+
import { Fragment as Fragment7, jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
11360
11031
|
var HEADER_H2 = 24;
|
|
11361
11032
|
var PORT_ROW_H2 = 18;
|
|
11362
11033
|
function NodeGraphPanelView({ controller }) {
|
|
@@ -11435,17 +11106,17 @@ function NodeGraphPanelView({ controller }) {
|
|
|
11435
11106
|
const selectedNodes = new Set(state.selection.nodeIds);
|
|
11436
11107
|
const selectedEdges = new Set(state.selection.edgeIds);
|
|
11437
11108
|
const total = state.graph?.nodes.length ?? 0;
|
|
11438
|
-
return /* @__PURE__ */
|
|
11439
|
-
/* @__PURE__ */
|
|
11440
|
-
|
|
11109
|
+
return /* @__PURE__ */ jsxs14("div", { style: SHELL2, children: [
|
|
11110
|
+
/* @__PURE__ */ jsx15(
|
|
11111
|
+
Toolbar6,
|
|
11441
11112
|
{
|
|
11442
|
-
right: /* @__PURE__ */
|
|
11443
|
-
/* @__PURE__ */
|
|
11444
|
-
/* @__PURE__ */
|
|
11113
|
+
right: /* @__PURE__ */ jsxs14(ToolbarGroup4, { end: true, children: [
|
|
11114
|
+
/* @__PURE__ */ jsx15("button", { type: "button", style: button2(), onClick: () => controller.fit(false), children: "Fit" }),
|
|
11115
|
+
/* @__PURE__ */ jsx15("button", { type: "button", style: button2(), onClick: () => controller.fit(true), children: "Fit selection" })
|
|
11445
11116
|
] })
|
|
11446
11117
|
}
|
|
11447
11118
|
),
|
|
11448
|
-
total === 0 ? /* @__PURE__ */
|
|
11119
|
+
total === 0 ? /* @__PURE__ */ jsx15(EmptyState7, { title: "Empty graph", hint: "Wire a host graph into this panel's input." }) : /* @__PURE__ */ jsxs14(
|
|
11449
11120
|
"div",
|
|
11450
11121
|
{
|
|
11451
11122
|
ref: containerRef,
|
|
@@ -11460,15 +11131,15 @@ function NodeGraphPanelView({ controller }) {
|
|
|
11460
11131
|
onPointerCancel: onPointerUp,
|
|
11461
11132
|
onKeyDown,
|
|
11462
11133
|
children: [
|
|
11463
|
-
/* @__PURE__ */
|
|
11134
|
+
/* @__PURE__ */ jsx15(
|
|
11464
11135
|
"svg",
|
|
11465
11136
|
{
|
|
11466
11137
|
"data-canvas": "nodegraph-surface",
|
|
11467
11138
|
width: "100%",
|
|
11468
11139
|
height: "100%",
|
|
11469
11140
|
style: { position: "absolute", inset: 0, display: "block" },
|
|
11470
|
-
children: /* @__PURE__ */
|
|
11471
|
-
state.edges.map(({ edge, from, to }) => /* @__PURE__ */
|
|
11141
|
+
children: /* @__PURE__ */ jsxs14("g", { transform: `translate(${-scale.x * scale.zoom} ${-scale.y * scale.zoom}) scale(${scale.zoom})`, children: [
|
|
11142
|
+
state.edges.map(({ edge, from, to }) => /* @__PURE__ */ jsx15(
|
|
11472
11143
|
"path",
|
|
11473
11144
|
{
|
|
11474
11145
|
d: edgePath(from, to),
|
|
@@ -11479,8 +11150,8 @@ function NodeGraphPanelView({ controller }) {
|
|
|
11479
11150
|
},
|
|
11480
11151
|
edge.id
|
|
11481
11152
|
)),
|
|
11482
|
-
preview?.connection ? /* @__PURE__ */
|
|
11483
|
-
state.nodes.map((node) => /* @__PURE__ */
|
|
11153
|
+
preview?.connection ? /* @__PURE__ */ jsx15(PendingWire, { controller, preview, zoom: scale.zoom }) : null,
|
|
11154
|
+
state.nodes.map((node) => /* @__PURE__ */ jsx15(
|
|
11484
11155
|
NodeRect,
|
|
11485
11156
|
{
|
|
11486
11157
|
node,
|
|
@@ -11489,7 +11160,7 @@ function NodeGraphPanelView({ controller }) {
|
|
|
11489
11160
|
},
|
|
11490
11161
|
node.id
|
|
11491
11162
|
)),
|
|
11492
|
-
preview?.marquee ? /* @__PURE__ */
|
|
11163
|
+
preview?.marquee ? /* @__PURE__ */ jsx15(
|
|
11493
11164
|
"rect",
|
|
11494
11165
|
{
|
|
11495
11166
|
x: preview.marquee.x,
|
|
@@ -11504,15 +11175,15 @@ function NodeGraphPanelView({ controller }) {
|
|
|
11504
11175
|
] })
|
|
11505
11176
|
}
|
|
11506
11177
|
),
|
|
11507
|
-
preview?.connection && !preview.connection.verdict.ok && preview.connection.target ? /* @__PURE__ */
|
|
11178
|
+
preview?.connection && !preview.connection.verdict.ok && preview.connection.target ? /* @__PURE__ */ jsx15("div", { style: REASON, children: preview.connection.verdict.reason }) : null
|
|
11508
11179
|
]
|
|
11509
11180
|
}
|
|
11510
11181
|
),
|
|
11511
|
-
/* @__PURE__ */
|
|
11512
|
-
|
|
11182
|
+
/* @__PURE__ */ jsx15(
|
|
11183
|
+
StatusBar7,
|
|
11513
11184
|
{
|
|
11514
11185
|
left: `${total} node${total === 1 ? "" : "s"}`,
|
|
11515
|
-
right: /* @__PURE__ */
|
|
11186
|
+
right: /* @__PURE__ */ jsxs14("span", { className: "tabular-nums", children: [
|
|
11516
11187
|
Math.round(scale.zoom * 100),
|
|
11517
11188
|
"%"
|
|
11518
11189
|
] })
|
|
@@ -11530,7 +11201,7 @@ function PendingWire({
|
|
|
11530
11201
|
const from = controller.portPosition(connection.source.nodeId, connection.source.portId);
|
|
11531
11202
|
if (!from) return null;
|
|
11532
11203
|
const ok = connection.verdict.ok;
|
|
11533
|
-
return /* @__PURE__ */
|
|
11204
|
+
return /* @__PURE__ */ jsx15(
|
|
11534
11205
|
"path",
|
|
11535
11206
|
{
|
|
11536
11207
|
d: edgePath(from, connection.to),
|
|
@@ -11543,8 +11214,8 @@ function PendingWire({
|
|
|
11543
11214
|
}
|
|
11544
11215
|
function NodeRect({ node, selected, zoom }) {
|
|
11545
11216
|
const height = node.collapsed ? HEADER_H2 : node.height;
|
|
11546
|
-
return /* @__PURE__ */
|
|
11547
|
-
/* @__PURE__ */
|
|
11217
|
+
return /* @__PURE__ */ jsxs14("g", { opacity: node.disabled ? 0.45 : 1, children: [
|
|
11218
|
+
/* @__PURE__ */ jsx15(
|
|
11548
11219
|
"rect",
|
|
11549
11220
|
{
|
|
11550
11221
|
x: node.x,
|
|
@@ -11557,7 +11228,7 @@ function NodeRect({ node, selected, zoom }) {
|
|
|
11557
11228
|
strokeWidth: (selected ? 1.5 : 1) / zoom
|
|
11558
11229
|
}
|
|
11559
11230
|
),
|
|
11560
|
-
/* @__PURE__ */
|
|
11231
|
+
/* @__PURE__ */ jsx15(
|
|
11561
11232
|
"rect",
|
|
11562
11233
|
{
|
|
11563
11234
|
x: node.x,
|
|
@@ -11568,7 +11239,7 @@ function NodeRect({ node, selected, zoom }) {
|
|
|
11568
11239
|
fill: node.color ?? "var(--xeno-border)"
|
|
11569
11240
|
}
|
|
11570
11241
|
),
|
|
11571
|
-
/* @__PURE__ */
|
|
11242
|
+
/* @__PURE__ */ jsx15(
|
|
11572
11243
|
"text",
|
|
11573
11244
|
{
|
|
11574
11245
|
x: node.x + 8,
|
|
@@ -11579,8 +11250,8 @@ function NodeRect({ node, selected, zoom }) {
|
|
|
11579
11250
|
children: node.title
|
|
11580
11251
|
}
|
|
11581
11252
|
),
|
|
11582
|
-
node.collapsed ? null : /* @__PURE__ */
|
|
11583
|
-
node.inputs.map((port, i) => /* @__PURE__ */
|
|
11253
|
+
node.collapsed ? null : /* @__PURE__ */ jsxs14(Fragment7, { children: [
|
|
11254
|
+
node.inputs.map((port, i) => /* @__PURE__ */ jsx15(
|
|
11584
11255
|
Port,
|
|
11585
11256
|
{
|
|
11586
11257
|
x: node.x,
|
|
@@ -11591,7 +11262,7 @@ function NodeRect({ node, selected, zoom }) {
|
|
|
11591
11262
|
},
|
|
11592
11263
|
port.id
|
|
11593
11264
|
)),
|
|
11594
|
-
node.outputs.map((port, i) => /* @__PURE__ */
|
|
11265
|
+
node.outputs.map((port, i) => /* @__PURE__ */ jsx15(
|
|
11595
11266
|
Port,
|
|
11596
11267
|
{
|
|
11597
11268
|
x: node.x + node.width,
|
|
@@ -11612,8 +11283,8 @@ function Port({
|
|
|
11612
11283
|
align,
|
|
11613
11284
|
disabled
|
|
11614
11285
|
}) {
|
|
11615
|
-
return /* @__PURE__ */
|
|
11616
|
-
/* @__PURE__ */
|
|
11286
|
+
return /* @__PURE__ */ jsxs14("g", { opacity: disabled ? 0.4 : 1, children: [
|
|
11287
|
+
/* @__PURE__ */ jsx15(
|
|
11617
11288
|
"rect",
|
|
11618
11289
|
{
|
|
11619
11290
|
x: x - 3,
|
|
@@ -11625,7 +11296,7 @@ function Port({
|
|
|
11625
11296
|
strokeWidth: 0.5
|
|
11626
11297
|
}
|
|
11627
11298
|
),
|
|
11628
|
-
/* @__PURE__ */
|
|
11299
|
+
/* @__PURE__ */ jsx15(
|
|
11629
11300
|
"text",
|
|
11630
11301
|
{
|
|
11631
11302
|
x: align === "left" ? x + 8 : x - 8,
|
|
@@ -12884,24 +12555,24 @@ var treeManifest = {
|
|
|
12884
12555
|
// src/edit/tree/react/TreePanelView.tsx
|
|
12885
12556
|
import { useCallback as useCallback8, useEffect as useEffect8, useRef as useRef9, useState as useState2, useSyncExternalStore as useSyncExternalStore10 } from "react";
|
|
12886
12557
|
import {
|
|
12887
|
-
Badge as
|
|
12888
|
-
EmptyState as
|
|
12558
|
+
Badge as Badge7,
|
|
12559
|
+
EmptyState as EmptyState8,
|
|
12889
12560
|
ErrorState,
|
|
12890
|
-
IconButton as
|
|
12561
|
+
IconButton as IconButton7,
|
|
12891
12562
|
LoadingState,
|
|
12892
|
-
Row as
|
|
12893
|
-
ScrollArea as
|
|
12894
|
-
SearchField as
|
|
12895
|
-
StatusBar as
|
|
12896
|
-
Toolbar as
|
|
12563
|
+
Row as Row4,
|
|
12564
|
+
ScrollArea as ScrollArea6,
|
|
12565
|
+
SearchField as SearchField5,
|
|
12566
|
+
StatusBar as StatusBar8,
|
|
12567
|
+
Toolbar as Toolbar7,
|
|
12897
12568
|
ToolbarGroup as ToolbarGroup5
|
|
12898
12569
|
} from "@xenosystem/components/chrome";
|
|
12899
12570
|
import { computeWindow as computeWindow3 } from "@xenosystem/tree-core";
|
|
12900
12571
|
|
|
12901
12572
|
// src/edit/tree/react/icons.tsx
|
|
12902
|
-
import { Fragment as Fragment8, jsx as
|
|
12573
|
+
import { Fragment as Fragment8, jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
12903
12574
|
function Svg({ children, size = 11 }) {
|
|
12904
|
-
return /* @__PURE__ */
|
|
12575
|
+
return /* @__PURE__ */ jsx16(
|
|
12905
12576
|
"svg",
|
|
12906
12577
|
{
|
|
12907
12578
|
width: size,
|
|
@@ -12918,84 +12589,84 @@ function Svg({ children, size = 11 }) {
|
|
|
12918
12589
|
);
|
|
12919
12590
|
}
|
|
12920
12591
|
function ChevronGlyph() {
|
|
12921
|
-
return /* @__PURE__ */
|
|
12592
|
+
return /* @__PURE__ */ jsx16(Svg, { size: 9, children: /* @__PURE__ */ jsx16("path", { d: "m9 18 6-6-6-6" }) });
|
|
12922
12593
|
}
|
|
12923
12594
|
function ExpandGlyph() {
|
|
12924
|
-
return /* @__PURE__ */
|
|
12925
|
-
/* @__PURE__ */
|
|
12926
|
-
/* @__PURE__ */
|
|
12927
|
-
/* @__PURE__ */
|
|
12928
|
-
/* @__PURE__ */
|
|
12929
|
-
/* @__PURE__ */
|
|
12930
|
-
/* @__PURE__ */
|
|
12931
|
-
/* @__PURE__ */
|
|
12932
|
-
/* @__PURE__ */
|
|
12595
|
+
return /* @__PURE__ */ jsxs15(Svg, { children: [
|
|
12596
|
+
/* @__PURE__ */ jsx16("path", { d: "M12 22v-6" }),
|
|
12597
|
+
/* @__PURE__ */ jsx16("path", { d: "M12 8V2" }),
|
|
12598
|
+
/* @__PURE__ */ jsx16("path", { d: "m9 5 3-3 3 3" }),
|
|
12599
|
+
/* @__PURE__ */ jsx16("path", { d: "m9 19 3 3 3-3" }),
|
|
12600
|
+
/* @__PURE__ */ jsx16("path", { d: "M4 12H2" }),
|
|
12601
|
+
/* @__PURE__ */ jsx16("path", { d: "M10 12H8" }),
|
|
12602
|
+
/* @__PURE__ */ jsx16("path", { d: "M16 12h-2" }),
|
|
12603
|
+
/* @__PURE__ */ jsx16("path", { d: "M22 12h-2" })
|
|
12933
12604
|
] });
|
|
12934
12605
|
}
|
|
12935
12606
|
function CollapseGlyph() {
|
|
12936
|
-
return /* @__PURE__ */
|
|
12937
|
-
/* @__PURE__ */
|
|
12938
|
-
/* @__PURE__ */
|
|
12939
|
-
/* @__PURE__ */
|
|
12940
|
-
/* @__PURE__ */
|
|
12941
|
-
/* @__PURE__ */
|
|
12942
|
-
/* @__PURE__ */
|
|
12607
|
+
return /* @__PURE__ */ jsxs15(Svg, { children: [
|
|
12608
|
+
/* @__PURE__ */ jsx16("path", { d: "M12 22v-6" }),
|
|
12609
|
+
/* @__PURE__ */ jsx16("path", { d: "M12 8V2" }),
|
|
12610
|
+
/* @__PURE__ */ jsx16("path", { d: "m9 13 3 3 3-3" }),
|
|
12611
|
+
/* @__PURE__ */ jsx16("path", { d: "m9 11 3-3 3 3" }),
|
|
12612
|
+
/* @__PURE__ */ jsx16("path", { d: "M4 12H2" }),
|
|
12613
|
+
/* @__PURE__ */ jsx16("path", { d: "M22 12h-2" })
|
|
12943
12614
|
] });
|
|
12944
12615
|
}
|
|
12945
12616
|
function RefreshGlyph() {
|
|
12946
|
-
return /* @__PURE__ */
|
|
12947
|
-
/* @__PURE__ */
|
|
12948
|
-
/* @__PURE__ */
|
|
12949
|
-
/* @__PURE__ */
|
|
12950
|
-
/* @__PURE__ */
|
|
12617
|
+
return /* @__PURE__ */ jsxs15(Svg, { children: [
|
|
12618
|
+
/* @__PURE__ */ jsx16("path", { d: "M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
|
|
12619
|
+
/* @__PURE__ */ jsx16("path", { d: "M3 3v5h5" }),
|
|
12620
|
+
/* @__PURE__ */ jsx16("path", { d: "M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16" }),
|
|
12621
|
+
/* @__PURE__ */ jsx16("path", { d: "M16 16h5v5" })
|
|
12951
12622
|
] });
|
|
12952
12623
|
}
|
|
12953
12624
|
var PATHS = {
|
|
12954
|
-
folder: /* @__PURE__ */
|
|
12955
|
-
file: /* @__PURE__ */
|
|
12956
|
-
/* @__PURE__ */
|
|
12957
|
-
/* @__PURE__ */
|
|
12625
|
+
folder: /* @__PURE__ */ jsx16("path", { d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }),
|
|
12626
|
+
file: /* @__PURE__ */ jsxs15(Fragment8, { children: [
|
|
12627
|
+
/* @__PURE__ */ jsx16("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
|
|
12628
|
+
/* @__PURE__ */ jsx16("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" })
|
|
12958
12629
|
] }),
|
|
12959
|
-
"folder-tree": /* @__PURE__ */
|
|
12960
|
-
/* @__PURE__ */
|
|
12961
|
-
/* @__PURE__ */
|
|
12962
|
-
/* @__PURE__ */
|
|
12963
|
-
/* @__PURE__ */
|
|
12630
|
+
"folder-tree": /* @__PURE__ */ jsxs15(Fragment8, { children: [
|
|
12631
|
+
/* @__PURE__ */ jsx16("path", { d: "M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z" }),
|
|
12632
|
+
/* @__PURE__ */ jsx16("path", { d: "M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2a1 1 0 0 0-.8-.4h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z" }),
|
|
12633
|
+
/* @__PURE__ */ jsx16("path", { d: "M3 5a2 2 0 0 0 2 2h3" }),
|
|
12634
|
+
/* @__PURE__ */ jsx16("path", { d: "M3 3v13a2 2 0 0 0 2 2h3" })
|
|
12964
12635
|
] }),
|
|
12965
|
-
box: /* @__PURE__ */
|
|
12966
|
-
/* @__PURE__ */
|
|
12967
|
-
/* @__PURE__ */
|
|
12968
|
-
/* @__PURE__ */
|
|
12636
|
+
box: /* @__PURE__ */ jsxs15(Fragment8, { children: [
|
|
12637
|
+
/* @__PURE__ */ jsx16("path", { d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z" }),
|
|
12638
|
+
/* @__PURE__ */ jsx16("path", { d: "m3.3 7 8.7 5 8.7-5" }),
|
|
12639
|
+
/* @__PURE__ */ jsx16("path", { d: "M12 22V12" })
|
|
12969
12640
|
] }),
|
|
12970
|
-
component: /* @__PURE__ */
|
|
12971
|
-
"file-text": /* @__PURE__ */
|
|
12972
|
-
/* @__PURE__ */
|
|
12973
|
-
/* @__PURE__ */
|
|
12974
|
-
/* @__PURE__ */
|
|
12641
|
+
component: /* @__PURE__ */ jsx16("path", { d: "m12 2 4 4-4 4-4-4Zm0 12 4 4-4 4-4-4ZM2 12l4-4 4 4-4 4Zm12 0 4-4 4 4-4 4Z" }),
|
|
12642
|
+
"file-text": /* @__PURE__ */ jsxs15(Fragment8, { children: [
|
|
12643
|
+
/* @__PURE__ */ jsx16("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
|
|
12644
|
+
/* @__PURE__ */ jsx16("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
|
|
12645
|
+
/* @__PURE__ */ jsx16("path", { d: "M8 13h8M8 17h5" })
|
|
12975
12646
|
] }),
|
|
12976
|
-
heading: /* @__PURE__ */
|
|
12977
|
-
bot: /* @__PURE__ */
|
|
12978
|
-
/* @__PURE__ */
|
|
12979
|
-
/* @__PURE__ */
|
|
12647
|
+
heading: /* @__PURE__ */ jsx16(Fragment8, { children: /* @__PURE__ */ jsx16("path", { d: "M6 4v16M18 4v16M6 12h12" }) }),
|
|
12648
|
+
bot: /* @__PURE__ */ jsxs15(Fragment8, { children: [
|
|
12649
|
+
/* @__PURE__ */ jsx16("rect", { x: "3", y: "8", width: "18", height: "12", rx: "2" }),
|
|
12650
|
+
/* @__PURE__ */ jsx16("path", { d: "M12 4v4M8 14h.01M16 14h.01" })
|
|
12980
12651
|
] }),
|
|
12981
|
-
link: /* @__PURE__ */
|
|
12982
|
-
/* @__PURE__ */
|
|
12983
|
-
/* @__PURE__ */
|
|
12652
|
+
link: /* @__PURE__ */ jsxs15(Fragment8, { children: [
|
|
12653
|
+
/* @__PURE__ */ jsx16("path", { d: "M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.8 1.7" }),
|
|
12654
|
+
/* @__PURE__ */ jsx16("path", { d: "M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.8-1.7" })
|
|
12984
12655
|
] }),
|
|
12985
|
-
"link-2-off": /* @__PURE__ */
|
|
12986
|
-
/* @__PURE__ */
|
|
12987
|
-
/* @__PURE__ */
|
|
12988
|
-
/* @__PURE__ */
|
|
12989
|
-
/* @__PURE__ */
|
|
12656
|
+
"link-2-off": /* @__PURE__ */ jsxs15(Fragment8, { children: [
|
|
12657
|
+
/* @__PURE__ */ jsx16("path", { d: "M9 17H7A5 5 0 0 1 7 7" }),
|
|
12658
|
+
/* @__PURE__ */ jsx16("path", { d: "M15 7h2a5 5 0 0 1 4 8" }),
|
|
12659
|
+
/* @__PURE__ */ jsx16("path", { d: "M8 12h4" }),
|
|
12660
|
+
/* @__PURE__ */ jsx16("path", { d: "m2 2 20 20" })
|
|
12990
12661
|
] }),
|
|
12991
|
-
"circle-dot": /* @__PURE__ */
|
|
12662
|
+
"circle-dot": /* @__PURE__ */ jsx16("rect", { x: "9", y: "9", width: "6", height: "6", rx: "1" })
|
|
12992
12663
|
};
|
|
12993
12664
|
function TreeIcon({ name, size = 11 }) {
|
|
12994
|
-
return /* @__PURE__ */
|
|
12665
|
+
return /* @__PURE__ */ jsx16(Svg, { size, children: PATHS[name] ?? PATHS["circle-dot"] });
|
|
12995
12666
|
}
|
|
12996
12667
|
|
|
12997
12668
|
// src/edit/tree/react/TreePanelView.tsx
|
|
12998
|
-
import { Fragment as Fragment9, jsx as
|
|
12669
|
+
import { Fragment as Fragment9, jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
12999
12670
|
function TreePanelView({
|
|
13000
12671
|
controller,
|
|
13001
12672
|
rowHeight = 24,
|
|
@@ -13027,13 +12698,13 @@ function TreePanelView({
|
|
|
13027
12698
|
const sourceState = source?.sourceState ?? "idle";
|
|
13028
12699
|
const body = (() => {
|
|
13029
12700
|
if (!source || sourceState === "idle") {
|
|
13030
|
-
return /* @__PURE__ */
|
|
12701
|
+
return /* @__PURE__ */ jsx17(EmptyState8, { title: "No source", hint: emptyHint ?? "Connect a source to browse it." });
|
|
13031
12702
|
}
|
|
13032
12703
|
if (sourceState === "loading" && state.rows.length === 0) {
|
|
13033
|
-
return /* @__PURE__ */
|
|
12704
|
+
return /* @__PURE__ */ jsx17(LoadingState, { label: source.sourceMessage ?? "Loading\u2026" });
|
|
13034
12705
|
}
|
|
13035
12706
|
if (sourceState === "error" || sourceState === "denied") {
|
|
13036
|
-
return /* @__PURE__ */
|
|
12707
|
+
return /* @__PURE__ */ jsx17(
|
|
13037
12708
|
ErrorState,
|
|
13038
12709
|
{
|
|
13039
12710
|
title: sourceState === "denied" ? "Access not granted" : "Could not read this source",
|
|
@@ -13044,8 +12715,8 @@ function TreePanelView({
|
|
|
13044
12715
|
);
|
|
13045
12716
|
}
|
|
13046
12717
|
if (state.rows.length === 0) {
|
|
13047
|
-
return state.filter ? /* @__PURE__ */
|
|
13048
|
-
|
|
12718
|
+
return state.filter ? /* @__PURE__ */ jsx17(EmptyState8, { title: "No matches", hint: `Nothing matches \u201C${state.filter}\u201D.` }) : /* @__PURE__ */ jsx17(
|
|
12719
|
+
EmptyState8,
|
|
13049
12720
|
{
|
|
13050
12721
|
title: "Nothing here",
|
|
13051
12722
|
hint: emptyHint ?? source.sourceMessage ?? "This source has no items yet."
|
|
@@ -13060,7 +12731,7 @@ function TreePanelView({
|
|
|
13060
12731
|
overscan
|
|
13061
12732
|
});
|
|
13062
12733
|
const slice = state.rows.slice(window2.startIndex, window2.endIndex);
|
|
13063
|
-
return /* @__PURE__ */
|
|
12734
|
+
return /* @__PURE__ */ jsx17(ScrollArea6, { children: /* @__PURE__ */ jsx17(
|
|
13064
12735
|
"div",
|
|
13065
12736
|
{
|
|
13066
12737
|
ref: scrollRef,
|
|
@@ -13074,7 +12745,7 @@ function TreePanelView({
|
|
|
13074
12745
|
e.preventDefault();
|
|
13075
12746
|
}
|
|
13076
12747
|
},
|
|
13077
|
-
children: /* @__PURE__ */
|
|
12748
|
+
children: /* @__PURE__ */ jsx17("div", { style: { height: window2.totalHeight, position: "relative" }, children: /* @__PURE__ */ jsx17("div", { style: { transform: `translateY(${window2.offsetTop}px)` }, children: slice.map((row) => /* @__PURE__ */ jsx17(
|
|
13078
12749
|
TreeRowView,
|
|
13079
12750
|
{
|
|
13080
12751
|
row,
|
|
@@ -13090,35 +12761,35 @@ function TreePanelView({
|
|
|
13090
12761
|
}
|
|
13091
12762
|
) });
|
|
13092
12763
|
})();
|
|
13093
|
-
return /* @__PURE__ */
|
|
13094
|
-
/* @__PURE__ */
|
|
13095
|
-
|
|
12764
|
+
return /* @__PURE__ */ jsxs16("div", { style: { display: "flex", flexDirection: "column", height: "100%", minHeight: 0 }, children: [
|
|
12765
|
+
/* @__PURE__ */ jsx17(
|
|
12766
|
+
Toolbar7,
|
|
13096
12767
|
{
|
|
13097
|
-
left: showSearch ? /* @__PURE__ */
|
|
13098
|
-
|
|
12768
|
+
left: showSearch ? /* @__PURE__ */ jsx17(
|
|
12769
|
+
SearchField5,
|
|
13099
12770
|
{
|
|
13100
12771
|
value: state.filter,
|
|
13101
12772
|
onChange: (term) => controller.setFilter(term),
|
|
13102
12773
|
placeholder: "Filter\u2026"
|
|
13103
12774
|
}
|
|
13104
12775
|
) : void 0,
|
|
13105
|
-
right: /* @__PURE__ */
|
|
13106
|
-
/* @__PURE__ */
|
|
13107
|
-
/* @__PURE__ */
|
|
13108
|
-
|
|
12776
|
+
right: /* @__PURE__ */ jsxs16(ToolbarGroup5, { end: true, children: [
|
|
12777
|
+
/* @__PURE__ */ jsx17(IconButton7, { icon: /* @__PURE__ */ jsx17(ExpandGlyph, {}), label: "Expand all", onClick: () => controller.expandAll() }),
|
|
12778
|
+
/* @__PURE__ */ jsx17(
|
|
12779
|
+
IconButton7,
|
|
13109
12780
|
{
|
|
13110
|
-
icon: /* @__PURE__ */
|
|
12781
|
+
icon: /* @__PURE__ */ jsx17(CollapseGlyph, {}),
|
|
13111
12782
|
label: "Collapse all",
|
|
13112
12783
|
onClick: () => controller.collapseAll()
|
|
13113
12784
|
}
|
|
13114
12785
|
),
|
|
13115
|
-
/* @__PURE__ */
|
|
12786
|
+
/* @__PURE__ */ jsx17(IconButton7, { icon: /* @__PURE__ */ jsx17(RefreshGlyph, {}), label: "Refresh", onClick: () => controller.refresh() })
|
|
13116
12787
|
] })
|
|
13117
12788
|
}
|
|
13118
12789
|
),
|
|
13119
12790
|
body,
|
|
13120
|
-
/* @__PURE__ */
|
|
13121
|
-
|
|
12791
|
+
/* @__PURE__ */ jsx17(
|
|
12792
|
+
StatusBar8,
|
|
13122
12793
|
{
|
|
13123
12794
|
left: `${state.rows.length} item${state.rows.length === 1 ? "" : "s"}`,
|
|
13124
12795
|
right: state.selection.length > 0 ? `${state.selection.length} selected` : void 0
|
|
@@ -13139,7 +12810,7 @@ function TreeRowView({
|
|
|
13139
12810
|
const selected = state.selection.includes(row.id);
|
|
13140
12811
|
const renaming = state.renaming?.id === row.id ? state.renaming : null;
|
|
13141
12812
|
const drop = state.drag?.targetId === row.id ? state.drag : null;
|
|
13142
|
-
const twisty = row.container ? /* @__PURE__ */
|
|
12813
|
+
const twisty = row.container ? /* @__PURE__ */ jsx17(
|
|
13143
12814
|
"span",
|
|
13144
12815
|
{
|
|
13145
12816
|
role: "button",
|
|
@@ -13159,13 +12830,13 @@ function TreeRowView({
|
|
|
13159
12830
|
transition: "transform 80ms ease",
|
|
13160
12831
|
opacity: 0.7
|
|
13161
12832
|
},
|
|
13162
|
-
children: /* @__PURE__ */
|
|
12833
|
+
children: /* @__PURE__ */ jsx17(ChevronGlyph, {})
|
|
13163
12834
|
}
|
|
13164
12835
|
) : (
|
|
13165
12836
|
// A leaf still reserves the twisty column, so labels stay in ONE column across mixed rows.
|
|
13166
|
-
/* @__PURE__ */
|
|
12837
|
+
/* @__PURE__ */ jsx17("span", { style: { width: 12, flex: "0 0 auto" } })
|
|
13167
12838
|
);
|
|
13168
|
-
return /* @__PURE__ */
|
|
12839
|
+
return /* @__PURE__ */ jsx17(
|
|
13169
12840
|
"div",
|
|
13170
12841
|
{
|
|
13171
12842
|
style: {
|
|
@@ -13176,8 +12847,8 @@ function TreeRowView({
|
|
|
13176
12847
|
boxShadow: drop?.position === "into" ? "inset 0 0 0 1px var(--xeno-active)" : drop?.position === "before" ? "inset 0 1px 0 0 var(--xeno-active)" : drop?.position === "after" ? "inset 0 -1px 0 0 var(--xeno-active)" : void 0
|
|
13177
12848
|
},
|
|
13178
12849
|
title: drop?.reason,
|
|
13179
|
-
children: /* @__PURE__ */
|
|
13180
|
-
|
|
12850
|
+
children: /* @__PURE__ */ jsx17(
|
|
12851
|
+
Row4,
|
|
13181
12852
|
{
|
|
13182
12853
|
role: "treeitem",
|
|
13183
12854
|
"aria-expanded": row.container ? row.expanded : void 0,
|
|
@@ -13212,11 +12883,11 @@ function TreeRowView({
|
|
|
13212
12883
|
onPointerUp: () => {
|
|
13213
12884
|
if (state.drag) controller.endDrag();
|
|
13214
12885
|
},
|
|
13215
|
-
icon: /* @__PURE__ */
|
|
12886
|
+
icon: /* @__PURE__ */ jsxs16(Fragment9, { children: [
|
|
13216
12887
|
twisty,
|
|
13217
|
-
/* @__PURE__ */
|
|
12888
|
+
/* @__PURE__ */ jsx17(NodeIcon, { icon: node.icon ?? defaultIconFor(node.kind) })
|
|
13218
12889
|
] }),
|
|
13219
|
-
label: renaming ? /* @__PURE__ */
|
|
12890
|
+
label: renaming ? /* @__PURE__ */ jsx17(
|
|
13220
12891
|
"input",
|
|
13221
12892
|
{
|
|
13222
12893
|
autoFocus: true,
|
|
@@ -13241,19 +12912,19 @@ function TreeRowView({
|
|
|
13241
12912
|
}
|
|
13242
12913
|
}
|
|
13243
12914
|
) : node.label,
|
|
13244
|
-
meta: /* @__PURE__ */
|
|
13245
|
-
trailing: /* @__PURE__ */
|
|
13246
|
-
columns?.map((columnId) => /* @__PURE__ */
|
|
13247
|
-
node.glyphs?.map((glyph) => /* @__PURE__ */
|
|
12915
|
+
meta: /* @__PURE__ */ jsx17(ChildStateChip, { row, controller }),
|
|
12916
|
+
trailing: /* @__PURE__ */ jsxs16(Fragment9, { children: [
|
|
12917
|
+
columns?.map((columnId) => /* @__PURE__ */ jsx17("span", { style: { opacity: 0.7, fontVariantNumeric: "tabular-nums" }, children: node.columns?.[columnId] ?? "" }, columnId)),
|
|
12918
|
+
node.glyphs?.map((glyph) => /* @__PURE__ */ jsx17("span", { title: glyph.title, style: { display: "flex", opacity: 0.7 }, children: /* @__PURE__ */ jsx17(NodeIcon, { icon: glyph.icon }) }, glyph.id)),
|
|
13248
12919
|
node.badges?.map((badge) => (
|
|
13249
12920
|
// Opaque: the host formatted the text, the panel only places it.
|
|
13250
|
-
/* @__PURE__ */
|
|
12921
|
+
/* @__PURE__ */ jsx17(Badge7, { tone: badge.tone, className: badge.title ? void 0 : void 0, children: badge.text }, badge.id)
|
|
13251
12922
|
)),
|
|
13252
|
-
node.actions?.map((action) => /* @__PURE__ */
|
|
13253
|
-
|
|
12923
|
+
node.actions?.map((action) => /* @__PURE__ */ jsx17(
|
|
12924
|
+
IconButton7,
|
|
13254
12925
|
{
|
|
13255
12926
|
size: "sm",
|
|
13256
|
-
icon: /* @__PURE__ */
|
|
12927
|
+
icon: /* @__PURE__ */ jsx17(NodeIcon, { icon: action.icon }),
|
|
13257
12928
|
label: action.label,
|
|
13258
12929
|
disabled: action.disabled,
|
|
13259
12930
|
onClick: () => controller.runAction(row.id, action.id)
|
|
@@ -13272,14 +12943,14 @@ function ChildStateChip({
|
|
|
13272
12943
|
}) {
|
|
13273
12944
|
if (!row.container) return null;
|
|
13274
12945
|
if (row.childState === "loading") {
|
|
13275
|
-
return /* @__PURE__ */
|
|
12946
|
+
return /* @__PURE__ */ jsx17("span", { style: { opacity: 0.5, fontSize: 9 }, children: "loading\u2026" });
|
|
13276
12947
|
}
|
|
13277
12948
|
if (row.childState === "error") {
|
|
13278
12949
|
const error = row.node.error;
|
|
13279
|
-
return /* @__PURE__ */
|
|
12950
|
+
return /* @__PURE__ */ jsx17(Badge7, { tone: "error", children: error?.code === "denied" ? "no access" : error?.code ?? "failed" });
|
|
13280
12951
|
}
|
|
13281
12952
|
if (row.node.hasMore && row.expanded) {
|
|
13282
|
-
return /* @__PURE__ */
|
|
12953
|
+
return /* @__PURE__ */ jsx17(
|
|
13283
12954
|
"span",
|
|
13284
12955
|
{
|
|
13285
12956
|
role: "button",
|
|
@@ -13293,18 +12964,18 @@ function ChildStateChip({
|
|
|
13293
12964
|
);
|
|
13294
12965
|
}
|
|
13295
12966
|
if (row.node.truncatedAt !== void 0) {
|
|
13296
|
-
return /* @__PURE__ */
|
|
12967
|
+
return /* @__PURE__ */ jsx17(Badge7, { tone: "warning", children: `first ${row.node.truncatedAt}` });
|
|
13297
12968
|
}
|
|
13298
12969
|
if (row.expanded && isEmptyContainer(row.node)) {
|
|
13299
|
-
return /* @__PURE__ */
|
|
12970
|
+
return /* @__PURE__ */ jsx17("span", { style: { opacity: 0.4, fontSize: 9 }, children: "empty" });
|
|
13300
12971
|
}
|
|
13301
12972
|
return null;
|
|
13302
12973
|
}
|
|
13303
12974
|
function NodeIcon({ icon }) {
|
|
13304
12975
|
if (icon.kind === "text") {
|
|
13305
|
-
return /* @__PURE__ */
|
|
12976
|
+
return /* @__PURE__ */ jsx17("span", { style: { fontSize: 11, lineHeight: 1, display: "flex", alignItems: "center" }, children: icon.value });
|
|
13306
12977
|
}
|
|
13307
|
-
return /* @__PURE__ */
|
|
12978
|
+
return /* @__PURE__ */ jsx17(TreeIcon, { name: icon.name });
|
|
13308
12979
|
}
|
|
13309
12980
|
|
|
13310
12981
|
// src/edit/tree/panel.ts
|