Skip to content

@gpuix/react@0.3.0

Choose a tag to compare

@remorses remorses released this 23 Aug 13:33
· 139 commits to main since this release

Also ships @gpuix/native@0.3.0. CI publishes both packages.

  1. CSS grid on divdisplay: "grid" plus gridTemplateColumns maps to GPUI's Taffy grid. Use gridColumnMin: "max-content" for tables so each column is as wide as its widest cell.

    <div
      style={{
        display: 'grid',
        gridTemplateColumns: 3,
        gridColumnMin: 'max-content',
        rowGap: 1,
        columnGap: 1,
      }}
    >
      {cells}
    </div>

    gridTemplateRows and gridRowMin work the same on the other axis.

  2. Window chrome at open timerender() now honors a transparent titlebar, traffic-light position, and a blurred or transparent window background.

    import { render } from '@gpuix/react'
    
    render(<App />, {
      title: 'Waku',
      width: 1180,
      height: 820,
      titlebarTransparent: true,
      windowBackground: 'blurred',
      trafficLightX: 16,
      trafficLightY: 17,
    })

    windowBackground is "opaque" (default), "transparent", or "blurred".

  3. <diff> flows with its parent — it no longer owns a scroller unless you pass scroll. Use maxLines to keep a long patch short. Show more fires onShowMore.

    const [open, setOpen] = useState(false)
    
    <diff
      patch={unifiedPatch}
      wordDiff
      maxLines={open ? undefined : 24}
      onShowMore={() => setOpen(true)}
    />
  4. Debug frame overlay — see draw time on a live window.

    render(<App />, { title: 'My App', debugFrameOverlay: 'full' })

    Modes are hidden, minimal, and full. The readout is draw time, not FPS. 8.3 MS is about 120 Hz.

  5. Quit when the last window closes — the red traffic-light button now exits the process.

  6. Overlays block hits, and pointerEvents works — set pointerEvents: "none" to opt out. Set pointerEvents: "auto" to block even with no fill.

  7. Opaque Select, Combobox, and Tooltip surfacesFloatingLayer defaults to backgroundColor: "#1A1A1A".

  8. <svg> icons paint on the first frame — file paths and data:image/svg+xml URLs both work.

  9. bun --hot remounts no longer paint a black window.

  10. Cmd+Delete and Cmd+Backspace in <input> and <textarea> match the macOS system text field.

  11. Vertical wheel over overflowX: "scroll" stays on the parent. Trackpad X still pans the wide child.

  12. Parent scroller takes the wheel over a filled in-flow div.

  13. macOS scroll stays at the display rate on expensive frames.

  14. Faster first React mountapplyBatch sends styles and custom props as JSON values instead of double-encoded strings.

  15. Raw custom-prop values stay intact<anchored side="top"> commits again.