reifyui 0.7.1 → 0.7.3

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.7.1",
3
+ "version": "0.7.3",
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",
@@ -4,12 +4,12 @@
4
4
  // things — a full-width row with a Preview button, and a bare text chip — which is how one surface
5
5
  // ends up with a download affordance the other never got.
6
6
  //
7
- // `compact` is the only difference between them, and it is a size, not a second component: in a
8
- // grid cell there is room for a glyph and a name, so the sub-line and the button labels collapse
9
- // to icons. Everything remains reachable.
10
- import { Fragment } from 'react';
7
+ // There is ONE card. There was briefly a `compact` variant for grid cells, which shrank the
8
+ // actions to two 20px glyphs on a tinted background; it was a worse version of the thing it was
9
+ // a variant of, which is what a variant usually is. A cell narrow enough to need a different card
10
+ // is a cell too narrow to show the file at all — the name ellipsises and the card still works.
11
11
  import { FileTypeIcon, extOf } from './FileTypeIcon.jsx';
12
- import { IcDownload, IcEye } from './icons.jsx';
12
+ import { IcDownload } from './icons.jsx';
13
13
 
14
14
  /** "PPTX · output" — what it is, then where it came from. `origin` is the caller's word. */
15
15
  function subtitle(name, origin, bytes) {
@@ -26,39 +26,33 @@ export function bytesLabel(n) {
26
26
  return `${(n / 1048576).toFixed(1)} MB`;
27
27
  }
28
28
 
29
- export function FileCard({
30
- name, origin, bytes, onPreview, onDownload, compact = false, className = '',
31
- }) {
29
+ export function FileCard({ name, origin = 'output', bytes, onPreview, onDownload, className = '' }) {
32
30
  // The whole card opens the preview, and the eye repeats it as an explicit target — a card that
33
31
  // is clickable without saying so is a card people do not click.
34
32
  const open = onPreview ? (e) => { e.stopPropagation(); onPreview(); } : undefined;
35
33
  return (
36
- <div className={'uic-filecard' + (compact ? ' is-compact' : '') + (open ? ' is-clickable' : '')
37
- + (className ? ' ' + className : '')}
34
+ <div className={'uic-filecard' + (open ? ' is-clickable' : '') + (className ? ' ' + className : '')}
38
35
  onClick={open}
39
36
  role={open ? 'button' : undefined}
40
37
  tabIndex={open ? 0 : undefined}
41
38
  onKeyDown={open ? (e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); open(e); } } : undefined}
42
39
  title={name}>
43
- <span className="uic-filecard-ic"><FileTypeIcon name={name} size={compact ? 20 : 30} /></span>
40
+ <span className="uic-filecard-ic"><FileTypeIcon name={name} size={32} /></span>
44
41
  <span className="uic-filecard-meta">
45
42
  <span className="uic-filecard-name">{name}</span>
46
- {!compact && <span className="uic-filecard-sub">{subtitle(name, origin, bytes)}</span>}
43
+ <span className="uic-filecard-sub">{subtitle(name, origin, bytes)}</span>
47
44
  </span>
48
- <Fragment>
49
- {onDownload && (
50
- <button type="button" className="uic-filecard-btn" aria-label={`Download ${name}`} title="Download"
51
- onClick={(e) => { e.stopPropagation(); onDownload(); }}>
52
- <IcDownload />
53
- </button>
54
- )}
55
- {onPreview && (
56
- <button type="button" className="uic-filecard-btn" aria-label={`Preview ${name}`} title="Preview"
57
- onClick={open}>
58
- <IcEye />
59
- </button>
60
- )}
61
- </Fragment>
45
+ {onDownload && (
46
+ <button type="button" className="uic-filecard-dl" aria-label={`Download ${name}`} title="Download"
47
+ onClick={(e) => { e.stopPropagation(); onDownload(); }}>
48
+ <IcDownload size={18} />
49
+ </button>
50
+ )}
51
+ {onPreview && (
52
+ <button type="button" className="uic-filecard-open" aria-label={`Preview ${name}`} onClick={open}>
53
+ Preview
54
+ </button>
55
+ )}
62
56
  </div>
63
57
  );
64
58
  }
@@ -297,8 +297,9 @@ export function SheetGrid({
297
297
  return cls;
298
298
  };
299
299
  // The number gutter is FIXED: sized by the digit count of the row total so it never stretches
300
- // (an empty grid otherwise splits the table width).
301
- const numW = Math.max(40, 24 + String(rows.length || 1).length * 9);
300
+ // (an empty grid otherwise splits the table width). Wide enough for the number AND the delete
301
+ // button beside it, both at a size worth aiming at.
302
+ const numW = Math.max(48, 30 + String(rows.length || 1).length * 9);
302
303
  const numStyle = { width: numW, minWidth: numW, maxWidth: numW };
303
304
  const rowHeight = (row) => (sizeDraft.row && sizeDraft.row[row.id]) || row.height || undefined;
304
305
 
package/styles/file.css CHANGED
@@ -23,25 +23,24 @@
23
23
  display: block; margin-top: 2px; font-size: 12px; color: var(--uic-mute, #5B5D66);
24
24
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
25
25
  }
26
- .uic-filecard-btn {
27
- width: 28px; height: 28px; flex: 0 0 auto; border-radius: 8px;
26
+ .uic-filecard-dl {
27
+ width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px;
28
28
  display: inline-flex; align-items: center; justify-content: center;
29
29
  border: 1px solid transparent; background: transparent; cursor: pointer;
30
30
  color: var(--uic-mute, #5B5D66);
31
31
  }
32
- .uic-filecard-btn:hover { background: var(--uic-brand-faint, #EFF3FF); color: var(--uic-brand, #285AFF); }
32
+ .uic-filecard-dl:hover { background: var(--uic-brand-faint, #EFF3FF); color: var(--uic-brand, #285AFF); }
33
+ .uic-filecard-open {
34
+ flex: 0 0 auto; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
35
+ white-space: nowrap; padding: 7px 15px; border-radius: 9px;
36
+ color: var(--uic-brand, #285AFF); background: var(--uic-surface, #FFFFFF);
37
+ border: 1px solid var(--uic-line, #DDDFE6);
38
+ }
39
+ .uic-filecard-open:hover { border-color: var(--uic-brand-soft, #E1E9FF); background: var(--uic-brand-faint, #EFF3FF); }
40
+ .uic-filecard-dl:focus-visible, .uic-filecard-open:focus-visible {
41
+ outline: 2px solid var(--uic-brand, #285AFF); outline-offset: 2px;
42
+ }
33
43
 
34
- /* Compact is a size, not a second component: in a grid cell there is room for a glyph and a name,
35
- so the sub-line goes and the buttons appear on hover. Everything stays reachable by keyboard. */
36
- .uic-filecard.is-compact {
37
- gap: 6px; padding: 3px 5px; border-radius: 8px; box-shadow: none;
38
- background: var(--uic-brand-faint, #EFF3FF); border-color: transparent;
39
- max-width: 100%;
40
- }
41
- .uic-filecard.is-compact .uic-filecard-name { font-size: 11.5px; font-weight: 500; }
42
- .uic-filecard.is-compact .uic-filecard-btn { width: 20px; height: 20px; opacity: 0; }
43
- .uic-filecard.is-compact:hover .uic-filecard-btn,
44
- .uic-filecard.is-compact:focus-within .uic-filecard-btn { opacity: 1; }
45
44
 
46
45
  /* The fallback glyph, for a build without react-file-icon. A file with no icon still has to be
47
46
  identifiable, so the extension itself is the icon. */
package/styles/sheet.css CHANGED
@@ -20,12 +20,16 @@
20
20
  position: sticky; left: 0; z-index: 3;
21
21
  }
22
22
  .shg-corner { z-index: 6; }
23
- .shg-rownum span { font-size: 11px; }
23
+ .shg-rownum span { font-size: 12.5px; }
24
+ /* A 12x18 target for a destructive action was too small to hit deliberately and too small to
25
+ read. It is a real button now, and the gutter is wide enough to hold it beside the number. */
24
26
  .shg-rowdel {
25
- position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
26
- border: none; background: transparent; color: var(--uic-mute-2, #8E9199);
27
- cursor: pointer; font-size: 14px; line-height: 1; opacity: 0; padding: 2px;
27
+ position: absolute; right: 3px; top: 50%; transform: translateY(-50%);
28
+ width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center;
29
+ border: none; border-radius: 5px; background: transparent; color: var(--uic-mute-2, #8E9199);
30
+ cursor: pointer; font-size: 17px; line-height: 1; opacity: 0; padding: 0;
28
31
  }
32
+ .shg-rowdel:hover { background: var(--uic-fail-bg, #FEF2F2); color: var(--uic-fail-ink, #B91C1C); }
29
33
  .shg-table tr:hover .shg-rowdel { opacity: 1; }
30
34
 
31
35
  .shg-col { min-width: 180px; max-width: 420px; background: var(--uic-surface, #FFFFFF); position: sticky; top: 0; z-index: 4; }
@@ -48,11 +52,12 @@
48
52
  .shg-colrun:hover { background: var(--uic-brand-faint, #EFF3FF); }
49
53
  .shg-coldel, .shg-add {
50
54
  border: none; background: transparent; color: var(--uic-mute-2, #8E9199);
51
- cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 5px; border-radius: 4px;
55
+ cursor: pointer; font-size: 17px; line-height: 1; border-radius: 5px;
56
+ width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
52
57
  }
53
58
  .shg-coldel:hover { background: var(--uic-fail-bg, #FEF2F2); color: var(--uic-fail-ink, #B91C1C); }
54
59
  .shg-add:hover { background: var(--uic-line-soft, #EFF1F4); color: var(--uic-ink, #111317); }
55
- .shg-add-col { width: auto; min-width: 40px; text-align: left; background: var(--uic-surface, #FFFFFF); position: sticky; top: 0; z-index: 4; }
60
+ .shg-add-col { width: auto; min-width: 44px; text-align: center; background: var(--uic-surface, #FFFFFF); position: sticky; top: 0; z-index: 4; }
56
61
 
57
62
  .shg-cell { cursor: text; background: var(--uic-surface, #FFFFFF); }
58
63
  .shg-cell-compute { cursor: default; }