{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "api-slate-point-docs",
  "title": "Point",
  "description": "API reference for points in Plate.",
  "files": [
    {
      "path": "../../content/docs/api/slate/point.mdx",
      "content": "---\ntitle: Point\ndescription: API reference for points in Plate.\n---\n\nA Point represents a specific location in a Plate document. It consists of a path to a text node and an offset within that text node's content.\n\n```typescript\ntype Point = {\n  path: Path\n  offset: number\n}\n```\n\n- [Path](/docs/api/slate/path)\n\n## `PointAPI`\n\n### `get`\n\nGet a point from a location.\n\n<API name=\"get\">\n<APIParameters>\n  <APIItem name=\"at\" type=\"At | null\" optional>\n    The location to get the point from. Can be a `TRange`, `Point`, or `Path`.\n  </APIItem>\n  <APIItem name=\"options\" type=\"object\" optional>\n    Additional options for point retrieval.\n  </APIItem>\n</APIParameters>\n\n<APIOptions type=\"object\">\n  <APIItem name=\"focus\" type=\"boolean\" optional>\n    If true and the location is a range, returns the focus point instead of the anchor point.\n  </APIItem>\n</APIOptions>\n\n<APIReturns type=\"Point | undefined\">\n  The point at the specified location, or `undefined` if not found.\n</APIReturns>\n</API>\n\n### `transform`\n\nTransform a point by an operation.\n\n<API name=\"transform\">\n<APIParameters>\n  <APIItem name=\"point\" type=\"Point\">\n    The point to transform.\n  </APIItem>\n  <APIItem name=\"op\" type=\"Operation\">\n    The operation to apply.\n  </APIItem>\n  <APIItem name=\"options\" type=\"PointTransformOptions\" optional>\n    Options for transforming the point.\n  </APIItem>\n</APIParameters>\n\n<APIOptions type=\"PointTransformOptions\">\n  <APIItem name=\"affinity\" type=\"TextDirection | null\" optional>\n    The direction to prefer when transforming the point.\n  </APIItem>\n</APIOptions>\n\n<APIReturns type=\"Point | null\">\n  The transformed point, or `null` if the point was deleted.\n</APIReturns>\n</API>\n\n### `compare`\n\nCompare a point to another.\n\n<API name=\"compare\">\n<APIParameters>\n  <APIItem name=\"point\" type=\"Point\">\n    The first point to compare.\n  </APIItem>\n  <APIItem name=\"another\" type=\"Point\">\n    The second point to compare.\n  </APIItem>\n</APIParameters>\n\n<APIReturns type=\"-1 | 0 | 1\">\n  `-1` if before, `0` if at the same location, `1` if after.\n</APIReturns>\n</API>\n\n### `equals`\n\nCheck if two points are exactly equal.\n\n<API name=\"equals\">\n<APIParameters>\n  <APIItem name=\"point\" type=\"Point\">\n    The first point to compare.\n  </APIItem>\n  <APIItem name=\"another\" type=\"Point\">\n    The second point to compare.\n  </APIItem>\n</APIParameters>\n\n<APIReturns type=\"boolean\">\n  `true` if the points are equal, `false` otherwise.\n</APIReturns>\n</API>\n\n### `isAfter`\n\nCheck if a point is after another.\n\n<API name=\"isAfter\">\n<APIParameters>\n  <APIItem name=\"point\" type=\"Point\">\n    The point to check.\n  </APIItem>\n  <APIItem name=\"another\" type=\"Point\">\n    The point to compare against.\n  </APIItem>\n</APIParameters>\n\n<APIReturns type=\"boolean\">\n  `true` if the first point is after the second.\n</APIReturns>\n</API>\n\n### `isBefore`\n\nCheck if a point is before another.\n\n<API name=\"isBefore\">\n<APIParameters>\n  <APIItem name=\"point\" type=\"Point\">\n    The point to check.\n  </APIItem>\n  <APIItem name=\"another\" type=\"Point\">\n    The point to compare against.\n  </APIItem>\n</APIParameters>\n\n<APIReturns type=\"boolean\">\n  `true` if the first point is before the second.\n</APIReturns>\n</API>\n\n### `isPoint`\n\nCheck if a value implements the `Point` interface.\n\n<API name=\"isPoint\">\n<APIParameters>\n  <APIItem name=\"value\" type=\"any\">\n    The value to check.\n  </APIItem>\n</APIParameters>\n\n<APIReturns type=\"boolean\">\n  `true` if the value is a point.\n</APIReturns>\n</API>\n\n## Types\n\n### `Point`\n\nA point represents a specific location in a Plate document.\n\n<API name=\"Point\">\n<APIAttributes>\n  <APIItem name=\"offset\" type=\"number\">\n    The index of the character in the text node.\n  </APIItem>\n  <APIItem name=\"path\" type=\"Path\">\n    The path to the text node.\n  </APIItem>\n</APIAttributes>\n</API>\n### `PointEntry`\n\nA point entry is returned when iterating over `Point` objects that belong to a range.\n\n<API name=\"PointEntry\">\n<APIAttributes>\n  <APIItem name=\"[0]\" type=\"Point\">\n    The point location.\n  </APIItem>\n  <APIItem name=\"[1]\" type=\"'anchor' | 'focus'\">\n    Indicates whether this point is the anchor or focus of a range.\n  </APIItem>\n</APIAttributes>\n</API>",
      "type": "registry:file",
      "target": "content/docs/plate/api/slate/point.mdx"
    }
  ],
  "type": "registry:file"
}