{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "integrations-parts",
  "title": "Integrations parts",
  "description": "What the Integrations blocks share: a tool your product works with, its mark on a tile in the text colour, and the section they stand in.",
  "dependencies": [],
  "registryDependencies": [
    "https://kinoui.com/r/icon-tile.json",
    "https://kinoui.com/r/section-heading.json"
  ],
  "files": [
    {
      "path": "registry/lib/integrations-parts.tsx",
      "content": "'use client'\n\nimport { iconTileShapeClassName } from '@/registry/components/kino/icon-tile'\nimport type { SectionHeadingLevel } from '@/registry/lib/section-heading'\nimport type { CSSProperties, ReactNode } from 'react'\n\nimport { cn } from '@/lib/utils'\n\n/*\n * What the Integrations blocks share: a tool your product works with, its\n * mark on a tile, and the section they stand in.\n */\n\n/** A tool's mark: a square picture, drawn in the text colour through its shape. */\ninterface IntegrationLogo {\n  /**\n   * An SVG or a PNG with a clear background. Its shape is drawn in the text\n   * colour, as a CSS mask, so a picture on another site must be served with\n   * CORS (`Access-Control-Allow-Origin`), or it draws nothing.\n   */\n  src: string\n  /** The picture's width and height in any unit: only their ratio is used. */\n  width: number\n  height: number\n}\n\n/** A tool your product works with. */\ninterface Integration {\n  /** Tells the tools apart. */\n  value: string\n  name: string\n  /** What it does with your product, in a line: searched with its name. */\n  description: string\n  logo: IntegrationLogo\n  /** Its page: how to set it up. */\n  href: string\n}\n\n/** What every Integrations block takes, its tools aside. */\ninterface IntegrationsSectionProps {\n  title: ReactNode\n  /** A few words above the title that name the topic. */\n  eyebrow?: ReactNode\n  description?: ReactNode\n  /** The title's level: `h2` under the page's `h1`. */\n  heading?: SectionHeadingLevel\n}\n\n/** The section every arrangement stands in, laid out by its own width. */\nconst integrationsSectionClassName =\n  '@container/integrations relative isolate flex w-full min-w-0 flex-col overflow-x-clip bg-background'\n\n/**\n * A tool's mark, drawn in the text colour through its picture's shape, so it\n * follows the theme. It is the tool's picture beside its name, so it says\n * nothing itself; one with no name beside it takes `label`.\n */\nfunction IntegrationMark({\n  logo,\n  label,\n  className,\n}: {\n  logo: IntegrationLogo\n  /** The tool's name, where nothing beside the mark says it. */\n  label?: string\n  className?: string\n}) {\n  return (\n    <span\n      {...(label ? { role: 'img', 'aria-label': label } : { 'aria-hidden': true })}\n      data-slot='integration-mark'\n      style={\n        {\n          '--integration-src': `url(${JSON.stringify(logo.src)})`,\n          aspectRatio: `${logo.width} / ${logo.height}`,\n        } as CSSProperties\n      }\n      className={cn(\n        // The shape of the picture, filled with the text colour; forced colours take the text's system colour.\n        'block shrink-0 bg-current [mask:var(--integration-src)_center/contain_no-repeat] forced-colors:bg-[CanvasText]',\n        className,\n      )}\n    />\n  )\n}\n\n/** A tool's mark on its tile, as an app's icon sits: the card's and the hub's. */\nfunction IntegrationTile({\n  logo,\n  label,\n  className,\n}: {\n  logo: IntegrationLogo\n  label?: string\n  className?: string\n}) {\n  return (\n    <span\n      data-slot='integration-tile'\n      className={cn(\n        // A logo needs the card's own surface to sit on; its corner is an Icon tile's.\n        'bg-card text-foreground grid shrink-0 place-items-center border shadow-xs [--icon-tile-size:2.5rem]',\n        iconTileShapeClassName,\n        className,\n      )}\n    >\n      <IntegrationMark logo={logo} label={label} className='h-1/2' />\n    </span>\n  )\n}\n\nexport {\n  type Integration,\n  type IntegrationLogo,\n  IntegrationMark,\n  integrationsSectionClassName,\n  type IntegrationsSectionProps,\n  IntegrationTile,\n}\n",
      "type": "registry:lib",
      "target": "@lib/integrations-parts.tsx"
    }
  ],
  "type": "registry:lib"
}