@witchcraft/layout
    Preparing search index...
    • Returns a LayoutChange with the information necessary to redistribute frames to expand/shrink a certain amount towards the given side.

      Changes can be applied to a window with applyFrameChanges.

      While it checks for bounds/space issues (unless allowOutOfBounds is true), it does not check that all the frames correctly share/fill the start/end edges.

      If you try to resize a layout like this to the right, you will get issues with frame edges not lining up as frame B would be resized less than A. If you had a frame at the empty space that you excluded, it's right edge would no longer align with B's.

      See getFrameCollapseInfo and getFrameUncollapseInfo for how to work around this (you must move frames like A to share the edge then move them back). Excluding them from the calcuation usually leads to subtler errors. Such as if there are frames after A and B to the right, excluding A would mean A's right edge would stop aligning with those other frames.

      ┌────────────┐ │A │ └──┬─────────┤ │B │ └─────────┘

      Also note that it automatically excludes all collapsed frames without an area (height or width === 0).

      Parameters

      • win: BaseLayoutWindow
      • side: "left" | "right" | "top" | "bottom"

        Side to expand/shrink to.

      • frameIds: string[]
      • amountScaled: number

        This can be negative to expand the frames instead (e.g. when collapsing a docked frame).

      • allowOutOfBounds: boolean = false

        Allow the resize span to exceed window bounds.

      Returns
          | LayoutChange
          | KnownError<
              "REDISTRIBUTE_OUT_OF_BOUNDS",
              { max: number; min: number; wanted: number },
          >
          | KnownError<
              "NO_SPACE_TO_REDISTRIBUTE",
              { frameSizeNeeded: number; minFrameSize: number },
          >