@booboo-brain/panel 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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; }
@@ -817,8 +818,13 @@ function ChartNode({
817
818
  "button",
818
819
  {
819
820
  type: "button",
820
- className: `oc-mac${cardProps.selected === m.id ? " sel" : ""}`,
821
- title: `${m.name}${m.role ? ` \u2014 ${m.role}` : ""}`,
821
+ className: `oc-mac${cardProps.selected === m.id ? " sel" : ""}${cardProps.dragId === m.id ? " dragging" : ""}`,
822
+ title: `${m.name}${m.role ? ` \u2014 ${m.role}` : ""} \xB7 drag onto an agent to reallocate`,
823
+ draggable: true,
824
+ onDragStart: (e) => {
825
+ e.dataTransfer.effectAllowed = "move";
826
+ cardProps.onDragStart(m.id);
827
+ },
822
828
  onClick: (e) => {
823
829
  e.stopPropagation();
824
830
  cardProps.onSelect(m.id);
@@ -1233,7 +1239,7 @@ function OrgScreen({
1233
1239
  const root = draft.agents.find((a) => a.id === draft.root);
1234
1240
  return /* @__PURE__ */ jsxs("div", { className: "body", onClick: () => setSelected(null), children: [
1235
1241
  /* @__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" }),
1242
+ /* @__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
1243
  /* @__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
1244
  ChartNode,
1239
1245
  {