@booboo-brain/panel 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -246,6 +246,7 @@ body { font-family: var(--font); color: var(--ink); background: var(--bg); overf
246
246
  .oc-mac:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-1px); }
247
247
  .oc-mac.sel { border-color: var(--accent); background: var(--accent-dim); color: var(--ink); }
248
248
  .oc-mac.more { color: var(--ink-3); font-style: italic; }
249
+ .oc-mac.dragging { opacity: 0.45; cursor: grabbing; }
249
250
  .oc-mac.more:hover { color: var(--accent); }
250
251
  .mac-emoji { font-size: 11px; }
251
252
  .mac-name { white-space: nowrap; max-width: 76px; overflow: hidden; text-overflow: ellipsis; }
@@ -510,10 +511,34 @@ body { font-family: var(--font); color: var(--ink); background: var(--bg); overf
510
511
  .pnl-fatal.calm { color: var(--ink-2); }
511
512
 
512
513
  @media (max-width: 760px) {
513
- .doss { position: fixed; right: 0; top: 0; bottom: 0; z-index: 5; width: min(340px, 88vw); box-shadow: -18px 0 50px rgba(0, 0, 0, 0.5); }
514
- .tree { padding: 20px 14px 60px; }
514
+ /* compact chrome */
515
+ .bar { gap: 8px 14px; padding: 9px 12px; }
516
+ .bar-brand { font-size: 13px; }
517
+ .bar-stats { gap: 11px; font-size: 11px; }
518
+ .bar-stats b { font-size: 12.5px; }
519
+ .bar-actions { gap: 6px; }
520
+ .btn { padding: 6px 11px; font-size: 11.5px; }
521
+ .tabs { padding: 0 4px; }
522
+ .tab { padding: 10px 9px 9px; font-size: 11.5px; }
523
+ .tree { padding: 12px 8px 40px; }
524
+ .tree-hint { display: none; }
515
525
  .ag { max-width: 100%; }
516
526
  .ag-role { display: none; }
527
+ .screen { padding: 18px 13px 60px; }
528
+ /* the dossier becomes a BOTTOM SHEET inside the pane — the chart above stays
529
+ tappable to switch agents; the ✕ closes. ABSOLUTE (not fixed) so it can
530
+ never overlap an embedding host's chrome. */
531
+ .doss {
532
+ position: absolute; left: 0; right: 0; bottom: 0; top: 34%;
533
+ width: auto; z-index: 6; border-radius: 16px 16px 0 0;
534
+ border-top: 1px solid var(--line);
535
+ box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.55);
536
+ }
537
+ .doss { animation: sheetup 0.25s ease both; }
538
+ @keyframes sheetup { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
539
+ .doss-close { display: grid; }
540
+ /* zoom control clears the sheet — top-right of the chart */
541
+ .zoomer { top: 4px; right: 8px; bottom: auto; }
517
542
  }
518
543
  `;
519
544
 
@@ -817,8 +842,13 @@ function ChartNode({
817
842
  "button",
818
843
  {
819
844
  type: "button",
820
- className: `oc-mac${cardProps.selected === m.id ? " sel" : ""}`,
821
- title: `${m.name}${m.role ? ` \u2014 ${m.role}` : ""}`,
845
+ className: `oc-mac${cardProps.selected === m.id ? " sel" : ""}${cardProps.dragId === m.id ? " dragging" : ""}`,
846
+ title: `${m.name}${m.role ? ` \u2014 ${m.role}` : ""} \xB7 drag onto an agent to reallocate`,
847
+ draggable: true,
848
+ onDragStart: (e) => {
849
+ e.dataTransfer.effectAllowed = "move";
850
+ cardProps.onDragStart(m.id);
851
+ },
822
852
  onClick: (e) => {
823
853
  e.stopPropagation();
824
854
  cardProps.onSelect(m.id);
@@ -867,6 +897,7 @@ function Dossier({
867
897
  onAdd,
868
898
  onRemove,
869
899
  onSelect,
900
+ onClose,
870
901
  health = null
871
902
  }) {
872
903
  const api = useApi();
@@ -957,7 +988,8 @@ function Dossier({
957
988
  ] }),
958
989
  /* @__PURE__ */ jsxs("div", { className: "doss-head-actions", children: [
959
990
  !edit && /* @__PURE__ */ jsx("button", { className: "doss-3d", title: "edit this agent", onClick: startEdit, children: "\u270E edit" }),
960
- hasSnapshot && /* @__PURE__ */ jsx("button", { className: "doss-3d", title: "see the whole brain in 3D", onClick: () => nav("/graph"), children: "\u25C9 3D" })
991
+ hasSnapshot && /* @__PURE__ */ jsx("button", { className: "doss-3d", title: "see the whole brain in 3D", onClick: () => nav("/graph"), children: "\u25C9 3D" }),
992
+ /* @__PURE__ */ jsx("button", { className: "doss-close", title: "close the dossier", "aria-label": "close the dossier", onClick: onClose, children: "\u2715" })
961
993
  ] })
962
994
  ] }),
963
995
  edit && /* @__PURE__ */ jsxs("div", { className: "doss-edit", children: [
@@ -1233,7 +1265,7 @@ function OrgScreen({
1233
1265
  const root = draft.agents.find((a) => a.id === draft.root);
1234
1266
  return /* @__PURE__ */ jsxs("div", { className: "body", onClick: () => setSelected(null), children: [
1235
1267
  /* @__PURE__ */ jsxs("main", { className: "tree", onClick: (e) => e.stopPropagation(), children: [
1236
- /* @__PURE__ */ jsx("p", { className: "tree-hint", children: "drag an agent onto its new parent \xB7 click for its dossier \xB7 machine trays show live health" }),
1268
+ /* @__PURE__ */ jsx("p", { className: "tree-hint", children: "drag an agent \u2014 or a tray machine \u2014 onto its new parent \xB7 click for its dossier \xB7 machine trays show live health" }),
1237
1269
  /* @__PURE__ */ jsx("div", { className: `chart-fit${zoom !== null ? " zoomed" : ""}`, ref: fitRef, children: /* @__PURE__ */ jsx("div", { className: "chart", ref: chartRef, style: { ["--fit"]: eff }, children: root && /* @__PURE__ */ jsx(
1238
1270
  ChartNode,
1239
1271
  {
@@ -1269,6 +1301,7 @@ function OrgScreen({
1269
1301
  onAdd,
1270
1302
  onRemove,
1271
1303
  onSelect: setSelected,
1304
+ onClose: () => setSelected(null),
1272
1305
  health
1273
1306
  }
1274
1307
  )