Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

660 B
Raw Blame
/** Supplies the row and viewport measurements JSDOM does not implement. */
export class GridResizeObserver implements ResizeObserver {
  constructor(private readonly callback: ResizeObserverCallback) {}
  observe(target: Element) {
    const height = target.querySelector('[role="grid"]') ? 400 : 43;
    const size = { inlineSize: 800, blockSize: height };
    this.callback(
      [
        {
          target,
          contentRect: new DOMRect(0, 0, 800, height),
          borderBoxSize: [size],
          contentBoxSize: [size],
          devicePixelContentBoxSize: [size],
        },
      ],
      this
    );
  }
  unobserve() {}
  disconnect() {}
}