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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reifyui",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "The open-source rendering & interaction layer for agentic applications. Stream and render any agent's output as polished, application-native UI \u2014 model-agnostic, framework-agnostic, design-system-native. The foundation for building generative-UI and agent products.",
5
5
  "keywords": [
6
6
  "react",
package/src/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 {
@@ -39,6 +39,8 @@ const uid = (p) => `${p}_${Math.random().toString(36).slice(2, 10)}`;
39
39
  // editable defaults to !computed
40
40
  // configKey the column's config object for this type; dropped when the type changes
41
41
  // badge(col) an extra header sub-label, e.g. which kind of compute this is
42
+ // configWidth / configHeight how much room this type's config popover needs. A type whose
43
+ // config is a prompt editor does not fit in the width a Type select needs.
42
44
  const DEFAULT_COLUMN_TYPES = [
43
45
  { type: 'text', label: 'Text' },
44
46
  { type: 'number', label: 'Number' },
@@ -623,8 +625,10 @@ function ColumnMenu({ col, columns, anchor, columnTypes, renderColumnConfig, onA
623
625
  close: onClose,
624
626
  });
625
627
 
628
+ const desc = columnTypes.find((t) => t.type === type) || {};
626
629
  return (
627
- <PopPortal anchor={anchor} width={250} estHeight={340} className="shg-menu" onClose={onClose}>
630
+ <PopPortal anchor={anchor} width={desc.configWidth || 250} estHeight={desc.configHeight || 340}
631
+ className="shg-menu" onClose={onClose}>
628
632
  <div onClick={(e) => e.stopPropagation()}>
629
633
  <label className="shg-menu-lbl">Type
630
634
  <select className="shg-menu-input" value={type} onChange={(e) => setType(e.target.value)}>