reifyui 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.d.ts CHANGED
@@ -260,6 +260,9 @@ export interface SheetColumnType {
260
260
  configKey?: string;
261
261
  /** An extra header sub-label, e.g. which kind of compute this is. */
262
262
  badge?: (column: SheetColumn) => string | undefined;
263
+ /** How much room this type's config popover needs. Defaults to 250 x 340. */
264
+ configWidth?: number;
265
+ configHeight?: number;
263
266
  }
264
267
 
265
268
  export interface SheetCellRenderContext {
package/dist/index.js CHANGED
@@ -2232,73 +2232,84 @@ function ColumnMenu({ col, columns, anchor, columnTypes, renderColumnConfig, onA
2232
2232
  deleteColumn: onDelete,
2233
2233
  close: onClose
2234
2234
  });
2235
- return /* @__PURE__ */ jsx11(PopPortal, { anchor, width: 250, estHeight: 340, className: "shg-menu", onClose, children: /* @__PURE__ */ jsxs10("div", { onClick: (e) => e.stopPropagation(), children: [
2236
- /* @__PURE__ */ jsxs10("label", { className: "shg-menu-lbl", children: [
2237
- "Type",
2238
- /* @__PURE__ */ jsx11("select", { className: "shg-menu-input", value: type, onChange: (e) => setType(e.target.value), children: columnTypes.map((t) => /* @__PURE__ */ jsx11("option", { value: t.type, children: t.label }, t.type)) })
2239
- ] }),
2240
- (type === "select" || type === "tags") && /* @__PURE__ */ jsxs10("label", { className: "shg-menu-lbl", children: [
2241
- "Options (one per line)",
2242
- /* @__PURE__ */ jsx11(
2243
- "textarea",
2244
- {
2245
- className: "shg-menu-input",
2246
- rows: 3,
2247
- value: optText,
2248
- onChange: (e) => setOptText(e.target.value),
2249
- placeholder: "Todo\nDoing\nDone"
2250
- }
2251
- )
2252
- ] }),
2253
- custom !== void 0 ? custom : /* @__PURE__ */ jsxs10(Fragment6, { children: [
2254
- type === "compute" && /* @__PURE__ */ jsxs10(Fragment6, { children: [
2235
+ const desc = columnTypes.find((t) => t.type === type) || {};
2236
+ return /* @__PURE__ */ jsx11(
2237
+ PopPortal,
2238
+ {
2239
+ anchor,
2240
+ width: desc.configWidth || 250,
2241
+ estHeight: desc.configHeight || 340,
2242
+ className: "shg-menu",
2243
+ onClose,
2244
+ children: /* @__PURE__ */ jsxs10("div", { onClick: (e) => e.stopPropagation(), children: [
2255
2245
  /* @__PURE__ */ jsxs10("label", { className: "shg-menu-lbl", children: [
2256
- "Runs",
2257
- /* @__PURE__ */ jsx11("select", { className: "shg-menu-input", value: kind, onChange: (e) => setKind(e.target.value), children: COMPUTE_KINDS.map((k) => /* @__PURE__ */ jsx11("option", { value: k.kind, children: k.label }, k.kind)) })
2246
+ "Type",
2247
+ /* @__PURE__ */ jsx11("select", { className: "shg-menu-input", value: type, onChange: (e) => setType(e.target.value), children: columnTypes.map((t) => /* @__PURE__ */ jsx11("option", { value: t.type, children: t.label }, t.type)) })
2258
2248
  ] }),
2259
- (kind === "prompt" || kind === "harness") && /* @__PURE__ */ jsxs10("label", { className: "shg-menu-lbl", children: [
2260
- "Prompt \u2014 reference columns as ",
2261
- "{{Name}}",
2249
+ (type === "select" || type === "tags") && /* @__PURE__ */ jsxs10("label", { className: "shg-menu-lbl", children: [
2250
+ "Options (one per line)",
2262
2251
  /* @__PURE__ */ jsx11(
2263
2252
  "textarea",
2264
2253
  {
2265
2254
  className: "shg-menu-input",
2266
2255
  rows: 3,
2267
- value: prompt,
2268
- onChange: (e) => setPrompt(e.target.value),
2269
- placeholder: "Summarize {{Company}} in one line"
2256
+ value: optText,
2257
+ onChange: (e) => setOptText(e.target.value),
2258
+ placeholder: "Todo\nDoing\nDone"
2270
2259
  }
2271
2260
  )
2272
2261
  ] }),
2273
- kind === "harness" && /* @__PURE__ */ jsxs10("label", { className: "shg-menu-lbl", children: [
2274
- "Agent id",
2275
- /* @__PURE__ */ jsx11("input", { className: "shg-menu-input", value: harnessId, onChange: (e) => setHarnessId(e.target.value), placeholder: "chrn_\u2026" })
2276
- ] }),
2277
- kind === "workflow" && /* @__PURE__ */ jsxs10(Fragment6, { children: [
2278
- /* @__PURE__ */ jsxs10("label", { className: "shg-menu-lbl", children: [
2279
- "Workflow id",
2280
- /* @__PURE__ */ jsx11("input", { className: "shg-menu-input", value: wfSlug, onChange: (e) => setWfSlug(e.target.value), placeholder: "my-workflow" })
2262
+ custom !== void 0 ? custom : /* @__PURE__ */ jsxs10(Fragment6, { children: [
2263
+ type === "compute" && /* @__PURE__ */ jsxs10(Fragment6, { children: [
2264
+ /* @__PURE__ */ jsxs10("label", { className: "shg-menu-lbl", children: [
2265
+ "Runs",
2266
+ /* @__PURE__ */ jsx11("select", { className: "shg-menu-input", value: kind, onChange: (e) => setKind(e.target.value), children: COMPUTE_KINDS.map((k) => /* @__PURE__ */ jsx11("option", { value: k.kind, children: k.label }, k.kind)) })
2267
+ ] }),
2268
+ (kind === "prompt" || kind === "harness") && /* @__PURE__ */ jsxs10("label", { className: "shg-menu-lbl", children: [
2269
+ "Prompt \u2014 reference columns as ",
2270
+ "{{Name}}",
2271
+ /* @__PURE__ */ jsx11(
2272
+ "textarea",
2273
+ {
2274
+ className: "shg-menu-input",
2275
+ rows: 3,
2276
+ value: prompt,
2277
+ onChange: (e) => setPrompt(e.target.value),
2278
+ placeholder: "Summarize {{Company}} in one line"
2279
+ }
2280
+ )
2281
+ ] }),
2282
+ kind === "harness" && /* @__PURE__ */ jsxs10("label", { className: "shg-menu-lbl", children: [
2283
+ "Agent id",
2284
+ /* @__PURE__ */ jsx11("input", { className: "shg-menu-input", value: harnessId, onChange: (e) => setHarnessId(e.target.value), placeholder: "chrn_\u2026" })
2285
+ ] }),
2286
+ kind === "workflow" && /* @__PURE__ */ jsxs10(Fragment6, { children: [
2287
+ /* @__PURE__ */ jsxs10("label", { className: "shg-menu-lbl", children: [
2288
+ "Workflow id",
2289
+ /* @__PURE__ */ jsx11("input", { className: "shg-menu-input", value: wfSlug, onChange: (e) => setWfSlug(e.target.value), placeholder: "my-workflow" })
2290
+ ] }),
2291
+ /* @__PURE__ */ jsxs10("label", { className: "shg-menu-lbl", children: [
2292
+ "Output key (optional)",
2293
+ /* @__PURE__ */ jsx11("input", { className: "shg-menu-input", value: outKey, onChange: (e) => setOutKey(e.target.value), placeholder: "summary" })
2294
+ ] })
2295
+ ] }),
2296
+ others.length > 0 && /* @__PURE__ */ jsxs10("div", { className: "shg-menu-lbl", children: [
2297
+ "Reads columns",
2298
+ /* @__PURE__ */ jsx11("div", { className: "shg-menu-deps", children: others.map((c) => /* @__PURE__ */ jsxs10("label", { className: "shg-menu-dep", children: [
2299
+ /* @__PURE__ */ jsx11("input", { type: "checkbox", checked: deps.has(c.id), onChange: () => toggleDep(c.id) }),
2300
+ " ",
2301
+ c.name
2302
+ ] }, c.id)) })
2303
+ ] })
2281
2304
  ] }),
2282
- /* @__PURE__ */ jsxs10("label", { className: "shg-menu-lbl", children: [
2283
- "Output key (optional)",
2284
- /* @__PURE__ */ jsx11("input", { className: "shg-menu-input", value: outKey, onChange: (e) => setOutKey(e.target.value), placeholder: "summary" })
2305
+ /* @__PURE__ */ jsxs10("div", { className: "shg-menu-actions", children: [
2306
+ /* @__PURE__ */ jsx11("button", { className: "shg-menu-del", onClick: onDelete, children: "Delete column" }),
2307
+ /* @__PURE__ */ jsx11("button", { className: "shg-menu-apply", onClick: apply, children: "Apply" })
2285
2308
  ] })
2286
- ] }),
2287
- others.length > 0 && /* @__PURE__ */ jsxs10("div", { className: "shg-menu-lbl", children: [
2288
- "Reads columns",
2289
- /* @__PURE__ */ jsx11("div", { className: "shg-menu-deps", children: others.map((c) => /* @__PURE__ */ jsxs10("label", { className: "shg-menu-dep", children: [
2290
- /* @__PURE__ */ jsx11("input", { type: "checkbox", checked: deps.has(c.id), onChange: () => toggleDep(c.id) }),
2291
- " ",
2292
- c.name
2293
- ] }, c.id)) })
2294
2309
  ] })
2295
- ] }),
2296
- /* @__PURE__ */ jsxs10("div", { className: "shg-menu-actions", children: [
2297
- /* @__PURE__ */ jsx11("button", { className: "shg-menu-del", onClick: onDelete, children: "Delete column" }),
2298
- /* @__PURE__ */ jsx11("button", { className: "shg-menu-apply", onClick: apply, children: "Apply" })
2299
2310
  ] })
2300
- ] })
2301
- ] }) });
2311
+ }
2312
+ );
2302
2313
  }
2303
2314
  function defaultCellText(cell) {
2304
2315
  const v = cell?.value;