@hoardodile/ui 0.1.2 → 0.1.4

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 (38) hide show
  1. package/dist/components/plugin-download-consent.d.ts +8 -0
  2. package/dist/components/plugin-download-consent.js +2 -0
  3. package/dist/components/plugin-download-consent.js.map +1 -1
  4. package/dist/components/popover.d.ts +10 -1
  5. package/dist/components/popover.js +9 -0
  6. package/dist/components/popover.js.map +1 -1
  7. package/dist/components/preview-card.d.ts +14 -0
  8. package/dist/components/preview-card.js +102 -0
  9. package/dist/components/preview-card.js.map +1 -0
  10. package/dist/components/special-tag-surface.d.ts +36 -0
  11. package/dist/components/special-tag-surface.js +533 -0
  12. package/dist/components/special-tag-surface.js.map +1 -0
  13. package/dist/components/tag-chip.d.ts +87 -0
  14. package/dist/components/tag-chip.js +713 -0
  15. package/dist/components/tag-chip.js.map +1 -0
  16. package/dist/lib/colors.d.ts +33 -0
  17. package/dist/lib/colors.js +65 -0
  18. package/dist/lib/colors.js.map +1 -0
  19. package/dist/lib/tag-surface.d.ts +22 -0
  20. package/dist/lib/tag-surface.js +615 -0
  21. package/dist/lib/tag-surface.js.map +1 -0
  22. package/package.json +2 -2
  23. package/src/components/plugin-download-consent.test.tsx +13 -0
  24. package/src/components/plugin-download-consent.tsx +10 -0
  25. package/src/components/popover.tsx +21 -0
  26. package/src/components/preview-card.tsx +100 -0
  27. package/src/components/special/gold.tsx +73 -0
  28. package/src/components/special/kintsugi.tsx +143 -0
  29. package/src/components/special/oilslick.tsx +138 -0
  30. package/src/components/special/rainbow.tsx +63 -0
  31. package/src/components/special/silver.tsx +73 -0
  32. package/src/components/special/types.ts +21 -0
  33. package/src/components/special-tag-surface.tsx +53 -0
  34. package/src/components/tag-chip.test.tsx +180 -0
  35. package/src/components/tag-chip.tsx +221 -0
  36. package/src/lib/colors.test.ts +94 -0
  37. package/src/lib/colors.ts +96 -0
  38. package/src/lib/tag-surface.ts +71 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/merge-config.ts","../../src/lib/utils.ts","../../src/components/special/gold.tsx","../../src/components/special/kintsugi.tsx","../../src/components/special/oilslick.tsx","../../src/components/special/rainbow.tsx","../../src/components/special/silver.tsx","../../src/components/special-tag-surface.tsx","../../src/lib/colors.ts","../../src/lib/tag-surface.ts"],"names":["jsx","jsxs"],"mappings":";;;;;;AAQO,IAAM,UAAA,GAAa;AAAA,EACzB,MAAM,CAAC,MAAA,EAAQ,MAAM,KAAA,EAAO,WAAA,EAAa,eAAe,OAAO,CAAA;AAAA,EAC/D,SAAS,CAAC,MAAA,EAAQ,SAAA,EAAW,KAAA,EAAO,WAAW,OAAO,CAAA;AAAA,EACtD,QAAA,EAAU,CAAC,OAAO,CAAA;AAAA,EAClB,MAAA,EAAQ,CAAC,MAAA,EAAQ,QAAQ,CAAA;AAAA,EACzB,SAAA,EAAW,CAAC,SAAA,EAAW,QAAA,EAAU,SAAS,CAAA;AAAA,EAC1C,IAAA,EAAM,CAAC,KAAA,EAAO,SAAS,CAAA;AAAA,EACvB,IAAA,EAAM,CAAC,UAAU,CAAA;AAAA,EACjB,OAAA,EAAS,CAAC,MAAA,EAAQ,KAAK;AACxB,CAAA;AAEO,IAAM,UAAU,mBAAA,CAAoB;AAAA,EAC1C,MAAA,EAAQ,EAAE,KAAA,EAAO,UAAA;AAClB,CAAC,CAAA;;;AClBM,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACDA,SAAS,WAAA,CAAY;AAAA,EACpB,EAAA;AAAA,EACA;AACD,CAAA,EAGG;AACF,EAAA,MAAM,UAAA,GAAa,GAAG,EAAE,CAAA,cAAA,CAAA;AACxB,EAAA,uBACC,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACA,SAAA,EAAW,EAAA;AAAA,QACV,WAAA;AAAA,QACA,CAAC,MAAA,IACA;AA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,EAAI;AACjB,IAAA,OAAO,MAAA,GACJ;AAAA,MACA,SAAA,EAAW,wDAAA;AAAA,MACX,KAAA,EAAO,MAAA;AAAA,MACP,OAAA,EAAS;AAAA,KACV,GACC;AAAA,MACA,SAAA,EAAW,0CAAA;AAAA,MACX,KAAA,EAAO,MAAA;AAAA,MACP,OAAA,EAAS;AAAA,KACV;AAAA,EACH;AAEA,EAAA,MAAM,UAAA,GAAa,qBAAqB,KAAK,CAAA;AAC7C,EAAA,OAAO;AAAA,IACN,SAAA,EAAW,2CAAA;AAAA,IACX,KAAA,EAAO;AAAA,MACN,CAAC,WAAqB,GAAG,MAAA,GAAS,UAAA,CAAW,UAAU,UAAA,CAAW,MAAA;AAAA,MAClE,CAAC,iBAA2B,GAAG,UAAA,CAAW,OAAA;AAAA,MAC1C,OAAO,UAAA,CAAW;AAAA,KACnB;AAAA,IACA,OAAA,EAAS;AAAA,GACV;AACD","file":"tag-surface.js","sourcesContent":["import { extendTailwindMerge } from \"tailwind-merge\"\n\n// The app's `@theme inline` tokens (theme.css) generate utility names\n// tailwind-merge doesn't know, so it misclassifies them — e.g. `text-ui` is\n// parsed as a text color and dropped next to any `text-*` color. The default\n// class groups are theme-backed, so extending the theme (keys mirror the v4\n// token namespaces one-to-one) registers every custom utility with correct\n// conflict semantics. merge-config.test.ts pins this list against theme.css.\nexport const mergeTheme = {\n\ttext: [\"tiny\", \"ui\", \"doc\", \"doc-title\", \"doc-heading\", \"quote\"],\n\tspacing: [\"chip\", \"control\", \"nav\", \"sidebar\", \"panel\"],\n\ttracking: [\"label\"],\n\tshadow: [\"card\", \"dialog\"],\n\tcontainer: [\"reading\", \"medium\", \"content\"],\n\tfont: [\"doc\", \"heading\"],\n\tease: [\"standard\"],\n\tanimate: [\"skel\", \"pop\"],\n} as const\n\nexport const twMerge = extendTailwindMerge({\n\textend: { theme: mergeTheme },\n})\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"./merge-config\"\n\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs))\n}\n","import { cn } from \"@hoardodile/ui/lib/utils\"\n\nimport type { SpecialTagStyleConfig } from \"./types\"\n\nfunction GoldSurface({\n\tid,\n\tactive,\n}: {\n\treadonly id: string\n\treadonly active?: boolean\n}) {\n\tconst gradientId = `${id}-gold-gradient`\n\treturn (\n\t\t<svg\n\t\t\tclassName={cn(\n\t\t\t\t\"size-full\",\n\t\t\t\t!active &&\n\t\t\t\t\t\"[filter:brightness(1.1)] group-hover:[filter:brightness(1.16)]\",\n\t\t\t)}\n\t\t\twidth=\"100%\"\n\t\t\theight=\"100%\"\n\t\t\tviewBox=\"0 0 100 100\"\n\t\t\tpreserveAspectRatio=\"none\"\n\t\t>\n\t\t\t<defs>\n\t\t\t\t<linearGradient\n\t\t\t\t\tid={gradientId}\n\t\t\t\t\tx1=\"0%\"\n\t\t\t\t\ty1=\"0%\"\n\t\t\t\t\tx2=\"100%\"\n\t\t\t\t\ty2=\"0%\"\n\t\t\t\t\tgradientTransform=\"rotate(30, 0.5, 0.5)\"\n\t\t\t\t>\n\t\t\t\t\t<stop offset=\"10%\" stopColor=\"#daa520\" />\n\t\t\t\t\t<stop offset=\"30%\" stopColor=\"#ffd700\" />\n\t\t\t\t\t<stop offset=\"50%\" stopColor=\"#f0e68c\" />\n\t\t\t\t\t<stop offset=\"70%\" stopColor=\"#ffd700\" />\n\t\t\t\t\t<stop offset=\"90%\" stopColor=\"#daa520\" />\n\t\t\t\t</linearGradient>\n\t\t\t</defs>\n\t\t\t<rect\n\t\t\t\twidth=\"100\"\n\t\t\t\theight=\"100\"\n\t\t\t\tfill={active ? \"#8a6d1f\" : `url(#${gradientId})`}\n\t\t\t/>\n\t\t\t{!active && (\n\t\t\t\t<rect\n\t\t\t\t\tx=\"0\"\n\t\t\t\t\ty=\"0\"\n\t\t\t\t\twidth=\"100\"\n\t\t\t\t\theight=\"8\"\n\t\t\t\t\tfill=\"#ffffff\"\n\t\t\t\t\topacity=\"0.12\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t</svg>\n\t)\n}\n\nexport const goldConfig: SpecialTagStyleConfig = {\n\trender: GoldSurface,\n\tdefault: {\n\t\tstyle: {\n\t\t\tcolor: \"#725603\",\n\t\t\tboxShadow: \"inset 0 0 0 1px rgba(114, 86, 3, 0.2)\",\n\t\t},\n\t},\n\tactive: {\n\t\tstyle: {\n\t\t\tcolor: \"#ffffff\",\n\t\t},\n\t},\n}\n","import { cn } from \"@hoardodile/ui/lib/utils\"\n\nimport type { SpecialTagStyleConfig } from \"./types\"\n\nfunction KintsugiSurface({\n\tid,\n\tactive,\n}: {\n\treadonly id: string\n\treadonly active?: boolean\n}) {\n\tif (active) {\n\t\treturn (\n\t\t\t<svg\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"size-full\",\n\t\t\t\t\t!active &&\n\t\t\t\t\t\t\"[filter:brightness(1.02)] group-hover:[filter:brightness(1.06)]\",\n\t\t\t\t)}\n\t\t\t\twidth=\"100%\"\n\t\t\t\theight=\"100%\"\n\t\t\t\tviewBox=\"0 0 100 100\"\n\t\t\t\tpreserveAspectRatio=\"none\"\n\t\t\t>\n\t\t\t\t<rect width=\"100\" height=\"100\" fill=\"#9a9a8a\" />\n\t\t\t</svg>\n\t\t)\n\t}\n\n\tconst goldGradientId = `${id}-kintsugi-gold`\n\n\treturn (\n\t\t<svg\n\t\t\tclassName={cn(\n\t\t\t\t\"size-full\",\n\t\t\t\t!active &&\n\t\t\t\t\t\"[filter:brightness(1.02)] group-hover:[filter:brightness(1.06)]\",\n\t\t\t)}\n\t\t\twidth=\"100%\"\n\t\t\theight=\"100%\"\n\t\t\tviewBox=\"0 0 100 100\"\n\t\t\tpreserveAspectRatio=\"none\"\n\t\t>\n\t\t\t<style>{`\n\t\t\t\t@keyframes ${id}-gold-shimmer {\n\t\t\t\t\t0% { stroke-dashoffset: 60; }\n\t\t\t\t\t100% { stroke-dashoffset: 0; }\n\t\t\t\t}\n\t\t\t\t.${id}-gold-vein {\n\t\t\t\t\tstroke-dasharray: 30 30;\n\t\t\t\t\tanimation: ${id}-gold-shimmer 5s linear infinite;\n\t\t\t\t}\n\t\t\t\t@media (prefers-reduced-motion: reduce) {\n\t\t\t\t\t.${id}-gold-vein {\n\t\t\t\t\t\tanimation: none;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t`}</style>\n\n\t\t\t<defs>\n\t\t\t\t<linearGradient id={goldGradientId} x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"100%\">\n\t\t\t\t\t<stop offset=\"0%\" stopColor=\"#b8860b\" />\n\t\t\t\t\t<stop offset=\"35%\" stopColor=\"#ffd700\" />\n\t\t\t\t\t<stop offset=\"50%\" stopColor=\"#fffacd\" />\n\t\t\t\t\t<stop offset=\"65%\" stopColor=\"#ffd700\" />\n\t\t\t\t\t<stop offset=\"100%\" stopColor=\"#b8860b\" />\n\t\t\t\t</linearGradient>\n\t\t\t</defs>\n\n\t\t\t{/* Celadon/cream ceramic base */}\n\t\t\t<rect width=\"100\" height=\"100\" fill=\"#d8d4c5\" />\n\t\t\t<rect width=\"100\" height=\"100\" fill=\"#b8c4b8\" opacity=\"0.35\" />\n\n\t\t\t{/* Subtle surface texture */}\n\t\t\t<ellipse cx=\"30\" cy=\"25\" rx=\"40\" ry=\"25\" fill=\"#ffffff\" opacity=\"0.08\" />\n\t\t\t<ellipse cx=\"75\" cy=\"70\" rx=\"35\" ry=\"28\" fill=\"#000000\" opacity=\"0.04\" />\n\n\t\t\t{/* Crack lines (dark) */}\n\t\t\t<path\n\t\t\t\td=\"M 5 20 Q 25 22 35 45 T 60 80\"\n\t\t\t\tfill=\"none\"\n\t\t\t\tstroke=\"#5a5650\"\n\t\t\t\tstrokeWidth=\"0.7\"\n\t\t\t\topacity=\"0.45\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M 80 10 Q 70 35 85 55 T 55 95\"\n\t\t\t\tfill=\"none\"\n\t\t\t\tstroke=\"#5a5650\"\n\t\t\t\tstrokeWidth=\"0.6\"\n\t\t\t\topacity=\"0.40\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M 10 70 Q 30 68 45 55 T 75 45\"\n\t\t\t\tfill=\"none\"\n\t\t\t\tstroke=\"#5a5650\"\n\t\t\t\tstrokeWidth=\"0.5\"\n\t\t\t\topacity=\"0.38\"\n\t\t\t/>\n\n\t\t\t{/* Gold repair veins */}\n\t\t\t<path\n\t\t\t\tclassName={`${id}-gold-vein`}\n\t\t\t\td=\"M 4 18 Q 24 20 34 43 T 58 78\"\n\t\t\t\tfill=\"none\"\n\t\t\t\tstroke={`url(#${goldGradientId})`}\n\t\t\t\tstrokeWidth=\"1.4\"\n\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\tclassName={`${id}-gold-vein`}\n\t\t\t\td=\"M 82 8 Q 72 33 87 53 T 53 93\"\n\t\t\t\tfill=\"none\"\n\t\t\t\tstroke={`url(#${goldGradientId})`}\n\t\t\t\tstrokeWidth=\"1.2\"\n\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\tclassName={`${id}-gold-vein`}\n\t\t\t\td=\"M 8 68 Q 28 66 43 53 T 73 43\"\n\t\t\t\tfill=\"none\"\n\t\t\t\tstroke={`url(#${goldGradientId})`}\n\t\t\t\tstrokeWidth=\"1.0\"\n\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t/>\n\t\t</svg>\n\t)\n}\n\nexport const kintsugiConfig: SpecialTagStyleConfig = {\n\trender: KintsugiSurface,\n\tdefault: {\n\t\tstyle: {\n\t\t\tcolor: \"#4a4030\",\n\t\t\tboxShadow: \"inset 0 0 0 1px rgba(74, 64, 48, 0.12)\",\n\t\t},\n\t},\n\tactive: {\n\t\tstyle: {\n\t\t\tcolor: \"#ffffff\",\n\t\t},\n\t},\n}\n","import { cn } from \"@hoardodile/ui/lib/utils\"\n\nimport type { SpecialTagStyleConfig } from \"./types\"\n\nfunction OilslickSurface({\n\tid,\n\tactive,\n}: {\n\treadonly id: string\n\treadonly active?: boolean\n}) {\n\tif (active) {\n\t\treturn (\n\t\t\t<svg\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"size-full\",\n\t\t\t\t\t!active &&\n\t\t\t\t\t\t\"[filter:saturate(1.15)] group-hover:[filter:saturate(1.3)_brightness(1.08)]\",\n\t\t\t\t)}\n\t\t\t\twidth=\"100%\"\n\t\t\t\theight=\"100%\"\n\t\t\t\tviewBox=\"0 0 100 100\"\n\t\t\t\tpreserveAspectRatio=\"none\"\n\t\t\t>\n\t\t\t\t<rect width=\"100\" height=\"100\" fill=\"#1a1a2e\" />\n\t\t\t</svg>\n\t\t)\n\t}\n\n\tconst gradientA = `${id}-oilslick-a`\n\tconst gradientB = `${id}-oilslick-b`\n\tconst gradientC = `${id}-oilslick-c`\n\n\treturn (\n\t\t<svg\n\t\t\tclassName={cn(\n\t\t\t\t\"size-full\",\n\t\t\t\t!active &&\n\t\t\t\t\t\"[filter:saturate(1.15)] group-hover:[filter:saturate(1.3)_brightness(1.08)]\",\n\t\t\t)}\n\t\t\twidth=\"100%\"\n\t\t\theight=\"100%\"\n\t\t\tviewBox=\"0 0 100 100\"\n\t\t\tpreserveAspectRatio=\"none\"\n\t\t>\n\t\t\t<defs>\n\t\t\t\t<radialGradient id={gradientA} cx=\"30%\" cy=\"30%\" r=\"70%\">\n\t\t\t\t\t<stop offset=\"0%\" stopColor=\"#8b5cf6\">\n\t\t\t\t\t\t<animate\n\t\t\t\t\t\t\tattributeName=\"stop-color\"\n\t\t\t\t\t\t\tvalues=\"#8b5cf6;#06b6d4;#8b5cf6\"\n\t\t\t\t\t\t\tdur=\"8s\"\n\t\t\t\t\t\t\trepeatCount=\"indefinite\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</stop>\n\t\t\t\t\t<stop offset=\"60%\" stopColor=\"#1e1b4b\" stopOpacity=\"0.9\" />\n\t\t\t\t\t<stop offset=\"100%\" stopColor=\"#0f0f1a\" stopOpacity=\"0\" />\n\t\t\t\t</radialGradient>\n\t\t\t\t<radialGradient id={gradientB} cx=\"70%\" cy=\"60%\" r=\"60%\">\n\t\t\t\t\t<stop offset=\"0%\" stopColor=\"#10b981\">\n\t\t\t\t\t\t<animate\n\t\t\t\t\t\t\tattributeName=\"stop-color\"\n\t\t\t\t\t\t\tvalues=\"#10b981;#f59e0b;#ec4899;#10b981\"\n\t\t\t\t\t\t\tdur=\"10s\"\n\t\t\t\t\t\t\trepeatCount=\"indefinite\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</stop>\n\t\t\t\t\t<stop offset=\"55%\" stopColor=\"#1e1b4b\" stopOpacity=\"0.8\" />\n\t\t\t\t\t<stop offset=\"100%\" stopColor=\"#0f0f1a\" stopOpacity=\"0\" />\n\t\t\t\t</radialGradient>\n\t\t\t\t<radialGradient id={gradientC} cx=\"50%\" cy=\"80%\" r=\"55%\">\n\t\t\t\t\t<stop offset=\"0%\" stopColor=\"#ec4899\">\n\t\t\t\t\t\t<animate\n\t\t\t\t\t\t\tattributeName=\"stop-color\"\n\t\t\t\t\t\t\tvalues=\"#ec4899;#8b5cf6;#06b6d4;#ec4899\"\n\t\t\t\t\t\t\tdur=\"7s\"\n\t\t\t\t\t\t\trepeatCount=\"indefinite\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</stop>\n\t\t\t\t\t<stop offset=\"50%\" stopColor=\"#1e1b4b\" stopOpacity=\"0.7\" />\n\t\t\t\t\t<stop offset=\"100%\" stopColor=\"#0f0f1a\" stopOpacity=\"0\" />\n\t\t\t\t</radialGradient>\n\t\t\t</defs>\n\n\t\t\t<rect width=\"100\" height=\"100\" fill=\"#0a0a12\" />\n\t\t\t<rect\n\t\t\t\twidth=\"100\"\n\t\t\t\theight=\"100\"\n\t\t\t\tfill={`url(#${gradientA})`}\n\t\t\t\topacity=\"0.85\"\n\t\t\t/>\n\t\t\t<rect\n\t\t\t\twidth=\"100\"\n\t\t\t\theight=\"100\"\n\t\t\t\tfill={`url(#${gradientB})`}\n\t\t\t\topacity=\"0.75\"\n\t\t\t/>\n\t\t\t<rect\n\t\t\t\twidth=\"100\"\n\t\t\t\theight=\"100\"\n\t\t\t\tfill={`url(#${gradientC})`}\n\t\t\t\topacity=\"0.70\"\n\t\t\t/>\n\n\t\t\t{/* Thin oily film highlights */}\n\t\t\t<path\n\t\t\t\td=\"M -10 60 Q 25 45 50 60 T 110 55\"\n\t\t\t\tfill=\"none\"\n\t\t\t\tstroke=\"#ffffff\"\n\t\t\t\tstrokeWidth=\"0.8\"\n\t\t\t\topacity=\"0.12\"\n\t\t\t>\n\t\t\t\t<animate\n\t\t\t\t\tattributeName=\"d\"\n\t\t\t\t\tvalues=\"M -10 60 Q 25 45 50 60 T 110 55;M -10 55 Q 30 70 55 50 T 110 65;M -10 60 Q 25 45 50 60 T 110 55\"\n\t\t\t\t\tdur=\"12s\"\n\t\t\t\t\trepeatCount=\"indefinite\"\n\t\t\t\t/>\n\t\t\t</path>\n\t\t</svg>\n\t)\n}\n\nexport const oilslickConfig: SpecialTagStyleConfig = {\n\trender: OilslickSurface,\n\tdefault: {\n\t\tstyle: {\n\t\t\tcolor: \"#ffffff\",\n\t\t\tboxShadow:\n\t\t\t\t\"inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 10px rgba(139, 92, 246, 0.20)\",\n\t\t},\n\t},\n\tactive: {\n\t\tstyle: {\n\t\t\tcolor: \"#ffffff\",\n\t\t},\n\t},\n}\n","import { cn } from \"@hoardodile/ui/lib/utils\"\n\nimport type { SpecialTagStyleConfig } from \"./types\"\n\nfunction RainbowSurface({\n\tid,\n\tactive,\n}: {\n\treadonly id: string\n\treadonly active?: boolean\n}) {\n\tconst gradientId = `${id}-rainbow-gradient`\n\treturn (\n\t\t<svg\n\t\t\tclassName={cn(\n\t\t\t\t\"size-full\",\n\t\t\t\t!active && \"group-hover:[filter:brightness(1.08)]\",\n\t\t\t)}\n\t\t\twidth=\"100%\"\n\t\t\theight=\"100%\"\n\t\t\tviewBox=\"0 0 100 100\"\n\t\t\tpreserveAspectRatio=\"none\"\n\t\t>\n\t\t\t<defs>\n\t\t\t\t<linearGradient\n\t\t\t\t\tid={gradientId}\n\t\t\t\t\tx1=\"0%\"\n\t\t\t\t\ty1=\"0%\"\n\t\t\t\t\tx2=\"100%\"\n\t\t\t\t\ty2=\"0%\"\n\t\t\t\t\tgradientTransform=\"rotate(30, 0.5, 0.5)\"\n\t\t\t\t>\n\t\t\t\t\t<stop offset=\"0%\" stopColor=\"#fbffca\" />\n\t\t\t\t\t<stop offset=\"33%\" stopColor=\"#baffbf\" />\n\t\t\t\t\t<stop offset=\"66%\" stopColor=\"#a7efff\" />\n\t\t\t\t\t<stop offset=\"100%\" stopColor=\"#ffabff\" />\n\t\t\t\t</linearGradient>\n\t\t\t</defs>\n\t\t\t<rect\n\t\t\t\twidth=\"100\"\n\t\t\t\theight=\"100\"\n\t\t\t\tfill={active ? \"#005458\" : `url(#${gradientId})`}\n\t\t\t/>\n\t\t</svg>\n\t)\n}\n\nexport const rainbowConfig: SpecialTagStyleConfig = {\n\trender: RainbowSurface,\n\tdefault: {\n\t\tclassName: \"font-bold dark:[text-shadow:0_0_5px_rgba(0,0,0,0.5)]\",\n\t\tstyle: {\n\t\t\tcolor: \"#ffffff\",\n\t\t\ttextShadow: \"0 0 5px rgba(0, 0, 0, 0.2)\",\n\t\t\tboxShadow: \"inset 0 0 0 1px rgba(0, 247, 255, 0.1)\",\n\t\t},\n\t},\n\tactive: {\n\t\tstyle: {\n\t\t\tcolor: \"#ffffff\",\n\t\t},\n\t},\n}\n","import { cn } from \"@hoardodile/ui/lib/utils\"\n\nimport type { SpecialTagStyleConfig } from \"./types\"\n\nfunction SilverSurface({\n\tid,\n\tactive,\n}: {\n\treadonly id: string\n\treadonly active?: boolean\n}) {\n\tconst gradientId = `${id}-silver-gradient`\n\treturn (\n\t\t<svg\n\t\t\tclassName={cn(\n\t\t\t\t\"size-full\",\n\t\t\t\t!active &&\n\t\t\t\t\t\"[filter:brightness(1.1)] group-hover:[filter:brightness(1.16)]\",\n\t\t\t)}\n\t\t\twidth=\"100%\"\n\t\t\theight=\"100%\"\n\t\t\tviewBox=\"0 0 100 100\"\n\t\t\tpreserveAspectRatio=\"none\"\n\t\t>\n\t\t\t<defs>\n\t\t\t\t<linearGradient\n\t\t\t\t\tid={gradientId}\n\t\t\t\t\tx1=\"0%\"\n\t\t\t\t\ty1=\"0%\"\n\t\t\t\t\tx2=\"100%\"\n\t\t\t\t\ty2=\"0%\"\n\t\t\t\t\tgradientTransform=\"rotate(30, 0.5, 0.5)\"\n\t\t\t\t>\n\t\t\t\t\t<stop offset=\"10%\" stopColor=\"#afaeae\" />\n\t\t\t\t\t<stop offset=\"30%\" stopColor=\"#d6d6d6\" />\n\t\t\t\t\t<stop offset=\"50%\" stopColor=\"#eeeeee\" />\n\t\t\t\t\t<stop offset=\"70%\" stopColor=\"#d6d6d6\" />\n\t\t\t\t\t<stop offset=\"90%\" stopColor=\"#afaeae\" />\n\t\t\t\t</linearGradient>\n\t\t\t</defs>\n\t\t\t<rect\n\t\t\t\twidth=\"100\"\n\t\t\t\theight=\"100\"\n\t\t\t\tfill={active ? \"#5a5a5a\" : `url(#${gradientId})`}\n\t\t\t/>\n\t\t\t{!active && (\n\t\t\t\t<rect\n\t\t\t\t\tx=\"0\"\n\t\t\t\t\ty=\"0\"\n\t\t\t\t\twidth=\"100\"\n\t\t\t\t\theight=\"8\"\n\t\t\t\t\tfill=\"#ffffff\"\n\t\t\t\t\topacity=\"0.16\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t</svg>\n\t)\n}\n\nexport const silverConfig: SpecialTagStyleConfig = {\n\trender: SilverSurface,\n\tdefault: {\n\t\tstyle: {\n\t\t\tcolor: \"#2a2a2a\",\n\t\t\tboxShadow: \"inset 0 0 0 1px rgba(0, 0, 0, 0.08)\",\n\t\t},\n\t},\n\tactive: {\n\t\tstyle: {\n\t\t\tcolor: \"#ffffff\",\n\t\t},\n\t},\n}\n","import { cn } from \"@hoardodile/ui/lib/utils\"\nimport { useId } from \"react\"\nimport type { TagSpecialStyle } from \"@hoardodile/ui/lib/colors\"\nimport { goldConfig } from \"./special/gold\"\nimport { kintsugiConfig } from \"./special/kintsugi\"\nimport { oilslickConfig } from \"./special/oilslick\"\nimport { rainbowConfig } from \"./special/rainbow\"\nimport { silverConfig } from \"./special/silver\"\nimport type { SpecialTagStyleConfig } from \"./special/types\"\n\nexport type SpecialTagSurfaceProps = {\n\treadonly style: TagSpecialStyle\n\treadonly active?: boolean\n\treadonly className?: string\n}\n\nconst SPECIAL_TAG_CONFIG: Record<TagSpecialStyle, SpecialTagStyleConfig> = {\n\tsilver: silverConfig,\n\tgold: goldConfig,\n\trainbow: rainbowConfig,\n\toilslick: oilslickConfig,\n\tkintsugi: kintsugiConfig,\n}\n\nexport function getSpecialTagStyleConfig(\n\tstyle: TagSpecialStyle,\n): SpecialTagStyleConfig {\n\treturn SPECIAL_TAG_CONFIG[style]\n}\n\n/**\n * SVG background surface for special tag styles.\n *\n * Each style owns a self-contained SVG renderer in `src/components/special/`.\n * This component only picks the right renderer from the registry and applies\n * positioning; all styling (filters, colors, shadows) lives in the renderer or\n * the chip container config.\n */\nexport function SpecialTagSurface(props: SpecialTagSurfaceProps) {\n\tconst { style, active, className } = props\n\tconst config = SPECIAL_TAG_CONFIG[style]\n\tconst Renderer = config.render\n\tconst reactId = useId()\n\t// React useId() can produce ids containing colons, which break SVG\n\t// url(#id) references in some browsers. Replace them with a safe delimiter.\n\tconst safeId = reactId.replace(/:/g, \"-\")\n\n\treturn (\n\t\t<span className={cn(className)} aria-hidden=\"true\">\n\t\t\t<Renderer id={safeId} active={active} />\n\t\t</span>\n\t)\n}\n","/**\n * Pure color utilities used by tag/category chip rendering.\n *\n * Centralized here so chip components, color pickers, and tests share\n * one definition for \"looks white\"/\"looks black\" and the color-mix\n * blending used to keep chips subtle on cards and sidebars.\n */\n\nexport const TAG_SPECIAL_STYLES = [\n\t\"silver\",\n\t\"gold\",\n\t\"rainbow\",\n\t\"oilslick\",\n\t\"kintsugi\",\n] as const\n\n/** Default color presets shared by every color picker in the app. */\nexport const DEFAULT_COLOR_PRESETS = [\n\t\"#9D9D9D\",\n\t\"#000000\",\n\t\"#FFFFFF\",\n\t\"#27AE60\",\n\t\"#0070DD\",\n\t\"#00BCD4\",\n\t\"#8E44AD\",\n\t\"#FF8000\",\n\t\"#F1C40F\",\n\t\"#E74C3C\",\n] as const\n\nexport type TagSpecialStyle = (typeof TAG_SPECIAL_STYLES)[number]\n\nexport function isSpecialTagStyle(color: string): color is TagSpecialStyle {\n\treturn TAG_SPECIAL_STYLES.includes(color as TagSpecialStyle)\n}\n\nexport type TagChipColors = {\n\treadonly baseBg: string\n\treadonly hoverBg: string\n\treadonly fg: string\n}\n\nconst WHITE_COLOR_PATTERN =\n\t/^(?:#fff(?:fff)?|white|rgba?\\(\\s*255\\s*,\\s*255\\s*,\\s*255\\b)/i\nconst BLACK_COLOR_PATTERN =\n\t/^(?:#000(?:000)?|black|rgba?\\(\\s*0\\s*,\\s*0\\s*,\\s*0\\b)/i\n\n/**\n * Tests whether a CSS color string visually resolves to white in any\n * common short form (`#fff`, `#ffffff`, `white`, `rgb(255,255,255,…)`).\n */\nexport function isWhiteHex(color: string): boolean {\n\tif (color === \"\") return false\n\treturn WHITE_COLOR_PATTERN.test(color.trim())\n}\n\n/** Mirror of {@link isWhiteHex} for black. */\nexport function isBlackHex(color: string): boolean {\n\tif (color === \"\") return false\n\treturn BLACK_COLOR_PATTERN.test(color.trim())\n}\n\n/**\n * Resolve a chip's background/hover/foreground triple for the given\n * `color`. White and black are special-cased so they remain visibly\n * black/white in both light and dark themes instead of vanishing into\n * the chip background.\n */\nexport function computeTagChipColors(color: string): TagChipColors {\n\tif (color === \"\") {\n\t\treturn {\n\t\t\tbaseBg: \"var(--color-muted)\",\n\t\t\thoverBg: \"var(--color-accent)\",\n\t\t\tfg: \"var(--color-foreground)\",\n\t\t}\n\t}\n\tif (isWhiteHex(color)) {\n\t\treturn {\n\t\t\tbaseBg: \"#ffffff\",\n\t\t\thoverBg: \"#f1f5f9\",\n\t\t\tfg: \"#0a0a0a\",\n\t\t}\n\t}\n\tif (isBlackHex(color)) {\n\t\treturn {\n\t\t\tbaseBg: \"#0a0a0a\",\n\t\t\thoverBg: \"#262626\",\n\t\t\tfg: \"#ffffff\",\n\t\t}\n\t}\n\treturn {\n\t\tbaseBg: `color-mix(in srgb, ${color} 6%, var(--color-card))`,\n\t\thoverBg: `color-mix(in srgb, ${color} 20%, var(--color-card))`,\n\t\tfg: color,\n\t}\n}\n","import { getSpecialTagStyleConfig } from \"@hoardodile/ui/components/special-tag-surface\"\nimport {\n\tcomputeTagChipColors,\n\tisSpecialTagStyle,\n\ttype TagSpecialStyle,\n} from \"@hoardodile/ui/lib/colors\"\nimport { cn } from \"@hoardodile/ui/lib/utils\"\nimport type { CSSProperties } from \"react\"\n\nexport type ResolvedTagChipSurface = {\n\treadonly className: string\n\treadonly style: CSSProperties | undefined\n\t/** The special SVG texture to layer under the chip's content, or null. */\n\treadonly texture: TagSpecialStyle | null\n}\n\n/**\n * Resolves a chip's visual surface for a user-assigned color — the single\n * source of chip coloring shared by every tag/category pill in the app.\n *\n * A plain color tints the whole chip (a 6% wash as fill, the color as ink,\n * deepening to the hover tint when `active`); the five special styles\n * (silver, gold, rainbow, oilslick, kintsugi) render their SVG texture;\n * an empty color falls back to the default muted chip, taking the primary\n * fill when `active`.\n */\nexport function resolveTagChipSurface(\n\tcolor: string,\n\tactive: boolean,\n): ResolvedTagChipSurface {\n\tif (isSpecialTagStyle(color)) {\n\t\tconst config = getSpecialTagStyleConfig(color)\n\t\treturn {\n\t\t\tclassName: cn(\n\t\t\t\t\"relative isolate group\",\n\t\t\t\tconfig.default.className,\n\t\t\t\tactive ? config.active?.className : undefined,\n\t\t\t),\n\t\t\tstyle: {\n\t\t\t\t...config.default.style,\n\t\t\t\t...(active ? config.active?.style : {}),\n\t\t\t},\n\t\t\ttexture: color,\n\t\t}\n\t}\n\n\tif (color === \"\") {\n\t\treturn active\n\t\t\t? {\n\t\t\t\t\tclassName: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n\t\t\t\t\tstyle: undefined,\n\t\t\t\t\ttexture: null,\n\t\t\t\t}\n\t\t\t: {\n\t\t\t\t\tclassName: \"bg-muted text-foreground hover:bg-accent\",\n\t\t\t\t\tstyle: undefined,\n\t\t\t\t\ttexture: null,\n\t\t\t\t}\n\t}\n\n\tconst chipColors = computeTagChipColors(color)\n\treturn {\n\t\tclassName: \"bg-(--chip-bg) hover:bg-(--chip-hover-bg)\",\n\t\tstyle: {\n\t\t\t[\"--chip-bg\" as string]: active ? chipColors.hoverBg : chipColors.baseBg,\n\t\t\t[\"--chip-hover-bg\" as string]: chipColors.hoverBg,\n\t\t\tcolor: chipColors.fg,\n\t\t},\n\t\ttexture: null,\n\t}\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hoardodile/ui",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "license": "MIT",
5
5
  "description": "shadcn/ui component library for hoardodile plugin iframes.",
6
6
  "keywords": [
@@ -77,7 +77,7 @@
77
77
  "react-image-crop": "^11.1.2",
78
78
  "react-use": "^17.6.1",
79
79
  "tailwind-merge": "^3.6.0",
80
- "@hoardodile/i18n": "0.1.2"
80
+ "@hoardodile/i18n": "0.1.4"
81
81
  },
82
82
  "peerDependencies": {
83
83
  "i18next": "^26.4.0",
@@ -123,4 +123,17 @@ describe("PluginDownloadConsentDialog", () => {
123
123
  await screen.findByRole("button", { name: "允许" }),
124
124
  ).toBeInTheDocument()
125
125
  })
126
+
127
+ it("forwards stacking overrides to the overlay and content", async () => {
128
+ renderDialog({
129
+ overlayClassName: "z-[70]",
130
+ contentClassName: "z-[70]",
131
+ })
132
+ expect(await screen.findByTestId("plugin-download-consent")).toHaveClass(
133
+ "z-[70]",
134
+ )
135
+ // The overlay carries the same raised stack class, so the question
136
+ // stays above a host layer that sits over the default dialog stack.
137
+ expect(document.querySelectorAll('[class*="z-[70]"]').length).toBeGreaterThanOrEqual(2)
138
+ })
126
139
  })
@@ -50,6 +50,14 @@ export type PluginDownloadConsentDialogProps = {
50
50
  readonly onAllow: (ticketId: string, remember: boolean) => void
51
51
  /** Byte formatter; defaults to `"<n> B"`. */
52
52
  readonly formatBytes?: (bytes: number) => string
53
+ /**
54
+ * Overlay stacking override. Hosts with a layer above the standard
55
+ * dialog stack (e.g. the app's plugin preview window at z-60) pass a
56
+ * higher value so the consent question stays visible and clickable.
57
+ */
58
+ readonly overlayClassName?: string
59
+ /** Content stacking override; see {@link overlayClassName}. */
60
+ readonly contentClassName?: string
53
61
  }
54
62
 
55
63
  /**
@@ -84,6 +92,8 @@ export function PluginDownloadConsentDialog(
84
92
  onOpenChange={(open) => {
85
93
  if (!open && activeId !== null) onDeny(activeId)
86
94
  }}
95
+ overlayClassName={props.overlayClassName}
96
+ contentClassName={props.contentClassName}
87
97
  title={
88
98
  entry === null || itemCount <= 1
89
99
  ? t("pluginDownload.title", undefined)
@@ -8,6 +8,7 @@ function Popover({
8
8
  open,
9
9
  defaultOpen,
10
10
  onOpenChange,
11
+ closeOnBlur = false,
11
12
  ...props
12
13
  }: Omit<PopoverPrimitive.Root.Props, "onOpenChange"> & {
13
14
  /**
@@ -18,12 +19,23 @@ function Popover({
18
19
  open: boolean,
19
20
  eventDetails?: PopoverPrimitive.Root.ChangeEventDetails,
20
21
  ) => void
22
+ } & {
23
+ /**
24
+ * Close the popover when the window loses focus. Needed for surfaces
25
+ * that overlay a cross-origin iframe: Base UI closes on a parent-document
26
+ * `pointerdown`, which a click inside a sandboxed plugin iframe never
27
+ * reaches, so without this the plugin click leaves the popover open.
28
+ * Opt-in so app-wide popovers keep their current behavior.
29
+ */
30
+ closeOnBlur?: boolean
21
31
  }) {
22
32
  const [uncontrolledOpen, setUncontrolledOpen] = React.useState(
23
33
  defaultOpen ?? false,
24
34
  )
25
35
  const isControlled = open !== undefined
26
36
  const currentOpen = isControlled ? open : uncontrolledOpen
37
+ const handleOpenChangeRef = React.useRef(handleOpenChange)
38
+ handleOpenChangeRef.current = handleOpenChange
27
39
  function handleOpenChange(
28
40
  next: boolean,
29
41
  eventDetails?: PopoverPrimitive.Root.ChangeEventDetails,
@@ -32,6 +44,15 @@ function Popover({
32
44
  onOpenChange?.(next, eventDetails)
33
45
  }
34
46
  useMobileBackToClose(currentOpen, handleOpenChange)
47
+ // A sandboxed plugin iframe click moves focus into the iframe and blurs
48
+ // the host window; that blur is the only parent-side signal for a
49
+ // cross-origin iframe interaction, so close on it when opted in.
50
+ React.useEffect(() => {
51
+ if (!currentOpen || !closeOnBlur) return
52
+ const onWindowBlur = () => handleOpenChangeRef.current(false)
53
+ window.addEventListener("blur", onWindowBlur)
54
+ return () => window.removeEventListener("blur", onWindowBlur)
55
+ }, [currentOpen, closeOnBlur])
35
56
  return (
36
57
  <PopoverPrimitive.Root
37
58
  data-slot="popover"
@@ -0,0 +1,100 @@
1
+ import * as React from "react"
2
+ import {
3
+ PreviewCard as PreviewCardPrimitive,
4
+ } from "@base-ui/react/preview-card"
5
+
6
+ import { cn } from "@hoardodile/ui/lib/utils"
7
+
8
+ function PreviewCard({
9
+ open,
10
+ defaultOpen,
11
+ onOpenChange,
12
+ ...props
13
+ }: Omit<PreviewCardPrimitive.Root.Props, "onOpenChange"> & {
14
+ /** Base UI reports `eventDetails` for every change; keep the same shape
15
+ as the Popover wrapper so callers can filter by open reason. */
16
+ onOpenChange?: (
17
+ open: boolean,
18
+ eventDetails: PreviewCardPrimitive.Root.ChangeEventDetails,
19
+ ) => void
20
+ }) {
21
+ const [uncontrolledOpen, setUncontrolledOpen] = React.useState(
22
+ defaultOpen ?? false,
23
+ )
24
+ const isControlled = open !== undefined
25
+ const currentOpen = isControlled ? open : uncontrolledOpen
26
+ function handleOpenChange(
27
+ next: boolean,
28
+ eventDetails: PreviewCardPrimitive.Root.ChangeEventDetails,
29
+ ) {
30
+ if (!isControlled) setUncontrolledOpen(next)
31
+ onOpenChange?.(next, eventDetails)
32
+ }
33
+ return (
34
+ <PreviewCardPrimitive.Root
35
+ data-slot="preview-card"
36
+ open={currentOpen}
37
+ onOpenChange={handleOpenChange}
38
+ {...props}
39
+ />
40
+ )
41
+ }
42
+
43
+ function PreviewCardTrigger({ ...props }: PreviewCardPrimitive.Trigger.Props) {
44
+ return (
45
+ <PreviewCardPrimitive.Trigger
46
+ data-slot="preview-card-trigger"
47
+ {...props}
48
+ />
49
+ )
50
+ }
51
+
52
+ function PreviewCardPositioner({
53
+ className,
54
+ align = "center",
55
+ alignOffset = 0,
56
+ side = "top",
57
+ sideOffset = 8,
58
+ ...props
59
+ }: PreviewCardPrimitive.Positioner.Props) {
60
+ return (
61
+ <PreviewCardPrimitive.Positioner
62
+ align={align}
63
+ alignOffset={alignOffset}
64
+ side={side}
65
+ sideOffset={sideOffset}
66
+ className={cn("isolate z-50", className)}
67
+ {...props}
68
+ />
69
+ )
70
+ }
71
+
72
+ function PreviewCardPopup({
73
+ className,
74
+ ...props
75
+ }: PreviewCardPrimitive.Popup.Props) {
76
+ return (
77
+ <PreviewCardPrimitive.Popup
78
+ data-slot="preview-card-content"
79
+ className={cn(
80
+ "z-50 origin-(--transform-origin) rounded-md bg-popover text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
81
+ className,
82
+ )}
83
+ {...props}
84
+ />
85
+ )
86
+ }
87
+
88
+ function PreviewCardPortal(
89
+ props: React.ComponentProps<typeof PreviewCardPrimitive.Portal>,
90
+ ) {
91
+ return <PreviewCardPrimitive.Portal {...props} />
92
+ }
93
+
94
+ export {
95
+ PreviewCard,
96
+ PreviewCardPopup,
97
+ PreviewCardPortal,
98
+ PreviewCardPositioner,
99
+ PreviewCardTrigger,
100
+ }
@@ -0,0 +1,73 @@
1
+ import { cn } from "@hoardodile/ui/lib/utils"
2
+
3
+ import type { SpecialTagStyleConfig } from "./types"
4
+
5
+ function GoldSurface({
6
+ id,
7
+ active,
8
+ }: {
9
+ readonly id: string
10
+ readonly active?: boolean
11
+ }) {
12
+ const gradientId = `${id}-gold-gradient`
13
+ return (
14
+ <svg
15
+ className={cn(
16
+ "size-full",
17
+ !active &&
18
+ "[filter:brightness(1.1)] group-hover:[filter:brightness(1.16)]",
19
+ )}
20
+ width="100%"
21
+ height="100%"
22
+ viewBox="0 0 100 100"
23
+ preserveAspectRatio="none"
24
+ >
25
+ <defs>
26
+ <linearGradient
27
+ id={gradientId}
28
+ x1="0%"
29
+ y1="0%"
30
+ x2="100%"
31
+ y2="0%"
32
+ gradientTransform="rotate(30, 0.5, 0.5)"
33
+ >
34
+ <stop offset="10%" stopColor="#daa520" />
35
+ <stop offset="30%" stopColor="#ffd700" />
36
+ <stop offset="50%" stopColor="#f0e68c" />
37
+ <stop offset="70%" stopColor="#ffd700" />
38
+ <stop offset="90%" stopColor="#daa520" />
39
+ </linearGradient>
40
+ </defs>
41
+ <rect
42
+ width="100"
43
+ height="100"
44
+ fill={active ? "#8a6d1f" : `url(#${gradientId})`}
45
+ />
46
+ {!active && (
47
+ <rect
48
+ x="0"
49
+ y="0"
50
+ width="100"
51
+ height="8"
52
+ fill="#ffffff"
53
+ opacity="0.12"
54
+ />
55
+ )}
56
+ </svg>
57
+ )
58
+ }
59
+
60
+ export const goldConfig: SpecialTagStyleConfig = {
61
+ render: GoldSurface,
62
+ default: {
63
+ style: {
64
+ color: "#725603",
65
+ boxShadow: "inset 0 0 0 1px rgba(114, 86, 3, 0.2)",
66
+ },
67
+ },
68
+ active: {
69
+ style: {
70
+ color: "#ffffff",
71
+ },
72
+ },
73
+ }
@@ -0,0 +1,143 @@
1
+ import { cn } from "@hoardodile/ui/lib/utils"
2
+
3
+ import type { SpecialTagStyleConfig } from "./types"
4
+
5
+ function KintsugiSurface({
6
+ id,
7
+ active,
8
+ }: {
9
+ readonly id: string
10
+ readonly active?: boolean
11
+ }) {
12
+ if (active) {
13
+ return (
14
+ <svg
15
+ className={cn(
16
+ "size-full",
17
+ !active &&
18
+ "[filter:brightness(1.02)] group-hover:[filter:brightness(1.06)]",
19
+ )}
20
+ width="100%"
21
+ height="100%"
22
+ viewBox="0 0 100 100"
23
+ preserveAspectRatio="none"
24
+ >
25
+ <rect width="100" height="100" fill="#9a9a8a" />
26
+ </svg>
27
+ )
28
+ }
29
+
30
+ const goldGradientId = `${id}-kintsugi-gold`
31
+
32
+ return (
33
+ <svg
34
+ className={cn(
35
+ "size-full",
36
+ !active &&
37
+ "[filter:brightness(1.02)] group-hover:[filter:brightness(1.06)]",
38
+ )}
39
+ width="100%"
40
+ height="100%"
41
+ viewBox="0 0 100 100"
42
+ preserveAspectRatio="none"
43
+ >
44
+ <style>{`
45
+ @keyframes ${id}-gold-shimmer {
46
+ 0% { stroke-dashoffset: 60; }
47
+ 100% { stroke-dashoffset: 0; }
48
+ }
49
+ .${id}-gold-vein {
50
+ stroke-dasharray: 30 30;
51
+ animation: ${id}-gold-shimmer 5s linear infinite;
52
+ }
53
+ @media (prefers-reduced-motion: reduce) {
54
+ .${id}-gold-vein {
55
+ animation: none;
56
+ }
57
+ }
58
+ `}</style>
59
+
60
+ <defs>
61
+ <linearGradient id={goldGradientId} x1="0%" y1="0%" x2="100%" y2="100%">
62
+ <stop offset="0%" stopColor="#b8860b" />
63
+ <stop offset="35%" stopColor="#ffd700" />
64
+ <stop offset="50%" stopColor="#fffacd" />
65
+ <stop offset="65%" stopColor="#ffd700" />
66
+ <stop offset="100%" stopColor="#b8860b" />
67
+ </linearGradient>
68
+ </defs>
69
+
70
+ {/* Celadon/cream ceramic base */}
71
+ <rect width="100" height="100" fill="#d8d4c5" />
72
+ <rect width="100" height="100" fill="#b8c4b8" opacity="0.35" />
73
+
74
+ {/* Subtle surface texture */}
75
+ <ellipse cx="30" cy="25" rx="40" ry="25" fill="#ffffff" opacity="0.08" />
76
+ <ellipse cx="75" cy="70" rx="35" ry="28" fill="#000000" opacity="0.04" />
77
+
78
+ {/* Crack lines (dark) */}
79
+ <path
80
+ d="M 5 20 Q 25 22 35 45 T 60 80"
81
+ fill="none"
82
+ stroke="#5a5650"
83
+ strokeWidth="0.7"
84
+ opacity="0.45"
85
+ />
86
+ <path
87
+ d="M 80 10 Q 70 35 85 55 T 55 95"
88
+ fill="none"
89
+ stroke="#5a5650"
90
+ strokeWidth="0.6"
91
+ opacity="0.40"
92
+ />
93
+ <path
94
+ d="M 10 70 Q 30 68 45 55 T 75 45"
95
+ fill="none"
96
+ stroke="#5a5650"
97
+ strokeWidth="0.5"
98
+ opacity="0.38"
99
+ />
100
+
101
+ {/* Gold repair veins */}
102
+ <path
103
+ className={`${id}-gold-vein`}
104
+ d="M 4 18 Q 24 20 34 43 T 58 78"
105
+ fill="none"
106
+ stroke={`url(#${goldGradientId})`}
107
+ strokeWidth="1.4"
108
+ strokeLinecap="round"
109
+ />
110
+ <path
111
+ className={`${id}-gold-vein`}
112
+ d="M 82 8 Q 72 33 87 53 T 53 93"
113
+ fill="none"
114
+ stroke={`url(#${goldGradientId})`}
115
+ strokeWidth="1.2"
116
+ strokeLinecap="round"
117
+ />
118
+ <path
119
+ className={`${id}-gold-vein`}
120
+ d="M 8 68 Q 28 66 43 53 T 73 43"
121
+ fill="none"
122
+ stroke={`url(#${goldGradientId})`}
123
+ strokeWidth="1.0"
124
+ strokeLinecap="round"
125
+ />
126
+ </svg>
127
+ )
128
+ }
129
+
130
+ export const kintsugiConfig: SpecialTagStyleConfig = {
131
+ render: KintsugiSurface,
132
+ default: {
133
+ style: {
134
+ color: "#4a4030",
135
+ boxShadow: "inset 0 0 0 1px rgba(74, 64, 48, 0.12)",
136
+ },
137
+ },
138
+ active: {
139
+ style: {
140
+ color: "#ffffff",
141
+ },
142
+ },
143
+ }
@@ -0,0 +1,138 @@
1
+ import { cn } from "@hoardodile/ui/lib/utils"
2
+
3
+ import type { SpecialTagStyleConfig } from "./types"
4
+
5
+ function OilslickSurface({
6
+ id,
7
+ active,
8
+ }: {
9
+ readonly id: string
10
+ readonly active?: boolean
11
+ }) {
12
+ if (active) {
13
+ return (
14
+ <svg
15
+ className={cn(
16
+ "size-full",
17
+ !active &&
18
+ "[filter:saturate(1.15)] group-hover:[filter:saturate(1.3)_brightness(1.08)]",
19
+ )}
20
+ width="100%"
21
+ height="100%"
22
+ viewBox="0 0 100 100"
23
+ preserveAspectRatio="none"
24
+ >
25
+ <rect width="100" height="100" fill="#1a1a2e" />
26
+ </svg>
27
+ )
28
+ }
29
+
30
+ const gradientA = `${id}-oilslick-a`
31
+ const gradientB = `${id}-oilslick-b`
32
+ const gradientC = `${id}-oilslick-c`
33
+
34
+ return (
35
+ <svg
36
+ className={cn(
37
+ "size-full",
38
+ !active &&
39
+ "[filter:saturate(1.15)] group-hover:[filter:saturate(1.3)_brightness(1.08)]",
40
+ )}
41
+ width="100%"
42
+ height="100%"
43
+ viewBox="0 0 100 100"
44
+ preserveAspectRatio="none"
45
+ >
46
+ <defs>
47
+ <radialGradient id={gradientA} cx="30%" cy="30%" r="70%">
48
+ <stop offset="0%" stopColor="#8b5cf6">
49
+ <animate
50
+ attributeName="stop-color"
51
+ values="#8b5cf6;#06b6d4;#8b5cf6"
52
+ dur="8s"
53
+ repeatCount="indefinite"
54
+ />
55
+ </stop>
56
+ <stop offset="60%" stopColor="#1e1b4b" stopOpacity="0.9" />
57
+ <stop offset="100%" stopColor="#0f0f1a" stopOpacity="0" />
58
+ </radialGradient>
59
+ <radialGradient id={gradientB} cx="70%" cy="60%" r="60%">
60
+ <stop offset="0%" stopColor="#10b981">
61
+ <animate
62
+ attributeName="stop-color"
63
+ values="#10b981;#f59e0b;#ec4899;#10b981"
64
+ dur="10s"
65
+ repeatCount="indefinite"
66
+ />
67
+ </stop>
68
+ <stop offset="55%" stopColor="#1e1b4b" stopOpacity="0.8" />
69
+ <stop offset="100%" stopColor="#0f0f1a" stopOpacity="0" />
70
+ </radialGradient>
71
+ <radialGradient id={gradientC} cx="50%" cy="80%" r="55%">
72
+ <stop offset="0%" stopColor="#ec4899">
73
+ <animate
74
+ attributeName="stop-color"
75
+ values="#ec4899;#8b5cf6;#06b6d4;#ec4899"
76
+ dur="7s"
77
+ repeatCount="indefinite"
78
+ />
79
+ </stop>
80
+ <stop offset="50%" stopColor="#1e1b4b" stopOpacity="0.7" />
81
+ <stop offset="100%" stopColor="#0f0f1a" stopOpacity="0" />
82
+ </radialGradient>
83
+ </defs>
84
+
85
+ <rect width="100" height="100" fill="#0a0a12" />
86
+ <rect
87
+ width="100"
88
+ height="100"
89
+ fill={`url(#${gradientA})`}
90
+ opacity="0.85"
91
+ />
92
+ <rect
93
+ width="100"
94
+ height="100"
95
+ fill={`url(#${gradientB})`}
96
+ opacity="0.75"
97
+ />
98
+ <rect
99
+ width="100"
100
+ height="100"
101
+ fill={`url(#${gradientC})`}
102
+ opacity="0.70"
103
+ />
104
+
105
+ {/* Thin oily film highlights */}
106
+ <path
107
+ d="M -10 60 Q 25 45 50 60 T 110 55"
108
+ fill="none"
109
+ stroke="#ffffff"
110
+ strokeWidth="0.8"
111
+ opacity="0.12"
112
+ >
113
+ <animate
114
+ attributeName="d"
115
+ values="M -10 60 Q 25 45 50 60 T 110 55;M -10 55 Q 30 70 55 50 T 110 65;M -10 60 Q 25 45 50 60 T 110 55"
116
+ dur="12s"
117
+ repeatCount="indefinite"
118
+ />
119
+ </path>
120
+ </svg>
121
+ )
122
+ }
123
+
124
+ export const oilslickConfig: SpecialTagStyleConfig = {
125
+ render: OilslickSurface,
126
+ default: {
127
+ style: {
128
+ color: "#ffffff",
129
+ boxShadow:
130
+ "inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 10px rgba(139, 92, 246, 0.20)",
131
+ },
132
+ },
133
+ active: {
134
+ style: {
135
+ color: "#ffffff",
136
+ },
137
+ },
138
+ }