@ai-matrx/design-system 0.86.331 → 0.86.333

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/dist/auth-gate-dialog.js +4 -4
  3. package/dist/carousel.js +18 -18
  4. package/dist/{chunk-MVGMI6UZ.js → chunk-3MQMVPKO.js} +5 -5
  5. package/dist/{chunk-TBDMTCRW.js → chunk-6YZMGSQY.js} +10 -10
  6. package/dist/{chunk-OFJ5LGBU.js → chunk-7NEVJKDZ.js} +8 -8
  7. package/dist/{chunk-XTNAKJSH.js → chunk-B3LDW3IQ.js} +2 -2
  8. package/dist/{chunk-VTJWQPYR.js → chunk-BM2YYBUO.js} +5 -5
  9. package/dist/{chunk-FTZCPGTH.js → chunk-CFCWQDGC.js} +4 -4
  10. package/dist/{chunk-CN7C4KQB.js → chunk-CH2NWSES.js} +2 -2
  11. package/dist/{chunk-CJCUD62M.js → chunk-CSSD6NS4.js} +5 -5
  12. package/dist/{chunk-W3QSRJ3O.js → chunk-E4GS5QH7.js} +7 -7
  13. package/dist/{chunk-O4KANICE.js → chunk-FRJ4PPA2.js} +5 -5
  14. package/dist/{chunk-4PCLJAW2.js → chunk-FXT7PZAF.js} +5 -14
  15. package/dist/chunk-FXT7PZAF.js.map +1 -0
  16. package/dist/{chunk-D45XDOJS.js → chunk-GHPUO3O7.js} +2 -2
  17. package/dist/{chunk-RPUC5MNH.js → chunk-GLZJ7WZK.js} +3 -3
  18. package/dist/{chunk-VKWQTSB6.js → chunk-HEFTQUJ5.js} +6 -6
  19. package/dist/{chunk-KWBYKUKP.js → chunk-J6637L6D.js} +4 -4
  20. package/dist/chunk-KGW373MK.js +21 -0
  21. package/dist/chunk-KGW373MK.js.map +1 -0
  22. package/dist/{chunk-5LT34PFX.js → chunk-MEJVHDYJ.js} +18 -18
  23. package/dist/{chunk-PPB52S7F.js → chunk-MFUNGDHO.js} +7 -7
  24. package/dist/{chunk-LCPHFONA.js → chunk-MIJMP4WI.js} +5 -5
  25. package/dist/{chunk-2WL2SGKL.js → chunk-NNETFHGX.js} +8 -8
  26. package/dist/{chunk-XREKZXAL.js → chunk-SMJGESH7.js} +6 -6
  27. package/dist/{chunk-SNHCBHBE.js → chunk-U24MOJWK.js} +4 -4
  28. package/dist/{chunk-DO6G4EKJ.js → chunk-UWTODOMD.js} +2 -2
  29. package/dist/{chunk-BQR4N24F.js → chunk-VLLUUOYJ.js} +4 -4
  30. package/dist/{chunk-FD6V6JBN.js → chunk-VV6WZTH5.js} +8 -8
  31. package/dist/{chunk-LVM7XZRJ.js → chunk-WQ2QCMMA.js} +4 -4
  32. package/dist/{chunk-57OD2WTY.js → chunk-X6ZRHJQP.js} +6 -6
  33. package/dist/{chunk-PLFWDUJW.js → chunk-XEXSZBXV.js} +3 -3
  34. package/dist/{chunk-JSXNITMG.js → chunk-YC5GAO35.js} +2 -2
  35. package/dist/{chunk-5TF2AFDM.js → chunk-ZCRPESQX.js} +4 -4
  36. package/dist/{chunk-5IKQ6RU4.js → chunk-ZOQ2XKXF.js} +9 -9
  37. package/dist/clipboard-fallback-dialog.js +10 -10
  38. package/dist/controls.js +15 -15
  39. package/dist/data-table/data-row-inspector.js +15 -14
  40. package/dist/data-table/data-row-window.js +20 -19
  41. package/dist/data-table/index.cjs +16 -12
  42. package/dist/data-table/index.cjs.map +1 -1
  43. package/dist/data-table/index.js +37 -36
  44. package/dist/data-table/index.js.map +1 -1
  45. package/dist/data-table/layered-filter-builder.js +4 -4
  46. package/dist/data-table/pagination.js +8 -8
  47. package/dist/data-table/uuid-cell.js +8 -8
  48. package/dist/desktop.js +22 -22
  49. package/dist/email-input-dialog.js +7 -7
  50. package/dist/index.cjs +16 -12
  51. package/dist/index.cjs.map +1 -1
  52. package/dist/index.d.cts +5 -7
  53. package/dist/index.d.ts +5 -7
  54. package/dist/index.js +88 -86
  55. package/dist/index.js.map +1 -1
  56. package/dist/intro-stage.js +3 -3
  57. package/dist/item.js +15 -15
  58. package/dist/lite-table.js +10 -10
  59. package/dist/menu-look.js +3 -3
  60. package/dist/record-list.js +13 -13
  61. package/dist/sandbox-gate-dialog.js +8 -8
  62. package/dist/scope-mismatch-dialog.js +7 -7
  63. package/dist/settings.cjs +16 -12
  64. package/dist/settings.cjs.map +1 -1
  65. package/dist/settings.js +20 -19
  66. package/dist/settings.js.map +1 -1
  67. package/dist/site-icon.js +2 -2
  68. package/dist/swipe-deck.js +1 -1
  69. package/dist/tap-shortcut.cjs +40 -0
  70. package/dist/tap-shortcut.cjs.map +1 -0
  71. package/dist/tap-shortcut.d.cts +13 -0
  72. package/dist/tap-shortcut.d.ts +13 -0
  73. package/dist/tap-shortcut.js +10 -0
  74. package/dist/tap-shortcut.js.map +1 -0
  75. package/dist/tap-target/ai-buttons.cjs +16 -12
  76. package/dist/tap-target/ai-buttons.cjs.map +1 -1
  77. package/dist/tap-target/ai-buttons.js +4 -3
  78. package/dist/tap-target/ai-buttons.js.map +1 -1
  79. package/dist/tap-target/buttons.cjs +16 -12
  80. package/dist/tap-target/buttons.cjs.map +1 -1
  81. package/dist/tap-target/buttons.d.cts +3 -5
  82. package/dist/tap-target/buttons.d.ts +3 -5
  83. package/dist/tap-target/buttons.js +4 -3
  84. package/dist/tap-target.cjs +16 -12
  85. package/dist/tap-target.cjs.map +1 -1
  86. package/dist/tap-target.d.cts +5 -7
  87. package/dist/tap-target.d.ts +5 -7
  88. package/dist/tap-target.js +6 -4
  89. package/dist/text-input-dialog.js +10 -10
  90. package/dist/thumbnail-grid.js +2 -2
  91. package/dist/transcript-scroll-nav.cjs +16 -12
  92. package/dist/transcript-scroll-nav.cjs.map +1 -1
  93. package/dist/transcript-scroll-nav.js +2 -1
  94. package/dist/transcript-scroll-nav.js.map +1 -1
  95. package/dist/value-prompts-dialog.js +5 -5
  96. package/dist/writing-field.cjs +16 -12
  97. package/dist/writing-field.cjs.map +1 -1
  98. package/dist/writing-field.js +21 -20
  99. package/dist/writing-field.js.map +1 -1
  100. package/package.json +12 -37
  101. package/dist/chunk-4PCLJAW2.js.map +0 -1
  102. /package/dist/{chunk-MVGMI6UZ.js.map → chunk-3MQMVPKO.js.map} +0 -0
  103. /package/dist/{chunk-TBDMTCRW.js.map → chunk-6YZMGSQY.js.map} +0 -0
  104. /package/dist/{chunk-OFJ5LGBU.js.map → chunk-7NEVJKDZ.js.map} +0 -0
  105. /package/dist/{chunk-XTNAKJSH.js.map → chunk-B3LDW3IQ.js.map} +0 -0
  106. /package/dist/{chunk-VTJWQPYR.js.map → chunk-BM2YYBUO.js.map} +0 -0
  107. /package/dist/{chunk-FTZCPGTH.js.map → chunk-CFCWQDGC.js.map} +0 -0
  108. /package/dist/{chunk-CN7C4KQB.js.map → chunk-CH2NWSES.js.map} +0 -0
  109. /package/dist/{chunk-CJCUD62M.js.map → chunk-CSSD6NS4.js.map} +0 -0
  110. /package/dist/{chunk-W3QSRJ3O.js.map → chunk-E4GS5QH7.js.map} +0 -0
  111. /package/dist/{chunk-O4KANICE.js.map → chunk-FRJ4PPA2.js.map} +0 -0
  112. /package/dist/{chunk-D45XDOJS.js.map → chunk-GHPUO3O7.js.map} +0 -0
  113. /package/dist/{chunk-RPUC5MNH.js.map → chunk-GLZJ7WZK.js.map} +0 -0
  114. /package/dist/{chunk-VKWQTSB6.js.map → chunk-HEFTQUJ5.js.map} +0 -0
  115. /package/dist/{chunk-KWBYKUKP.js.map → chunk-J6637L6D.js.map} +0 -0
  116. /package/dist/{chunk-5LT34PFX.js.map → chunk-MEJVHDYJ.js.map} +0 -0
  117. /package/dist/{chunk-PPB52S7F.js.map → chunk-MFUNGDHO.js.map} +0 -0
  118. /package/dist/{chunk-LCPHFONA.js.map → chunk-MIJMP4WI.js.map} +0 -0
  119. /package/dist/{chunk-2WL2SGKL.js.map → chunk-NNETFHGX.js.map} +0 -0
  120. /package/dist/{chunk-XREKZXAL.js.map → chunk-SMJGESH7.js.map} +0 -0
  121. /package/dist/{chunk-SNHCBHBE.js.map → chunk-U24MOJWK.js.map} +0 -0
  122. /package/dist/{chunk-DO6G4EKJ.js.map → chunk-UWTODOMD.js.map} +0 -0
  123. /package/dist/{chunk-BQR4N24F.js.map → chunk-VLLUUOYJ.js.map} +0 -0
  124. /package/dist/{chunk-FD6V6JBN.js.map → chunk-VV6WZTH5.js.map} +0 -0
  125. /package/dist/{chunk-LVM7XZRJ.js.map → chunk-WQ2QCMMA.js.map} +0 -0
  126. /package/dist/{chunk-57OD2WTY.js.map → chunk-X6ZRHJQP.js.map} +0 -0
  127. /package/dist/{chunk-PLFWDUJW.js.map → chunk-XEXSZBXV.js.map} +0 -0
  128. /package/dist/{chunk-JSXNITMG.js.map → chunk-YC5GAO35.js.map} +0 -0
  129. /package/dist/{chunk-5TF2AFDM.js.map → chunk-ZCRPESQX.js.map} +0 -0
  130. /package/dist/{chunk-5IKQ6RU4.js.map → chunk-ZOQ2XKXF.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/tap-target/ai-buttons.tsx","../../src/tap-target/tap-target-button.tsx","../../src/tooltip.tsx","../../src/cn.ts","../../src/motion.ts","../../src/portal-container.tsx","../../src/title-tooltips.ts","../../src/tap-target/tap-target-guard.ts","../../src/layout-scale.ts","../../src/tap-target/tap-surface.tsx","../../src/tap-target/tap-features.tsx","../../src/tap-target/link.ts","../../src/tap-target/tap-default-variant.tsx","../../src/tap-target/tap-buttons.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n TapTargetButton,\n TapTargetButtonTransparent,\n TapTargetButtonSolid,\n TapTargetButtonForGroup,\n} from \"./tap-target-button\";\nimport { useTapButtonVariant } from \"./tap-default-variant\";\nimport { RobotTapButton } from \"./tap-buttons\";\nimport type { ComponentType } from \"react\";\n\ntype Variant = \"glass\" | \"transparent\" | \"solid\" | \"group\";\n\nexport interface AITapButtonProps {\n variant?: Variant | undefined;\n onClick?: () => void | undefined;\n as?: \"button\" | \"label\" | undefined;\n htmlFor?: string | undefined;\n ariaLabel?: string | undefined;\n disabled?: boolean | undefined;\n className?: string | undefined;\n strokeWidth?: number | undefined;\n colored?: boolean | undefined;\n bgColor?: string | undefined;\n iconColor?: string | undefined;\n hoverBgColor?: string | undefined;\n activeBgColor?: string | undefined;\n /** Pass `false` to suppress the built-in tooltip (e.g. when a parent already provides one). */\n tooltip?: string | false | undefined;\n tooltipSide?: \"top\" | \"right\" | \"bottom\" | \"left\" | undefined;\n tooltipAlign?: \"start\" | \"center\" | \"end\" | undefined;\n // Link support — see tap-buttons.tsx for full semantics.\n href?: string | undefined;\n target?: \"_blank\" | \"_self\" | \"_parent\" | \"_top\" | undefined;\n rel?: string | undefined;\n prefetch?: boolean | null | undefined;\n /** Inline caption after the icon — see TapTargetButton `label`. */\n label?: string | undefined;\n}\n\nfunction Wrap({\n variant: variantProp,\n children,\n colored: _colored,\n tooltip,\n tooltipSide,\n tooltipAlign,\n ...props\n}: AITapButtonProps & { children: React.ReactNode }) {\n const variant = useTapButtonVariant(variantProp);\n const tooltipProps = { tooltip, tooltipSide, tooltipAlign };\n switch (variant) {\n case \"transparent\":\n return (\n <TapTargetButtonTransparent {...props} {...tooltipProps}>\n {children}\n </TapTargetButtonTransparent>\n );\n case \"solid\":\n return (\n <TapTargetButtonSolid {...props} {...tooltipProps}>\n {children}\n </TapTargetButtonSolid>\n );\n case \"group\":\n return (\n <TapTargetButtonForGroup {...props} {...tooltipProps}>\n {children}\n </TapTargetButtonForGroup>\n );\n default:\n return (\n <TapTargetButton {...props} {...tooltipProps}>\n {children}\n </TapTargetButton>\n );\n }\n}\n\nfunction BrandIcon({\n colored,\n brandColor,\n ariaLabel,\n d,\n ...props\n}: AITapButtonProps & { brandColor: string; d: string }) {\n const isBlack = brandColor === \"#000000\" || brandColor === \"#191919\";\n const fill = colored\n ? isBlack\n ? \"currentColor\"\n : brandColor\n : \"currentColor\";\n return (\n <Wrap ariaLabel={ariaLabel} {...props}>\n <path fill={fill} stroke=\"none\" d={d} />\n </Wrap>\n );\n}\n\n// ---------------------------------------------------------------------------\n// BRAND MODELS (Filled SVGs)\n// ---------------------------------------------------------------------------\n\nexport const OpenAITapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"OpenAI\"\n brandColor=\"#000000\"\n d=\"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z\"\n />\n);\nexport const AnthropicTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Anthropic\"\n brandColor=\"#D97757\"\n d=\"M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5528h3.7442L10.5363 3.5409Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z\"\n />\n);\nexport const ClaudeTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Claude\"\n brandColor=\"#D97757\"\n d=\"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z\"\n />\n);\n\n// Google: multicolor when colored, currentColor when not\nexport function GoogleTapButton({ colored, ...props }: AITapButtonProps) {\n if (!colored) {\n return (\n <BrandIcon\n {...props}\n colored={false}\n ariaLabel=\"Google\"\n brandColor=\"#000000\"\n d=\"M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z\"\n />\n );\n }\n return (\n <Wrap ariaLabel=\"Google\" {...props}>\n <path\n fill=\"#4285F4\"\n stroke=\"none\"\n d=\"M23.693 12.267c0-.76-.053-1.467-.173-2.053H12.48v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133l2.84 2.2c1.653-1.52 2.613-3.76 2.613-6.427l-.293-1.133z\"\n />\n <path\n fill=\"#34A853\"\n stroke=\"none\"\n d=\"M12.48 24c3.573 0 6.267-1.173 8.373-3.36l-2.84-2.2c-1.147.853-2.613 1.36-5.533 1.36-4.253 0-7.867-2.88-9.147-6.747l-2.933 2.267C2.587 20.147 7.227 24 12.48 24z\"\n />\n <path\n fill=\"#FBBC05\"\n stroke=\"none\"\n d=\"M3.333 13.053A11.98 11.98 0 0 1 2.707 9.96l-2.4 1.853a19.91 19.91 0 0 0 0 8.374l2.933-2.267a7.156 7.156 0 0 1-.24-2.12l.333-2.747z\"\n />\n <path\n fill=\"#EA4335\"\n stroke=\"none\"\n d=\"M12.48 3.28c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 7.227 0 2.587 3.853.307 8.68l2.933 2.267c1.28-3.867 4.893-7.667 9.24-7.667z\"\n />\n </Wrap>\n );\n}\n\n// Gemini: updated brand blue\nexport const GeminiTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Gemini\"\n brandColor=\"#4285F4\"\n d=\"M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81\"\n />\n);\nexport const MetaTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Meta\"\n brandColor=\"#0467DF\"\n d=\"M6.915 4.03c-1.968 0-3.683 1.28-4.871 3.113C.704 9.208 0 11.883 0 14.449c0 .706.07 1.369.21 1.973a6.624 6.624 0 0 0 .265.86 5.297 5.297 0 0 0 .371.761c.696 1.159 1.818 1.927 3.593 1.927 1.497 0 2.633-.671 3.965-2.444.76-1.012 1.144-1.626 2.663-4.32l.756-1.339.186-.325c.061.1.121.196.183.3l2.152 3.595c.724 1.21 1.665 2.556 2.47 3.314 1.046.987 1.992 1.22 3.06 1.22 1.075 0 1.876-.355 2.455-.843a3.743 3.743 0 0 0 .81-.973c.542-.939.861-2.127.861-3.745 0-2.72-.681-5.357-2.084-7.45-1.282-1.912-2.957-2.93-4.716-2.93-1.047 0-2.088.467-3.053 1.308-.652.57-1.257 1.29-1.82 2.05-.69-.875-1.335-1.547-1.958-2.056-1.182-.966-2.315-1.303-3.454-1.303zm10.16 2.053c1.147 0 2.188.758 2.992 1.999 1.132 1.748 1.647 4.195 1.647 6.4 0 1.548-.368 2.9-1.839 2.9-.58 0-1.027-.23-1.664-1.004-.496-.601-1.343-1.878-2.832-4.358l-.617-1.028a44.908 44.908 0 0 0-1.255-1.98c.07-.109.141-.224.211-.327 1.12-1.667 2.118-2.602 3.358-2.602zm-10.201.553c1.265 0 2.058.791 2.675 1.446.307.327.737.871 1.234 1.579l-1.02 1.566c-.757 1.163-1.882 3.017-2.837 4.338-1.191 1.649-1.81 1.817-2.486 1.817-.524 0-1.038-.237-1.383-.794-.263-.426-.464-1.13-.464-2.046 0-2.221.63-4.535 1.66-6.088.454-.687.964-1.226 1.533-1.533a2.264 2.264 0 0 1 1.088-.285z\"\n />\n);\n\n// X (Twitter) logo — was named XaiTapButton but is the X/Twitter mark\nexport const XTweetTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"X\"\n brandColor=\"#000000\"\n d=\"M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z\"\n />\n);\n\n// xAI brand logo (stylized ξ mark)\nexport function XaiTapButton({ colored, ...props }: AITapButtonProps) {\n const fill = colored ? \"currentColor\" : \"currentColor\";\n return (\n <Wrap ariaLabel=\"xAI\" {...props}>\n <g transform=\"translate(0.5,1) scale(0.034)\">\n <path\n fill={fill}\n stroke=\"none\"\n d=\"M557.09 211.99l8.31 326.37h66.56l8.32-445.18z\"\n />\n <path\n fill={fill}\n stroke=\"none\"\n d=\"M640.28 56.91H538.72L379.35 284.53l50.78 72.52z\"\n />\n <path\n fill={fill}\n stroke=\"none\"\n d=\"M201.61 538.36h101.56l50.79-72.52-50.79-72.53z\"\n />\n <path\n fill={fill}\n stroke=\"none\"\n d=\"M201.61 211.99l228.52 326.37h101.56L303.17 211.99z\"\n />\n </g>\n </Wrap>\n );\n}\n\nexport const MistralTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Mistral\"\n brandColor=\"#FA520F\"\n d=\"M17.143 3.429v3.428h-3.429v3.429h-3.428V6.857H6.857V3.43H3.43v13.714H0v3.428h10.286v-3.428H6.857v-3.429h3.429v3.429h3.429v-3.429h3.428v3.429h-3.428v3.428H24v-3.428h-3.43V3.429z\"\n />\n);\nexport const PerplexityTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Perplexity\"\n brandColor=\"#1FB8CD\"\n d=\"M22.3977 7.0896h-2.3106V.0676l-7.5094 6.3542V.1577h-1.1554v6.1966L4.4904 0v7.0896H1.6023v10.3976h2.8882V24l6.932-6.3591v6.2005h1.1554v-6.0469l6.9318 6.1807v-6.4879h2.8882V7.0896zm-3.4657-4.531v4.531h-5.355l5.355-4.531zm-13.2862.0676 4.8691 4.4634H5.6458V2.6262zM2.7576 16.332V8.245h7.8476l-6.1149 6.1147v1.9723H2.7576zm2.8882 5.0404v-3.8852h.0001v-2.6488l5.7763-5.7764v7.0111l-5.7764 5.2993zm12.7086.0248-5.7766-5.1509V9.0618l5.7766 5.7766v6.5588zm2.8882-5.0652h-1.733v-1.9723L13.3948 8.245h7.8478v8.087z\"\n />\n);\nexport const HuggingFaceTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Hugging Face\"\n brandColor=\"#FFD21E\"\n d=\"M12.025 1.13c-5.77 0-10.449 4.647-10.449 10.378 0 1.112.178 2.181.503 3.185.064-.222.203-.444.416-.577a.96.96 0 0 1 .524-.15c.293 0 .584.124.84.284.278.173.48.408.71.694.226.282.458.611.684.951v-.014c.017-.324.106-.622.264-.874s.403-.487.762-.543c.3-.047.596.06.787.203s.31.313.4.467c.15.257.212.468.233.542.01.026.653 1.552 1.657 2.54.616.605 1.01 1.223 1.082 1.912.055.537-.096 1.059-.38 1.572.637.121 1.294.187 1.967.187.657 0 1.298-.063 1.921-.178-.287-.517-.44-1.041-.384-1.581.07-.69.465-1.307 1.081-1.913 1.004-.987 1.647-2.513 1.657-2.539.021-.074.083-.285.233-.542.09-.154.208-.323.4-.467a1.08 1.08 0 0 1 .787-.203c.359.056.604.29.762.543s.247.55.265.874v.015c.225-.34.457-.67.683-.952.23-.286.432-.52.71-.694.257-.16.547-.284.84-.285a.97.97 0 0 1 .524.151c.228.143.373.388.43.625l.006.04a10.3 10.3 0 0 0 .534-3.273c0-5.731-4.678-10.378-10.449-10.378M8.327 6.583a1.5 1.5 0 0 1 .713.174 1.487 1.487 0 0 1 .617 2.013c-.183.343-.762-.214-1.102-.094-.38.134-.532.914-.917.71a1.487 1.487 0 0 1 .69-2.803m7.486 0a1.487 1.487 0 0 1 .689 2.803c-.385.204-.536-.576-.916-.71-.34-.12-.92.437-1.103.094a1.487 1.487 0 0 1 .617-2.013 1.5 1.5 0 0 1 .713-.174m-10.68 1.55a.96.96 0 1 1 0 1.921.96.96 0 0 1 0-1.92m13.838 0a.96.96 0 1 1 0 1.92.96.96 0 0 1 0-1.92M8.489 11.458c.588.01 1.965 1.157 3.572 1.164 1.607-.007 2.984-1.155 3.572-1.164.196-.003.305.12.305.454 0 .886-.424 2.328-1.563 3.202-.22-.756-1.396-1.366-1.63-1.32q-.011.001-.02.006l-.044.026-.01.008-.03.024q-.018.017-.035.036l-.032.04a1 1 0 0 0-.058.09l-.014.025q-.049.088-.11.19a1 1 0 0 1-.083.116 1.2 1.2 0 0 1-.173.18q-.035.029-.075.058a1.3 1.3 0 0 1-.251-.243 1 1 0 0 1-.076-.107c-.124-.193-.177-.363-.337-.444-.034-.016-.104-.008-.2.022q-.094.03-.216.087-.06.028-.125.063l-.13.074q-.067.04-.136.086a3 3 0 0 0-.135.096 3 3 0 0 0-.26.219 2 2 0 0 0-.12.121 2 2 0 0 0-.106.128l-.002.002a2 2 0 0 0-.09.132l-.001.001a1.2 1.2 0 0 0-.105.212q-.013.036-.024.073c-1.139-.875-1.563-2.317-1.563-3.203 0-.334.109-.457.305-.454m.836 10.354c.824-1.19.766-2.082-.365-3.194-1.13-1.112-1.789-2.738-1.789-2.738s-.246-.945-.806-.858-.97 1.499.202 2.362c1.173.864-.233 1.45-.685.64-.45-.812-1.683-2.896-2.322-3.295s-1.089-.175-.938.647 2.822 2.813 2.562 3.244-1.176-.506-1.176-.506-2.866-2.567-3.49-1.898.473 1.23 2.037 2.16c1.564.932 1.686 1.178 1.464 1.53s-3.675-2.511-4-1.297c-.323 1.214 3.524 1.567 3.287 2.405-.238.839-2.71-1.587-3.216-.642-.506.946 3.49 2.056 3.522 2.064 1.29.33 4.568 1.028 5.713-.624m5.349 0c-.824-1.19-.766-2.082.365-3.194 1.13-1.112 1.789-2.738 1.789-2.738s.246-.945.806-.858.97 1.499-.202 2.362c-1.173.864.233 1.45.685.64.451-.812 1.683-2.896 2.322-3.295s1.089-.175.938.647-2.822 2.813-2.562 3.244 1.176-.506 1.176-.506 2.866-2.567 3.49-1.898-.473 1.23-2.037 2.16c-1.564.932-1.686 1.178-1.464 1.53s3.675-2.511 4-1.297c.323 1.214-3.524 1.567-3.287 2.405.238.839 2.71-1.587 3.216-.642.506.946-3.49 2.056-3.522 2.064-1.29.33-4.568 1.028-5.713-.624\"\n />\n);\nexport const ElevenLabsTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"ElevenLabs\"\n brandColor=\"#000000\"\n d=\"M4.6035 0v24h4.9317V0zm9.8613 0v24h4.9317V0z\"\n />\n);\nexport const ReplicateTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Replicate\"\n brandColor=\"#000000\"\n d=\"M24 10.262v2.712h-9.518V24h-3.034V10.262zm0-5.131v2.717H8.755V24H5.722V5.131zM24 0v2.717H3.034V24H0V0z\"\n />\n);\n\n// ---------------------------------------------------------------------------\nexport const LlamaTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Llama\"\n brandColor=\"#000000\"\n d=\"M16.361 10.26a.894.894 0 0 0-.558.47l-.072.148.001.207c0 .193.004.217.059.353.076.193.152.312.291.448.24.238.51.3.872.205a.86.86 0 0 0 .517-.436.752.752 0 0 0 .08-.498c-.064-.453-.33-.782-.724-.897a1.06 1.06 0 0 0-.466 0zm-9.203.005c-.305.096-.533.32-.65.639a1.187 1.187 0 0 0-.06.52c.057.309.31.59.598.667.362.095.632.033.872-.205.14-.136.215-.255.291-.448.055-.136.059-.16.059-.353l.001-.207-.072-.148a.894.894 0 0 0-.565-.472 1.02 1.02 0 0 0-.474.007Zm4.184 2c-.131.071-.223.25-.195.383.031.143.157.288.353.407.105.063.112.072.117.136.004.038-.01.146-.029.243-.02.094-.036.194-.036.222.002.074.07.195.143.253.064.052.076.054.255.059.164.005.198.001.264-.03.169-.082.212-.234.15-.525-.052-.243-.042-.28.087-.355.137-.08.281-.219.324-.314a.365.365 0 0 0-.175-.48.394.394 0 0 0-.181-.033c-.126 0-.207.03-.355.124l-.085.053-.053-.032c-.219-.13-.259-.145-.391-.143a.396.396 0 0 0-.193.032zm.39-2.195c-.373.036-.475.05-.654.086-.291.06-.68.195-.951.328-.94.46-1.589 1.226-1.787 2.114-.04.176-.045.234-.045.53 0 .294.005.357.043.524.264 1.16 1.332 2.017 2.714 2.173.3.033 1.596.033 1.896 0 1.11-.125 2.064-.727 2.493-1.571.114-.226.169-.372.22-.602.039-.167.044-.23.044-.523 0-.297-.005-.355-.045-.531-.288-1.29-1.539-2.304-3.072-2.497a6.873 6.873 0 0 0-.855-.031zm.645.937a3.283 3.283 0 0 1 1.44.514c.223.148.537.458.671.662.166.251.26.508.303.82.02.143.01.251-.043.482-.08.345-.332.705-.672.957a3.115 3.115 0 0 1-.689.348c-.382.122-.632.144-1.525.138-.582-.006-.686-.01-.853-.042-.57-.107-1.022-.334-1.35-.68-.264-.28-.385-.535-.45-.946-.03-.192.025-.509.137-.776.136-.326.488-.73.836-.963.403-.269.934-.46 1.422-.512.187-.02.586-.02.773-.002zm-5.503-11a1.653 1.653 0 0 0-.683.298C5.617.74 5.173 1.666 4.985 2.819c-.07.436-.119 1.04-.119 1.503 0 .544.064 1.24.155 1.721.02.107.031.202.023.208a8.12 8.12 0 0 1-.187.152 5.324 5.324 0 0 0-.949 1.02 5.49 5.49 0 0 0-.94 2.339 6.625 6.625 0 0 0-.023 1.357c.091.78.325 1.438.727 2.04l.13.195-.037.064c-.269.452-.498 1.105-.605 1.732-.084.496-.095.629-.095 1.294 0 .67.009.803.088 1.266.095.555.288 1.143.503 1.534.071.128.243.393.264.407.007.003-.014.067-.046.141a7.405 7.405 0 0 0-.548 1.873c-.062.417-.071.552-.071.991 0 .56.031.832.148 1.279L3.42 24h1.478l-.05-.091c-.297-.552-.325-1.575-.068-2.597.117-.472.25-.819.498-1.296l.148-.29v-.177c0-.165-.003-.184-.057-.293a.915.915 0 0 0-.194-.25 1.74 1.74 0 0 1-.385-.543c-.424-.92-.506-2.286-.208-3.451.124-.486.329-.918.544-1.154a.787.787 0 0 0 .223-.531c0-.195-.07-.355-.224-.522a3.136 3.136 0 0 1-.817-1.729c-.14-.96.114-2.005.69-2.834.563-.814 1.353-1.336 2.237-1.475.199-.033.57-.028.776.01.226.04.367.028.512-.041.179-.085.268-.19.374-.431.093-.215.165-.333.36-.576.234-.29.46-.489.822-.729.413-.27.884-.467 1.352-.561.17-.035.25-.04.569-.04.319 0 .398.005.569.04a4.07 4.07 0 0 1 1.914.997c.117.109.398.457.488.602.034.057.095.177.132.267.105.241.195.346.374.43.14.068.286.082.503.045.343-.058.607-.053.943.016 1.144.23 2.14 1.173 2.581 2.437.385 1.108.276 2.267-.296 3.153-.097.15-.193.27-.333.419-.301.322-.301.722-.001 1.053.493.539.801 1.866.708 3.036-.062.772-.26 1.463-.533 1.854a2.096 2.096 0 0 1-.224.258.916.916 0 0 0-.194.25c-.054.109-.057.128-.057.293v.178l.148.29c.248.476.38.823.498 1.295.253 1.008.231 2.01-.059 2.581a.845.845 0 0 0-.044.098c0 .006.329.009.732.009h.73l.02-.074.036-.134c.019-.076.057-.3.088-.516.029-.217.029-1.016 0-1.258-.11-.875-.295-1.57-.597-2.226-.032-.074-.053-.138-.046-.141.008-.005.057-.074.108-.152.376-.569.607-1.284.724-2.228.031-.26.031-1.378 0-1.628-.083-.645-.182-1.082-.348-1.525a6.083 6.083 0 0 0-.329-.7l-.038-.064.131-.194c.402-.604.636-1.262.727-2.04a6.625 6.625 0 0 0-.024-1.358 5.512 5.512 0 0 0-.939-2.339 5.325 5.325 0 0 0-.95-1.02 8.097 8.097 0 0 1-.186-.152.692.692 0 0 1 .023-.208c.208-1.087.201-2.443-.017-3.503-.19-.924-.535-1.658-.98-2.082-.354-.338-.716-.482-1.15-.455-.996.059-1.8 1.205-2.116 3.01a6.805 6.805 0 0 0-.097.726c0 .036-.007.066-.015.066a.96.96 0 0 1-.149-.078A4.857 4.857 0 0 0 12 3.03c-.832 0-1.687.243-2.456.698a.958.958 0 0 1-.148.078c-.008 0-.015-.03-.015-.066a6.71 6.71 0 0 0-.097-.725C8.997 1.392 8.337.319 7.46.048a2.096 2.096 0 0 0-.585-.041Zm.293 1.402c.248.197.523.759.682 1.388.03.113.06.244.069.292.007.047.026.152.041.233.067.365.098.76.102 1.24l.002.475-.12.175-.118.178h-.278c-.324 0-.646.041-.954.124l-.238.06c-.033.007-.038-.003-.057-.144a8.438 8.438 0 0 1 .016-2.323c.124-.788.413-1.501.696-1.711.067-.05.079-.049.157.013zm9.825-.012c.17.126.358.46.498.888.28.854.36 2.028.212 3.145-.019.14-.024.151-.057.144l-.238-.06a3.693 3.693 0 0 0-.954-.124h-.278l-.119-.178-.119-.175.002-.474c.004-.669.066-1.19.214-1.772.157-.623.434-1.185.68-1.382.078-.062.09-.063.159-.012z\"\n />\n);\n\n// Flux: fixed dark mode — was hardcoding #000 when colored\nexport function FluxTapButton({ colored, ...props }: AITapButtonProps) {\n return (\n <Wrap ariaLabel=\"Flux\" {...props}>\n <path\n fill=\"currentColor\"\n stroke=\"none\"\n transform=\"scale(0.046)\"\n d=\"M365.077 218.624H310.613L256.149 141.483L86.272 381.909H140.843L256.149 218.624H310.592L195.307 381.888H250.027L365.056 218.624L512 426.667H426.027V382.059L365.077 295.787L304.448 381.909V426.667H8.71931e-06L256.171 64L365.077 218.624Z\"\n />\n </Wrap>\n );\n}\n\n// Grok: fixed dark mode — was hardcoding #000 when colored\nexport function GrokTapButton({ colored, ...props }: AITapButtonProps) {\n return (\n <Wrap ariaLabel=\"Grok\" {...props}>\n <g transform=\"scale(0.7)\">\n <path\n fill=\"currentColor\"\n stroke=\"none\"\n d=\"M13.2371 21.0407L24.3186 12.8506C24.8619 12.4491 25.6384 12.6057 25.8973 13.2294C27.2597 16.5185 26.651 20.4712 23.9403 23.1851C21.2297 25.8989 17.4581 26.4941 14.0108 25.1386L10.2449 26.8843C15.6463 30.5806 22.2053 29.6665 26.304 25.5601C29.5551 22.3051 30.562 17.8683 29.6205 13.8673L29.629 13.8758C28.2637 7.99809 29.9647 5.64871 33.449 0.844576C33.5314 0.730667 33.6139 0.616757 33.6964 0.5L29.1113 5.09055V5.07631L13.2343 21.0436\"\n />\n <path\n fill=\"currentColor\"\n stroke=\"none\"\n d=\"M10.9503 23.0313C7.07343 19.3235 7.74185 13.5853 11.0498 10.2763C13.4959 7.82722 17.5036 6.82767 21.0021 8.2971L24.7595 6.55998C24.0826 6.07017 23.215 5.54334 22.2195 5.17313C17.7198 3.31926 12.3326 4.24192 8.67479 7.90126C5.15635 11.4239 4.0499 16.8403 5.94992 21.4622C7.36924 24.9165 5.04257 27.3598 2.69884 29.826C1.86829 30.7002 1.0349 31.5745 0.36364 32.5L10.9474 23.0341\"\n />\n </g>\n </Wrap>\n );\n}\n\n// DeepSeek: corrected brand color from #4D6BFE to #3C5DFF\nexport const DeepSeekTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"DeepSeek\"\n brandColor=\"#3C5DFF\"\n d=\"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 0 1-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 0 0-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 0 1-.465.137 9.597 9.597 0 0 0-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 0 0 1.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 0 1 1.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 0 1 .415-.287.302.302 0 0 1 .2.288.306.306 0 0 1-.31.307.303.303 0 0 1-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 0 1-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 0 1 .016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 0 1-.254-.078.253.253 0 0 1-.114-.358c.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z\"\n />\n);\n\nexport const NvidiaTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"NVIDIA\"\n brandColor=\"#76B900\"\n d=\"M8.948 8.798v-1.43a6.7 6.7 0 0 1 .424-.018c3.922-.124 6.493 3.374 6.493 3.374s-2.774 3.851-5.75 3.851c-.398 0-.787-.062-1.158-.185v-4.346c1.528.185 1.837.857 2.747 2.385l2.04-1.714s-1.492-1.952-4-1.952a6.016 6.016 0 0 0-.796.035m0-4.735v2.138l.424-.027c5.45-.185 9.01 4.47 9.01 4.47s-4.08 4.964-8.33 4.964c-.37 0-.733-.035-1.095-.097v1.325c.3.035.61.062.91.062 3.957 0 6.82-2.023 9.593-4.408.459.371 2.34 1.263 2.73 1.652-2.633 2.208-8.772 3.984-12.253 3.984-.335 0-.653-.018-.971-.053v1.864H24V4.063zm0 10.326v1.131c-3.657-.654-4.673-4.46-4.673-4.46s1.758-1.944 4.673-2.262v1.237H8.94c-1.528-.186-2.73 1.245-2.73 1.245s.68 2.412 2.739 3.11M2.456 10.9s2.164-3.197 6.5-3.533V6.201C4.153 6.59 0 10.653 0 10.653s2.35 6.802 8.948 7.42v-1.237c-4.84-.6-6.492-5.936-6.492-5.936z\"\n />\n);\n\n// ---------------------------------------------------------------------------\n// ADDITIONAL MODEL PROVIDERS (LobeHub / official brand SVGs)\n// ---------------------------------------------------------------------------\n\nexport const GroqTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Groq\"\n brandColor=\"#F55036\"\n d=\"M12.036 2c-3.853-.035-7 3-7.036 6.781-.035 3.782 3.055 6.872 6.908 6.907h2.42v-2.566h-2.292c-2.407.028-4.38-1.866-4.408-4.23-.029-2.362 1.901-4.298 4.308-4.326h.1c2.407 0 4.358 1.915 4.365 4.278v6.305c0 2.342-1.944 4.25-4.323 4.279a4.375 4.375 0 01-3.033-1.252l-1.851 1.818A7 7 0 0012.029 22h.092c3.803-.056 6.858-3.083 6.879-6.816v-6.5C18.907 4.963 15.817 2 12.036 2z\"\n />\n);\n\nexport function CerebrasTapButton({ colored, ...props }: AITapButtonProps) {\n const fill = colored ? \"#F15A29\" : \"currentColor\";\n return (\n <Wrap ariaLabel=\"Cerebras\" {...props}>\n <path clipRule=\"evenodd\" fill={fill} fillRule=\"evenodd\" d=\"M14.121 2.701a9.299 9.299 0 000 18.598V22.7c-5.91 0-10.7-4.791-10.7-10.701S8.21 1.299 14.12 1.299V2.7zm4.752 3.677A7.353 7.353 0 109.42 17.643l-.901 1.074a8.754 8.754 0 01-1.08-12.334 8.755 8.755 0 0112.335-1.08l-.901 1.075zm-2.255.844a5.407 5.407 0 00-5.048 9.563l-.656 1.24a6.81 6.81 0 016.358-12.043l-.654 1.24zM14.12 8.539a3.46 3.46 0 100 6.922v1.402a4.863 4.863 0 010-9.726v1.402z\" />\n <path fill={fill} stroke=\"none\" d=\"M15.407 10.836a2.24 2.24 0 00-.51-.409 1.084 1.084 0 00-.544-.152c-.255 0-.483.047-.684.14a1.58 1.58 0 00-.84.912c-.074.203-.11.416-.11.631 0 .218.036.43.11.631a1.594 1.594 0 00.84.913c.2.093.43.14.684.14.216 0 .417-.046.602-.135.188-.09.35-.225.475-.392l.928 1.006c-.14.14-.3.261-.482.363a3.367 3.367 0 01-1.083.38c-.17.026-.317.04-.44.04a3.315 3.315 0 01-1.182-.21 2.825 2.825 0 01-.961-.597 2.816 2.816 0 01-.644-.929 2.987 2.987 0 01-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.278-.261.605-.464.962-.596a3.315 3.315 0 011.182-.21c.355 0 .712.068 1.072.204.361.138.685.36.944.649l-.962.97z\" />\n </Wrap>\n );\n}\n\nexport const MoonshotTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Moonshot AI\"\n brandColor=\"#16191E\"\n d=\"M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z\"\n />\n);\n\nexport const QwenTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Qwen\"\n brandColor=\"#615ced\"\n d=\"M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z\"\n />\n);\n\nexport const IdeogramTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Ideogram\"\n brandColor=\"#000000\"\n d=\"M17.768 1.482a6.4 6.4 0 012.988 3.78c.19.068.377.154.555.257.026.015.05.03.073.047.226.137.436.301.627.49a3.377 3.377 0 01-.105 4.875 3.376 3.376 0 01-.216 5.158l-.037.029.021.032c.39.602.585 1.324.534 2.065l-.009.11a3.377 3.377 0 01-4.658 2.777 3.377 3.377 0 01-5.846.971 4.052 4.052 0 01-1.635.397c-.04.005-.082.008-.125.008h-.897l-.068-.003c-1.116-.067-1.093-1.775.068-1.775h.804l.046-.004.047-.001a2.3 2.3 0 00.079-4.6.735.735 0 01-.08.005H2.808a.889.889 0 010-1.778h7.034l.046-.004.048-.001a2.3 2.3 0 00.509-4.544l-.141-.031a2.188 2.188 0 00-.299-.046.759.759 0 01-.07.003H2.808a.889.889 0 110-1.777h7.035l.046-.004.047-.001a2.3 2.3 0 00.087-4.6.972.972 0 01-.087.004h-.897L8.97 3.32c-1.116-.067-1.093-1.775.068-1.775h.8a.9.9 0 01.097-.005c.402 0 .79.058 1.157.166l.031-.02a6.399 6.399 0 016.645-.203zm-3.737 11.484l-.068.036-.083.051a4.08 4.08 0 01-1.404 2.153 4.07 4.07 0 011.537 3.189 4.06 4.06 0 01-.92 2.579 1.599 1.599 0 002.824-1.322l-.03-.124-.013-.079-.005-.056-.001-.042.001-.058.005-.053.013-.078.018-.072.022-.064.035-.079.005-.01a.869.869 0 01.158-.217l.055-.052.041-.032.05-.035.042-.026.055-.03.073-.03.056-.02.04-.011.078-.016.073-.009.045-.002h.048l.041.002.058.006.056.01.062.015.031.01.049.017.054.023.044.021.053.031.035.023c.06.042.114.09.163.147l.038.046.034.048a1.6 1.6 0 102.4-2.07 3.256 3.256 0 01-.473.007l-.057-.005-.026-.005h-.016a3.376 3.376 0 01-2.985-2.568l-.026-.116a1.6 1.6 0 00-2.285-1.133zm-4.416 4.595a.889.889 0 110 1.777H5.939a.889.889 0 010-1.777h3.676zm9.208-10.503a1.6 1.6 0 00-.797 1.3l-.002.085a.889.889 0 01-.83.887l-.059.002a.889.889 0 01-.887-.83l-.002-.059a1.6 1.6 0 00-2.528-1.301 4.089 4.089 0 01-1.255 1.674 4.083 4.083 0 011.451 2.308 3.374 3.374 0 014.125 2.532l.02.093a1.6 1.6 0 001.395 1.26l.124.01.042.002c.06 0 .12-.003.18-.01l.085-.011.062-.015a1.6 1.6 0 00-.245-3.163l-.079-.002a.887.887 0 01-.683-.32l-.034-.044a.884.884 0 01-.154-.702.889.889 0 01.807-.71l.064-.001a1.6 1.6 0 001.134-2.728 1.6 1.6 0 00-.786-.426l-.102-.019a.856.856 0 01-.076-.016 1.592 1.592 0 00-.97.204zm-9.199 4.08a.889.889 0 010 1.778H.89a.889.889 0 010-1.777h8.735zm-.01-6.432a.889.889 0 110 1.777H5.94a.889.889 0 110-1.777h3.676zm3.297-1.954l-.053.021a4.065 4.065 0 011.126 2.36 3.375 3.375 0 013.151 1.027 3.366 3.366 0 011.695-1 4.621 4.621 0 00-5.919-2.408z\"\n />\n);\n\nexport const RunwayTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Runway\"\n brandColor=\"#000000\"\n d=\"M17.86 22.992c-2.669.245-4.887-2.876-6.597-4.454C10.398 24.759 1 24.177 1 17.86V6.15c0-.921.244-1.861.733-2.65C2.635 1.977 4.383.98 6.15 1h11.71c6.316 0 6.918 9.398.677 10.243l2.97 2.951c3.252 3.064.808 8.929-3.646 8.797zm-1.428-3.721c1.842 1.898 4.774-1.034 2.876-2.876l-5.132-5.132H11.3v2.876l4.436 4.436.696.696zM4.12 17.842c-.037 2.632 4.117 2.632 4.06 0V6.132c.038-1.316-1.353-2.35-2.612-1.955-.057.019-.113.037-.15.056-.79.301-1.335 1.09-1.317 1.936v11.673h.02zm13.74-9.68c2.632.037 2.632-4.098 0-4.06h-6.973c.526 1.109.395 2.857.413 4.06h6.56z\"\n />\n);\n\nexport function TogetherTapButton({ colored, ...props }: AITapButtonProps) {\n if (!colored) {\n return (\n <Wrap ariaLabel=\"Together\" {...props}>\n <path fill=\"currentColor\" stroke=\"none\" d=\"M23.197 4.503A6 6 0 0015 2.307a5.973 5.973 0 00-2.995 4.933l5.996.008v.515h-5.996c.039.937.298 1.87.8 2.74a6 6 0 1010.39-6z\" />\n <path fill=\"currentColor\" stroke=\"none\" d=\"M.805 4.5A6 6 0 003 12.697a5.972 5.972 0 005.77.127L5.779 7.627l.446-.257 2.997 5.192A6 6 0 10.804 4.5z\" />\n <path fill=\"currentColor\" stroke=\"none\" d=\"M12 23.894a6 6 0 005.999-6c0-2.13-1.1-3.996-2.775-5.06l-3.005 5.189-.444-.258 2.997-5.192A6 6 0 1012 23.894z\" />\n </Wrap>\n );\n }\n return (\n <Wrap ariaLabel=\"Together\" {...props}>\n <path fill=\"#EF2CC1\" stroke=\"none\" d=\"M23.197 4.503A6 6 0 0015 2.307a5.973 5.973 0 00-2.995 4.933l5.996.008v.515h-5.996c.039.937.298 1.87.8 2.74a6 6 0 1010.39-6z\" />\n <path fill=\"#CAAEF5\" stroke=\"none\" d=\"M.805 4.5A6 6 0 003 12.697a5.972 5.972 0 005.77.127L5.779 7.627l.446-.257 2.997 5.192A6 6 0 10.804 4.5z\" />\n <path fill=\"#FC4C02\" stroke=\"none\" d=\"M12 23.894a6 6 0 005.999-6c0-2.13-1.1-3.996-2.775-5.06l-3.005 5.189-.444-.258 2.997-5.192A6 6 0 1012 23.894z\" />\n </Wrap>\n );\n}\n\nexport function MicrosoftTapButton({ colored, ...props }: AITapButtonProps) {\n if (!colored) {\n return (\n <Wrap ariaLabel=\"Microsoft\" {...props}>\n <path fill=\"currentColor\" stroke=\"none\" d=\"M11.49 2H2v9.492h9.492V2h-.002z\" />\n <path fill=\"currentColor\" stroke=\"none\" d=\"M22 2h-9.492v9.492H22V2z\" />\n <path fill=\"currentColor\" stroke=\"none\" d=\"M11.49 12.508H2V22h9.492v-9.492h-.002z\" />\n <path fill=\"currentColor\" stroke=\"none\" d=\"M22 12.508h-9.492V22H22v-9.492z\" />\n </Wrap>\n );\n }\n return (\n <Wrap ariaLabel=\"Microsoft\" {...props}>\n <path fill=\"#F25022\" stroke=\"none\" d=\"M11.49 2H2v9.492h9.492V2h-.002z\" />\n <path fill=\"#7FBA00\" stroke=\"none\" d=\"M22 2h-9.492v9.492H22V2z\" />\n <path fill=\"#00A4EF\" stroke=\"none\" d=\"M11.49 12.508H2V22h9.492v-9.492h-.002z\" />\n <path fill=\"#FFB900\" stroke=\"none\" d=\"M22 12.508h-9.492V22H22v-9.492z\" />\n </Wrap>\n );\n}\n\nexport function LumaTapButton({ colored, ...props }: AITapButtonProps) {\n if (!colored) {\n return (\n <Wrap ariaLabel=\"Luma\" {...props}>\n <path fill=\"currentColor\" fillOpacity={0.66} stroke=\"none\" d=\"M12.393 24L2 17.998l10.393-6 10.392 6-10.393 6z\" />\n <path fill=\"currentColor\" fillOpacity={0.66} stroke=\"none\" d=\"M2 5.999L12.393 0v24L2 18V5.999z\" />\n </Wrap>\n );\n }\n return (\n <Wrap ariaLabel=\"Luma\" {...props}>\n <defs>\n <linearGradient id=\"luma-brand-grad\" x1=\"2\" x2=\"22.785\" y1=\"18\" y2=\"18\" gradientUnits=\"userSpaceOnUse\">\n <stop stopColor=\"#004EFF\" />\n <stop offset=\"1\" stopColor=\"#A78DFF\" />\n </linearGradient>\n </defs>\n <path fill=\"#000\" stroke=\"none\" d=\"M2 5.999L12.393 0v24L2 18V5.999z\" />\n <path fill=\"url(#luma-brand-grad)\" stroke=\"none\" d=\"M12.393 24L2 17.998l10.393-6 10.392 6-10.393 6z\" />\n </Wrap>\n );\n}\n\nexport function ByteDanceTapButton({ colored, ...props }: AITapButtonProps) {\n const fill = colored ? \"#325AB4\" : \"currentColor\";\n return (\n <Wrap ariaLabel=\"ByteDance\" {...props}>\n <path fill={fill} stroke=\"none\" d=\"M14.944 18.587l-1.704-.445V10.01l1.824-.462c1-.254 1.84-.461 1.88-.453.032 0 .056 2.235.056 4.972v4.973l-.176-.008c-.104 0-.952-.207-1.88-.446z\" />\n <path fill={fill} stroke=\"none\" d=\"M7 16.542c0-2.736.024-4.98.064-4.98.032-.008.872.2 1.88.454l1.816.461-.016 4.05-.024 4.049-1.632.422c-.896.23-1.736.445-1.856.469L7 21.523v-4.98z\" />\n <path fill={fill} stroke=\"none\" d=\"M19.24 12.477c0-9.03.008-9.515.144-9.475.072.024.784.207 1.576.406.792.207 1.576.405 1.744.445l.296.08-.016 8.56-.024 8.568-1.624.414c-.888.23-1.728.437-1.856.47l-.24.055v-9.523z\" />\n <path fill={fill} stroke=\"none\" d=\"M1 12.509c0-4.678.024-8.505.064-8.505.032 0 .872.207 1.872.454l1.824.461v7.582c0 4.16-.016 7.574-.032 7.574-.024 0-.872.215-1.88.47L1 21.013v-8.505z\" />\n </Wrap>\n );\n}\n\nexport function KuaishouTapButton({ colored, ...props }: AITapButtonProps) {\n const fill = \"currentColor\";\n return (\n <Wrap ariaLabel=\"Kuaishou\" {...props}>\n <path clipRule=\"evenodd\" fill={fill} fillRule=\"evenodd\" stroke=\"none\" d=\"M5.493 21.234c-1.112-1.451-1.109-4.263-.081-7.459l-4.557-2.63a1.683 1.683 0 01-.85-1.304 1.505 1.505 0 01.08-.622 13.18 13.18 0 011.037-2.255c3.476-6.02 10.916-8.23 16.619-4.938.46.266.82.67 1.081 1.184.785 1.545.685 4.096-.234 6.954l4.557 2.631c.339.196.596.492.736.832a1.53 1.53 0 01.034 1.093 13.146 13.146 0 01-1.037 2.255c-3.476 6.02-10.916 8.23-16.619 4.938a2.6 2.6 0 01-.766-.68zm11.096-6.615c-2.073 3.591-5.808 5.316-8.343 3.852-1.267-.731-1.994-2.122-2.145-3.778-.095-1.035.036-2.173.4-3.32.217-.684.517-1.37.902-2.039l.008-.014c2.073-3.59 5.808-5.315 8.343-3.852.633.366 1.13.895 1.49 1.54.986 1.772.922 4.415-.285 6.914-.111.23-.232.457-.362.683l-.008.014z\" />\n </Wrap>\n );\n}\n\nexport const MiniMaxTapButton = (p: AITapButtonProps) => (\n <BrandIcon {...p} ariaLabel=\"MiniMax\" brandColor=\"#F23F5D\" d=\"M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z\" />\n);\n\nexport function RecraftTapButton({ colored, ...props }: AITapButtonProps) {\n const fill = \"currentColor\";\n return (\n <Wrap ariaLabel=\"Recraft\" {...props}>\n <path fill={fill} stroke=\"none\" d=\"M19.667 8.275c0-4.57-4.15-8.275-9.27-8.275-1.774 0-3.213 3.705-3.213 8.275 0 1.143.09 2.233.253 3.224H4.29L1 23h9.4v-6.447c5.117 0 9.266-3.707 9.266-8.275l.001-.002zm-9.27-6.76c.93 0 1.682 3.028 1.682 6.76 0 3.733-.752 6.76-1.681 6.76-.93 0-1.681-3.027-1.681-6.76 0-3.732.752-6.76 1.68-6.76z\" />\n <path fill={fill} stroke=\"none\" d=\"M19.848 16.552h-9.44L14.028 23h9.438l-3.618-6.448z\" />\n </Wrap>\n );\n}\n\nexport const WanTapButton = (p: AITapButtonProps) => (\n <BrandIcon {...p} ariaLabel=\"WAN\" brandColor=\"#FF6003\" d=\"M24 14.014c-2.8 1.512-5.62 2.896-8.759 3.524-.7.139-1.476.139-2.187.043-.678-.085-1.017-.682-.776-1.31.23-.585.536-1.181.93-1.671.852-1.065 1.814-2.034 2.678-3.088a15.75 15.75 0 001.422-2.054c.306-.511.164-1.129-.372-1.384-.897-.437-1.859-.745-2.81-1.075-.11-.043-.274.074-.492.149.273.244.47.425.743.67-2.821.48-5.49 1.16-8.08 2.098-.012.053-.033.095-.023.117.383.585.208 1.032-.35 1.394a2.365 2.365 0 00-.568.522c1.706.5 3.226.213 4.68-.735-.087-.127-.175-.244-.262-.372.546.096.874.394.918.862.011.107-.054.213-.087.32-.077-.086-.175-.17-.24-.267-.045-.064-.056-.138-.088-.245-1.728 1.15-3.587 1.438-5.632.842 0 .404-.022.745.011 1.075.022.287-.098.415-.36.564-.591.362-1.204.735-1.696 1.214-.59.585-.371 1.299.427 1.597.907.34 1.859.35 2.81.234 1.126-.139 2.23-.32 3.456-.49-1.433.67-2.844 1.14-4.33 1.33-1.04.14-2.078.214-3.106-.084-1.476-.415-2.133-1.501-1.75-2.96.361-1.363 1.236-2.449 2.176-3.45 3.139-3.332 7.108-5.024 11.7-5.365 1.072-.074 2.155.064 3.16.511 1.411.639 2.002 1.99 1.313 3.354-.448.905-1.072 1.735-1.695 2.555-.612.809-1.301 1.554-1.946 2.331-.186.234-.361.48-.503.745-.274.5-.088.83.492.778 1.213-.118 2.45-.213 3.62-.511 1.716-.437 3.389-1.054 5.084-1.597.175-.043.339-.107.492-.17z\" />\n);\n\nexport const ZaiTapButton = (p: AITapButtonProps) => (\n <BrandIcon {...p} ariaLabel=\"Z.ai\" brandColor=\"#000000\" d=\"M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z\" />\n);\n\nexport function CanopyTapButton({ colored, ...props }: AITapButtonProps) {\n const fill = colored ? \"#059669\" : \"currentColor\";\n return (\n <Wrap ariaLabel=\"Canopy Labs\" {...props}>\n <path fill={fill} stroke=\"none\" d=\"M12 4c-4.5 0-7.5 3.6-7.5 7.5S7.5 19 12 19s7.5-3.6 7.5-7.5S16.5 4 12 4z\" />\n <path fill={fill} stroke=\"none\" d=\"M10.5 19h3v4h-3v-4z\" />\n </Wrap>\n );\n}\n\nexport const FastinoTapButton = (p: AITapButtonProps) => (\n <BrandIcon {...p} ariaLabel=\"Fastino\" brandColor=\"#000000\" d=\"M6 4h11v2.5H9v5h6.5V14H9v6H6V4z\" />\n);\n\n// GENERIC AI ACTIONS (Stroke SVGs passing directly through Wrap)\n// ---------------------------------------------------------------------------\n\n// Lightning bolt — primary \"AI generation\" icon\nexport function PowerTapButton(props: AITapButtonProps) {\n return (\n <Wrap ariaLabel=\"AI Generation\" {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z\"\n />\n </Wrap>\n );\n}\n\n// Lightning + text lines — Text Generation\nexport function TextGenerationTapButton(props: AITapButtonProps) {\n return (\n <Wrap ariaLabel=\"Text Generation\" {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M13 2l-2.5 7H14l-3 7\"\n />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M4 17h4\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M4 20h7\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M15 17h5\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M17 20h3\" />\n </Wrap>\n );\n}\n\n// Lightning + image frame — Image Generation\nexport function ImageGenerationTapButton(props: AITapButtonProps) {\n return (\n <Wrap ariaLabel=\"Image Generation\" {...props}>\n <rect\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n width=\"18\"\n height=\"18\"\n x=\"3\"\n y=\"3\"\n rx=\"2\"\n ry=\"2\"\n />\n <circle\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n cx=\"9\"\n cy=\"9\"\n r=\"2\"\n />\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21\"\n />\n </Wrap>\n );\n}\n\nexport function AudioLinesTapButton(props: AITapButtonProps) {\n return (\n <Wrap ariaLabel=\"Audio Generation\" {...props}>\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M2 10v3\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 6v11\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M10 3v18\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M14 8v7\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M18 5v13\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M22 10v3\" />\n </Wrap>\n );\n}\n\nexport function TranscriptionTapButton(props: AITapButtonProps) {\n return (\n <Wrap ariaLabel=\"Transcription\" {...props}>\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M12 19v3\" />\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M19 10v2a7 7 0 0 1-14 0v-2\"\n />\n <rect\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n x=\"9\"\n y=\"2\"\n width=\"6\"\n height=\"13\"\n rx=\"3\"\n />\n </Wrap>\n );\n}\n\nexport function TranslationTapButton(props: AITapButtonProps) {\n return (\n <Wrap ariaLabel=\"Translation\" {...props}>\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"m5 8 6 6\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"m4 14 6-6 2-3\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M2 5h12\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M7 2h1\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"m22 22-5-10-5 10\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M14 18h6\" />\n </Wrap>\n );\n}\n\nexport function VideoGenerationTapButton(props: AITapButtonProps) {\n return (\n <Wrap ariaLabel=\"Video Generation\" {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5\"\n />\n <rect\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n x=\"2\"\n y=\"6\"\n width=\"14\"\n height=\"12\"\n rx=\"2\"\n />\n </Wrap>\n );\n}\n\n// Lightning + code brackets — Code Generation\nexport function CodeGenerationTapButton(props: AITapButtonProps) {\n return (\n <Wrap ariaLabel=\"Code Generation\" {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M13 2l-1.5 4.5L14 9l-3 7\"\n />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"m7 15-4-3 4-3\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"m17 15 4-3-4-3\" />\n </Wrap>\n );\n}\n\nexport function WandSparklesTapButton(props: AITapButtonProps) {\n return (\n <Wrap ariaLabel=\"Magic / Workflow\" {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72\"\n />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"m14 7 3 3\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M5 6v4\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M19 14v4\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M10 2v2\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M7 8H3\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M21 16h-4\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M11 3H9\" />\n </Wrap>\n );\n}\n\nexport function CpuTapButton(props: AITapButtonProps) {\n return (\n <Wrap ariaLabel=\"Processor Unit\" {...props}>\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M12 20v2\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M12 2v2\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M17 20v2\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M17 2v2\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M2 12h2\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M2 17h2\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M2 7h2\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M20 12h2\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M20 17h2\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M20 7h2\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M7 20v2\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M7 2v2\" />\n <rect\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n x=\"4\"\n y=\"4\"\n width=\"16\"\n height=\"16\"\n rx=\"2\"\n />\n <rect\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n x=\"8\"\n y=\"8\"\n width=\"8\"\n height=\"8\"\n rx=\"1\"\n />\n </Wrap>\n );\n}\n\n/**\n * Brand id (the ids @ai-matrx/icons resolves a maker name to) -> provider tap button.\n * Lives here, not in icons: a tap button is design-system UI, and icons sits below it.\n */\ntype MakerTapComponent = ComponentType<AITapButtonProps>;\n\nconst MAKER_BRAND_COMPONENTS: Record<string, MakerTapComponent> = {\n openai: OpenAITapButton,\n anthropic: AnthropicTapButton,\n claude: ClaudeTapButton,\n google: GoogleTapButton,\n gemini: GeminiTapButton,\n meta: MetaTapButton,\n llama: LlamaTapButton,\n xai: XaiTapButton,\n grok: GrokTapButton,\n deepseek: DeepSeekTapButton,\n mistral: MistralTapButton,\n perplexity: PerplexityTapButton,\n elevenlabs: ElevenLabsTapButton,\n flux: FluxTapButton,\n huggingface: HuggingFaceTapButton,\n replicate: ReplicateTapButton,\n nvidia: NvidiaTapButton,\n groq: GroqTapButton,\n together: TogetherTapButton,\n cerebras: CerebrasTapButton,\n microsoft: MicrosoftTapButton,\n moonshot: MoonshotTapButton,\n qwen: QwenTapButton,\n ideogram: IdeogramTapButton,\n runway: RunwayTapButton,\n luma: LumaTapButton,\n bytedance: ByteDanceTapButton,\n kuaishou: KuaishouTapButton,\n minimax: MiniMaxTapButton,\n recraft: RecraftTapButton,\n canopy: CanopyTapButton,\n fastino: FastinoTapButton,\n wan: WanTapButton,\n zai: ZaiTapButton,\n matrx: RobotTapButton as MakerTapComponent,\n cpu: CpuTapButton,\n};\n\nexport function getMakerBrandTapButton(brandId: string): MakerTapComponent {\n return MAKER_BRAND_COMPONENTS[brandId] ?? MAKER_BRAND_COMPONENTS.cpu!;\n}\n","\"use client\";\n\nimport {\n cloneElement,\n forwardRef,\n isValidElement,\n useCallback,\n useRef,\n type ButtonHTMLAttributes,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from \"react\";\n\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"../tooltip\";\nimport { joinClassNames } from \"@ai-matrx/kit/dom\";\nimport { classNameMisuse, useTapGuardRef } from \"./tap-target-guard\";\nimport { useTapSurface } from \"./tap-surface\";\nimport {\n TAP_SOLID_TONE,\n TAP_TONE_CLASS,\n TapBadge,\n TapChevron,\n TapSpinner,\n formatTapShortcut,\n tooltipBody,\n useTapShortcut,\n type TapFeatureProps,\n type TapShortcut,\n type TapSolidTone,\n} from \"./tap-features\";\nimport {\n getTapTargetLinkComponent,\n type TapTargetLinkComponent,\n} from \"./link\";\n\nexport interface TapTargetButtonProps extends TapFeatureProps {\n icon?: React.ReactNode;\n children?: React.ReactNode;\n strokeWidth?: number | undefined;\n onClick?: (() => void) | undefined;\n className?: string | undefined;\n as?: \"button\" | \"label\" | undefined;\n htmlFor?: string | undefined;\n ariaLabel?: string | undefined;\n disabled?: boolean | undefined;\n /**\n * When set, the tap button renders as a link instead of a button.\n * - Internal hrefs (e.g. \"/tasks\") render via the injected link component\n * (`setTapTargetLinkComponent` / the `linkComponent` prop), falling back\n * to a plain `<a>` when none is registered.\n * - External hrefs (http://, https://, mailto:, tel:) render as `<a>`\n * with `target=\"_blank\"` and `rel=\"noopener noreferrer\"` by default.\n * - When combined with `disabled`, the trigger renders as a non-navigable\n * `<span aria-disabled=\"true\">` with the same visual styling.\n */\n href?: string | undefined;\n /** Override target. Works on both internal links and external anchors. */\n target?: \"_blank\" | \"_self\" | \"_parent\" | \"_top\" | undefined;\n /** Override rel. Works on both internal links and external anchors. */\n rel?: string | undefined;\n /** Forwarded to the injected link component. Pass `false` to disable prefetching. */\n prefetch?: boolean | null | undefined;\n /**\n * Per-instance link component for internal hrefs — overrides the\n * module-level `setTapTargetLinkComponent` registration.\n */\n linkComponent?: TapTargetLinkComponent | undefined;\n /**\n * Tooltip text. Defaults to `ariaLabel` when omitted.\n * EVERY tap button shows a tooltip (owner ruling 2026-10-01). `false` no\n * longer hides it: it renders the tooltip through `title` (the provider's\n * title takeover draws the same surface) — for a button nested inside\n * another `asChild` trigger, where the Tooltip wrapper cannot sit.\n */\n tooltip?: string | false | undefined;\n /** Tooltip placement. Defaults to \"top\". */\n tooltipSide?: \"top\" | \"right\" | \"bottom\" | \"left\" | undefined;\n /** Tooltip alignment along its side. Defaults to \"center\". */\n tooltipAlign?: \"start\" | \"center\" | \"end\" | undefined;\n /**\n * Visible caption rendered inline after the icon (`[icon Label]`).\n * Widens the pill automatically. Tooltip defaults to off when set — the\n * label is self-describing. Visible text becomes the accessible name.\n */\n label?: string | undefined;\n /**\n * Collapse an icon + caption pill to its icon-only 44px tap target below\n * the `sm` breakpoint. The caption and inline geometry return at `sm+`;\n * `ariaLabel` (falling back to `label`) remains the accessible name.\n */\n mobileIconOnly?: boolean | undefined;\n}\n\nexport interface TapTargetButtonSolidProps extends Omit<TapTargetButtonProps, \"tone\"> {\n /** The fill, from the system's list. Replaces bgColor / iconColor / hover / active. */\n tone?: TapSolidTone | undefined;\n bgColor?: string | undefined;\n iconColor?: string | undefined;\n hoverBgColor?: string | undefined;\n /**\n * Press-state background. Defaults to `group-active/tap:brightness-90` (the\n * BOX is what is pressed — its touch area included), which works on\n * any color. Override when using a custom `bgColor` that should darken to a\n * specific shade on press (e.g. `group-active/tap:bg-primary/60`).\n */\n activeBgColor?: string | undefined;\n}\n\n/** Native button attributes a tap button accepts — everything except `style`:\n * a tap button's geometry is the system's, never the caller's. */\nexport type TapTargetNativeProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"style\">;\n\nconst EXTERNAL_RE = /^(https?:|mailto:|tel:)/i;\n\n// Geometry + press feedback + tap hygiene are the SINGLE SOURCE OF TRUTH in\n// the shipped stylesheet (the `.matrx-tap-*` family in styles.css — import\n// \"@ai-matrx/tap-target/styles.css\" once at app root). This component only\n// picks the right class and layers each variant's decoration on top.\nconst TAP_OUTER_CLASS = \"matrx-tap-target group group/tap\";\nconst TAP_GROUP_OUTER_CLASS = \"matrx-tap-target matrx-tap-target-sm group group/tap\";\n\nfunction IconContent({\n icon,\n children,\n strokeWidth = 2,\n className,\n}: Pick<\n TapTargetButtonProps,\n \"icon\" | \"children\" | \"strokeWidth\" | \"className\"\n>) {\n if (icon) {\n if (isValidElement<{ className?: string }>(icon)) {\n return cloneElement(icon, {\n className: joinClassNames(className, icon.props.className),\n });\n }\n return <span className={className}>{icon}</span>;\n }\n return (\n <svg\n className={className}\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n {children}\n </svg>\n );\n}\n\ntype TapTargetSize = \"default\" | \"sm\";\n\nfunction resolveTapGeometry(\n label: string | undefined,\n size: TapTargetSize,\n mobileIconOnly: boolean,\n) {\n const inline = Boolean(label);\n if (size === \"sm\") {\n return {\n outerClassName:\n inline && mobileIconOnly\n ? \"matrx-tap-target matrx-tap-target-sm matrx-tap-target-mobile-icon-only-sm group group/tap\"\n : inline\n ? \"matrx-tap-target matrx-tap-target-sm matrx-tap-target-inline-sm group group/tap\"\n : TAP_GROUP_OUTER_CLASS,\n inlineModifier: mobileIconOnly\n ? \"matrx-tap-pill-mobile-icon-only-sm\"\n : \"matrx-tap-pill-inline-sm\",\n };\n }\n return {\n outerClassName:\n inline && mobileIconOnly\n ? `${TAP_OUTER_CLASS} matrx-tap-target-mobile-icon-only`\n : inline\n ? `${TAP_OUTER_CLASS} matrx-tap-target-inline`\n : TAP_OUTER_CLASS,\n inlineModifier: mobileIconOnly\n ? \"matrx-tap-pill-mobile-icon-only\"\n : \"matrx-tap-pill-inline\",\n };\n}\n\nfunction buildTapInner({\n label,\n pillClassName,\n iconClassName,\n labelClassName,\n inlineModifier,\n icon,\n children,\n strokeWidth = 2,\n loading,\n chevron,\n}: {\n label?: string | undefined;\n pillClassName: string;\n iconClassName: string;\n labelClassName?: string | undefined;\n inlineModifier: string;\n icon?: React.ReactNode;\n children?: React.ReactNode;\n strokeWidth?: number | undefined;\n loading?: boolean | undefined;\n chevron?: boolean | undefined;\n}) {\n const iconEl = loading ? (\n <TapSpinner className={iconClassName} />\n ) : (\n <IconContent\n icon={icon}\n strokeWidth={strokeWidth}\n className={iconClassName}\n >\n {children}\n </IconContent>\n );\n const pillClasses = label\n ? `${pillClassName} ${inlineModifier}`.trim()\n : pillClassName;\n\n if (!label) {\n return <div className={pillClasses}>{iconEl}</div>;\n }\n\n return (\n <div className={pillClasses}>\n {iconEl}\n <span className={labelClassName ?? \"matrx-tap-label\"}>{label}</span>\n {chevron ? <TapChevron /> : null}\n </div>\n );\n}\n\ninterface RenderTapTargetArgs extends Pick<\n TapTargetButtonProps,\n | \"icon\"\n | \"children\"\n | \"strokeWidth\"\n | \"label\"\n | \"mobileIconOnly\"\n | \"onClick\"\n | \"as\"\n | \"htmlFor\"\n | \"ariaLabel\"\n | \"disabled\"\n | \"href\"\n | \"target\"\n | \"rel\"\n | \"prefetch\"\n | \"linkComponent\"\n | \"tooltip\"\n | \"tooltipSide\"\n | \"tooltipAlign\"\n> {\n size?: TapTargetSize;\n /** The caller's raw `className` (the glyph color) — checked by the guard. */\n colorClassName?: string | undefined;\n pillClassName: string;\n iconClassName: string;\n labelClassName?: string | undefined;\n rest?: (TapTargetNativeProps & TapFeatureProps) | undefined;\n buttonRef?: Ref<HTMLButtonElement> | undefined;\n}\n\n// A hook (it carries the guard ref); every variant calls it exactly once.\nfunction useTapTarget({\n size = \"default\",\n colorClassName,\n pillClassName,\n iconClassName,\n labelClassName,\n icon,\n children,\n strokeWidth,\n label,\n mobileIconOnly = false,\n onClick,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n rest,\n buttonRef,\n}: RenderTapTargetArgs): ReactElement {\n const {\n tone,\n badge,\n pressed,\n loading,\n disabledReason,\n shortcut,\n chevron,\n ...nativeRest\n } = rest ?? {};\n const isDisabled = Boolean(disabled || disabledReason);\n // FORCED TOOLTIPS: the text is the reason, an explicit tooltip, the\n // accessible name, or the label — and a button with none is a defect.\n const tipText =\n disabledReason || (typeof tooltip === \"string\" && tooltip ? tooltip : undefined) || ariaLabel || label;\n const titleMode = tooltip === false;\n const propViolation =\n (tipText ? null : \"every tap button needs a tooltip — pass ariaLabel\") ??\n classNameMisuse(colorClassName ?? nativeRest.className) ??\n ((nativeRest as { style?: unknown }).style ? \"style is not supported on a tap button\" : null);\n const guardRef = useTapGuardRef<HTMLElement>(\n buttonRef as Ref<HTMLElement> | undefined,\n propViolation,\n );\n const nodeRef = useRef<HTMLElement | null>(null);\n const triggerRef = useCallback(\n (node: HTMLElement | null) => {\n nodeRef.current = node;\n guardRef(node);\n },\n [guardRef],\n );\n const getNode = useCallback(() => nodeRef.current, []);\n useTapShortcut(shortcut, getNode, !isDisabled && !loading);\n\n // Tone (or a pressed toggle) owns the glyph and label color.\n const toneColor = tone ? TAP_TONE_CLASS[tone] : pressed && !colorClassName ? TAP_TONE_CLASS.primary : null;\n if (toneColor) {\n iconClassName = `matrx-tap-icon ${toneColor}`;\n labelClassName = `matrx-tap-label ${toneColor}`;\n }\n if (pressed) pillClassName = `${pillClassName} matrx-tap-pressed`;\n const { outerClassName, inlineModifier } = resolveTapGeometry(\n label,\n size,\n mobileIconOnly,\n );\n const responsiveLabelClassName = mobileIconOnly\n ? `${labelClassName ?? \"matrx-tap-label\"} matrx-tap-label-mobile-icon-only`\n : labelClassName;\n const inner = buildTapInner({\n label,\n pillClassName,\n iconClassName,\n labelClassName: responsiveLabelClassName,\n inlineModifier: label ? inlineModifier : \"\",\n icon,\n children,\n strokeWidth,\n loading,\n chevron,\n });\n const triggerAriaLabel =\n label && !mobileIconOnly ? undefined : (ariaLabel ?? label);\n const trigger = renderTrigger({\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n as,\n htmlFor,\n onClick: loading ? undefined : onClick,\n ariaLabel: triggerAriaLabel,\n disabled: isDisabled,\n outerClassName,\n title: titleMode && tipText ? (shortcut ? `${tipText} (${formatTapShortcut(shortcut)})` : tipText) : undefined,\n children: (\n <>\n {inner}\n {badge !== undefined ? <TapBadge badge={badge} /> : null}\n </>\n ),\n rest: {\n ...nativeRest,\n ...(pressed !== undefined ? { \"aria-pressed\": pressed } : {}),\n ...(loading ? { \"aria-busy\": true } : {}),\n ...(shortcut ? { \"aria-keyshortcuts\": shortcut.replace(/mod/i, \"Meta\") } : {}),\n },\n triggerRef,\n });\n if (titleMode || !tipText) return trigger;\n return withTooltip(trigger, {\n tooltip: tipText,\n ariaLabel: tipText,\n disabled: isDisabled,\n tooltipSide,\n tooltipAlign,\n shortcut,\n });\n}\n\ninterface RenderTriggerArgs {\n href?: string | undefined;\n target?: \"_blank\" | \"_self\" | \"_parent\" | \"_top\" | undefined;\n rel?: string | undefined;\n prefetch?: boolean | null | undefined;\n linkComponent?: TapTargetLinkComponent | undefined;\n as?: \"button\" | \"label\" | undefined;\n htmlFor?: string | undefined;\n onClick?: (() => void) | undefined;\n ariaLabel?: string | undefined;\n disabled?: boolean | undefined;\n outerClassName: string;\n children: ReactNode;\n rest?: ButtonHTMLAttributes<HTMLButtonElement> | undefined;\n triggerRef: Ref<HTMLElement>;\n /** Tooltip text drawn through `title` (tooltip={false}: a nested trigger). */\n title?: string | undefined;\n}\n\n/**\n * Resolves the correct trigger element based on the props passed.\n *\n * - `href` + `disabled` → unclickable `<span aria-disabled>`\n * - `href` matching `http(s):|mailto:|tel:` → `<a target=\"_blank\" rel=\"noopener noreferrer\">`\n * - `href` (internal) → the injected link component (per-instance\n * `linkComponent` prop, else `setTapTargetLinkComponent` registration),\n * falling back to a plain `<a>` when none is registered\n * - `as=\"label\"` → `<label htmlFor=...>`\n * - default → `<button>`\n */\nfunction renderTrigger({\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n as,\n htmlFor,\n onClick,\n ariaLabel,\n disabled,\n outerClassName,\n children,\n rest,\n triggerRef,\n title,\n}: RenderTriggerArgs): ReactElement {\n const { style: _style, ...restWithoutStyle } = rest ?? {};\n if (disabled && href) {\n return (\n <span\n ref={triggerRef}\n aria-disabled=\"true\"\n aria-label={ariaLabel}\n title={title}\n className={`${outerClassName} opacity-40`}\n >\n {children}\n </span>\n );\n }\n if (href) {\n const isExternal = EXTERNAL_RE.test(href);\n if (isExternal) {\n return (\n <a\n ref={triggerRef as Ref<HTMLAnchorElement>}\n href={href}\n target={target ?? \"_blank\"}\n rel={rel ?? \"noopener noreferrer\"}\n aria-label={ariaLabel}\n title={title}\n className={outerClassName}\n >\n {children}\n </a>\n );\n }\n const Link = linkComponent ?? getTapTargetLinkComponent();\n if (Link) {\n return (\n <Link\n ref={triggerRef as Ref<HTMLAnchorElement>}\n href={href}\n target={target}\n rel={rel}\n prefetch={prefetch}\n aria-label={ariaLabel}\n title={title}\n className={outerClassName}\n >\n {children}\n </Link>\n );\n }\n // No link component registered — plain <a>. `prefetch` is a router hint,\n // not a DOM attribute, so it is deliberately dropped here.\n return (\n <a\n ref={triggerRef as Ref<HTMLAnchorElement>}\n href={href}\n target={target}\n rel={rel}\n aria-label={ariaLabel}\n title={title}\n className={outerClassName}\n >\n {children}\n </a>\n );\n }\n if (as === \"label\") {\n return (\n <label\n ref={triggerRef as Ref<HTMLLabelElement>}\n htmlFor={htmlFor}\n aria-label={ariaLabel}\n title={title}\n className={outerClassName}\n >\n {children}\n </label>\n );\n }\n return (\n <button\n ref={triggerRef as Ref<HTMLButtonElement>}\n type=\"button\"\n onClick={onClick}\n aria-label={ariaLabel}\n title={title}\n disabled={disabled}\n {...restWithoutStyle}\n className={outerClassName}\n >\n {children}\n </button>\n );\n}\n\n/**\n * Wraps a trigger element in a Tooltip when a tooltip label is available.\n * Falls back to `ariaLabel` when `tooltip` is not explicitly set. If both\n * are absent (or `tooltip === false`), the trigger is returned unwrapped.\n */\nfunction withTooltip(\n trigger: ReactElement,\n {\n tooltip,\n ariaLabel,\n disabled,\n tooltipSide = \"top\",\n tooltipAlign = \"center\",\n shortcut,\n }: {\n tooltip?: string | false | undefined;\n ariaLabel?: string | undefined;\n disabled?: boolean | undefined;\n tooltipSide?: \"top\" | \"right\" | \"bottom\" | \"left\" | undefined;\n tooltipAlign?: \"start\" | \"center\" | \"end\" | undefined;\n shortcut?: TapShortcut | undefined;\n },\n): ReactElement {\n if (tooltip === false) return trigger;\n const label =\n typeof tooltip === \"string\" && tooltip.length > 0 ? tooltip : ariaLabel;\n if (!label) return trigger;\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n {disabled ? (\n // Radix Tooltip triggers need a hoverable element; a disabled button\n // does not dispatch pointer events, so we wrap in a span for the\n // trigger target while keeping the disabled visual state.\n <span className=\"inline-flex\">{trigger}</span>\n ) : (\n trigger\n )}\n </TooltipTrigger>\n <TooltipContent side={tooltipSide} align={tooltipAlign}>\n {tooltipBody(label, shortcut)}\n </TooltipContent>\n </Tooltip>\n );\n}\n\n// To resize/retune every tap button, edit styles.css — not here.\n\nexport const TapTargetButton = forwardRef<\n HTMLButtonElement,\n TapTargetButtonProps & TapTargetNativeProps\n>(function TapTargetButton(\n {\n icon,\n children,\n strokeWidth = 2,\n onClick,\n className,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n ...rest\n },\n ref,\n) {\n const color = className ?? \"text-foreground\";\n return useTapTarget({\n colorClassName: className,\n icon,\n children,\n strokeWidth,\n onClick,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n pillClassName: \"matrx-tap-pill matrx-glass-thin-border\",\n iconClassName: `matrx-tap-icon ${color}`,\n rest,\n buttonRef: ref,\n });\n});\n\nexport const TapTargetButtonTransparent = forwardRef<\n HTMLButtonElement,\n TapTargetButtonProps & TapTargetNativeProps\n>(function TapTargetButtonTransparent(\n {\n icon,\n children,\n strokeWidth = 2,\n onClick,\n className,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n ...rest\n },\n ref,\n) {\n const color = className ?? \"text-foreground\";\n return useTapTarget({\n colorClassName: className,\n icon,\n children,\n strokeWidth,\n onClick,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n pillClassName:\n \"matrx-tap-pill group-hover/tap:bg-muted group-active/tap:bg-muted-foreground/15\",\n iconClassName: `matrx-tap-icon ${color}`,\n rest,\n buttonRef: ref,\n });\n});\n\n/** Outline pill — a plain 1px border, no fill, no blur, no shadow. Glass only\n * reads as glass over something you can see through; on an opaque card or\n * header use THIS. Same colors as the classic square \"+\": border-border,\n * muted glyph, primary border + foreground glyph on hover. */\nexport const TapTargetButtonOutline = forwardRef<\n HTMLButtonElement,\n TapTargetButtonProps & TapTargetNativeProps\n>(function TapTargetButtonOutline(\n {\n icon,\n children,\n strokeWidth = 2,\n onClick,\n className,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n ...rest\n },\n ref,\n) {\n const color =\n className ?? \"text-muted-foreground group-hover/tap:text-foreground\";\n return useTapTarget({\n colorClassName: className,\n icon,\n children,\n strokeWidth,\n onClick,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n pillClassName:\n \"matrx-tap-pill border border-border bg-transparent transition-colors group-hover/tap:border-primary/60 group-active/tap:bg-muted\",\n iconClassName: `matrx-tap-icon ${color}`,\n labelClassName: `matrx-tap-label ${color}`,\n rest,\n buttonRef: ref,\n });\n});\n\nexport const TapTargetButtonSolid = forwardRef<\n HTMLButtonElement,\n TapTargetButtonSolidProps & TapTargetNativeProps\n>(function TapTargetButtonSolid(\n {\n icon,\n children,\n strokeWidth = 2,\n onClick,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tone,\n bgColor,\n iconColor,\n hoverBgColor,\n activeBgColor,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n ...rest\n },\n ref,\n) {\n return useTapTarget({\n icon,\n children,\n strokeWidth,\n onClick,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n ...solidClasses(tone, bgColor, iconColor, hoverBgColor, activeBgColor),\n rest,\n buttonRef: ref,\n });\n});\n\n// `tone` is the system's fill; the four color strings are the pre-tone API,\n// accepted only until their last callers move to `tone`. `matrx-tap-solid` marks the\n// filled pill so the stylesheet can give a DISABLED solid the system's disabled token\n// (muted fill + --disabled-foreground glyph) instead of a 40%-opacity ghost of its fill.\nfunction solidClasses(\n tone: TapSolidTone | undefined,\n bgColor: string | undefined,\n iconColor: string | undefined,\n hoverBgColor: string | undefined,\n activeBgColor: string | undefined,\n) {\n const legacy = !tone && (bgColor || iconColor || hoverBgColor || activeBgColor);\n if (!legacy) {\n const t = TAP_SOLID_TONE[tone ?? \"primary\"];\n return {\n pillClassName: `matrx-tap-pill matrx-tap-solid ${t.fill} ${t.glyph} group-active/tap:brightness-90`,\n iconClassName: `matrx-tap-icon ${t.glyph}`,\n labelClassName: `matrx-tap-label ${t.glyph}`,\n };\n }\n const glyph = iconColor ?? \"text-primary-foreground\";\n return {\n pillClassName: `matrx-tap-pill matrx-tap-solid ${bgColor ?? \"bg-primary\"} ${glyph} ${hoverBgColor ?? \"group-hover/tap:bg-primary/80\"} ${activeBgColor ?? \"group-active/tap:brightness-90\"}`,\n iconClassName: `matrx-tap-icon ${glyph}`,\n labelClassName: `matrx-tap-label ${glyph}`,\n };\n}\n\n/** Solid destructive pill — delete/remove actions. White-on-red like the\n * primary solid is white-on-blue. Use THIS, never hand-pass bg-destructive\n * with the default (dark) icon color. */\nexport const TapTargetButtonDestructive = forwardRef<\n HTMLButtonElement,\n TapTargetButtonSolidProps & TapTargetNativeProps\n>(function TapTargetButtonDestructive({ tone = \"destructive\", ...rest }, ref) {\n return <TapTargetButtonSolid ref={ref} tone={tone} {...rest} />;\n});\n\nexport const TapTargetButtonForGroup = forwardRef<\n HTMLButtonElement,\n TapTargetButtonProps & TapTargetNativeProps\n>(function TapTargetButtonForGroup(\n {\n icon,\n children,\n strokeWidth = 2,\n onClick,\n className,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n ...rest\n },\n ref,\n) {\n const color = className ?? \"text-foreground\";\n return useTapTarget({\n colorClassName: className,\n size: \"sm\",\n icon,\n children,\n strokeWidth,\n onClick,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n pillClassName: \"matrx-tap-pill matrx-tap-pill-sm matrx-glass-interactive\",\n iconClassName: `matrx-tap-icon ${color}`,\n labelClassName: `matrx-tap-label ${color}`,\n rest,\n buttonRef: ref,\n });\n});\n\nexport function TapTargetButtonGroup({\n children,\n className,\n surface: surfaceProp,\n}: {\n children: React.ReactNode;\n className?: string | undefined;\n /**\n * GLASS ONLY FLOATS (owner rule, 2026-10-02): glass belongs on a bar that\n * floats over scrolling content or a see-through plane. On a solid surface\n * (a page, a card, a toast, a table toolbar) use `\"solid\"`: a muted track,\n * no glass stroke, the same geometry.\n */\n surface?: \"glass\" | \"solid\" | undefined;\n}) {\n // Geometry (height, the half-gap outside the capsule, the capsule itself)\n // is `.matrx-tap-group*` in tap-target.css.\n const surface = useTapSurface(surfaceProp);\n return (\n <div\n className={className ? `matrx-tap-group ${className}` : \"matrx-tap-group\"}\n data-surface={surface}\n >\n <div\n className={\n surface === \"solid\"\n ? \"matrx-tap-group-capsule matrx-tap-group-capsule-solid\"\n : \"matrx-tap-group-capsule matrx-glass-thin-border\"\n }\n />\n <div className=\"matrx-tap-group-row\">{children}</div>\n </div>\n );\n}\n","\"use client\";\n\n/**\n * Tooltip — the ONE tooltip in the fleet.\n *\n * THE COLLAPSE (0.6.0). Two implementations existed: matrx-frontend's\n * `components/ui/tooltip.tsx` (182 import sites) and `@ai-matrx/tap-target`'s\n * `src/tooltip.tsx` — the latter an explicit inlined PORT of the former,\n * carrying a header that said so. tap-target shipped it only because its ~60\n * tap buttons need a tooltip and no shared package owned one; four repos then\n * adopted `TooltipProvider` from tap-target. That made tap-target — a\n * button-geometry package — the accidental owner of a design-system primitive,\n * with a second copy living in the biggest host.\n *\n * A tooltip is a design-system surface, so it lives here. tap-target now takes\n * `@ai-matrx/design-system` as an ordinary sibling dependency and imports this\n * file; its own copy is deleted, and its re-export removed. The DAG already\n * ordered design-system before tap-target, so no cycle is introduced.\n *\n * BEHAVIOR is matrx-frontend's, verbatim, including the ruling both copies\n * carried in prose:\n *\n * 1. THE ROOT RENDERS UNCONDITIONALLY — no hydration mount gate. The gate the\n * host wrapper once carried (\"Radix generates dynamic aria-controls ids that\n * differ between SSR and client\") was false: Radix ids come from React's\n * SSR-stable `useId`. It was actively harmful — a Trigger wraps\n * ALWAYS-VISIBLE content, so `return null` deleted that subtree from SSR and\n * the first client paint.\n *\n * 2. THE SURFACE IS TOKEN-DRIVEN, NOT BRANDED. Popover tokens, not\n * `bg-primary`: rich tooltip content using `text-muted-foreground` was\n * illegible on a brand-colored background in one theme or the other.\n * Since 2026-09-28 the `.matrx-tooltip` class re-scopes those tokens to a dark,\n * high-contrast chip in both themes (styles.css, THE TOOLTIP SURFACE): the\n * neutral white surface it wore before was indistinguishable from the\n * browser's own `title` box.\n *\n * 3. EVERY `title` IS THIS TOOLTIP. The provider installs the title takeover\n * (`title-tooltips.ts`), so a hand-written `title=` anywhere in the\n * document shows this surface, never the browser's.\n *\n * SEAM INVERSION. The host resolved nested portal targets through\n * `useNestedPortalContainer` (an app hook wired to its dialog + window-panel\n * systems); tap-target's port dropped that seam entirely and always portalled\n * to `document.body` — which is why a tooltip inside a popped-out panel landed\n * in the wrong window. Here it is the package's `PortalContainerProvider`\n * seam: an explicit `container` prop wins, then the injected container, then\n * `document.body`. Both prior behaviors are reachable; neither is forked.\n */\n\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport * as React from \"react\";\n\nimport { cn } from \"./cn\";\nimport { MOTION_POPPER } from \"./motion\";\nimport { usePortalContainer } from \"./portal-container\";\nimport { acquireTitleTooltips, clipTooltipText, tooltipSide, TOOLTIP_EDGE_PX, TOOLTIP_LAYER_Z, TOOLTIP_TRIGGER_ATTR, type Side } from \"./title-tooltips\";\n\nexport interface TooltipProviderProps\n extends React.ComponentProps<typeof TooltipPrimitive.Provider> {\n /**\n * THE TITLE TAKEOVER (2026-09-28) — while any provider is mounted, every native\n * `title` attribute in the document shows as this tooltip instead of the\n * browser's (see `title-tooltips.ts`). On by default, because a rule every\n * author must remember is a rule that is broken; pass `false` only for a\n * surface that must keep the browser's own box. One provider opting out does\n * not turn it off while another one is mounted.\n */\n titleTooltips?: boolean;\n}\n\n/**\n * Mount once near the app root. Every tooltip in the tree shares its\n * `delayDuration` / `skipDelayDuration` timing, and the root provider takes\n * over native `title` attributes (see `titleTooltips`). The fleet default keeps\n * tooltip content hoverable and selectable. A native mirrored Desktop shell may\n * explicitly opt in to `disableHoverableContent` so its overlay view yields the\n * pointer back to the host; ordinary application tooltips must leave it unset.\n */\nfunction TooltipProvider({ titleTooltips = true, disableHoverableContent = false, ...props }: TooltipProviderProps) {\n React.useEffect(() => {\n if (!titleTooltips) return;\n return acquireTitleTooltips();\n }, [titleTooltips]);\n return <TooltipPrimitive.Provider {...props} disableHoverableContent={disableHoverableContent} />;\n}\n\n/**\n * The tooltip root inherits its provider's hoverability policy: the ordinary\n * provider defaults to hoverable, selectable content (Arman, 2026-10-14), while\n * a native mirrored Desktop shell may opt in at its provider so the overlay view\n * yields pointer control to its host. An explicit root prop still wins.\n */\n/** The tooltip's trigger and whether it is open, so its content takes THE SMART SIDE\n * (title-tooltips.ts) from where the trigger stands at the moment it opens. */\ninterface TriggerState {\n ref: React.MutableRefObject<HTMLElement | null>;\n open: boolean;\n}\nconst TriggerContext = React.createContext<TriggerState | null>(null);\n\nconst Tooltip = ({ onOpenChange, ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>) => {\n const ref = React.useRef<HTMLElement | null>(null);\n const [open, setOpen] = React.useState(Boolean(props.open ?? props.defaultOpen));\n const shown = props.open ?? open;\n const value = React.useMemo(() => ({ ref, open: shown }), [shown]);\n return (\n <TriggerContext.Provider value={value}>\n <TooltipPrimitive.Root\n {...props}\n onOpenChange={(next) => {\n setOpen(next);\n onOpenChange?.(next);\n }}\n />\n </TriggerContext.Provider>\n );\n};\nTooltip.displayName = \"Tooltip\";\n\n/**\n * Stamps `data-matrx-tooltip-trigger` so the title takeover never draws a\n * second tooltip over a control that already has this one — it still lifts a\n * `title` on the same control, so the browser's box never doubles it either.\n */\nconst TooltipTrigger = React.forwardRef<\n React.ComponentRef<typeof TooltipPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Trigger>\n>((props, ref) => {\n const trigger = React.useContext(TriggerContext);\n const setRef = React.useCallback(\n (node: HTMLButtonElement | null) => {\n if (trigger) trigger.ref.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) ref.current = node;\n },\n [trigger, ref],\n );\n return <TooltipPrimitive.Trigger ref={setRef} {...{ [TOOLTIP_TRIGGER_ATTR]: \"\" }} {...props} />;\n});\nTooltipTrigger.displayName = TooltipPrimitive.Trigger.displayName;\n\nexport interface TooltipContentProps\n extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> {\n /**\n * Explicit portal target; wins over the injected `PortalContainerProvider`\n * value. Pass `null` to force `document.body`.\n */\n container?: HTMLElement | null;\n /**\n * Package-owned open/close motion. Default `true`. Pass `false` for a\n * surface that must appear instantly. It is NOT the reduced-motion switch;\n * `styles.css` already honors `prefers-reduced-motion`.\n */\n animated?: boolean;\n /**\n * The side when the control is not in a vertical stack and no side is given (the host's default:\n * a macOS desktop host says \"bottom\"). Omit for the document's `data-title-side`, else \"top\".\n */\n fallbackSide?: Side;\n}\n\nconst TooltipContent = React.forwardRef<\n React.ComponentRef<typeof TooltipPrimitive.Content>,\n TooltipContentProps\n>(({ className, side, fallbackSide, sideOffset = 4, collisionPadding = TOOLTIP_EDGE_PX, container, animated = true, children, style, ...props }, ref) => {\n const resolved = usePortalContainer(container);\n const trigger = React.useContext(TriggerContext);\n // THE SMART SIDE: an explicit side wins; otherwise where the trigger's neighbours stand decides.\n const placed = side ?? (trigger?.open ? tooltipSide(trigger.ref.current, fallbackSide) : (fallbackSide ?? \"top\"));\n return (\n <TooltipPrimitive.Portal container={resolved ?? null}>\n <TooltipPrimitive.Content\n ref={ref}\n data-slot=\"tooltip-content\"\n side={placed}\n sideOffset={sideOffset}\n // Flip and stay inside the window: Radix flips to the opposite side when the preferred one\n // does not fit, and shifts along the edge; the padding keeps it off the window's border.\n avoidCollisions\n collisionPadding={collisionPadding}\n className={cn(\n \"matrx-tooltip max-w-xs select-text overflow-hidden whitespace-normal break-words rounded-md border border-border bg-popover px-2.5 py-1 text-xs font-medium text-popover-foreground\",\n animated && MOTION_POPPER,\n className,\n )}\n // THE tooltip layer: above every menu, popover and modal (Radix copies it onto its wrapper).\n style={{ zIndex: TOOLTIP_LAYER_Z, ...style }}\n {...props}\n >\n {typeof children === \"string\" ? clipTooltipText(children) : children}\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n});\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\n\nexport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };\nexport { acquireTitleTooltips, clipTooltipText, NATIVE_TITLE_OPT_OUT_ATTR, TOOLTIP_TEXT_BUDGET } from \"./title-tooltips\";\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","/**\n * THE MOTION CONTRACT (0.10.0) — the class names every animated surface in\n * this package puts on the DOM, in ONE place.\n *\n * Why a module and not ten inline strings: the sweep that produced this file\n * found the same defect ten times over, and it was invisible each time\n * because each primitive spelled its animation out by hand. Ten hand-written\n * copies of `data-[state=open]:animate-in data-[state=closed]:animate-out\n * data-[state=closed]:fade-out-0 …` meant ten chances to reach for a utility\n * nothing in the package defines — which is exactly what happened. A single\n * exported constant per motion SHAPE means the next primitive cannot invent\n * an eleventh spelling, and `styles.test.ts` can prove every one of them\n * resolves to a rule in the shipped stylesheet.\n *\n * Every rule these name lives in `styles.css` under the package's own\n * keyframes. NONE of them is a Tailwind utility, and none requires a host\n * plugin — see that file's header for the measurement that made this\n * necessary.\n */\n\n/** Modal scrims: Dialog, AlertDialog, Sheet, CommandDialog. Fade only. */\nexport const MOTION_OVERLAY = \"matrx-motion-overlay\";\n\n/** The centered dialog card. Fades and scales; centering is not its business. */\nexport const MOTION_DIALOG = \"matrx-motion-dialog\";\n\n/**\n * THE CENTERING OF A CENTERED DIALOG CARD — package-owned, in the `translate`\n * property, and NEVER a Tailwind `translate-x-[-50%] translate-y-[-50%]` pair.\n *\n * Those utilities do not compile to the same thing in every host: Tailwind v3\n * writes them into `transform`, Tailwind v4 writes them into the independent\n * `translate` property, which COMPOSES with `transform` instead of being\n * replaced by it. 0.10.0's keyframes restated the centering inside `transform`,\n * which was harmless on v3 and doubled the centering on v4 — the card flew in\n * from off the top-left of the viewport for the animation's whole duration and\n * snapped into place at the end (fixed in 0.10.1).\n *\n * Owning it here means one spelling that reads the same on both, and it frees\n * `transform` so the keyframes carry ONLY the delta. Put this on every centered\n * surface UNCONDITIONALLY — it is geometry, so unlike {@link MOTION_DIALOG} it\n * must survive `animated={false}`. Its rule ships in `styles.css`.\n */\nexport const CENTERED_DIALOG = \"matrx-dialog-centered\";\n\n/**\n * The resting gap between a `popper`-positioned surface and its trigger, for\n * the primitives that want one (today: `Select`). Same law and same reason as\n * {@link CENTERED_DIALOG} — a position an animated surface holds AT REST is\n * the `translate` property's job, never a Tailwind translate utility, because\n * those land in `transform` on a v3 host and in `translate` on a v4 one while\n * the keyframes animate `transform` either way. Sizes from\n * `--matrx-popper-offset`; keys off Radix's `data-side`.\n */\nexport const POPPER_OFFSET = \"matrx-popper-offset\";\n\n/** The mobile Dialog / CommandDialog bottom sheet. Slides up and fades. */\nexport const MOTION_BOTTOM_SHEET = \"matrx-motion-bottom-sheet\";\n\n/**\n * Radix-popper surfaces: Popover, DropdownMenu, ContextMenu, HoverCard,\n * Select, Tooltip. Reads `--radix-popper-transform-origin` so the surface\n * grows out of its trigger, and `data-side` so it travels from it.\n */\nexport const MOTION_POPPER = \"matrx-motion-popper\";\n\n/** Edge sheets, one class per `sheetVariants` side. */\nexport const MOTION_SHEET = {\n top: \"matrx-motion-sheet-top\",\n bottom: \"matrx-motion-sheet-bottom\",\n left: \"matrx-motion-sheet-left\",\n right: \"matrx-motion-sheet-right\",\n center: \"matrx-motion-sheet-center\",\n} as const;\n\n/** Skeleton's breathing loop. */\nexport const MOTION_PULSE = \"matrx-pulse\";\n/** A waiting box's crossing band of light (Skeleton `motion=\"shimmer\"`). Reduced motion: a slow breathe, no travel. */\nexport const MOTION_SHIMMER = \"matrx-shimmer\";\n\n/** The spinner loop, for every inline busy indicator in the package. */\nexport const MOTION_SPIN = \"matrx-spin\";\n\n/**\n * FirstUseHint's beacon: a soft ring that pulses three times around the anchor, on\n * `box-shadow` only, so nothing moves. A still ring under reduced motion.\n */\nexport const MOTION_HINT_BEACON = \"matrx-motion-hint-beacon\";\n\n/**\n * Every motion class the package ships, for the guards. If a rule for one of\n * these is missing from `styles.css`, a component animates in no consumer and\n * says nothing about it — the C26 failure this list exists to make loud.\n */\nexport const ALL_MOTION_CLASSES = [\n MOTION_OVERLAY,\n MOTION_DIALOG,\n MOTION_BOTTOM_SHEET,\n MOTION_POPPER,\n ...Object.values(MOTION_SHEET),\n MOTION_PULSE,\n MOTION_SHIMMER,\n MOTION_SPIN,\n MOTION_HINT_BEACON,\n] as const;\n\n/**\n * The host-plugin utilities this package is forbidden to emit. They are\n * supplied by `tailwindcss-animate` / `tw-animate-css`, which is a HOST CSS\n * entry concern a package cannot declare a dependency on: three of the four\n * AI Matrx consumers never loaded it, so every surface wearing these appeared\n * with no animation and no error. `styles.test.ts` fails the build if one\n * comes back.\n */\nexport const FORBIDDEN_HOST_MOTION_UTILITIES = [\n \"animate-in\",\n \"animate-out\",\n \"fade-in\",\n \"fade-out\",\n \"zoom-in\",\n \"zoom-out\",\n \"slide-in-from\",\n \"slide-out-to\",\n \"animate-accordion\",\n \"animate-slide-down\",\n \"animate-slide-up\",\n \"animate-pulse\",\n \"animate-spin\",\n] as const;\n\n/**\n * THE PANEL MOTION as a Tailwind class string (moved from matrx-frontend\n * `lib/motion/panel-motion.ts`): every panel, sidebar, dock, drawer and sheet\n * slides its size/position on the host's `--matrx-motion-duration-panel` /\n * `--matrx-motion-ease-panel` (tokens.css ships the standard). Pair it with the\n * transition property you animate (`transition-transform`, …).\n */\nexport const PANEL_MOTION_CLASS =\n \"duration-(--matrx-motion-duration-panel) ease-(--matrx-motion-ease-panel) motion-reduce:transition-none\";\nexport const PANEL_MOTION_DURATION_VAR = \"var(--matrx-motion-duration-panel)\";\nexport const PANEL_MOTION_EASE_VAR = \"var(--matrx-motion-ease-panel)\";\n","\"use client\";\n\n/**\n * Injected portal-container seam.\n *\n * The matrx-frontend original resolved nested portal targets through\n * `useNestedPortalContainer` (explicit prop > dialog content > popout body >\n * document.body) — a host-shaped hook wired to that app's dialog and\n * window-panel systems. The package inverts the seam: hosts provide the\n * resolved container through `PortalContainerProvider`; an explicit\n * `container` prop on a component still wins, and with neither the portal\n * falls through to `document.body` (Radix default). Priority semantics are\n * unchanged from the original.\n */\n\nimport * as React from \"react\";\n\n// Shared identity across independently bundled public entrypoints/loaders.\nconst CONTEXT_SLOT = Symbol.for(\"ai-matrx.design-system.portal-container-context\");\nconst contextRegistry = globalThis as typeof globalThis & { [CONTEXT_SLOT]?: React.Context<HTMLElement | null | undefined> };\nconst PortalContainerContext = contextRegistry[CONTEXT_SLOT] ??= React.createContext<HTMLElement | null | undefined>(undefined);\n\nexport interface PortalContainerProviderProps {\n /** Where nested Radix portals (Popover, etc.) should mount. `null`/`undefined` → document.body. */\n container: HTMLElement | null | undefined;\n children: React.ReactNode;\n}\n\nexport function PortalContainerProvider({\n container,\n children,\n}: PortalContainerProviderProps) {\n return (\n <PortalContainerContext.Provider value={container ?? undefined}>\n {children}\n </PortalContainerContext.Provider>\n );\n}\n\n/**\n * Resolve a portal target: explicit prop (including an explicit `null`,\n * meaning \"the default body\") beats the injected container.\n */\nexport function usePortalContainer(\n explicit?: HTMLElement | null,\n): HTMLElement | undefined {\n const injected = React.useContext(PortalContainerContext);\n\n if (explicit !== undefined) {\n return explicit ?? undefined;\n }\n\n return injected ?? undefined;\n}\n","/**\n * THE TITLE TAKEOVER — every native `title` attribute in the document shows\n * as THE fleet tooltip instead of the browser's.\n *\n * Why this exists. A `title=` is the one tooltip nobody has to import, so it\n * is what every hand-written control reaches for: ~50 of them on an ordinary\n * matrx-frontend page (2026-09-28), next to the Radix tooltips on the tap\n * buttons. The browser draws those as a slow, unstyled system box, and a page\n * that mixes the two reads as having \"lost all of its tooltips\" (Arman,\n * 2026-09-28). Asking every author — human or agent — to wrap every control in\n * `<Tooltip>` is a rule that is broken the day it is written. So the\n * `TooltipProvider` every host already mounts at its root installs this layer,\n * and a `title` is simply a tooltip from then on. Nothing to remember.\n *\n * How it works. On hover (mouse or pen) or keyboard focus (`:focus-visible`)\n * of an element that carries a `title`, the attribute is lifted onto\n * `data-matrx-title` for exactly as long as the pointer or focus stays — so\n * the browser has nothing to show — and one shared, script-placed element\n * wearing `.matrx-tooltip` shows the text instead. When the pointer or focus\n * leaves, the `title` is put back, so assistive technology and every\n * `[title]` selector read the element exactly as authored the rest of the\n * time. Touch never shows it (a `title` has no touch affordance either).\n *\n * What it does not draw: a tooltip that only repeats text already readable in\n * full inside the element (it still draws when that text is hidden or\n * truncated).\n *\n * What it leaves alone:\n * - an element that is already a Radix tooltip trigger\n * (`[data-matrx-tooltip-trigger]`, stamped by `TooltipTrigger`): its\n * `title` is still lifted — two tooltips on one control was the other\n * half of the mess — but only the Radix one shows;\n * - anything inside `[data-native-title]` (the explicit opt-out);\n * - SVG `<title>` children, which are elements, not attributes.\n *\n * Placement. `tooltipSide` (THE SMART SIDE, below): beside a control in a\n * vertical stack, else the host's side; flipped when there is no room,\n * clamped into the viewport. `data-title-side=\"right\" | \"left\" | \"bottom\" |\n * \"top\"` on the element or any ancestor states a preferred side — a vertical\n * rail sets `right` once on its container.\n *\n * Installed at most once per document, reference-counted across every\n * mounted provider, and removed when the last one unmounts.\n */\n\n/**\n * THE SMART SIDE (Arman, 2026-10-15: tooltips \"don't show up intelligently\"). A tooltip never\n * covers the control next to its own. Where the control's neighbours stand decides the side:\n * - an explicit side (a prop, or `data-title-side` on the control or an ancestor below <html>) wins;\n * - an icon-sized control in a vertical stack (an icon column, a tool palette) has its neighbours\n * above and below, so it opens beside the control: right, or left when the control is in the\n * window's right half (an inspector column). A wide row in a list keeps the host's side: its\n * tooltip is the row's own text in full, and beside it would sit over the page next to the list;\n * - anywhere else (a toolbar, a row of buttons, a lone control) it opens on the host's default\n * side (`data-title-side` on <html>: macOS desktop hosts say \"bottom\"; the web's is \"top\").\n * Either way it flips to the other side when there is no room, and stays inside the window.\n */\nexport function tooltipSide(el: Element | null, fallback?: Side): Side {\n if (!el) return fallback ?? \"top\";\n const doc = el.ownerDocument;\n const hinted = el.closest(\"[data-title-side]\");\n const hint = hinted?.getAttribute(\"data-title-side\");\n const isSide = (v: string | null | undefined): v is Side => v === \"top\" || v === \"bottom\" || v === \"left\" || v === \"right\";\n if (hinted && hinted !== doc.documentElement && isSide(hint)) return hint;\n const base: Side = fallback ?? (isSide(hint) ? hint : \"top\");\n const box = el.getBoundingClientRect();\n if (box.width <= ICON_CONTROL_MAX_PX && stackDirection(el) === \"vertical\") {\n const vw = doc.defaultView?.innerWidth ?? 0;\n return vw > 0 && box.left + box.width / 2 > vw / 2 ? \"left\" : \"right\";\n }\n return base;\n}\n\n/** The widest control that counts as an icon (a navigator item, a palette tool). */\nconst ICON_CONTROL_MAX_PX = 64;\n\n/** How the control's nearest group of siblings is laid out, from where they actually are on screen. */\nfunction stackDirection(el: Element): \"vertical\" | \"horizontal\" | null {\n let node: Element | null = el;\n for (let depth = 0; node && depth < 4; depth++, node = node.parentElement) {\n const parent: Element | null = node.parentElement;\n if (!parent) return null;\n const me = node.getBoundingClientRect();\n if (me.width === 0 && me.height === 0) return null;\n let vertical = 0;\n let horizontal = 0;\n for (const sib of Array.from(parent.children)) {\n if (sib === node) continue;\n const r = sib.getBoundingClientRect();\n if (r.width === 0 || r.height === 0) continue;\n const overlapX = Math.min(me.right, r.right) - Math.max(me.left, r.left);\n const overlapY = Math.min(me.bottom, r.bottom) - Math.max(me.top, r.top);\n if (overlapX > 0.5 * Math.min(me.width, r.width) && overlapY <= 0) vertical++;\n else if (overlapY > 0.5 * Math.min(me.height, r.height) && overlapX <= 0) horizontal++;\n }\n if (vertical > 0 && horizontal === 0) return \"vertical\";\n if (horizontal > 0) return \"horizontal\";\n }\n return null;\n}\n\nexport const TITLE_TOOLTIP_ATTR = \"data-matrx-title\";\nexport const TOOLTIP_TRIGGER_ATTR = \"data-matrx-tooltip-trigger\";\nexport const NATIVE_TITLE_OPT_OUT_ATTR = \"data-native-title\";\n\nexport type Side = \"top\" | \"bottom\" | \"left\" | \"right\";\n\nconst OPEN_DELAY_MS = 350;\n/** Moving from one titled control to the next inside this window is instant. */\nconst SKIP_DELAY_MS = 500;\n/**\n * THE HOVER BRIDGE. Leaving the control does not close the tooltip at once: the pointer has this\n * long to reach the tooltip itself (Arman, 2026-10-14: a tooltip must stay long enough to put the\n * mouse on it and copy its text). Entering the tooltip holds it open.\n */\n/**\n * THE TOOLTIP LAYER — above every other layer, always (Arman, 2026-10-14: a tooltip \"coming up\n * behind the content\"). Menus and popovers share the modal tier (equal z, DOM order decides), so a\n * tooltip on that tier lost to any menu opened after it. A tooltip is transient and never takes a\n * press, so nothing ever needs to sit above it.\n */\nexport const TOOLTIP_LAYER_Z = 2_147_483_000;\n\nexport const TOOLTIP_CLOSE_DELAY_MS = 300;\nconst GAP_PX = 6;\nconst EDGE_PX = 8;\n/** How far every tooltip stays from the window's edge (both implementations). */\nexport const TOOLTIP_EDGE_PX = EDGE_PX;\n/**\n * A tooltip is a short hint, never a paragraph (Apple HIG: a tooltip is a few words): text past\n * this budget is cut at a word boundary with an ellipsis. Long detail belongs in a sheet or a\n * Copy details action, not on hover.\n */\nexport const TOOLTIP_TEXT_BUDGET = 140;\n\nexport function clipTooltipText(text: string, budget: number = TOOLTIP_TEXT_BUDGET): string {\n const flat = text.replace(/\\s+/g, \" \").trim();\n if (flat.length <= budget) return flat;\n const cut = flat.slice(0, budget - 1);\n const space = cut.lastIndexOf(\" \");\n return `${(space > budget * 0.6 ? cut.slice(0, space) : cut).replace(/[\\s,.;:–—-]+$/, \"\")}…`;\n}\n\nconst SURFACE_CLASS =\n \"matrx-tooltip matrx-title-tooltip matrx-motion-popper max-w-xs select-text rounded-md border border-border bg-popover px-2.5 py-1 text-xs font-medium text-popover-foreground\";\n\ninterface Installation {\n count: number;\n uninstall: () => void;\n}\n\n/**\n * Keyed on the document itself through a registered symbol, never a module\n * WeakMap: tsup bundles this module into more than one entry (`index`,\n * `tap-target`), and two module copies each holding their own map would\n * install twice — two listeners, two surfaces.\n */\nconst INSTALLATION_KEY = Symbol.for(\"@ai-matrx/design-system/title-tooltips\");\ntype DocumentWithInstallation = Document & { [INSTALLATION_KEY]?: Installation };\nconst installations = {\n get: (doc: Document) => (doc as DocumentWithInstallation)[INSTALLATION_KEY],\n set: (doc: Document, value: Installation) => {\n (doc as DocumentWithInstallation)[INSTALLATION_KEY] = value;\n },\n delete: (doc: Document) => {\n delete (doc as DocumentWithInstallation)[INSTALLATION_KEY];\n },\n};\n\n/** Install the takeover on `doc`. Returns the release function. */\nexport function acquireTitleTooltips(doc: Document | undefined = typeof document === \"undefined\" ? undefined : document): () => void {\n if (!doc) return () => {};\n const existing = installations.get(doc);\n if (existing) {\n existing.count += 1;\n } else {\n installations.set(doc, { count: 1, uninstall: install(doc) });\n }\n let released = false;\n return () => {\n if (released) return;\n released = true;\n const current = installations.get(doc);\n if (!current) return;\n current.count -= 1;\n if (current.count <= 0) {\n current.uninstall();\n installations.delete(doc);\n }\n };\n}\n\nfunction install(doc: Document): () => void {\n const win = doc.defaultView;\n let active: HTMLElement | null = null;\n let surface: HTMLDivElement | null = null;\n let openTimer: ReturnType<typeof setTimeout> | undefined;\n let closeTimer: ReturnType<typeof setTimeout> | undefined;\n let lastClosedAt = 0;\n /** A press began on the tooltip (selecting its text): it must not close until release. */\n let holding = false;\n\n const HTMLElementCtor = win?.HTMLElement;\n\n const titledAncestor = (node: EventTarget | null): HTMLElement | null => {\n if (!HTMLElementCtor || !(node instanceof win!.Node)) return null;\n const start = node instanceof HTMLElementCtor ? node : (node as Node).parentElement;\n if (!start) return null;\n const el = start.closest<HTMLElement>(`[title], [${TITLE_TOOLTIP_ATTR}]`);\n if (!el || !(el instanceof HTMLElementCtor)) return null;\n if (el.closest(`[${NATIVE_TITLE_OPT_OUT_ATTR}]`)) return null;\n return el;\n };\n\n const textOf = (el: HTMLElement) => clipTooltipText(el.getAttribute(TITLE_TOOLTIP_ATTR) ?? el.getAttribute(\"title\") ?? \"\");\n\n const lift = (el: HTMLElement) => {\n const title = el.getAttribute(\"title\");\n if (title === null) return;\n el.setAttribute(TITLE_TOOLTIP_ATTR, title);\n el.removeAttribute(\"title\");\n };\n\n const restore = (el: HTMLElement) => {\n const held = el.getAttribute(TITLE_TOOLTIP_ATTR);\n if (held === null) return;\n // An author who changed or removed the title while it was lifted wins:\n // only put ours back when nothing re-set it in the meantime.\n if (!el.hasAttribute(\"title\")) el.setAttribute(\"title\", held);\n el.removeAttribute(TITLE_TOOLTIP_ATTR);\n };\n\n const ensureSurface = () => {\n if (surface && surface.isConnected) return surface;\n surface = doc.createElement(\"div\");\n surface.setAttribute(\"role\", \"tooltip\");\n surface.setAttribute(\"data-slot\", \"title-tooltip\");\n surface.className = SURFACE_CLASS;\n surface.style.position = \"fixed\";\n surface.style.zIndex = String(TOOLTIP_LAYER_Z);\n surface.style.visibility = \"hidden\";\n doc.body.appendChild(surface);\n return surface;\n };\n\n /**\n * THE PART OF `el` A PERSON CAN SEE: its box clipped by every ancestor that clips (scrolls or hides\n * overflow) and by the window. A truncated cell in a sideways-scrolling table is far wider than its\n * visible part; anchored to the whole box the tooltip landed at the window's edge (2026-10-14).\n */\n const visibleRect = (el: HTMLElement, vw: number, vh: number) => {\n const box = el.getBoundingClientRect();\n let left = box.left;\n let top = box.top;\n let right = box.right;\n let bottom = box.bottom;\n for (let node = el.parentElement; node && node !== doc.body && node !== doc.documentElement; node = node.parentElement) {\n const cs = win?.getComputedStyle(node);\n if (!cs) break;\n const clipsX = cs.overflowX !== \"visible\" || cs.overflow === \"hidden\";\n const clipsY = cs.overflowY !== \"visible\" || cs.overflow === \"hidden\";\n if (!clipsX && !clipsY) continue;\n const clip = node.getBoundingClientRect();\n if (clipsX) { left = Math.max(left, clip.left); right = Math.min(right, clip.right); }\n if (clipsY) { top = Math.max(top, clip.top); bottom = Math.min(bottom, clip.bottom); }\n }\n left = Math.max(left, 0);\n top = Math.max(top, 0);\n right = Math.min(right, vw || right);\n bottom = Math.min(bottom, vh || bottom);\n // Nothing of it is visible (scrolled away under the pointer is impossible, but a test DOM can say so): the box itself.\n if (right <= left || bottom <= top) return box;\n return { left, top, right, bottom, width: right - left, height: bottom - top };\n };\n\n const preferredSide = (el: HTMLElement): Side => tooltipSide(el);\n\n const place = (el: HTMLElement, node: HTMLDivElement) => {\n // The VISIBLE viewport, not the window: inside a clipped host (the kind\n // sandbox frame is window-wide but shown only at its column) the visual\n // viewport is what the reader sees, so a tooltip never lands past it.\n const vw = win?.visualViewport?.width ?? win?.innerWidth ?? 0;\n const vh = win?.visualViewport?.height ?? win?.innerHeight ?? 0;\n const anchor = visibleRect(el, vw, vh);\n const box = node.getBoundingClientRect();\n const fits: Record<Side, boolean> = {\n top: anchor.top - GAP_PX - box.height >= EDGE_PX,\n bottom: anchor.bottom + GAP_PX + box.height <= vh - EDGE_PX,\n left: anchor.left - GAP_PX - box.width >= EDGE_PX,\n right: anchor.right + GAP_PX + box.width <= vw - EDGE_PX,\n };\n const opposite: Record<Side, Side> = { top: \"bottom\", bottom: \"top\", left: \"right\", right: \"left\" };\n const wanted = preferredSide(el);\n const side: Side = fits[wanted] ? wanted : fits[opposite[wanted]] ? opposite[wanted] : wanted;\n\n let x: number;\n let y: number;\n if (side === \"top\" || side === \"bottom\") {\n x = anchor.left + anchor.width / 2 - box.width / 2;\n y = side === \"top\" ? anchor.top - GAP_PX - box.height : anchor.bottom + GAP_PX;\n } else {\n y = anchor.top + anchor.height / 2 - box.height / 2;\n x = side === \"left\" ? anchor.left - GAP_PX - box.width : anchor.right + GAP_PX;\n }\n x = Math.min(Math.max(x, EDGE_PX), Math.max(EDGE_PX, vw - EDGE_PX - box.width));\n y = Math.min(Math.max(y, EDGE_PX), Math.max(EDGE_PX, vh - EDGE_PX - box.height));\n // Placed with `left`/`top`, NEVER `transform`: the open animation\n // (`.matrx-motion-popper`) animates `transform`, and a running animation\n // overrides an inline transform — the chip sat at the page's top-left\n // corner for the whole animation, then jumped to its control (2026-10-08).\n node.style.left = `${Math.round(x)}px`;\n node.style.top = `${Math.round(y)}px`;\n node.setAttribute(\"data-side\", side);\n };\n\n const isShown = (node: HTMLElement, root: HTMLElement) => {\n const rect = node.getBoundingClientRect();\n if (rect.width <= 0 || rect.height <= 0) return false;\n for (let cur: HTMLElement | null = node; cur; cur = cur === root ? null : cur.parentElement) {\n const cs = win?.getComputedStyle(cur);\n if (!cs) return false;\n if (cs.display === \"none\" || cs.visibility === \"hidden\" || Number(cs.opacity) === 0) return false;\n }\n return true;\n };\n\n /**\n * A tooltip that repeats text the person can already read in full is noise\n * (an expanded sidebar row, a \"Save\" button titled \"Save\"). It still shows\n * when that text is hidden (a collapsed rail's label) or cut off\n * (truncated) — the two cases a title exists for.\n */\n const isClipped = (host: HTMLElement, root: HTMLElement) => {\n for (let node: HTMLElement | null = host; node; node = node.parentElement) {\n if (node.scrollWidth > node.clientWidth + 1 && node.clientWidth > 0) return true;\n if (node.scrollHeight > node.clientHeight + 1 && node.clientHeight > 0) return true;\n if (node === root) break;\n }\n return false;\n };\n\n const repeatsVisibleText = (el: HTMLElement, text: string) => {\n const norm = (t: string) => t.replace(/\\s+/g, \" \").trim().toLowerCase();\n const want = norm(text);\n if (!want || !win) return false;\n const walker = doc.createTreeWalker(el, win.NodeFilter.SHOW_TEXT);\n for (let node = walker.nextNode(); node; node = walker.nextNode()) {\n if (norm(node.textContent ?? \"\") !== want) continue;\n const host = node.parentElement;\n if (!host || !isShown(host, el)) continue;\n // Cut off is measured on the BOX that clips: an inline host (a span inside a truncating\n // cell) has no box width of its own, so every ancestor up to the titled element is asked.\n if (isClipped(host, el)) continue;\n return true;\n }\n return false;\n };\n\n const show = (el: HTMLElement, instant: boolean) => {\n if (active !== el) return;\n // A Radix tooltip trigger shows its own tooltip — never a second one.\n if (el.closest(`[${TOOLTIP_TRIGGER_ATTR}]`)) return;\n const text = textOf(el);\n if (!text || !el.isConnected) return;\n if (repeatsVisibleText(el, text)) return;\n const node = ensureSurface();\n node.textContent = text;\n node.style.visibility = \"hidden\";\n // Measure and place BEFORE the open state starts the animation: measured\n // mid-animation the box reads at its 0.95 entry scale and lands off-centre.\n node.removeAttribute(\"data-state\");\n // The surface is ONE shared fixed element that keeps the `left` of its last\n // placement. Measured there, a longer text wraps against the room that is\n // left of the OLD spot, reads one line too tall, and lands a line too high\n // once it moves (the sandbox tooltip spec caught a 16px extra gap). Rewind\n // to the origin so the box is measured at its natural, unwrapped size.\n node.style.left = \"0px\";\n node.style.top = \"0px\";\n place(el, node);\n node.setAttribute(\"data-state\", instant ? \"instant-open\" : \"delayed-open\");\n node.style.visibility = \"visible\";\n if (el.id) node.id = `${el.id}-title-tooltip`;\n };\n\n const hide = () => {\n if (openTimer !== undefined) clearTimeout(openTimer);\n openTimer = undefined;\n cancelClose();\n holding = false;\n if (surface && surface.style.visibility === \"visible\") lastClosedAt = Date.now();\n if (surface) {\n surface.style.visibility = \"hidden\";\n surface.removeAttribute(\"data-state\");\n }\n };\n\n const cancelClose = () => {\n if (closeTimer !== undefined) clearTimeout(closeTimer);\n closeTimer = undefined;\n };\n\n const inSurface = (node: EventTarget | null) =>\n !!surface && !!win && node instanceof win.Node && surface.contains(node);\n\n const hasSelectionInSurface = () => {\n const sel = win?.getSelection();\n return !!sel && !sel.isCollapsed && !!surface && !!sel.anchorNode && surface.contains(sel.anchorNode);\n };\n\n /** Close after the bridge delay unless the pointer reached the tooltip or text in it is selected. */\n const scheduleClose = () => {\n cancelClose();\n // Nothing is showing yet (the open delay has not run, or the text was not worth drawing): there is\n // nothing to bridge to, so leaving simply cancels.\n if (!surface || surface.style.visibility !== \"visible\") {\n deactivate();\n return;\n }\n closeTimer = setTimeout(() => {\n closeTimer = undefined;\n if (holding || hasSelectionInSurface()) return;\n deactivate();\n }, TOOLTIP_CLOSE_DELAY_MS);\n };\n\n const activate = (el: HTMLElement) => {\n cancelClose();\n if (active === el) return;\n deactivate();\n active = el;\n lift(el);\n const instant = Date.now() - lastClosedAt < SKIP_DELAY_MS;\n if (instant) show(el, true);\n else openTimer = setTimeout(() => show(el, false), OPEN_DELAY_MS);\n };\n\n const deactivate = () => {\n hide();\n if (active) restore(active);\n active = null;\n };\n\n // A touch has no hover: the tap that focuses a button must not open its tooltip, and a tooltip\n // that is open when a finger lands closes. The compat mouse events and the focus a tap leaves\n // behind used to pin \"Copy chart source\" over the chart title on a phone (review 5, G13).\n let lastTouchAt = Number.NEGATIVE_INFINITY;\n const TOUCH_FOCUS_WINDOW_MS = 1000;\n const onPointerOver = (e: PointerEvent) => {\n if (e.pointerType === \"touch\") {\n lastTouchAt = Date.now();\n if (active) deactivate();\n return;\n }\n if (inSurface(e.target)) {\n cancelClose();\n return;\n }\n if (holding || hasSelectionInSurface()) {\n // Text is being selected in the tooltip: another control passing under the pointer must not replace it.\n return;\n }\n const el = titledAncestor(e.target);\n if (el) activate(el);\n else if (active && closeTimer === undefined) scheduleClose();\n };\n\n const onPointerOut = (e: PointerEvent) => {\n if (!active) return;\n const next = e.relatedTarget;\n if (next instanceof win!.Node && (active.contains(next) || inSurface(next))) return;\n if (inSurface(e.target)) {\n if (holding) return;\n scheduleClose();\n return;\n }\n scheduleClose();\n };\n\n const onPointerDown = (e: PointerEvent) => {\n if (e.pointerType === \"touch\") lastTouchAt = Date.now();\n if (inSurface(e.target)) {\n // Selecting the tooltip's text: keep it open until the press ends.\n holding = true;\n cancelClose();\n return;\n }\n deactivate();\n };\n\n const onPointerUp = () => {\n if (!holding) return;\n holding = false;\n if (!hasSelectionInSurface()) scheduleClose();\n };\n\n const onFocusIn = (e: FocusEvent) => {\n if (Date.now() - lastTouchAt < TOUCH_FOCUS_WINDOW_MS) return;\n const el = titledAncestor(e.target);\n if (!el) return;\n let visible = true;\n try {\n visible = (e.target as Element).matches(\":focus-visible\");\n } catch {\n visible = true;\n }\n if (visible) activate(el);\n };\n\n const onFocusOut = (e: FocusEvent) => {\n if (!active) return;\n const next = e.relatedTarget;\n if (next instanceof win!.Node && active.contains(next)) return;\n deactivate();\n };\n\n const onDismiss = (e?: Event) => {\n if (e && inSurface(e.target)) return;\n deactivate();\n };\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key === \"Escape\") deactivate();\n };\n\n doc.addEventListener(\"pointerover\", onPointerOver, true);\n doc.addEventListener(\"pointerout\", onPointerOut, true);\n doc.addEventListener(\"focusin\", onFocusIn, true);\n doc.addEventListener(\"focusout\", onFocusOut, true);\n doc.addEventListener(\"pointerdown\", onPointerDown, true);\n doc.addEventListener(\"pointerup\", onPointerUp, true);\n doc.addEventListener(\"keydown\", onKeyDown, true);\n doc.addEventListener(\"scroll\", onDismiss, true);\n win?.addEventListener(\"blur\", onDismiss);\n\n return () => {\n deactivate();\n doc.removeEventListener(\"pointerover\", onPointerOver, true);\n doc.removeEventListener(\"pointerout\", onPointerOut, true);\n doc.removeEventListener(\"focusin\", onFocusIn, true);\n doc.removeEventListener(\"focusout\", onFocusOut, true);\n doc.removeEventListener(\"pointerdown\", onPointerDown, true);\n doc.removeEventListener(\"pointerup\", onPointerUp, true);\n doc.removeEventListener(\"keydown\", onKeyDown, true);\n doc.removeEventListener(\"scroll\", onDismiss, true);\n win?.removeEventListener(\"blur\", onDismiss);\n surface?.remove();\n surface = null;\n };\n}\n","\"use client\";\n\n// THE TAP-TARGET GUARD — development builds only.\n//\n// The lock layer in tap-target.css makes a tap button's own box, pill and\n// glyph impossible to resize from outside. What CSS cannot stop is a caller\n// bending the system AROUND the button: a parent that adds `gap` between two\n// tap buttons, a wrapper with margin or padding, a local override of a\n// `--matrx-tap-*` token, a utility class smuggled in through `className`.\n// After a tap button mounts, this guard measures it in the real layout and,\n// on any of those, marks it `data-matrx-tap-violation`: the stylesheet then\n// paints it as a giant red box carrying the reason, and the console names\n// the element.\n//\n// OFF until the host turns it on with `enableTapTargetGuard()` — from code the\n// HOST compiles, e.g. matrx-frontend's dev-only client boot. Never gate it on\n// `process.env.NODE_ENV` in here: this package's own build inlines that\n// expression, so a \"dev only\" check written here would run in production too\n// (see @ai-matrx/associations' context.tsx for the outage that taught this).\n\nimport { useCallback, useRef, type MutableRefObject, type Ref } from \"react\";\nimport { layoutScale } from \"../layout-scale\";\n\n// A `Symbol.for` slot on globalThis, like the link seam: the `.` and\n// `./buttons` bundles each inline this module, and one switch must reach both.\nconst GUARD_SLOT = Symbol.for(\"@ai-matrx/tap-target:guard\");\ntype GlobalWithGuard = typeof globalThis & { [GUARD_SLOT]?: boolean };\n\n/** Turn the development guard on (or off). Call once at client boot, only in\n * development builds of the host. */\nexport function enableTapTargetGuard(on = true): void {\n (globalThis as GlobalWithGuard)[GUARD_SLOT] = on;\n if (on) startPillInsetScan();\n}\n\nfunction guardOn(): boolean {\n return (globalThis as GlobalWithGuard)[GUARD_SLOT] === true;\n}\n\nconst TOKENS = [\n \"--matrx-tap-box\",\n \"--matrx-tap-gap\",\n \"--matrx-tap-pill-size\",\n \"--matrx-tap-pill-sm-size\",\n \"--matrx-tap-wide-size\",\n \"--matrx-tap-icon-size\",\n \"--matrx-tap-touch-min\",\n \"--matrx-tap-target-size\",\n] as const;\n\n/** The only scopes that may move tap tokens, and which ones — each owned by\n * this package's own CSS: the table density scales (tap-target.css) and\n * Alchemy's 18px trigger glyph (content-transfer.css). */\nconst SANCTIONED: ReadonlyArray<{ scope: string; tokens: ReadonlySet<string> }> = [\n {\n scope: \"[data-matrx-table][data-matrx-table-density]\",\n tokens: new Set([\n \"--matrx-tap-target-size\",\n \"--matrx-tap-pill-size\",\n \"--matrx-tap-wide-size\",\n \"--matrx-tap-pill-sm-size\",\n \"--matrx-tap-icon-size\",\n ]),\n },\n { scope: \"[data-alchemy-trigger]\", tokens: new Set([\"--matrx-tap-icon-size\"]) },\n // THE ONE CONTROL scope (controls.css): tap buttons beside the 28px controls\n // take the controls' height — a 28px pill in a 34px box, the same 6px apart.\n {\n scope: \"[data-matrx-controls]\",\n tokens: new Set([\n \"--matrx-tap-target-size\",\n \"--matrx-tap-pill-size\",\n \"--matrx-tap-wide-size\",\n \"--matrx-tap-pill-sm-size\",\n ]),\n },\n];\nconst TABLE_SCOPE = SANCTIONED[0]!.scope;\nconst CONTROL_SCOPE = SANCTIONED[2]!.scope;\nconst TAP_ITEM = \".matrx-tap-target, .matrx-tap-group\";\n\n/** `className` on a tap button is the GLYPH COLOR. Anything that sizes,\n * spaces, positions or fills is misuse. */\nconst NON_COLOR_CLASS =\n /^(?:[^\\s:]+:)*!?-?(?:\\[&|scale|translate|h|w|size|min-h|min-w|max-h|max-w|p|px|py|ps|pe|pt|pb|pl|pr|m|mx|my|ms|me|mt|mb|ml|mr|gap|space-x|space-y|bg|rounded|border|ring|shadow|absolute|relative|fixed|sticky|inset|top|left|right|bottom|flex|grid|block|inline|hidden|z|shrink|grow|basis|self|order)(?:-|$|\\[)/;\n\nexport function classNameMisuse(className: string | undefined): string | null {\n if (!guardOn() || !className) return null;\n const bad = className.split(/\\s+/).filter((t) => t && NON_COLOR_CLASS.test(t));\n return bad.length\n ? `className is the glyph color only — remove \"${bad.join(\" \")}\"`\n : null;\n}\n\n/**\n * The horizontal space a wrapper adds around what it holds. An `auto` margin (`ml-auto` pushing a\n * toolbar's actions to the end) only aligns — the browser resolves it to pixels in\n * `getComputedStyle`, so read the computed keyword from the typed OM and count it as zero.\n */\nexport function wrapperSpace(el: Element, view: Window): number {\n const pcs = view.getComputedStyle(el);\n const typed = (el as Element & { computedStyleMap?: () => { get(p: string): unknown } }).computedStyleMap?.();\n const margin = (prop: \"margin-left\" | \"margin-right\", resolved: string) =>\n typed && String(typed.get(prop)) === \"auto\" ? 0 : px(resolved);\n return margin(\"margin-left\", pcs.marginLeft) + margin(\"margin-right\", pcs.marginRight) + px(pcs.paddingLeft) + px(pcs.paddingRight);\n}\n\nfunction px(value: string): number {\n const n = Number.parseFloat(value);\n return Number.isFinite(n) ? n : 0;\n}\n\nfunction describe(el: Element): string {\n const cls = typeof el.className === \"string\" ? el.className.trim().split(/\\s+/).slice(0, 4).join(\".\") : \"\";\n return `<${el.tagName.toLowerCase()}${cls ? `.${cls}` : \"\"}>`;\n}\n\n/** Elements that ride along with a tap button without taking space from it\n * (a badge, a capsule, a tooltip portal anchor). */\nfunction isDecor(el: Element, view: Window): boolean {\n const cs = view.getComputedStyle(el);\n return cs.position === \"absolute\" || cs.position === \"fixed\" || cs.display === \"none\";\n}\n\nfunction tapCount(el: Element): number {\n return el.matches(TAP_ITEM) ? 1 : el.querySelectorAll(TAP_ITEM).length;\n}\n\n/** Visible text in `container` outside `tap` and outside decor (a badge's\n * count is decor) — a wrapper with its own words is a chip, not a wrapper. */\nfunction ownText(container: Element, tap: Element, view: Window): string {\n let out = \"\";\n const walk = (node: Node) => {\n if (node === tap) return;\n if (node.nodeType === 3) out += node.textContent ?? \"\";\n else if (node.nodeType === 1 && !isDecor(node as Element, view)) node.childNodes.forEach(walk);\n };\n container.childNodes.forEach(walk);\n return out.trim();\n}\n\n/** True when `child` is a tap button, or a plain wrapper whose only content\n * is ONE tap button (plus decor) — never a search box that happens to hold\n * a clear button, never a chip with words. */\nfunction isTapSlot(child: Element, view: Window): boolean {\n if (child.matches(TAP_ITEM)) return true;\n if (tapCount(child) !== 1) return false;\n const tap = child.querySelector(TAP_ITEM)!;\n const controls = Array.from(child.querySelectorAll(\"input, select, textarea, button, a, [role='button']\"));\n if (controls.some((c) => c !== tap && !tap.contains(c))) return false;\n return ownText(child, tap, view) === \"\";\n}\n\nlet probe: { key: string; target: number; pill: number; sm: number; smPill: number; wide: number; icon: number } | null = null;\n\n/** What the package's own CSS produces with no surrounding context — the\n * canon every mounted button is measured against. Re-measured whenever the\n * root tokens change (the lab page switches the gap). */\nfunction canon(doc: Document) {\n const view = doc.defaultView!;\n const root = view.getComputedStyle(doc.documentElement);\n const key = TOKENS.map((t) => root.getPropertyValue(t)).join(\"|\");\n if (probe?.key === key) return probe;\n const host = doc.createElement(\"div\");\n host.setAttribute(\"aria-hidden\", \"true\");\n host.style.cssText = \"position:absolute;visibility:hidden;pointer-events:none;left:-9999px;top:0\";\n host.innerHTML =\n '<button class=\"matrx-tap-target\"><div class=\"matrx-tap-pill\"><svg class=\"matrx-tap-icon\"></svg></div></button>' +\n '<button class=\"matrx-tap-target matrx-tap-target-sm\"><div class=\"matrx-tap-pill matrx-tap-pill-sm\"></div></button>' +\n '<button class=\"matrx-tap-target matrx-tap-target-inline\"><div class=\"matrx-tap-pill matrx-tap-pill-inline\"></div></button>';\n doc.body.appendChild(host);\n const [a, b, w] = Array.from(host.children) as HTMLElement[];\n probe = {\n key,\n target: a!.offsetHeight,\n pill: (a!.firstElementChild as HTMLElement).offsetHeight,\n icon: px(view.getComputedStyle(a!.querySelector(\"svg\")!).height),\n sm: b!.offsetHeight,\n smPill: (b!.firstElementChild as HTMLElement).offsetHeight,\n wide: (w!.firstElementChild as HTMLElement).offsetHeight,\n };\n host.remove();\n return probe;\n}\n\n/** Returns the first rule this mounted tap button breaks, or null. */\nexport function findTapViolation(el: HTMLElement): string | null {\n const doc = el.ownerDocument;\n const view = doc.defaultView;\n if (!view || !el.isConnected) return null;\n const cs = view.getComputedStyle(el);\n if (cs.display === \"none\") return null;\n\n // 1. Tokens are the package's alone. Only the table-density scope may move\n // the three it owns.\n const root = view.getComputedStyle(doc.documentElement);\n // Both scaled scopes size by their own tokens; the canon check below reads\n // the root canon, so it applies outside them only.\n const inTable = el.closest(TABLE_SCOPE) !== null || el.closest(CONTROL_SCOPE) !== null;\n const moved = new Set<string>();\n for (const token of TOKENS) {\n const mine = cs.getPropertyValue(token).trim();\n const base = root.getPropertyValue(token).trim();\n if (mine === base) continue;\n if (!SANCTIONED.some((s) => s.tokens.has(token) && el.closest(s.scope))) {\n return `${token} overridden to \"${mine}\" — tap geometry is not configurable`;\n }\n moved.add(token);\n }\n\n // 2. Measured geometry equals the canon (outside table density, which\n // sizes by its own tokens).\n const sm = el.classList.contains(\"matrx-tap-target-sm\");\n const inline = /matrx-tap-target-(?:inline|mobile-icon-only)/.test(el.className);\n const pill = el.querySelector<HTMLElement>(\":scope > .matrx-tap-pill\");\n const icon = pill?.querySelector(\".matrx-tap-icon\") ?? null;\n // A host touch floor (min-width / min-height) may enlarge a box; that is\n // the floor working, not a bend.\n const floored =\n px(cs.minHeight) >= el.offsetHeight - 0.5 || px(cs.minWidth) >= el.offsetWidth - 0.5;\n if (!inTable && pill && !floored) {\n const c = canon(doc);\n const box = sm ? c.sm : c.target;\n // A labeled pill is a WIDE shape (shorter than a round one); below the\n // `sm` breakpoint a mobile-icon-only pill is round again — either is canon.\n const pillSizes = sm ? [c.smPill] : inline ? [c.pill, c.wide] : [c.pill];\n if (Math.abs(el.offsetHeight - box) > 0.5) return `button is ${el.offsetHeight}px tall, canon is ${box}px`;\n if (!inline && Math.abs(el.offsetWidth - box) > 0.5) return `button is ${el.offsetWidth}px wide, canon is ${box}px`;\n if (!pillSizes.some((p) => Math.abs(pill.offsetHeight - p) <= 0.5)) {\n return `pill is ${pill.offsetHeight}px, canon is ${pillSizes.join(\" or \")}px`;\n }\n if (icon && !moved.has(\"--matrx-tap-icon-size\")) {\n const size = px(view.getComputedStyle(icon).height);\n if (Math.abs(size - c.icon) > 0.5) return `glyph is ${size}px, canon is ${c.icon}px`;\n }\n }\n\n // 3. Nothing adds space around it. Climb the wrappers that hold only this\n // button (plus decor such as a badge); none may carry inline margin or\n // padding. A tap button inside a group is represented by its group.\n let slot: Element = el;\n if (el.parentElement?.matches(\".matrx-tap-group-row, .matrx-tap-search-measure\")) {\n const group = el.closest(\".matrx-tap-group\");\n if (group && tapCount(el.parentElement) > 1) return null;\n slot = group ?? el;\n }\n for (let depth = 0; depth < 2; depth += 1) {\n const parent: HTMLElement | null = slot.parentElement;\n if (!parent || parent === doc.body) break;\n const others = Array.from(parent.children).filter((c) => c !== slot && !isDecor(c, view));\n if (others.length > 0) break; // `parent` is the row\n if (ownText(parent, slot, view) !== \"\") break; // a chip or a titled header\n const space = wrapperSpace(parent, view);\n if (space > 0.5) {\n return `${describe(parent)} adds ${space}px around a tap button — tap buttons space themselves`;\n }\n slot = parent;\n }\n\n // 4. The row adds no gap between tap buttons.\n const row = slot.parentElement;\n if (row) {\n const rcs = view.getComputedStyle(row);\n const flexOrGrid = /flex|grid/.test(rcs.display);\n const neighbours = Array.from(row.children).filter((c) => c !== slot && isTapSlot(c, view));\n if (flexOrGrid && neighbours.length > 0) {\n const horizontal = rcs.display.includes(\"grid\") || !rcs.flexDirection.startsWith(\"column\");\n const gap = px(horizontal ? rcs.columnGap : rcs.rowGap);\n if (gap > 0.5) {\n return `${describe(row)} adds a ${gap}px gap between tap buttons — remove it; tap buttons space themselves`;\n }\n }\n }\n return null;\n}\n\n/* ------------------------------------------------------------------ */\n/* PLACEMENT — the three rules a tap button's SURROUNDINGS must keep */\n/* (owner, 2026-10-02). Reported as a WARNING (a dashed outline and one */\n/* console error naming the fix), not the misuse box: they are about */\n/* the page around the button, and the whole app is being brought into */\n/* line with them. */\n/* 1. GLASS ONLY FLOATS — glass is see-through; it belongs on a bar */\n/* that floats over moving content (position fixed/sticky) or on a */\n/* plane marked `data-matrx-glass-plane`. On a page, card, toast or */\n/* table use `variant=\"transparent\"` / a solid group. */\n/* 2. ALL GLASS OR NONE — a glass item's row holds only glass items */\n/* (glass tap buttons, glass groups, or `data-matrx-glass` pieces). */\n/* 3. NEIGHBOURS KEEP THEIR HALF-GAP — a tap box carries 3px of unseen */\n/* space each side (box − pill = one gap, 6px). Anything beside it */\n/* adds its own 3px, so the visible distance is always one gap. */\n/* ------------------------------------------------------------------ */\n\nconst GLASS = \".matrx-glass-thin-border, .matrx-glass-interactive\";\n\nfunction isGlassItem(node: Element): boolean {\n if (node.hasAttribute(\"data-matrx-glass\")) return true;\n if (node.matches(\".matrx-tap-group\")) return node.querySelector(\":scope > .matrx-tap-group-capsule.matrx-glass-thin-border\") !== null;\n if (node.matches(\".matrx-tap-target\")) return node.querySelector(`:scope > .matrx-tap-pill:is(${GLASS})`) !== null;\n // A plain wrapper whose only content is ONE tap button (plus decor such as a\n // badge) is that button: a badge host around a glass button is glass.\n const view = node.ownerDocument.defaultView;\n if (view && isTapSlot(node, view)) return isGlassItem(node.querySelector(TAP_ITEM)!);\n return false;\n}\n\nconst SCROLLS = /^(auto|scroll|overlay)$/;\n\n/** True when `el` rides a bar over moving content: a fixed/sticky ancestor (or\n * a glass plane) reached BEFORE any scroll container. Inside a scroller the\n * button IS the moving content — an app root that is itself `position:\n * fixed` (the shell) must not make every page button \"float\". */\nfunction floats(el: Element, view: Window): boolean {\n for (let n: Element | null = el; n && n !== el.ownerDocument.body; n = n.parentElement) {\n if (n.hasAttribute(\"data-matrx-glass-plane\")) return true;\n const cs = view.getComputedStyle(n);\n if (cs.position === \"fixed\" || cs.position === \"sticky\") return true;\n if (n !== el && (SCROLLS.test(cs.overflowY) || SCROLLS.test(cs.overflowX))) return false;\n }\n return false;\n}\n\n/** True when the edge of `wrapper` that faces a neighbour (`side` is where the\n * wrapper sits relative to that neighbour) is itself a tap slot: that button\n * carries its own 3px half-gap, so the wrapper is spacing-correct however many\n * tap buttons it holds (the fading mic + More cluster beside Send). A wrapper\n * whose edge is text or a field is not — it still has to keep its distance. */\nfunction facesWithTapSlot(wrapper: Element, side: \"after\" | \"before\", view: Window): boolean {\n for (let node: Element | null = wrapper; node; ) {\n if (isTapSlot(node, view)) return true;\n const kids: Element[] = Array.from(node.children).filter((c) => !isDecor(c, view));\n node = (side === \"after\" ? kids[0] : kids[kids.length - 1]) ?? null;\n }\n return false;\n}\n\nfunction visible(el: Element, view: Window): boolean {\n if (el.getAttribute(\"aria-hidden\") === \"true\" || isDecor(el, view)) return false;\n const r = el.getBoundingClientRect();\n return r.width > 1 && r.height > 1;\n}\n\nconst INTERACTIVE = \"button, a[href], input, select, textarea, [role='button'], svg, img\";\n\n/** The box the eye sees on the side of `sib` that faces the tap button. An\n * unpainted layout wrapper (no fill, no border on that side, no words of its\n * own) is invisible, so the distance is judged at the first thing inside it —\n * the wrapper around ProTextarea's mic sits 3px from Expand while the mic\n * capsule, which keeps its own 3px margin, sits one gap away (2026-10-13). */\nfunction facingBox(sib: Element, side: \"after\" | \"before\", view: Window): Element {\n let node = sib;\n for (;;) {\n if (node.matches(INTERACTIVE)) return node;\n const cs = view.getComputedStyle(node);\n const fill = cs.backgroundColor;\n if ((fill && fill !== \"rgba(0, 0, 0, 0)\" && fill !== \"transparent\") || px(side === \"after\" ? cs.borderLeftWidth : cs.borderRightWidth) > 0) {\n return node;\n }\n if (Array.from(node.childNodes).some((c) => c.nodeType === 3 && c.textContent?.trim())) return node;\n const kids = Array.from(node.children).filter((c) => visible(c, view));\n const next = side === \"after\" ? kids[0] : kids[kids.length - 1];\n if (!next) return node;\n node = next;\n }\n}\n\n/** The first placement rule this tap button's surroundings break, or null. */\nexport function findTapPlacementWarning(el: HTMLElement): string | null {\n const doc = el.ownerDocument;\n const view = doc.defaultView;\n if (!view || !el.isConnected) return null;\n // A button inside a group is judged as its group.\n const slot: Element = el.closest(\".matrx-tap-group\") ?? el;\n const glass = isGlassItem(slot);\n\n if (glass && !floats(slot, view)) {\n return 'glass on a solid surface — glass only floats over moving content; use variant=\"transparent\" (or a solid group)';\n }\n\n const row = slot.parentElement;\n if (!row) return null;\n if (glass) {\n const mixed = Array.from(row.children).find((c) => c !== slot && visible(c, view) && !isGlassItem(c));\n if (mixed) return `glass beside non-glass ${describe(mixed)} — make the row all glass or none`;\n }\n\n const pill = (el.querySelector(\":scope > .matrx-tap-pill\") as HTMLElement | null) ?? (slot.querySelector(\".matrx-tap-group-capsule\") as HTMLElement | null);\n if (!pill) return null;\n const gap = px(view.getComputedStyle(el).getPropertyValue(\"--matrx-tap-gap\")) || 6;\n const p = pill.getBoundingClientRect();\n if (p.width === 0) return null;\n // Distances are judged in LAYOUT pixels: inside a zoomed (transformed) tile a screen distance\n // is the layout distance times the scale.\n const scale = layoutScale(pill);\n for (const [side, sib] of [[\"after\", slot.nextElementSibling], [\"before\", slot.previousElementSibling]] as const) {\n if (!sib || !visible(sib, view) || isTapSlot(sib, view) || isGlassItem(sib) || facesWithTapSlot(sib, side, view)) continue;\n if (Math.abs(sib.getBoundingClientRect().top + sib.getBoundingClientRect().height / 2 - (p.top + p.height / 2)) > p.height) continue; // not on this row\n const box = facingBox(sib, side, view);\n const r = box.getBoundingClientRect();\n const cs = view.getComputedStyle(box);\n const distance =\n (side === \"after\" ? r.left - p.right : p.left - r.right) / scale + (side === \"after\" ? px(cs.paddingLeft) : px(cs.paddingRight));\n if (distance < gap - 0.5) {\n return `${describe(sib)} sits ${Math.round(distance)}px from the pill — anything beside a tap button adds its own ${gap / 2}px (the box only carries ${gap / 2}px)`;\n }\n }\n return null;\n}\n\nconst reported = new Set<string>();\n\nfunction report(el: HTMLElement, reason: string) {\n el.setAttribute(\"data-matrx-tap-violation\", reason);\n const key = `${reason}@${el.getAttribute(\"aria-label\") ?? el.textContent ?? \"\"}`;\n if (reported.has(key)) return;\n reported.add(key);\n console.error(`[tap-target] ${reason}`, el);\n}\n\nconst mounted = new Set<HTMLElement>();\nlet resizeTimer: ReturnType<typeof setTimeout> | null = null;\nlet listening = false;\n\nfunction check(node: HTMLElement) {\n const reason = findTapViolation(node);\n if (reason) {\n report(node, reason);\n return;\n }\n node.removeAttribute(\"data-matrx-tap-violation\");\n const warning = findTapPlacementWarning(node);\n if (warning) {\n node.setAttribute(\"data-matrx-tap-warning\", warning);\n const key = `w:${warning}@${node.getAttribute(\"aria-label\") ?? \"\"}`;\n if (!reported.has(key)) {\n reported.add(key);\n console.error(`[tap-target] ${warning}`, node);\n }\n } else node.removeAttribute(\"data-matrx-tap-warning\");\n}\n\nfunction listenForResize(view: Window) {\n if (listening) return;\n listening = true;\n view.addEventListener(\"resize\", () => {\n if (resizeTimer) clearTimeout(resizeTimer);\n resizeTimer = setTimeout(() => mounted.forEach((n) => (n.isConnected ? check(n) : mounted.delete(n))), 200);\n });\n // A button is judged once, at mount — but its neighbours keep changing (a\n // loading placeholder becomes the real control). Re-judge a button when the\n // row it sits in gains or loses children, so a mark never outlives the\n // neighbour it named (2026-10-13: \"New run\" kept a red outline for a\n // skeleton that had already left the header).\n const Observer = (view as Window & { MutationObserver?: typeof MutationObserver }).MutationObserver;\n if (!Observer || !view.document.body) return;\n const changedRows = new Set<Node>();\n let rowTimer: ReturnType<typeof setTimeout> | null = null;\n new Observer((records) => {\n for (const r of records) changedRows.add(r.target);\n if (rowTimer) clearTimeout(rowTimer);\n rowTimer = setTimeout(() => {\n mounted.forEach((n) => {\n if (!n.isConnected) return void mounted.delete(n);\n const row = (n.closest(\".matrx-tap-group\") ?? n).parentElement;\n if (row && changedRows.has(row)) check(n);\n });\n changedRows.clear();\n }, 200);\n }).observe(view.document.body, { childList: true, subtree: true });\n}\n\nfunction assignRef<T>(ref: Ref<T> | undefined, value: T | null) {\n if (typeof ref === \"function\") ref(value);\n else if (ref) (ref as MutableRefObject<T | null>).current = value;\n}\n\n/**\n * The callback ref every tap trigger carries. In production it only forwards\n * the caller's ref; in development it also measures the trigger once it is in\n * the layout and paints a violation.\n */\nexport function useTapGuardRef<T extends HTMLElement>(\n forwarded: Ref<T> | undefined,\n propViolation: string | null,\n): (node: T | null) => void {\n const current = useRef<T | null>(null);\n return useCallback(\n (node: T | null) => {\n assignRef(forwarded, node);\n if (current.current && current.current !== node) mounted.delete(current.current);\n current.current = node;\n if (!guardOn() || !node) return;\n if (propViolation) {\n report(node, propViolation);\n return;\n }\n const view = node.ownerDocument.defaultView;\n if (!view) return;\n mounted.add(node);\n listenForResize(view);\n view.requestAnimationFrame(() => check(node));\n },\n [forwarded, propViolation],\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* THE PILL-INSET GUARD (0.60.10). A pill is balanced when its INK sits */\n/* the same distance from both edges. On 2026-10-04 every icon+label */\n/* pill read off-centre (1.3–3.3px) because padding was shaved on the */\n/* glyph side by a guess at the glyph's air. The trim in tap-target.css */\n/* now removes each glyph's real air; this measures the result in the */\n/* real layout and marks any pill whose ink insets differ by more than */\n/* 2px — dashed red outline + one console error naming both numbers. */\n/* ------------------------------------------------------------------ */\n\nconst PILL_TOLERANCE_PX = 2;\nconst PILL_ITEMS = \"button, a[href], [role='button'], [role='tab'], [role='radio'], [role='menuitem']\";\nconst PILL_CANDIDATES = \"button, a[href], [role='button'], .rounded-full, .matrx-tap-pill-inline, .matrx-tap-pill-mobile-icon-only\";\n\n/** Horizontal ink extents inside `el`: glyph geometry for svgs, text runs for text. */\nfunction inkExtents(el: Element): { left: number; right: number } | null {\n const doc = el.ownerDocument;\n const view = doc.defaultView;\n if (!view) return null;\n let left = Infinity;\n let right = -Infinity;\n const walker = doc.createTreeWalker(el, 0x1 | 0x4 /* SHOW_ELEMENT | SHOW_TEXT */);\n let n: Node | null;\n while ((n = walker.nextNode())) {\n if (n.nodeType === 1) {\n const node = n as Element;\n const cs = view.getComputedStyle(node);\n if (cs.display === \"none\" || cs.visibility === \"hidden\" || cs.position === \"absolute\") continue;\n const tag = node.tagName.toLowerCase();\n if (tag === \"img\" || tag === \"picture\" || tag === \"video\" || tag === \"canvas\") {\n // A picture (a favicon, an avatar) is ink by its box — it draws its own pixels, and a logo\n // renders exactly as it is, never tinted to make a guard see it (2026-10-13: every\n // favicon-led link pill read \"29px left vs 10px right\" because the image was invisible here).\n const r = node.getBoundingClientRect();\n if (r.width > 0) {\n left = Math.min(left, r.left);\n right = Math.max(right, r.right);\n }\n continue;\n }\n if (tag !== \"svg\" && (node.getAttribute(\"role\") === \"status\" || node.getAttribute(\"role\") === \"progressbar\")) {\n // A busy spinner drawn with borders (its rings are absolute, so nothing below sees them)\n // is ink by its box: a pill whose icon turned into a spinner read \"44px left vs 20px right\".\n const r = node.getBoundingClientRect();\n if (r.width > 0) {\n left = Math.min(left, r.left);\n right = Math.max(right, r.right);\n }\n continue;\n }\n if (tag !== \"svg\") {\n // A painted chip inside the pill (a count badge) is ink by its box: its fill is what the eye sees.\n const paintedChip = (cs.backgroundColor !== \"rgba(0, 0, 0, 0)\" && cs.backgroundColor !== \"transparent\") || parseFloat(cs.borderLeftWidth) > 0;\n if (paintedChip) {\n const r = node.getBoundingClientRect();\n if (r.width > 0) {\n left = Math.min(left, r.left);\n right = Math.max(right, r.right);\n }\n }\n continue;\n }\n const svg = node as SVGGraphicsElement;\n if (typeof svg.getBBox !== \"function\" || typeof svg.getScreenCTM !== \"function\") continue;\n const bb = svg.getBBox();\n const ctm = svg.getScreenCTM();\n if (!ctm || bb.width === 0) continue;\n if (Math.abs(ctm.b) > 0.001 || Math.abs(ctm.c) > 0.001) {\n // A turning glyph (a busy spinner) has no fixed ink: judge it by its layout box, centered\n // where the rotation centers it — never by a mid-turn snapshot of its paths.\n const r = node.getBoundingClientRect();\n const half = (parseFloat(cs.width) || r.width) / 2;\n const mid = r.left + r.width / 2;\n left = Math.min(left, mid - half);\n right = Math.max(right, mid + half);\n continue;\n }\n const half = ((parseFloat(cs.strokeWidth) || 0) * Math.abs(ctm.a)) / 2;\n const x1 = ctm.a * bb.x + ctm.e;\n const x2 = ctm.a * (bb.x + bb.width) + ctm.e;\n left = Math.min(left, Math.min(x1, x2) - half);\n right = Math.max(right, Math.max(x1, x2) + half);\n } else if (n.nodeValue && n.nodeValue.trim()) {\n const parent = n.parentElement;\n if (!parent || parent.closest(\"svg\")) continue;\n const pcs = view.getComputedStyle(parent);\n if (pcs.visibility === \"hidden\" || pcs.position === \"absolute\") continue;\n const range = doc.createRange();\n range.selectNodeContents(n);\n // A truncated label (`truncate max-w-*`) draws only what its clipping box shows: its text\n // run keeps going past the ellipsis, so the run is clipped to every overflow-hiding box\n // between it and the pill (2026-10-18: a scope chip \"matrx-frontend (LCP test)\" read\n // \"9.0px left vs 5.7px right\" while its ellipsis sat exactly 9px from the edge).\n const clip = textClip(parent, el, view);\n for (const r of Array.from(range.getClientRects())) {\n if (r.width <= 0) continue;\n const rl = Math.max(r.left, clip.left);\n const rr = Math.min(r.right, clip.right);\n if (rr <= rl) continue;\n left = Math.min(left, rl);\n right = Math.max(right, rr);\n }\n }\n }\n return Number.isFinite(left) && Number.isFinite(right) ? { left, right } : null;\n}\n\n/** The horizontal window a text run can paint in: its overflow-clipping ancestors up to (excluding) `pill`. */\nfunction textClip(from: Element, pill: Element, view: Window): { left: number; right: number } {\n let left = -Infinity;\n let right = Infinity;\n for (let node: Element | null = from; node && node !== pill; node = node.parentElement) {\n const cs = view.getComputedStyle(node);\n // overflow-x, or the shorthand's first (x) value where a runtime does not expand it (jsdom)\n const clipsX = (cs.overflowX && cs.overflowX !== \"visible\") || (cs.overflow && !cs.overflow.startsWith(\"visible\"));\n if (clipsX) {\n const r = node.getBoundingClientRect();\n if (r.width > 0) {\n left = Math.max(left, r.left);\n right = Math.min(right, r.right);\n }\n }\n }\n return { left, right };\n}\n\nconst FIELDS = \"input, textarea, select, [contenteditable='true'], [role='textbox'], [role='searchbox'], [role='combobox']\";\n\n/**\n * Only a BUTTON can be a pill whose ink must balance: an interactive element,\n * or the painted pill inside one (a tap button's `.matrx-tap-pill-inline`).\n * A field — or a capsule that holds one, like a rounded search box — aligns its\n * text to an edge by design, and a non-interactive container (a status chip, a\n * wrapper painted `rounded-full`) is never a pill button (2026-10-09: the\n * messenger's search field and messaging's AI chips wore the red outline).\n */\nexport function isPillButton(el: Element): boolean {\n if (el.matches(FIELDS) || el.querySelector(FIELDS) !== null) return false;\n if (el.matches(PILL_ITEMS)) return true;\n if (el.parentElement?.closest(PILL_ITEMS)) return true;\n return el.querySelector(PILL_ITEMS) !== null;\n}\n\n/** Why this pill's ink is off-centre, or null. Only judges a pill — a capsule\n * (radius ≥ half its height) with its own fill or border, carrying ink. */\nexport function findPillInsetWarning(el: HTMLElement): string | null {\n const view = el.ownerDocument.defaultView;\n if (!view || !el.isConnected) return null;\n if (!isPillButton(el)) return null;\n const box = el.getBoundingClientRect();\n const scale = layoutScale(el);\n if (box.width / scale < 20 || box.height / scale < 16 || box.height / scale > 48) return null;\n const cs = view.getComputedStyle(el);\n if (parseFloat(cs.borderTopLeftRadius) < box.height / scale / 2 - 1) return null;\n const painted = cs.backgroundColor !== \"rgba(0, 0, 0, 0)\" && cs.backgroundColor !== \"transparent\";\n if (!painted && !(parseFloat(cs.borderLeftWidth) > 0)) return null;\n // A wide capsule (a stretched select or field) aligns content to an edge on purpose.\n if (box.width / scale > 320) return null;\n // Ink balance is a question only for CENTERED content. A select trigger (value left, chevron\n // right), a field, or a full-width action row that says justify-start aligns its content on\n // purpose — content alignment is placement, not an inset to balance.\n if (cs.display.includes(\"flex\") && ![\"center\", \"normal\"].includes(cs.justifyContent)) return null;\n if (el.matches(\"[data-matrx-control='select'], [data-matrx-control='field']\")) return null;\n // A switch, checkbox or slider carries STATE, not a label: its thumb sits at one end by design\n // (measured 2026-10-04: every connector switch read \"18px left vs 2px right\" in the chat composer).\n if (el.matches(\"[role='switch'], [role='checkbox'], [role='slider'], [role='radio']\")) return null;\n // A TRACK of several controls (a segmented nav, a tab strip) is a container, not a pill: its\n // items sit where the selection puts them, so the ink is lopsided by design — each item is\n // judged on its own (measured 2026-10-05: the shell route nav's icon track read 2px vs 12.5px\n // at 768 because the selected item's fill hugs one end and the last glyph carries its air).\n if (el.querySelectorAll(PILL_ITEMS).length > 1) return null;\n const ink = inkExtents(el);\n if (!ink) return null;\n const left = (ink.left - box.left) / scale;\n const right = (box.right - ink.right) / scale;\n if (left < 0 || right < 0) return null; // clipped / overflowing content: not this guard's question\n if (Math.abs(left - right) <= PILL_TOLERANCE_PX) return null;\n return `pill ink is off-centre: ${left.toFixed(1)}px left vs ${right.toFixed(1)}px right — pad both sides alike and let the glyph trim (tap-target.css, THE OPTICAL GLYPH TRIM) remove the glyph's air; never shave one side by hand`;\n}\n\nlet pillTimer: ReturnType<typeof setTimeout> | null = null;\nlet pillObserver: MutationObserver | null = null;\n\nfunction scanPills(doc: Document) {\n if (!guardOn()) return;\n for (const node of Array.from(doc.querySelectorAll<HTMLElement>(PILL_CANDIDATES))) {\n // A tap button's own pill is judged, not its invisible box.\n if (node.classList.contains(\"matrx-tap-target\")) continue;\n const warning = findPillInsetWarning(node);\n if (warning) {\n if (node.getAttribute(\"data-matrx-pill-inset-warning\") === warning) continue;\n node.setAttribute(\"data-matrx-pill-inset-warning\", warning);\n const key = `p:${warning}@${(node.textContent ?? \"\").trim().slice(0, 40)}`;\n if (!reported.has(key)) {\n reported.add(key);\n console.error(`[tap-target] ${warning}`, node);\n }\n } else if (node.hasAttribute(\"data-matrx-pill-inset-warning\")) {\n node.removeAttribute(\"data-matrx-pill-inset-warning\");\n }\n }\n}\n\nfunction startPillInsetScan() {\n if (pillObserver || typeof document === \"undefined\" || typeof MutationObserver === \"undefined\") return;\n const doc = document;\n const schedule = () => {\n if (pillTimer) clearTimeout(pillTimer);\n pillTimer = setTimeout(() => scanPills(doc), 600);\n };\n pillObserver = new MutationObserver((records) => {\n // Our own attribute writes must not re-trigger the scan.\n if (records.every((r) => r.type === \"attributes\" && r.attributeName === \"data-matrx-pill-inset-warning\")) return;\n schedule();\n });\n const begin = () => {\n pillObserver?.observe(doc.body, { childList: true, subtree: true, characterData: true, attributes: true, attributeFilter: [\"class\", \"style\", \"data-matrx-pill-inset-warning\"] });\n schedule();\n };\n if (doc.body) begin();\n else doc.addEventListener(\"DOMContentLoaded\", begin, { once: true });\n}\n","// THE LAYOUT SCALE (0.62.4). The dev guards (pill guard, tap-target guard) judge spacing, ink\n// balance and width in LAYOUT pixels — the numbers a stylesheet writes. `getBoundingClientRect`\n// returns SCREEN pixels, so inside a CSS-transformed (zoomed) container — every Board tile at\n// overview zoom — a correct 11px gap read 5.3px at 0.48 and warned falsely. The effective scale\n// is the ratio of an element's drawn width to its layout width (`offsetWidth`, which ignores\n// transforms), taken from the nearest ancestor-or-self that has a box. 1 when no engine reports\n// layout (jsdom) or the ratio is within 2% of 1, so a real violation at scale 1 reads unchanged.\n\nexport function layoutScale(el: Element | null): number {\n for (let n: Element | null = el; n; n = n.parentElement) {\n const w = (n as HTMLElement).offsetWidth;\n if (!w) continue;\n const drawn = n.getBoundingClientRect().width;\n if (!(drawn > 0)) continue;\n const s = drawn / w;\n if (!Number.isFinite(s) || s <= 0) return 1;\n return Math.abs(s - 1) < 0.02 ? 1 : s;\n }\n return 1;\n}\n","\"use client\";\n\nimport { createContext, useContext, type ReactNode } from \"react\";\n\n/** The surface a tap group sits on. \"glass\" floats over moving content; \"solid\" is a page, card,\n * toast or a header row that is itself a solid band. */\nexport type TapSurfaceKind = \"glass\" | \"solid\";\n\n// Shared through a Symbol.for slot on globalThis (like the default-variant context): the `.` and\n// `./buttons` dist bundles each inline this module, and a provider rendered by one must reach\n// buttons rendered by the other.\nconst SLOT = Symbol.for(\"@ai-matrx/tap-target:surface\");\ntype GlobalWithSlot = typeof globalThis & { [SLOT]?: ReturnType<typeof createContext<TapSurfaceKind>> };\nconst TapSurfaceContext = ((globalThis as GlobalWithSlot)[SLOT] ??= createContext<TapSurfaceKind>(\"glass\"));\n\n/**\n * GLASS ONLY FLOATS, declared once by the surface. A host whose header (or any region) is a solid\n * row wraps it in `<TapSurface surface=\"solid\">`; every `TapTargetButtonGroup` /\n * `TapTargetSearchGroup` inside then renders solid by itself — no per-page `surface=\"solid\"`.\n * A group's own `surface` prop still wins.\n */\nexport function TapSurface({ surface, children }: { surface: TapSurfaceKind; children: ReactNode }) {\n return <TapSurfaceContext.Provider value={surface}>{children}</TapSurfaceContext.Provider>;\n}\n\n/** The group's surface: its explicit prop, else the nearest `<TapSurface>`, else glass. */\nexport function useTapSurface(explicit: TapSurfaceKind | undefined): TapSurfaceKind {\n const inherited = useContext(TapSurfaceContext);\n return explicit ?? inherited;\n}\n","\"use client\";\n\n// THE BUILT-IN CAPABILITIES of every tap button — each one an enum or a flag,\n// never a class a caller writes. Rendering and geometry live in tap-target.css\n// (`.matrx-tap-badge`, `.matrx-tap-pressed`, `.matrx-tap-chevron`, …).\n\nimport { useEffect, type ReactNode } from \"react\";\n\nimport { MOTION_SPIN } from \"../motion\";\n\n/** Glyph color. Replaces the free-form `className`. */\nexport type TapTone = \"default\" | \"muted\" | \"primary\" | \"destructive\" | \"success\" | \"warning\" | \"info\";\n\n/** Fill of a solid button. Replaces `bgColor` / `iconColor` / hover / active. */\nexport type TapSolidTone = \"primary\" | \"destructive\" | \"success\" | \"warning\" | \"neutral\";\n\nexport const TAP_TONE_CLASS: Record<TapTone, string> = {\n default: \"text-foreground\",\n muted: \"text-muted-foreground group-hover/tap:text-foreground\",\n primary: \"text-primary-ink\",\n destructive: \"text-destructive-ink\",\n success: \"text-success-ink\",\n warning: \"text-warning-ink\",\n info: \"text-info-ink\",\n};\n\nexport const TAP_SOLID_TONE: Record<TapSolidTone, { fill: string; glyph: string }> = {\n primary: { fill: \"bg-primary group-hover/tap:bg-primary/85\", glyph: \"text-primary-foreground\" },\n destructive: { fill: \"bg-danger-fill group-hover/tap:bg-danger-fill/85\", glyph: \"text-danger-fill-foreground\" },\n success: { fill: \"bg-success-fill group-hover/tap:bg-success-fill/85\", glyph: \"text-success-fill-foreground\" },\n warning: { fill: \"bg-warning group-hover/tap:bg-warning/85\", glyph: \"text-warning-foreground\" },\n neutral: { fill: \"bg-foreground group-hover/tap:bg-foreground/85\", glyph: \"text-background\" },\n};\n\n/**\n * A keyboard shortcut: modifiers joined by \"+\", then one key —\n * \"mod+k\" (⌘ on Apple, Ctrl elsewhere), \"shift+mod+p\", \"alt+n\", \"/\", \"?\".\n */\nexport type TapShortcut = string;\n\nexport interface TapFeatureProps {\n /** Glyph color, from the system's list. */\n tone?: TapTone | undefined;\n /** A count (99+ past 99) or a dot, drawn on the pill's corner by the system. */\n badge?: number | \"dot\" | undefined;\n /** A toggle that is on (sidebar open, filter on): tinted pill + aria-pressed. */\n pressed?: boolean | undefined;\n /** Work in flight: the glyph becomes a spinner and presses are ignored. */\n loading?: boolean | undefined;\n /** Why the button cannot be used — disables it and becomes its tooltip. */\n disabledReason?: string | undefined;\n /** Keyboard shortcut that presses the button; shown in its tooltip. */\n shortcut?: TapShortcut | undefined;\n /** A menu trigger: a small chevron after the label. */\n chevron?: boolean | undefined;\n}\n\nconst IS_APPLE =\n typeof navigator !== \"undefined\" && /Mac|iPhone|iPad|iPod/.test(navigator.platform || navigator.userAgent);\n\ninterface ParsedShortcut {\n mod: boolean;\n shift: boolean;\n alt: boolean;\n key: string;\n}\n\nexport function parseShortcut(shortcut: TapShortcut): ParsedShortcut {\n const parts = shortcut.toLowerCase().split(\"+\");\n const key = parts.pop() ?? \"\";\n return { mod: parts.includes(\"mod\"), shift: parts.includes(\"shift\"), alt: parts.includes(\"alt\"), key };\n}\n\n/** \"mod+k\" → \"⌘K\" on Apple, \"Ctrl+K\" elsewhere. */\nexport function formatTapShortcut(shortcut: TapShortcut): string {\n const p = parseShortcut(shortcut);\n const key = p.key.length === 1 ? p.key.toUpperCase() : p.key[0]!.toUpperCase() + p.key.slice(1);\n if (IS_APPLE) return `${p.alt ? \"⌥\" : \"\"}${p.shift ? \"⇧\" : \"\"}${p.mod ? \"⌘\" : \"\"}${key}`;\n return [p.mod && \"Ctrl\", p.alt && \"Alt\", p.shift && \"Shift\", key].filter(Boolean).join(\"+\");\n}\n\nfunction isTyping(target: EventTarget | null): boolean {\n const el = target as HTMLElement | null;\n return !!el && (el.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(el.tagName));\n}\n\nexport function matchesTapShortcut(e: KeyboardEvent, shortcut: TapShortcut): boolean {\n const p = parseShortcut(shortcut);\n if ((e.metaKey || e.ctrlKey) !== p.mod || e.altKey !== p.alt) return false;\n // \"?\" and other shifted symbols arrive with shiftKey set — only compare\n // shift for letters and named keys.\n if (/^[a-z0-9]$|^[a-z]{2,}$/.test(p.key) && e.shiftKey !== p.shift) return false;\n if (!p.mod && isTyping(e.target)) return false;\n return e.key.toLowerCase() === p.key;\n}\n\n/** Presses `node` when its shortcut is typed anywhere on the page. */\nexport function useTapShortcut(shortcut: TapShortcut | undefined, getNode: () => HTMLElement | null, enabled: boolean) {\n useEffect(() => {\n if (!shortcut || !enabled) return;\n const onKey = (e: KeyboardEvent) => {\n if (!matchesTapShortcut(e, shortcut)) return;\n const node = getNode();\n if (!node || !node.isConnected) return;\n e.preventDefault();\n node.click();\n };\n window.addEventListener(\"keydown\", onKey);\n return () => window.removeEventListener(\"keydown\", onKey);\n }, [shortcut, enabled, getNode]);\n}\n\nexport function TapBadge({ badge }: { badge: number | \"dot\" }) {\n if (badge === \"dot\") return <span aria-hidden=\"true\" className=\"matrx-tap-badge\" data-dot=\"\" />;\n if (badge <= 0) return null;\n return (\n <span aria-hidden=\"true\" className=\"matrx-tap-badge\">\n {badge > 99 ? \"99+\" : badge}\n </span>\n );\n}\n\nexport function TapSpinner({ className }: { className: string }) {\n return (\n <svg className={className} fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={2} aria-hidden=\"true\">\n <circle\n className={MOTION_SPIN}\n cx=\"12\"\n cy=\"12\"\n r=\"9\"\n strokeDasharray=\"28.27\"\n strokeDashoffset=\"9\"\n strokeLinecap=\"round\"\n style={{ transformOrigin: \"12px 12px\" }}\n />\n </svg>\n );\n}\n\nexport function TapChevron() {\n return (\n <svg\n className=\"matrx-tap-chevron\"\n aria-hidden=\"true\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n );\n}\n\n/** Tooltip body: the label, then the shortcut as a key cap. */\nexport function tooltipBody(label: string, shortcut: TapShortcut | undefined): ReactNode {\n if (!shortcut) return label;\n return (\n <span className=\"matrx-tap-tooltip\">\n {label}\n <kbd className=\"matrx-tap-kbd\">{formatTapShortcut(shortcut)}</kbd>\n </span>\n );\n}\n","import type { ComponentType, ReactNode, Ref } from \"react\";\n\n/**\n * The injectable link seam — the package's replacement for the original\n * hard `next/link` import.\n *\n * Internal hrefs (anything NOT matching `http(s):`, `mailto:`, `tel:`) render\n * through the link component resolved here; external hrefs always render a\n * plain `<a target=\"_blank\" rel=\"noopener noreferrer\">`, exactly like the\n * original. When nothing is registered and no per-instance `linkComponent`\n * prop is given, internal hrefs fall back to a plain `<a>` (no prefetch, no\n * client-side routing — still a working link).\n */\nexport interface TapTargetLinkProps {\n href: string;\n target?: \"_blank\" | \"_self\" | \"_parent\" | \"_top\" | undefined;\n rel?: string | undefined;\n /** Router prefetch hint (next/link semantics). Plain `<a>` fallback ignores it. */\n prefetch?: boolean | null | undefined;\n \"aria-label\"?: string | undefined;\n /** Tooltip text drawn through `title` (the provider's title takeover). */\n title?: string | undefined;\n className?: string | undefined;\n children?: ReactNode;\n /** The trigger's ref (the development guard measures the rendered link).\n * next/link forwards it to its `<a>`. */\n ref?: Ref<HTMLAnchorElement> | undefined;\n}\n\nexport type TapTargetLinkComponent = ComponentType<TapTargetLinkProps>;\n\n/**\n * The registered component lives in a `Symbol.for` slot on `globalThis` — NOT\n * in module state — so it survives the module graph being instantiated more\n * than once: the `.` and `./buttons` dist bundles each inline the primitives\n * (tsup `splitting: false`), and a consumer may even mix `import` and\n * `require`. One registration must reach every copy.\n */\nconst LINK_SLOT = Symbol.for(\"@ai-matrx/tap-target:link-component\");\n\ntype GlobalWithLinkSlot = typeof globalThis & {\n [LINK_SLOT]?: TapTargetLinkComponent | null;\n};\n\n/**\n * Register the app's link component once at startup (e.g. `next/link`):\n *\n * ```tsx\n * import Link from \"next/link\";\n * import { setTapTargetLinkComponent } from \"@ai-matrx/tap-target\";\n * setTapTargetLinkComponent(Link);\n * ```\n *\n * Pass `null` to unregister (plain `<a>` fallback resumes).\n */\nexport function setTapTargetLinkComponent(\n component: TapTargetLinkComponent | null,\n): void {\n (globalThis as GlobalWithLinkSlot)[LINK_SLOT] = component;\n}\n\n/** The currently registered link component, or `null` when none is set. */\nexport function getTapTargetLinkComponent(): TapTargetLinkComponent | null {\n return (globalThis as GlobalWithLinkSlot)[LINK_SLOT] ?? null;\n}\n","\"use client\";\n\nimport { createContext, useContext, type ReactNode } from \"react\";\n\nimport { useTapSurface } from \"./tap-surface\";\n\n// THE PLACEMENT DEFAULT — which variant a tap button takes when its caller\n// names none. Outside a provider that is \"glass\" (the floating-bar look). A\n// host region that holds tap buttons BESIDE text (a route header's back +\n// title cell) wraps itself in <TapDefaultVariant value=\"transparent\"> so every\n// button in it matches its neighbours (rule 2, \"all glass or none\") without\n// each call site repeating variant=\"transparent\". An explicit `variant` prop\n// always wins, so a bar whose pieces are ALL glass stays glass.\n//\n// The context object lives in a `Symbol.for` slot on globalThis, like the link\n// seam: the `.` and `./buttons` dist bundles each inline this module, and a\n// provider rendered by one must reach buttons rendered by the other.\n\nexport type TapDefaultVariantValue = \"glass\" | \"transparent\";\n\nconst SLOT = Symbol.for(\"@ai-matrx/tap-target:default-variant\");\ntype GlobalWithSlot = typeof globalThis & {\n [SLOT]?: ReturnType<typeof createContext<TapDefaultVariantValue>>;\n};\n\nfunction ctx() {\n const g = globalThis as GlobalWithSlot;\n return (g[SLOT] ??= createContext<TapDefaultVariantValue>(\"glass\"));\n}\n\n/** The variant tap buttons below take when they name none. */\nexport function useTapDefaultVariant(): TapDefaultVariantValue {\n return useContext(ctx());\n}\n\n/** Set the default variant for every tap button below that names none. */\nexport function TapDefaultVariant({ value, children }: { value: TapDefaultVariantValue; children: ReactNode }) {\n const Context = ctx();\n return <Context.Provider value={value}>{children}</Context.Provider>;\n}\n\n/**\n * The variant a lone tap button draws: its explicit `variant`, else a region's\n * <TapDefaultVariant>, else — on a <TapSurface surface=\"solid\"> — \"transparent\"\n * (glass only floats), else glass. An explicit variant always wins.\n */\nexport function useTapButtonVariant<V extends string>(explicit: V | undefined): V | TapDefaultVariantValue {\n const placed = useTapDefaultVariant();\n const surface = useTapSurface(undefined);\n if (explicit !== undefined) return explicit;\n if (placed !== \"glass\") return placed;\n return surface === \"solid\" ? \"transparent\" : \"glass\";\n}\n","\"use client\";\n\nimport { forwardRef, type Ref } from \"react\";\n// The spinner loop comes from `@ai-matrx/design-system`'s motion layer — the\n// package this one already depends on — NOT from core Tailwind's\n// `animate-spin` and NOT from a keyframe copied into this package's\n// stylesheet. See the note above `LoadingTapButton`.\nimport { MOTION_SPIN } from \"../motion\";\nimport {\n TapTargetButton,\n TapTargetButtonTransparent,\n TapTargetButtonOutline,\n TapTargetButtonSolid,\n TapTargetButtonForGroup,\n} from \"./tap-target-button\";\nimport type { TapTargetLinkComponent } from \"./link\";\nimport { useTapButtonVariant } from \"./tap-default-variant\";\nimport type { TapFeatureProps, TapSolidTone } from \"./tap-features\";\n\n// ---------------------------------------------------------------------------\n// Shared types\n// ---------------------------------------------------------------------------\n\ntype Variant = \"glass\" | \"transparent\" | \"outline\" | \"solid\" | \"group\";\n\nexport interface TapButtonProps extends TapFeatureProps {\n /** Forwarded to the underlying button (Radix `asChild`, focus chains, etc.). */\n ref?: Ref<HTMLButtonElement> | undefined;\n variant?: Variant | undefined;\n onClick?: (() => void) | undefined;\n as?: \"button\" | \"label\" | undefined;\n htmlFor?: string | undefined;\n ariaLabel?: string | undefined;\n disabled?: boolean | undefined;\n tabIndex?: number | undefined;\n className?: string | undefined;\n strokeWidth?: number | undefined;\n // Solid-variant color overrides — only used when variant=\"solid\"\n bgColor?: string | undefined;\n iconColor?: string | undefined;\n hoverBgColor?: string | undefined;\n activeBgColor?: string | undefined;\n // Link support — when set, the button renders as a link or <a>.\n // Internal hrefs use the injected link component (setTapTargetLinkComponent\n // or the `linkComponent` prop; plain <a> when none is registered); external\n // (http(s)://, mailto:, tel:) use <a> with target=\"_blank\" +\n // rel=\"noopener noreferrer\" by default. Pass an explicit `target` to\n // override (works for internal links too).\n href?: string | undefined;\n target?: \"_blank\" | \"_self\" | \"_parent\" | \"_top\" | undefined;\n rel?: string | undefined;\n prefetch?: boolean | null | undefined;\n /** Per-instance link component override for internal hrefs. */\n linkComponent?: TapTargetLinkComponent | undefined;\n // Tooltip support — defaults to `ariaLabel`. Pass `false` to opt out.\n tooltip?: string | false | undefined;\n tooltipSide?: \"top\" | \"right\" | \"bottom\" | \"left\" | undefined;\n tooltipAlign?: \"start\" | \"center\" | \"end\" | undefined;\n /** Inline caption after the icon — see TapTargetButton `label`. */\n label?: string | undefined;\n /** Passthrough from AITapButtonProps / MakerTapButton — stripped before DOM. */\n colored?: boolean | undefined;\n}\n\n// ---------------------------------------------------------------------------\n// Variant resolver — maps a variant string to the correct wrapper component.\n// Runs at build/server time so there's zero client cost.\n//\n// IMPORTANT: `Wrap` MUST forward refs. The pre-composed `*TapButton` functions\n// below are plain function components (in React 19 ref is a regular prop) and\n// spread `{...props}` to `Wrap` — that spread carries ref through. `Wrap`\n// extracts ref and passes it explicitly to the underlying `forwardRef`\n// primitive. Without this, every `*TapButton` placed inside a Radix\n// `*Trigger asChild` (DropdownMenu, Popover, Tooltip, etc.) silently loses\n// the ref — the popper can't anchor and Radix's injected event handlers /\n// `data-state` / `aria-*` get dropped. (Precedent: matrx-frontend\n// `features/files/FEATURE.md`, where this pattern was established.)\n// ---------------------------------------------------------------------------\n\nconst Wrap = forwardRef<\n HTMLButtonElement,\n TapButtonProps & { children: React.ReactNode }\n>(function Wrap(\n {\n variant: variantProp,\n children,\n bgColor,\n iconColor,\n hoverBgColor,\n activeBgColor,\n // AITapButtonProps passthrough — not a DOM attribute (see ai-tap-buttons Wrap)\n colored: _colored,\n ...props\n },\n ref,\n) {\n const variant = useTapButtonVariant(variantProp);\n switch (variant) {\n case \"transparent\":\n return (\n <TapTargetButtonTransparent ref={ref} {...props}>\n {children}\n </TapTargetButtonTransparent>\n );\n case \"outline\":\n return (\n <TapTargetButtonOutline ref={ref} {...props}>\n {children}\n </TapTargetButtonOutline>\n );\n case \"solid\": {\n // On a solid button `tone` is the FILL; a glyph-only tone (\"muted\",\n // \"default\", \"info\") has no fill meaning and falls back to primary.\n const { tone, ...solidProps } = props;\n const fill: TapSolidTone | undefined =\n tone === \"primary\" || tone === \"destructive\" || tone === \"success\" || tone === \"warning\" ? tone : undefined;\n return (\n <TapTargetButtonSolid\n ref={ref}\n tone={fill}\n bgColor={bgColor}\n iconColor={iconColor}\n hoverBgColor={hoverBgColor}\n activeBgColor={activeBgColor}\n {...solidProps}\n >\n {children}\n </TapTargetButtonSolid>\n );\n }\n case \"group\":\n return (\n <TapTargetButtonForGroup ref={ref} {...props}>\n {children}\n </TapTargetButtonForGroup>\n );\n default:\n return (\n <TapTargetButton ref={ref} {...props}>\n {children}\n </TapTargetButton>\n );\n }\n});\n\n// ---------------------------------------------------------------------------\n// Pre-composed buttons — one import, one tag, zero configuration needed.\n// Default variant is \"glass\". Override with variant=\"transparent\" etc.\n// All SVG paths match lucide-react v0.577.0 exactly.\n// ---------------------------------------------------------------------------\n\n// lucide: menu (hand-crafted HeroIcons path — no Lucide equivalent, kept as-is)\nexport function MenuTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Menu\" strokeWidth={1.75} {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5\"\n />\n </Wrap>\n );\n}\n\n// lucide: plus (hand-crafted — no drift, kept as-is)\nexport function PlusTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Add\" {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M12 4.5v15m7.5-7.5h-15\"\n />\n </Wrap>\n );\n}\n\n// lucide: search → circle cx=11 cy=11 r=8 + line to 21,21\nexport function SearchTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Search\" {...props}>\n <circle cx=\"11\" cy=\"11\" r=\"8\" />\n <path d=\"m21 21-4.34-4.34\" />\n </Wrap>\n );\n}\n\n// lucide: settings (hand-crafted — kept as-is, Lucide uses \"settings-2\" pattern)\nexport function SettingsTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Settings\" {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z\"\n />\n </Wrap>\n );\n}\n\n// lucide: maximize (hand-crafted corner-arrows — kept as-is)\nexport function MaximizeTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Fullscreen\" {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15\"\n />\n </Wrap>\n );\n}\n\n// lucide: home v0.577.0 — used as the \"Hub\" (main/list) action\nexport function HomeTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Hub\" {...props}>\n <path d=\"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8\" />\n <path d=\"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z\" />\n </Wrap>\n );\n}\n\n// lucide: layout-grid v0.577.0\nexport function LayoutGridTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Card view\" {...props}>\n <rect width=\"7\" height=\"7\" x=\"3\" y=\"3\" rx=\"1\" />\n <rect width=\"7\" height=\"7\" x=\"14\" y=\"3\" rx=\"1\" />\n <rect width=\"7\" height=\"7\" x=\"14\" y=\"14\" rx=\"1\" />\n <rect width=\"7\" height=\"7\" x=\"3\" y=\"14\" rx=\"1\" />\n </Wrap>\n );\n}\n\n// lucide: list v0.577.0\nexport function ListTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Table view\" {...props}>\n <path d=\"M3 5h.01\" />\n <path d=\"M3 12h.01\" />\n <path d=\"M3 19h.01\" />\n <path d=\"M8 5h13\" />\n <path d=\"M8 12h13\" />\n <path d=\"M8 19h13\" />\n </Wrap>\n );\n}\n\n// lucide: arrow-down-up (hand-crafted — kept as-is)\nexport function ArrowDownUpTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Sort\" {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M3 4.5h14.25M3 9h9.75M3 13.5h5.25m5.25-.75L17.25 9m0 0L21 12.75M17.25 9v10.5\"\n />\n </Wrap>\n );\n}\n\n// lucide: bell v0.577.0\nexport function BellTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Notifications\" {...props}>\n <path d=\"M10.268 21a2 2 0 0 0 3.464 0\" />\n <path d=\"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326\" />\n </Wrap>\n );\n}\n\n// lucide: bell-ring v0.577.0 — animated cousin of bell, used for \"has unread\"\nexport function BellRingTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Notifications\" {...props}>\n <path d=\"M10.268 21a2 2 0 0 0 3.464 0\" />\n <path d=\"M22 8c0-2.3-.8-4.3-2-6\" />\n <path d=\"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326\" />\n <path d=\"M4 2C2.8 3.7 2 5.7 2 8\" />\n </Wrap>\n );\n}\n\n// lucide: zap v0.577.0 — lightning bolt, used as the Quick Actions trigger\nexport function ZapTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Quick actions\" {...props}>\n <path d=\"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z\" />\n </Wrap>\n );\n}\n\n// lucide: upload v0.577.0\nexport function UploadTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Upload\" {...props}>\n <path d=\"M12 3v12\" />\n <path d=\"m17 8-5-5-5 5\" />\n <path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\" />\n </Wrap>\n );\n}\n\n// lucide: download v0.577.0\nexport function DownloadTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Download\" {...props}>\n <path d=\"M12 15V3\" />\n <path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\" />\n <path d=\"m7 10 5 5 5-5\" />\n </Wrap>\n );\n}\n\n// lucide: share-2 v0.577.0\nexport function ShareTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Share\" {...props}>\n <circle cx=\"18\" cy=\"5\" r=\"3\" />\n <circle cx=\"6\" cy=\"12\" r=\"3\" />\n <circle cx=\"18\" cy=\"19\" r=\"3\" />\n <line x1=\"8.59\" x2=\"15.42\" y1=\"13.51\" y2=\"17.49\" />\n <line x1=\"15.41\" x2=\"8.59\" y1=\"6.51\" y2=\"10.49\" />\n </Wrap>\n );\n}\n\n// lucide: undo v0.577.0\nexport function UndoTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Undo\" {...props}>\n <path d=\"M3 7v6h6\" />\n <path d=\"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13\" />\n </Wrap>\n );\n}\n\n// lucide: redo v0.577.0\nexport function RedoTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Redo\" {...props}>\n <path d=\"M21 7v6h-6\" />\n <path d=\"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7\" />\n </Wrap>\n );\n}\n\n// lucide: copy v0.577.0\nexport function CopyTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Copy\" {...props}>\n <rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\" />\n <path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\" />\n </Wrap>\n );\n}\n\n// lucide: trash v0.577.0\nexport function TrashTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Delete\" {...props}>\n <path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6\" />\n <path d=\"M3 6h18\" />\n <path d=\"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\" />\n </Wrap>\n );\n}\n\n// lucide: files v0.577.0\nexport function FilesTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Copy all\" {...props}>\n <path d=\"M20 7h-3a2 2 0 0 1-2-2V2\" />\n <path d=\"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z\" />\n <path d=\"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8\" />\n </Wrap>\n );\n}\n\n// lucide: chevron-left v0.577.0 — arms extended from 6 to 7 (45° kept) for a\n// slightly larger glyph that better fills the 32px inner pill.\nexport function ChevronLeftTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Back\" {...props}>\n <path d=\"m16 19-7-7 7-7\" />\n </Wrap>\n );\n}\n\n// lucide: chevron-right v0.577.0\nexport function ChevronRightTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Next\" {...props}>\n <path d=\"m9 18 6-6-6-6\" />\n </Wrap>\n );\n}\n\n// lucide: panel-left v0.577.0\nexport function PanelLeftTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Toggle sidebar\" {...props}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M9 3v18\" />\n </Wrap>\n );\n}\n\n// lucide: panel-right v0.577.0\nexport function PanelRightTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Toggle sidebar\" {...props}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M15 3v18\" />\n </Wrap>\n );\n}\n\n// lucide: square-pen v0.577.0\nexport function SquarePenTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"New chat\" {...props}>\n <path d=\"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\" />\n <path d=\"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z\" />\n </Wrap>\n );\n}\n\n// lucide: x v0.577.0\nexport function XTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Close\" {...props}>\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </Wrap>\n );\n}\n\n// lucide: funnel v0.577.0 (filter is an alias for funnel in this version)\nexport function FilterTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Filter\" {...props}>\n <path d=\"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z\" />\n </Wrap>\n );\n}\n\n// lucide: play v0.577.0\nexport function PlayTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Play\" {...props}>\n <path d=\"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z\" />\n </Wrap>\n );\n}\n\n// lucide: pause v0.577.0 — two rects (redesigned from bar paths)\nexport function PauseTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Pause\" {...props}>\n <rect x=\"14\" y=\"3\" width=\"5\" height=\"18\" rx=\"1\" />\n <rect x=\"5\" y=\"3\" width=\"5\" height=\"18\" rx=\"1\" />\n </Wrap>\n );\n}\n\n// lucide: square v0.577.0 (stop uses filled square)\nexport function StopTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Stop\" {...props}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n </Wrap>\n );\n}\n\n// lucide: volume-2 v0.577.0\nexport function Volume2TapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Speaker\" {...props}>\n <path d=\"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z\" />\n <path d=\"M16 9a5 5 0 0 1 0 6\" />\n <path d=\"M19.364 18.364a9 9 0 0 0 0-12.728\" />\n </Wrap>\n );\n}\n\n// lucide: arrow-up v0.577.0\nexport function ArrowUpTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Send\" {...props}>\n <path d=\"m5 12 7-7 7 7\" />\n <path d=\"M12 19V5\" />\n </Wrap>\n );\n}\n\n// lucide: mic v0.577.0\nexport function MicTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Start recording\" {...props}>\n <path d=\"M12 19v3\" />\n <path d=\"M19 10v2a7 7 0 0 1-14 0v-2\" />\n <rect x=\"9\" y=\"2\" width=\"6\" height=\"13\" rx=\"3\" />\n </Wrap>\n );\n}\n\n// lucide: mic-off v0.577.0\nexport function MicOffTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Stop recording\" {...props}>\n <path d=\"M12 19v3\" />\n <path d=\"M15 9.34V5a3 3 0 0 0-5.68-1.33\" />\n <path d=\"M16.95 16.95A7 7 0 0 1 5 12v-2\" />\n <path d=\"M18.89 13.23A7 7 0 0 0 19 12v-2\" />\n <path d=\"m2 2 20 20\" />\n <path d=\"M9 9v3a3 3 0 0 0 5.12 2.12\" />\n </Wrap>\n );\n}\n\n// lucide: triangle-alert v0.577.0\nexport function TriangleAlertTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Alert\" {...props}>\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\" />\n <path d=\"M12 9v4\" />\n <path d=\"M12 17h.01\" />\n </Wrap>\n );\n}\n\n// lucide: shield-check (context set)\nexport function ShieldCheckTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Context set\" {...props}>\n <path d=\"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\" />\n <path d=\"m9 12 2 2 4-4\" />\n </Wrap>\n );\n}\n\n// lucide: shield-alert (context unset)\nexport function ShieldAlertTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"No context\" {...props}>\n <path d=\"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\" />\n <path d=\"M12 8v4\" />\n <path d=\"M12 16h.01\" />\n </Wrap>\n );\n}\n\n// lucide: bug v0.577.0 (major update — full insect anatomy)\nexport function BugTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Debug\" {...props}>\n <path d=\"M12 20v-9\" />\n <path d=\"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z\" />\n <path d=\"M14.12 3.88 16 2\" />\n <path d=\"M21 21a4 4 0 0 0-3.81-4\" />\n <path d=\"M21 5a4 4 0 0 1-3.55 3.97\" />\n <path d=\"M22 13h-4\" />\n <path d=\"M3 21a4 4 0 0 1 3.81-4\" />\n <path d=\"M3 5a4 4 0 0 0 3.55 3.97\" />\n <path d=\"M6 13H2\" />\n <path d=\"m8 2 1.88 1.88\" />\n <path d=\"M9 7.13V6a3 3 0 1 1 6 0v1.13\" />\n </Wrap>\n );\n}\n\n// lucide: settings-2 v0.577.0 (gear + center circle — kept as-is, matches intent)\nexport function Settings2TapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Settings\" {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z\"\n />\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M15 12a3 3 0 11-6 0 3 3 0 016 0z\"\n />\n </Wrap>\n );\n}\n\n// lucide: save (hand-crafted floppy disk — no direct Lucide equivalent, kept as-is)\nexport function SaveTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Save\" {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M4.5 6a2 2 0 012-2h9.25L20.5 9v9a2 2 0 01-2 2h-12a2 2 0 01-2-2V6z\"\n />\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M8.5 4v4.5a.5.5 0 00.5.5h6a.5.5 0 00.5-.5V4\"\n />\n <rect\n x=\"8\"\n y=\"14\"\n width=\"8\"\n height=\"5.5\"\n rx=\"0.5\"\n strokeLinejoin=\"round\"\n />\n </Wrap>\n );\n}\n\n// lucide: send v0.577.0 (paper-airplane redesign)\nexport function SendTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Send\" {...props}>\n <path d=\"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z\" />\n <path d=\"m21.854 2.147-10.94 10.939\" />\n </Wrap>\n );\n}\n\n// lucide: message-square v0.577.0\nexport function MessageTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Message\" {...props}>\n <path d=\"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z\" />\n </Wrap>\n );\n}\n\n// lucide: variable v0.577.0 (major update — uses line elements + bracket paths)\nexport function VariableTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Variable\" {...props}>\n <path d=\"M8 21s-4-3-4-9 4-9 4-9\" />\n <path d=\"M16 3s4 3 4 9-4 9-4 9\" />\n <line x1=\"15\" x2=\"9\" y1=\"9\" y2=\"15\" />\n <line x1=\"9\" x2=\"15\" y1=\"9\" y2=\"15\" />\n </Wrap>\n );\n}\n\n// lucide: wrench v0.577.0 (single clean path)\nexport function WrenchTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Tool\" {...props}>\n <path d=\"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z\" />\n </Wrap>\n );\n}\n\n// lucide: command v0.577.0 (single continuous path)\nexport function CommandTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Command\" {...props}>\n <path d=\"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3\" />\n </Wrap>\n );\n}\n\n// lucide: terminal v0.577.0 (two paths: chevron + underline)\nexport function TerminalTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Terminal\" {...props}>\n <path d=\"M12 19h8\" />\n <path d=\"m4 17 6-6-6-6\" />\n </Wrap>\n );\n}\n\n// lucide: test-tube v0.577.0 (3 clean paths)\nexport function TestTubeTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Test\" {...props}>\n <path d=\"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2\" />\n <path d=\"M8.5 2h7\" />\n <path d=\"M14.5 16h-5\" />\n </Wrap>\n );\n}\n\n// lucide: rotate-ccw v0.577.0 (same shape as history minus the clock hand — used for Reset)\nexport function ResetTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Reset\" {...props}>\n <path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\" />\n <path d=\"M3 3v5h5\" />\n </Wrap>\n );\n}\n\n// lucide: eraser v0.577.0 (major update — proper eraser shape)\nexport function ClearTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Clear\" {...props}>\n <path d=\"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21\" />\n <path d=\"m5.082 11.09 8.828 8.828\" />\n </Wrap>\n );\n}\n\n// lucide: refresh-cw v1.22.0 (dual arrows — was a broken hand-crafted Heroicons-style path)\nexport function RetryTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Retry\" {...props}>\n <path d=\"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8\" />\n <path d=\"M21 3v5h-5\" />\n <path d=\"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16\" />\n <path d=\"M8 16H3v5\" />\n </Wrap>\n );\n}\n\n/** Alias — same Lucide refresh-cw glyph as RetryTapButton. */\nexport function RefreshCwTapButton(props: TapButtonProps) {\n return <RetryTapButton ariaLabel=\"Refresh\" {...props} />;\n}\n\n// lucide: loading spinner (custom animated — no Lucide equivalent)\n//\n// 🚨 `matrx-spin`, NEVER `animate-spin` (census row 19i, closed here at 0.2.1).\n// `animate-spin` is a core Tailwind utility, so it happened to survive in all\n// four current consumers — but a package cannot ship a class it does not\n// define: the first host without Tailwind's core animate utilities gets a\n// spinner that does not spin, which is a load-bearing lie (it says the work\n// has stopped) with no error to find it by. `matrx-spin` is design-system\n// 0.10.0's own keyframe + rule, shipped in ITS `styles.css` and asserted\n// present in ITS packed tarball. This package IMPORTS that contract (the\n// exported `MOTION_SPIN` constant, and `styles.css` `@import`s the sheet) —\n// it does not copy the keyframe, which would be a twin of exactly the kind\n// this row exists to kill. Under `prefers-reduced-motion` the shared rule\n// SLOWS the loop instead of stopping it, because a stopped spinner removes\n// information rather than motion.\nexport function LoadingTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Loading\" {...props}>\n <circle\n className={MOTION_SPIN}\n cx=\"12\"\n cy=\"12\"\n r=\"9\"\n strokeDasharray=\"28.27\"\n strokeDashoffset=\"9\"\n strokeLinecap=\"round\"\n style={{ transformOrigin: \"12px 12px\" }}\n />\n </Wrap>\n );\n}\n\n// lucide: bot/robot (hand-crafted — kept as-is)\nexport function RobotTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"AI Agent\" {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M9 3.75H6.912a2.25 2.25 0 00-2.15 1.588L2.35 13.177a2.25 2.25 0 00-.1.661V18a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18v-4.162c0-.224-.034-.447-.1-.661L19.24 5.338a2.25 2.25 0 00-2.15-1.588H15M2.25 13.5h3.86a2.25 2.25 0 012.012 1.244l.256.512a2.25 2.25 0 002.013 1.244h3.218a2.25 2.25 0 002.013-1.244l.256-.512a2.25 2.25 0 012.013-1.244h3.859M12 3v8.25m0 0-3-3m3 3 3-3\"\n />\n </Wrap>\n );\n}\n\n// lucide: webhook v0.577.0\nexport function WebhookTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Webhook\" {...props}>\n <path d=\"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2\" />\n <path d=\"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06\" />\n <path d=\"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8\" />\n </Wrap>\n );\n}\n\n// lucide: eye v0.577.0\nexport function ViewTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"View\" {...props}>\n <path d=\"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0\" />\n <circle cx=\"12\" cy=\"12\" r=\"3\" />\n </Wrap>\n );\n}\n\n// lucide: hammer v0.577.0\nexport function BuildTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Build\" {...props}>\n <path d=\"m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9\" />\n <path d=\"m18 15 4-4\" />\n <path d=\"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5\" />\n </Wrap>\n );\n}\n\n// lucide: play v0.577.0 (alias for Run context)\nexport function RunTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Run\" {...props}>\n <path d=\"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z\" />\n </Wrap>\n );\n}\n\n// lucide: history v0.577.0\nexport function HistoryTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"History\" {...props}>\n <path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\" />\n <path d=\"M3 3v5h5\" />\n <path d=\"M12 7v5l4 2\" />\n </Wrap>\n );\n}\n\n// lucide: paperclip v0.577.0\nexport function PaperclipTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Attach file\" {...props}>\n <path d=\"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551\" />\n </Wrap>\n );\n}\n\n// lucide: thumbs-up v0.577.0\nexport function ThumbsUpTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Like\" {...props}>\n <path d=\"M7 10v12\" />\n <path d=\"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z\" />\n </Wrap>\n );\n}\n\n// lucide: thumbs-down v0.577.0\nexport function ThumbsDownTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Dislike\" {...props}>\n <path d=\"M17 14V2\" />\n <path d=\"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z\" />\n </Wrap>\n );\n}\n\n// lucide: check v0.577.0\nexport function CheckTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Done\" {...props}>\n <path d=\"M20 6 9 17l-5-5\" />\n </Wrap>\n );\n}\n\n// lucide: pencil v0.577.0\nexport function PencilTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Edit\" {...props}>\n <path d=\"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z\" />\n <path d=\"m15 5 4 4\" />\n </Wrap>\n );\n}\n\n// lucide: ellipsis (more-horizontal) v0.577.0\nexport function MoreHorizontalTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"More options\" {...props}>\n <circle cx=\"12\" cy=\"12\" r=\"1\" />\n <circle cx=\"19\" cy=\"12\" r=\"1\" />\n <circle cx=\"5\" cy=\"12\" r=\"1\" />\n </Wrap>\n );\n}\n\n// lucide: check-square v0.577.0\nexport function CheckSquareTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Task\" {...props}>\n <path d=\"m9 11 3 3L22 4\" />\n <path d=\"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11\" />\n </Wrap>\n );\n}\n\n// lucide: ghost v0.577.0\nexport function GhostTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Incognito chat\" {...props}>\n <path d=\"M9 10h.01\" />\n <path d=\"M15 10h.01\" />\n <path d=\"M12 2a8 8 0 0 0-8 8v12l3-3 2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8z\" />\n </Wrap>\n );\n}\n\n// lucide: link (chain link — used for \"attach to task\") v0.577.0\nexport function LinkTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Attach\" {...props}>\n <path d=\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\" />\n <path d=\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\" />\n </Wrap>\n );\n}\n\n// lucide: external-link v0.577.0\nexport function ExternalLinkTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Open source\" {...props}>\n <path d=\"M15 3h6v6\" />\n <path d=\"M10 14 21 3\" />\n <path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\" />\n </Wrap>\n );\n}\n\n// lucide: clipboard-list v0.577.0\nexport function ClipboardListTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Copy Pages\" {...props}>\n <rect width=\"8\" height=\"4\" x=\"8\" y=\"2\" rx=\"1\" ry=\"1\" />\n <path d=\"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2\" />\n <path d=\"M12 11h4\" />\n <path d=\"M12 16h4\" />\n <path d=\"M8 11h.01\" />\n <path d=\"M8 16h.01\" />\n </Wrap>\n );\n}\n\n// lucide: party-popper v0.577.0\nexport function PartyPopperTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"AI Clean\" {...props}>\n <path d=\"M5.8 11.3 2 22l10.7-3.79\" />\n <path d=\"M4 3h.01\" />\n <path d=\"M22 8h.01\" />\n <path d=\"M15 2h.01\" />\n <path d=\"M22 20h.01\" />\n <path d=\"m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10\" />\n <path d=\"m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11c-.11.7-.72 1.22-1.43 1.22H17\" />\n <path d=\"m11 2 .33.82c.34.86-.2 1.82-1.11 1.98C9.52 4.9 9 5.52 9 6.23V7\" />\n <path d=\"M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z\" />\n </Wrap>\n );\n}\n\n// lucide: layers v0.577.0 — \"this PDF everywhere\" surface switcher\nexport function LayersTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Open this PDF in another surface\" {...props}>\n <path d=\"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z\" />\n <path d=\"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12\" />\n <path d=\"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17\" />\n </Wrap>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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C/D,6CAAC,UAAK,eAAc,SAAQ,gBAAe,SAAQ,GAAE,UAAS;AAAA,IAC9D;AAAA,MAAC;AAAA;AAAA,QACC,eAAc;AAAA,QACd,gBAAe;AAAA,QACf,GAAE;AAAA,QACF,GAAE;AAAA,QACF,OAAM;AAAA,QACN,QAAO;AAAA,QACP,IAAG;AAAA;AAAA,IACL;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,eAAc;AAAA,QACd,gBAAe;AAAA,QACf,GAAE;AAAA,QACF,GAAE;AAAA,QACF,OAAM;AAAA,QACN,QAAO;AAAA,QACP,IAAG;AAAA;AAAA,IACL;AAAA,KACF;AAEJ;AAQA,IAAM,yBAA4D;AAAA,EAChE,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AAAA,EACP,KAAK;AAAA,EACL,MAAM;AAAA,EACN,UAAU;AAAA,EACV,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,aAAa;AAAA,EACb,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AAAA,EACV,WAAW;AAAA,EACX,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,WAAW;AAAA,EACX,UAAU;AAAA,EACV,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,KAAK;AAAA,EACL,KAAK;AAAA,EACL,OAAO;AAAA,EACP,KAAK;AACP;AAEO,SAAS,uBAAuB,SAAoC;AACzE,SAAO,uBAAuB,OAAO,KAAK,uBAAuB;AACnE;","names":["import_react","React","import_jsx_runtime","import_react","import_jsx_runtime","import_react","import_jsx_runtime","import_jsx_runtime","tooltipSide","TapTargetButton","TapTargetButtonTransparent","TapTargetButtonOutline","TapTargetButtonSolid","TapTargetButtonDestructive","TapTargetButtonForGroup","import_react","import_jsx_runtime","SLOT","import_react","import_jsx_runtime","Wrap","import_jsx_runtime","Wrap","tooltipSide"]}
1
+ {"version":3,"sources":["../../src/tap-target/ai-buttons.tsx","../../src/tap-target/tap-target-button.tsx","../../src/tooltip.tsx","../../src/cn.ts","../../src/motion.ts","../../src/portal-container.tsx","../../src/title-tooltips.ts","../../src/tap-target/tap-target-guard.ts","../../src/layout-scale.ts","../../src/tap-target/tap-surface.tsx","../../src/tap-target/tap-features.tsx","../../src/tap-shortcut.ts","../../src/tap-target/link.ts","../../src/tap-target/tap-default-variant.tsx","../../src/tap-target/tap-buttons.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n TapTargetButton,\n TapTargetButtonTransparent,\n TapTargetButtonSolid,\n TapTargetButtonForGroup,\n} from \"./tap-target-button\";\nimport { useTapButtonVariant } from \"./tap-default-variant\";\nimport { RobotTapButton } from \"./tap-buttons\";\nimport type { ComponentType } from \"react\";\n\ntype Variant = \"glass\" | \"transparent\" | \"solid\" | \"group\";\n\nexport interface AITapButtonProps {\n variant?: Variant | undefined;\n onClick?: () => void | undefined;\n as?: \"button\" | \"label\" | undefined;\n htmlFor?: string | undefined;\n ariaLabel?: string | undefined;\n disabled?: boolean | undefined;\n className?: string | undefined;\n strokeWidth?: number | undefined;\n colored?: boolean | undefined;\n bgColor?: string | undefined;\n iconColor?: string | undefined;\n hoverBgColor?: string | undefined;\n activeBgColor?: string | undefined;\n /** Pass `false` to suppress the built-in tooltip (e.g. when a parent already provides one). */\n tooltip?: string | false | undefined;\n tooltipSide?: \"top\" | \"right\" | \"bottom\" | \"left\" | undefined;\n tooltipAlign?: \"start\" | \"center\" | \"end\" | undefined;\n // Link support — see tap-buttons.tsx for full semantics.\n href?: string | undefined;\n target?: \"_blank\" | \"_self\" | \"_parent\" | \"_top\" | undefined;\n rel?: string | undefined;\n prefetch?: boolean | null | undefined;\n /** Inline caption after the icon — see TapTargetButton `label`. */\n label?: string | undefined;\n}\n\nfunction Wrap({\n variant: variantProp,\n children,\n colored: _colored,\n tooltip,\n tooltipSide,\n tooltipAlign,\n ...props\n}: AITapButtonProps & { children: React.ReactNode }) {\n const variant = useTapButtonVariant(variantProp);\n const tooltipProps = { tooltip, tooltipSide, tooltipAlign };\n switch (variant) {\n case \"transparent\":\n return (\n <TapTargetButtonTransparent {...props} {...tooltipProps}>\n {children}\n </TapTargetButtonTransparent>\n );\n case \"solid\":\n return (\n <TapTargetButtonSolid {...props} {...tooltipProps}>\n {children}\n </TapTargetButtonSolid>\n );\n case \"group\":\n return (\n <TapTargetButtonForGroup {...props} {...tooltipProps}>\n {children}\n </TapTargetButtonForGroup>\n );\n default:\n return (\n <TapTargetButton {...props} {...tooltipProps}>\n {children}\n </TapTargetButton>\n );\n }\n}\n\nfunction BrandIcon({\n colored,\n brandColor,\n ariaLabel,\n d,\n ...props\n}: AITapButtonProps & { brandColor: string; d: string }) {\n const isBlack = brandColor === \"#000000\" || brandColor === \"#191919\";\n const fill = colored\n ? isBlack\n ? \"currentColor\"\n : brandColor\n : \"currentColor\";\n return (\n <Wrap ariaLabel={ariaLabel} {...props}>\n <path fill={fill} stroke=\"none\" d={d} />\n </Wrap>\n );\n}\n\n// ---------------------------------------------------------------------------\n// BRAND MODELS (Filled SVGs)\n// ---------------------------------------------------------------------------\n\nexport const OpenAITapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"OpenAI\"\n brandColor=\"#000000\"\n d=\"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z\"\n />\n);\nexport const AnthropicTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Anthropic\"\n brandColor=\"#D97757\"\n d=\"M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5528h3.7442L10.5363 3.5409Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z\"\n />\n);\nexport const ClaudeTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Claude\"\n brandColor=\"#D97757\"\n d=\"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z\"\n />\n);\n\n// Google: multicolor when colored, currentColor when not\nexport function GoogleTapButton({ colored, ...props }: AITapButtonProps) {\n if (!colored) {\n return (\n <BrandIcon\n {...props}\n colored={false}\n ariaLabel=\"Google\"\n brandColor=\"#000000\"\n d=\"M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z\"\n />\n );\n }\n return (\n <Wrap ariaLabel=\"Google\" {...props}>\n <path\n fill=\"#4285F4\"\n stroke=\"none\"\n d=\"M23.693 12.267c0-.76-.053-1.467-.173-2.053H12.48v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133l2.84 2.2c1.653-1.52 2.613-3.76 2.613-6.427l-.293-1.133z\"\n />\n <path\n fill=\"#34A853\"\n stroke=\"none\"\n d=\"M12.48 24c3.573 0 6.267-1.173 8.373-3.36l-2.84-2.2c-1.147.853-2.613 1.36-5.533 1.36-4.253 0-7.867-2.88-9.147-6.747l-2.933 2.267C2.587 20.147 7.227 24 12.48 24z\"\n />\n <path\n fill=\"#FBBC05\"\n stroke=\"none\"\n d=\"M3.333 13.053A11.98 11.98 0 0 1 2.707 9.96l-2.4 1.853a19.91 19.91 0 0 0 0 8.374l2.933-2.267a7.156 7.156 0 0 1-.24-2.12l.333-2.747z\"\n />\n <path\n fill=\"#EA4335\"\n stroke=\"none\"\n d=\"M12.48 3.28c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 7.227 0 2.587 3.853.307 8.68l2.933 2.267c1.28-3.867 4.893-7.667 9.24-7.667z\"\n />\n </Wrap>\n );\n}\n\n// Gemini: updated brand blue\nexport const GeminiTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Gemini\"\n brandColor=\"#4285F4\"\n d=\"M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81\"\n />\n);\nexport const MetaTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Meta\"\n brandColor=\"#0467DF\"\n d=\"M6.915 4.03c-1.968 0-3.683 1.28-4.871 3.113C.704 9.208 0 11.883 0 14.449c0 .706.07 1.369.21 1.973a6.624 6.624 0 0 0 .265.86 5.297 5.297 0 0 0 .371.761c.696 1.159 1.818 1.927 3.593 1.927 1.497 0 2.633-.671 3.965-2.444.76-1.012 1.144-1.626 2.663-4.32l.756-1.339.186-.325c.061.1.121.196.183.3l2.152 3.595c.724 1.21 1.665 2.556 2.47 3.314 1.046.987 1.992 1.22 3.06 1.22 1.075 0 1.876-.355 2.455-.843a3.743 3.743 0 0 0 .81-.973c.542-.939.861-2.127.861-3.745 0-2.72-.681-5.357-2.084-7.45-1.282-1.912-2.957-2.93-4.716-2.93-1.047 0-2.088.467-3.053 1.308-.652.57-1.257 1.29-1.82 2.05-.69-.875-1.335-1.547-1.958-2.056-1.182-.966-2.315-1.303-3.454-1.303zm10.16 2.053c1.147 0 2.188.758 2.992 1.999 1.132 1.748 1.647 4.195 1.647 6.4 0 1.548-.368 2.9-1.839 2.9-.58 0-1.027-.23-1.664-1.004-.496-.601-1.343-1.878-2.832-4.358l-.617-1.028a44.908 44.908 0 0 0-1.255-1.98c.07-.109.141-.224.211-.327 1.12-1.667 2.118-2.602 3.358-2.602zm-10.201.553c1.265 0 2.058.791 2.675 1.446.307.327.737.871 1.234 1.579l-1.02 1.566c-.757 1.163-1.882 3.017-2.837 4.338-1.191 1.649-1.81 1.817-2.486 1.817-.524 0-1.038-.237-1.383-.794-.263-.426-.464-1.13-.464-2.046 0-2.221.63-4.535 1.66-6.088.454-.687.964-1.226 1.533-1.533a2.264 2.264 0 0 1 1.088-.285z\"\n />\n);\n\n// X (Twitter) logo — was named XaiTapButton but is the X/Twitter mark\nexport const XTweetTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"X\"\n brandColor=\"#000000\"\n d=\"M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z\"\n />\n);\n\n// xAI brand logo (stylized ξ mark)\nexport function XaiTapButton({ colored, ...props }: AITapButtonProps) {\n const fill = colored ? \"currentColor\" : \"currentColor\";\n return (\n <Wrap ariaLabel=\"xAI\" {...props}>\n <g transform=\"translate(0.5,1) scale(0.034)\">\n <path\n fill={fill}\n stroke=\"none\"\n d=\"M557.09 211.99l8.31 326.37h66.56l8.32-445.18z\"\n />\n <path\n fill={fill}\n stroke=\"none\"\n d=\"M640.28 56.91H538.72L379.35 284.53l50.78 72.52z\"\n />\n <path\n fill={fill}\n stroke=\"none\"\n d=\"M201.61 538.36h101.56l50.79-72.52-50.79-72.53z\"\n />\n <path\n fill={fill}\n stroke=\"none\"\n d=\"M201.61 211.99l228.52 326.37h101.56L303.17 211.99z\"\n />\n </g>\n </Wrap>\n );\n}\n\nexport const MistralTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Mistral\"\n brandColor=\"#FA520F\"\n d=\"M17.143 3.429v3.428h-3.429v3.429h-3.428V6.857H6.857V3.43H3.43v13.714H0v3.428h10.286v-3.428H6.857v-3.429h3.429v3.429h3.429v-3.429h3.428v3.429h-3.428v3.428H24v-3.428h-3.43V3.429z\"\n />\n);\nexport const PerplexityTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Perplexity\"\n brandColor=\"#1FB8CD\"\n d=\"M22.3977 7.0896h-2.3106V.0676l-7.5094 6.3542V.1577h-1.1554v6.1966L4.4904 0v7.0896H1.6023v10.3976h2.8882V24l6.932-6.3591v6.2005h1.1554v-6.0469l6.9318 6.1807v-6.4879h2.8882V7.0896zm-3.4657-4.531v4.531h-5.355l5.355-4.531zm-13.2862.0676 4.8691 4.4634H5.6458V2.6262zM2.7576 16.332V8.245h7.8476l-6.1149 6.1147v1.9723H2.7576zm2.8882 5.0404v-3.8852h.0001v-2.6488l5.7763-5.7764v7.0111l-5.7764 5.2993zm12.7086.0248-5.7766-5.1509V9.0618l5.7766 5.7766v6.5588zm2.8882-5.0652h-1.733v-1.9723L13.3948 8.245h7.8478v8.087z\"\n />\n);\nexport const HuggingFaceTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Hugging Face\"\n brandColor=\"#FFD21E\"\n d=\"M12.025 1.13c-5.77 0-10.449 4.647-10.449 10.378 0 1.112.178 2.181.503 3.185.064-.222.203-.444.416-.577a.96.96 0 0 1 .524-.15c.293 0 .584.124.84.284.278.173.48.408.71.694.226.282.458.611.684.951v-.014c.017-.324.106-.622.264-.874s.403-.487.762-.543c.3-.047.596.06.787.203s.31.313.4.467c.15.257.212.468.233.542.01.026.653 1.552 1.657 2.54.616.605 1.01 1.223 1.082 1.912.055.537-.096 1.059-.38 1.572.637.121 1.294.187 1.967.187.657 0 1.298-.063 1.921-.178-.287-.517-.44-1.041-.384-1.581.07-.69.465-1.307 1.081-1.913 1.004-.987 1.647-2.513 1.657-2.539.021-.074.083-.285.233-.542.09-.154.208-.323.4-.467a1.08 1.08 0 0 1 .787-.203c.359.056.604.29.762.543s.247.55.265.874v.015c.225-.34.457-.67.683-.952.23-.286.432-.52.71-.694.257-.16.547-.284.84-.285a.97.97 0 0 1 .524.151c.228.143.373.388.43.625l.006.04a10.3 10.3 0 0 0 .534-3.273c0-5.731-4.678-10.378-10.449-10.378M8.327 6.583a1.5 1.5 0 0 1 .713.174 1.487 1.487 0 0 1 .617 2.013c-.183.343-.762-.214-1.102-.094-.38.134-.532.914-.917.71a1.487 1.487 0 0 1 .69-2.803m7.486 0a1.487 1.487 0 0 1 .689 2.803c-.385.204-.536-.576-.916-.71-.34-.12-.92.437-1.103.094a1.487 1.487 0 0 1 .617-2.013 1.5 1.5 0 0 1 .713-.174m-10.68 1.55a.96.96 0 1 1 0 1.921.96.96 0 0 1 0-1.92m13.838 0a.96.96 0 1 1 0 1.92.96.96 0 0 1 0-1.92M8.489 11.458c.588.01 1.965 1.157 3.572 1.164 1.607-.007 2.984-1.155 3.572-1.164.196-.003.305.12.305.454 0 .886-.424 2.328-1.563 3.202-.22-.756-1.396-1.366-1.63-1.32q-.011.001-.02.006l-.044.026-.01.008-.03.024q-.018.017-.035.036l-.032.04a1 1 0 0 0-.058.09l-.014.025q-.049.088-.11.19a1 1 0 0 1-.083.116 1.2 1.2 0 0 1-.173.18q-.035.029-.075.058a1.3 1.3 0 0 1-.251-.243 1 1 0 0 1-.076-.107c-.124-.193-.177-.363-.337-.444-.034-.016-.104-.008-.2.022q-.094.03-.216.087-.06.028-.125.063l-.13.074q-.067.04-.136.086a3 3 0 0 0-.135.096 3 3 0 0 0-.26.219 2 2 0 0 0-.12.121 2 2 0 0 0-.106.128l-.002.002a2 2 0 0 0-.09.132l-.001.001a1.2 1.2 0 0 0-.105.212q-.013.036-.024.073c-1.139-.875-1.563-2.317-1.563-3.203 0-.334.109-.457.305-.454m.836 10.354c.824-1.19.766-2.082-.365-3.194-1.13-1.112-1.789-2.738-1.789-2.738s-.246-.945-.806-.858-.97 1.499.202 2.362c1.173.864-.233 1.45-.685.64-.45-.812-1.683-2.896-2.322-3.295s-1.089-.175-.938.647 2.822 2.813 2.562 3.244-1.176-.506-1.176-.506-2.866-2.567-3.49-1.898.473 1.23 2.037 2.16c1.564.932 1.686 1.178 1.464 1.53s-3.675-2.511-4-1.297c-.323 1.214 3.524 1.567 3.287 2.405-.238.839-2.71-1.587-3.216-.642-.506.946 3.49 2.056 3.522 2.064 1.29.33 4.568 1.028 5.713-.624m5.349 0c-.824-1.19-.766-2.082.365-3.194 1.13-1.112 1.789-2.738 1.789-2.738s.246-.945.806-.858.97 1.499-.202 2.362c-1.173.864.233 1.45.685.64.451-.812 1.683-2.896 2.322-3.295s1.089-.175.938.647-2.822 2.813-2.562 3.244 1.176-.506 1.176-.506 2.866-2.567 3.49-1.898-.473 1.23-2.037 2.16c-1.564.932-1.686 1.178-1.464 1.53s3.675-2.511 4-1.297c.323 1.214-3.524 1.567-3.287 2.405.238.839 2.71-1.587 3.216-.642.506.946-3.49 2.056-3.522 2.064-1.29.33-4.568 1.028-5.713-.624\"\n />\n);\nexport const ElevenLabsTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"ElevenLabs\"\n brandColor=\"#000000\"\n d=\"M4.6035 0v24h4.9317V0zm9.8613 0v24h4.9317V0z\"\n />\n);\nexport const ReplicateTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Replicate\"\n brandColor=\"#000000\"\n d=\"M24 10.262v2.712h-9.518V24h-3.034V10.262zm0-5.131v2.717H8.755V24H5.722V5.131zM24 0v2.717H3.034V24H0V0z\"\n />\n);\n\n// ---------------------------------------------------------------------------\nexport const LlamaTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Llama\"\n brandColor=\"#000000\"\n d=\"M16.361 10.26a.894.894 0 0 0-.558.47l-.072.148.001.207c0 .193.004.217.059.353.076.193.152.312.291.448.24.238.51.3.872.205a.86.86 0 0 0 .517-.436.752.752 0 0 0 .08-.498c-.064-.453-.33-.782-.724-.897a1.06 1.06 0 0 0-.466 0zm-9.203.005c-.305.096-.533.32-.65.639a1.187 1.187 0 0 0-.06.52c.057.309.31.59.598.667.362.095.632.033.872-.205.14-.136.215-.255.291-.448.055-.136.059-.16.059-.353l.001-.207-.072-.148a.894.894 0 0 0-.565-.472 1.02 1.02 0 0 0-.474.007Zm4.184 2c-.131.071-.223.25-.195.383.031.143.157.288.353.407.105.063.112.072.117.136.004.038-.01.146-.029.243-.02.094-.036.194-.036.222.002.074.07.195.143.253.064.052.076.054.255.059.164.005.198.001.264-.03.169-.082.212-.234.15-.525-.052-.243-.042-.28.087-.355.137-.08.281-.219.324-.314a.365.365 0 0 0-.175-.48.394.394 0 0 0-.181-.033c-.126 0-.207.03-.355.124l-.085.053-.053-.032c-.219-.13-.259-.145-.391-.143a.396.396 0 0 0-.193.032zm.39-2.195c-.373.036-.475.05-.654.086-.291.06-.68.195-.951.328-.94.46-1.589 1.226-1.787 2.114-.04.176-.045.234-.045.53 0 .294.005.357.043.524.264 1.16 1.332 2.017 2.714 2.173.3.033 1.596.033 1.896 0 1.11-.125 2.064-.727 2.493-1.571.114-.226.169-.372.22-.602.039-.167.044-.23.044-.523 0-.297-.005-.355-.045-.531-.288-1.29-1.539-2.304-3.072-2.497a6.873 6.873 0 0 0-.855-.031zm.645.937a3.283 3.283 0 0 1 1.44.514c.223.148.537.458.671.662.166.251.26.508.303.82.02.143.01.251-.043.482-.08.345-.332.705-.672.957a3.115 3.115 0 0 1-.689.348c-.382.122-.632.144-1.525.138-.582-.006-.686-.01-.853-.042-.57-.107-1.022-.334-1.35-.68-.264-.28-.385-.535-.45-.946-.03-.192.025-.509.137-.776.136-.326.488-.73.836-.963.403-.269.934-.46 1.422-.512.187-.02.586-.02.773-.002zm-5.503-11a1.653 1.653 0 0 0-.683.298C5.617.74 5.173 1.666 4.985 2.819c-.07.436-.119 1.04-.119 1.503 0 .544.064 1.24.155 1.721.02.107.031.202.023.208a8.12 8.12 0 0 1-.187.152 5.324 5.324 0 0 0-.949 1.02 5.49 5.49 0 0 0-.94 2.339 6.625 6.625 0 0 0-.023 1.357c.091.78.325 1.438.727 2.04l.13.195-.037.064c-.269.452-.498 1.105-.605 1.732-.084.496-.095.629-.095 1.294 0 .67.009.803.088 1.266.095.555.288 1.143.503 1.534.071.128.243.393.264.407.007.003-.014.067-.046.141a7.405 7.405 0 0 0-.548 1.873c-.062.417-.071.552-.071.991 0 .56.031.832.148 1.279L3.42 24h1.478l-.05-.091c-.297-.552-.325-1.575-.068-2.597.117-.472.25-.819.498-1.296l.148-.29v-.177c0-.165-.003-.184-.057-.293a.915.915 0 0 0-.194-.25 1.74 1.74 0 0 1-.385-.543c-.424-.92-.506-2.286-.208-3.451.124-.486.329-.918.544-1.154a.787.787 0 0 0 .223-.531c0-.195-.07-.355-.224-.522a3.136 3.136 0 0 1-.817-1.729c-.14-.96.114-2.005.69-2.834.563-.814 1.353-1.336 2.237-1.475.199-.033.57-.028.776.01.226.04.367.028.512-.041.179-.085.268-.19.374-.431.093-.215.165-.333.36-.576.234-.29.46-.489.822-.729.413-.27.884-.467 1.352-.561.17-.035.25-.04.569-.04.319 0 .398.005.569.04a4.07 4.07 0 0 1 1.914.997c.117.109.398.457.488.602.034.057.095.177.132.267.105.241.195.346.374.43.14.068.286.082.503.045.343-.058.607-.053.943.016 1.144.23 2.14 1.173 2.581 2.437.385 1.108.276 2.267-.296 3.153-.097.15-.193.27-.333.419-.301.322-.301.722-.001 1.053.493.539.801 1.866.708 3.036-.062.772-.26 1.463-.533 1.854a2.096 2.096 0 0 1-.224.258.916.916 0 0 0-.194.25c-.054.109-.057.128-.057.293v.178l.148.29c.248.476.38.823.498 1.295.253 1.008.231 2.01-.059 2.581a.845.845 0 0 0-.044.098c0 .006.329.009.732.009h.73l.02-.074.036-.134c.019-.076.057-.3.088-.516.029-.217.029-1.016 0-1.258-.11-.875-.295-1.57-.597-2.226-.032-.074-.053-.138-.046-.141.008-.005.057-.074.108-.152.376-.569.607-1.284.724-2.228.031-.26.031-1.378 0-1.628-.083-.645-.182-1.082-.348-1.525a6.083 6.083 0 0 0-.329-.7l-.038-.064.131-.194c.402-.604.636-1.262.727-2.04a6.625 6.625 0 0 0-.024-1.358 5.512 5.512 0 0 0-.939-2.339 5.325 5.325 0 0 0-.95-1.02 8.097 8.097 0 0 1-.186-.152.692.692 0 0 1 .023-.208c.208-1.087.201-2.443-.017-3.503-.19-.924-.535-1.658-.98-2.082-.354-.338-.716-.482-1.15-.455-.996.059-1.8 1.205-2.116 3.01a6.805 6.805 0 0 0-.097.726c0 .036-.007.066-.015.066a.96.96 0 0 1-.149-.078A4.857 4.857 0 0 0 12 3.03c-.832 0-1.687.243-2.456.698a.958.958 0 0 1-.148.078c-.008 0-.015-.03-.015-.066a6.71 6.71 0 0 0-.097-.725C8.997 1.392 8.337.319 7.46.048a2.096 2.096 0 0 0-.585-.041Zm.293 1.402c.248.197.523.759.682 1.388.03.113.06.244.069.292.007.047.026.152.041.233.067.365.098.76.102 1.24l.002.475-.12.175-.118.178h-.278c-.324 0-.646.041-.954.124l-.238.06c-.033.007-.038-.003-.057-.144a8.438 8.438 0 0 1 .016-2.323c.124-.788.413-1.501.696-1.711.067-.05.079-.049.157.013zm9.825-.012c.17.126.358.46.498.888.28.854.36 2.028.212 3.145-.019.14-.024.151-.057.144l-.238-.06a3.693 3.693 0 0 0-.954-.124h-.278l-.119-.178-.119-.175.002-.474c.004-.669.066-1.19.214-1.772.157-.623.434-1.185.68-1.382.078-.062.09-.063.159-.012z\"\n />\n);\n\n// Flux: fixed dark mode — was hardcoding #000 when colored\nexport function FluxTapButton({ colored, ...props }: AITapButtonProps) {\n return (\n <Wrap ariaLabel=\"Flux\" {...props}>\n <path\n fill=\"currentColor\"\n stroke=\"none\"\n transform=\"scale(0.046)\"\n d=\"M365.077 218.624H310.613L256.149 141.483L86.272 381.909H140.843L256.149 218.624H310.592L195.307 381.888H250.027L365.056 218.624L512 426.667H426.027V382.059L365.077 295.787L304.448 381.909V426.667H8.71931e-06L256.171 64L365.077 218.624Z\"\n />\n </Wrap>\n );\n}\n\n// Grok: fixed dark mode — was hardcoding #000 when colored\nexport function GrokTapButton({ colored, ...props }: AITapButtonProps) {\n return (\n <Wrap ariaLabel=\"Grok\" {...props}>\n <g transform=\"scale(0.7)\">\n <path\n fill=\"currentColor\"\n stroke=\"none\"\n d=\"M13.2371 21.0407L24.3186 12.8506C24.8619 12.4491 25.6384 12.6057 25.8973 13.2294C27.2597 16.5185 26.651 20.4712 23.9403 23.1851C21.2297 25.8989 17.4581 26.4941 14.0108 25.1386L10.2449 26.8843C15.6463 30.5806 22.2053 29.6665 26.304 25.5601C29.5551 22.3051 30.562 17.8683 29.6205 13.8673L29.629 13.8758C28.2637 7.99809 29.9647 5.64871 33.449 0.844576C33.5314 0.730667 33.6139 0.616757 33.6964 0.5L29.1113 5.09055V5.07631L13.2343 21.0436\"\n />\n <path\n fill=\"currentColor\"\n stroke=\"none\"\n d=\"M10.9503 23.0313C7.07343 19.3235 7.74185 13.5853 11.0498 10.2763C13.4959 7.82722 17.5036 6.82767 21.0021 8.2971L24.7595 6.55998C24.0826 6.07017 23.215 5.54334 22.2195 5.17313C17.7198 3.31926 12.3326 4.24192 8.67479 7.90126C5.15635 11.4239 4.0499 16.8403 5.94992 21.4622C7.36924 24.9165 5.04257 27.3598 2.69884 29.826C1.86829 30.7002 1.0349 31.5745 0.36364 32.5L10.9474 23.0341\"\n />\n </g>\n </Wrap>\n );\n}\n\n// DeepSeek: corrected brand color from #4D6BFE to #3C5DFF\nexport const DeepSeekTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"DeepSeek\"\n brandColor=\"#3C5DFF\"\n d=\"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 0 1-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 0 0-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 0 1-.465.137 9.597 9.597 0 0 0-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 0 0 1.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 0 1 1.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 0 1 .415-.287.302.302 0 0 1 .2.288.306.306 0 0 1-.31.307.303.303 0 0 1-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 0 1-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 0 1 .016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 0 1-.254-.078.253.253 0 0 1-.114-.358c.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z\"\n />\n);\n\nexport const NvidiaTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"NVIDIA\"\n brandColor=\"#76B900\"\n d=\"M8.948 8.798v-1.43a6.7 6.7 0 0 1 .424-.018c3.922-.124 6.493 3.374 6.493 3.374s-2.774 3.851-5.75 3.851c-.398 0-.787-.062-1.158-.185v-4.346c1.528.185 1.837.857 2.747 2.385l2.04-1.714s-1.492-1.952-4-1.952a6.016 6.016 0 0 0-.796.035m0-4.735v2.138l.424-.027c5.45-.185 9.01 4.47 9.01 4.47s-4.08 4.964-8.33 4.964c-.37 0-.733-.035-1.095-.097v1.325c.3.035.61.062.91.062 3.957 0 6.82-2.023 9.593-4.408.459.371 2.34 1.263 2.73 1.652-2.633 2.208-8.772 3.984-12.253 3.984-.335 0-.653-.018-.971-.053v1.864H24V4.063zm0 10.326v1.131c-3.657-.654-4.673-4.46-4.673-4.46s1.758-1.944 4.673-2.262v1.237H8.94c-1.528-.186-2.73 1.245-2.73 1.245s.68 2.412 2.739 3.11M2.456 10.9s2.164-3.197 6.5-3.533V6.201C4.153 6.59 0 10.653 0 10.653s2.35 6.802 8.948 7.42v-1.237c-4.84-.6-6.492-5.936-6.492-5.936z\"\n />\n);\n\n// ---------------------------------------------------------------------------\n// ADDITIONAL MODEL PROVIDERS (LobeHub / official brand SVGs)\n// ---------------------------------------------------------------------------\n\nexport const GroqTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Groq\"\n brandColor=\"#F55036\"\n d=\"M12.036 2c-3.853-.035-7 3-7.036 6.781-.035 3.782 3.055 6.872 6.908 6.907h2.42v-2.566h-2.292c-2.407.028-4.38-1.866-4.408-4.23-.029-2.362 1.901-4.298 4.308-4.326h.1c2.407 0 4.358 1.915 4.365 4.278v6.305c0 2.342-1.944 4.25-4.323 4.279a4.375 4.375 0 01-3.033-1.252l-1.851 1.818A7 7 0 0012.029 22h.092c3.803-.056 6.858-3.083 6.879-6.816v-6.5C18.907 4.963 15.817 2 12.036 2z\"\n />\n);\n\nexport function CerebrasTapButton({ colored, ...props }: AITapButtonProps) {\n const fill = colored ? \"#F15A29\" : \"currentColor\";\n return (\n <Wrap ariaLabel=\"Cerebras\" {...props}>\n <path clipRule=\"evenodd\" fill={fill} fillRule=\"evenodd\" d=\"M14.121 2.701a9.299 9.299 0 000 18.598V22.7c-5.91 0-10.7-4.791-10.7-10.701S8.21 1.299 14.12 1.299V2.7zm4.752 3.677A7.353 7.353 0 109.42 17.643l-.901 1.074a8.754 8.754 0 01-1.08-12.334 8.755 8.755 0 0112.335-1.08l-.901 1.075zm-2.255.844a5.407 5.407 0 00-5.048 9.563l-.656 1.24a6.81 6.81 0 016.358-12.043l-.654 1.24zM14.12 8.539a3.46 3.46 0 100 6.922v1.402a4.863 4.863 0 010-9.726v1.402z\" />\n <path fill={fill} stroke=\"none\" d=\"M15.407 10.836a2.24 2.24 0 00-.51-.409 1.084 1.084 0 00-.544-.152c-.255 0-.483.047-.684.14a1.58 1.58 0 00-.84.912c-.074.203-.11.416-.11.631 0 .218.036.43.11.631a1.594 1.594 0 00.84.913c.2.093.43.14.684.14.216 0 .417-.046.602-.135.188-.09.35-.225.475-.392l.928 1.006c-.14.14-.3.261-.482.363a3.367 3.367 0 01-1.083.38c-.17.026-.317.04-.44.04a3.315 3.315 0 01-1.182-.21 2.825 2.825 0 01-.961-.597 2.816 2.816 0 01-.644-.929 2.987 2.987 0 01-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.278-.261.605-.464.962-.596a3.315 3.315 0 011.182-.21c.355 0 .712.068 1.072.204.361.138.685.36.944.649l-.962.97z\" />\n </Wrap>\n );\n}\n\nexport const MoonshotTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Moonshot AI\"\n brandColor=\"#16191E\"\n d=\"M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z\"\n />\n);\n\nexport const QwenTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Qwen\"\n brandColor=\"#615ced\"\n d=\"M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z\"\n />\n);\n\nexport const IdeogramTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Ideogram\"\n brandColor=\"#000000\"\n d=\"M17.768 1.482a6.4 6.4 0 012.988 3.78c.19.068.377.154.555.257.026.015.05.03.073.047.226.137.436.301.627.49a3.377 3.377 0 01-.105 4.875 3.376 3.376 0 01-.216 5.158l-.037.029.021.032c.39.602.585 1.324.534 2.065l-.009.11a3.377 3.377 0 01-4.658 2.777 3.377 3.377 0 01-5.846.971 4.052 4.052 0 01-1.635.397c-.04.005-.082.008-.125.008h-.897l-.068-.003c-1.116-.067-1.093-1.775.068-1.775h.804l.046-.004.047-.001a2.3 2.3 0 00.079-4.6.735.735 0 01-.08.005H2.808a.889.889 0 010-1.778h7.034l.046-.004.048-.001a2.3 2.3 0 00.509-4.544l-.141-.031a2.188 2.188 0 00-.299-.046.759.759 0 01-.07.003H2.808a.889.889 0 110-1.777h7.035l.046-.004.047-.001a2.3 2.3 0 00.087-4.6.972.972 0 01-.087.004h-.897L8.97 3.32c-1.116-.067-1.093-1.775.068-1.775h.8a.9.9 0 01.097-.005c.402 0 .79.058 1.157.166l.031-.02a6.399 6.399 0 016.645-.203zm-3.737 11.484l-.068.036-.083.051a4.08 4.08 0 01-1.404 2.153 4.07 4.07 0 011.537 3.189 4.06 4.06 0 01-.92 2.579 1.599 1.599 0 002.824-1.322l-.03-.124-.013-.079-.005-.056-.001-.042.001-.058.005-.053.013-.078.018-.072.022-.064.035-.079.005-.01a.869.869 0 01.158-.217l.055-.052.041-.032.05-.035.042-.026.055-.03.073-.03.056-.02.04-.011.078-.016.073-.009.045-.002h.048l.041.002.058.006.056.01.062.015.031.01.049.017.054.023.044.021.053.031.035.023c.06.042.114.09.163.147l.038.046.034.048a1.6 1.6 0 102.4-2.07 3.256 3.256 0 01-.473.007l-.057-.005-.026-.005h-.016a3.376 3.376 0 01-2.985-2.568l-.026-.116a1.6 1.6 0 00-2.285-1.133zm-4.416 4.595a.889.889 0 110 1.777H5.939a.889.889 0 010-1.777h3.676zm9.208-10.503a1.6 1.6 0 00-.797 1.3l-.002.085a.889.889 0 01-.83.887l-.059.002a.889.889 0 01-.887-.83l-.002-.059a1.6 1.6 0 00-2.528-1.301 4.089 4.089 0 01-1.255 1.674 4.083 4.083 0 011.451 2.308 3.374 3.374 0 014.125 2.532l.02.093a1.6 1.6 0 001.395 1.26l.124.01.042.002c.06 0 .12-.003.18-.01l.085-.011.062-.015a1.6 1.6 0 00-.245-3.163l-.079-.002a.887.887 0 01-.683-.32l-.034-.044a.884.884 0 01-.154-.702.889.889 0 01.807-.71l.064-.001a1.6 1.6 0 001.134-2.728 1.6 1.6 0 00-.786-.426l-.102-.019a.856.856 0 01-.076-.016 1.592 1.592 0 00-.97.204zm-9.199 4.08a.889.889 0 010 1.778H.89a.889.889 0 010-1.777h8.735zm-.01-6.432a.889.889 0 110 1.777H5.94a.889.889 0 110-1.777h3.676zm3.297-1.954l-.053.021a4.065 4.065 0 011.126 2.36 3.375 3.375 0 013.151 1.027 3.366 3.366 0 011.695-1 4.621 4.621 0 00-5.919-2.408z\"\n />\n);\n\nexport const RunwayTapButton = (p: AITapButtonProps) => (\n <BrandIcon\n {...p}\n ariaLabel=\"Runway\"\n brandColor=\"#000000\"\n d=\"M17.86 22.992c-2.669.245-4.887-2.876-6.597-4.454C10.398 24.759 1 24.177 1 17.86V6.15c0-.921.244-1.861.733-2.65C2.635 1.977 4.383.98 6.15 1h11.71c6.316 0 6.918 9.398.677 10.243l2.97 2.951c3.252 3.064.808 8.929-3.646 8.797zm-1.428-3.721c1.842 1.898 4.774-1.034 2.876-2.876l-5.132-5.132H11.3v2.876l4.436 4.436.696.696zM4.12 17.842c-.037 2.632 4.117 2.632 4.06 0V6.132c.038-1.316-1.353-2.35-2.612-1.955-.057.019-.113.037-.15.056-.79.301-1.335 1.09-1.317 1.936v11.673h.02zm13.74-9.68c2.632.037 2.632-4.098 0-4.06h-6.973c.526 1.109.395 2.857.413 4.06h6.56z\"\n />\n);\n\nexport function TogetherTapButton({ colored, ...props }: AITapButtonProps) {\n if (!colored) {\n return (\n <Wrap ariaLabel=\"Together\" {...props}>\n <path fill=\"currentColor\" stroke=\"none\" d=\"M23.197 4.503A6 6 0 0015 2.307a5.973 5.973 0 00-2.995 4.933l5.996.008v.515h-5.996c.039.937.298 1.87.8 2.74a6 6 0 1010.39-6z\" />\n <path fill=\"currentColor\" stroke=\"none\" d=\"M.805 4.5A6 6 0 003 12.697a5.972 5.972 0 005.77.127L5.779 7.627l.446-.257 2.997 5.192A6 6 0 10.804 4.5z\" />\n <path fill=\"currentColor\" stroke=\"none\" d=\"M12 23.894a6 6 0 005.999-6c0-2.13-1.1-3.996-2.775-5.06l-3.005 5.189-.444-.258 2.997-5.192A6 6 0 1012 23.894z\" />\n </Wrap>\n );\n }\n return (\n <Wrap ariaLabel=\"Together\" {...props}>\n <path fill=\"#EF2CC1\" stroke=\"none\" d=\"M23.197 4.503A6 6 0 0015 2.307a5.973 5.973 0 00-2.995 4.933l5.996.008v.515h-5.996c.039.937.298 1.87.8 2.74a6 6 0 1010.39-6z\" />\n <path fill=\"#CAAEF5\" stroke=\"none\" d=\"M.805 4.5A6 6 0 003 12.697a5.972 5.972 0 005.77.127L5.779 7.627l.446-.257 2.997 5.192A6 6 0 10.804 4.5z\" />\n <path fill=\"#FC4C02\" stroke=\"none\" d=\"M12 23.894a6 6 0 005.999-6c0-2.13-1.1-3.996-2.775-5.06l-3.005 5.189-.444-.258 2.997-5.192A6 6 0 1012 23.894z\" />\n </Wrap>\n );\n}\n\nexport function MicrosoftTapButton({ colored, ...props }: AITapButtonProps) {\n if (!colored) {\n return (\n <Wrap ariaLabel=\"Microsoft\" {...props}>\n <path fill=\"currentColor\" stroke=\"none\" d=\"M11.49 2H2v9.492h9.492V2h-.002z\" />\n <path fill=\"currentColor\" stroke=\"none\" d=\"M22 2h-9.492v9.492H22V2z\" />\n <path fill=\"currentColor\" stroke=\"none\" d=\"M11.49 12.508H2V22h9.492v-9.492h-.002z\" />\n <path fill=\"currentColor\" stroke=\"none\" d=\"M22 12.508h-9.492V22H22v-9.492z\" />\n </Wrap>\n );\n }\n return (\n <Wrap ariaLabel=\"Microsoft\" {...props}>\n <path fill=\"#F25022\" stroke=\"none\" d=\"M11.49 2H2v9.492h9.492V2h-.002z\" />\n <path fill=\"#7FBA00\" stroke=\"none\" d=\"M22 2h-9.492v9.492H22V2z\" />\n <path fill=\"#00A4EF\" stroke=\"none\" d=\"M11.49 12.508H2V22h9.492v-9.492h-.002z\" />\n <path fill=\"#FFB900\" stroke=\"none\" d=\"M22 12.508h-9.492V22H22v-9.492z\" />\n </Wrap>\n );\n}\n\nexport function LumaTapButton({ colored, ...props }: AITapButtonProps) {\n if (!colored) {\n return (\n <Wrap ariaLabel=\"Luma\" {...props}>\n <path fill=\"currentColor\" fillOpacity={0.66} stroke=\"none\" d=\"M12.393 24L2 17.998l10.393-6 10.392 6-10.393 6z\" />\n <path fill=\"currentColor\" fillOpacity={0.66} stroke=\"none\" d=\"M2 5.999L12.393 0v24L2 18V5.999z\" />\n </Wrap>\n );\n }\n return (\n <Wrap ariaLabel=\"Luma\" {...props}>\n <defs>\n <linearGradient id=\"luma-brand-grad\" x1=\"2\" x2=\"22.785\" y1=\"18\" y2=\"18\" gradientUnits=\"userSpaceOnUse\">\n <stop stopColor=\"#004EFF\" />\n <stop offset=\"1\" stopColor=\"#A78DFF\" />\n </linearGradient>\n </defs>\n <path fill=\"#000\" stroke=\"none\" d=\"M2 5.999L12.393 0v24L2 18V5.999z\" />\n <path fill=\"url(#luma-brand-grad)\" stroke=\"none\" d=\"M12.393 24L2 17.998l10.393-6 10.392 6-10.393 6z\" />\n </Wrap>\n );\n}\n\nexport function ByteDanceTapButton({ colored, ...props }: AITapButtonProps) {\n const fill = colored ? \"#325AB4\" : \"currentColor\";\n return (\n <Wrap ariaLabel=\"ByteDance\" {...props}>\n <path fill={fill} stroke=\"none\" d=\"M14.944 18.587l-1.704-.445V10.01l1.824-.462c1-.254 1.84-.461 1.88-.453.032 0 .056 2.235.056 4.972v4.973l-.176-.008c-.104 0-.952-.207-1.88-.446z\" />\n <path fill={fill} stroke=\"none\" d=\"M7 16.542c0-2.736.024-4.98.064-4.98.032-.008.872.2 1.88.454l1.816.461-.016 4.05-.024 4.049-1.632.422c-.896.23-1.736.445-1.856.469L7 21.523v-4.98z\" />\n <path fill={fill} stroke=\"none\" d=\"M19.24 12.477c0-9.03.008-9.515.144-9.475.072.024.784.207 1.576.406.792.207 1.576.405 1.744.445l.296.08-.016 8.56-.024 8.568-1.624.414c-.888.23-1.728.437-1.856.47l-.24.055v-9.523z\" />\n <path fill={fill} stroke=\"none\" d=\"M1 12.509c0-4.678.024-8.505.064-8.505.032 0 .872.207 1.872.454l1.824.461v7.582c0 4.16-.016 7.574-.032 7.574-.024 0-.872.215-1.88.47L1 21.013v-8.505z\" />\n </Wrap>\n );\n}\n\nexport function KuaishouTapButton({ colored, ...props }: AITapButtonProps) {\n const fill = \"currentColor\";\n return (\n <Wrap ariaLabel=\"Kuaishou\" {...props}>\n <path clipRule=\"evenodd\" fill={fill} fillRule=\"evenodd\" stroke=\"none\" d=\"M5.493 21.234c-1.112-1.451-1.109-4.263-.081-7.459l-4.557-2.63a1.683 1.683 0 01-.85-1.304 1.505 1.505 0 01.08-.622 13.18 13.18 0 011.037-2.255c3.476-6.02 10.916-8.23 16.619-4.938.46.266.82.67 1.081 1.184.785 1.545.685 4.096-.234 6.954l4.557 2.631c.339.196.596.492.736.832a1.53 1.53 0 01.034 1.093 13.146 13.146 0 01-1.037 2.255c-3.476 6.02-10.916 8.23-16.619 4.938a2.6 2.6 0 01-.766-.68zm11.096-6.615c-2.073 3.591-5.808 5.316-8.343 3.852-1.267-.731-1.994-2.122-2.145-3.778-.095-1.035.036-2.173.4-3.32.217-.684.517-1.37.902-2.039l.008-.014c2.073-3.59 5.808-5.315 8.343-3.852.633.366 1.13.895 1.49 1.54.986 1.772.922 4.415-.285 6.914-.111.23-.232.457-.362.683l-.008.014z\" />\n </Wrap>\n );\n}\n\nexport const MiniMaxTapButton = (p: AITapButtonProps) => (\n <BrandIcon {...p} ariaLabel=\"MiniMax\" brandColor=\"#F23F5D\" d=\"M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z\" />\n);\n\nexport function RecraftTapButton({ colored, ...props }: AITapButtonProps) {\n const fill = \"currentColor\";\n return (\n <Wrap ariaLabel=\"Recraft\" {...props}>\n <path fill={fill} stroke=\"none\" d=\"M19.667 8.275c0-4.57-4.15-8.275-9.27-8.275-1.774 0-3.213 3.705-3.213 8.275 0 1.143.09 2.233.253 3.224H4.29L1 23h9.4v-6.447c5.117 0 9.266-3.707 9.266-8.275l.001-.002zm-9.27-6.76c.93 0 1.682 3.028 1.682 6.76 0 3.733-.752 6.76-1.681 6.76-.93 0-1.681-3.027-1.681-6.76 0-3.732.752-6.76 1.68-6.76z\" />\n <path fill={fill} stroke=\"none\" d=\"M19.848 16.552h-9.44L14.028 23h9.438l-3.618-6.448z\" />\n </Wrap>\n );\n}\n\nexport const WanTapButton = (p: AITapButtonProps) => (\n <BrandIcon {...p} ariaLabel=\"WAN\" brandColor=\"#FF6003\" d=\"M24 14.014c-2.8 1.512-5.62 2.896-8.759 3.524-.7.139-1.476.139-2.187.043-.678-.085-1.017-.682-.776-1.31.23-.585.536-1.181.93-1.671.852-1.065 1.814-2.034 2.678-3.088a15.75 15.75 0 001.422-2.054c.306-.511.164-1.129-.372-1.384-.897-.437-1.859-.745-2.81-1.075-.11-.043-.274.074-.492.149.273.244.47.425.743.67-2.821.48-5.49 1.16-8.08 2.098-.012.053-.033.095-.023.117.383.585.208 1.032-.35 1.394a2.365 2.365 0 00-.568.522c1.706.5 3.226.213 4.68-.735-.087-.127-.175-.244-.262-.372.546.096.874.394.918.862.011.107-.054.213-.087.32-.077-.086-.175-.17-.24-.267-.045-.064-.056-.138-.088-.245-1.728 1.15-3.587 1.438-5.632.842 0 .404-.022.745.011 1.075.022.287-.098.415-.36.564-.591.362-1.204.735-1.696 1.214-.59.585-.371 1.299.427 1.597.907.34 1.859.35 2.81.234 1.126-.139 2.23-.32 3.456-.49-1.433.67-2.844 1.14-4.33 1.33-1.04.14-2.078.214-3.106-.084-1.476-.415-2.133-1.501-1.75-2.96.361-1.363 1.236-2.449 2.176-3.45 3.139-3.332 7.108-5.024 11.7-5.365 1.072-.074 2.155.064 3.16.511 1.411.639 2.002 1.99 1.313 3.354-.448.905-1.072 1.735-1.695 2.555-.612.809-1.301 1.554-1.946 2.331-.186.234-.361.48-.503.745-.274.5-.088.83.492.778 1.213-.118 2.45-.213 3.62-.511 1.716-.437 3.389-1.054 5.084-1.597.175-.043.339-.107.492-.17z\" />\n);\n\nexport const ZaiTapButton = (p: AITapButtonProps) => (\n <BrandIcon {...p} ariaLabel=\"Z.ai\" brandColor=\"#000000\" d=\"M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z\" />\n);\n\nexport function CanopyTapButton({ colored, ...props }: AITapButtonProps) {\n const fill = colored ? \"#059669\" : \"currentColor\";\n return (\n <Wrap ariaLabel=\"Canopy Labs\" {...props}>\n <path fill={fill} stroke=\"none\" d=\"M12 4c-4.5 0-7.5 3.6-7.5 7.5S7.5 19 12 19s7.5-3.6 7.5-7.5S16.5 4 12 4z\" />\n <path fill={fill} stroke=\"none\" d=\"M10.5 19h3v4h-3v-4z\" />\n </Wrap>\n );\n}\n\nexport const FastinoTapButton = (p: AITapButtonProps) => (\n <BrandIcon {...p} ariaLabel=\"Fastino\" brandColor=\"#000000\" d=\"M6 4h11v2.5H9v5h6.5V14H9v6H6V4z\" />\n);\n\n// GENERIC AI ACTIONS (Stroke SVGs passing directly through Wrap)\n// ---------------------------------------------------------------------------\n\n// Lightning bolt — primary \"AI generation\" icon\nexport function PowerTapButton(props: AITapButtonProps) {\n return (\n <Wrap ariaLabel=\"AI Generation\" {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z\"\n />\n </Wrap>\n );\n}\n\n// Lightning + text lines — Text Generation\nexport function TextGenerationTapButton(props: AITapButtonProps) {\n return (\n <Wrap ariaLabel=\"Text Generation\" {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M13 2l-2.5 7H14l-3 7\"\n />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M4 17h4\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M4 20h7\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M15 17h5\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M17 20h3\" />\n </Wrap>\n );\n}\n\n// Lightning + image frame — Image Generation\nexport function ImageGenerationTapButton(props: AITapButtonProps) {\n return (\n <Wrap ariaLabel=\"Image Generation\" {...props}>\n <rect\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n width=\"18\"\n height=\"18\"\n x=\"3\"\n y=\"3\"\n rx=\"2\"\n ry=\"2\"\n />\n <circle\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n cx=\"9\"\n cy=\"9\"\n r=\"2\"\n />\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21\"\n />\n </Wrap>\n );\n}\n\nexport function AudioLinesTapButton(props: AITapButtonProps) {\n return (\n <Wrap ariaLabel=\"Audio Generation\" {...props}>\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M2 10v3\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 6v11\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M10 3v18\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M14 8v7\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M18 5v13\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M22 10v3\" />\n </Wrap>\n );\n}\n\nexport function TranscriptionTapButton(props: AITapButtonProps) {\n return (\n <Wrap ariaLabel=\"Transcription\" {...props}>\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M12 19v3\" />\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M19 10v2a7 7 0 0 1-14 0v-2\"\n />\n <rect\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n x=\"9\"\n y=\"2\"\n width=\"6\"\n height=\"13\"\n rx=\"3\"\n />\n </Wrap>\n );\n}\n\nexport function TranslationTapButton(props: AITapButtonProps) {\n return (\n <Wrap ariaLabel=\"Translation\" {...props}>\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"m5 8 6 6\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"m4 14 6-6 2-3\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M2 5h12\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M7 2h1\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"m22 22-5-10-5 10\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M14 18h6\" />\n </Wrap>\n );\n}\n\nexport function VideoGenerationTapButton(props: AITapButtonProps) {\n return (\n <Wrap ariaLabel=\"Video Generation\" {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5\"\n />\n <rect\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n x=\"2\"\n y=\"6\"\n width=\"14\"\n height=\"12\"\n rx=\"2\"\n />\n </Wrap>\n );\n}\n\n// Lightning + code brackets — Code Generation\nexport function CodeGenerationTapButton(props: AITapButtonProps) {\n return (\n <Wrap ariaLabel=\"Code Generation\" {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M13 2l-1.5 4.5L14 9l-3 7\"\n />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"m7 15-4-3 4-3\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"m17 15 4-3-4-3\" />\n </Wrap>\n );\n}\n\nexport function WandSparklesTapButton(props: AITapButtonProps) {\n return (\n <Wrap ariaLabel=\"Magic / Workflow\" {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72\"\n />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"m14 7 3 3\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M5 6v4\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M19 14v4\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M10 2v2\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M7 8H3\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M21 16h-4\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M11 3H9\" />\n </Wrap>\n );\n}\n\nexport function CpuTapButton(props: AITapButtonProps) {\n return (\n <Wrap ariaLabel=\"Processor Unit\" {...props}>\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M12 20v2\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M12 2v2\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M17 20v2\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M17 2v2\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M2 12h2\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M2 17h2\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M2 7h2\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M20 12h2\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M20 17h2\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M20 7h2\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M7 20v2\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M7 2v2\" />\n <rect\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n x=\"4\"\n y=\"4\"\n width=\"16\"\n height=\"16\"\n rx=\"2\"\n />\n <rect\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n x=\"8\"\n y=\"8\"\n width=\"8\"\n height=\"8\"\n rx=\"1\"\n />\n </Wrap>\n );\n}\n\n/**\n * Brand id (the ids @ai-matrx/icons resolves a maker name to) -> provider tap button.\n * Lives here, not in icons: a tap button is design-system UI, and icons sits below it.\n */\ntype MakerTapComponent = ComponentType<AITapButtonProps>;\n\nconst MAKER_BRAND_COMPONENTS: Record<string, MakerTapComponent> = {\n openai: OpenAITapButton,\n anthropic: AnthropicTapButton,\n claude: ClaudeTapButton,\n google: GoogleTapButton,\n gemini: GeminiTapButton,\n meta: MetaTapButton,\n llama: LlamaTapButton,\n xai: XaiTapButton,\n grok: GrokTapButton,\n deepseek: DeepSeekTapButton,\n mistral: MistralTapButton,\n perplexity: PerplexityTapButton,\n elevenlabs: ElevenLabsTapButton,\n flux: FluxTapButton,\n huggingface: HuggingFaceTapButton,\n replicate: ReplicateTapButton,\n nvidia: NvidiaTapButton,\n groq: GroqTapButton,\n together: TogetherTapButton,\n cerebras: CerebrasTapButton,\n microsoft: MicrosoftTapButton,\n moonshot: MoonshotTapButton,\n qwen: QwenTapButton,\n ideogram: IdeogramTapButton,\n runway: RunwayTapButton,\n luma: LumaTapButton,\n bytedance: ByteDanceTapButton,\n kuaishou: KuaishouTapButton,\n minimax: MiniMaxTapButton,\n recraft: RecraftTapButton,\n canopy: CanopyTapButton,\n fastino: FastinoTapButton,\n wan: WanTapButton,\n zai: ZaiTapButton,\n matrx: RobotTapButton as MakerTapComponent,\n cpu: CpuTapButton,\n};\n\nexport function getMakerBrandTapButton(brandId: string): MakerTapComponent {\n return MAKER_BRAND_COMPONENTS[brandId] ?? MAKER_BRAND_COMPONENTS.cpu!;\n}\n","\"use client\";\n\nimport {\n cloneElement,\n forwardRef,\n isValidElement,\n useCallback,\n useRef,\n type ButtonHTMLAttributes,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from \"react\";\n\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"../tooltip\";\nimport { joinClassNames } from \"@ai-matrx/kit/dom\";\nimport { classNameMisuse, useTapGuardRef } from \"./tap-target-guard\";\nimport { useTapSurface } from \"./tap-surface\";\nimport {\n TAP_SOLID_TONE,\n TAP_TONE_CLASS,\n TapBadge,\n TapChevron,\n TapSpinner,\n formatTapShortcut,\n tooltipBody,\n useTapShortcut,\n type TapFeatureProps,\n type TapShortcut,\n type TapSolidTone,\n} from \"./tap-features\";\nimport {\n getTapTargetLinkComponent,\n type TapTargetLinkComponent,\n} from \"./link\";\n\nexport interface TapTargetButtonProps extends TapFeatureProps {\n icon?: React.ReactNode;\n children?: React.ReactNode;\n strokeWidth?: number | undefined;\n onClick?: (() => void) | undefined;\n className?: string | undefined;\n as?: \"button\" | \"label\" | undefined;\n htmlFor?: string | undefined;\n ariaLabel?: string | undefined;\n disabled?: boolean | undefined;\n /**\n * When set, the tap button renders as a link instead of a button.\n * - Internal hrefs (e.g. \"/tasks\") render via the injected link component\n * (`setTapTargetLinkComponent` / the `linkComponent` prop), falling back\n * to a plain `<a>` when none is registered.\n * - External hrefs (http://, https://, mailto:, tel:) render as `<a>`\n * with `target=\"_blank\"` and `rel=\"noopener noreferrer\"` by default.\n * - When combined with `disabled`, the trigger renders as a non-navigable\n * `<span aria-disabled=\"true\">` with the same visual styling.\n */\n href?: string | undefined;\n /** Override target. Works on both internal links and external anchors. */\n target?: \"_blank\" | \"_self\" | \"_parent\" | \"_top\" | undefined;\n /** Override rel. Works on both internal links and external anchors. */\n rel?: string | undefined;\n /** Forwarded to the injected link component. Pass `false` to disable prefetching. */\n prefetch?: boolean | null | undefined;\n /**\n * Per-instance link component for internal hrefs — overrides the\n * module-level `setTapTargetLinkComponent` registration.\n */\n linkComponent?: TapTargetLinkComponent | undefined;\n /**\n * Tooltip text. Defaults to `ariaLabel` when omitted.\n * EVERY tap button shows a tooltip (owner ruling 2026-10-01). `false` no\n * longer hides it: it renders the tooltip through `title` (the provider's\n * title takeover draws the same surface) — for a button nested inside\n * another `asChild` trigger, where the Tooltip wrapper cannot sit.\n */\n tooltip?: string | false | undefined;\n /** Tooltip placement. Defaults to \"top\". */\n tooltipSide?: \"top\" | \"right\" | \"bottom\" | \"left\" | undefined;\n /** Tooltip alignment along its side. Defaults to \"center\". */\n tooltipAlign?: \"start\" | \"center\" | \"end\" | undefined;\n /**\n * Visible caption rendered inline after the icon (`[icon Label]`).\n * Widens the pill automatically. Tooltip defaults to off when set — the\n * label is self-describing. Visible text becomes the accessible name.\n */\n label?: string | undefined;\n /**\n * Collapse an icon + caption pill to its icon-only 44px tap target below\n * the `sm` breakpoint. The caption and inline geometry return at `sm+`;\n * `ariaLabel` (falling back to `label`) remains the accessible name.\n */\n mobileIconOnly?: boolean | undefined;\n}\n\nexport interface TapTargetButtonSolidProps extends Omit<TapTargetButtonProps, \"tone\"> {\n /** The fill, from the system's list. Replaces bgColor / iconColor / hover / active. */\n tone?: TapSolidTone | undefined;\n bgColor?: string | undefined;\n iconColor?: string | undefined;\n hoverBgColor?: string | undefined;\n /**\n * Press-state background. Defaults to `group-active/tap:brightness-90` (the\n * BOX is what is pressed — its touch area included), which works on\n * any color. Override when using a custom `bgColor` that should darken to a\n * specific shade on press (e.g. `group-active/tap:bg-primary/60`).\n */\n activeBgColor?: string | undefined;\n}\n\n/** Native button attributes a tap button accepts — everything except `style`:\n * a tap button's geometry is the system's, never the caller's. */\nexport type TapTargetNativeProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"style\">;\n\nconst EXTERNAL_RE = /^(https?:|mailto:|tel:)/i;\n\n// Geometry + press feedback + tap hygiene are the SINGLE SOURCE OF TRUTH in\n// the shipped stylesheet (the `.matrx-tap-*` family in styles.css — import\n// \"@ai-matrx/tap-target/styles.css\" once at app root). This component only\n// picks the right class and layers each variant's decoration on top.\nconst TAP_OUTER_CLASS = \"matrx-tap-target group group/tap\";\nconst TAP_GROUP_OUTER_CLASS = \"matrx-tap-target matrx-tap-target-sm group group/tap\";\n\nfunction IconContent({\n icon,\n children,\n strokeWidth = 2,\n className,\n}: Pick<\n TapTargetButtonProps,\n \"icon\" | \"children\" | \"strokeWidth\" | \"className\"\n>) {\n if (icon) {\n if (isValidElement<{ className?: string }>(icon)) {\n return cloneElement(icon, {\n className: joinClassNames(className, icon.props.className),\n });\n }\n return <span className={className}>{icon}</span>;\n }\n return (\n <svg\n className={className}\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n {children}\n </svg>\n );\n}\n\ntype TapTargetSize = \"default\" | \"sm\";\n\nfunction resolveTapGeometry(\n label: string | undefined,\n size: TapTargetSize,\n mobileIconOnly: boolean,\n) {\n const inline = Boolean(label);\n if (size === \"sm\") {\n return {\n outerClassName:\n inline && mobileIconOnly\n ? \"matrx-tap-target matrx-tap-target-sm matrx-tap-target-mobile-icon-only-sm group group/tap\"\n : inline\n ? \"matrx-tap-target matrx-tap-target-sm matrx-tap-target-inline-sm group group/tap\"\n : TAP_GROUP_OUTER_CLASS,\n inlineModifier: mobileIconOnly\n ? \"matrx-tap-pill-mobile-icon-only-sm\"\n : \"matrx-tap-pill-inline-sm\",\n };\n }\n return {\n outerClassName:\n inline && mobileIconOnly\n ? `${TAP_OUTER_CLASS} matrx-tap-target-mobile-icon-only`\n : inline\n ? `${TAP_OUTER_CLASS} matrx-tap-target-inline`\n : TAP_OUTER_CLASS,\n inlineModifier: mobileIconOnly\n ? \"matrx-tap-pill-mobile-icon-only\"\n : \"matrx-tap-pill-inline\",\n };\n}\n\nfunction buildTapInner({\n label,\n pillClassName,\n iconClassName,\n labelClassName,\n inlineModifier,\n icon,\n children,\n strokeWidth = 2,\n loading,\n chevron,\n}: {\n label?: string | undefined;\n pillClassName: string;\n iconClassName: string;\n labelClassName?: string | undefined;\n inlineModifier: string;\n icon?: React.ReactNode;\n children?: React.ReactNode;\n strokeWidth?: number | undefined;\n loading?: boolean | undefined;\n chevron?: boolean | undefined;\n}) {\n const iconEl = loading ? (\n <TapSpinner className={iconClassName} />\n ) : (\n <IconContent\n icon={icon}\n strokeWidth={strokeWidth}\n className={iconClassName}\n >\n {children}\n </IconContent>\n );\n const pillClasses = label\n ? `${pillClassName} ${inlineModifier}`.trim()\n : pillClassName;\n\n if (!label) {\n return <div className={pillClasses}>{iconEl}</div>;\n }\n\n return (\n <div className={pillClasses}>\n {iconEl}\n <span className={labelClassName ?? \"matrx-tap-label\"}>{label}</span>\n {chevron ? <TapChevron /> : null}\n </div>\n );\n}\n\ninterface RenderTapTargetArgs extends Pick<\n TapTargetButtonProps,\n | \"icon\"\n | \"children\"\n | \"strokeWidth\"\n | \"label\"\n | \"mobileIconOnly\"\n | \"onClick\"\n | \"as\"\n | \"htmlFor\"\n | \"ariaLabel\"\n | \"disabled\"\n | \"href\"\n | \"target\"\n | \"rel\"\n | \"prefetch\"\n | \"linkComponent\"\n | \"tooltip\"\n | \"tooltipSide\"\n | \"tooltipAlign\"\n> {\n size?: TapTargetSize;\n /** The caller's raw `className` (the glyph color) — checked by the guard. */\n colorClassName?: string | undefined;\n pillClassName: string;\n iconClassName: string;\n labelClassName?: string | undefined;\n rest?: (TapTargetNativeProps & TapFeatureProps) | undefined;\n buttonRef?: Ref<HTMLButtonElement> | undefined;\n}\n\n// A hook (it carries the guard ref); every variant calls it exactly once.\nfunction useTapTarget({\n size = \"default\",\n colorClassName,\n pillClassName,\n iconClassName,\n labelClassName,\n icon,\n children,\n strokeWidth,\n label,\n mobileIconOnly = false,\n onClick,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n rest,\n buttonRef,\n}: RenderTapTargetArgs): ReactElement {\n const {\n tone,\n badge,\n pressed,\n loading,\n disabledReason,\n shortcut,\n chevron,\n ...nativeRest\n } = rest ?? {};\n const isDisabled = Boolean(disabled || disabledReason);\n // FORCED TOOLTIPS: the text is the reason, an explicit tooltip, the\n // accessible name, or the label — and a button with none is a defect.\n const tipText =\n disabledReason || (typeof tooltip === \"string\" && tooltip ? tooltip : undefined) || ariaLabel || label;\n const titleMode = tooltip === false;\n const propViolation =\n (tipText ? null : \"every tap button needs a tooltip — pass ariaLabel\") ??\n classNameMisuse(colorClassName ?? nativeRest.className) ??\n ((nativeRest as { style?: unknown }).style ? \"style is not supported on a tap button\" : null);\n const guardRef = useTapGuardRef<HTMLElement>(\n buttonRef as Ref<HTMLElement> | undefined,\n propViolation,\n );\n const nodeRef = useRef<HTMLElement | null>(null);\n const triggerRef = useCallback(\n (node: HTMLElement | null) => {\n nodeRef.current = node;\n guardRef(node);\n },\n [guardRef],\n );\n const getNode = useCallback(() => nodeRef.current, []);\n useTapShortcut(shortcut, getNode, !isDisabled && !loading);\n\n // Tone (or a pressed toggle) owns the glyph and label color.\n const toneColor = tone ? TAP_TONE_CLASS[tone] : pressed && !colorClassName ? TAP_TONE_CLASS.primary : null;\n if (toneColor) {\n iconClassName = `matrx-tap-icon ${toneColor}`;\n labelClassName = `matrx-tap-label ${toneColor}`;\n }\n if (pressed) pillClassName = `${pillClassName} matrx-tap-pressed`;\n const { outerClassName, inlineModifier } = resolveTapGeometry(\n label,\n size,\n mobileIconOnly,\n );\n const responsiveLabelClassName = mobileIconOnly\n ? `${labelClassName ?? \"matrx-tap-label\"} matrx-tap-label-mobile-icon-only`\n : labelClassName;\n const inner = buildTapInner({\n label,\n pillClassName,\n iconClassName,\n labelClassName: responsiveLabelClassName,\n inlineModifier: label ? inlineModifier : \"\",\n icon,\n children,\n strokeWidth,\n loading,\n chevron,\n });\n const triggerAriaLabel =\n label && !mobileIconOnly ? undefined : (ariaLabel ?? label);\n const trigger = renderTrigger({\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n as,\n htmlFor,\n onClick: loading ? undefined : onClick,\n ariaLabel: triggerAriaLabel,\n disabled: isDisabled,\n outerClassName,\n title: titleMode && tipText ? (shortcut ? `${tipText} (${formatTapShortcut(shortcut)})` : tipText) : undefined,\n children: (\n <>\n {inner}\n {badge !== undefined ? <TapBadge badge={badge} /> : null}\n </>\n ),\n rest: {\n ...nativeRest,\n ...(pressed !== undefined ? { \"aria-pressed\": pressed } : {}),\n ...(loading ? { \"aria-busy\": true } : {}),\n ...(shortcut ? { \"aria-keyshortcuts\": shortcut.replace(/mod/i, \"Meta\") } : {}),\n },\n triggerRef,\n });\n if (titleMode || !tipText) return trigger;\n return withTooltip(trigger, {\n tooltip: tipText,\n ariaLabel: tipText,\n disabled: isDisabled,\n tooltipSide,\n tooltipAlign,\n shortcut,\n });\n}\n\ninterface RenderTriggerArgs {\n href?: string | undefined;\n target?: \"_blank\" | \"_self\" | \"_parent\" | \"_top\" | undefined;\n rel?: string | undefined;\n prefetch?: boolean | null | undefined;\n linkComponent?: TapTargetLinkComponent | undefined;\n as?: \"button\" | \"label\" | undefined;\n htmlFor?: string | undefined;\n onClick?: (() => void) | undefined;\n ariaLabel?: string | undefined;\n disabled?: boolean | undefined;\n outerClassName: string;\n children: ReactNode;\n rest?: ButtonHTMLAttributes<HTMLButtonElement> | undefined;\n triggerRef: Ref<HTMLElement>;\n /** Tooltip text drawn through `title` (tooltip={false}: a nested trigger). */\n title?: string | undefined;\n}\n\n/**\n * Resolves the correct trigger element based on the props passed.\n *\n * - `href` + `disabled` → unclickable `<span aria-disabled>`\n * - `href` matching `http(s):|mailto:|tel:` → `<a target=\"_blank\" rel=\"noopener noreferrer\">`\n * - `href` (internal) → the injected link component (per-instance\n * `linkComponent` prop, else `setTapTargetLinkComponent` registration),\n * falling back to a plain `<a>` when none is registered\n * - `as=\"label\"` → `<label htmlFor=...>`\n * - default → `<button>`\n */\nfunction renderTrigger({\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n as,\n htmlFor,\n onClick,\n ariaLabel,\n disabled,\n outerClassName,\n children,\n rest,\n triggerRef,\n title,\n}: RenderTriggerArgs): ReactElement {\n const { style: _style, ...restWithoutStyle } = rest ?? {};\n if (disabled && href) {\n return (\n <span\n ref={triggerRef}\n aria-disabled=\"true\"\n aria-label={ariaLabel}\n title={title}\n className={`${outerClassName} opacity-40`}\n >\n {children}\n </span>\n );\n }\n if (href) {\n const isExternal = EXTERNAL_RE.test(href);\n if (isExternal) {\n return (\n <a\n ref={triggerRef as Ref<HTMLAnchorElement>}\n href={href}\n target={target ?? \"_blank\"}\n rel={rel ?? \"noopener noreferrer\"}\n aria-label={ariaLabel}\n title={title}\n className={outerClassName}\n >\n {children}\n </a>\n );\n }\n const Link = linkComponent ?? getTapTargetLinkComponent();\n if (Link) {\n return (\n <Link\n ref={triggerRef as Ref<HTMLAnchorElement>}\n href={href}\n target={target}\n rel={rel}\n prefetch={prefetch}\n aria-label={ariaLabel}\n title={title}\n className={outerClassName}\n >\n {children}\n </Link>\n );\n }\n // No link component registered — plain <a>. `prefetch` is a router hint,\n // not a DOM attribute, so it is deliberately dropped here.\n return (\n <a\n ref={triggerRef as Ref<HTMLAnchorElement>}\n href={href}\n target={target}\n rel={rel}\n aria-label={ariaLabel}\n title={title}\n className={outerClassName}\n >\n {children}\n </a>\n );\n }\n if (as === \"label\") {\n return (\n <label\n ref={triggerRef as Ref<HTMLLabelElement>}\n htmlFor={htmlFor}\n aria-label={ariaLabel}\n title={title}\n className={outerClassName}\n >\n {children}\n </label>\n );\n }\n return (\n <button\n ref={triggerRef as Ref<HTMLButtonElement>}\n type=\"button\"\n onClick={onClick}\n aria-label={ariaLabel}\n title={title}\n disabled={disabled}\n {...restWithoutStyle}\n className={outerClassName}\n >\n {children}\n </button>\n );\n}\n\n/**\n * Wraps a trigger element in a Tooltip when a tooltip label is available.\n * Falls back to `ariaLabel` when `tooltip` is not explicitly set. If both\n * are absent (or `tooltip === false`), the trigger is returned unwrapped.\n */\nfunction withTooltip(\n trigger: ReactElement,\n {\n tooltip,\n ariaLabel,\n disabled,\n tooltipSide = \"top\",\n tooltipAlign = \"center\",\n shortcut,\n }: {\n tooltip?: string | false | undefined;\n ariaLabel?: string | undefined;\n disabled?: boolean | undefined;\n tooltipSide?: \"top\" | \"right\" | \"bottom\" | \"left\" | undefined;\n tooltipAlign?: \"start\" | \"center\" | \"end\" | undefined;\n shortcut?: TapShortcut | undefined;\n },\n): ReactElement {\n if (tooltip === false) return trigger;\n const label =\n typeof tooltip === \"string\" && tooltip.length > 0 ? tooltip : ariaLabel;\n if (!label) return trigger;\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n {disabled ? (\n // Radix Tooltip triggers need a hoverable element; a disabled button\n // does not dispatch pointer events, so we wrap in a span for the\n // trigger target while keeping the disabled visual state.\n <span className=\"inline-flex\">{trigger}</span>\n ) : (\n trigger\n )}\n </TooltipTrigger>\n <TooltipContent side={tooltipSide} align={tooltipAlign}>\n {tooltipBody(label, shortcut)}\n </TooltipContent>\n </Tooltip>\n );\n}\n\n// To resize/retune every tap button, edit styles.css — not here.\n\nexport const TapTargetButton = forwardRef<\n HTMLButtonElement,\n TapTargetButtonProps & TapTargetNativeProps\n>(function TapTargetButton(\n {\n icon,\n children,\n strokeWidth = 2,\n onClick,\n className,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n ...rest\n },\n ref,\n) {\n const color = className ?? \"text-foreground\";\n return useTapTarget({\n colorClassName: className,\n icon,\n children,\n strokeWidth,\n onClick,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n pillClassName: \"matrx-tap-pill matrx-glass-thin-border\",\n iconClassName: `matrx-tap-icon ${color}`,\n rest,\n buttonRef: ref,\n });\n});\n\nexport const TapTargetButtonTransparent = forwardRef<\n HTMLButtonElement,\n TapTargetButtonProps & TapTargetNativeProps\n>(function TapTargetButtonTransparent(\n {\n icon,\n children,\n strokeWidth = 2,\n onClick,\n className,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n ...rest\n },\n ref,\n) {\n const color = className ?? \"text-foreground\";\n return useTapTarget({\n colorClassName: className,\n icon,\n children,\n strokeWidth,\n onClick,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n pillClassName:\n \"matrx-tap-pill group-hover/tap:bg-muted group-active/tap:bg-muted-foreground/15\",\n iconClassName: `matrx-tap-icon ${color}`,\n rest,\n buttonRef: ref,\n });\n});\n\n/** Outline pill — a plain 1px border, no fill, no blur, no shadow. Glass only\n * reads as glass over something you can see through; on an opaque card or\n * header use THIS. Same colors as the classic square \"+\": border-border,\n * muted glyph, primary border + foreground glyph on hover. */\nexport const TapTargetButtonOutline = forwardRef<\n HTMLButtonElement,\n TapTargetButtonProps & TapTargetNativeProps\n>(function TapTargetButtonOutline(\n {\n icon,\n children,\n strokeWidth = 2,\n onClick,\n className,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n ...rest\n },\n ref,\n) {\n const color =\n className ?? \"text-muted-foreground group-hover/tap:text-foreground\";\n return useTapTarget({\n colorClassName: className,\n icon,\n children,\n strokeWidth,\n onClick,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n pillClassName:\n \"matrx-tap-pill border border-border bg-transparent transition-colors group-hover/tap:border-primary/60 group-active/tap:bg-muted\",\n iconClassName: `matrx-tap-icon ${color}`,\n labelClassName: `matrx-tap-label ${color}`,\n rest,\n buttonRef: ref,\n });\n});\n\nexport const TapTargetButtonSolid = forwardRef<\n HTMLButtonElement,\n TapTargetButtonSolidProps & TapTargetNativeProps\n>(function TapTargetButtonSolid(\n {\n icon,\n children,\n strokeWidth = 2,\n onClick,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tone,\n bgColor,\n iconColor,\n hoverBgColor,\n activeBgColor,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n ...rest\n },\n ref,\n) {\n return useTapTarget({\n icon,\n children,\n strokeWidth,\n onClick,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n ...solidClasses(tone, bgColor, iconColor, hoverBgColor, activeBgColor),\n rest,\n buttonRef: ref,\n });\n});\n\n// `tone` is the system's fill; the four color strings are the pre-tone API,\n// accepted only until their last callers move to `tone`. `matrx-tap-solid` marks the\n// filled pill so the stylesheet can give a DISABLED solid the system's disabled token\n// (muted fill + --disabled-foreground glyph) instead of a 40%-opacity ghost of its fill.\nfunction solidClasses(\n tone: TapSolidTone | undefined,\n bgColor: string | undefined,\n iconColor: string | undefined,\n hoverBgColor: string | undefined,\n activeBgColor: string | undefined,\n) {\n const legacy = !tone && (bgColor || iconColor || hoverBgColor || activeBgColor);\n if (!legacy) {\n const t = TAP_SOLID_TONE[tone ?? \"primary\"];\n return {\n pillClassName: `matrx-tap-pill matrx-tap-solid ${t.fill} ${t.glyph} group-active/tap:brightness-90`,\n iconClassName: `matrx-tap-icon ${t.glyph}`,\n labelClassName: `matrx-tap-label ${t.glyph}`,\n };\n }\n const glyph = iconColor ?? \"text-primary-foreground\";\n return {\n pillClassName: `matrx-tap-pill matrx-tap-solid ${bgColor ?? \"bg-primary\"} ${glyph} ${hoverBgColor ?? \"group-hover/tap:bg-primary/80\"} ${activeBgColor ?? \"group-active/tap:brightness-90\"}`,\n iconClassName: `matrx-tap-icon ${glyph}`,\n labelClassName: `matrx-tap-label ${glyph}`,\n };\n}\n\n/** Solid destructive pill — delete/remove actions. White-on-red like the\n * primary solid is white-on-blue. Use THIS, never hand-pass bg-destructive\n * with the default (dark) icon color. */\nexport const TapTargetButtonDestructive = forwardRef<\n HTMLButtonElement,\n TapTargetButtonSolidProps & TapTargetNativeProps\n>(function TapTargetButtonDestructive({ tone = \"destructive\", ...rest }, ref) {\n return <TapTargetButtonSolid ref={ref} tone={tone} {...rest} />;\n});\n\nexport const TapTargetButtonForGroup = forwardRef<\n HTMLButtonElement,\n TapTargetButtonProps & TapTargetNativeProps\n>(function TapTargetButtonForGroup(\n {\n icon,\n children,\n strokeWidth = 2,\n onClick,\n className,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n ...rest\n },\n ref,\n) {\n const color = className ?? \"text-foreground\";\n return useTapTarget({\n colorClassName: className,\n size: \"sm\",\n icon,\n children,\n strokeWidth,\n onClick,\n as,\n htmlFor,\n ariaLabel,\n disabled,\n href,\n target,\n rel,\n prefetch,\n linkComponent,\n tooltip,\n tooltipSide,\n tooltipAlign,\n label,\n mobileIconOnly,\n pillClassName: \"matrx-tap-pill matrx-tap-pill-sm matrx-glass-interactive\",\n iconClassName: `matrx-tap-icon ${color}`,\n labelClassName: `matrx-tap-label ${color}`,\n rest,\n buttonRef: ref,\n });\n});\n\nexport function TapTargetButtonGroup({\n children,\n className,\n surface: surfaceProp,\n}: {\n children: React.ReactNode;\n className?: string | undefined;\n /**\n * GLASS ONLY FLOATS (owner rule, 2026-10-02): glass belongs on a bar that\n * floats over scrolling content or a see-through plane. On a solid surface\n * (a page, a card, a toast, a table toolbar) use `\"solid\"`: a muted track,\n * no glass stroke, the same geometry.\n */\n surface?: \"glass\" | \"solid\" | undefined;\n}) {\n // Geometry (height, the half-gap outside the capsule, the capsule itself)\n // is `.matrx-tap-group*` in tap-target.css.\n const surface = useTapSurface(surfaceProp);\n return (\n <div\n className={className ? `matrx-tap-group ${className}` : \"matrx-tap-group\"}\n data-surface={surface}\n >\n <div\n className={\n surface === \"solid\"\n ? \"matrx-tap-group-capsule matrx-tap-group-capsule-solid\"\n : \"matrx-tap-group-capsule matrx-glass-thin-border\"\n }\n />\n <div className=\"matrx-tap-group-row\">{children}</div>\n </div>\n );\n}\n","\"use client\";\n\n/**\n * Tooltip — the ONE tooltip in the fleet.\n *\n * THE COLLAPSE (0.6.0). Two implementations existed: matrx-frontend's\n * `components/ui/tooltip.tsx` (182 import sites) and `@ai-matrx/tap-target`'s\n * `src/tooltip.tsx` — the latter an explicit inlined PORT of the former,\n * carrying a header that said so. tap-target shipped it only because its ~60\n * tap buttons need a tooltip and no shared package owned one; four repos then\n * adopted `TooltipProvider` from tap-target. That made tap-target — a\n * button-geometry package — the accidental owner of a design-system primitive,\n * with a second copy living in the biggest host.\n *\n * A tooltip is a design-system surface, so it lives here. tap-target now takes\n * `@ai-matrx/design-system` as an ordinary sibling dependency and imports this\n * file; its own copy is deleted, and its re-export removed. The DAG already\n * ordered design-system before tap-target, so no cycle is introduced.\n *\n * BEHAVIOR is matrx-frontend's, verbatim, including the ruling both copies\n * carried in prose:\n *\n * 1. THE ROOT RENDERS UNCONDITIONALLY — no hydration mount gate. The gate the\n * host wrapper once carried (\"Radix generates dynamic aria-controls ids that\n * differ between SSR and client\") was false: Radix ids come from React's\n * SSR-stable `useId`. It was actively harmful — a Trigger wraps\n * ALWAYS-VISIBLE content, so `return null` deleted that subtree from SSR and\n * the first client paint.\n *\n * 2. THE SURFACE IS TOKEN-DRIVEN, NOT BRANDED. Popover tokens, not\n * `bg-primary`: rich tooltip content using `text-muted-foreground` was\n * illegible on a brand-colored background in one theme or the other.\n * Since 2026-09-28 the `.matrx-tooltip` class re-scopes those tokens to a dark,\n * high-contrast chip in both themes (styles.css, THE TOOLTIP SURFACE): the\n * neutral white surface it wore before was indistinguishable from the\n * browser's own `title` box.\n *\n * 3. EVERY `title` IS THIS TOOLTIP. The provider installs the title takeover\n * (`title-tooltips.ts`), so a hand-written `title=` anywhere in the\n * document shows this surface, never the browser's.\n *\n * SEAM INVERSION. The host resolved nested portal targets through\n * `useNestedPortalContainer` (an app hook wired to its dialog + window-panel\n * systems); tap-target's port dropped that seam entirely and always portalled\n * to `document.body` — which is why a tooltip inside a popped-out panel landed\n * in the wrong window. Here it is the package's `PortalContainerProvider`\n * seam: an explicit `container` prop wins, then the injected container, then\n * `document.body`. Both prior behaviors are reachable; neither is forked.\n */\n\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport * as React from \"react\";\n\nimport { cn } from \"./cn\";\nimport { MOTION_POPPER } from \"./motion\";\nimport { usePortalContainer } from \"./portal-container\";\nimport { acquireTitleTooltips, clipTooltipText, tooltipSide, TOOLTIP_EDGE_PX, TOOLTIP_LAYER_Z, TOOLTIP_TRIGGER_ATTR, type Side } from \"./title-tooltips\";\n\nexport interface TooltipProviderProps\n extends React.ComponentProps<typeof TooltipPrimitive.Provider> {\n /**\n * THE TITLE TAKEOVER (2026-09-28) — while any provider is mounted, every native\n * `title` attribute in the document shows as this tooltip instead of the\n * browser's (see `title-tooltips.ts`). On by default, because a rule every\n * author must remember is a rule that is broken; pass `false` only for a\n * surface that must keep the browser's own box. One provider opting out does\n * not turn it off while another one is mounted.\n */\n titleTooltips?: boolean;\n}\n\n/**\n * Mount once near the app root. Every tooltip in the tree shares its\n * `delayDuration` / `skipDelayDuration` timing, and the root provider takes\n * over native `title` attributes (see `titleTooltips`). The fleet default keeps\n * tooltip content hoverable and selectable. A native mirrored Desktop shell may\n * explicitly opt in to `disableHoverableContent` so its overlay view yields the\n * pointer back to the host; ordinary application tooltips must leave it unset.\n */\nfunction TooltipProvider({ titleTooltips = true, disableHoverableContent = false, ...props }: TooltipProviderProps) {\n React.useEffect(() => {\n if (!titleTooltips) return;\n return acquireTitleTooltips();\n }, [titleTooltips]);\n return <TooltipPrimitive.Provider {...props} disableHoverableContent={disableHoverableContent} />;\n}\n\n/**\n * The tooltip root inherits its provider's hoverability policy: the ordinary\n * provider defaults to hoverable, selectable content (Arman, 2026-10-14), while\n * a native mirrored Desktop shell may opt in at its provider so the overlay view\n * yields pointer control to its host. An explicit root prop still wins.\n */\n/** The tooltip's trigger and whether it is open, so its content takes THE SMART SIDE\n * (title-tooltips.ts) from where the trigger stands at the moment it opens. */\ninterface TriggerState {\n ref: React.MutableRefObject<HTMLElement | null>;\n open: boolean;\n}\nconst TriggerContext = React.createContext<TriggerState | null>(null);\n\nconst Tooltip = ({ onOpenChange, ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>) => {\n const ref = React.useRef<HTMLElement | null>(null);\n const [open, setOpen] = React.useState(Boolean(props.open ?? props.defaultOpen));\n const shown = props.open ?? open;\n const value = React.useMemo(() => ({ ref, open: shown }), [shown]);\n return (\n <TriggerContext.Provider value={value}>\n <TooltipPrimitive.Root\n {...props}\n onOpenChange={(next) => {\n setOpen(next);\n onOpenChange?.(next);\n }}\n />\n </TriggerContext.Provider>\n );\n};\nTooltip.displayName = \"Tooltip\";\n\n/**\n * Stamps `data-matrx-tooltip-trigger` so the title takeover never draws a\n * second tooltip over a control that already has this one — it still lifts a\n * `title` on the same control, so the browser's box never doubles it either.\n */\nconst TooltipTrigger = React.forwardRef<\n React.ComponentRef<typeof TooltipPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Trigger>\n>((props, ref) => {\n const trigger = React.useContext(TriggerContext);\n const setRef = React.useCallback(\n (node: HTMLButtonElement | null) => {\n if (trigger) trigger.ref.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) ref.current = node;\n },\n [trigger, ref],\n );\n return <TooltipPrimitive.Trigger ref={setRef} {...{ [TOOLTIP_TRIGGER_ATTR]: \"\" }} {...props} />;\n});\nTooltipTrigger.displayName = TooltipPrimitive.Trigger.displayName;\n\nexport interface TooltipContentProps\n extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> {\n /**\n * Explicit portal target; wins over the injected `PortalContainerProvider`\n * value. Pass `null` to force `document.body`.\n */\n container?: HTMLElement | null;\n /**\n * Package-owned open/close motion. Default `true`. Pass `false` for a\n * surface that must appear instantly. It is NOT the reduced-motion switch;\n * `styles.css` already honors `prefers-reduced-motion`.\n */\n animated?: boolean;\n /**\n * The side when the control is not in a vertical stack and no side is given (the host's default:\n * a macOS desktop host says \"bottom\"). Omit for the document's `data-title-side`, else \"top\".\n */\n fallbackSide?: Side;\n}\n\nconst TooltipContent = React.forwardRef<\n React.ComponentRef<typeof TooltipPrimitive.Content>,\n TooltipContentProps\n>(({ className, side, fallbackSide, sideOffset = 4, collisionPadding = TOOLTIP_EDGE_PX, container, animated = true, children, style, ...props }, ref) => {\n const resolved = usePortalContainer(container);\n const trigger = React.useContext(TriggerContext);\n // THE SMART SIDE: an explicit side wins; otherwise where the trigger's neighbours stand decides.\n const placed = side ?? (trigger?.open ? tooltipSide(trigger.ref.current, fallbackSide) : (fallbackSide ?? \"top\"));\n return (\n <TooltipPrimitive.Portal container={resolved ?? null}>\n <TooltipPrimitive.Content\n ref={ref}\n data-slot=\"tooltip-content\"\n side={placed}\n sideOffset={sideOffset}\n // Flip and stay inside the window: Radix flips to the opposite side when the preferred one\n // does not fit, and shifts along the edge; the padding keeps it off the window's border.\n avoidCollisions\n collisionPadding={collisionPadding}\n className={cn(\n \"matrx-tooltip max-w-xs select-text overflow-hidden whitespace-normal break-words rounded-md border border-border bg-popover px-2.5 py-1 text-xs font-medium text-popover-foreground\",\n animated && MOTION_POPPER,\n className,\n )}\n // THE tooltip layer: above every menu, popover and modal (Radix copies it onto its wrapper).\n style={{ zIndex: TOOLTIP_LAYER_Z, ...style }}\n {...props}\n >\n {typeof children === \"string\" ? clipTooltipText(children) : children}\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n});\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\n\nexport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };\nexport { acquireTitleTooltips, clipTooltipText, NATIVE_TITLE_OPT_OUT_ATTR, TOOLTIP_TEXT_BUDGET } from \"./title-tooltips\";\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","/**\n * THE MOTION CONTRACT (0.10.0) — the class names every animated surface in\n * this package puts on the DOM, in ONE place.\n *\n * Why a module and not ten inline strings: the sweep that produced this file\n * found the same defect ten times over, and it was invisible each time\n * because each primitive spelled its animation out by hand. Ten hand-written\n * copies of `data-[state=open]:animate-in data-[state=closed]:animate-out\n * data-[state=closed]:fade-out-0 …` meant ten chances to reach for a utility\n * nothing in the package defines — which is exactly what happened. A single\n * exported constant per motion SHAPE means the next primitive cannot invent\n * an eleventh spelling, and `styles.test.ts` can prove every one of them\n * resolves to a rule in the shipped stylesheet.\n *\n * Every rule these name lives in `styles.css` under the package's own\n * keyframes. NONE of them is a Tailwind utility, and none requires a host\n * plugin — see that file's header for the measurement that made this\n * necessary.\n */\n\n/** Modal scrims: Dialog, AlertDialog, Sheet, CommandDialog. Fade only. */\nexport const MOTION_OVERLAY = \"matrx-motion-overlay\";\n\n/** The centered dialog card. Fades and scales; centering is not its business. */\nexport const MOTION_DIALOG = \"matrx-motion-dialog\";\n\n/**\n * THE CENTERING OF A CENTERED DIALOG CARD — package-owned, in the `translate`\n * property, and NEVER a Tailwind `translate-x-[-50%] translate-y-[-50%]` pair.\n *\n * Those utilities do not compile to the same thing in every host: Tailwind v3\n * writes them into `transform`, Tailwind v4 writes them into the independent\n * `translate` property, which COMPOSES with `transform` instead of being\n * replaced by it. 0.10.0's keyframes restated the centering inside `transform`,\n * which was harmless on v3 and doubled the centering on v4 — the card flew in\n * from off the top-left of the viewport for the animation's whole duration and\n * snapped into place at the end (fixed in 0.10.1).\n *\n * Owning it here means one spelling that reads the same on both, and it frees\n * `transform` so the keyframes carry ONLY the delta. Put this on every centered\n * surface UNCONDITIONALLY — it is geometry, so unlike {@link MOTION_DIALOG} it\n * must survive `animated={false}`. Its rule ships in `styles.css`.\n */\nexport const CENTERED_DIALOG = \"matrx-dialog-centered\";\n\n/**\n * The resting gap between a `popper`-positioned surface and its trigger, for\n * the primitives that want one (today: `Select`). Same law and same reason as\n * {@link CENTERED_DIALOG} — a position an animated surface holds AT REST is\n * the `translate` property's job, never a Tailwind translate utility, because\n * those land in `transform` on a v3 host and in `translate` on a v4 one while\n * the keyframes animate `transform` either way. Sizes from\n * `--matrx-popper-offset`; keys off Radix's `data-side`.\n */\nexport const POPPER_OFFSET = \"matrx-popper-offset\";\n\n/** The mobile Dialog / CommandDialog bottom sheet. Slides up and fades. */\nexport const MOTION_BOTTOM_SHEET = \"matrx-motion-bottom-sheet\";\n\n/**\n * Radix-popper surfaces: Popover, DropdownMenu, ContextMenu, HoverCard,\n * Select, Tooltip. Reads `--radix-popper-transform-origin` so the surface\n * grows out of its trigger, and `data-side` so it travels from it.\n */\nexport const MOTION_POPPER = \"matrx-motion-popper\";\n\n/** Edge sheets, one class per `sheetVariants` side. */\nexport const MOTION_SHEET = {\n top: \"matrx-motion-sheet-top\",\n bottom: \"matrx-motion-sheet-bottom\",\n left: \"matrx-motion-sheet-left\",\n right: \"matrx-motion-sheet-right\",\n center: \"matrx-motion-sheet-center\",\n} as const;\n\n/** Skeleton's breathing loop. */\nexport const MOTION_PULSE = \"matrx-pulse\";\n/** A waiting box's crossing band of light (Skeleton `motion=\"shimmer\"`). Reduced motion: a slow breathe, no travel. */\nexport const MOTION_SHIMMER = \"matrx-shimmer\";\n\n/** The spinner loop, for every inline busy indicator in the package. */\nexport const MOTION_SPIN = \"matrx-spin\";\n\n/**\n * FirstUseHint's beacon: a soft ring that pulses three times around the anchor, on\n * `box-shadow` only, so nothing moves. A still ring under reduced motion.\n */\nexport const MOTION_HINT_BEACON = \"matrx-motion-hint-beacon\";\n\n/**\n * Every motion class the package ships, for the guards. If a rule for one of\n * these is missing from `styles.css`, a component animates in no consumer and\n * says nothing about it — the C26 failure this list exists to make loud.\n */\nexport const ALL_MOTION_CLASSES = [\n MOTION_OVERLAY,\n MOTION_DIALOG,\n MOTION_BOTTOM_SHEET,\n MOTION_POPPER,\n ...Object.values(MOTION_SHEET),\n MOTION_PULSE,\n MOTION_SHIMMER,\n MOTION_SPIN,\n MOTION_HINT_BEACON,\n] as const;\n\n/**\n * The host-plugin utilities this package is forbidden to emit. They are\n * supplied by `tailwindcss-animate` / `tw-animate-css`, which is a HOST CSS\n * entry concern a package cannot declare a dependency on: three of the four\n * AI Matrx consumers never loaded it, so every surface wearing these appeared\n * with no animation and no error. `styles.test.ts` fails the build if one\n * comes back.\n */\nexport const FORBIDDEN_HOST_MOTION_UTILITIES = [\n \"animate-in\",\n \"animate-out\",\n \"fade-in\",\n \"fade-out\",\n \"zoom-in\",\n \"zoom-out\",\n \"slide-in-from\",\n \"slide-out-to\",\n \"animate-accordion\",\n \"animate-slide-down\",\n \"animate-slide-up\",\n \"animate-pulse\",\n \"animate-spin\",\n] as const;\n\n/**\n * THE PANEL MOTION as a Tailwind class string (moved from matrx-frontend\n * `lib/motion/panel-motion.ts`): every panel, sidebar, dock, drawer and sheet\n * slides its size/position on the host's `--matrx-motion-duration-panel` /\n * `--matrx-motion-ease-panel` (tokens.css ships the standard). Pair it with the\n * transition property you animate (`transition-transform`, …).\n */\nexport const PANEL_MOTION_CLASS =\n \"duration-(--matrx-motion-duration-panel) ease-(--matrx-motion-ease-panel) motion-reduce:transition-none\";\nexport const PANEL_MOTION_DURATION_VAR = \"var(--matrx-motion-duration-panel)\";\nexport const PANEL_MOTION_EASE_VAR = \"var(--matrx-motion-ease-panel)\";\n","\"use client\";\n\n/**\n * Injected portal-container seam.\n *\n * The matrx-frontend original resolved nested portal targets through\n * `useNestedPortalContainer` (explicit prop > dialog content > popout body >\n * document.body) — a host-shaped hook wired to that app's dialog and\n * window-panel systems. The package inverts the seam: hosts provide the\n * resolved container through `PortalContainerProvider`; an explicit\n * `container` prop on a component still wins, and with neither the portal\n * falls through to `document.body` (Radix default). Priority semantics are\n * unchanged from the original.\n */\n\nimport * as React from \"react\";\n\n// Shared identity across independently bundled public entrypoints/loaders.\nconst CONTEXT_SLOT = Symbol.for(\"ai-matrx.design-system.portal-container-context\");\nconst contextRegistry = globalThis as typeof globalThis & { [CONTEXT_SLOT]?: React.Context<HTMLElement | null | undefined> };\nconst PortalContainerContext = contextRegistry[CONTEXT_SLOT] ??= React.createContext<HTMLElement | null | undefined>(undefined);\n\nexport interface PortalContainerProviderProps {\n /** Where nested Radix portals (Popover, etc.) should mount. `null`/`undefined` → document.body. */\n container: HTMLElement | null | undefined;\n children: React.ReactNode;\n}\n\nexport function PortalContainerProvider({\n container,\n children,\n}: PortalContainerProviderProps) {\n return (\n <PortalContainerContext.Provider value={container ?? undefined}>\n {children}\n </PortalContainerContext.Provider>\n );\n}\n\n/**\n * Resolve a portal target: explicit prop (including an explicit `null`,\n * meaning \"the default body\") beats the injected container.\n */\nexport function usePortalContainer(\n explicit?: HTMLElement | null,\n): HTMLElement | undefined {\n const injected = React.useContext(PortalContainerContext);\n\n if (explicit !== undefined) {\n return explicit ?? undefined;\n }\n\n return injected ?? undefined;\n}\n","/**\n * THE TITLE TAKEOVER — every native `title` attribute in the document shows\n * as THE fleet tooltip instead of the browser's.\n *\n * Why this exists. A `title=` is the one tooltip nobody has to import, so it\n * is what every hand-written control reaches for: ~50 of them on an ordinary\n * matrx-frontend page (2026-09-28), next to the Radix tooltips on the tap\n * buttons. The browser draws those as a slow, unstyled system box, and a page\n * that mixes the two reads as having \"lost all of its tooltips\" (Arman,\n * 2026-09-28). Asking every author — human or agent — to wrap every control in\n * `<Tooltip>` is a rule that is broken the day it is written. So the\n * `TooltipProvider` every host already mounts at its root installs this layer,\n * and a `title` is simply a tooltip from then on. Nothing to remember.\n *\n * How it works. On hover (mouse or pen) or keyboard focus (`:focus-visible`)\n * of an element that carries a `title`, the attribute is lifted onto\n * `data-matrx-title` for exactly as long as the pointer or focus stays — so\n * the browser has nothing to show — and one shared, script-placed element\n * wearing `.matrx-tooltip` shows the text instead. When the pointer or focus\n * leaves, the `title` is put back, so assistive technology and every\n * `[title]` selector read the element exactly as authored the rest of the\n * time. Touch never shows it (a `title` has no touch affordance either).\n *\n * What it does not draw: a tooltip that only repeats text already readable in\n * full inside the element (it still draws when that text is hidden or\n * truncated).\n *\n * What it leaves alone:\n * - an element that is already a Radix tooltip trigger\n * (`[data-matrx-tooltip-trigger]`, stamped by `TooltipTrigger`): its\n * `title` is still lifted — two tooltips on one control was the other\n * half of the mess — but only the Radix one shows;\n * - anything inside `[data-native-title]` (the explicit opt-out);\n * - SVG `<title>` children, which are elements, not attributes.\n *\n * Placement. `tooltipSide` (THE SMART SIDE, below): beside a control in a\n * vertical stack, else the host's side; flipped when there is no room,\n * clamped into the viewport. `data-title-side=\"right\" | \"left\" | \"bottom\" |\n * \"top\"` on the element or any ancestor states a preferred side — a vertical\n * rail sets `right` once on its container.\n *\n * Installed at most once per document, reference-counted across every\n * mounted provider, and removed when the last one unmounts.\n */\n\n/**\n * THE SMART SIDE (Arman, 2026-10-15: tooltips \"don't show up intelligently\"). A tooltip never\n * covers the control next to its own. Where the control's neighbours stand decides the side:\n * - an explicit side (a prop, or `data-title-side` on the control or an ancestor below <html>) wins;\n * - an icon-sized control in a vertical stack (an icon column, a tool palette) has its neighbours\n * above and below, so it opens beside the control: right, or left when the control is in the\n * window's right half (an inspector column). A wide row in a list keeps the host's side: its\n * tooltip is the row's own text in full, and beside it would sit over the page next to the list;\n * - anywhere else (a toolbar, a row of buttons, a lone control) it opens on the host's default\n * side (`data-title-side` on <html>: macOS desktop hosts say \"bottom\"; the web's is \"top\").\n * Either way it flips to the other side when there is no room, and stays inside the window.\n */\nexport function tooltipSide(el: Element | null, fallback?: Side): Side {\n if (!el) return fallback ?? \"top\";\n const doc = el.ownerDocument;\n const hinted = el.closest(\"[data-title-side]\");\n const hint = hinted?.getAttribute(\"data-title-side\");\n const isSide = (v: string | null | undefined): v is Side => v === \"top\" || v === \"bottom\" || v === \"left\" || v === \"right\";\n if (hinted && hinted !== doc.documentElement && isSide(hint)) return hint;\n const base: Side = fallback ?? (isSide(hint) ? hint : \"top\");\n const box = el.getBoundingClientRect();\n if (box.width <= ICON_CONTROL_MAX_PX && stackDirection(el) === \"vertical\") {\n const vw = doc.defaultView?.innerWidth ?? 0;\n return vw > 0 && box.left + box.width / 2 > vw / 2 ? \"left\" : \"right\";\n }\n return base;\n}\n\n/** The widest control that counts as an icon (a navigator item, a palette tool). */\nconst ICON_CONTROL_MAX_PX = 64;\n\n/** How the control's nearest group of siblings is laid out, from where they actually are on screen. */\nfunction stackDirection(el: Element): \"vertical\" | \"horizontal\" | null {\n let node: Element | null = el;\n for (let depth = 0; node && depth < 4; depth++, node = node.parentElement) {\n const parent: Element | null = node.parentElement;\n if (!parent) return null;\n const me = node.getBoundingClientRect();\n if (me.width === 0 && me.height === 0) return null;\n let vertical = 0;\n let horizontal = 0;\n for (const sib of Array.from(parent.children)) {\n if (sib === node) continue;\n const r = sib.getBoundingClientRect();\n if (r.width === 0 || r.height === 0) continue;\n const overlapX = Math.min(me.right, r.right) - Math.max(me.left, r.left);\n const overlapY = Math.min(me.bottom, r.bottom) - Math.max(me.top, r.top);\n if (overlapX > 0.5 * Math.min(me.width, r.width) && overlapY <= 0) vertical++;\n else if (overlapY > 0.5 * Math.min(me.height, r.height) && overlapX <= 0) horizontal++;\n }\n if (vertical > 0 && horizontal === 0) return \"vertical\";\n if (horizontal > 0) return \"horizontal\";\n }\n return null;\n}\n\nexport const TITLE_TOOLTIP_ATTR = \"data-matrx-title\";\nexport const TOOLTIP_TRIGGER_ATTR = \"data-matrx-tooltip-trigger\";\nexport const NATIVE_TITLE_OPT_OUT_ATTR = \"data-native-title\";\n\nexport type Side = \"top\" | \"bottom\" | \"left\" | \"right\";\n\nconst OPEN_DELAY_MS = 350;\n/** Moving from one titled control to the next inside this window is instant. */\nconst SKIP_DELAY_MS = 500;\n/**\n * THE HOVER BRIDGE. Leaving the control does not close the tooltip at once: the pointer has this\n * long to reach the tooltip itself (Arman, 2026-10-14: a tooltip must stay long enough to put the\n * mouse on it and copy its text). Entering the tooltip holds it open.\n */\n/**\n * THE TOOLTIP LAYER — above every other layer, always (Arman, 2026-10-14: a tooltip \"coming up\n * behind the content\"). Menus and popovers share the modal tier (equal z, DOM order decides), so a\n * tooltip on that tier lost to any menu opened after it. A tooltip is transient and never takes a\n * press, so nothing ever needs to sit above it.\n */\nexport const TOOLTIP_LAYER_Z = 2_147_483_000;\n\nexport const TOOLTIP_CLOSE_DELAY_MS = 300;\nconst GAP_PX = 6;\nconst EDGE_PX = 8;\n/** How far every tooltip stays from the window's edge (both implementations). */\nexport const TOOLTIP_EDGE_PX = EDGE_PX;\n/**\n * A tooltip is a short hint, never a paragraph (Apple HIG: a tooltip is a few words): text past\n * this budget is cut at a word boundary with an ellipsis. Long detail belongs in a sheet or a\n * Copy details action, not on hover.\n */\nexport const TOOLTIP_TEXT_BUDGET = 140;\n\nexport function clipTooltipText(text: string, budget: number = TOOLTIP_TEXT_BUDGET): string {\n const flat = text.replace(/\\s+/g, \" \").trim();\n if (flat.length <= budget) return flat;\n const cut = flat.slice(0, budget - 1);\n const space = cut.lastIndexOf(\" \");\n return `${(space > budget * 0.6 ? cut.slice(0, space) : cut).replace(/[\\s,.;:–—-]+$/, \"\")}…`;\n}\n\nconst SURFACE_CLASS =\n \"matrx-tooltip matrx-title-tooltip matrx-motion-popper max-w-xs select-text rounded-md border border-border bg-popover px-2.5 py-1 text-xs font-medium text-popover-foreground\";\n\ninterface Installation {\n count: number;\n uninstall: () => void;\n}\n\n/**\n * Keyed on the document itself through a registered symbol, never a module\n * WeakMap: tsup bundles this module into more than one entry (`index`,\n * `tap-target`), and two module copies each holding their own map would\n * install twice — two listeners, two surfaces.\n */\nconst INSTALLATION_KEY = Symbol.for(\"@ai-matrx/design-system/title-tooltips\");\ntype DocumentWithInstallation = Document & { [INSTALLATION_KEY]?: Installation };\nconst installations = {\n get: (doc: Document) => (doc as DocumentWithInstallation)[INSTALLATION_KEY],\n set: (doc: Document, value: Installation) => {\n (doc as DocumentWithInstallation)[INSTALLATION_KEY] = value;\n },\n delete: (doc: Document) => {\n delete (doc as DocumentWithInstallation)[INSTALLATION_KEY];\n },\n};\n\n/** Install the takeover on `doc`. Returns the release function. */\nexport function acquireTitleTooltips(doc: Document | undefined = typeof document === \"undefined\" ? undefined : document): () => void {\n if (!doc) return () => {};\n const existing = installations.get(doc);\n if (existing) {\n existing.count += 1;\n } else {\n installations.set(doc, { count: 1, uninstall: install(doc) });\n }\n let released = false;\n return () => {\n if (released) return;\n released = true;\n const current = installations.get(doc);\n if (!current) return;\n current.count -= 1;\n if (current.count <= 0) {\n current.uninstall();\n installations.delete(doc);\n }\n };\n}\n\nfunction install(doc: Document): () => void {\n const win = doc.defaultView;\n let active: HTMLElement | null = null;\n let surface: HTMLDivElement | null = null;\n let openTimer: ReturnType<typeof setTimeout> | undefined;\n let closeTimer: ReturnType<typeof setTimeout> | undefined;\n let lastClosedAt = 0;\n /** A press began on the tooltip (selecting its text): it must not close until release. */\n let holding = false;\n\n const HTMLElementCtor = win?.HTMLElement;\n\n const titledAncestor = (node: EventTarget | null): HTMLElement | null => {\n if (!HTMLElementCtor || !(node instanceof win!.Node)) return null;\n const start = node instanceof HTMLElementCtor ? node : (node as Node).parentElement;\n if (!start) return null;\n const el = start.closest<HTMLElement>(`[title], [${TITLE_TOOLTIP_ATTR}]`);\n if (!el || !(el instanceof HTMLElementCtor)) return null;\n if (el.closest(`[${NATIVE_TITLE_OPT_OUT_ATTR}]`)) return null;\n return el;\n };\n\n const textOf = (el: HTMLElement) => clipTooltipText(el.getAttribute(TITLE_TOOLTIP_ATTR) ?? el.getAttribute(\"title\") ?? \"\");\n\n const lift = (el: HTMLElement) => {\n const title = el.getAttribute(\"title\");\n if (title === null) return;\n el.setAttribute(TITLE_TOOLTIP_ATTR, title);\n el.removeAttribute(\"title\");\n };\n\n const restore = (el: HTMLElement) => {\n const held = el.getAttribute(TITLE_TOOLTIP_ATTR);\n if (held === null) return;\n // An author who changed or removed the title while it was lifted wins:\n // only put ours back when nothing re-set it in the meantime.\n if (!el.hasAttribute(\"title\")) el.setAttribute(\"title\", held);\n el.removeAttribute(TITLE_TOOLTIP_ATTR);\n };\n\n const ensureSurface = () => {\n if (surface && surface.isConnected) return surface;\n surface = doc.createElement(\"div\");\n surface.setAttribute(\"role\", \"tooltip\");\n surface.setAttribute(\"data-slot\", \"title-tooltip\");\n surface.className = SURFACE_CLASS;\n surface.style.position = \"fixed\";\n surface.style.zIndex = String(TOOLTIP_LAYER_Z);\n surface.style.visibility = \"hidden\";\n doc.body.appendChild(surface);\n return surface;\n };\n\n /**\n * THE PART OF `el` A PERSON CAN SEE: its box clipped by every ancestor that clips (scrolls or hides\n * overflow) and by the window. A truncated cell in a sideways-scrolling table is far wider than its\n * visible part; anchored to the whole box the tooltip landed at the window's edge (2026-10-14).\n */\n const visibleRect = (el: HTMLElement, vw: number, vh: number) => {\n const box = el.getBoundingClientRect();\n let left = box.left;\n let top = box.top;\n let right = box.right;\n let bottom = box.bottom;\n for (let node = el.parentElement; node && node !== doc.body && node !== doc.documentElement; node = node.parentElement) {\n const cs = win?.getComputedStyle(node);\n if (!cs) break;\n const clipsX = cs.overflowX !== \"visible\" || cs.overflow === \"hidden\";\n const clipsY = cs.overflowY !== \"visible\" || cs.overflow === \"hidden\";\n if (!clipsX && !clipsY) continue;\n const clip = node.getBoundingClientRect();\n if (clipsX) { left = Math.max(left, clip.left); right = Math.min(right, clip.right); }\n if (clipsY) { top = Math.max(top, clip.top); bottom = Math.min(bottom, clip.bottom); }\n }\n left = Math.max(left, 0);\n top = Math.max(top, 0);\n right = Math.min(right, vw || right);\n bottom = Math.min(bottom, vh || bottom);\n // Nothing of it is visible (scrolled away under the pointer is impossible, but a test DOM can say so): the box itself.\n if (right <= left || bottom <= top) return box;\n return { left, top, right, bottom, width: right - left, height: bottom - top };\n };\n\n const preferredSide = (el: HTMLElement): Side => tooltipSide(el);\n\n const place = (el: HTMLElement, node: HTMLDivElement) => {\n // The VISIBLE viewport, not the window: inside a clipped host (the kind\n // sandbox frame is window-wide but shown only at its column) the visual\n // viewport is what the reader sees, so a tooltip never lands past it.\n const vw = win?.visualViewport?.width ?? win?.innerWidth ?? 0;\n const vh = win?.visualViewport?.height ?? win?.innerHeight ?? 0;\n const anchor = visibleRect(el, vw, vh);\n const box = node.getBoundingClientRect();\n const fits: Record<Side, boolean> = {\n top: anchor.top - GAP_PX - box.height >= EDGE_PX,\n bottom: anchor.bottom + GAP_PX + box.height <= vh - EDGE_PX,\n left: anchor.left - GAP_PX - box.width >= EDGE_PX,\n right: anchor.right + GAP_PX + box.width <= vw - EDGE_PX,\n };\n const opposite: Record<Side, Side> = { top: \"bottom\", bottom: \"top\", left: \"right\", right: \"left\" };\n const wanted = preferredSide(el);\n const side: Side = fits[wanted] ? wanted : fits[opposite[wanted]] ? opposite[wanted] : wanted;\n\n let x: number;\n let y: number;\n if (side === \"top\" || side === \"bottom\") {\n x = anchor.left + anchor.width / 2 - box.width / 2;\n y = side === \"top\" ? anchor.top - GAP_PX - box.height : anchor.bottom + GAP_PX;\n } else {\n y = anchor.top + anchor.height / 2 - box.height / 2;\n x = side === \"left\" ? anchor.left - GAP_PX - box.width : anchor.right + GAP_PX;\n }\n x = Math.min(Math.max(x, EDGE_PX), Math.max(EDGE_PX, vw - EDGE_PX - box.width));\n y = Math.min(Math.max(y, EDGE_PX), Math.max(EDGE_PX, vh - EDGE_PX - box.height));\n // Placed with `left`/`top`, NEVER `transform`: the open animation\n // (`.matrx-motion-popper`) animates `transform`, and a running animation\n // overrides an inline transform — the chip sat at the page's top-left\n // corner for the whole animation, then jumped to its control (2026-10-08).\n node.style.left = `${Math.round(x)}px`;\n node.style.top = `${Math.round(y)}px`;\n node.setAttribute(\"data-side\", side);\n };\n\n const isShown = (node: HTMLElement, root: HTMLElement) => {\n const rect = node.getBoundingClientRect();\n if (rect.width <= 0 || rect.height <= 0) return false;\n for (let cur: HTMLElement | null = node; cur; cur = cur === root ? null : cur.parentElement) {\n const cs = win?.getComputedStyle(cur);\n if (!cs) return false;\n if (cs.display === \"none\" || cs.visibility === \"hidden\" || Number(cs.opacity) === 0) return false;\n }\n return true;\n };\n\n /**\n * A tooltip that repeats text the person can already read in full is noise\n * (an expanded sidebar row, a \"Save\" button titled \"Save\"). It still shows\n * when that text is hidden (a collapsed rail's label) or cut off\n * (truncated) — the two cases a title exists for.\n */\n const isClipped = (host: HTMLElement, root: HTMLElement) => {\n for (let node: HTMLElement | null = host; node; node = node.parentElement) {\n if (node.scrollWidth > node.clientWidth + 1 && node.clientWidth > 0) return true;\n if (node.scrollHeight > node.clientHeight + 1 && node.clientHeight > 0) return true;\n if (node === root) break;\n }\n return false;\n };\n\n const repeatsVisibleText = (el: HTMLElement, text: string) => {\n const norm = (t: string) => t.replace(/\\s+/g, \" \").trim().toLowerCase();\n const want = norm(text);\n if (!want || !win) return false;\n const walker = doc.createTreeWalker(el, win.NodeFilter.SHOW_TEXT);\n for (let node = walker.nextNode(); node; node = walker.nextNode()) {\n if (norm(node.textContent ?? \"\") !== want) continue;\n const host = node.parentElement;\n if (!host || !isShown(host, el)) continue;\n // Cut off is measured on the BOX that clips: an inline host (a span inside a truncating\n // cell) has no box width of its own, so every ancestor up to the titled element is asked.\n if (isClipped(host, el)) continue;\n return true;\n }\n return false;\n };\n\n const show = (el: HTMLElement, instant: boolean) => {\n if (active !== el) return;\n // A Radix tooltip trigger shows its own tooltip — never a second one.\n if (el.closest(`[${TOOLTIP_TRIGGER_ATTR}]`)) return;\n const text = textOf(el);\n if (!text || !el.isConnected) return;\n if (repeatsVisibleText(el, text)) return;\n const node = ensureSurface();\n node.textContent = text;\n node.style.visibility = \"hidden\";\n // Measure and place BEFORE the open state starts the animation: measured\n // mid-animation the box reads at its 0.95 entry scale and lands off-centre.\n node.removeAttribute(\"data-state\");\n // The surface is ONE shared fixed element that keeps the `left` of its last\n // placement. Measured there, a longer text wraps against the room that is\n // left of the OLD spot, reads one line too tall, and lands a line too high\n // once it moves (the sandbox tooltip spec caught a 16px extra gap). Rewind\n // to the origin so the box is measured at its natural, unwrapped size.\n node.style.left = \"0px\";\n node.style.top = \"0px\";\n place(el, node);\n node.setAttribute(\"data-state\", instant ? \"instant-open\" : \"delayed-open\");\n node.style.visibility = \"visible\";\n if (el.id) node.id = `${el.id}-title-tooltip`;\n };\n\n const hide = () => {\n if (openTimer !== undefined) clearTimeout(openTimer);\n openTimer = undefined;\n cancelClose();\n holding = false;\n if (surface && surface.style.visibility === \"visible\") lastClosedAt = Date.now();\n if (surface) {\n surface.style.visibility = \"hidden\";\n surface.removeAttribute(\"data-state\");\n }\n };\n\n const cancelClose = () => {\n if (closeTimer !== undefined) clearTimeout(closeTimer);\n closeTimer = undefined;\n };\n\n const inSurface = (node: EventTarget | null) =>\n !!surface && !!win && node instanceof win.Node && surface.contains(node);\n\n const hasSelectionInSurface = () => {\n const sel = win?.getSelection();\n return !!sel && !sel.isCollapsed && !!surface && !!sel.anchorNode && surface.contains(sel.anchorNode);\n };\n\n /** Close after the bridge delay unless the pointer reached the tooltip or text in it is selected. */\n const scheduleClose = () => {\n cancelClose();\n // Nothing is showing yet (the open delay has not run, or the text was not worth drawing): there is\n // nothing to bridge to, so leaving simply cancels.\n if (!surface || surface.style.visibility !== \"visible\") {\n deactivate();\n return;\n }\n closeTimer = setTimeout(() => {\n closeTimer = undefined;\n if (holding || hasSelectionInSurface()) return;\n deactivate();\n }, TOOLTIP_CLOSE_DELAY_MS);\n };\n\n const activate = (el: HTMLElement) => {\n cancelClose();\n if (active === el) return;\n deactivate();\n active = el;\n lift(el);\n const instant = Date.now() - lastClosedAt < SKIP_DELAY_MS;\n if (instant) show(el, true);\n else openTimer = setTimeout(() => show(el, false), OPEN_DELAY_MS);\n };\n\n const deactivate = () => {\n hide();\n if (active) restore(active);\n active = null;\n };\n\n // A touch has no hover: the tap that focuses a button must not open its tooltip, and a tooltip\n // that is open when a finger lands closes. The compat mouse events and the focus a tap leaves\n // behind used to pin \"Copy chart source\" over the chart title on a phone (review 5, G13).\n let lastTouchAt = Number.NEGATIVE_INFINITY;\n const TOUCH_FOCUS_WINDOW_MS = 1000;\n const onPointerOver = (e: PointerEvent) => {\n if (e.pointerType === \"touch\") {\n lastTouchAt = Date.now();\n if (active) deactivate();\n return;\n }\n if (inSurface(e.target)) {\n cancelClose();\n return;\n }\n if (holding || hasSelectionInSurface()) {\n // Text is being selected in the tooltip: another control passing under the pointer must not replace it.\n return;\n }\n const el = titledAncestor(e.target);\n if (el) activate(el);\n else if (active && closeTimer === undefined) scheduleClose();\n };\n\n const onPointerOut = (e: PointerEvent) => {\n if (!active) return;\n const next = e.relatedTarget;\n if (next instanceof win!.Node && (active.contains(next) || inSurface(next))) return;\n if (inSurface(e.target)) {\n if (holding) return;\n scheduleClose();\n return;\n }\n scheduleClose();\n };\n\n const onPointerDown = (e: PointerEvent) => {\n if (e.pointerType === \"touch\") lastTouchAt = Date.now();\n if (inSurface(e.target)) {\n // Selecting the tooltip's text: keep it open until the press ends.\n holding = true;\n cancelClose();\n return;\n }\n deactivate();\n };\n\n const onPointerUp = () => {\n if (!holding) return;\n holding = false;\n if (!hasSelectionInSurface()) scheduleClose();\n };\n\n const onFocusIn = (e: FocusEvent) => {\n if (Date.now() - lastTouchAt < TOUCH_FOCUS_WINDOW_MS) return;\n const el = titledAncestor(e.target);\n if (!el) return;\n let visible = true;\n try {\n visible = (e.target as Element).matches(\":focus-visible\");\n } catch {\n visible = true;\n }\n if (visible) activate(el);\n };\n\n const onFocusOut = (e: FocusEvent) => {\n if (!active) return;\n const next = e.relatedTarget;\n if (next instanceof win!.Node && active.contains(next)) return;\n deactivate();\n };\n\n const onDismiss = (e?: Event) => {\n if (e && inSurface(e.target)) return;\n deactivate();\n };\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key === \"Escape\") deactivate();\n };\n\n doc.addEventListener(\"pointerover\", onPointerOver, true);\n doc.addEventListener(\"pointerout\", onPointerOut, true);\n doc.addEventListener(\"focusin\", onFocusIn, true);\n doc.addEventListener(\"focusout\", onFocusOut, true);\n doc.addEventListener(\"pointerdown\", onPointerDown, true);\n doc.addEventListener(\"pointerup\", onPointerUp, true);\n doc.addEventListener(\"keydown\", onKeyDown, true);\n doc.addEventListener(\"scroll\", onDismiss, true);\n win?.addEventListener(\"blur\", onDismiss);\n\n return () => {\n deactivate();\n doc.removeEventListener(\"pointerover\", onPointerOver, true);\n doc.removeEventListener(\"pointerout\", onPointerOut, true);\n doc.removeEventListener(\"focusin\", onFocusIn, true);\n doc.removeEventListener(\"focusout\", onFocusOut, true);\n doc.removeEventListener(\"pointerdown\", onPointerDown, true);\n doc.removeEventListener(\"pointerup\", onPointerUp, true);\n doc.removeEventListener(\"keydown\", onKeyDown, true);\n doc.removeEventListener(\"scroll\", onDismiss, true);\n win?.removeEventListener(\"blur\", onDismiss);\n surface?.remove();\n surface = null;\n };\n}\n","\"use client\";\n\n// THE TAP-TARGET GUARD — development builds only.\n//\n// The lock layer in tap-target.css makes a tap button's own box, pill and\n// glyph impossible to resize from outside. What CSS cannot stop is a caller\n// bending the system AROUND the button: a parent that adds `gap` between two\n// tap buttons, a wrapper with margin or padding, a local override of a\n// `--matrx-tap-*` token, a utility class smuggled in through `className`.\n// After a tap button mounts, this guard measures it in the real layout and,\n// on any of those, marks it `data-matrx-tap-violation`: the stylesheet then\n// paints it as a giant red box carrying the reason, and the console names\n// the element.\n//\n// OFF until the host turns it on with `enableTapTargetGuard()` — from code the\n// HOST compiles, e.g. matrx-frontend's dev-only client boot. Never gate it on\n// `process.env.NODE_ENV` in here: this package's own build inlines that\n// expression, so a \"dev only\" check written here would run in production too\n// (see @ai-matrx/associations' context.tsx for the outage that taught this).\n\nimport { useCallback, useRef, type MutableRefObject, type Ref } from \"react\";\nimport { layoutScale } from \"../layout-scale\";\n\n// A `Symbol.for` slot on globalThis, like the link seam: the `.` and\n// `./buttons` bundles each inline this module, and one switch must reach both.\nconst GUARD_SLOT = Symbol.for(\"@ai-matrx/tap-target:guard\");\ntype GlobalWithGuard = typeof globalThis & { [GUARD_SLOT]?: boolean };\n\n/** Turn the development guard on (or off). Call once at client boot, only in\n * development builds of the host. */\nexport function enableTapTargetGuard(on = true): void {\n (globalThis as GlobalWithGuard)[GUARD_SLOT] = on;\n if (on) startPillInsetScan();\n}\n\nfunction guardOn(): boolean {\n return (globalThis as GlobalWithGuard)[GUARD_SLOT] === true;\n}\n\nconst TOKENS = [\n \"--matrx-tap-box\",\n \"--matrx-tap-gap\",\n \"--matrx-tap-pill-size\",\n \"--matrx-tap-pill-sm-size\",\n \"--matrx-tap-wide-size\",\n \"--matrx-tap-icon-size\",\n \"--matrx-tap-touch-min\",\n \"--matrx-tap-target-size\",\n] as const;\n\n/** The only scopes that may move tap tokens, and which ones — each owned by\n * this package's own CSS: the table density scales (tap-target.css) and\n * Alchemy's 18px trigger glyph (content-transfer.css). */\nconst SANCTIONED: ReadonlyArray<{ scope: string; tokens: ReadonlySet<string> }> = [\n {\n scope: \"[data-matrx-table][data-matrx-table-density]\",\n tokens: new Set([\n \"--matrx-tap-target-size\",\n \"--matrx-tap-pill-size\",\n \"--matrx-tap-wide-size\",\n \"--matrx-tap-pill-sm-size\",\n \"--matrx-tap-icon-size\",\n ]),\n },\n { scope: \"[data-alchemy-trigger]\", tokens: new Set([\"--matrx-tap-icon-size\"]) },\n // THE ONE CONTROL scope (controls.css): tap buttons beside the 28px controls\n // take the controls' height — a 28px pill in a 34px box, the same 6px apart.\n {\n scope: \"[data-matrx-controls]\",\n tokens: new Set([\n \"--matrx-tap-target-size\",\n \"--matrx-tap-pill-size\",\n \"--matrx-tap-wide-size\",\n \"--matrx-tap-pill-sm-size\",\n ]),\n },\n];\nconst TABLE_SCOPE = SANCTIONED[0]!.scope;\nconst CONTROL_SCOPE = SANCTIONED[2]!.scope;\nconst TAP_ITEM = \".matrx-tap-target, .matrx-tap-group\";\n\n/** `className` on a tap button is the GLYPH COLOR. Anything that sizes,\n * spaces, positions or fills is misuse. */\nconst NON_COLOR_CLASS =\n /^(?:[^\\s:]+:)*!?-?(?:\\[&|scale|translate|h|w|size|min-h|min-w|max-h|max-w|p|px|py|ps|pe|pt|pb|pl|pr|m|mx|my|ms|me|mt|mb|ml|mr|gap|space-x|space-y|bg|rounded|border|ring|shadow|absolute|relative|fixed|sticky|inset|top|left|right|bottom|flex|grid|block|inline|hidden|z|shrink|grow|basis|self|order)(?:-|$|\\[)/;\n\nexport function classNameMisuse(className: string | undefined): string | null {\n if (!guardOn() || !className) return null;\n const bad = className.split(/\\s+/).filter((t) => t && NON_COLOR_CLASS.test(t));\n return bad.length\n ? `className is the glyph color only — remove \"${bad.join(\" \")}\"`\n : null;\n}\n\n/**\n * The horizontal space a wrapper adds around what it holds. An `auto` margin (`ml-auto` pushing a\n * toolbar's actions to the end) only aligns — the browser resolves it to pixels in\n * `getComputedStyle`, so read the computed keyword from the typed OM and count it as zero.\n */\nexport function wrapperSpace(el: Element, view: Window): number {\n const pcs = view.getComputedStyle(el);\n const typed = (el as Element & { computedStyleMap?: () => { get(p: string): unknown } }).computedStyleMap?.();\n const margin = (prop: \"margin-left\" | \"margin-right\", resolved: string) =>\n typed && String(typed.get(prop)) === \"auto\" ? 0 : px(resolved);\n return margin(\"margin-left\", pcs.marginLeft) + margin(\"margin-right\", pcs.marginRight) + px(pcs.paddingLeft) + px(pcs.paddingRight);\n}\n\nfunction px(value: string): number {\n const n = Number.parseFloat(value);\n return Number.isFinite(n) ? n : 0;\n}\n\nfunction describe(el: Element): string {\n const cls = typeof el.className === \"string\" ? el.className.trim().split(/\\s+/).slice(0, 4).join(\".\") : \"\";\n return `<${el.tagName.toLowerCase()}${cls ? `.${cls}` : \"\"}>`;\n}\n\n/** Elements that ride along with a tap button without taking space from it\n * (a badge, a capsule, a tooltip portal anchor). */\nfunction isDecor(el: Element, view: Window): boolean {\n const cs = view.getComputedStyle(el);\n return cs.position === \"absolute\" || cs.position === \"fixed\" || cs.display === \"none\";\n}\n\nfunction tapCount(el: Element): number {\n return el.matches(TAP_ITEM) ? 1 : el.querySelectorAll(TAP_ITEM).length;\n}\n\n/** Visible text in `container` outside `tap` and outside decor (a badge's\n * count is decor) — a wrapper with its own words is a chip, not a wrapper. */\nfunction ownText(container: Element, tap: Element, view: Window): string {\n let out = \"\";\n const walk = (node: Node) => {\n if (node === tap) return;\n if (node.nodeType === 3) out += node.textContent ?? \"\";\n else if (node.nodeType === 1 && !isDecor(node as Element, view)) node.childNodes.forEach(walk);\n };\n container.childNodes.forEach(walk);\n return out.trim();\n}\n\n/** True when `child` is a tap button, or a plain wrapper whose only content\n * is ONE tap button (plus decor) — never a search box that happens to hold\n * a clear button, never a chip with words. */\nfunction isTapSlot(child: Element, view: Window): boolean {\n if (child.matches(TAP_ITEM)) return true;\n if (tapCount(child) !== 1) return false;\n const tap = child.querySelector(TAP_ITEM)!;\n const controls = Array.from(child.querySelectorAll(\"input, select, textarea, button, a, [role='button']\"));\n if (controls.some((c) => c !== tap && !tap.contains(c))) return false;\n return ownText(child, tap, view) === \"\";\n}\n\nlet probe: { key: string; target: number; pill: number; sm: number; smPill: number; wide: number; icon: number } | null = null;\n\n/** What the package's own CSS produces with no surrounding context — the\n * canon every mounted button is measured against. Re-measured whenever the\n * root tokens change (the lab page switches the gap). */\nfunction canon(doc: Document) {\n const view = doc.defaultView!;\n const root = view.getComputedStyle(doc.documentElement);\n const key = TOKENS.map((t) => root.getPropertyValue(t)).join(\"|\");\n if (probe?.key === key) return probe;\n const host = doc.createElement(\"div\");\n host.setAttribute(\"aria-hidden\", \"true\");\n host.style.cssText = \"position:absolute;visibility:hidden;pointer-events:none;left:-9999px;top:0\";\n host.innerHTML =\n '<button class=\"matrx-tap-target\"><div class=\"matrx-tap-pill\"><svg class=\"matrx-tap-icon\"></svg></div></button>' +\n '<button class=\"matrx-tap-target matrx-tap-target-sm\"><div class=\"matrx-tap-pill matrx-tap-pill-sm\"></div></button>' +\n '<button class=\"matrx-tap-target matrx-tap-target-inline\"><div class=\"matrx-tap-pill matrx-tap-pill-inline\"></div></button>';\n doc.body.appendChild(host);\n const [a, b, w] = Array.from(host.children) as HTMLElement[];\n probe = {\n key,\n target: a!.offsetHeight,\n pill: (a!.firstElementChild as HTMLElement).offsetHeight,\n icon: px(view.getComputedStyle(a!.querySelector(\"svg\")!).height),\n sm: b!.offsetHeight,\n smPill: (b!.firstElementChild as HTMLElement).offsetHeight,\n wide: (w!.firstElementChild as HTMLElement).offsetHeight,\n };\n host.remove();\n return probe;\n}\n\n/** Returns the first rule this mounted tap button breaks, or null. */\nexport function findTapViolation(el: HTMLElement): string | null {\n const doc = el.ownerDocument;\n const view = doc.defaultView;\n if (!view || !el.isConnected) return null;\n const cs = view.getComputedStyle(el);\n if (cs.display === \"none\") return null;\n\n // 1. Tokens are the package's alone. Only the table-density scope may move\n // the three it owns.\n const root = view.getComputedStyle(doc.documentElement);\n // Both scaled scopes size by their own tokens; the canon check below reads\n // the root canon, so it applies outside them only.\n const inTable = el.closest(TABLE_SCOPE) !== null || el.closest(CONTROL_SCOPE) !== null;\n const moved = new Set<string>();\n for (const token of TOKENS) {\n const mine = cs.getPropertyValue(token).trim();\n const base = root.getPropertyValue(token).trim();\n if (mine === base) continue;\n if (!SANCTIONED.some((s) => s.tokens.has(token) && el.closest(s.scope))) {\n return `${token} overridden to \"${mine}\" — tap geometry is not configurable`;\n }\n moved.add(token);\n }\n\n // 2. Measured geometry equals the canon (outside table density, which\n // sizes by its own tokens).\n const sm = el.classList.contains(\"matrx-tap-target-sm\");\n const inline = /matrx-tap-target-(?:inline|mobile-icon-only)/.test(el.className);\n const pill = el.querySelector<HTMLElement>(\":scope > .matrx-tap-pill\");\n const icon = pill?.querySelector(\".matrx-tap-icon\") ?? null;\n // A host touch floor (min-width / min-height) may enlarge a box; that is\n // the floor working, not a bend.\n const floored =\n px(cs.minHeight) >= el.offsetHeight - 0.5 || px(cs.minWidth) >= el.offsetWidth - 0.5;\n if (!inTable && pill && !floored) {\n const c = canon(doc);\n const box = sm ? c.sm : c.target;\n // A labeled pill is a WIDE shape (shorter than a round one); below the\n // `sm` breakpoint a mobile-icon-only pill is round again — either is canon.\n const pillSizes = sm ? [c.smPill] : inline ? [c.pill, c.wide] : [c.pill];\n if (Math.abs(el.offsetHeight - box) > 0.5) return `button is ${el.offsetHeight}px tall, canon is ${box}px`;\n if (!inline && Math.abs(el.offsetWidth - box) > 0.5) return `button is ${el.offsetWidth}px wide, canon is ${box}px`;\n if (!pillSizes.some((p) => Math.abs(pill.offsetHeight - p) <= 0.5)) {\n return `pill is ${pill.offsetHeight}px, canon is ${pillSizes.join(\" or \")}px`;\n }\n if (icon && !moved.has(\"--matrx-tap-icon-size\")) {\n const size = px(view.getComputedStyle(icon).height);\n if (Math.abs(size - c.icon) > 0.5) return `glyph is ${size}px, canon is ${c.icon}px`;\n }\n }\n\n // 3. Nothing adds space around it. Climb the wrappers that hold only this\n // button (plus decor such as a badge); none may carry inline margin or\n // padding. A tap button inside a group is represented by its group.\n let slot: Element = el;\n if (el.parentElement?.matches(\".matrx-tap-group-row, .matrx-tap-search-measure\")) {\n const group = el.closest(\".matrx-tap-group\");\n if (group && tapCount(el.parentElement) > 1) return null;\n slot = group ?? el;\n }\n for (let depth = 0; depth < 2; depth += 1) {\n const parent: HTMLElement | null = slot.parentElement;\n if (!parent || parent === doc.body) break;\n const others = Array.from(parent.children).filter((c) => c !== slot && !isDecor(c, view));\n if (others.length > 0) break; // `parent` is the row\n if (ownText(parent, slot, view) !== \"\") break; // a chip or a titled header\n const space = wrapperSpace(parent, view);\n if (space > 0.5) {\n return `${describe(parent)} adds ${space}px around a tap button — tap buttons space themselves`;\n }\n slot = parent;\n }\n\n // 4. The row adds no gap between tap buttons.\n const row = slot.parentElement;\n if (row) {\n const rcs = view.getComputedStyle(row);\n const flexOrGrid = /flex|grid/.test(rcs.display);\n const neighbours = Array.from(row.children).filter((c) => c !== slot && isTapSlot(c, view));\n if (flexOrGrid && neighbours.length > 0) {\n const horizontal = rcs.display.includes(\"grid\") || !rcs.flexDirection.startsWith(\"column\");\n const gap = px(horizontal ? rcs.columnGap : rcs.rowGap);\n if (gap > 0.5) {\n return `${describe(row)} adds a ${gap}px gap between tap buttons — remove it; tap buttons space themselves`;\n }\n }\n }\n return null;\n}\n\n/* ------------------------------------------------------------------ */\n/* PLACEMENT — the three rules a tap button's SURROUNDINGS must keep */\n/* (owner, 2026-10-02). Reported as a WARNING (a dashed outline and one */\n/* console error naming the fix), not the misuse box: they are about */\n/* the page around the button, and the whole app is being brought into */\n/* line with them. */\n/* 1. GLASS ONLY FLOATS — glass is see-through; it belongs on a bar */\n/* that floats over moving content (position fixed/sticky) or on a */\n/* plane marked `data-matrx-glass-plane`. On a page, card, toast or */\n/* table use `variant=\"transparent\"` / a solid group. */\n/* 2. ALL GLASS OR NONE — a glass item's row holds only glass items */\n/* (glass tap buttons, glass groups, or `data-matrx-glass` pieces). */\n/* 3. NEIGHBOURS KEEP THEIR HALF-GAP — a tap box carries 3px of unseen */\n/* space each side (box − pill = one gap, 6px). Anything beside it */\n/* adds its own 3px, so the visible distance is always one gap. */\n/* ------------------------------------------------------------------ */\n\nconst GLASS = \".matrx-glass-thin-border, .matrx-glass-interactive\";\n\nfunction isGlassItem(node: Element): boolean {\n if (node.hasAttribute(\"data-matrx-glass\")) return true;\n if (node.matches(\".matrx-tap-group\")) return node.querySelector(\":scope > .matrx-tap-group-capsule.matrx-glass-thin-border\") !== null;\n if (node.matches(\".matrx-tap-target\")) return node.querySelector(`:scope > .matrx-tap-pill:is(${GLASS})`) !== null;\n // A plain wrapper whose only content is ONE tap button (plus decor such as a\n // badge) is that button: a badge host around a glass button is glass.\n const view = node.ownerDocument.defaultView;\n if (view && isTapSlot(node, view)) return isGlassItem(node.querySelector(TAP_ITEM)!);\n return false;\n}\n\nconst SCROLLS = /^(auto|scroll|overlay)$/;\n\n/** True when `el` rides a bar over moving content: a fixed/sticky ancestor (or\n * a glass plane) reached BEFORE any scroll container. Inside a scroller the\n * button IS the moving content — an app root that is itself `position:\n * fixed` (the shell) must not make every page button \"float\". */\nfunction floats(el: Element, view: Window): boolean {\n for (let n: Element | null = el; n && n !== el.ownerDocument.body; n = n.parentElement) {\n if (n.hasAttribute(\"data-matrx-glass-plane\")) return true;\n const cs = view.getComputedStyle(n);\n if (cs.position === \"fixed\" || cs.position === \"sticky\") return true;\n if (n !== el && (SCROLLS.test(cs.overflowY) || SCROLLS.test(cs.overflowX))) return false;\n }\n return false;\n}\n\n/** True when the edge of `wrapper` that faces a neighbour (`side` is where the\n * wrapper sits relative to that neighbour) is itself a tap slot: that button\n * carries its own 3px half-gap, so the wrapper is spacing-correct however many\n * tap buttons it holds (the fading mic + More cluster beside Send). A wrapper\n * whose edge is text or a field is not — it still has to keep its distance. */\nfunction facesWithTapSlot(wrapper: Element, side: \"after\" | \"before\", view: Window): boolean {\n for (let node: Element | null = wrapper; node; ) {\n if (isTapSlot(node, view)) return true;\n const kids: Element[] = Array.from(node.children).filter((c) => !isDecor(c, view));\n node = (side === \"after\" ? kids[0] : kids[kids.length - 1]) ?? null;\n }\n return false;\n}\n\nfunction visible(el: Element, view: Window): boolean {\n if (el.getAttribute(\"aria-hidden\") === \"true\" || isDecor(el, view)) return false;\n const r = el.getBoundingClientRect();\n return r.width > 1 && r.height > 1;\n}\n\nconst INTERACTIVE = \"button, a[href], input, select, textarea, [role='button'], svg, img\";\n\n/** The box the eye sees on the side of `sib` that faces the tap button. An\n * unpainted layout wrapper (no fill, no border on that side, no words of its\n * own) is invisible, so the distance is judged at the first thing inside it —\n * the wrapper around ProTextarea's mic sits 3px from Expand while the mic\n * capsule, which keeps its own 3px margin, sits one gap away (2026-10-13). */\nfunction facingBox(sib: Element, side: \"after\" | \"before\", view: Window): Element {\n let node = sib;\n for (;;) {\n if (node.matches(INTERACTIVE)) return node;\n const cs = view.getComputedStyle(node);\n const fill = cs.backgroundColor;\n if ((fill && fill !== \"rgba(0, 0, 0, 0)\" && fill !== \"transparent\") || px(side === \"after\" ? cs.borderLeftWidth : cs.borderRightWidth) > 0) {\n return node;\n }\n if (Array.from(node.childNodes).some((c) => c.nodeType === 3 && c.textContent?.trim())) return node;\n const kids = Array.from(node.children).filter((c) => visible(c, view));\n const next = side === \"after\" ? kids[0] : kids[kids.length - 1];\n if (!next) return node;\n node = next;\n }\n}\n\n/** The first placement rule this tap button's surroundings break, or null. */\nexport function findTapPlacementWarning(el: HTMLElement): string | null {\n const doc = el.ownerDocument;\n const view = doc.defaultView;\n if (!view || !el.isConnected) return null;\n // A button inside a group is judged as its group.\n const slot: Element = el.closest(\".matrx-tap-group\") ?? el;\n const glass = isGlassItem(slot);\n\n if (glass && !floats(slot, view)) {\n return 'glass on a solid surface — glass only floats over moving content; use variant=\"transparent\" (or a solid group)';\n }\n\n const row = slot.parentElement;\n if (!row) return null;\n if (glass) {\n const mixed = Array.from(row.children).find((c) => c !== slot && visible(c, view) && !isGlassItem(c));\n if (mixed) return `glass beside non-glass ${describe(mixed)} — make the row all glass or none`;\n }\n\n const pill = (el.querySelector(\":scope > .matrx-tap-pill\") as HTMLElement | null) ?? (slot.querySelector(\".matrx-tap-group-capsule\") as HTMLElement | null);\n if (!pill) return null;\n const gap = px(view.getComputedStyle(el).getPropertyValue(\"--matrx-tap-gap\")) || 6;\n const p = pill.getBoundingClientRect();\n if (p.width === 0) return null;\n // Distances are judged in LAYOUT pixels: inside a zoomed (transformed) tile a screen distance\n // is the layout distance times the scale.\n const scale = layoutScale(pill);\n for (const [side, sib] of [[\"after\", slot.nextElementSibling], [\"before\", slot.previousElementSibling]] as const) {\n if (!sib || !visible(sib, view) || isTapSlot(sib, view) || isGlassItem(sib) || facesWithTapSlot(sib, side, view)) continue;\n if (Math.abs(sib.getBoundingClientRect().top + sib.getBoundingClientRect().height / 2 - (p.top + p.height / 2)) > p.height) continue; // not on this row\n const box = facingBox(sib, side, view);\n const r = box.getBoundingClientRect();\n const cs = view.getComputedStyle(box);\n const distance =\n (side === \"after\" ? r.left - p.right : p.left - r.right) / scale + (side === \"after\" ? px(cs.paddingLeft) : px(cs.paddingRight));\n if (distance < gap - 0.5) {\n return `${describe(sib)} sits ${Math.round(distance)}px from the pill — anything beside a tap button adds its own ${gap / 2}px (the box only carries ${gap / 2}px)`;\n }\n }\n return null;\n}\n\nconst reported = new Set<string>();\n\nfunction report(el: HTMLElement, reason: string) {\n el.setAttribute(\"data-matrx-tap-violation\", reason);\n const key = `${reason}@${el.getAttribute(\"aria-label\") ?? el.textContent ?? \"\"}`;\n if (reported.has(key)) return;\n reported.add(key);\n console.error(`[tap-target] ${reason}`, el);\n}\n\nconst mounted = new Set<HTMLElement>();\nlet resizeTimer: ReturnType<typeof setTimeout> | null = null;\nlet listening = false;\n\nfunction check(node: HTMLElement) {\n const reason = findTapViolation(node);\n if (reason) {\n report(node, reason);\n return;\n }\n node.removeAttribute(\"data-matrx-tap-violation\");\n const warning = findTapPlacementWarning(node);\n if (warning) {\n node.setAttribute(\"data-matrx-tap-warning\", warning);\n const key = `w:${warning}@${node.getAttribute(\"aria-label\") ?? \"\"}`;\n if (!reported.has(key)) {\n reported.add(key);\n console.error(`[tap-target] ${warning}`, node);\n }\n } else node.removeAttribute(\"data-matrx-tap-warning\");\n}\n\nfunction listenForResize(view: Window) {\n if (listening) return;\n listening = true;\n view.addEventListener(\"resize\", () => {\n if (resizeTimer) clearTimeout(resizeTimer);\n resizeTimer = setTimeout(() => mounted.forEach((n) => (n.isConnected ? check(n) : mounted.delete(n))), 200);\n });\n // A button is judged once, at mount — but its neighbours keep changing (a\n // loading placeholder becomes the real control). Re-judge a button when the\n // row it sits in gains or loses children, so a mark never outlives the\n // neighbour it named (2026-10-13: \"New run\" kept a red outline for a\n // skeleton that had already left the header).\n const Observer = (view as Window & { MutationObserver?: typeof MutationObserver }).MutationObserver;\n if (!Observer || !view.document.body) return;\n const changedRows = new Set<Node>();\n let rowTimer: ReturnType<typeof setTimeout> | null = null;\n new Observer((records) => {\n for (const r of records) changedRows.add(r.target);\n if (rowTimer) clearTimeout(rowTimer);\n rowTimer = setTimeout(() => {\n mounted.forEach((n) => {\n if (!n.isConnected) return void mounted.delete(n);\n const row = (n.closest(\".matrx-tap-group\") ?? n).parentElement;\n if (row && changedRows.has(row)) check(n);\n });\n changedRows.clear();\n }, 200);\n }).observe(view.document.body, { childList: true, subtree: true });\n}\n\nfunction assignRef<T>(ref: Ref<T> | undefined, value: T | null) {\n if (typeof ref === \"function\") ref(value);\n else if (ref) (ref as MutableRefObject<T | null>).current = value;\n}\n\n/**\n * The callback ref every tap trigger carries. In production it only forwards\n * the caller's ref; in development it also measures the trigger once it is in\n * the layout and paints a violation.\n */\nexport function useTapGuardRef<T extends HTMLElement>(\n forwarded: Ref<T> | undefined,\n propViolation: string | null,\n): (node: T | null) => void {\n const current = useRef<T | null>(null);\n return useCallback(\n (node: T | null) => {\n assignRef(forwarded, node);\n if (current.current && current.current !== node) mounted.delete(current.current);\n current.current = node;\n if (!guardOn() || !node) return;\n if (propViolation) {\n report(node, propViolation);\n return;\n }\n const view = node.ownerDocument.defaultView;\n if (!view) return;\n mounted.add(node);\n listenForResize(view);\n view.requestAnimationFrame(() => check(node));\n },\n [forwarded, propViolation],\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* THE PILL-INSET GUARD (0.60.10). A pill is balanced when its INK sits */\n/* the same distance from both edges. On 2026-10-04 every icon+label */\n/* pill read off-centre (1.3–3.3px) because padding was shaved on the */\n/* glyph side by a guess at the glyph's air. The trim in tap-target.css */\n/* now removes each glyph's real air; this measures the result in the */\n/* real layout and marks any pill whose ink insets differ by more than */\n/* 2px — dashed red outline + one console error naming both numbers. */\n/* ------------------------------------------------------------------ */\n\nconst PILL_TOLERANCE_PX = 2;\nconst PILL_ITEMS = \"button, a[href], [role='button'], [role='tab'], [role='radio'], [role='menuitem']\";\nconst PILL_CANDIDATES = \"button, a[href], [role='button'], .rounded-full, .matrx-tap-pill-inline, .matrx-tap-pill-mobile-icon-only\";\n\n/** Horizontal ink extents inside `el`: glyph geometry for svgs, text runs for text. */\nfunction inkExtents(el: Element): { left: number; right: number } | null {\n const doc = el.ownerDocument;\n const view = doc.defaultView;\n if (!view) return null;\n let left = Infinity;\n let right = -Infinity;\n const walker = doc.createTreeWalker(el, 0x1 | 0x4 /* SHOW_ELEMENT | SHOW_TEXT */);\n let n: Node | null;\n while ((n = walker.nextNode())) {\n if (n.nodeType === 1) {\n const node = n as Element;\n const cs = view.getComputedStyle(node);\n if (cs.display === \"none\" || cs.visibility === \"hidden\" || cs.position === \"absolute\") continue;\n const tag = node.tagName.toLowerCase();\n if (tag === \"img\" || tag === \"picture\" || tag === \"video\" || tag === \"canvas\") {\n // A picture (a favicon, an avatar) is ink by its box — it draws its own pixels, and a logo\n // renders exactly as it is, never tinted to make a guard see it (2026-10-13: every\n // favicon-led link pill read \"29px left vs 10px right\" because the image was invisible here).\n const r = node.getBoundingClientRect();\n if (r.width > 0) {\n left = Math.min(left, r.left);\n right = Math.max(right, r.right);\n }\n continue;\n }\n if (tag !== \"svg\" && (node.getAttribute(\"role\") === \"status\" || node.getAttribute(\"role\") === \"progressbar\")) {\n // A busy spinner drawn with borders (its rings are absolute, so nothing below sees them)\n // is ink by its box: a pill whose icon turned into a spinner read \"44px left vs 20px right\".\n const r = node.getBoundingClientRect();\n if (r.width > 0) {\n left = Math.min(left, r.left);\n right = Math.max(right, r.right);\n }\n continue;\n }\n if (tag !== \"svg\") {\n // A painted chip inside the pill (a count badge) is ink by its box: its fill is what the eye sees.\n const paintedChip = (cs.backgroundColor !== \"rgba(0, 0, 0, 0)\" && cs.backgroundColor !== \"transparent\") || parseFloat(cs.borderLeftWidth) > 0;\n if (paintedChip) {\n const r = node.getBoundingClientRect();\n if (r.width > 0) {\n left = Math.min(left, r.left);\n right = Math.max(right, r.right);\n }\n }\n continue;\n }\n const svg = node as SVGGraphicsElement;\n if (typeof svg.getBBox !== \"function\" || typeof svg.getScreenCTM !== \"function\") continue;\n const bb = svg.getBBox();\n const ctm = svg.getScreenCTM();\n if (!ctm || bb.width === 0) continue;\n if (Math.abs(ctm.b) > 0.001 || Math.abs(ctm.c) > 0.001) {\n // A turning glyph (a busy spinner) has no fixed ink: judge it by its layout box, centered\n // where the rotation centers it — never by a mid-turn snapshot of its paths.\n const r = node.getBoundingClientRect();\n const half = (parseFloat(cs.width) || r.width) / 2;\n const mid = r.left + r.width / 2;\n left = Math.min(left, mid - half);\n right = Math.max(right, mid + half);\n continue;\n }\n const half = ((parseFloat(cs.strokeWidth) || 0) * Math.abs(ctm.a)) / 2;\n const x1 = ctm.a * bb.x + ctm.e;\n const x2 = ctm.a * (bb.x + bb.width) + ctm.e;\n left = Math.min(left, Math.min(x1, x2) - half);\n right = Math.max(right, Math.max(x1, x2) + half);\n } else if (n.nodeValue && n.nodeValue.trim()) {\n const parent = n.parentElement;\n if (!parent || parent.closest(\"svg\")) continue;\n const pcs = view.getComputedStyle(parent);\n if (pcs.visibility === \"hidden\" || pcs.position === \"absolute\") continue;\n const range = doc.createRange();\n range.selectNodeContents(n);\n // A truncated label (`truncate max-w-*`) draws only what its clipping box shows: its text\n // run keeps going past the ellipsis, so the run is clipped to every overflow-hiding box\n // between it and the pill (2026-10-18: a scope chip \"matrx-frontend (LCP test)\" read\n // \"9.0px left vs 5.7px right\" while its ellipsis sat exactly 9px from the edge).\n const clip = textClip(parent, el, view);\n for (const r of Array.from(range.getClientRects())) {\n if (r.width <= 0) continue;\n const rl = Math.max(r.left, clip.left);\n const rr = Math.min(r.right, clip.right);\n if (rr <= rl) continue;\n left = Math.min(left, rl);\n right = Math.max(right, rr);\n }\n }\n }\n return Number.isFinite(left) && Number.isFinite(right) ? { left, right } : null;\n}\n\n/** The horizontal window a text run can paint in: its overflow-clipping ancestors up to (excluding) `pill`. */\nfunction textClip(from: Element, pill: Element, view: Window): { left: number; right: number } {\n let left = -Infinity;\n let right = Infinity;\n for (let node: Element | null = from; node && node !== pill; node = node.parentElement) {\n const cs = view.getComputedStyle(node);\n // overflow-x, or the shorthand's first (x) value where a runtime does not expand it (jsdom)\n const clipsX = (cs.overflowX && cs.overflowX !== \"visible\") || (cs.overflow && !cs.overflow.startsWith(\"visible\"));\n if (clipsX) {\n const r = node.getBoundingClientRect();\n if (r.width > 0) {\n left = Math.max(left, r.left);\n right = Math.min(right, r.right);\n }\n }\n }\n return { left, right };\n}\n\nconst FIELDS = \"input, textarea, select, [contenteditable='true'], [role='textbox'], [role='searchbox'], [role='combobox']\";\n\n/**\n * Only a BUTTON can be a pill whose ink must balance: an interactive element,\n * or the painted pill inside one (a tap button's `.matrx-tap-pill-inline`).\n * A field — or a capsule that holds one, like a rounded search box — aligns its\n * text to an edge by design, and a non-interactive container (a status chip, a\n * wrapper painted `rounded-full`) is never a pill button (2026-10-09: the\n * messenger's search field and messaging's AI chips wore the red outline).\n */\nexport function isPillButton(el: Element): boolean {\n if (el.matches(FIELDS) || el.querySelector(FIELDS) !== null) return false;\n if (el.matches(PILL_ITEMS)) return true;\n if (el.parentElement?.closest(PILL_ITEMS)) return true;\n return el.querySelector(PILL_ITEMS) !== null;\n}\n\n/** Why this pill's ink is off-centre, or null. Only judges a pill — a capsule\n * (radius ≥ half its height) with its own fill or border, carrying ink. */\nexport function findPillInsetWarning(el: HTMLElement): string | null {\n const view = el.ownerDocument.defaultView;\n if (!view || !el.isConnected) return null;\n if (!isPillButton(el)) return null;\n const box = el.getBoundingClientRect();\n const scale = layoutScale(el);\n if (box.width / scale < 20 || box.height / scale < 16 || box.height / scale > 48) return null;\n const cs = view.getComputedStyle(el);\n if (parseFloat(cs.borderTopLeftRadius) < box.height / scale / 2 - 1) return null;\n const painted = cs.backgroundColor !== \"rgba(0, 0, 0, 0)\" && cs.backgroundColor !== \"transparent\";\n if (!painted && !(parseFloat(cs.borderLeftWidth) > 0)) return null;\n // A wide capsule (a stretched select or field) aligns content to an edge on purpose.\n if (box.width / scale > 320) return null;\n // Ink balance is a question only for CENTERED content. A select trigger (value left, chevron\n // right), a field, or a full-width action row that says justify-start aligns its content on\n // purpose — content alignment is placement, not an inset to balance.\n if (cs.display.includes(\"flex\") && ![\"center\", \"normal\"].includes(cs.justifyContent)) return null;\n if (el.matches(\"[data-matrx-control='select'], [data-matrx-control='field']\")) return null;\n // A switch, checkbox or slider carries STATE, not a label: its thumb sits at one end by design\n // (measured 2026-10-04: every connector switch read \"18px left vs 2px right\" in the chat composer).\n if (el.matches(\"[role='switch'], [role='checkbox'], [role='slider'], [role='radio']\")) return null;\n // A TRACK of several controls (a segmented nav, a tab strip) is a container, not a pill: its\n // items sit where the selection puts them, so the ink is lopsided by design — each item is\n // judged on its own (measured 2026-10-05: the shell route nav's icon track read 2px vs 12.5px\n // at 768 because the selected item's fill hugs one end and the last glyph carries its air).\n if (el.querySelectorAll(PILL_ITEMS).length > 1) return null;\n const ink = inkExtents(el);\n if (!ink) return null;\n const left = (ink.left - box.left) / scale;\n const right = (box.right - ink.right) / scale;\n if (left < 0 || right < 0) return null; // clipped / overflowing content: not this guard's question\n if (Math.abs(left - right) <= PILL_TOLERANCE_PX) return null;\n return `pill ink is off-centre: ${left.toFixed(1)}px left vs ${right.toFixed(1)}px right — pad both sides alike and let the glyph trim (tap-target.css, THE OPTICAL GLYPH TRIM) remove the glyph's air; never shave one side by hand`;\n}\n\nlet pillTimer: ReturnType<typeof setTimeout> | null = null;\nlet pillObserver: MutationObserver | null = null;\n\nfunction scanPills(doc: Document) {\n if (!guardOn()) return;\n for (const node of Array.from(doc.querySelectorAll<HTMLElement>(PILL_CANDIDATES))) {\n // A tap button's own pill is judged, not its invisible box.\n if (node.classList.contains(\"matrx-tap-target\")) continue;\n const warning = findPillInsetWarning(node);\n if (warning) {\n if (node.getAttribute(\"data-matrx-pill-inset-warning\") === warning) continue;\n node.setAttribute(\"data-matrx-pill-inset-warning\", warning);\n const key = `p:${warning}@${(node.textContent ?? \"\").trim().slice(0, 40)}`;\n if (!reported.has(key)) {\n reported.add(key);\n console.error(`[tap-target] ${warning}`, node);\n }\n } else if (node.hasAttribute(\"data-matrx-pill-inset-warning\")) {\n node.removeAttribute(\"data-matrx-pill-inset-warning\");\n }\n }\n}\n\nfunction startPillInsetScan() {\n if (pillObserver || typeof document === \"undefined\" || typeof MutationObserver === \"undefined\") return;\n const doc = document;\n const schedule = () => {\n if (pillTimer) clearTimeout(pillTimer);\n pillTimer = setTimeout(() => scanPills(doc), 600);\n };\n pillObserver = new MutationObserver((records) => {\n // Our own attribute writes must not re-trigger the scan.\n if (records.every((r) => r.type === \"attributes\" && r.attributeName === \"data-matrx-pill-inset-warning\")) return;\n schedule();\n });\n const begin = () => {\n pillObserver?.observe(doc.body, { childList: true, subtree: true, characterData: true, attributes: true, attributeFilter: [\"class\", \"style\", \"data-matrx-pill-inset-warning\"] });\n schedule();\n };\n if (doc.body) begin();\n else doc.addEventListener(\"DOMContentLoaded\", begin, { once: true });\n}\n","// THE LAYOUT SCALE (0.62.4). The dev guards (pill guard, tap-target guard) judge spacing, ink\n// balance and width in LAYOUT pixels — the numbers a stylesheet writes. `getBoundingClientRect`\n// returns SCREEN pixels, so inside a CSS-transformed (zoomed) container — every Board tile at\n// overview zoom — a correct 11px gap read 5.3px at 0.48 and warned falsely. The effective scale\n// is the ratio of an element's drawn width to its layout width (`offsetWidth`, which ignores\n// transforms), taken from the nearest ancestor-or-self that has a box. 1 when no engine reports\n// layout (jsdom) or the ratio is within 2% of 1, so a real violation at scale 1 reads unchanged.\n\nexport function layoutScale(el: Element | null): number {\n for (let n: Element | null = el; n; n = n.parentElement) {\n const w = (n as HTMLElement).offsetWidth;\n if (!w) continue;\n const drawn = n.getBoundingClientRect().width;\n if (!(drawn > 0)) continue;\n const s = drawn / w;\n if (!Number.isFinite(s) || s <= 0) return 1;\n return Math.abs(s - 1) < 0.02 ? 1 : s;\n }\n return 1;\n}\n","\"use client\";\n\nimport { createContext, useContext, type ReactNode } from \"react\";\n\n/** The surface a tap group sits on. \"glass\" floats over moving content; \"solid\" is a page, card,\n * toast or a header row that is itself a solid band. */\nexport type TapSurfaceKind = \"glass\" | \"solid\";\n\n// Shared through a Symbol.for slot on globalThis (like the default-variant context): the `.` and\n// `./buttons` dist bundles each inline this module, and a provider rendered by one must reach\n// buttons rendered by the other.\nconst SLOT = Symbol.for(\"@ai-matrx/tap-target:surface\");\ntype GlobalWithSlot = typeof globalThis & { [SLOT]?: ReturnType<typeof createContext<TapSurfaceKind>> };\nconst TapSurfaceContext = ((globalThis as GlobalWithSlot)[SLOT] ??= createContext<TapSurfaceKind>(\"glass\"));\n\n/**\n * GLASS ONLY FLOATS, declared once by the surface. A host whose header (or any region) is a solid\n * row wraps it in `<TapSurface surface=\"solid\">`; every `TapTargetButtonGroup` /\n * `TapTargetSearchGroup` inside then renders solid by itself — no per-page `surface=\"solid\"`.\n * A group's own `surface` prop still wins.\n */\nexport function TapSurface({ surface, children }: { surface: TapSurfaceKind; children: ReactNode }) {\n return <TapSurfaceContext.Provider value={surface}>{children}</TapSurfaceContext.Provider>;\n}\n\n/** The group's surface: its explicit prop, else the nearest `<TapSurface>`, else glass. */\nexport function useTapSurface(explicit: TapSurfaceKind | undefined): TapSurfaceKind {\n const inherited = useContext(TapSurfaceContext);\n return explicit ?? inherited;\n}\n","\"use client\";\n\n// THE BUILT-IN CAPABILITIES of every tap button — each one an enum or a flag,\n// never a class a caller writes. Rendering and geometry live in tap-target.css\n// (`.matrx-tap-badge`, `.matrx-tap-pressed`, `.matrx-tap-chevron`, …).\n\nimport { useEffect, type ReactNode } from \"react\";\n\nimport { MOTION_SPIN } from \"../motion\";\nimport { formatTapShortcut, parseShortcut, type TapShortcut } from \"../tap-shortcut\";\n\n/** Glyph color. Replaces the free-form `className`. */\nexport type TapTone = \"default\" | \"muted\" | \"primary\" | \"destructive\" | \"success\" | \"warning\" | \"info\";\n\n/** Fill of a solid button. Replaces `bgColor` / `iconColor` / hover / active. */\nexport type TapSolidTone = \"primary\" | \"destructive\" | \"success\" | \"warning\" | \"neutral\";\n\nexport const TAP_TONE_CLASS: Record<TapTone, string> = {\n default: \"text-foreground\",\n muted: \"text-muted-foreground group-hover/tap:text-foreground\",\n primary: \"text-primary-ink\",\n destructive: \"text-destructive-ink\",\n success: \"text-success-ink\",\n warning: \"text-warning-ink\",\n info: \"text-info-ink\",\n};\n\nexport const TAP_SOLID_TONE: Record<TapSolidTone, { fill: string; glyph: string }> = {\n primary: { fill: \"bg-primary group-hover/tap:bg-primary/85\", glyph: \"text-primary-foreground\" },\n destructive: { fill: \"bg-danger-fill group-hover/tap:bg-danger-fill/85\", glyph: \"text-danger-fill-foreground\" },\n success: { fill: \"bg-success-fill group-hover/tap:bg-success-fill/85\", glyph: \"text-success-fill-foreground\" },\n warning: { fill: \"bg-warning group-hover/tap:bg-warning/85\", glyph: \"text-warning-foreground\" },\n neutral: { fill: \"bg-foreground group-hover/tap:bg-foreground/85\", glyph: \"text-background\" },\n};\n\n/**\n * A keyboard shortcut: modifiers joined by \"+\", then one key —\n * \"mod+k\" (⌘ on Apple, Ctrl elsewhere), \"shift+mod+p\", \"alt+n\", \"/\", \"?\".\n */\nexport { formatTapShortcut, parseShortcut, type TapShortcut };\n\nexport interface TapFeatureProps {\n /** Glyph color, from the system's list. */\n tone?: TapTone | undefined;\n /** A count (99+ past 99) or a dot, drawn on the pill's corner by the system. */\n badge?: number | \"dot\" | undefined;\n /** A toggle that is on (sidebar open, filter on): tinted pill + aria-pressed. */\n pressed?: boolean | undefined;\n /** Work in flight: the glyph becomes a spinner and presses are ignored. */\n loading?: boolean | undefined;\n /** Why the button cannot be used — disables it and becomes its tooltip. */\n disabledReason?: string | undefined;\n /** Keyboard shortcut that presses the button; shown in its tooltip. */\n shortcut?: TapShortcut | undefined;\n /** A menu trigger: a small chevron after the label. */\n chevron?: boolean | undefined;\n}\n\nfunction isTyping(target: EventTarget | null): boolean {\n const el = target as HTMLElement | null;\n return !!el && (el.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(el.tagName));\n}\n\nexport function matchesTapShortcut(e: KeyboardEvent, shortcut: TapShortcut): boolean {\n const p = parseShortcut(shortcut);\n if ((e.metaKey || e.ctrlKey) !== p.mod || e.altKey !== p.alt) return false;\n // \"?\" and other shifted symbols arrive with shiftKey set — only compare\n // shift for letters and named keys.\n if (/^[a-z0-9]$|^[a-z]{2,}$/.test(p.key) && e.shiftKey !== p.shift) return false;\n if (!p.mod && isTyping(e.target)) return false;\n return e.key.toLowerCase() === p.key;\n}\n\n/** Presses `node` when its shortcut is typed anywhere on the page. */\nexport function useTapShortcut(shortcut: TapShortcut | undefined, getNode: () => HTMLElement | null, enabled: boolean) {\n useEffect(() => {\n if (!shortcut || !enabled) return;\n const onKey = (e: KeyboardEvent) => {\n if (!matchesTapShortcut(e, shortcut)) return;\n const node = getNode();\n if (!node || !node.isConnected) return;\n e.preventDefault();\n node.click();\n };\n window.addEventListener(\"keydown\", onKey);\n return () => window.removeEventListener(\"keydown\", onKey);\n }, [shortcut, enabled, getNode]);\n}\n\nexport function TapBadge({ badge }: { badge: number | \"dot\" }) {\n if (badge === \"dot\") return <span aria-hidden=\"true\" className=\"matrx-tap-badge\" data-dot=\"\" />;\n if (badge <= 0) return null;\n return (\n <span aria-hidden=\"true\" className=\"matrx-tap-badge\">\n {badge > 99 ? \"99+\" : badge}\n </span>\n );\n}\n\nexport function TapSpinner({ className }: { className: string }) {\n return (\n <svg className={className} fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={2} aria-hidden=\"true\">\n <circle\n className={MOTION_SPIN}\n cx=\"12\"\n cy=\"12\"\n r=\"9\"\n strokeDasharray=\"28.27\"\n strokeDashoffset=\"9\"\n strokeLinecap=\"round\"\n style={{ transformOrigin: \"12px 12px\" }}\n />\n </svg>\n );\n}\n\nexport function TapChevron() {\n return (\n <svg\n className=\"matrx-tap-chevron\"\n aria-hidden=\"true\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n );\n}\n\n/** Tooltip body: the label, then the shortcut as a key cap. */\nexport function tooltipBody(label: string, shortcut: TapShortcut | undefined): ReactNode {\n if (!shortcut) return label;\n return (\n <span className=\"matrx-tap-tooltip\">\n {label}\n <kbd className=\"matrx-tap-kbd\">{formatTapShortcut(shortcut)}</kbd>\n </span>\n );\n}\n","// src/tap-shortcut.ts — @ai-matrx/design-system/tap-shortcut\n//\n// THE ONE SHORTCUT FORMATTER, light (FB5, 2026-10-23). `formatTapShortcut` (\"mod+k\" → \"⌘K\" on Apple, \"Ctrl+K\"\n// elsewhere) is pure; it lived in tap-target's \"use client\" feature module, so a plain helper that only needed the\n// words (records-ui's table action list) had to import the whole tap-target entry and was itself stamped\n// \"use client\". This entry carries the parse and the words only — no React. `./tap-target` re-exports both.\n\n/** A keyboard shortcut, written \"mod+k\", \"shift+?\", \"alt+enter\". */\nexport type TapShortcut = string;\n\nexport interface ParsedShortcut {\n mod: boolean;\n shift: boolean;\n alt: boolean;\n key: string;\n}\n\nconst IS_APPLE =\n typeof navigator !== \"undefined\" && /Mac|iPhone|iPad|iPod/.test(navigator.platform || navigator.userAgent);\n\nexport function parseShortcut(shortcut: TapShortcut): ParsedShortcut {\n const parts = shortcut.toLowerCase().split(\"+\");\n const key = parts.pop() ?? \"\";\n return { mod: parts.includes(\"mod\"), shift: parts.includes(\"shift\"), alt: parts.includes(\"alt\"), key };\n}\n\n/** \"mod+k\" → \"⌘K\" on Apple, \"Ctrl+K\" elsewhere. */\nexport function formatTapShortcut(shortcut: TapShortcut): string {\n const p = parseShortcut(shortcut);\n const key = p.key.length === 1 ? p.key.toUpperCase() : p.key[0]!.toUpperCase() + p.key.slice(1);\n if (IS_APPLE) return `${p.alt ? \"⌥\" : \"\"}${p.shift ? \"⇧\" : \"\"}${p.mod ? \"⌘\" : \"\"}${key}`;\n return [p.mod && \"Ctrl\", p.alt && \"Alt\", p.shift && \"Shift\", key].filter(Boolean).join(\"+\");\n}\n","import type { ComponentType, ReactNode, Ref } from \"react\";\n\n/**\n * The injectable link seam — the package's replacement for the original\n * hard `next/link` import.\n *\n * Internal hrefs (anything NOT matching `http(s):`, `mailto:`, `tel:`) render\n * through the link component resolved here; external hrefs always render a\n * plain `<a target=\"_blank\" rel=\"noopener noreferrer\">`, exactly like the\n * original. When nothing is registered and no per-instance `linkComponent`\n * prop is given, internal hrefs fall back to a plain `<a>` (no prefetch, no\n * client-side routing — still a working link).\n */\nexport interface TapTargetLinkProps {\n href: string;\n target?: \"_blank\" | \"_self\" | \"_parent\" | \"_top\" | undefined;\n rel?: string | undefined;\n /** Router prefetch hint (next/link semantics). Plain `<a>` fallback ignores it. */\n prefetch?: boolean | null | undefined;\n \"aria-label\"?: string | undefined;\n /** Tooltip text drawn through `title` (the provider's title takeover). */\n title?: string | undefined;\n className?: string | undefined;\n children?: ReactNode;\n /** The trigger's ref (the development guard measures the rendered link).\n * next/link forwards it to its `<a>`. */\n ref?: Ref<HTMLAnchorElement> | undefined;\n}\n\nexport type TapTargetLinkComponent = ComponentType<TapTargetLinkProps>;\n\n/**\n * The registered component lives in a `Symbol.for` slot on `globalThis` — NOT\n * in module state — so it survives the module graph being instantiated more\n * than once: the `.` and `./buttons` dist bundles each inline the primitives\n * (tsup `splitting: false`), and a consumer may even mix `import` and\n * `require`. One registration must reach every copy.\n */\nconst LINK_SLOT = Symbol.for(\"@ai-matrx/tap-target:link-component\");\n\ntype GlobalWithLinkSlot = typeof globalThis & {\n [LINK_SLOT]?: TapTargetLinkComponent | null;\n};\n\n/**\n * Register the app's link component once at startup (e.g. `next/link`):\n *\n * ```tsx\n * import Link from \"next/link\";\n * import { setTapTargetLinkComponent } from \"@ai-matrx/tap-target\";\n * setTapTargetLinkComponent(Link);\n * ```\n *\n * Pass `null` to unregister (plain `<a>` fallback resumes).\n */\nexport function setTapTargetLinkComponent(\n component: TapTargetLinkComponent | null,\n): void {\n (globalThis as GlobalWithLinkSlot)[LINK_SLOT] = component;\n}\n\n/** The currently registered link component, or `null` when none is set. */\nexport function getTapTargetLinkComponent(): TapTargetLinkComponent | null {\n return (globalThis as GlobalWithLinkSlot)[LINK_SLOT] ?? null;\n}\n","\"use client\";\n\nimport { createContext, useContext, type ReactNode } from \"react\";\n\nimport { useTapSurface } from \"./tap-surface\";\n\n// THE PLACEMENT DEFAULT — which variant a tap button takes when its caller\n// names none. Outside a provider that is \"glass\" (the floating-bar look). A\n// host region that holds tap buttons BESIDE text (a route header's back +\n// title cell) wraps itself in <TapDefaultVariant value=\"transparent\"> so every\n// button in it matches its neighbours (rule 2, \"all glass or none\") without\n// each call site repeating variant=\"transparent\". An explicit `variant` prop\n// always wins, so a bar whose pieces are ALL glass stays glass.\n//\n// The context object lives in a `Symbol.for` slot on globalThis, like the link\n// seam: the `.` and `./buttons` dist bundles each inline this module, and a\n// provider rendered by one must reach buttons rendered by the other.\n\nexport type TapDefaultVariantValue = \"glass\" | \"transparent\";\n\nconst SLOT = Symbol.for(\"@ai-matrx/tap-target:default-variant\");\ntype GlobalWithSlot = typeof globalThis & {\n [SLOT]?: ReturnType<typeof createContext<TapDefaultVariantValue>>;\n};\n\nfunction ctx() {\n const g = globalThis as GlobalWithSlot;\n return (g[SLOT] ??= createContext<TapDefaultVariantValue>(\"glass\"));\n}\n\n/** The variant tap buttons below take when they name none. */\nexport function useTapDefaultVariant(): TapDefaultVariantValue {\n return useContext(ctx());\n}\n\n/** Set the default variant for every tap button below that names none. */\nexport function TapDefaultVariant({ value, children }: { value: TapDefaultVariantValue; children: ReactNode }) {\n const Context = ctx();\n return <Context.Provider value={value}>{children}</Context.Provider>;\n}\n\n/**\n * The variant a lone tap button draws: its explicit `variant`, else a region's\n * <TapDefaultVariant>, else — on a <TapSurface surface=\"solid\"> — \"transparent\"\n * (glass only floats), else glass. An explicit variant always wins.\n */\nexport function useTapButtonVariant<V extends string>(explicit: V | undefined): V | TapDefaultVariantValue {\n const placed = useTapDefaultVariant();\n const surface = useTapSurface(undefined);\n if (explicit !== undefined) return explicit;\n if (placed !== \"glass\") return placed;\n return surface === \"solid\" ? \"transparent\" : \"glass\";\n}\n","\"use client\";\n\nimport { forwardRef, type Ref } from \"react\";\n// The spinner loop comes from `@ai-matrx/design-system`'s motion layer — the\n// package this one already depends on — NOT from core Tailwind's\n// `animate-spin` and NOT from a keyframe copied into this package's\n// stylesheet. See the note above `LoadingTapButton`.\nimport { MOTION_SPIN } from \"../motion\";\nimport {\n TapTargetButton,\n TapTargetButtonTransparent,\n TapTargetButtonOutline,\n TapTargetButtonSolid,\n TapTargetButtonForGroup,\n} from \"./tap-target-button\";\nimport type { TapTargetLinkComponent } from \"./link\";\nimport { useTapButtonVariant } from \"./tap-default-variant\";\nimport type { TapFeatureProps, TapSolidTone } from \"./tap-features\";\n\n// ---------------------------------------------------------------------------\n// Shared types\n// ---------------------------------------------------------------------------\n\ntype Variant = \"glass\" | \"transparent\" | \"outline\" | \"solid\" | \"group\";\n\nexport interface TapButtonProps extends TapFeatureProps {\n /** Forwarded to the underlying button (Radix `asChild`, focus chains, etc.). */\n ref?: Ref<HTMLButtonElement> | undefined;\n variant?: Variant | undefined;\n onClick?: (() => void) | undefined;\n as?: \"button\" | \"label\" | undefined;\n htmlFor?: string | undefined;\n ariaLabel?: string | undefined;\n disabled?: boolean | undefined;\n tabIndex?: number | undefined;\n className?: string | undefined;\n strokeWidth?: number | undefined;\n // Solid-variant color overrides — only used when variant=\"solid\"\n bgColor?: string | undefined;\n iconColor?: string | undefined;\n hoverBgColor?: string | undefined;\n activeBgColor?: string | undefined;\n // Link support — when set, the button renders as a link or <a>.\n // Internal hrefs use the injected link component (setTapTargetLinkComponent\n // or the `linkComponent` prop; plain <a> when none is registered); external\n // (http(s)://, mailto:, tel:) use <a> with target=\"_blank\" +\n // rel=\"noopener noreferrer\" by default. Pass an explicit `target` to\n // override (works for internal links too).\n href?: string | undefined;\n target?: \"_blank\" | \"_self\" | \"_parent\" | \"_top\" | undefined;\n rel?: string | undefined;\n prefetch?: boolean | null | undefined;\n /** Per-instance link component override for internal hrefs. */\n linkComponent?: TapTargetLinkComponent | undefined;\n // Tooltip support — defaults to `ariaLabel`. Pass `false` to opt out.\n tooltip?: string | false | undefined;\n tooltipSide?: \"top\" | \"right\" | \"bottom\" | \"left\" | undefined;\n tooltipAlign?: \"start\" | \"center\" | \"end\" | undefined;\n /** Inline caption after the icon — see TapTargetButton `label`. */\n label?: string | undefined;\n /** Passthrough from AITapButtonProps / MakerTapButton — stripped before DOM. */\n colored?: boolean | undefined;\n}\n\n// ---------------------------------------------------------------------------\n// Variant resolver — maps a variant string to the correct wrapper component.\n// Runs at build/server time so there's zero client cost.\n//\n// IMPORTANT: `Wrap` MUST forward refs. The pre-composed `*TapButton` functions\n// below are plain function components (in React 19 ref is a regular prop) and\n// spread `{...props}` to `Wrap` — that spread carries ref through. `Wrap`\n// extracts ref and passes it explicitly to the underlying `forwardRef`\n// primitive. Without this, every `*TapButton` placed inside a Radix\n// `*Trigger asChild` (DropdownMenu, Popover, Tooltip, etc.) silently loses\n// the ref — the popper can't anchor and Radix's injected event handlers /\n// `data-state` / `aria-*` get dropped. (Precedent: matrx-frontend\n// `features/files/FEATURE.md`, where this pattern was established.)\n// ---------------------------------------------------------------------------\n\nconst Wrap = forwardRef<\n HTMLButtonElement,\n TapButtonProps & { children: React.ReactNode }\n>(function Wrap(\n {\n variant: variantProp,\n children,\n bgColor,\n iconColor,\n hoverBgColor,\n activeBgColor,\n // AITapButtonProps passthrough — not a DOM attribute (see ai-tap-buttons Wrap)\n colored: _colored,\n ...props\n },\n ref,\n) {\n const variant = useTapButtonVariant(variantProp);\n switch (variant) {\n case \"transparent\":\n return (\n <TapTargetButtonTransparent ref={ref} {...props}>\n {children}\n </TapTargetButtonTransparent>\n );\n case \"outline\":\n return (\n <TapTargetButtonOutline ref={ref} {...props}>\n {children}\n </TapTargetButtonOutline>\n );\n case \"solid\": {\n // On a solid button `tone` is the FILL; a glyph-only tone (\"muted\",\n // \"default\", \"info\") has no fill meaning and falls back to primary.\n const { tone, ...solidProps } = props;\n const fill: TapSolidTone | undefined =\n tone === \"primary\" || tone === \"destructive\" || tone === \"success\" || tone === \"warning\" ? tone : undefined;\n return (\n <TapTargetButtonSolid\n ref={ref}\n tone={fill}\n bgColor={bgColor}\n iconColor={iconColor}\n hoverBgColor={hoverBgColor}\n activeBgColor={activeBgColor}\n {...solidProps}\n >\n {children}\n </TapTargetButtonSolid>\n );\n }\n case \"group\":\n return (\n <TapTargetButtonForGroup ref={ref} {...props}>\n {children}\n </TapTargetButtonForGroup>\n );\n default:\n return (\n <TapTargetButton ref={ref} {...props}>\n {children}\n </TapTargetButton>\n );\n }\n});\n\n// ---------------------------------------------------------------------------\n// Pre-composed buttons — one import, one tag, zero configuration needed.\n// Default variant is \"glass\". Override with variant=\"transparent\" etc.\n// All SVG paths match lucide-react v0.577.0 exactly.\n// ---------------------------------------------------------------------------\n\n// lucide: menu (hand-crafted HeroIcons path — no Lucide equivalent, kept as-is)\nexport function MenuTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Menu\" strokeWidth={1.75} {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5\"\n />\n </Wrap>\n );\n}\n\n// lucide: plus (hand-crafted — no drift, kept as-is)\nexport function PlusTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Add\" {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M12 4.5v15m7.5-7.5h-15\"\n />\n </Wrap>\n );\n}\n\n// lucide: search → circle cx=11 cy=11 r=8 + line to 21,21\nexport function SearchTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Search\" {...props}>\n <circle cx=\"11\" cy=\"11\" r=\"8\" />\n <path d=\"m21 21-4.34-4.34\" />\n </Wrap>\n );\n}\n\n// lucide: settings (hand-crafted — kept as-is, Lucide uses \"settings-2\" pattern)\nexport function SettingsTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Settings\" {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z\"\n />\n </Wrap>\n );\n}\n\n// lucide: maximize (hand-crafted corner-arrows — kept as-is)\nexport function MaximizeTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Fullscreen\" {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15\"\n />\n </Wrap>\n );\n}\n\n// lucide: home v0.577.0 — used as the \"Hub\" (main/list) action\nexport function HomeTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Hub\" {...props}>\n <path d=\"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8\" />\n <path d=\"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z\" />\n </Wrap>\n );\n}\n\n// lucide: layout-grid v0.577.0\nexport function LayoutGridTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Card view\" {...props}>\n <rect width=\"7\" height=\"7\" x=\"3\" y=\"3\" rx=\"1\" />\n <rect width=\"7\" height=\"7\" x=\"14\" y=\"3\" rx=\"1\" />\n <rect width=\"7\" height=\"7\" x=\"14\" y=\"14\" rx=\"1\" />\n <rect width=\"7\" height=\"7\" x=\"3\" y=\"14\" rx=\"1\" />\n </Wrap>\n );\n}\n\n// lucide: list v0.577.0\nexport function ListTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Table view\" {...props}>\n <path d=\"M3 5h.01\" />\n <path d=\"M3 12h.01\" />\n <path d=\"M3 19h.01\" />\n <path d=\"M8 5h13\" />\n <path d=\"M8 12h13\" />\n <path d=\"M8 19h13\" />\n </Wrap>\n );\n}\n\n// lucide: arrow-down-up (hand-crafted — kept as-is)\nexport function ArrowDownUpTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Sort\" {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M3 4.5h14.25M3 9h9.75M3 13.5h5.25m5.25-.75L17.25 9m0 0L21 12.75M17.25 9v10.5\"\n />\n </Wrap>\n );\n}\n\n// lucide: bell v0.577.0\nexport function BellTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Notifications\" {...props}>\n <path d=\"M10.268 21a2 2 0 0 0 3.464 0\" />\n <path d=\"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326\" />\n </Wrap>\n );\n}\n\n// lucide: bell-ring v0.577.0 — animated cousin of bell, used for \"has unread\"\nexport function BellRingTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Notifications\" {...props}>\n <path d=\"M10.268 21a2 2 0 0 0 3.464 0\" />\n <path d=\"M22 8c0-2.3-.8-4.3-2-6\" />\n <path d=\"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326\" />\n <path d=\"M4 2C2.8 3.7 2 5.7 2 8\" />\n </Wrap>\n );\n}\n\n// lucide: zap v0.577.0 — lightning bolt, used as the Quick Actions trigger\nexport function ZapTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Quick actions\" {...props}>\n <path d=\"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z\" />\n </Wrap>\n );\n}\n\n// lucide: upload v0.577.0\nexport function UploadTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Upload\" {...props}>\n <path d=\"M12 3v12\" />\n <path d=\"m17 8-5-5-5 5\" />\n <path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\" />\n </Wrap>\n );\n}\n\n// lucide: download v0.577.0\nexport function DownloadTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Download\" {...props}>\n <path d=\"M12 15V3\" />\n <path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\" />\n <path d=\"m7 10 5 5 5-5\" />\n </Wrap>\n );\n}\n\n// lucide: share-2 v0.577.0\nexport function ShareTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Share\" {...props}>\n <circle cx=\"18\" cy=\"5\" r=\"3\" />\n <circle cx=\"6\" cy=\"12\" r=\"3\" />\n <circle cx=\"18\" cy=\"19\" r=\"3\" />\n <line x1=\"8.59\" x2=\"15.42\" y1=\"13.51\" y2=\"17.49\" />\n <line x1=\"15.41\" x2=\"8.59\" y1=\"6.51\" y2=\"10.49\" />\n </Wrap>\n );\n}\n\n// lucide: undo v0.577.0\nexport function UndoTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Undo\" {...props}>\n <path d=\"M3 7v6h6\" />\n <path d=\"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13\" />\n </Wrap>\n );\n}\n\n// lucide: redo v0.577.0\nexport function RedoTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Redo\" {...props}>\n <path d=\"M21 7v6h-6\" />\n <path d=\"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7\" />\n </Wrap>\n );\n}\n\n// lucide: copy v0.577.0\nexport function CopyTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Copy\" {...props}>\n <rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\" />\n <path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\" />\n </Wrap>\n );\n}\n\n// lucide: trash v0.577.0\nexport function TrashTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Delete\" {...props}>\n <path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6\" />\n <path d=\"M3 6h18\" />\n <path d=\"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\" />\n </Wrap>\n );\n}\n\n// lucide: files v0.577.0\nexport function FilesTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Copy all\" {...props}>\n <path d=\"M20 7h-3a2 2 0 0 1-2-2V2\" />\n <path d=\"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z\" />\n <path d=\"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8\" />\n </Wrap>\n );\n}\n\n// lucide: chevron-left v0.577.0 — arms extended from 6 to 7 (45° kept) for a\n// slightly larger glyph that better fills the 32px inner pill.\nexport function ChevronLeftTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Back\" {...props}>\n <path d=\"m16 19-7-7 7-7\" />\n </Wrap>\n );\n}\n\n// lucide: chevron-right v0.577.0\nexport function ChevronRightTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Next\" {...props}>\n <path d=\"m9 18 6-6-6-6\" />\n </Wrap>\n );\n}\n\n// lucide: panel-left v0.577.0\nexport function PanelLeftTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Toggle sidebar\" {...props}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M9 3v18\" />\n </Wrap>\n );\n}\n\n// lucide: panel-right v0.577.0\nexport function PanelRightTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Toggle sidebar\" {...props}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M15 3v18\" />\n </Wrap>\n );\n}\n\n// lucide: square-pen v0.577.0\nexport function SquarePenTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"New chat\" {...props}>\n <path d=\"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\" />\n <path d=\"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z\" />\n </Wrap>\n );\n}\n\n// lucide: x v0.577.0\nexport function XTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Close\" {...props}>\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </Wrap>\n );\n}\n\n// lucide: funnel v0.577.0 (filter is an alias for funnel in this version)\nexport function FilterTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Filter\" {...props}>\n <path d=\"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z\" />\n </Wrap>\n );\n}\n\n// lucide: play v0.577.0\nexport function PlayTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Play\" {...props}>\n <path d=\"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z\" />\n </Wrap>\n );\n}\n\n// lucide: pause v0.577.0 — two rects (redesigned from bar paths)\nexport function PauseTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Pause\" {...props}>\n <rect x=\"14\" y=\"3\" width=\"5\" height=\"18\" rx=\"1\" />\n <rect x=\"5\" y=\"3\" width=\"5\" height=\"18\" rx=\"1\" />\n </Wrap>\n );\n}\n\n// lucide: square v0.577.0 (stop uses filled square)\nexport function StopTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Stop\" {...props}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n </Wrap>\n );\n}\n\n// lucide: volume-2 v0.577.0\nexport function Volume2TapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Speaker\" {...props}>\n <path d=\"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z\" />\n <path d=\"M16 9a5 5 0 0 1 0 6\" />\n <path d=\"M19.364 18.364a9 9 0 0 0 0-12.728\" />\n </Wrap>\n );\n}\n\n// lucide: arrow-up v0.577.0\nexport function ArrowUpTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Send\" {...props}>\n <path d=\"m5 12 7-7 7 7\" />\n <path d=\"M12 19V5\" />\n </Wrap>\n );\n}\n\n// lucide: mic v0.577.0\nexport function MicTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Start recording\" {...props}>\n <path d=\"M12 19v3\" />\n <path d=\"M19 10v2a7 7 0 0 1-14 0v-2\" />\n <rect x=\"9\" y=\"2\" width=\"6\" height=\"13\" rx=\"3\" />\n </Wrap>\n );\n}\n\n// lucide: mic-off v0.577.0\nexport function MicOffTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Stop recording\" {...props}>\n <path d=\"M12 19v3\" />\n <path d=\"M15 9.34V5a3 3 0 0 0-5.68-1.33\" />\n <path d=\"M16.95 16.95A7 7 0 0 1 5 12v-2\" />\n <path d=\"M18.89 13.23A7 7 0 0 0 19 12v-2\" />\n <path d=\"m2 2 20 20\" />\n <path d=\"M9 9v3a3 3 0 0 0 5.12 2.12\" />\n </Wrap>\n );\n}\n\n// lucide: triangle-alert v0.577.0\nexport function TriangleAlertTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Alert\" {...props}>\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\" />\n <path d=\"M12 9v4\" />\n <path d=\"M12 17h.01\" />\n </Wrap>\n );\n}\n\n// lucide: shield-check (context set)\nexport function ShieldCheckTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Context set\" {...props}>\n <path d=\"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\" />\n <path d=\"m9 12 2 2 4-4\" />\n </Wrap>\n );\n}\n\n// lucide: shield-alert (context unset)\nexport function ShieldAlertTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"No context\" {...props}>\n <path d=\"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\" />\n <path d=\"M12 8v4\" />\n <path d=\"M12 16h.01\" />\n </Wrap>\n );\n}\n\n// lucide: bug v0.577.0 (major update — full insect anatomy)\nexport function BugTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Debug\" {...props}>\n <path d=\"M12 20v-9\" />\n <path d=\"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z\" />\n <path d=\"M14.12 3.88 16 2\" />\n <path d=\"M21 21a4 4 0 0 0-3.81-4\" />\n <path d=\"M21 5a4 4 0 0 1-3.55 3.97\" />\n <path d=\"M22 13h-4\" />\n <path d=\"M3 21a4 4 0 0 1 3.81-4\" />\n <path d=\"M3 5a4 4 0 0 0 3.55 3.97\" />\n <path d=\"M6 13H2\" />\n <path d=\"m8 2 1.88 1.88\" />\n <path d=\"M9 7.13V6a3 3 0 1 1 6 0v1.13\" />\n </Wrap>\n );\n}\n\n// lucide: settings-2 v0.577.0 (gear + center circle — kept as-is, matches intent)\nexport function Settings2TapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Settings\" {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z\"\n />\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M15 12a3 3 0 11-6 0 3 3 0 016 0z\"\n />\n </Wrap>\n );\n}\n\n// lucide: save (hand-crafted floppy disk — no direct Lucide equivalent, kept as-is)\nexport function SaveTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Save\" {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M4.5 6a2 2 0 012-2h9.25L20.5 9v9a2 2 0 01-2 2h-12a2 2 0 01-2-2V6z\"\n />\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M8.5 4v4.5a.5.5 0 00.5.5h6a.5.5 0 00.5-.5V4\"\n />\n <rect\n x=\"8\"\n y=\"14\"\n width=\"8\"\n height=\"5.5\"\n rx=\"0.5\"\n strokeLinejoin=\"round\"\n />\n </Wrap>\n );\n}\n\n// lucide: send v0.577.0 (paper-airplane redesign)\nexport function SendTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Send\" {...props}>\n <path d=\"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z\" />\n <path d=\"m21.854 2.147-10.94 10.939\" />\n </Wrap>\n );\n}\n\n// lucide: message-square v0.577.0\nexport function MessageTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Message\" {...props}>\n <path d=\"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z\" />\n </Wrap>\n );\n}\n\n// lucide: variable v0.577.0 (major update — uses line elements + bracket paths)\nexport function VariableTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Variable\" {...props}>\n <path d=\"M8 21s-4-3-4-9 4-9 4-9\" />\n <path d=\"M16 3s4 3 4 9-4 9-4 9\" />\n <line x1=\"15\" x2=\"9\" y1=\"9\" y2=\"15\" />\n <line x1=\"9\" x2=\"15\" y1=\"9\" y2=\"15\" />\n </Wrap>\n );\n}\n\n// lucide: wrench v0.577.0 (single clean path)\nexport function WrenchTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Tool\" {...props}>\n <path d=\"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z\" />\n </Wrap>\n );\n}\n\n// lucide: command v0.577.0 (single continuous path)\nexport function CommandTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Command\" {...props}>\n <path d=\"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3\" />\n </Wrap>\n );\n}\n\n// lucide: terminal v0.577.0 (two paths: chevron + underline)\nexport function TerminalTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Terminal\" {...props}>\n <path d=\"M12 19h8\" />\n <path d=\"m4 17 6-6-6-6\" />\n </Wrap>\n );\n}\n\n// lucide: test-tube v0.577.0 (3 clean paths)\nexport function TestTubeTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Test\" {...props}>\n <path d=\"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2\" />\n <path d=\"M8.5 2h7\" />\n <path d=\"M14.5 16h-5\" />\n </Wrap>\n );\n}\n\n// lucide: rotate-ccw v0.577.0 (same shape as history minus the clock hand — used for Reset)\nexport function ResetTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Reset\" {...props}>\n <path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\" />\n <path d=\"M3 3v5h5\" />\n </Wrap>\n );\n}\n\n// lucide: eraser v0.577.0 (major update — proper eraser shape)\nexport function ClearTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Clear\" {...props}>\n <path d=\"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21\" />\n <path d=\"m5.082 11.09 8.828 8.828\" />\n </Wrap>\n );\n}\n\n// lucide: refresh-cw v1.22.0 (dual arrows — was a broken hand-crafted Heroicons-style path)\nexport function RetryTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Retry\" {...props}>\n <path d=\"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8\" />\n <path d=\"M21 3v5h-5\" />\n <path d=\"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16\" />\n <path d=\"M8 16H3v5\" />\n </Wrap>\n );\n}\n\n/** Alias — same Lucide refresh-cw glyph as RetryTapButton. */\nexport function RefreshCwTapButton(props: TapButtonProps) {\n return <RetryTapButton ariaLabel=\"Refresh\" {...props} />;\n}\n\n// lucide: loading spinner (custom animated — no Lucide equivalent)\n//\n// 🚨 `matrx-spin`, NEVER `animate-spin` (census row 19i, closed here at 0.2.1).\n// `animate-spin` is a core Tailwind utility, so it happened to survive in all\n// four current consumers — but a package cannot ship a class it does not\n// define: the first host without Tailwind's core animate utilities gets a\n// spinner that does not spin, which is a load-bearing lie (it says the work\n// has stopped) with no error to find it by. `matrx-spin` is design-system\n// 0.10.0's own keyframe + rule, shipped in ITS `styles.css` and asserted\n// present in ITS packed tarball. This package IMPORTS that contract (the\n// exported `MOTION_SPIN` constant, and `styles.css` `@import`s the sheet) —\n// it does not copy the keyframe, which would be a twin of exactly the kind\n// this row exists to kill. Under `prefers-reduced-motion` the shared rule\n// SLOWS the loop instead of stopping it, because a stopped spinner removes\n// information rather than motion.\nexport function LoadingTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Loading\" {...props}>\n <circle\n className={MOTION_SPIN}\n cx=\"12\"\n cy=\"12\"\n r=\"9\"\n strokeDasharray=\"28.27\"\n strokeDashoffset=\"9\"\n strokeLinecap=\"round\"\n style={{ transformOrigin: \"12px 12px\" }}\n />\n </Wrap>\n );\n}\n\n// lucide: bot/robot (hand-crafted — kept as-is)\nexport function RobotTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"AI Agent\" {...props}>\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M9 3.75H6.912a2.25 2.25 0 00-2.15 1.588L2.35 13.177a2.25 2.25 0 00-.1.661V18a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18v-4.162c0-.224-.034-.447-.1-.661L19.24 5.338a2.25 2.25 0 00-2.15-1.588H15M2.25 13.5h3.86a2.25 2.25 0 012.012 1.244l.256.512a2.25 2.25 0 002.013 1.244h3.218a2.25 2.25 0 002.013-1.244l.256-.512a2.25 2.25 0 012.013-1.244h3.859M12 3v8.25m0 0-3-3m3 3 3-3\"\n />\n </Wrap>\n );\n}\n\n// lucide: webhook v0.577.0\nexport function WebhookTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Webhook\" {...props}>\n <path d=\"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2\" />\n <path d=\"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06\" />\n <path d=\"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8\" />\n </Wrap>\n );\n}\n\n// lucide: eye v0.577.0\nexport function ViewTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"View\" {...props}>\n <path d=\"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0\" />\n <circle cx=\"12\" cy=\"12\" r=\"3\" />\n </Wrap>\n );\n}\n\n// lucide: hammer v0.577.0\nexport function BuildTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Build\" {...props}>\n <path d=\"m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9\" />\n <path d=\"m18 15 4-4\" />\n <path d=\"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5\" />\n </Wrap>\n );\n}\n\n// lucide: play v0.577.0 (alias for Run context)\nexport function RunTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Run\" {...props}>\n <path d=\"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z\" />\n </Wrap>\n );\n}\n\n// lucide: history v0.577.0\nexport function HistoryTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"History\" {...props}>\n <path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\" />\n <path d=\"M3 3v5h5\" />\n <path d=\"M12 7v5l4 2\" />\n </Wrap>\n );\n}\n\n// lucide: paperclip v0.577.0\nexport function PaperclipTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Attach file\" {...props}>\n <path d=\"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551\" />\n </Wrap>\n );\n}\n\n// lucide: thumbs-up v0.577.0\nexport function ThumbsUpTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Like\" {...props}>\n <path d=\"M7 10v12\" />\n <path d=\"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z\" />\n </Wrap>\n );\n}\n\n// lucide: thumbs-down v0.577.0\nexport function ThumbsDownTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Dislike\" {...props}>\n <path d=\"M17 14V2\" />\n <path d=\"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z\" />\n </Wrap>\n );\n}\n\n// lucide: check v0.577.0\nexport function CheckTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Done\" {...props}>\n <path d=\"M20 6 9 17l-5-5\" />\n </Wrap>\n );\n}\n\n// lucide: pencil v0.577.0\nexport function PencilTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Edit\" {...props}>\n <path d=\"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z\" />\n <path d=\"m15 5 4 4\" />\n </Wrap>\n );\n}\n\n// lucide: ellipsis (more-horizontal) v0.577.0\nexport function MoreHorizontalTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"More options\" {...props}>\n <circle cx=\"12\" cy=\"12\" r=\"1\" />\n <circle cx=\"19\" cy=\"12\" r=\"1\" />\n <circle cx=\"5\" cy=\"12\" r=\"1\" />\n </Wrap>\n );\n}\n\n// lucide: check-square v0.577.0\nexport function CheckSquareTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Task\" {...props}>\n <path d=\"m9 11 3 3L22 4\" />\n <path d=\"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11\" />\n </Wrap>\n );\n}\n\n// lucide: ghost v0.577.0\nexport function GhostTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Incognito chat\" {...props}>\n <path d=\"M9 10h.01\" />\n <path d=\"M15 10h.01\" />\n <path d=\"M12 2a8 8 0 0 0-8 8v12l3-3 2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8z\" />\n </Wrap>\n );\n}\n\n// lucide: link (chain link — used for \"attach to task\") v0.577.0\nexport function LinkTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Attach\" {...props}>\n <path d=\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\" />\n <path d=\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\" />\n </Wrap>\n );\n}\n\n// lucide: external-link v0.577.0\nexport function ExternalLinkTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Open source\" {...props}>\n <path d=\"M15 3h6v6\" />\n <path d=\"M10 14 21 3\" />\n <path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\" />\n </Wrap>\n );\n}\n\n// lucide: clipboard-list v0.577.0\nexport function ClipboardListTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Copy Pages\" {...props}>\n <rect width=\"8\" height=\"4\" x=\"8\" y=\"2\" rx=\"1\" ry=\"1\" />\n <path d=\"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2\" />\n <path d=\"M12 11h4\" />\n <path d=\"M12 16h4\" />\n <path d=\"M8 11h.01\" />\n <path d=\"M8 16h.01\" />\n </Wrap>\n );\n}\n\n// lucide: party-popper v0.577.0\nexport function PartyPopperTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"AI Clean\" {...props}>\n <path d=\"M5.8 11.3 2 22l10.7-3.79\" />\n <path d=\"M4 3h.01\" />\n <path d=\"M22 8h.01\" />\n <path d=\"M15 2h.01\" />\n <path d=\"M22 20h.01\" />\n <path d=\"m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10\" />\n <path d=\"m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11c-.11.7-.72 1.22-1.43 1.22H17\" />\n <path d=\"m11 2 .33.82c.34.86-.2 1.82-1.11 1.98C9.52 4.9 9 5.52 9 6.23V7\" />\n <path d=\"M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z\" />\n </Wrap>\n );\n}\n\n// lucide: layers v0.577.0 — \"this PDF everywhere\" surface switcher\nexport function LayersTapButton(props: TapButtonProps) {\n return (\n <Wrap ariaLabel=\"Open this PDF in another surface\" {...props}>\n <path d=\"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z\" />\n <path d=\"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12\" />\n <path d=\"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17\" />\n </Wrap>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,IAAAA,gBA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AK,eAAc,SAAQ,gBAAe,SAAQ,GAAE,UAAS;AAAA,IAC9D;AAAA,MAAC;AAAA;AAAA,QACC,eAAc;AAAA,QACd,gBAAe;AAAA,QACf,GAAE;AAAA,QACF,GAAE;AAAA,QACF,OAAM;AAAA,QACN,QAAO;AAAA,QACP,IAAG;AAAA;AAAA,IACL;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,eAAc;AAAA,QACd,gBAAe;AAAA,QACf,GAAE;AAAA,QACF,GAAE;AAAA,QACF,OAAM;AAAA,QACN,QAAO;AAAA,QACP,IAAG;AAAA;AAAA,IACL;AAAA,KACF;AAEJ;AAQA,IAAM,yBAA4D;AAAA,EAChE,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AAAA,EACP,KAAK;AAAA,EACL,MAAM;AAAA,EACN,UAAU;AAAA,EACV,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,aAAa;AAAA,EACb,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AAAA,EACV,WAAW;AAAA,EACX,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,WAAW;AAAA,EACX,UAAU;AAAA,EACV,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,KAAK;AAAA,EACL,KAAK;AAAA,EACL,OAAO;AAAA,EACP,KAAK;AACP;AAEO,SAAS,uBAAuB,SAAoC;AACzE,SAAO,uBAAuB,OAAO,KAAK,uBAAuB;AACnE;","names":["import_react","React","import_jsx_runtime","import_react","import_jsx_runtime","import_react","import_jsx_runtime","import_jsx_runtime","tooltipSide","TapTargetButton","TapTargetButtonTransparent","TapTargetButtonOutline","TapTargetButtonSolid","TapTargetButtonDestructive","TapTargetButtonForGroup","import_react","import_jsx_runtime","SLOT","import_react","import_jsx_runtime","Wrap","import_jsx_runtime","Wrap","tooltipSide"]}