Prism.languages.rest = {
  table: [
    {
      pattern:
        /(^[\t ]*)(?:\+[=-]+)+\+(?:\r?\n|\r)(?:\1[+|].+[+|](?:\r?\n|\r))+\1(?:\+[=-]+)+\+/m,
      lookbehind: true,
      inside: {
        punctuation: /\||(?:\+[=-]+)+\+/,
      },
    },
    {
      pattern:
        /(^[\t ]*)=+ [ =]*=(?:(?:\r?\n|\r)\1.+)+(?:\r?\n|\r)\1=+ [ =]*=(?=(?:\r?\n|\r){2}|\s*$)/m,
      lookbehind: true,
      inside: {
        punctuation: /[=-]+/,
      },
    },
  ],

  // Directive-like patterns

  'substitution-def': {
    pattern: /(^[\t ]*\.\. )\|(?:[^|\s](?:[^|]*[^|\s])?)\| [^:]+::/m,
    lookbehind: true,
    inside: {
      substitution: {
        pattern: /^\|(?:[^|\s]|[^|\s][^|]*[^|\s])\|/,
        alias: 'attr-value',
        inside: {
          punctuation: /^\||\|$/,
        },
      },
      directive: {
        pattern: /( )(?! )[^:]+::/,
        lookbehind: true,
        alias: 'function',
        inside: {
          punctuation: /::$/,
        },
      },
    },
  },
  'link-target': [
    {
      pattern: /(^[\t ]*\.\. )\[[^\]]+\]/m,
      lookbehind: true,
      alias: 'string',
      inside: {
        punctuation: /^\[|\]$/,
      },
    },
    {
      pattern: /(^[\t ]*\.\. )_(?:`[^`]+`|(?:[^:\\]|\\.)+):/m,
      lookbehind: true,
      alias: 'string',
      inside: {
        punctuation: /^_|:$/,
      },
    },
  ],
  directive: {
    pattern: /(^[\t ]*\.\. )[^:]+::/m,
    lookbehind: true,
    alias: 'function',
    inside: {
      punctuation: /::$/,
    },
  },
  comment: {
    // The two alternatives try to prevent highlighting of blank comments
    pattern:
      /(^[\t ]*\.\.)(?:(?: .+)?(?:(?:\r?\n|\r).+)+| .+)(?=(?:\r?\n|\r){2}|$)/m,
    lookbehind: true,
  },

  title: [
    // Overlined and underlined
    {
      pattern:
        /^(([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+)(?:\r?\n|\r).+(?:\r?\n|\r)\1$/m,
      inside: {
        punctuation:
          /^[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+|[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,
        important: /.+/,
      },
    },

    // Underlined only
    {
      pattern:
        /(^|(?:\r?\n|\r){2}).+(?:\r?\n|\r)([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+(?=\r?\n|\r|$)/,
      lookbehind: true,
      inside: {
        punctuation: /[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,
        important: /.+/,
      },
    },
  ],
  hr: {
    pattern:
      /((?:\r?\n|\r){2})([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2{3,}(?=(?:\r?\n|\r){2})/,
    lookbehind: true,
    alias: 'punctuation',
  },
  field: {
    pattern: /(^[\t ]*):[^:\r\n]+:(?= )/m,
    lookbehind: true,
    alias: 'attr-name',
  },
  'command-line-option': {
    pattern:
      /(^[\t ]*)(?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?(?:, (?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?)*(?=(?:\r?\n|\r)? {2,}\S)/im,
    lookbehind: true,
    alias: 'symbol',
  },
  'literal-block': {
    pattern: /::(?:\r?\n|\r){2}([ \t]+)(?![ \t]).+(?:(?:\r?\n|\r)\1.+)*/,
    inside: {
      'literal-block-punctuation': {
        pattern: /^::/,
        alias: 'punctuation',
      },
    },
  },
  'quoted-literal-block': {
    pattern:
      /::(?:\r?\n|\r){2}([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]).*(?:(?:\r?\n|\r)\1.*)*/,
    inside: {
      'literal-block-punctuation': {
        pattern: /^(?:::|([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\1*)/m,
        alias: 'punctuation',
      },
    },
  },
  'list-bullet': {
    pattern:
      /(^[\t ]*)(?:[*+\-•‣⁃]|\(?(?:\d+|[a-z]|[ivxdclm]+)\)|(?:\d+|[a-z]|[ivxdclm]+)\.)(?= )/im,
    lookbehind: true,
    alias: 'punctuation',
  },
  'doctest-block': {
    pattern: /(^[\t ]*)>>> .+(?:(?:\r?\n|\r).+)*/m,
    lookbehind: true,
    inside: {
      punctuation: /^>>>/,
    },
  },

  inline: [
    {
      pattern:
        /(^|[\s\-:\/'"<(\[{])(?::[^:]+:`.*?`|`.*?`:[^:]+:|(\*\*?|``?|\|)(?!\s)(?:(?!\2).)*\S\2(?=[\s\-.,:;!?\\\/'")\]}]|$))/m,
      lookbehind: true,
      inside: {
        bold: {
          pattern: /(^\*\*).+(?=\*\*$)/,
          lookbehind: true,
        },
        italic: {
          pattern: /(^\*).+(?=\*$)/,
          lookbehind: true,
        },
        'inline-literal': {
          pattern: /(^``).+(?=``$)/,
          lookbehind: true,
          alias: 'symbol',
        },
        role: {
          pattern: /^:[^:]+:|:[^:]+:$/,
          alias: 'function',
          inside: {
            punctuation: /^:|:$/,
          },
        },
        'interpreted-text': {
          pattern: /(^`).+(?=`$)/,
          lookbehind: true,
          alias: 'attr-value',
        },
        substitution: {
          pattern: /(^\|).+(?=\|$)/,
          lookbehind: true,
          alias: 'attr-value',
        },
        punctuation: /\*\*?|``?|\|/,
      },
    },
  ],

  link: [
    {
      pattern: /\[[^\[\]]+\]_(?=[\s\-.,:;!?\\\/'")\]}]|$)/,
      alias: 'string',
      inside: {
        punctuation: /^\[|\]_$/,
      },
    },
    {
      pattern:
        /(?:\b[a-z\d]+(?:[_.:+][a-z\d]+)*_?_|`[^`]+`_?_|_`[^`]+`)(?=[\s\-.,:;!?\\\/'")\]}]|$)/i,
      alias: 'string',
      inside: {
        punctuation: /^_?`|`$|`?_?_$/,
      },
    },
  ],

  // Line block start,
  // quote attribution,
  // explicit markup start,
  // and anonymous hyperlink target shortcut (__)
  punctuation: {
    pattern: /(^[\t ]*)(?:\|(?= |$)|(?:---?|—|\.\.|__)(?= )|\.\.$)/m,
    lookbehind: true,
  },
};
>57</a>
<a id='n58' href='#n58'>58</a>
<a id='n59' href='#n59'>59</a>
<a id='n60' href='#n60'>60</a>
<a id='n61' href='#n61'>61</a>
<a id='n62' href='#n62'>62</a>
<a id='n63' href='#n63'>63</a>
<a id='n64' href='#n64'>64</a>
<a id='n65' href='#n65'>65</a>
<a id='n66' href='#n66'>66</a>
<a id='n67' href='#n67'>67</a>
<a id='n68' href='#n68'>68</a>
<a id='n69' href='#n69'>69</a>
<a id='n70' href='#n70'>70</a>
<a id='n71' href='#n71'>71</a>
<a id='n72' href='#n72'>72</a>
<a id='n73' href='#n73'>73</a>
<a id='n74' href='#n74'>74</a>
<a id='n75' href='#n75'>75</a>
<a id='n76' href='#n76'>76</a>
<a id='n77' href='#n77'>77</a>
<a id='n78' href='#n78'>78</a>
<a id='n79' href='#n79'>79</a>
<a id='n80' href='#n80'>80</a>
<a id='n81' href='#n81'>81</a>
<a id='n82' href='#n82'>82</a>
<a id='n83' href='#n83'>83</a>
<a id='n84' href='#n84'>84</a>
<a id='n85' href='#n85'>85</a>
<a id='n86' href='#n86'>86</a>
<a id='n87' href='#n87'>87</a>
<a id='n88' href='#n88'>88</a>
<a id='n89' href='#n89'>89</a>
<a id='n90' href='#n90'>90</a>
<a id='n91' href='#n91'>91</a>
<a id='n92' href='#n92'>92</a>
<a id='n93' href='#n93'>93</a>
<a id='n94' href='#n94'>94</a>
<a id='n95' href='#n95'>95</a>
<a id='n96' href='#n96'>96</a>
<a id='n97' href='#n97'>97</a>
<a id='n98' href='#n98'>98</a>
<a id='n99' href='#n99'>99</a>
<a id='n100' href='#n100'>100</a>
<a id='n101' href='#n101'>101</a>
<a id='n102' href='#n102'>102</a>
<a id='n103' href='#n103'>103</a>
<a id='n104' href='#n104'>104</a>
<a id='n105' href='#n105'>105</a>
<a id='n106' href='#n106'>106</a>
<a id='n107' href='#n107'>107</a>
<a id='n108' href='#n108'>108</a>
<a id='n109' href='#n109'>109</a>
<a id='n110' href='#n110'>110</a>
<a id='n111' href='#n111'>111</a>
<a id='n112' href='#n112'>112</a>
<a id='n113' href='#n113'>113</a>
<a id='n114' href='#n114'>114</a>
<a id='n115' href='#n115'>115</a>
</pre></td>
<td class='lines'><pre><code><style>pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */</style><div class="highlight"><pre><span></span>import {
  type ForwardedRef,
  type ReactNode,
  forwardRef,
  type CSSProperties,
} from &#39;react&#39;;
import type { Spacing } from &#39;../../../types&#39;;
import { List, type ListProps } from &#39;../../atoms&#39;;
import styles from &#39;./grid.module.scss&#39;;

export type GridProps&lt;T extends boolean&gt; = Omit&lt;
  ListProps&lt;T, false&gt;,
  &#39;children&#39; | &#39;hideMarker&#39; | &#39;isHierarchical&#39; | &#39;isInline&#39; | &#39;spacing&#39;
&gt; &amp; {
  /**
   * How the items should be aligned?
   *
   * @default undefined // The default behavior is `stretch`.
   */
  alignItems?: &#39;center&#39; | &#39;end&#39; | &#39;start&#39;;
  /**
   * The grid items.
   */
  children: ReactNode;
  /**
   * Control the number of column.
   *
   * @default &#39;auto-fit&#39;
   */
  col?: number | &#39;auto-fill&#39; | &#39;auto-fit&#39;;
  /**
   * The gap between the items.
   *
   * @default null
   */
  gap?: Spacing | null;
  /**
   * Should the grid be centered?
   *
   * @default false
   */
  isCentered?: boolean;
  /**
   * Define a fixed size for each item.
   *
   * You should either use `size` or `sizeMax`/`sizeMin` not both.
   *
   * @default undefined
   */
  size?: string;
  /**
   * Define the maximal size of each item.
   *
   * You should either use `size` or `sizeMax`/`sizeMin` not both.
   *
   * @default &#39;1fr&#39;
   */
  sizeMax?: string;
  /**
   * Define the maximal size of each item.
   *
   * You should either use `size` or `sizeMax`/`sizeMin` not both.
   *
   * @default 0
   */
  sizeMin?: 0 | string;
};

const GridWithRef = &lt;T extends boolean&gt;(
  {
    alignItems,
    children,
    className = &#39;&#39;,
    col = &#39;auto-fit&#39;,
    gap,
    isCentered = false,
    size,
    sizeMax,
    sizeMin,
    style,
    ...props
  }: GridProps&lt;T&gt;,
  ref?: ForwardedRef&lt;T extends true ? HTMLOListElement : HTMLUListElement&gt;
) =&gt; {
  const gridClass = [
    styles.wrapper,
    styles[alignItems ? `wrapper--align-items-${alignItems}` : &#39;&#39;],
    styles[isCentered ? &#39;wrapper--is-centered&#39; : &#39;&#39;],
    styles[size ? &#39;wrapper--has-fixed-size&#39; : &#39;&#39;],
    styles[sizeMin ? &#39;wrapper--has-min-size&#39; : &#39;&#39;],
    className,
  ].join(&#39; &#39;);
  const gridStyles = {
    ...style,
    &#39;--col&#39;: col,
    ...(size ? { &#39;--size&#39;: size } : {}),
    ...(sizeMax ? { &#39;--size-max&#39;: sizeMax } : {}),
    ...(sizeMin ? { &#39;--size-min&#39;: sizeMin } : {}),
    ...(gap ? { &#39;--gap&#39;: `var(--spacing-${gap})` } : {}),
  } as CSSProperties;

  return (
    &lt;List
      {...props}
      className={gridClass}
      hideMarker
      ref={ref}
      style={gridStyles}
    &gt;
      {children}
    &lt;/List&gt;
  );
};

export const Grid = forwardRef(GridWithRef);
</pre></div>
</code></pre></td></tr></table>
</div> <!-- class=content -->
<div class='footer'>generated by <a href='https://git.zx2c4.com/cgit/about/'>cgit v1.2.3</a> (<a href='https://git-scm.com/'>git 2.39.1</a>) at 2025-10-27 11:34:35 +0000</div>
</div> <!-- id=cgit -->
</body>
</html>
