@jasonshimmy/custom-elements-runtime 3.2.0 → 3.2.1

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 (105) hide show
  1. package/dist/{css-utils-Cg4o1MqY.js → css-utils-CC43BbEy.js} +20 -21
  2. package/dist/css-utils-CC43BbEy.js.map +1 -0
  3. package/dist/{css-utils-RqkyBWft.cjs → css-utils-mgjmH8qX.cjs} +5 -4
  4. package/dist/css-utils-mgjmH8qX.cjs.map +1 -0
  5. package/dist/custom-elements-runtime.cjs.js +4 -3
  6. package/dist/custom-elements-runtime.cjs.js.map +1 -1
  7. package/dist/custom-elements-runtime.colors.cjs.js +3 -2
  8. package/dist/custom-elements-runtime.colors.cjs.js.map +1 -1
  9. package/dist/custom-elements-runtime.colors.es.js +3 -2
  10. package/dist/custom-elements-runtime.colors.es.js.map +1 -1
  11. package/dist/custom-elements-runtime.directive-enhancements.cjs.js +3 -2
  12. package/dist/custom-elements-runtime.directive-enhancements.cjs.js.map +1 -1
  13. package/dist/custom-elements-runtime.directive-enhancements.es.js +86 -100
  14. package/dist/custom-elements-runtime.directive-enhancements.es.js.map +1 -1
  15. package/dist/custom-elements-runtime.directives.cjs.js +3 -2
  16. package/dist/custom-elements-runtime.directives.cjs.js.map +1 -1
  17. package/dist/custom-elements-runtime.directives.es.js +40 -43
  18. package/dist/custom-elements-runtime.directives.es.js.map +1 -1
  19. package/dist/custom-elements-runtime.dom-jit-css.cjs.js +7 -6
  20. package/dist/custom-elements-runtime.dom-jit-css.cjs.js.map +1 -1
  21. package/dist/custom-elements-runtime.dom-jit-css.es.js +58 -76
  22. package/dist/custom-elements-runtime.dom-jit-css.es.js.map +1 -1
  23. package/dist/custom-elements-runtime.es.js +162 -186
  24. package/dist/custom-elements-runtime.es.js.map +1 -1
  25. package/dist/custom-elements-runtime.event-bus.cjs.js +3 -2
  26. package/dist/custom-elements-runtime.event-bus.cjs.js.map +1 -1
  27. package/dist/custom-elements-runtime.event-bus.es.js +48 -103
  28. package/dist/custom-elements-runtime.event-bus.es.js.map +1 -1
  29. package/dist/custom-elements-runtime.jit-css.cjs.js +3 -2
  30. package/dist/custom-elements-runtime.jit-css.cjs.js.map +1 -1
  31. package/dist/custom-elements-runtime.jit-css.es.js +29 -30
  32. package/dist/custom-elements-runtime.jit-css.es.js.map +1 -1
  33. package/dist/custom-elements-runtime.router.cjs.js +20 -19
  34. package/dist/custom-elements-runtime.router.cjs.js.map +1 -1
  35. package/dist/custom-elements-runtime.router.es.js +585 -603
  36. package/dist/custom-elements-runtime.router.es.js.map +1 -1
  37. package/dist/custom-elements-runtime.ssr-middleware.cjs.js +5 -4
  38. package/dist/custom-elements-runtime.ssr-middleware.cjs.js.map +1 -1
  39. package/dist/custom-elements-runtime.ssr-middleware.es.js +44 -37
  40. package/dist/custom-elements-runtime.ssr-middleware.es.js.map +1 -1
  41. package/dist/custom-elements-runtime.ssr.cjs.js +1 -4
  42. package/dist/custom-elements-runtime.ssr.es.js +11 -176
  43. package/dist/custom-elements-runtime.store.cjs.js +3 -2
  44. package/dist/custom-elements-runtime.store.cjs.js.map +1 -1
  45. package/dist/custom-elements-runtime.store.es.js +17 -11
  46. package/dist/custom-elements-runtime.store.es.js.map +1 -1
  47. package/dist/custom-elements-runtime.transitions.cjs.js +3 -2
  48. package/dist/custom-elements-runtime.transitions.cjs.js.map +1 -1
  49. package/dist/custom-elements-runtime.transitions.es.js +55 -120
  50. package/dist/custom-elements-runtime.transitions.es.js.map +1 -1
  51. package/dist/custom-elements-runtime.vite-plugin.cjs.js +3 -2
  52. package/dist/custom-elements-runtime.vite-plugin.cjs.js.map +1 -1
  53. package/dist/custom-elements-runtime.vite-plugin.es.js +54 -75
  54. package/dist/custom-elements-runtime.vite-plugin.es.js.map +1 -1
  55. package/dist/hooks-_3xP4G2N.js +1189 -0
  56. package/dist/hooks-_3xP4G2N.js.map +1 -0
  57. package/dist/hooks-fYQgZk2g.cjs +7 -0
  58. package/dist/hooks-fYQgZk2g.cjs.map +1 -0
  59. package/dist/logger-BYIN7ysT.cjs +3 -0
  60. package/dist/logger-BYIN7ysT.cjs.map +1 -0
  61. package/dist/logger-L25axmB-.js +41 -0
  62. package/dist/logger-L25axmB-.js.map +1 -0
  63. package/dist/namespace-helpers-Bf7rm9JV.cjs +3 -0
  64. package/dist/namespace-helpers-Bf7rm9JV.cjs.map +1 -0
  65. package/dist/namespace-helpers-BucDdgz_.js +61 -0
  66. package/dist/namespace-helpers-BucDdgz_.js.map +1 -0
  67. package/dist/reset.css +1 -1
  68. package/dist/ssr-B3lxl1vr.js +165 -0
  69. package/dist/ssr-B3lxl1vr.js.map +1 -0
  70. package/dist/ssr-DtD9e5iA.cjs +5 -0
  71. package/dist/ssr-DtD9e5iA.cjs.map +1 -0
  72. package/dist/style-Bjn8zDiZ.cjs +56 -0
  73. package/dist/style-Bjn8zDiZ.cjs.map +1 -0
  74. package/dist/{style-BmyOIMcU.js → style-DuDoj_xK.js} +724 -876
  75. package/dist/style-DuDoj_xK.js.map +1 -0
  76. package/dist/style.css +1 -1
  77. package/dist/template-compiler-BB4JJdqk.cjs +23 -0
  78. package/dist/template-compiler-BB4JJdqk.cjs.map +1 -0
  79. package/dist/template-compiler-Cs5axmn4.js +3236 -0
  80. package/dist/template-compiler-Cs5axmn4.js.map +1 -0
  81. package/dist/variables.css +1 -1
  82. package/package.json +7 -7
  83. package/dist/css-utils-Cg4o1MqY.js.map +0 -1
  84. package/dist/css-utils-RqkyBWft.cjs.map +0 -1
  85. package/dist/custom-elements-runtime.ssr.cjs.js.map +0 -1
  86. package/dist/custom-elements-runtime.ssr.es.js.map +0 -1
  87. package/dist/hooks-BH-CpUun.js +0 -1474
  88. package/dist/hooks-BH-CpUun.js.map +0 -1
  89. package/dist/hooks-NOFG9QRQ.cjs +0 -6
  90. package/dist/hooks-NOFG9QRQ.cjs.map +0 -1
  91. package/dist/logger-BvkEbVM4.js +0 -48
  92. package/dist/logger-BvkEbVM4.js.map +0 -1
  93. package/dist/logger-CSALKaYm.cjs +0 -2
  94. package/dist/logger-CSALKaYm.cjs.map +0 -1
  95. package/dist/namespace-helpers-D4wC2-qA.js +0 -61
  96. package/dist/namespace-helpers-D4wC2-qA.js.map +0 -1
  97. package/dist/namespace-helpers-ckeEOxpR.cjs +0 -2
  98. package/dist/namespace-helpers-ckeEOxpR.cjs.map +0 -1
  99. package/dist/style-BmyOIMcU.js.map +0 -1
  100. package/dist/style-D40DsIqJ.cjs +0 -55
  101. package/dist/style-D40DsIqJ.cjs.map +0 -1
  102. package/dist/template-compiler-CDvhsHia.cjs +0 -22
  103. package/dist/template-compiler-CDvhsHia.cjs.map +0 -1
  104. package/dist/template-compiler-DiE69FLO.js +0 -3724
  105. package/dist/template-compiler-DiE69FLO.js.map +0 -1
@@ -1 +1 @@
1
- :root{--cer-font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;--cer-font-serif: ui-serif, Georgia, "Times New Roman", Times, serif;--cer-font-mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, "Roboto Mono", "Courier New", monospace;--cer-outline-style: solid;--cer-color-transparent: transparent;--cer-color-current: currentColor;--cer-color-black: #000000;--cer-color-white: #ffffff;--cer-color-inherit: inherit;--cer-color-neutral-50: #fafafa;--cer-color-neutral-100: #f4f4f5;--cer-color-neutral-200: #e4e4e7;--cer-color-neutral-300: #d4d4d8;--cer-color-neutral-400: #9f9fa9;--cer-color-neutral-500: #71717b;--cer-color-neutral-600: #52525c;--cer-color-neutral-700: #3f3f46;--cer-color-neutral-800: #27272a;--cer-color-neutral-900: #18181b;--cer-color-neutral-950: #09090b;--cer-color-primary-50: #eff6ff;--cer-color-primary-100: #dbeafe;--cer-color-primary-200: #bfdbfe;--cer-color-primary-300: #93c5fd;--cer-color-primary-400: #60a5fa;--cer-color-primary-500: #3b82f6;--cer-color-primary-600: #2563eb;--cer-color-primary-700: #1d4ed8;--cer-color-primary-800: #1e40af;--cer-color-primary-900: #1e3a8a;--cer-color-primary-950: #172554;--cer-color-secondary-50: #eef2ff;--cer-color-secondary-100: #e0e7ff;--cer-color-secondary-200: #c7d2fe;--cer-color-secondary-300: #a5b4fc;--cer-color-secondary-400: #818cf8;--cer-color-secondary-500: #6366f1;--cer-color-secondary-600: #4f46e5;--cer-color-secondary-700: #4338ca;--cer-color-secondary-800: #3730a3;--cer-color-secondary-900: #312e81;--cer-color-secondary-950: #1e1b4b;--cer-color-success-50: #f0fdf4;--cer-color-success-100: #dcfce7;--cer-color-success-200: #bbf7d0;--cer-color-success-300: #86efac;--cer-color-success-400: #4ade80;--cer-color-success-500: #22c55e;--cer-color-success-600: #16a34a;--cer-color-success-700: #15803d;--cer-color-success-800: #166534;--cer-color-success-900: #14532d;--cer-color-success-950: #052e16;--cer-color-info-50: #f0f9ff;--cer-color-info-100: #e0f2fe;--cer-color-info-200: #bae6fd;--cer-color-info-300: #7dd3fc;--cer-color-info-400: #38bdf8;--cer-color-info-500: #0ea5e9;--cer-color-info-600: #0284c7;--cer-color-info-700: #0369a1;--cer-color-info-800: #075985;--cer-color-info-900: #0c4a6e;--cer-color-info-950: #082f49;--cer-color-warning-50: #fffbeb;--cer-color-warning-100: #fef3c7;--cer-color-warning-200: #fde68a;--cer-color-warning-300: #fcd34d;--cer-color-warning-400: #fbbf24;--cer-color-warning-500: #f59e0b;--cer-color-warning-600: #d97706;--cer-color-warning-700: #b45309;--cer-color-warning-800: #92400e;--cer-color-warning-900: #78350f;--cer-color-warning-950: #451a03;--cer-color-error-50: #fef2f2;--cer-color-error-100: #fee2e2;--cer-color-error-200: #fecaca;--cer-color-error-300: #fca5a5;--cer-color-error-400: #f87171;--cer-color-error-500: #ef4444;--cer-color-error-600: #dc2626;--cer-color-error-700: #b91c1c;--cer-color-error-800: #991b1b;--cer-color-error-900: #7f1d1d;--cer-color-error-950: #450a0a;--cer-color-slate-50: #f8fafc;--cer-color-slate-100: #f1f5f9;--cer-color-slate-200: #e2e8f0;--cer-color-slate-300: #cbd5e1;--cer-color-slate-400: #94a3b8;--cer-color-slate-500: #64748b;--cer-color-slate-600: #475569;--cer-color-slate-700: #334155;--cer-color-slate-800: #1e293b;--cer-color-slate-900: #0f172a;--cer-color-slate-950: #020617;--cer-color-gray-50: #f9fafb;--cer-color-gray-100: #f3f4f6;--cer-color-gray-200: #e5e7eb;--cer-color-gray-300: #d1d5db;--cer-color-gray-400: #9ca3af;--cer-color-gray-500: #6b7280;--cer-color-gray-600: #4b5563;--cer-color-gray-700: #374151;--cer-color-gray-800: #1f2937;--cer-color-gray-900: #111827;--cer-color-gray-950: #030712;--cer-color-zinc-50: #fafafa;--cer-color-zinc-100: #f4f4f5;--cer-color-zinc-200: #e4e4e7;--cer-color-zinc-300: #d4d4d8;--cer-color-zinc-400: #a1a1aa;--cer-color-zinc-500: #71717a;--cer-color-zinc-600: #52525b;--cer-color-zinc-700: #3f3f46;--cer-color-zinc-800: #27272a;--cer-color-zinc-900: #18181b;--cer-color-zinc-950: #09090b;--cer-color-stone-50: #fafaf9;--cer-color-stone-100: #f5f5f4;--cer-color-stone-200: #e7e5e4;--cer-color-stone-300: #d6d3d1;--cer-color-stone-400: #a8a29e;--cer-color-stone-500: #78716c;--cer-color-stone-600: #57534e;--cer-color-stone-700: #44403c;--cer-color-stone-800: #292524;--cer-color-stone-900: #1c1917;--cer-color-stone-950: #0c0a09;--cer-color-red-50: #fef2f2;--cer-color-red-100: #fee2e2;--cer-color-red-200: #fecaca;--cer-color-red-300: #fca5a5;--cer-color-red-400: #f87171;--cer-color-red-500: #ef4444;--cer-color-red-600: #dc2626;--cer-color-red-700: #b91c1c;--cer-color-red-800: #991b1b;--cer-color-red-900: #7f1d1d;--cer-color-red-950: #450a0a;--cer-color-orange-50: #fff7ed;--cer-color-orange-100: #ffedd5;--cer-color-orange-200: #fed7aa;--cer-color-orange-300: #fdba74;--cer-color-orange-400: #fb923c;--cer-color-orange-500: #f97316;--cer-color-orange-600: #ea580c;--cer-color-orange-700: #c2410c;--cer-color-orange-800: #9a3412;--cer-color-orange-900: #7c2d12;--cer-color-orange-950: #431407;--cer-color-amber-50: #fffbeb;--cer-color-amber-100: #fef3c7;--cer-color-amber-200: #fde68a;--cer-color-amber-300: #fcd34d;--cer-color-amber-400: #fbbf24;--cer-color-amber-500: #f59e0b;--cer-color-amber-600: #d97706;--cer-color-amber-700: #b45309;--cer-color-amber-800: #92400e;--cer-color-amber-900: #78350f;--cer-color-amber-950: #451a03;--cer-color-yellow-50: #fefce8;--cer-color-yellow-100: #fef9c3;--cer-color-yellow-200: #fef08a;--cer-color-yellow-300: #fde047;--cer-color-yellow-400: #facc15;--cer-color-yellow-500: #eab308;--cer-color-yellow-600: #ca8a04;--cer-color-yellow-700: #a16207;--cer-color-yellow-800: #854d0e;--cer-color-yellow-900: #713f12;--cer-color-yellow-950: #422006;--cer-color-lime-50: #f7fee7;--cer-color-lime-100: #ecfccb;--cer-color-lime-200: #d9f99d;--cer-color-lime-300: #bef264;--cer-color-lime-400: #a3e635;--cer-color-lime-500: #84cc16;--cer-color-lime-600: #65a30d;--cer-color-lime-700: #4d7c0f;--cer-color-lime-800: #3f6212;--cer-color-lime-900: #365314;--cer-color-lime-950: #1a2e05;--cer-color-green-50: #f0fdf4;--cer-color-green-100: #dcfce7;--cer-color-green-200: #bbf7d0;--cer-color-green-300: #86efac;--cer-color-green-400: #4ade80;--cer-color-green-500: #22c55e;--cer-color-green-600: #16a34a;--cer-color-green-700: #15803d;--cer-color-green-800: #166534;--cer-color-green-900: #14532d;--cer-color-green-950: #052e16;--cer-color-emerald-50: #ecfdf5;--cer-color-emerald-100: #d1fae5;--cer-color-emerald-200: #a7f3d0;--cer-color-emerald-300: #6ee7b7;--cer-color-emerald-400: #34d399;--cer-color-emerald-500: #10b981;--cer-color-emerald-600: #059669;--cer-color-emerald-700: #047857;--cer-color-emerald-800: #065f46;--cer-color-emerald-900: #064e3b;--cer-color-emerald-950: #022c22;--cer-color-teal-50: #f0fdfa;--cer-color-teal-100: #ccfbf1;--cer-color-teal-200: #99f6e4;--cer-color-teal-300: #5eead4;--cer-color-teal-400: #2dd4bf;--cer-color-teal-500: #14b8a6;--cer-color-teal-600: #0d9488;--cer-color-teal-700: #0f766e;--cer-color-teal-800: #115e59;--cer-color-teal-900: #134e4a;--cer-color-teal-950: #042f2e;--cer-color-cyan-50: #ecfeff;--cer-color-cyan-100: #cffafe;--cer-color-cyan-200: #a5f3fc;--cer-color-cyan-300: #67e8f9;--cer-color-cyan-400: #22d3ee;--cer-color-cyan-500: #06b6d4;--cer-color-cyan-600: #0891b2;--cer-color-cyan-700: #0e7490;--cer-color-cyan-800: #155e75;--cer-color-cyan-900: #164e63;--cer-color-cyan-950: #083344;--cer-color-sky-50: #f0f9ff;--cer-color-sky-100: #e0f2fe;--cer-color-sky-200: #bae6fd;--cer-color-sky-300: #7dd3fc;--cer-color-sky-400: #38bdf8;--cer-color-sky-500: #0ea5e9;--cer-color-sky-600: #0284c7;--cer-color-sky-700: #0369a1;--cer-color-sky-800: #075985;--cer-color-sky-900: #0c4a6e;--cer-color-sky-950: #082f49;--cer-color-blue-50: #eff6ff;--cer-color-blue-100: #dbeafe;--cer-color-blue-200: #bfdbfe;--cer-color-blue-300: #93c5fd;--cer-color-blue-400: #60a5fa;--cer-color-blue-500: #3b82f6;--cer-color-blue-600: #2563eb;--cer-color-blue-700: #1d4ed8;--cer-color-blue-800: #1e40af;--cer-color-blue-900: #1e3a8a;--cer-color-blue-950: #172554;--cer-color-indigo-50: #eef2ff;--cer-color-indigo-100: #e0e7ff;--cer-color-indigo-200: #c7d2fe;--cer-color-indigo-300: #a5b4fc;--cer-color-indigo-400: #818cf8;--cer-color-indigo-500: #6366f1;--cer-color-indigo-600: #4f46e5;--cer-color-indigo-700: #4338ca;--cer-color-indigo-800: #3730a3;--cer-color-indigo-900: #312e81;--cer-color-indigo-950: #1e1b4b;--cer-color-violet-50: #f5f3ff;--cer-color-violet-100: #ede9fe;--cer-color-violet-200: #ddd6fe;--cer-color-violet-300: #c4b5fd;--cer-color-violet-400: #a78bfa;--cer-color-violet-500: #8b5cf6;--cer-color-violet-600: #7c3aed;--cer-color-violet-700: #6d28d9;--cer-color-violet-800: #5b21b6;--cer-color-violet-900: #4c1d95;--cer-color-violet-950: #2e1065;--cer-color-purple-50: #faf5ff;--cer-color-purple-100: #f3e8ff;--cer-color-purple-200: #e9d5ff;--cer-color-purple-300: #d8b4fe;--cer-color-purple-400: #c084fc;--cer-color-purple-500: #a855f7;--cer-color-purple-600: #9333ea;--cer-color-purple-700: #7e22ce;--cer-color-purple-800: #6b21a8;--cer-color-purple-900: #581c87;--cer-color-purple-950: #3b0764;--cer-color-fuchsia-50: #fdf4ff;--cer-color-fuchsia-100: #fae8ff;--cer-color-fuchsia-200: #f5d0fe;--cer-color-fuchsia-300: #f0abfc;--cer-color-fuchsia-400: #e879f9;--cer-color-fuchsia-500: #d946ef;--cer-color-fuchsia-600: #c026d3;--cer-color-fuchsia-700: #a21caf;--cer-color-fuchsia-800: #86198f;--cer-color-fuchsia-900: #701a75;--cer-color-fuchsia-950: #4a044e;--cer-color-pink-50: #fdf2f8;--cer-color-pink-100: #fce7f3;--cer-color-pink-200: #fbcfe8;--cer-color-pink-300: #f9a8d4;--cer-color-pink-400: #f472b6;--cer-color-pink-500: #ec4899;--cer-color-pink-600: #db2777;--cer-color-pink-700: #be185d;--cer-color-pink-800: #9d174d;--cer-color-pink-900: #831843;--cer-color-pink-950: #500724;--cer-color-rose-50: #fff1f2;--cer-color-rose-100: #ffe4e6;--cer-color-rose-200: #fecdd3;--cer-color-rose-300: #fda4af;--cer-color-rose-400: #fb7185;--cer-color-rose-500: #f43f5e;--cer-color-rose-600: #e11d48;--cer-color-rose-700: #be123c;--cer-color-rose-800: #9f1239;--cer-color-rose-900: #881337;--cer-color-rose-950: #4c0519}@property --cer-rotate{syntax: "<angle>"; initial-value: 0deg; inherits: false;}@property --cer-translate-x{syntax: "<length>"; initial-value: 0px; inherits: false;}@property --cer-translate-y{syntax: "<length>"; initial-value: 0px; inherits: false;}@property --cer-skew-x{syntax: "<angle>"; initial-value: 0deg; inherits: false;}@property --cer-skew-y{syntax: "<angle>"; initial-value: 0deg; inherits: false;}@property --cer-scale-x{syntax: "<number>"; initial-value: 1; inherits: false;}@property --cer-scale-y{syntax: "<number>"; initial-value: 1; inherits: false;}@property --cer-opacity{syntax: "<number>"; initial-value: 1; inherits: false;}
1
+ :root{--cer-font-sans:ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;--cer-font-serif:ui-serif, Georgia, "Times New Roman", Times, serif;--cer-font-mono:ui-monospace, "SFMono-Regular", Menlo, Monaco, "Roboto Mono", "Courier New", monospace;--cer-outline-style:solid;--cer-color-transparent:transparent;--cer-color-current:currentColor;--cer-color-black:#000;--cer-color-white:#fff;--cer-color-inherit:inherit;--cer-color-neutral-50:#fafafa;--cer-color-neutral-100:#f4f4f5;--cer-color-neutral-200:#e4e4e7;--cer-color-neutral-300:#d4d4d8;--cer-color-neutral-400:#9f9fa9;--cer-color-neutral-500:#71717b;--cer-color-neutral-600:#52525c;--cer-color-neutral-700:#3f3f46;--cer-color-neutral-800:#27272a;--cer-color-neutral-900:#18181b;--cer-color-neutral-950:#09090b;--cer-color-primary-50:#eff6ff;--cer-color-primary-100:#dbeafe;--cer-color-primary-200:#bfdbfe;--cer-color-primary-300:#93c5fd;--cer-color-primary-400:#60a5fa;--cer-color-primary-500:#3b82f6;--cer-color-primary-600:#2563eb;--cer-color-primary-700:#1d4ed8;--cer-color-primary-800:#1e40af;--cer-color-primary-900:#1e3a8a;--cer-color-primary-950:#172554;--cer-color-secondary-50:#eef2ff;--cer-color-secondary-100:#e0e7ff;--cer-color-secondary-200:#c7d2fe;--cer-color-secondary-300:#a5b4fc;--cer-color-secondary-400:#818cf8;--cer-color-secondary-500:#6366f1;--cer-color-secondary-600:#4f46e5;--cer-color-secondary-700:#4338ca;--cer-color-secondary-800:#3730a3;--cer-color-secondary-900:#312e81;--cer-color-secondary-950:#1e1b4b;--cer-color-success-50:#f0fdf4;--cer-color-success-100:#dcfce7;--cer-color-success-200:#bbf7d0;--cer-color-success-300:#86efac;--cer-color-success-400:#4ade80;--cer-color-success-500:#22c55e;--cer-color-success-600:#16a34a;--cer-color-success-700:#15803d;--cer-color-success-800:#166534;--cer-color-success-900:#14532d;--cer-color-success-950:#052e16;--cer-color-info-50:#f0f9ff;--cer-color-info-100:#e0f2fe;--cer-color-info-200:#bae6fd;--cer-color-info-300:#7dd3fc;--cer-color-info-400:#38bdf8;--cer-color-info-500:#0ea5e9;--cer-color-info-600:#0284c7;--cer-color-info-700:#0369a1;--cer-color-info-800:#075985;--cer-color-info-900:#0c4a6e;--cer-color-info-950:#082f49;--cer-color-warning-50:#fffbeb;--cer-color-warning-100:#fef3c7;--cer-color-warning-200:#fde68a;--cer-color-warning-300:#fcd34d;--cer-color-warning-400:#fbbf24;--cer-color-warning-500:#f59e0b;--cer-color-warning-600:#d97706;--cer-color-warning-700:#b45309;--cer-color-warning-800:#92400e;--cer-color-warning-900:#78350f;--cer-color-warning-950:#451a03;--cer-color-error-50:#fef2f2;--cer-color-error-100:#fee2e2;--cer-color-error-200:#fecaca;--cer-color-error-300:#fca5a5;--cer-color-error-400:#f87171;--cer-color-error-500:#ef4444;--cer-color-error-600:#dc2626;--cer-color-error-700:#b91c1c;--cer-color-error-800:#991b1b;--cer-color-error-900:#7f1d1d;--cer-color-error-950:#450a0a;--cer-color-slate-50:#f8fafc;--cer-color-slate-100:#f1f5f9;--cer-color-slate-200:#e2e8f0;--cer-color-slate-300:#cbd5e1;--cer-color-slate-400:#94a3b8;--cer-color-slate-500:#64748b;--cer-color-slate-600:#475569;--cer-color-slate-700:#334155;--cer-color-slate-800:#1e293b;--cer-color-slate-900:#0f172a;--cer-color-slate-950:#020617;--cer-color-gray-50:#f9fafb;--cer-color-gray-100:#f3f4f6;--cer-color-gray-200:#e5e7eb;--cer-color-gray-300:#d1d5db;--cer-color-gray-400:#9ca3af;--cer-color-gray-500:#6b7280;--cer-color-gray-600:#4b5563;--cer-color-gray-700:#374151;--cer-color-gray-800:#1f2937;--cer-color-gray-900:#111827;--cer-color-gray-950:#030712;--cer-color-zinc-50:#fafafa;--cer-color-zinc-100:#f4f4f5;--cer-color-zinc-200:#e4e4e7;--cer-color-zinc-300:#d4d4d8;--cer-color-zinc-400:#a1a1aa;--cer-color-zinc-500:#71717a;--cer-color-zinc-600:#52525b;--cer-color-zinc-700:#3f3f46;--cer-color-zinc-800:#27272a;--cer-color-zinc-900:#18181b;--cer-color-zinc-950:#09090b;--cer-color-stone-50:#fafaf9;--cer-color-stone-100:#f5f5f4;--cer-color-stone-200:#e7e5e4;--cer-color-stone-300:#d6d3d1;--cer-color-stone-400:#a8a29e;--cer-color-stone-500:#78716c;--cer-color-stone-600:#57534e;--cer-color-stone-700:#44403c;--cer-color-stone-800:#292524;--cer-color-stone-900:#1c1917;--cer-color-stone-950:#0c0a09;--cer-color-red-50:#fef2f2;--cer-color-red-100:#fee2e2;--cer-color-red-200:#fecaca;--cer-color-red-300:#fca5a5;--cer-color-red-400:#f87171;--cer-color-red-500:#ef4444;--cer-color-red-600:#dc2626;--cer-color-red-700:#b91c1c;--cer-color-red-800:#991b1b;--cer-color-red-900:#7f1d1d;--cer-color-red-950:#450a0a;--cer-color-orange-50:#fff7ed;--cer-color-orange-100:#ffedd5;--cer-color-orange-200:#fed7aa;--cer-color-orange-300:#fdba74;--cer-color-orange-400:#fb923c;--cer-color-orange-500:#f97316;--cer-color-orange-600:#ea580c;--cer-color-orange-700:#c2410c;--cer-color-orange-800:#9a3412;--cer-color-orange-900:#7c2d12;--cer-color-orange-950:#431407;--cer-color-amber-50:#fffbeb;--cer-color-amber-100:#fef3c7;--cer-color-amber-200:#fde68a;--cer-color-amber-300:#fcd34d;--cer-color-amber-400:#fbbf24;--cer-color-amber-500:#f59e0b;--cer-color-amber-600:#d97706;--cer-color-amber-700:#b45309;--cer-color-amber-800:#92400e;--cer-color-amber-900:#78350f;--cer-color-amber-950:#451a03;--cer-color-yellow-50:#fefce8;--cer-color-yellow-100:#fef9c3;--cer-color-yellow-200:#fef08a;--cer-color-yellow-300:#fde047;--cer-color-yellow-400:#facc15;--cer-color-yellow-500:#eab308;--cer-color-yellow-600:#ca8a04;--cer-color-yellow-700:#a16207;--cer-color-yellow-800:#854d0e;--cer-color-yellow-900:#713f12;--cer-color-yellow-950:#422006;--cer-color-lime-50:#f7fee7;--cer-color-lime-100:#ecfccb;--cer-color-lime-200:#d9f99d;--cer-color-lime-300:#bef264;--cer-color-lime-400:#a3e635;--cer-color-lime-500:#84cc16;--cer-color-lime-600:#65a30d;--cer-color-lime-700:#4d7c0f;--cer-color-lime-800:#3f6212;--cer-color-lime-900:#365314;--cer-color-lime-950:#1a2e05;--cer-color-green-50:#f0fdf4;--cer-color-green-100:#dcfce7;--cer-color-green-200:#bbf7d0;--cer-color-green-300:#86efac;--cer-color-green-400:#4ade80;--cer-color-green-500:#22c55e;--cer-color-green-600:#16a34a;--cer-color-green-700:#15803d;--cer-color-green-800:#166534;--cer-color-green-900:#14532d;--cer-color-green-950:#052e16;--cer-color-emerald-50:#ecfdf5;--cer-color-emerald-100:#d1fae5;--cer-color-emerald-200:#a7f3d0;--cer-color-emerald-300:#6ee7b7;--cer-color-emerald-400:#34d399;--cer-color-emerald-500:#10b981;--cer-color-emerald-600:#059669;--cer-color-emerald-700:#047857;--cer-color-emerald-800:#065f46;--cer-color-emerald-900:#064e3b;--cer-color-emerald-950:#022c22;--cer-color-teal-50:#f0fdfa;--cer-color-teal-100:#ccfbf1;--cer-color-teal-200:#99f6e4;--cer-color-teal-300:#5eead4;--cer-color-teal-400:#2dd4bf;--cer-color-teal-500:#14b8a6;--cer-color-teal-600:#0d9488;--cer-color-teal-700:#0f766e;--cer-color-teal-800:#115e59;--cer-color-teal-900:#134e4a;--cer-color-teal-950:#042f2e;--cer-color-cyan-50:#ecfeff;--cer-color-cyan-100:#cffafe;--cer-color-cyan-200:#a5f3fc;--cer-color-cyan-300:#67e8f9;--cer-color-cyan-400:#22d3ee;--cer-color-cyan-500:#06b6d4;--cer-color-cyan-600:#0891b2;--cer-color-cyan-700:#0e7490;--cer-color-cyan-800:#155e75;--cer-color-cyan-900:#164e63;--cer-color-cyan-950:#083344;--cer-color-sky-50:#f0f9ff;--cer-color-sky-100:#e0f2fe;--cer-color-sky-200:#bae6fd;--cer-color-sky-300:#7dd3fc;--cer-color-sky-400:#38bdf8;--cer-color-sky-500:#0ea5e9;--cer-color-sky-600:#0284c7;--cer-color-sky-700:#0369a1;--cer-color-sky-800:#075985;--cer-color-sky-900:#0c4a6e;--cer-color-sky-950:#082f49;--cer-color-blue-50:#eff6ff;--cer-color-blue-100:#dbeafe;--cer-color-blue-200:#bfdbfe;--cer-color-blue-300:#93c5fd;--cer-color-blue-400:#60a5fa;--cer-color-blue-500:#3b82f6;--cer-color-blue-600:#2563eb;--cer-color-blue-700:#1d4ed8;--cer-color-blue-800:#1e40af;--cer-color-blue-900:#1e3a8a;--cer-color-blue-950:#172554;--cer-color-indigo-50:#eef2ff;--cer-color-indigo-100:#e0e7ff;--cer-color-indigo-200:#c7d2fe;--cer-color-indigo-300:#a5b4fc;--cer-color-indigo-400:#818cf8;--cer-color-indigo-500:#6366f1;--cer-color-indigo-600:#4f46e5;--cer-color-indigo-700:#4338ca;--cer-color-indigo-800:#3730a3;--cer-color-indigo-900:#312e81;--cer-color-indigo-950:#1e1b4b;--cer-color-violet-50:#f5f3ff;--cer-color-violet-100:#ede9fe;--cer-color-violet-200:#ddd6fe;--cer-color-violet-300:#c4b5fd;--cer-color-violet-400:#a78bfa;--cer-color-violet-500:#8b5cf6;--cer-color-violet-600:#7c3aed;--cer-color-violet-700:#6d28d9;--cer-color-violet-800:#5b21b6;--cer-color-violet-900:#4c1d95;--cer-color-violet-950:#2e1065;--cer-color-purple-50:#faf5ff;--cer-color-purple-100:#f3e8ff;--cer-color-purple-200:#e9d5ff;--cer-color-purple-300:#d8b4fe;--cer-color-purple-400:#c084fc;--cer-color-purple-500:#a855f7;--cer-color-purple-600:#9333ea;--cer-color-purple-700:#7e22ce;--cer-color-purple-800:#6b21a8;--cer-color-purple-900:#581c87;--cer-color-purple-950:#3b0764;--cer-color-fuchsia-50:#fdf4ff;--cer-color-fuchsia-100:#fae8ff;--cer-color-fuchsia-200:#f5d0fe;--cer-color-fuchsia-300:#f0abfc;--cer-color-fuchsia-400:#e879f9;--cer-color-fuchsia-500:#d946ef;--cer-color-fuchsia-600:#c026d3;--cer-color-fuchsia-700:#a21caf;--cer-color-fuchsia-800:#86198f;--cer-color-fuchsia-900:#701a75;--cer-color-fuchsia-950:#4a044e;--cer-color-pink-50:#fdf2f8;--cer-color-pink-100:#fce7f3;--cer-color-pink-200:#fbcfe8;--cer-color-pink-300:#f9a8d4;--cer-color-pink-400:#f472b6;--cer-color-pink-500:#ec4899;--cer-color-pink-600:#db2777;--cer-color-pink-700:#be185d;--cer-color-pink-800:#9d174d;--cer-color-pink-900:#831843;--cer-color-pink-950:#500724;--cer-color-rose-50:#fff1f2;--cer-color-rose-100:#ffe4e6;--cer-color-rose-200:#fecdd3;--cer-color-rose-300:#fda4af;--cer-color-rose-400:#fb7185;--cer-color-rose-500:#f43f5e;--cer-color-rose-600:#e11d48;--cer-color-rose-700:#be123c;--cer-color-rose-800:#9f1239;--cer-color-rose-900:#881337;--cer-color-rose-950:#4c0519}@property --cer-rotate{syntax:"<angle>";inherits:false;initial-value:0deg}@property --cer-translate-x{syntax:"<length>";inherits:false;initial-value:0}@property --cer-translate-y{syntax:"<length>";inherits:false;initial-value:0}@property --cer-skew-x{syntax:"<angle>";inherits:false;initial-value:0deg}@property --cer-skew-y{syntax:"<angle>";inherits:false;initial-value:0deg}@property --cer-scale-x{syntax:"<number>";inherits:false;initial-value:1}@property --cer-scale-y{syntax:"<number>";inherits:false;initial-value:1}@property --cer-opacity{syntax:"<number>";inherits:false;initial-value:1}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jasonshimmy/custom-elements-runtime",
3
3
  "description": "A powerful, modern, and lightweight runtime for creating reactive web components with TypeScript",
4
- "version": "3.2.0",
4
+ "version": "3.2.1",
5
5
  "type": "module",
6
6
  "keywords": [
7
7
  "web-components",
@@ -40,16 +40,16 @@
40
40
  "@types/jsdom": "^28.0.0",
41
41
  "@typescript-eslint/eslint-plugin": "^8.46.2",
42
42
  "@typescript-eslint/parser": "^8.46.2",
43
- "@vitest/coverage-v8": "^4.0.18",
44
- "cypress": "^15.11.0",
45
- "eslint": "^10.0.2",
43
+ "@vitest/coverage-v8": "^4.1.0",
44
+ "cypress": "^15.12.0",
45
+ "eslint": "^10.0.3",
46
46
  "eslint-config-prettier": "^10.1.8",
47
47
  "eslint-plugin-prettier": "^5.5.5",
48
- "jsdom": "^28.1.0",
48
+ "jsdom": "^29.0.0",
49
49
  "prettier": "^3.8.1",
50
50
  "typescript": "^5.9.3",
51
- "typescript-eslint": "^8.56.1",
52
- "vite": "^7.3.1",
51
+ "typescript-eslint": "^8.57.1",
52
+ "vite": "^8.0.0",
53
53
  "vitest": "^4.0.12"
54
54
  },
55
55
  "main": "dist/custom-elements-runtime.cjs.js",
@@ -1 +0,0 @@
1
- {"version":3,"file":"css-utils-Cg4o1MqY.js","sources":["../src/lib/css/variables.css?raw","../src/lib/runtime/css-utils.ts","../src/lib/runtime/render-bridge.ts"],"sourcesContent":["export default \"/*\\n * Custom Elements Variables CSS\\n * Default fallback values\\n * \\n * Define your overrides in the document's :root to have them\\n * inherited into all Shadow DOM components:\\n * \\n * <style>\\n * :root {\\n * --cer-color-primary-500: #8b5cf6;\\n * --cer-font-sans: 'Inter', sans-serif;\\n * }\\n * </style>\\n * \\n * Note: Only :root is used here (not :host) so document-level\\n * overrides will inherit into Shadow DOM and take precedence.\\n */\\n\\n:root {\\n /* Font families (match runtime defaults in src/lib/runtime/style.ts) */\\n --cer-font-sans:\\n ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,\\n 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;\\n --cer-font-serif: ui-serif, Georgia, 'Times New Roman', Times, serif;\\n --cer-font-mono:\\n ui-monospace, 'SFMono-Regular', Menlo, Monaco, 'Roboto Mono', 'Courier New',\\n monospace;\\n\\n /* Default outline style */\\n --cer-outline-style: solid;\\n\\n /* Colors */\\n --cer-color-transparent: transparent;\\n --cer-color-current: currentColor;\\n --cer-color-black: #000000;\\n --cer-color-white: #ffffff;\\n --cer-color-inherit: inherit;\\n\\n /* neutral */\\n --cer-color-neutral-50: #fafafa;\\n --cer-color-neutral-100: #f4f4f5;\\n --cer-color-neutral-200: #e4e4e7;\\n --cer-color-neutral-300: #d4d4d8;\\n --cer-color-neutral-400: #9f9fa9;\\n --cer-color-neutral-500: #71717b;\\n --cer-color-neutral-600: #52525c;\\n --cer-color-neutral-700: #3f3f46;\\n --cer-color-neutral-800: #27272a;\\n --cer-color-neutral-900: #18181b;\\n --cer-color-neutral-950: #09090b;\\n\\n /* primary */\\n --cer-color-primary-50: #eff6ff;\\n --cer-color-primary-100: #dbeafe;\\n --cer-color-primary-200: #bfdbfe;\\n --cer-color-primary-300: #93c5fd;\\n --cer-color-primary-400: #60a5fa;\\n --cer-color-primary-500: #3b82f6;\\n --cer-color-primary-600: #2563eb;\\n --cer-color-primary-700: #1d4ed8;\\n --cer-color-primary-800: #1e40af;\\n --cer-color-primary-900: #1e3a8a;\\n --cer-color-primary-950: #172554;\\n\\n /* secondary */\\n --cer-color-secondary-50: #eef2ff;\\n --cer-color-secondary-100: #e0e7ff;\\n --cer-color-secondary-200: #c7d2fe;\\n --cer-color-secondary-300: #a5b4fc;\\n --cer-color-secondary-400: #818cf8;\\n --cer-color-secondary-500: #6366f1;\\n --cer-color-secondary-600: #4f46e5;\\n --cer-color-secondary-700: #4338ca;\\n --cer-color-secondary-800: #3730a3;\\n --cer-color-secondary-900: #312e81;\\n --cer-color-secondary-950: #1e1b4b;\\n\\n /* success */\\n --cer-color-success-50: #f0fdf4;\\n --cer-color-success-100: #dcfce7;\\n --cer-color-success-200: #bbf7d0;\\n --cer-color-success-300: #86efac;\\n --cer-color-success-400: #4ade80;\\n --cer-color-success-500: #22c55e;\\n --cer-color-success-600: #16a34a;\\n --cer-color-success-700: #15803d;\\n --cer-color-success-800: #166534;\\n --cer-color-success-900: #14532d;\\n --cer-color-success-950: #052e16;\\n\\n /* info */\\n --cer-color-info-50: #f0f9ff;\\n --cer-color-info-100: #e0f2fe;\\n --cer-color-info-200: #bae6fd;\\n --cer-color-info-300: #7dd3fc;\\n --cer-color-info-400: #38bdf8;\\n --cer-color-info-500: #0ea5e9;\\n --cer-color-info-600: #0284c7;\\n --cer-color-info-700: #0369a1;\\n --cer-color-info-800: #075985;\\n --cer-color-info-900: #0c4a6e;\\n --cer-color-info-950: #082f49;\\n\\n /* warning */\\n --cer-color-warning-50: #fffbeb;\\n --cer-color-warning-100: #fef3c7;\\n --cer-color-warning-200: #fde68a;\\n --cer-color-warning-300: #fcd34d;\\n --cer-color-warning-400: #fbbf24;\\n --cer-color-warning-500: #f59e0b;\\n --cer-color-warning-600: #d97706;\\n --cer-color-warning-700: #b45309;\\n --cer-color-warning-800: #92400e;\\n --cer-color-warning-900: #78350f;\\n --cer-color-warning-950: #451a03;\\n\\n /* error */\\n --cer-color-error-50: #fef2f2;\\n --cer-color-error-100: #fee2e2;\\n --cer-color-error-200: #fecaca;\\n --cer-color-error-300: #fca5a5;\\n --cer-color-error-400: #f87171;\\n --cer-color-error-500: #ef4444;\\n --cer-color-error-600: #dc2626;\\n --cer-color-error-700: #b91c1c;\\n --cer-color-error-800: #991b1b;\\n --cer-color-error-900: #7f1d1d;\\n --cer-color-error-950: #450a0a;\\n\\n /* Extended Tailwind palette — override to theme these colors */\\n /* slate */\\n --cer-color-slate-50: #f8fafc;\\n --cer-color-slate-100: #f1f5f9;\\n --cer-color-slate-200: #e2e8f0;\\n --cer-color-slate-300: #cbd5e1;\\n --cer-color-slate-400: #94a3b8;\\n --cer-color-slate-500: #64748b;\\n --cer-color-slate-600: #475569;\\n --cer-color-slate-700: #334155;\\n --cer-color-slate-800: #1e293b;\\n --cer-color-slate-900: #0f172a;\\n --cer-color-slate-950: #020617;\\n /* gray */\\n --cer-color-gray-50: #f9fafb;\\n --cer-color-gray-100: #f3f4f6;\\n --cer-color-gray-200: #e5e7eb;\\n --cer-color-gray-300: #d1d5db;\\n --cer-color-gray-400: #9ca3af;\\n --cer-color-gray-500: #6b7280;\\n --cer-color-gray-600: #4b5563;\\n --cer-color-gray-700: #374151;\\n --cer-color-gray-800: #1f2937;\\n --cer-color-gray-900: #111827;\\n --cer-color-gray-950: #030712;\\n /* zinc */\\n --cer-color-zinc-50: #fafafa;\\n --cer-color-zinc-100: #f4f4f5;\\n --cer-color-zinc-200: #e4e4e7;\\n --cer-color-zinc-300: #d4d4d8;\\n --cer-color-zinc-400: #a1a1aa;\\n --cer-color-zinc-500: #71717a;\\n --cer-color-zinc-600: #52525b;\\n --cer-color-zinc-700: #3f3f46;\\n --cer-color-zinc-800: #27272a;\\n --cer-color-zinc-900: #18181b;\\n --cer-color-zinc-950: #09090b;\\n /* stone */\\n --cer-color-stone-50: #fafaf9;\\n --cer-color-stone-100: #f5f5f4;\\n --cer-color-stone-200: #e7e5e4;\\n --cer-color-stone-300: #d6d3d1;\\n --cer-color-stone-400: #a8a29e;\\n --cer-color-stone-500: #78716c;\\n --cer-color-stone-600: #57534e;\\n --cer-color-stone-700: #44403c;\\n --cer-color-stone-800: #292524;\\n --cer-color-stone-900: #1c1917;\\n --cer-color-stone-950: #0c0a09;\\n /* red */\\n --cer-color-red-50: #fef2f2;\\n --cer-color-red-100: #fee2e2;\\n --cer-color-red-200: #fecaca;\\n --cer-color-red-300: #fca5a5;\\n --cer-color-red-400: #f87171;\\n --cer-color-red-500: #ef4444;\\n --cer-color-red-600: #dc2626;\\n --cer-color-red-700: #b91c1c;\\n --cer-color-red-800: #991b1b;\\n --cer-color-red-900: #7f1d1d;\\n --cer-color-red-950: #450a0a;\\n /* orange */\\n --cer-color-orange-50: #fff7ed;\\n --cer-color-orange-100: #ffedd5;\\n --cer-color-orange-200: #fed7aa;\\n --cer-color-orange-300: #fdba74;\\n --cer-color-orange-400: #fb923c;\\n --cer-color-orange-500: #f97316;\\n --cer-color-orange-600: #ea580c;\\n --cer-color-orange-700: #c2410c;\\n --cer-color-orange-800: #9a3412;\\n --cer-color-orange-900: #7c2d12;\\n --cer-color-orange-950: #431407;\\n /* amber */\\n --cer-color-amber-50: #fffbeb;\\n --cer-color-amber-100: #fef3c7;\\n --cer-color-amber-200: #fde68a;\\n --cer-color-amber-300: #fcd34d;\\n --cer-color-amber-400: #fbbf24;\\n --cer-color-amber-500: #f59e0b;\\n --cer-color-amber-600: #d97706;\\n --cer-color-amber-700: #b45309;\\n --cer-color-amber-800: #92400e;\\n --cer-color-amber-900: #78350f;\\n --cer-color-amber-950: #451a03;\\n /* yellow */\\n --cer-color-yellow-50: #fefce8;\\n --cer-color-yellow-100: #fef9c3;\\n --cer-color-yellow-200: #fef08a;\\n --cer-color-yellow-300: #fde047;\\n --cer-color-yellow-400: #facc15;\\n --cer-color-yellow-500: #eab308;\\n --cer-color-yellow-600: #ca8a04;\\n --cer-color-yellow-700: #a16207;\\n --cer-color-yellow-800: #854d0e;\\n --cer-color-yellow-900: #713f12;\\n --cer-color-yellow-950: #422006;\\n /* lime */\\n --cer-color-lime-50: #f7fee7;\\n --cer-color-lime-100: #ecfccb;\\n --cer-color-lime-200: #d9f99d;\\n --cer-color-lime-300: #bef264;\\n --cer-color-lime-400: #a3e635;\\n --cer-color-lime-500: #84cc16;\\n --cer-color-lime-600: #65a30d;\\n --cer-color-lime-700: #4d7c0f;\\n --cer-color-lime-800: #3f6212;\\n --cer-color-lime-900: #365314;\\n --cer-color-lime-950: #1a2e05;\\n /* green */\\n --cer-color-green-50: #f0fdf4;\\n --cer-color-green-100: #dcfce7;\\n --cer-color-green-200: #bbf7d0;\\n --cer-color-green-300: #86efac;\\n --cer-color-green-400: #4ade80;\\n --cer-color-green-500: #22c55e;\\n --cer-color-green-600: #16a34a;\\n --cer-color-green-700: #15803d;\\n --cer-color-green-800: #166534;\\n --cer-color-green-900: #14532d;\\n --cer-color-green-950: #052e16;\\n /* emerald */\\n --cer-color-emerald-50: #ecfdf5;\\n --cer-color-emerald-100: #d1fae5;\\n --cer-color-emerald-200: #a7f3d0;\\n --cer-color-emerald-300: #6ee7b7;\\n --cer-color-emerald-400: #34d399;\\n --cer-color-emerald-500: #10b981;\\n --cer-color-emerald-600: #059669;\\n --cer-color-emerald-700: #047857;\\n --cer-color-emerald-800: #065f46;\\n --cer-color-emerald-900: #064e3b;\\n --cer-color-emerald-950: #022c22;\\n /* teal */\\n --cer-color-teal-50: #f0fdfa;\\n --cer-color-teal-100: #ccfbf1;\\n --cer-color-teal-200: #99f6e4;\\n --cer-color-teal-300: #5eead4;\\n --cer-color-teal-400: #2dd4bf;\\n --cer-color-teal-500: #14b8a6;\\n --cer-color-teal-600: #0d9488;\\n --cer-color-teal-700: #0f766e;\\n --cer-color-teal-800: #115e59;\\n --cer-color-teal-900: #134e4a;\\n --cer-color-teal-950: #042f2e;\\n /* cyan */\\n --cer-color-cyan-50: #ecfeff;\\n --cer-color-cyan-100: #cffafe;\\n --cer-color-cyan-200: #a5f3fc;\\n --cer-color-cyan-300: #67e8f9;\\n --cer-color-cyan-400: #22d3ee;\\n --cer-color-cyan-500: #06b6d4;\\n --cer-color-cyan-600: #0891b2;\\n --cer-color-cyan-700: #0e7490;\\n --cer-color-cyan-800: #155e75;\\n --cer-color-cyan-900: #164e63;\\n --cer-color-cyan-950: #083344;\\n /* sky */\\n --cer-color-sky-50: #f0f9ff;\\n --cer-color-sky-100: #e0f2fe;\\n --cer-color-sky-200: #bae6fd;\\n --cer-color-sky-300: #7dd3fc;\\n --cer-color-sky-400: #38bdf8;\\n --cer-color-sky-500: #0ea5e9;\\n --cer-color-sky-600: #0284c7;\\n --cer-color-sky-700: #0369a1;\\n --cer-color-sky-800: #075985;\\n --cer-color-sky-900: #0c4a6e;\\n --cer-color-sky-950: #082f49;\\n /* blue */\\n --cer-color-blue-50: #eff6ff;\\n --cer-color-blue-100: #dbeafe;\\n --cer-color-blue-200: #bfdbfe;\\n --cer-color-blue-300: #93c5fd;\\n --cer-color-blue-400: #60a5fa;\\n --cer-color-blue-500: #3b82f6;\\n --cer-color-blue-600: #2563eb;\\n --cer-color-blue-700: #1d4ed8;\\n --cer-color-blue-800: #1e40af;\\n --cer-color-blue-900: #1e3a8a;\\n --cer-color-blue-950: #172554;\\n /* indigo */\\n --cer-color-indigo-50: #eef2ff;\\n --cer-color-indigo-100: #e0e7ff;\\n --cer-color-indigo-200: #c7d2fe;\\n --cer-color-indigo-300: #a5b4fc;\\n --cer-color-indigo-400: #818cf8;\\n --cer-color-indigo-500: #6366f1;\\n --cer-color-indigo-600: #4f46e5;\\n --cer-color-indigo-700: #4338ca;\\n --cer-color-indigo-800: #3730a3;\\n --cer-color-indigo-900: #312e81;\\n --cer-color-indigo-950: #1e1b4b;\\n /* violet */\\n --cer-color-violet-50: #f5f3ff;\\n --cer-color-violet-100: #ede9fe;\\n --cer-color-violet-200: #ddd6fe;\\n --cer-color-violet-300: #c4b5fd;\\n --cer-color-violet-400: #a78bfa;\\n --cer-color-violet-500: #8b5cf6;\\n --cer-color-violet-600: #7c3aed;\\n --cer-color-violet-700: #6d28d9;\\n --cer-color-violet-800: #5b21b6;\\n --cer-color-violet-900: #4c1d95;\\n --cer-color-violet-950: #2e1065;\\n /* purple */\\n --cer-color-purple-50: #faf5ff;\\n --cer-color-purple-100: #f3e8ff;\\n --cer-color-purple-200: #e9d5ff;\\n --cer-color-purple-300: #d8b4fe;\\n --cer-color-purple-400: #c084fc;\\n --cer-color-purple-500: #a855f7;\\n --cer-color-purple-600: #9333ea;\\n --cer-color-purple-700: #7e22ce;\\n --cer-color-purple-800: #6b21a8;\\n --cer-color-purple-900: #581c87;\\n --cer-color-purple-950: #3b0764;\\n /* fuchsia */\\n --cer-color-fuchsia-50: #fdf4ff;\\n --cer-color-fuchsia-100: #fae8ff;\\n --cer-color-fuchsia-200: #f5d0fe;\\n --cer-color-fuchsia-300: #f0abfc;\\n --cer-color-fuchsia-400: #e879f9;\\n --cer-color-fuchsia-500: #d946ef;\\n --cer-color-fuchsia-600: #c026d3;\\n --cer-color-fuchsia-700: #a21caf;\\n --cer-color-fuchsia-800: #86198f;\\n --cer-color-fuchsia-900: #701a75;\\n --cer-color-fuchsia-950: #4a044e;\\n /* pink */\\n --cer-color-pink-50: #fdf2f8;\\n --cer-color-pink-100: #fce7f3;\\n --cer-color-pink-200: #fbcfe8;\\n --cer-color-pink-300: #f9a8d4;\\n --cer-color-pink-400: #f472b6;\\n --cer-color-pink-500: #ec4899;\\n --cer-color-pink-600: #db2777;\\n --cer-color-pink-700: #be185d;\\n --cer-color-pink-800: #9d174d;\\n --cer-color-pink-900: #831843;\\n --cer-color-pink-950: #500724;\\n /* rose */\\n --cer-color-rose-50: #fff1f2;\\n --cer-color-rose-100: #ffe4e6;\\n --cer-color-rose-200: #fecdd3;\\n --cer-color-rose-300: #fda4af;\\n --cer-color-rose-400: #fb7185;\\n --cer-color-rose-500: #f43f5e;\\n --cer-color-rose-600: #e11d48;\\n --cer-color-rose-700: #be123c;\\n --cer-color-rose-800: #9f1239;\\n --cer-color-rose-900: #881337;\\n --cer-color-rose-950: #4c0519;\\n}\\n\\n/* @property registrations for CSS transition composability */\\n@property --cer-rotate {\\n syntax: '<angle>';\\n initial-value: 0deg;\\n inherits: false;\\n}\\n@property --cer-translate-x {\\n syntax: '<length>';\\n initial-value: 0px;\\n inherits: false;\\n}\\n@property --cer-translate-y {\\n syntax: '<length>';\\n initial-value: 0px;\\n inherits: false;\\n}\\n@property --cer-skew-x {\\n syntax: '<angle>';\\n initial-value: 0deg;\\n inherits: false;\\n}\\n@property --cer-skew-y {\\n syntax: '<angle>';\\n initial-value: 0deg;\\n inherits: false;\\n}\\n@property --cer-scale-x {\\n syntax: '<number>';\\n initial-value: 1;\\n inherits: false;\\n}\\n@property --cer-scale-y {\\n syntax: '<number>';\\n initial-value: 1;\\n inherits: false;\\n}\\n/* Filter composition variables (--cer-blur, --cer-brightness, etc.) intentionally\\n omit @property registration because their \\\"no-op\\\" value is empty string (''),\\n which is not a valid CSS initial-value. They compose correctly without Houdini. */\\n@property --cer-opacity {\\n syntax: '<number>';\\n initial-value: 1;\\n inherits: false;\\n}\\n\"","/**\n * Pure CSS utility functions — no JIT dependencies, no module-level side effects.\n *\n * Extracted so that render.ts and hooks.ts can import lightweight CSS helpers\n * without pulling the entire JIT CSS engine into every consumer's bundle.\n */\n\nimport variables from '../css/variables.css?raw';\n\n/**\n * CSS template literal tag\n */\nexport function css(\n strings: TemplateStringsArray,\n ...values: unknown[]\n): string {\n let result = '';\n for (let i = 0; i < strings.length; i++) {\n result += strings[i];\n if (i < values.length) result += values[i];\n }\n return result;\n}\n\n/**\n * CSS minification utility (basic)\n */\nexport function minifyCSS(input: string): string {\n return input\n .replace(/\\/\\*[\\s\\S]*?\\*\\//g, '')\n .replace(/\\s+/g, ' ')\n .replace(/\\s*([{}:;,>~])\\s*/g, '$1')\n .replace(/;}/g, '}')\n .trim();\n}\n\n/**\n * Sanitize CSS to prevent injection attacks (XSS, javascript: URLs, expression(), etc.)\n */\nexport function sanitizeCSS(input: string): string {\n return input\n // Remove @charset rules (can alter encoding interpretation in some parsers)\n .replace(/@charset\\s+[^;]*;/gi, '')\n // Remove javascript: URL references inside url()\n .replace(/url\\s*\\(\\s*['\"]?javascript:[^)]*\\)/gi, '')\n // Remove data: URI references inside url() (can embed scripts/SVGs)\n .replace(/url\\s*\\(\\s*['\"]?data:[^)]*\\)/gi, '')\n // Remove @import rules (can load external malicious stylesheets)\n .replace(/@import\\s[^;{]*/gi, '')\n // Remove IE-era -moz-binding and behavior properties\n .replace(/-moz-binding\\s*:[^;]*/gi, '')\n .replace(/\\bbehavior\\s*:[^;]*/gi, '')\n // Remove <script> tags that may be injected alongside CSS\n .replace(/<script[\\s\\S]*?>[\\s\\S]*?<\\/script>/gi, '')\n // Remove IE expression() calls\n .replace(/expression\\s*\\([^)]*\\)/gi, '');\n}\n\n/**\n * Polyfill for CSS.escape() for SSR environments.\n * Based on https://drafts.csswg.org/cssom/#serialize-an-identifier\n */\nexport function cssEscape(value: string): string {\n if (typeof CSS !== 'undefined' && CSS.escape) {\n return CSS.escape(value);\n }\n\n const str = String(value);\n const length = str.length;\n let result = '';\n let i = 0;\n\n while (i < length) {\n const char = str.charAt(i);\n const code = str.charCodeAt(i);\n\n if (code === 0x0000) {\n result += '\\uFFFD';\n } else if (\n (code >= 0x0001 && code <= 0x001f) ||\n code === 0x007f ||\n (i === 0 && code >= 0x0030 && code <= 0x0039) ||\n (i === 1 &&\n code >= 0x0030 &&\n code <= 0x0039 &&\n str.charCodeAt(0) === 0x002d)\n ) {\n result += '\\\\' + code.toString(16) + ' ';\n } else if (i === 0 && length === 1 && code === 0x002d) {\n result += '\\\\' + char;\n } else if (\n code >= 0x0080 ||\n code === 0x002d ||\n code === 0x005f ||\n (code >= 0x0030 && code <= 0x0039) ||\n (code >= 0x0041 && code <= 0x005a) ||\n (code >= 0x0061 && code <= 0x007a)\n ) {\n result += char;\n } else {\n result += '\\\\' + char;\n }\n\n i++;\n }\n\n return result;\n}\n\n/** Escape a class name and prefix it with a dot for use in CSS selectors. */\nexport function escapeClassName(name: string): string {\n return '.' + cssEscape(name);\n}\n\n/** Escape a string for use in a RegExp. */\nexport function escapeRegExp(str: string): string {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\n// --- Base reset stylesheet ---\n\nexport const baseReset = css`\n ${variables}\n :host,\n *,\n ::before,\n ::after {\n all: isolate;\n box-sizing: border-box;\n border: 0 solid currentColor;\n margin: 0;\n padding: 0;\n font: inherit;\n vertical-align: baseline;\n background: transparent;\n color: inherit;\n -webkit-tap-highlight-color: transparent;\n /* Transform composition variables (reset per-element for composability) */\n --cer-translate-x: 0px;\n --cer-translate-y: 0px;\n --cer-rotate: 0deg;\n --cer-skew-x: 0deg;\n --cer-skew-y: 0deg;\n --cer-scale-x: 1;\n --cer-scale-y: 1;\n /* Ring variables */\n --cer-ring-color: rgb(59 130 246 / 0.5);\n /* Filter composition variables (empty = no-op in filter chain) */\n --cer-blur: ;\n --cer-brightness: ;\n --cer-contrast: ;\n --cer-grayscale: ;\n --cer-hue-rotate: ;\n --cer-invert: ;\n --cer-saturate: ;\n --cer-sepia: ;\n --cer-drop-shadow: ;\n --cer-backdrop-blur: ;\n --cer-backdrop-brightness: ;\n --cer-backdrop-contrast: ;\n --cer-backdrop-grayscale: ;\n --cer-backdrop-hue-rotate: ;\n --cer-backdrop-invert: ;\n --cer-backdrop-saturate: ;\n --cer-backdrop-sepia: ;\n }\n :host {\n display: contents;\n font: 16px/1.5 var(--cer-font-sans, ui-sans-serif, system-ui, sans-serif);\n /* Default CE line-height variable so leading-* can reliably override */\n --cer-line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n /* Default gradient variables to avoid undefined var() usage in generated utilities */\n --cer-gradient-from-position: 0%;\n --cer-gradient-to-position: 100%;\n --cer-gradient-via-position: 50%;\n --cer-gradient-from: rgba(255, 255, 255, 0);\n --cer-gradient-to: rgba(255, 255, 255, 0);\n --cer-gradient-stops: var(--cer-gradient-from), var(--cer-gradient-to);\n /* Default outline style variable */\n --cer-outline-style: solid;\n }\n button,\n input,\n select,\n textarea {\n background: transparent;\n outline: none;\n }\n textarea {\n resize: vertical;\n }\n progress {\n vertical-align: baseline;\n }\n button,\n textarea {\n overflow: visible;\n }\n img,\n svg,\n video,\n canvas,\n audio,\n iframe,\n embed,\n object {\n display: block;\n max-width: 100%;\n height: auto;\n }\n svg {\n fill: currentColor;\n stroke: none;\n }\n a {\n text-decoration: inherit;\n cursor: pointer;\n }\n button,\n [type='button'],\n [type='reset'],\n [type='submit'] {\n cursor: pointer;\n appearance: button;\n background: none;\n -webkit-user-select: none;\n user-select: none;\n }\n ::-webkit-input-placeholder,\n ::placeholder {\n color: inherit;\n opacity: 0.5;\n }\n *:focus-visible {\n outline: 2px solid var(--cer-color-primary-500, #3b82f6);\n outline-offset: 2px;\n }\n ol,\n ul {\n list-style: none;\n }\n table {\n border-collapse: collapse;\n }\n sub,\n sup {\n font-size: 0.75em;\n line-height: 0;\n position: relative;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n [disabled],\n [aria-disabled='true'] {\n cursor: not-allowed;\n }\n [hidden] {\n display: none;\n }\n`;\n\n/** Default spacing unit used by the JIT spacing scale. */\nexport const spacing = '0.25rem';\n\n// --- Base reset stylesheet singleton ---\n\nlet baseResetSheet: CSSStyleSheet | null = null;\n\nexport function getBaseResetSheet(): CSSStyleSheet {\n if (!baseResetSheet) {\n if (typeof CSSStyleSheet === 'undefined') {\n baseResetSheet = {\n cssRules: [],\n replaceSync: () => {},\n toString: () => minifyCSS(baseReset),\n } as unknown as CSSStyleSheet;\n } else {\n baseResetSheet = new CSSStyleSheet();\n baseResetSheet.replaceSync(minifyCSS(baseReset));\n }\n }\n return baseResetSheet;\n}\n\n/** Reset the base reset sheet singleton (for HMR). @internal */\nexport function _resetBaseResetSheet(): void {\n baseResetSheet = null;\n}\n","/**\n * Lazy render bridge — populated by style.ts when the JIT engine is imported.\n *\n * render.ts always imports this module (so it is always bundled), but\n * style.ts (the full JIT engine, ~24 KB gzip) is only bundled when the\n * consumer explicitly imports JIT CSS symbols such as `enableJITCSS` or\n * `useJITCSS`. When style.ts IS imported it registers itself here so that\n * render.ts can call back into the JIT engine without a static dependency.\n *\n * Result: consumers that never use JIT CSS get zero JIT code in their bundle.\n */\n\ntype JITChecker = (root: ShadowRoot) => boolean;\ntype JITProcessor = (html: string) => string;\ntype ProseSheetGetter = () => CSSStyleSheet | null;\n\nlet _jitChecker: JITChecker | null = null;\nlet _jitProcessor: JITProcessor | null = null;\nlet _proseGetter: ProseSheetGetter | null = null;\n\n/**\n * Register the JIT CSS engine with the render pipeline.\n * Called by style.ts at module load time so renders automatically get\n * JIT processing without render.ts needing to import style.ts directly.\n * @internal\n */\nexport function _registerRenderBridge(\n checker: JITChecker,\n processor: JITProcessor,\n proseGetter: ProseSheetGetter,\n): void {\n _jitChecker = checker;\n _jitProcessor = processor;\n _proseGetter = proseGetter;\n}\n\n/**\n * Returns true when JIT CSS should run for the given shadow root.\n * Returns false if the JIT engine is not loaded.\n */\nexport function isJITCSSActiveFor(root: ShadowRoot): boolean {\n return _jitChecker ? _jitChecker(root) : false;\n}\n\n/**\n * Run JIT CSS processing over the aggregated HTML string.\n * Returns empty string if the JIT engine is not loaded.\n */\nexport function processJITCSS(html: string): string {\n return _jitProcessor ? _jitProcessor(html) : '';\n}\n\n/**\n * Get the prose stylesheet singleton.\n * Returns null if the JIT engine is not loaded or no prose classes detected.\n */\nexport function getProseStyleSheet(): CSSStyleSheet | null {\n return _proseGetter ? _proseGetter() : null;\n}\n"],"names":["variables","css","strings","values","result","i","minifyCSS","input","sanitizeCSS","cssEscape","value","str","length","char","code","escapeClassName","name","escapeRegExp","baseReset","spacing","baseResetSheet","getBaseResetSheet","_jitChecker","_jitProcessor","_proseGetter","_registerRenderBridge","checker","processor","proseGetter","isJITCSSActiveFor","root","processJITCSS","html","getProseStyleSheet"],"mappings":"AAAA,MAAAA,IAAe;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;AAAA;AAAA;AAAA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A,KAGrCE,IAAiB,IAAI,cAAA,GACrBA,EAAe,YAAYd,EAAUY,CAAS,CAAC,KAG5CE;AACT;AClRA,IAAIE,IAAiC,MACjCC,IAAqC,MACrCC,IAAwC;AAQrC,SAASC,EACdC,GACAC,GACAC,GACM;AACN,EAAAN,IAAcI,GACdH,IAAgBI,GAChBH,IAAeI;AACjB;AAMO,SAASC,EAAkBC,GAA2B;AAC3D,SAAOR,IAAcA,EAAYQ,CAAI,IAAI;AAC3C;AAMO,SAASC,EAAcC,GAAsB;AAClD,SAAOT,IAAgBA,EAAcS,CAAI,IAAI;AAC/C;AAMO,SAASC,IAA2C;AACzD,SAAOT,IAAeA,MAAiB;AACzC;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"css-utils-RqkyBWft.cjs","sources":["../src/lib/css/variables.css?raw","../src/lib/runtime/css-utils.ts","../src/lib/runtime/render-bridge.ts"],"sourcesContent":["export default \"/*\\n * Custom Elements Variables CSS\\n * Default fallback values\\n * \\n * Define your overrides in the document's :root to have them\\n * inherited into all Shadow DOM components:\\n * \\n * <style>\\n * :root {\\n * --cer-color-primary-500: #8b5cf6;\\n * --cer-font-sans: 'Inter', sans-serif;\\n * }\\n * </style>\\n * \\n * Note: Only :root is used here (not :host) so document-level\\n * overrides will inherit into Shadow DOM and take precedence.\\n */\\n\\n:root {\\n /* Font families (match runtime defaults in src/lib/runtime/style.ts) */\\n --cer-font-sans:\\n ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,\\n 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;\\n --cer-font-serif: ui-serif, Georgia, 'Times New Roman', Times, serif;\\n --cer-font-mono:\\n ui-monospace, 'SFMono-Regular', Menlo, Monaco, 'Roboto Mono', 'Courier New',\\n monospace;\\n\\n /* Default outline style */\\n --cer-outline-style: solid;\\n\\n /* Colors */\\n --cer-color-transparent: transparent;\\n --cer-color-current: currentColor;\\n --cer-color-black: #000000;\\n --cer-color-white: #ffffff;\\n --cer-color-inherit: inherit;\\n\\n /* neutral */\\n --cer-color-neutral-50: #fafafa;\\n --cer-color-neutral-100: #f4f4f5;\\n --cer-color-neutral-200: #e4e4e7;\\n --cer-color-neutral-300: #d4d4d8;\\n --cer-color-neutral-400: #9f9fa9;\\n --cer-color-neutral-500: #71717b;\\n --cer-color-neutral-600: #52525c;\\n --cer-color-neutral-700: #3f3f46;\\n --cer-color-neutral-800: #27272a;\\n --cer-color-neutral-900: #18181b;\\n --cer-color-neutral-950: #09090b;\\n\\n /* primary */\\n --cer-color-primary-50: #eff6ff;\\n --cer-color-primary-100: #dbeafe;\\n --cer-color-primary-200: #bfdbfe;\\n --cer-color-primary-300: #93c5fd;\\n --cer-color-primary-400: #60a5fa;\\n --cer-color-primary-500: #3b82f6;\\n --cer-color-primary-600: #2563eb;\\n --cer-color-primary-700: #1d4ed8;\\n --cer-color-primary-800: #1e40af;\\n --cer-color-primary-900: #1e3a8a;\\n --cer-color-primary-950: #172554;\\n\\n /* secondary */\\n --cer-color-secondary-50: #eef2ff;\\n --cer-color-secondary-100: #e0e7ff;\\n --cer-color-secondary-200: #c7d2fe;\\n --cer-color-secondary-300: #a5b4fc;\\n --cer-color-secondary-400: #818cf8;\\n --cer-color-secondary-500: #6366f1;\\n --cer-color-secondary-600: #4f46e5;\\n --cer-color-secondary-700: #4338ca;\\n --cer-color-secondary-800: #3730a3;\\n --cer-color-secondary-900: #312e81;\\n --cer-color-secondary-950: #1e1b4b;\\n\\n /* success */\\n --cer-color-success-50: #f0fdf4;\\n --cer-color-success-100: #dcfce7;\\n --cer-color-success-200: #bbf7d0;\\n --cer-color-success-300: #86efac;\\n --cer-color-success-400: #4ade80;\\n --cer-color-success-500: #22c55e;\\n --cer-color-success-600: #16a34a;\\n --cer-color-success-700: #15803d;\\n --cer-color-success-800: #166534;\\n --cer-color-success-900: #14532d;\\n --cer-color-success-950: #052e16;\\n\\n /* info */\\n --cer-color-info-50: #f0f9ff;\\n --cer-color-info-100: #e0f2fe;\\n --cer-color-info-200: #bae6fd;\\n --cer-color-info-300: #7dd3fc;\\n --cer-color-info-400: #38bdf8;\\n --cer-color-info-500: #0ea5e9;\\n --cer-color-info-600: #0284c7;\\n --cer-color-info-700: #0369a1;\\n --cer-color-info-800: #075985;\\n --cer-color-info-900: #0c4a6e;\\n --cer-color-info-950: #082f49;\\n\\n /* warning */\\n --cer-color-warning-50: #fffbeb;\\n --cer-color-warning-100: #fef3c7;\\n --cer-color-warning-200: #fde68a;\\n --cer-color-warning-300: #fcd34d;\\n --cer-color-warning-400: #fbbf24;\\n --cer-color-warning-500: #f59e0b;\\n --cer-color-warning-600: #d97706;\\n --cer-color-warning-700: #b45309;\\n --cer-color-warning-800: #92400e;\\n --cer-color-warning-900: #78350f;\\n --cer-color-warning-950: #451a03;\\n\\n /* error */\\n --cer-color-error-50: #fef2f2;\\n --cer-color-error-100: #fee2e2;\\n --cer-color-error-200: #fecaca;\\n --cer-color-error-300: #fca5a5;\\n --cer-color-error-400: #f87171;\\n --cer-color-error-500: #ef4444;\\n --cer-color-error-600: #dc2626;\\n --cer-color-error-700: #b91c1c;\\n --cer-color-error-800: #991b1b;\\n --cer-color-error-900: #7f1d1d;\\n --cer-color-error-950: #450a0a;\\n\\n /* Extended Tailwind palette — override to theme these colors */\\n /* slate */\\n --cer-color-slate-50: #f8fafc;\\n --cer-color-slate-100: #f1f5f9;\\n --cer-color-slate-200: #e2e8f0;\\n --cer-color-slate-300: #cbd5e1;\\n --cer-color-slate-400: #94a3b8;\\n --cer-color-slate-500: #64748b;\\n --cer-color-slate-600: #475569;\\n --cer-color-slate-700: #334155;\\n --cer-color-slate-800: #1e293b;\\n --cer-color-slate-900: #0f172a;\\n --cer-color-slate-950: #020617;\\n /* gray */\\n --cer-color-gray-50: #f9fafb;\\n --cer-color-gray-100: #f3f4f6;\\n --cer-color-gray-200: #e5e7eb;\\n --cer-color-gray-300: #d1d5db;\\n --cer-color-gray-400: #9ca3af;\\n --cer-color-gray-500: #6b7280;\\n --cer-color-gray-600: #4b5563;\\n --cer-color-gray-700: #374151;\\n --cer-color-gray-800: #1f2937;\\n --cer-color-gray-900: #111827;\\n --cer-color-gray-950: #030712;\\n /* zinc */\\n --cer-color-zinc-50: #fafafa;\\n --cer-color-zinc-100: #f4f4f5;\\n --cer-color-zinc-200: #e4e4e7;\\n --cer-color-zinc-300: #d4d4d8;\\n --cer-color-zinc-400: #a1a1aa;\\n --cer-color-zinc-500: #71717a;\\n --cer-color-zinc-600: #52525b;\\n --cer-color-zinc-700: #3f3f46;\\n --cer-color-zinc-800: #27272a;\\n --cer-color-zinc-900: #18181b;\\n --cer-color-zinc-950: #09090b;\\n /* stone */\\n --cer-color-stone-50: #fafaf9;\\n --cer-color-stone-100: #f5f5f4;\\n --cer-color-stone-200: #e7e5e4;\\n --cer-color-stone-300: #d6d3d1;\\n --cer-color-stone-400: #a8a29e;\\n --cer-color-stone-500: #78716c;\\n --cer-color-stone-600: #57534e;\\n --cer-color-stone-700: #44403c;\\n --cer-color-stone-800: #292524;\\n --cer-color-stone-900: #1c1917;\\n --cer-color-stone-950: #0c0a09;\\n /* red */\\n --cer-color-red-50: #fef2f2;\\n --cer-color-red-100: #fee2e2;\\n --cer-color-red-200: #fecaca;\\n --cer-color-red-300: #fca5a5;\\n --cer-color-red-400: #f87171;\\n --cer-color-red-500: #ef4444;\\n --cer-color-red-600: #dc2626;\\n --cer-color-red-700: #b91c1c;\\n --cer-color-red-800: #991b1b;\\n --cer-color-red-900: #7f1d1d;\\n --cer-color-red-950: #450a0a;\\n /* orange */\\n --cer-color-orange-50: #fff7ed;\\n --cer-color-orange-100: #ffedd5;\\n --cer-color-orange-200: #fed7aa;\\n --cer-color-orange-300: #fdba74;\\n --cer-color-orange-400: #fb923c;\\n --cer-color-orange-500: #f97316;\\n --cer-color-orange-600: #ea580c;\\n --cer-color-orange-700: #c2410c;\\n --cer-color-orange-800: #9a3412;\\n --cer-color-orange-900: #7c2d12;\\n --cer-color-orange-950: #431407;\\n /* amber */\\n --cer-color-amber-50: #fffbeb;\\n --cer-color-amber-100: #fef3c7;\\n --cer-color-amber-200: #fde68a;\\n --cer-color-amber-300: #fcd34d;\\n --cer-color-amber-400: #fbbf24;\\n --cer-color-amber-500: #f59e0b;\\n --cer-color-amber-600: #d97706;\\n --cer-color-amber-700: #b45309;\\n --cer-color-amber-800: #92400e;\\n --cer-color-amber-900: #78350f;\\n --cer-color-amber-950: #451a03;\\n /* yellow */\\n --cer-color-yellow-50: #fefce8;\\n --cer-color-yellow-100: #fef9c3;\\n --cer-color-yellow-200: #fef08a;\\n --cer-color-yellow-300: #fde047;\\n --cer-color-yellow-400: #facc15;\\n --cer-color-yellow-500: #eab308;\\n --cer-color-yellow-600: #ca8a04;\\n --cer-color-yellow-700: #a16207;\\n --cer-color-yellow-800: #854d0e;\\n --cer-color-yellow-900: #713f12;\\n --cer-color-yellow-950: #422006;\\n /* lime */\\n --cer-color-lime-50: #f7fee7;\\n --cer-color-lime-100: #ecfccb;\\n --cer-color-lime-200: #d9f99d;\\n --cer-color-lime-300: #bef264;\\n --cer-color-lime-400: #a3e635;\\n --cer-color-lime-500: #84cc16;\\n --cer-color-lime-600: #65a30d;\\n --cer-color-lime-700: #4d7c0f;\\n --cer-color-lime-800: #3f6212;\\n --cer-color-lime-900: #365314;\\n --cer-color-lime-950: #1a2e05;\\n /* green */\\n --cer-color-green-50: #f0fdf4;\\n --cer-color-green-100: #dcfce7;\\n --cer-color-green-200: #bbf7d0;\\n --cer-color-green-300: #86efac;\\n --cer-color-green-400: #4ade80;\\n --cer-color-green-500: #22c55e;\\n --cer-color-green-600: #16a34a;\\n --cer-color-green-700: #15803d;\\n --cer-color-green-800: #166534;\\n --cer-color-green-900: #14532d;\\n --cer-color-green-950: #052e16;\\n /* emerald */\\n --cer-color-emerald-50: #ecfdf5;\\n --cer-color-emerald-100: #d1fae5;\\n --cer-color-emerald-200: #a7f3d0;\\n --cer-color-emerald-300: #6ee7b7;\\n --cer-color-emerald-400: #34d399;\\n --cer-color-emerald-500: #10b981;\\n --cer-color-emerald-600: #059669;\\n --cer-color-emerald-700: #047857;\\n --cer-color-emerald-800: #065f46;\\n --cer-color-emerald-900: #064e3b;\\n --cer-color-emerald-950: #022c22;\\n /* teal */\\n --cer-color-teal-50: #f0fdfa;\\n --cer-color-teal-100: #ccfbf1;\\n --cer-color-teal-200: #99f6e4;\\n --cer-color-teal-300: #5eead4;\\n --cer-color-teal-400: #2dd4bf;\\n --cer-color-teal-500: #14b8a6;\\n --cer-color-teal-600: #0d9488;\\n --cer-color-teal-700: #0f766e;\\n --cer-color-teal-800: #115e59;\\n --cer-color-teal-900: #134e4a;\\n --cer-color-teal-950: #042f2e;\\n /* cyan */\\n --cer-color-cyan-50: #ecfeff;\\n --cer-color-cyan-100: #cffafe;\\n --cer-color-cyan-200: #a5f3fc;\\n --cer-color-cyan-300: #67e8f9;\\n --cer-color-cyan-400: #22d3ee;\\n --cer-color-cyan-500: #06b6d4;\\n --cer-color-cyan-600: #0891b2;\\n --cer-color-cyan-700: #0e7490;\\n --cer-color-cyan-800: #155e75;\\n --cer-color-cyan-900: #164e63;\\n --cer-color-cyan-950: #083344;\\n /* sky */\\n --cer-color-sky-50: #f0f9ff;\\n --cer-color-sky-100: #e0f2fe;\\n --cer-color-sky-200: #bae6fd;\\n --cer-color-sky-300: #7dd3fc;\\n --cer-color-sky-400: #38bdf8;\\n --cer-color-sky-500: #0ea5e9;\\n --cer-color-sky-600: #0284c7;\\n --cer-color-sky-700: #0369a1;\\n --cer-color-sky-800: #075985;\\n --cer-color-sky-900: #0c4a6e;\\n --cer-color-sky-950: #082f49;\\n /* blue */\\n --cer-color-blue-50: #eff6ff;\\n --cer-color-blue-100: #dbeafe;\\n --cer-color-blue-200: #bfdbfe;\\n --cer-color-blue-300: #93c5fd;\\n --cer-color-blue-400: #60a5fa;\\n --cer-color-blue-500: #3b82f6;\\n --cer-color-blue-600: #2563eb;\\n --cer-color-blue-700: #1d4ed8;\\n --cer-color-blue-800: #1e40af;\\n --cer-color-blue-900: #1e3a8a;\\n --cer-color-blue-950: #172554;\\n /* indigo */\\n --cer-color-indigo-50: #eef2ff;\\n --cer-color-indigo-100: #e0e7ff;\\n --cer-color-indigo-200: #c7d2fe;\\n --cer-color-indigo-300: #a5b4fc;\\n --cer-color-indigo-400: #818cf8;\\n --cer-color-indigo-500: #6366f1;\\n --cer-color-indigo-600: #4f46e5;\\n --cer-color-indigo-700: #4338ca;\\n --cer-color-indigo-800: #3730a3;\\n --cer-color-indigo-900: #312e81;\\n --cer-color-indigo-950: #1e1b4b;\\n /* violet */\\n --cer-color-violet-50: #f5f3ff;\\n --cer-color-violet-100: #ede9fe;\\n --cer-color-violet-200: #ddd6fe;\\n --cer-color-violet-300: #c4b5fd;\\n --cer-color-violet-400: #a78bfa;\\n --cer-color-violet-500: #8b5cf6;\\n --cer-color-violet-600: #7c3aed;\\n --cer-color-violet-700: #6d28d9;\\n --cer-color-violet-800: #5b21b6;\\n --cer-color-violet-900: #4c1d95;\\n --cer-color-violet-950: #2e1065;\\n /* purple */\\n --cer-color-purple-50: #faf5ff;\\n --cer-color-purple-100: #f3e8ff;\\n --cer-color-purple-200: #e9d5ff;\\n --cer-color-purple-300: #d8b4fe;\\n --cer-color-purple-400: #c084fc;\\n --cer-color-purple-500: #a855f7;\\n --cer-color-purple-600: #9333ea;\\n --cer-color-purple-700: #7e22ce;\\n --cer-color-purple-800: #6b21a8;\\n --cer-color-purple-900: #581c87;\\n --cer-color-purple-950: #3b0764;\\n /* fuchsia */\\n --cer-color-fuchsia-50: #fdf4ff;\\n --cer-color-fuchsia-100: #fae8ff;\\n --cer-color-fuchsia-200: #f5d0fe;\\n --cer-color-fuchsia-300: #f0abfc;\\n --cer-color-fuchsia-400: #e879f9;\\n --cer-color-fuchsia-500: #d946ef;\\n --cer-color-fuchsia-600: #c026d3;\\n --cer-color-fuchsia-700: #a21caf;\\n --cer-color-fuchsia-800: #86198f;\\n --cer-color-fuchsia-900: #701a75;\\n --cer-color-fuchsia-950: #4a044e;\\n /* pink */\\n --cer-color-pink-50: #fdf2f8;\\n --cer-color-pink-100: #fce7f3;\\n --cer-color-pink-200: #fbcfe8;\\n --cer-color-pink-300: #f9a8d4;\\n --cer-color-pink-400: #f472b6;\\n --cer-color-pink-500: #ec4899;\\n --cer-color-pink-600: #db2777;\\n --cer-color-pink-700: #be185d;\\n --cer-color-pink-800: #9d174d;\\n --cer-color-pink-900: #831843;\\n --cer-color-pink-950: #500724;\\n /* rose */\\n --cer-color-rose-50: #fff1f2;\\n --cer-color-rose-100: #ffe4e6;\\n --cer-color-rose-200: #fecdd3;\\n --cer-color-rose-300: #fda4af;\\n --cer-color-rose-400: #fb7185;\\n --cer-color-rose-500: #f43f5e;\\n --cer-color-rose-600: #e11d48;\\n --cer-color-rose-700: #be123c;\\n --cer-color-rose-800: #9f1239;\\n --cer-color-rose-900: #881337;\\n --cer-color-rose-950: #4c0519;\\n}\\n\\n/* @property registrations for CSS transition composability */\\n@property --cer-rotate {\\n syntax: '<angle>';\\n initial-value: 0deg;\\n inherits: false;\\n}\\n@property --cer-translate-x {\\n syntax: '<length>';\\n initial-value: 0px;\\n inherits: false;\\n}\\n@property --cer-translate-y {\\n syntax: '<length>';\\n initial-value: 0px;\\n inherits: false;\\n}\\n@property --cer-skew-x {\\n syntax: '<angle>';\\n initial-value: 0deg;\\n inherits: false;\\n}\\n@property --cer-skew-y {\\n syntax: '<angle>';\\n initial-value: 0deg;\\n inherits: false;\\n}\\n@property --cer-scale-x {\\n syntax: '<number>';\\n initial-value: 1;\\n inherits: false;\\n}\\n@property --cer-scale-y {\\n syntax: '<number>';\\n initial-value: 1;\\n inherits: false;\\n}\\n/* Filter composition variables (--cer-blur, --cer-brightness, etc.) intentionally\\n omit @property registration because their \\\"no-op\\\" value is empty string (''),\\n which is not a valid CSS initial-value. They compose correctly without Houdini. */\\n@property --cer-opacity {\\n syntax: '<number>';\\n initial-value: 1;\\n inherits: false;\\n}\\n\"","/**\n * Pure CSS utility functions — no JIT dependencies, no module-level side effects.\n *\n * Extracted so that render.ts and hooks.ts can import lightweight CSS helpers\n * without pulling the entire JIT CSS engine into every consumer's bundle.\n */\n\nimport variables from '../css/variables.css?raw';\n\n/**\n * CSS template literal tag\n */\nexport function css(\n strings: TemplateStringsArray,\n ...values: unknown[]\n): string {\n let result = '';\n for (let i = 0; i < strings.length; i++) {\n result += strings[i];\n if (i < values.length) result += values[i];\n }\n return result;\n}\n\n/**\n * CSS minification utility (basic)\n */\nexport function minifyCSS(input: string): string {\n return input\n .replace(/\\/\\*[\\s\\S]*?\\*\\//g, '')\n .replace(/\\s+/g, ' ')\n .replace(/\\s*([{}:;,>~])\\s*/g, '$1')\n .replace(/;}/g, '}')\n .trim();\n}\n\n/**\n * Sanitize CSS to prevent injection attacks (XSS, javascript: URLs, expression(), etc.)\n */\nexport function sanitizeCSS(input: string): string {\n return input\n // Remove @charset rules (can alter encoding interpretation in some parsers)\n .replace(/@charset\\s+[^;]*;/gi, '')\n // Remove javascript: URL references inside url()\n .replace(/url\\s*\\(\\s*['\"]?javascript:[^)]*\\)/gi, '')\n // Remove data: URI references inside url() (can embed scripts/SVGs)\n .replace(/url\\s*\\(\\s*['\"]?data:[^)]*\\)/gi, '')\n // Remove @import rules (can load external malicious stylesheets)\n .replace(/@import\\s[^;{]*/gi, '')\n // Remove IE-era -moz-binding and behavior properties\n .replace(/-moz-binding\\s*:[^;]*/gi, '')\n .replace(/\\bbehavior\\s*:[^;]*/gi, '')\n // Remove <script> tags that may be injected alongside CSS\n .replace(/<script[\\s\\S]*?>[\\s\\S]*?<\\/script>/gi, '')\n // Remove IE expression() calls\n .replace(/expression\\s*\\([^)]*\\)/gi, '');\n}\n\n/**\n * Polyfill for CSS.escape() for SSR environments.\n * Based on https://drafts.csswg.org/cssom/#serialize-an-identifier\n */\nexport function cssEscape(value: string): string {\n if (typeof CSS !== 'undefined' && CSS.escape) {\n return CSS.escape(value);\n }\n\n const str = String(value);\n const length = str.length;\n let result = '';\n let i = 0;\n\n while (i < length) {\n const char = str.charAt(i);\n const code = str.charCodeAt(i);\n\n if (code === 0x0000) {\n result += '\\uFFFD';\n } else if (\n (code >= 0x0001 && code <= 0x001f) ||\n code === 0x007f ||\n (i === 0 && code >= 0x0030 && code <= 0x0039) ||\n (i === 1 &&\n code >= 0x0030 &&\n code <= 0x0039 &&\n str.charCodeAt(0) === 0x002d)\n ) {\n result += '\\\\' + code.toString(16) + ' ';\n } else if (i === 0 && length === 1 && code === 0x002d) {\n result += '\\\\' + char;\n } else if (\n code >= 0x0080 ||\n code === 0x002d ||\n code === 0x005f ||\n (code >= 0x0030 && code <= 0x0039) ||\n (code >= 0x0041 && code <= 0x005a) ||\n (code >= 0x0061 && code <= 0x007a)\n ) {\n result += char;\n } else {\n result += '\\\\' + char;\n }\n\n i++;\n }\n\n return result;\n}\n\n/** Escape a class name and prefix it with a dot for use in CSS selectors. */\nexport function escapeClassName(name: string): string {\n return '.' + cssEscape(name);\n}\n\n/** Escape a string for use in a RegExp. */\nexport function escapeRegExp(str: string): string {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\n// --- Base reset stylesheet ---\n\nexport const baseReset = css`\n ${variables}\n :host,\n *,\n ::before,\n ::after {\n all: isolate;\n box-sizing: border-box;\n border: 0 solid currentColor;\n margin: 0;\n padding: 0;\n font: inherit;\n vertical-align: baseline;\n background: transparent;\n color: inherit;\n -webkit-tap-highlight-color: transparent;\n /* Transform composition variables (reset per-element for composability) */\n --cer-translate-x: 0px;\n --cer-translate-y: 0px;\n --cer-rotate: 0deg;\n --cer-skew-x: 0deg;\n --cer-skew-y: 0deg;\n --cer-scale-x: 1;\n --cer-scale-y: 1;\n /* Ring variables */\n --cer-ring-color: rgb(59 130 246 / 0.5);\n /* Filter composition variables (empty = no-op in filter chain) */\n --cer-blur: ;\n --cer-brightness: ;\n --cer-contrast: ;\n --cer-grayscale: ;\n --cer-hue-rotate: ;\n --cer-invert: ;\n --cer-saturate: ;\n --cer-sepia: ;\n --cer-drop-shadow: ;\n --cer-backdrop-blur: ;\n --cer-backdrop-brightness: ;\n --cer-backdrop-contrast: ;\n --cer-backdrop-grayscale: ;\n --cer-backdrop-hue-rotate: ;\n --cer-backdrop-invert: ;\n --cer-backdrop-saturate: ;\n --cer-backdrop-sepia: ;\n }\n :host {\n display: contents;\n font: 16px/1.5 var(--cer-font-sans, ui-sans-serif, system-ui, sans-serif);\n /* Default CE line-height variable so leading-* can reliably override */\n --cer-line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n /* Default gradient variables to avoid undefined var() usage in generated utilities */\n --cer-gradient-from-position: 0%;\n --cer-gradient-to-position: 100%;\n --cer-gradient-via-position: 50%;\n --cer-gradient-from: rgba(255, 255, 255, 0);\n --cer-gradient-to: rgba(255, 255, 255, 0);\n --cer-gradient-stops: var(--cer-gradient-from), var(--cer-gradient-to);\n /* Default outline style variable */\n --cer-outline-style: solid;\n }\n button,\n input,\n select,\n textarea {\n background: transparent;\n outline: none;\n }\n textarea {\n resize: vertical;\n }\n progress {\n vertical-align: baseline;\n }\n button,\n textarea {\n overflow: visible;\n }\n img,\n svg,\n video,\n canvas,\n audio,\n iframe,\n embed,\n object {\n display: block;\n max-width: 100%;\n height: auto;\n }\n svg {\n fill: currentColor;\n stroke: none;\n }\n a {\n text-decoration: inherit;\n cursor: pointer;\n }\n button,\n [type='button'],\n [type='reset'],\n [type='submit'] {\n cursor: pointer;\n appearance: button;\n background: none;\n -webkit-user-select: none;\n user-select: none;\n }\n ::-webkit-input-placeholder,\n ::placeholder {\n color: inherit;\n opacity: 0.5;\n }\n *:focus-visible {\n outline: 2px solid var(--cer-color-primary-500, #3b82f6);\n outline-offset: 2px;\n }\n ol,\n ul {\n list-style: none;\n }\n table {\n border-collapse: collapse;\n }\n sub,\n sup {\n font-size: 0.75em;\n line-height: 0;\n position: relative;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n [disabled],\n [aria-disabled='true'] {\n cursor: not-allowed;\n }\n [hidden] {\n display: none;\n }\n`;\n\n/** Default spacing unit used by the JIT spacing scale. */\nexport const spacing = '0.25rem';\n\n// --- Base reset stylesheet singleton ---\n\nlet baseResetSheet: CSSStyleSheet | null = null;\n\nexport function getBaseResetSheet(): CSSStyleSheet {\n if (!baseResetSheet) {\n if (typeof CSSStyleSheet === 'undefined') {\n baseResetSheet = {\n cssRules: [],\n replaceSync: () => {},\n toString: () => minifyCSS(baseReset),\n } as unknown as CSSStyleSheet;\n } else {\n baseResetSheet = new CSSStyleSheet();\n baseResetSheet.replaceSync(minifyCSS(baseReset));\n }\n }\n return baseResetSheet;\n}\n\n/** Reset the base reset sheet singleton (for HMR). @internal */\nexport function _resetBaseResetSheet(): void {\n baseResetSheet = null;\n}\n","/**\n * Lazy render bridge — populated by style.ts when the JIT engine is imported.\n *\n * render.ts always imports this module (so it is always bundled), but\n * style.ts (the full JIT engine, ~24 KB gzip) is only bundled when the\n * consumer explicitly imports JIT CSS symbols such as `enableJITCSS` or\n * `useJITCSS`. When style.ts IS imported it registers itself here so that\n * render.ts can call back into the JIT engine without a static dependency.\n *\n * Result: consumers that never use JIT CSS get zero JIT code in their bundle.\n */\n\ntype JITChecker = (root: ShadowRoot) => boolean;\ntype JITProcessor = (html: string) => string;\ntype ProseSheetGetter = () => CSSStyleSheet | null;\n\nlet _jitChecker: JITChecker | null = null;\nlet _jitProcessor: JITProcessor | null = null;\nlet _proseGetter: ProseSheetGetter | null = null;\n\n/**\n * Register the JIT CSS engine with the render pipeline.\n * Called by style.ts at module load time so renders automatically get\n * JIT processing without render.ts needing to import style.ts directly.\n * @internal\n */\nexport function _registerRenderBridge(\n checker: JITChecker,\n processor: JITProcessor,\n proseGetter: ProseSheetGetter,\n): void {\n _jitChecker = checker;\n _jitProcessor = processor;\n _proseGetter = proseGetter;\n}\n\n/**\n * Returns true when JIT CSS should run for the given shadow root.\n * Returns false if the JIT engine is not loaded.\n */\nexport function isJITCSSActiveFor(root: ShadowRoot): boolean {\n return _jitChecker ? _jitChecker(root) : false;\n}\n\n/**\n * Run JIT CSS processing over the aggregated HTML string.\n * Returns empty string if the JIT engine is not loaded.\n */\nexport function processJITCSS(html: string): string {\n return _jitProcessor ? _jitProcessor(html) : '';\n}\n\n/**\n * Get the prose stylesheet singleton.\n * Returns null if the JIT engine is not loaded or no prose classes detected.\n */\nexport function getProseStyleSheet(): CSSStyleSheet | null {\n return _proseGetter ? _proseGetter() : null;\n}\n"],"names":["variables","css","strings","values","result","i","minifyCSS","input","sanitizeCSS","cssEscape","value","str","length","char","code","escapeClassName","name","escapeRegExp","baseReset","spacing","baseResetSheet","getBaseResetSheet","_jitChecker","_jitProcessor","_proseGetter","_registerRenderBridge","checker","processor","proseGetter","isJITCSSActiveFor","root","processJITCSS","html","getProseStyleSheet"],"mappings":"aAAA,MAAAA,EAAe;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;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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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,OAAOT,EAAeA,IAAiB,IACzC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"custom-elements-runtime.ssr.cjs.js","sources":["../src/lib/runtime/ssr-utils.ts","../src/lib/runtime/vdom-ssr.ts","../src/lib/runtime/vdom-ssr-dsd.ts","../src/lib/ssr.ts"],"sourcesContent":["/**\n * Shared utilities for SSR renderers.\n * Imported by vdom-ssr.ts and vdom-ssr-dsd.ts to avoid duplication.\n */\nimport { escapeHTML } from './helpers';\nimport { TAG_NAMESPACE_MAP, SVG_NS } from './namespace-helpers';\n\nexport type RenderOptions = {\n /** Backwards-compatible: whether to inject the SVG namespace on <svg> nodes (default true) */\n injectSvgNamespace?: boolean;\n /** Inject known well-known namespaces for tags like <math> when missing (default follows injectSvgNamespace) */\n injectKnownNamespaces?: boolean;\n};\n\nexport const VOID_ELEMENTS = new Set([\n 'area',\n 'base',\n 'br',\n 'col',\n 'embed',\n 'hr',\n 'img',\n 'input',\n 'link',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr',\n]);\n\nexport function buildAttrs(\n attrs: Record<string, unknown>,\n tag: string,\n opts: RenderOptions,\n): string {\n const inject = opts.injectSvgNamespace ?? true;\n const injectKnown = opts.injectKnownNamespaces ?? inject;\n const merged = { ...attrs };\n\n if (inject && tag === 'svg' && !('xmlns' in merged)) {\n merged['xmlns'] = SVG_NS;\n } else if (injectKnown && tag in TAG_NAMESPACE_MAP && !('xmlns' in merged)) {\n merged['xmlns'] = TAG_NAMESPACE_MAP[tag];\n }\n\n return Object.entries(merged)\n .map(([k, v]) => ` ${k}=\"${escapeHTML(String(v))}\"`)\n .join('');\n}\n\nexport function buildRawAttrs(attrs: Record<string, unknown>): string {\n return Object.entries(attrs)\n .map(([k, v]) => ` ${k}=\"${escapeHTML(String(v))}\"`)\n .join('');\n}\n","import type { VNode } from './types';\nimport { escapeHTML } from './helpers';\nimport { VOID_ELEMENTS, buildAttrs, type RenderOptions } from './ssr-utils';\n\n/**\n * Render a VNode to a string (SSR).\n * Kept intentionally minimal: only serializes attributes under `props.attrs`\n * to avoid leaking runtime-only values (functions, reactive state, directives).\n * @param vnode The virtual node to render.\n * @returns The rendered HTML string.\n */\nexport type { RenderOptions } from './ssr-utils';\n\nexport function renderToString(vnode: VNode, opts?: RenderOptions): string {\n if (typeof vnode === 'string') return escapeHTML(vnode) as string;\n\n if (vnode.tag === '#text') {\n return typeof vnode.children === 'string'\n ? (escapeHTML(vnode.children) as string)\n : '';\n }\n\n if (vnode.tag === '#anchor') {\n // Preserve meaningful falsy children (0, false, '') while filtering out\n // only null and undefined. Anchor blocks are normalized by the compiler\n // to exclude null/undefined; SSR should follow the same rule to avoid\n // hydration mismatches where falsy values are significant.\n const children = Array.isArray(vnode.children)\n ? vnode.children.filter((c) => c !== null && c !== undefined)\n : [];\n return children.map((c) => renderToString(c, opts)).join('');\n }\n\n if (vnode.tag === '#raw') {\n return typeof vnode.children === 'string' ? vnode.children : '';\n }\n\n // Collect attributes from props.attrs. For SSR we mirror vnode.attrs\n // but ensure SVG nodes behave like client-side: if this is an <svg>\n // and no xmlns was provided, inject the standard SVG namespace so\n // server markup matches client-created DOM namespace.\n const attrsObj: Record<string, unknown> = vnode.props?.attrs\n ? { ...vnode.props.attrs }\n : {};\n\n const attrsString = buildAttrs(attrsObj, vnode.tag, opts ?? {});\n\n // Handle void elements (self-closing tags)\n if (VOID_ELEMENTS.has(vnode.tag)) {\n return `<${vnode.tag}${attrsString}>`;\n }\n\n const children = Array.isArray(vnode.children)\n ? vnode.children\n .filter((c) => c !== null && c !== undefined)\n .map((c) => renderToString(c, opts))\n .join('')\n : typeof vnode.children === 'string'\n ? escapeHTML(vnode.children)\n : vnode.children\n ? renderToString(vnode.children, opts)\n : '';\n\n return `<${vnode.tag}${attrsString}>${children}</${vnode.tag}>`;\n}\n","/**\n * Declarative Shadow DOM (DSD) SSR renderer.\n *\n * When `dsd: true` is passed to the render options, registered custom elements\n * are serialised as:\n *\n * ```html\n * <my-element attr=\"val\">\n * <template shadowrootmode=\"open\">\n * <style>\n * /* baseReset + useStyle() output + JIT utility CSS *\\/\n * </style>\n * <!-- shadow DOM from component render function -->\n * </template>\n * <!-- light DOM / slotted children from vnode.children -->\n * </my-element>\n * ```\n *\n * The browser parses the `<template shadowrootmode=\"open\">` block and attaches\n * a real shadow root before any JavaScript executes. All CSS layers are present\n * at first paint — eliminating both FOUC and layout shift.\n *\n * Non-custom-element VNodes are rendered identically to renderToString() but\n * with DSD recursion active for any custom elements nested inside them.\n */\n\nimport type { VNode } from './types';\nimport { renderToString } from './vdom-ssr';\nimport { VOID_ELEMENTS, buildAttrs, buildRawAttrs, type RenderOptions } from './ssr-utils';\nimport { registry } from './component/registry';\nimport { runComponentSSRRender } from './ssr-context';\nimport { jitCSS } from './style';\nimport { baseReset, minifyCSS } from './css-utils';\nimport { escapeHTML } from './helpers';\nimport { devWarn } from './logger';\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nexport type DSDRenderOptions = RenderOptions & {\n /**\n * Emit Declarative Shadow DOM output for registered custom elements.\n * Shadow content is serialised inside `<template shadowrootmode=\"open\">`,\n * with a complete CSS layer stack (`baseReset` + `useStyle` + JIT CSS)\n * injected as a `<style>` block so styles are available at first paint.\n * @default false\n */\n dsd?: boolean;\n /**\n * Append the DSD polyfill `<script>` for browsers without native support\n * (Firefox < 123). Only meaningful when `dsd` is true.\n * @default true\n */\n dsdPolyfill?: boolean;\n /**\n * Router instance to thread through each component's SSR context.\n *\n * When provided, `router-view` reads the current route from this instance\n * instead of the module-level `activeRouterProxy` singleton, making\n * concurrent SSR renders safe — each request carries its own router with\n * its own URL state.\n *\n * In browser mode this option is ignored; components always use\n * `activeRouterProxy` there.\n */\n router?: unknown;\n};\n\n// ---------------------------------------------------------------------------\n// Constants\n// ---------------------------------------------------------------------------\n\n/**\n * @internal\n * Minified DSD polyfill for browsers without native Declarative Shadow DOM.\n * Processes all `<template shadowrootmode>` elements synchronously.\n */\nexport const DSD_POLYFILL_SCRIPT =\n '<script>(function(){' +\n \"if(HTMLTemplateElement.prototype.hasOwnProperty('shadowRootMode'))return;\" +\n \"document.querySelectorAll('template[shadowrootmode]').forEach(function(t){\" +\n \"var m=t.getAttribute('shadowrootmode');\" +\n 'var s=t.parentElement.attachShadow({mode:m});' +\n 's.appendChild(t.content);t.remove();' +\n '});})()' +\n '</script>';\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction isRegisteredCustomElement(tag: string): boolean {\n return tag.includes('-') && registry.has(tag);\n}\n\n/**\n * Build the combined `<style>` block for a shadow root.\n *\n * Layer order (matches the runtime adoptedStyleSheets order):\n * 1. baseReset — global reset + CSS custom properties\n * 2. useStyle() output — component-defined rules (:host, ::slotted, etc.)\n * 3. JIT CSS — utility classes extracted from the shadow HTML\n */\nexport function buildShadowStyleBlock(\n useStyleCSS: string,\n shadowHTML: string,\n): string {\n const parts: string[] = [baseReset];\n\n if (useStyleCSS.trim()) {\n parts.push(useStyleCSS);\n }\n\n const jit = jitCSS(shadowHTML);\n if (jit.trim()) {\n parts.push(jit);\n }\n\n const combined = minifyCSS(parts.join('\\n'));\n return combined ? `<style>${combined}</style>` : '';\n}\n\n// ---------------------------------------------------------------------------\n// Streaming async component collector\n// ---------------------------------------------------------------------------\n\nexport interface AsyncStreamEntry {\n id: string;\n tag: string;\n attrsString: string;\n hydrateAttr: string;\n useStyleCSS: string;\n lightDOM: string;\n opts: DSDRenderOptions;\n promise: Promise<VNode | VNode[]>;\n /** Router threaded from the originating render pass — propagated to async re-renders. */\n router?: unknown;\n}\n\nlet _streamingCollector: AsyncStreamEntry[] | null = null;\nlet _streamingCounter = 0;\n\n/** @internal Called by renderToStream() before the sync render pass. */\nexport function beginStreamingCollection(collector: AsyncStreamEntry[]): void {\n _streamingCollector = collector;\n _streamingCounter = 0;\n}\n\n/** @internal Called by renderToStream() after the sync render pass. */\nexport function endStreamingCollection(): void {\n _streamingCollector = null;\n}\n\n// ---------------------------------------------------------------------------\n// Core renderer\n// ---------------------------------------------------------------------------\n\n/**\n * Render a VNode tree to an HTML string with Declarative Shadow DOM output\n * for all registered custom elements encountered in the tree.\n */\nexport function renderToDSD(vnode: VNode, opts: DSDRenderOptions): string {\n if (!opts.dsd) {\n return renderToString(vnode, opts);\n }\n\n // Primitive string nodes\n if (typeof vnode === 'string') {\n return escapeHTML(vnode) as string;\n }\n\n const tag = (vnode as VNode).tag;\n\n // Special virtual node types — delegate entirely to the base renderer\n if (tag === '#text' || tag === '#anchor' || tag === '#raw') {\n return renderToString(vnode, opts);\n }\n\n // Custom element — emit DSD wrapper\n if (isRegisteredCustomElement(tag)) {\n return renderCustomElementDSD(vnode, opts);\n }\n\n // Regular element — recurse with DSD mode on\n const attrsObj: Record<string, unknown> = vnode.props?.attrs\n ? { ...vnode.props.attrs }\n : {};\n\n const attrsString = buildAttrs(attrsObj, tag, opts);\n\n if (VOID_ELEMENTS.has(tag)) {\n return `<${tag}${attrsString}>`;\n }\n\n const children = renderChildrenDSD(vnode.children, opts);\n return `<${tag}${attrsString}>${children}</${tag}>`;\n}\n\nfunction renderCustomElementDSD(vnode: VNode, opts: DSDRenderOptions): string {\n const tag = vnode.tag;\n const config = registry.get(tag);\n\n // Build the plain attribute string (no namespace injection for custom elements)\n const rawAttrs = vnode.props?.attrs ?? {};\n const attrsString = buildRawAttrs(rawAttrs);\n\n // Move the null check BEFORE reading config.* properties for clarity.\n if (!config) {\n // Component not in registry on server (e.g. dynamic import not yet run).\n // Emit a shell with an empty DSD template so the client hydrates normally.\n const lightDOM = renderChildrenDSD(vnode.children, opts);\n return `<${tag}${attrsString}><template shadowrootmode=\"open\"></template>${lightDOM}</${tag}>`;\n }\n\n // Emit data-cer-hydrate when a non-default strategy is configured.\n // 'load' is the default and doesn't need to be serialised.\n const hydrateStrategy = config.hydrate;\n const hydrateAttr =\n hydrateStrategy && hydrateStrategy !== 'load'\n ? ` data-cer-hydrate=\"${hydrateStrategy}\"`\n : '';\n\n // Run the component's render function in a minimal SSR context to get the\n // shadow DOM VNode tree and capture any useStyle() output.\n const { shadowVNode, useStyleCSS, asyncPromise } = runComponentSSRRender(config, rawAttrs, tag, opts.router);\n\n // When streaming and this component has an async render, emit a placeholder\n // and register the promise for later resolution.\n if (asyncPromise && _streamingCollector === null) {\n devWarn(\n `[SSR] Component \"${tag}\" has an async render function. ` +\n `In standard SSR the shadow DOM will be empty. ` +\n `Use renderToStream() for incremental async component streaming.`,\n );\n }\n if (asyncPromise && _streamingCollector !== null) {\n const id = `cer-stream-${_streamingCounter++}`;\n const lightDOM = renderChildrenDSD(vnode.children, opts);\n _streamingCollector.push({\n id,\n tag,\n attrsString,\n hydrateAttr,\n useStyleCSS,\n lightDOM,\n opts,\n promise: asyncPromise,\n router: opts.router,\n });\n return (\n `<${tag} id=\"${id}\"${attrsString}${hydrateAttr}>` +\n `<template shadowrootmode=\"open\"></template>` +\n `${lightDOM}` +\n `</${tag}>`\n );\n }\n\n // Render the shadow DOM VNode tree to HTML (DSD-recursive for nested elements)\n let shadowHTML = '';\n if (shadowVNode !== null && shadowVNode !== undefined) {\n if (Array.isArray(shadowVNode)) {\n shadowHTML = (shadowVNode as VNode[])\n .map((n) => renderToDSD(n, opts))\n .join('');\n } else {\n shadowHTML = renderToDSD(shadowVNode as VNode, opts);\n }\n }\n\n const styleBlock = buildShadowStyleBlock(useStyleCSS, shadowHTML);\n\n // Light DOM children become slotted content — rendered outside the template\n const lightDOM = renderChildrenDSD(vnode.children, opts);\n\n return (\n `<${tag}${attrsString}${hydrateAttr}>` +\n `<template shadowrootmode=\"open\">${styleBlock}${shadowHTML}</template>` +\n `${lightDOM}` +\n `</${tag}>`\n );\n}\n\nfunction renderChildrenDSD(\n children: VNode['children'],\n opts: DSDRenderOptions,\n): string {\n if (!children) return '';\n if (typeof children === 'string') return escapeHTML(children) as string;\n if (Array.isArray(children)) {\n return children\n .filter((c) => c !== null && c !== undefined)\n .map((c) => renderToDSD(c as VNode, opts))\n .join('');\n }\n return renderToDSD(children as VNode, opts);\n}\n\n// ---------------------------------------------------------------------------\n// Public entry points\n// ---------------------------------------------------------------------------\n\n/**\n * Render a VNode tree to a DSD HTML string and optionally append the\n * DSD polyfill script for older browsers.\n */\nexport function renderToStringDSD(\n vnode: VNode,\n opts?: DSDRenderOptions,\n): string {\n const effectiveOpts: DSDRenderOptions = { dsd: true, ...opts };\n const html = renderToDSD(vnode, effectiveOpts);\n\n if (effectiveOpts.dsdPolyfill !== false) {\n // Inject polyfill before </body> if present, otherwise append\n if (html.includes('</body>')) {\n return html.replace('</body>', `${DSD_POLYFILL_SCRIPT}</body>`);\n }\n return html + DSD_POLYFILL_SCRIPT;\n }\n\n return html;\n}\n","/**\n * SSR entry point — import from `@jasonshimmy/custom-elements-runtime/ssr`.\n *\n * Provides four rendering modes:\n *\n * 1. **renderToString** — baseline HTML serialisation (no shadow DOM content).\n * Backwards-compatible with the original API.\n *\n * 2. **renderToStringWithJITCSS** — HTML + pre-generated JIT CSS injected into\n * `<head>` to prevent FOUC. Supports `dsd: true` for DSD output.\n *\n * 3. **renderToStringWithJITCSSDSD** — convenience alias for DSD mode.\n * Full Declarative Shadow DOM output with per-shadow-root CSS layer stack\n * (baseReset + useStyle() + JIT CSS). Enables true hydration, zero FOUC.\n *\n * 4. **renderToStream** — ReadableStream variant for streaming SSR.\n *\n * Entity map utilities are also exported for full HTML5 named-entity support.\n *\n * @example DSD usage (recommended)\n * ```ts\n * import { renderToStringWithJITCSSDSD } from '@jasonshimmy/custom-elements-runtime/ssr';\n *\n * const { htmlWithStyles } = renderToStringWithJITCSSDSD(appVNode, {\n * jit: { extendedColors: true },\n * });\n * res.send(`<!DOCTYPE html><html><head>${head}</head><body>${htmlWithStyles}</body></html>`);\n * ```\n */\n\n// ---------------------------------------------------------------------------\n// Re-exports — backwards-compatible\n// ---------------------------------------------------------------------------\n\nexport { renderToString } from './runtime/vdom-ssr';\nexport type { VNode } from './runtime/types';\nexport type { RenderOptions } from './runtime/vdom-ssr';\n\nexport {\n registerEntityMap,\n loadEntityMap,\n clearRegisteredEntityMap,\n} from './runtime/helpers';\n\nexport {\n renderToStringDSD,\n DSD_POLYFILL_SCRIPT,\n} from './runtime/vdom-ssr-dsd';\nexport type { DSDRenderOptions } from './runtime/vdom-ssr-dsd';\n\n// ---------------------------------------------------------------------------\n// Internal imports\n// ---------------------------------------------------------------------------\n\nimport { renderToString as _render } from './runtime/vdom-ssr';\nimport {\n renderToStringDSD as _renderToStringDSD,\n renderToDSD,\n buildShadowStyleBlock,\n beginStreamingCollection,\n endStreamingCollection,\n DSD_POLYFILL_SCRIPT,\n type AsyncStreamEntry,\n} from './runtime/vdom-ssr-dsd';\nimport { jitCSS, enableJITCSS, type JITCSSOptions } from './runtime/style';\nimport type { VNode } from './runtime/types';\nimport type { RenderOptions } from './runtime/vdom-ssr';\nimport type { DSDRenderOptions } from './runtime/vdom-ssr-dsd';\nimport {\n beginSSRGlobalStyleCollection,\n endSSRGlobalStyleCollection,\n} from './runtime/ssr-context';\n\n// ---------------------------------------------------------------------------\n// Result type\n// ---------------------------------------------------------------------------\n\n/**\n * Result of `renderToStringWithJITCSS()` and `renderToStringWithJITCSSDSD()`.\n */\nexport interface SSRJITResult {\n /** The rendered HTML string (styles not yet injected). */\n html: string;\n /**\n * Global JIT CSS extracted from the rendered HTML.\n * For DSD renders, each shadow root embeds its own scoped styles; this field\n * holds any residual light-DOM utility CSS.\n */\n css: string;\n /**\n * CSS captured from `useGlobalStyle()` calls during this render pass\n * (e.g. `@font-face`, `:root` custom properties).\n * Inject in a `<style id=\"cer-ssr-global\">` in `<head>`.\n */\n globalStyles: string;\n /**\n * Convenience: `html` with both `<style>` tags injected before `</head>`.\n * If no `</head>` is found, the styles are prepended.\n */\n htmlWithStyles: string;\n}\n\n// ---------------------------------------------------------------------------\n// renderToStringWithJITCSS — primary API, supports both modes\n// ---------------------------------------------------------------------------\n\n/**\n * Server-side render a VNode tree and simultaneously pre-generate JIT CSS.\n *\n * Pass `dsd: true` to enable Declarative Shadow DOM output with full per-shadow-\n * root CSS layer extraction (recommended for new apps).\n *\n * @example Standard (no DSD)\n * ```ts\n * const { htmlWithStyles } = renderToStringWithJITCSS(appVNode);\n * ```\n *\n * @example With DSD\n * ```ts\n * const { htmlWithStyles } = renderToStringWithJITCSS(appVNode, {\n * dsd: true,\n * jit: { extendedColors: true },\n * });\n * ```\n */\nexport function renderToStringWithJITCSS(\n vnode: VNode,\n options?: RenderOptions & DSDRenderOptions & { jit?: JITCSSOptions },\n): SSRJITResult {\n const { jit, dsd, dsdPolyfill, ...renderOptions } = options ?? {};\n\n if (jit) enableJITCSS(jit);\n\n beginSSRGlobalStyleCollection();\n\n let html!: string;\n let globalStylesCaptured!: string[];\n try {\n if (dsd) {\n // renderToStringDSD handles DSD wrapping but skips the polyfill so we can\n // place it correctly relative to other injected style tags below.\n html = _renderToStringDSD(vnode, {\n ...renderOptions,\n dsd: true,\n dsdPolyfill: false,\n });\n } else {\n html = _render(vnode, renderOptions);\n }\n } finally {\n // Always end collection — even when the render throws — so the collector\n // is never left non-null, which would cause subsequent non-SSR\n // useGlobalStyle() calls to silently skip DOM injection.\n globalStylesCaptured = endSSRGlobalStyleCollection();\n }\n\n const css = jitCSS(html);\n const globalStyles = globalStylesCaptured.join('\\n');\n\n const styleTags: string[] = [];\n if (css) styleTags.push(`<style id=\"cer-ssr-jit\">${css}</style>`);\n if (globalStyles.trim())\n styleTags.push(`<style id=\"cer-ssr-global\">${globalStyles}</style>`);\n\n let htmlWithStyles = html;\n if (styleTags.length) {\n const injection = styleTags.join('');\n htmlWithStyles = html.includes('</head>')\n ? html.replace('</head>', `${injection}</head>`)\n : `${injection}${html}`;\n }\n\n // Append DSD polyfill script inside </body> when in DSD mode\n if (dsd && dsdPolyfill !== false) {\n htmlWithStyles = htmlWithStyles.includes('</body>')\n ? htmlWithStyles.replace('</body>', `${DSD_POLYFILL_SCRIPT}</body>`)\n : htmlWithStyles + DSD_POLYFILL_SCRIPT;\n }\n\n return { html, css, globalStyles, htmlWithStyles };\n}\n\n// ---------------------------------------------------------------------------\n// renderToStringWithJITCSSDSD — convenience alias\n// ---------------------------------------------------------------------------\n\n/**\n * Convenience alias: `renderToStringWithJITCSS(vnode, { dsd: true, ...options })`.\n *\n * Renders with Declarative Shadow DOM output, full per-shadow-root CSS layer\n * extraction, and the DSD browser polyfill. This is the recommended function\n * for all new server-rendered applications.\n *\n * @example\n * ```ts\n * import { renderToStringWithJITCSSDSD } from '@jasonshimmy/custom-elements-runtime/ssr';\n *\n * const { htmlWithStyles } = renderToStringWithJITCSSDSD(appVNode, {\n * jit: { extendedColors: true },\n * });\n * ```\n */\nexport function renderToStringWithJITCSSDSD(\n vnode: VNode,\n options?: Omit<\n RenderOptions & DSDRenderOptions & { jit?: JITCSSOptions },\n 'dsd'\n >,\n): SSRJITResult {\n return renderToStringWithJITCSS(vnode, { ...options, dsd: true });\n}\n\n// ---------------------------------------------------------------------------\n// renderToStream — streaming SSR\n// ---------------------------------------------------------------------------\n\n/**\n * Render a VNode tree to a `ReadableStream<string>`.\n *\n * Supports true incremental streaming: synchronous components are flushed as\n * the first chunk, then each async component's resolved output is streamed as\n * an inline swap `<script>` that fills the placeholder's shadow root.\n *\n * @example Node.js\n * ```ts\n * import { renderToStream } from '@jasonshimmy/custom-elements-runtime/ssr';\n *\n * app.get('/', (req, res) => {\n * const stream = renderToStream(appVNode, { dsd: true });\n * const reader = stream.getReader();\n * const pump = () =>\n * reader.read().then(({ value, done }) => {\n * if (done) { res.end(); return; }\n * res.write(value);\n * pump();\n * });\n * pump();\n * });\n * ```\n */\nexport function renderToStream(\n vnode: VNode,\n options?: RenderOptions & DSDRenderOptions & { jit?: JITCSSOptions },\n): ReadableStream<string> {\n return new ReadableStream<string>({\n async start(controller) {\n const asyncEntries: AsyncStreamEntry[] = [];\n beginStreamingCollection(asyncEntries);\n\n try {\n const { htmlWithStyles } = renderToStringWithJITCSS(vnode, options);\n controller.enqueue(htmlWithStyles);\n } catch (err) {\n controller.error(err);\n return;\n } finally {\n endStreamingCollection();\n }\n\n // Resolve async components and stream swap scripts as they settle.\n // Each resolved component replaces its placeholder via an inline script.\n for (const entry of asyncEntries) {\n try {\n const resolvedVNodes = await entry.promise;\n const shadowHTML = Array.isArray(resolvedVNodes)\n ? (resolvedVNodes as VNode[]).map((n) => renderToDSD(n, entry.opts)).join('')\n : renderToDSD(resolvedVNodes as VNode, entry.opts);\n const styleBlock = buildShadowStyleBlock(entry.useStyleCSS, shadowHTML);\n const shadowContent = `${styleBlock}${shadowHTML}`;\n controller.enqueue(\n `<script>(function(){` +\n `var e=document.getElementById(${JSON.stringify(entry.id)});` +\n `if(!e)return;` +\n // The placeholder already has an empty shadow root attached (native DSD or polyfill).\n // If for some reason it doesn't, attach one now.\n `var s=e.shadowRoot;` +\n `if(!s&&e.attachShadow)try{s=e.attachShadow({mode:'open'});}catch(_){};` +\n `if(s)s.innerHTML=${JSON.stringify(shadowContent)};` +\n `e.removeAttribute('id');` +\n `})();</script>`,\n );\n } catch {\n // Async render failed — leave placeholder for client hydration.\n }\n }\n\n controller.close();\n },\n });\n}\n"],"names":["VOID_ELEMENTS","buildAttrs","attrs","tag","opts","inject","injectKnown","merged","SVG_NS","TAG_NAMESPACE_MAP","k","v","escapeHTML","buildRawAttrs","renderToString","vnode","c","attrsObj","attrsString","children","DSD_POLYFILL_SCRIPT","isRegisteredCustomElement","registry","buildShadowStyleBlock","useStyleCSS","shadowHTML","parts","baseReset","jit","jitCSS","combined","minifyCSS","_streamingCollector","_streamingCounter","beginStreamingCollection","collector","endStreamingCollection","renderToDSD","renderCustomElementDSD","renderChildrenDSD","config","rawAttrs","lightDOM","hydrateStrategy","hydrateAttr","shadowVNode","asyncPromise","runComponentSSRRender","devWarn","id","n","styleBlock","renderToStringDSD","effectiveOpts","html","renderToStringWithJITCSS","options","dsd","dsdPolyfill","renderOptions","beginSSRGlobalStyleCollection","globalStylesCaptured","_renderToStringDSD","_render","endSSRGlobalStyleCollection","css","globalStyles","styleTags","htmlWithStyles","injection","renderToStringWithJITCSSDSD","renderToStream","controller","asyncEntries","err","entry","resolvedVNodes","shadowContent"],"mappings":"iRAcaA,MAAoB,IAAI,CACnC,OACA,OACA,KACA,MACA,QACA,KACA,MACA,QACA,OACA,OACA,QACA,SACA,QACA,KACF,CAAC,EAEM,SAASC,EACdC,EACAC,EACAC,EACQ,CACR,MAAMC,EAASD,EAAK,oBAAsB,GACpCE,EAAcF,EAAK,uBAAyBC,EAC5CE,EAAS,CAAE,GAAGL,CAAA,EAEpB,OAAIG,GAAUF,IAAQ,OAAS,EAAE,UAAWI,GAC1CA,EAAO,MAAWC,EAAAA,OACTF,GAAeH,KAAOM,EAAAA,mBAAqB,EAAE,UAAWF,KACjEA,EAAO,MAAWE,EAAAA,kBAAkBN,CAAG,GAGlC,OAAO,QAAQI,CAAM,EACzB,IAAI,CAAC,CAACG,EAAGC,CAAC,IAAM,IAAID,CAAC,KAAKE,aAAW,OAAOD,CAAC,CAAC,CAAC,GAAG,EAClD,KAAK,EAAE,CACZ,CAEO,SAASE,EAAcX,EAAwC,CACpE,OAAO,OAAO,QAAQA,CAAK,EACxB,IAAI,CAAC,CAACQ,EAAGC,CAAC,IAAM,IAAID,CAAC,KAAKE,aAAW,OAAOD,CAAC,CAAC,CAAC,GAAG,EAClD,KAAK,EAAE,CACZ,CC1CO,SAASG,EAAeC,EAAcX,EAA8B,CACzE,GAAI,OAAOW,GAAU,SAAU,OAAOH,EAAAA,WAAWG,CAAK,EAEtD,GAAIA,EAAM,MAAQ,QAChB,OAAO,OAAOA,EAAM,UAAa,SAC5BH,EAAAA,WAAWG,EAAM,QAAQ,EAC1B,GAGN,GAAIA,EAAM,MAAQ,UAQhB,OAHiB,MAAM,QAAQA,EAAM,QAAQ,EACzCA,EAAM,SAAS,OAAQC,GAAMA,GAAM,IAAuB,EAC1D,CAAA,GACY,IAAKA,GAAMF,EAAeE,EAAGZ,CAAI,CAAC,EAAE,KAAK,EAAE,EAG7D,GAAIW,EAA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EAAY,CACtB,MAAMC,EAAmC,CAAA,EACzCvC,EAAyBuC,CAAY,EAErC,GAAI,CACF,KAAM,CAAE,eAAAL,CAAA,EAAmBb,EAAyBxC,EAAOyC,CAAO,EAClEgB,EAAW,QAAQJ,CAAc,CACnC,OAASM,EAAK,CACZF,EAAW,MAAME,CAAG,EACpB,MACF,QAAA,CACEtC,EAAA,CACF,CAIA,UAAWuC,KAASF,EAClB,GAAI,CACF,MAAMG,EAAiB,MAAMD,EAAM,QAC7BlD,EAAa,MAAM,QAAQmD,CAAc,EAC1CA,EAA2B,IAAK1B,GAAMb,EAAYa,EAAGyB,EAAM,IAAI,CAAC,EAAE,KAAK,EAAE,EAC1EtC,EAAYuC,EAAyBD,EAAM,IAAI,EAE7CE,EAAgB,GADHtD,EAAsBoD,EAAM,YAAalD,CAAU,CACnC,GAAGA,CAAU,GAChD+C,EAAW,QACT,qDACmC,KAAK,UAAUG,EAAM,EAAE,CAAC,4HAMrC,KAAK,UAAUE,CAAa,CAAC,0CAAA,CAIvD,MAAQ,CAER,CAGFL,EAAW,MAAA,CACb,CAAA,CACD,CACH"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"custom-elements-runtime.ssr.es.js","sources":["../src/lib/runtime/ssr-utils.ts","../src/lib/runtime/vdom-ssr.ts","../src/lib/runtime/vdom-ssr-dsd.ts","../src/lib/ssr.ts"],"sourcesContent":["/**\n * Shared utilities for SSR renderers.\n * Imported by vdom-ssr.ts and vdom-ssr-dsd.ts to avoid duplication.\n */\nimport { escapeHTML } from './helpers';\nimport { TAG_NAMESPACE_MAP, SVG_NS } from './namespace-helpers';\n\nexport type RenderOptions = {\n /** Backwards-compatible: whether to inject the SVG namespace on <svg> nodes (default true) */\n injectSvgNamespace?: boolean;\n /** Inject known well-known namespaces for tags like <math> when missing (default follows injectSvgNamespace) */\n injectKnownNamespaces?: boolean;\n};\n\nexport const VOID_ELEMENTS = new Set([\n 'area',\n 'base',\n 'br',\n 'col',\n 'embed',\n 'hr',\n 'img',\n 'input',\n 'link',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr',\n]);\n\nexport function buildAttrs(\n attrs: Record<string, unknown>,\n tag: string,\n opts: RenderOptions,\n): string {\n const inject = opts.injectSvgNamespace ?? true;\n const injectKnown = opts.injectKnownNamespaces ?? inject;\n const merged = { ...attrs };\n\n if (inject && tag === 'svg' && !('xmlns' in merged)) {\n merged['xmlns'] = SVG_NS;\n } else if (injectKnown && tag in TAG_NAMESPACE_MAP && !('xmlns' in merged)) {\n merged['xmlns'] = TAG_NAMESPACE_MAP[tag];\n }\n\n return Object.entries(merged)\n .map(([k, v]) => ` ${k}=\"${escapeHTML(String(v))}\"`)\n .join('');\n}\n\nexport function buildRawAttrs(attrs: Record<string, unknown>): string {\n return Object.entries(attrs)\n .map(([k, v]) => ` ${k}=\"${escapeHTML(String(v))}\"`)\n .join('');\n}\n","import type { VNode } from './types';\nimport { escapeHTML } from './helpers';\nimport { VOID_ELEMENTS, buildAttrs, type RenderOptions } from './ssr-utils';\n\n/**\n * Render a VNode to a string (SSR).\n * Kept intentionally minimal: only serializes attributes under `props.attrs`\n * to avoid leaking runtime-only values (functions, reactive state, directives).\n * @param vnode The virtual node to render.\n * @returns The rendered HTML string.\n */\nexport type { RenderOptions } from './ssr-utils';\n\nexport function renderToString(vnode: VNode, opts?: RenderOptions): string {\n if (typeof vnode === 'string') return escapeHTML(vnode) as string;\n\n if (vnode.tag === '#text') {\n return typeof vnode.children === 'string'\n ? (escapeHTML(vnode.children) as string)\n : '';\n }\n\n if (vnode.tag === '#anchor') {\n // Preserve meaningful falsy children (0, false, '') while filtering out\n // only null and undefined. Anchor blocks are normalized by the compiler\n // to exclude null/undefined; SSR should follow the same rule to avoid\n // hydration mismatches where falsy values are significant.\n const children = Array.isArray(vnode.children)\n ? vnode.children.filter((c) => c !== null && c !== undefined)\n : [];\n return children.map((c) => renderToString(c, opts)).join('');\n }\n\n if (vnode.tag === '#raw') {\n return typeof vnode.children === 'string' ? vnode.children : '';\n }\n\n // Collect attributes from props.attrs. For SSR we mirror vnode.attrs\n // but ensure SVG nodes behave like client-side: if this is an <svg>\n // and no xmlns was provided, inject the standard SVG namespace so\n // server markup matches client-created DOM namespace.\n const attrsObj: Record<string, unknown> = vnode.props?.attrs\n ? { ...vnode.props.attrs }\n : {};\n\n const attrsString = buildAttrs(attrsObj, vnode.tag, opts ?? {});\n\n // Handle void elements (self-closing tags)\n if (VOID_ELEMENTS.has(vnode.tag)) {\n return `<${vnode.tag}${attrsString}>`;\n }\n\n const children = Array.isArray(vnode.children)\n ? vnode.children\n .filter((c) => c !== null && c !== undefined)\n .map((c) => renderToString(c, opts))\n .join('')\n : typeof vnode.children === 'string'\n ? escapeHTML(vnode.children)\n : vnode.children\n ? renderToString(vnode.children, opts)\n : '';\n\n return `<${vnode.tag}${attrsString}>${children}</${vnode.tag}>`;\n}\n","/**\n * Declarative Shadow DOM (DSD) SSR renderer.\n *\n * When `dsd: true` is passed to the render options, registered custom elements\n * are serialised as:\n *\n * ```html\n * <my-element attr=\"val\">\n * <template shadowrootmode=\"open\">\n * <style>\n * /* baseReset + useStyle() output + JIT utility CSS *\\/\n * </style>\n * <!-- shadow DOM from component render function -->\n * </template>\n * <!-- light DOM / slotted children from vnode.children -->\n * </my-element>\n * ```\n *\n * The browser parses the `<template shadowrootmode=\"open\">` block and attaches\n * a real shadow root before any JavaScript executes. All CSS layers are present\n * at first paint — eliminating both FOUC and layout shift.\n *\n * Non-custom-element VNodes are rendered identically to renderToString() but\n * with DSD recursion active for any custom elements nested inside them.\n */\n\nimport type { VNode } from './types';\nimport { renderToString } from './vdom-ssr';\nimport { VOID_ELEMENTS, buildAttrs, buildRawAttrs, type RenderOptions } from './ssr-utils';\nimport { registry } from './component/registry';\nimport { runComponentSSRRender } from './ssr-context';\nimport { jitCSS } from './style';\nimport { baseReset, minifyCSS } from './css-utils';\nimport { escapeHTML } from './helpers';\nimport { devWarn } from './logger';\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nexport type DSDRenderOptions = RenderOptions & {\n /**\n * Emit Declarative Shadow DOM output for registered custom elements.\n * Shadow content is serialised inside `<template shadowrootmode=\"open\">`,\n * with a complete CSS layer stack (`baseReset` + `useStyle` + JIT CSS)\n * injected as a `<style>` block so styles are available at first paint.\n * @default false\n */\n dsd?: boolean;\n /**\n * Append the DSD polyfill `<script>` for browsers without native support\n * (Firefox < 123). Only meaningful when `dsd` is true.\n * @default true\n */\n dsdPolyfill?: boolean;\n /**\n * Router instance to thread through each component's SSR context.\n *\n * When provided, `router-view` reads the current route from this instance\n * instead of the module-level `activeRouterProxy` singleton, making\n * concurrent SSR renders safe — each request carries its own router with\n * its own URL state.\n *\n * In browser mode this option is ignored; components always use\n * `activeRouterProxy` there.\n */\n router?: unknown;\n};\n\n// ---------------------------------------------------------------------------\n// Constants\n// ---------------------------------------------------------------------------\n\n/**\n * @internal\n * Minified DSD polyfill for browsers without native Declarative Shadow DOM.\n * Processes all `<template shadowrootmode>` elements synchronously.\n */\nexport const DSD_POLYFILL_SCRIPT =\n '<script>(function(){' +\n \"if(HTMLTemplateElement.prototype.hasOwnProperty('shadowRootMode'))return;\" +\n \"document.querySelectorAll('template[shadowrootmode]').forEach(function(t){\" +\n \"var m=t.getAttribute('shadowrootmode');\" +\n 'var s=t.parentElement.attachShadow({mode:m});' +\n 's.appendChild(t.content);t.remove();' +\n '});})()' +\n '</script>';\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction isRegisteredCustomElement(tag: string): boolean {\n return tag.includes('-') && registry.has(tag);\n}\n\n/**\n * Build the combined `<style>` block for a shadow root.\n *\n * Layer order (matches the runtime adoptedStyleSheets order):\n * 1. baseReset — global reset + CSS custom properties\n * 2. useStyle() output — component-defined rules (:host, ::slotted, etc.)\n * 3. JIT CSS — utility classes extracted from the shadow HTML\n */\nexport function buildShadowStyleBlock(\n useStyleCSS: string,\n shadowHTML: string,\n): string {\n const parts: string[] = [baseReset];\n\n if (useStyleCSS.trim()) {\n parts.push(useStyleCSS);\n }\n\n const jit = jitCSS(shadowHTML);\n if (jit.trim()) {\n parts.push(jit);\n }\n\n const combined = minifyCSS(parts.join('\\n'));\n return combined ? `<style>${combined}</style>` : '';\n}\n\n// ---------------------------------------------------------------------------\n// Streaming async component collector\n// ---------------------------------------------------------------------------\n\nexport interface AsyncStreamEntry {\n id: string;\n tag: string;\n attrsString: string;\n hydrateAttr: string;\n useStyleCSS: string;\n lightDOM: string;\n opts: DSDRenderOptions;\n promise: Promise<VNode | VNode[]>;\n /** Router threaded from the originating render pass — propagated to async re-renders. */\n router?: unknown;\n}\n\nlet _streamingCollector: AsyncStreamEntry[] | null = null;\nlet _streamingCounter = 0;\n\n/** @internal Called by renderToStream() before the sync render pass. */\nexport function beginStreamingCollection(collector: AsyncStreamEntry[]): void {\n _streamingCollector = collector;\n _streamingCounter = 0;\n}\n\n/** @internal Called by renderToStream() after the sync render pass. */\nexport function endStreamingCollection(): void {\n _streamingCollector = null;\n}\n\n// ---------------------------------------------------------------------------\n// Core renderer\n// ---------------------------------------------------------------------------\n\n/**\n * Render a VNode tree to an HTML string with Declarative Shadow DOM output\n * for all registered custom elements encountered in the tree.\n */\nexport function renderToDSD(vnode: VNode, opts: DSDRenderOptions): string {\n if (!opts.dsd) {\n return renderToString(vnode, opts);\n }\n\n // Primitive string nodes\n if (typeof vnode === 'string') {\n return escapeHTML(vnode) as string;\n }\n\n const tag = (vnode as VNode).tag;\n\n // Special virtual node types — delegate entirely to the base renderer\n if (tag === '#text' || tag === '#anchor' || tag === '#raw') {\n return renderToString(vnode, opts);\n }\n\n // Custom element — emit DSD wrapper\n if (isRegisteredCustomElement(tag)) {\n return renderCustomElementDSD(vnode, opts);\n }\n\n // Regular element — recurse with DSD mode on\n const attrsObj: Record<string, unknown> = vnode.props?.attrs\n ? { ...vnode.props.attrs }\n : {};\n\n const attrsString = buildAttrs(attrsObj, tag, opts);\n\n if (VOID_ELEMENTS.has(tag)) {\n return `<${tag}${attrsString}>`;\n }\n\n const children = renderChildrenDSD(vnode.children, opts);\n return `<${tag}${attrsString}>${children}</${tag}>`;\n}\n\nfunction renderCustomElementDSD(vnode: VNode, opts: DSDRenderOptions): string {\n const tag = vnode.tag;\n const config = registry.get(tag);\n\n // Build the plain attribute string (no namespace injection for custom elements)\n const rawAttrs = vnode.props?.attrs ?? {};\n const attrsString = buildRawAttrs(rawAttrs);\n\n // Move the null check BEFORE reading config.* properties for clarity.\n if (!config) {\n // Component not in registry on server (e.g. dynamic import not yet run).\n // Emit a shell with an empty DSD template so the client hydrates normally.\n const lightDOM = renderChildrenDSD(vnode.children, opts);\n return `<${tag}${attrsString}><template shadowrootmode=\"open\"></template>${lightDOM}</${tag}>`;\n }\n\n // Emit data-cer-hydrate when a non-default strategy is configured.\n // 'load' is the default and doesn't need to be serialised.\n const hydrateStrategy = config.hydrate;\n const hydrateAttr =\n hydrateStrategy && hydrateStrategy !== 'load'\n ? ` data-cer-hydrate=\"${hydrateStrategy}\"`\n : '';\n\n // Run the component's render function in a minimal SSR context to get the\n // shadow DOM VNode tree and capture any useStyle() output.\n const { shadowVNode, useStyleCSS, asyncPromise } = runComponentSSRRender(config, rawAttrs, tag, opts.router);\n\n // When streaming and this component has an async render, emit a placeholder\n // and register the promise for later resolution.\n if (asyncPromise && _streamingCollector === null) {\n devWarn(\n `[SSR] Component \"${tag}\" has an async render function. ` +\n `In standard SSR the shadow DOM will be empty. ` +\n `Use renderToStream() for incremental async component streaming.`,\n );\n }\n if (asyncPromise && _streamingCollector !== null) {\n const id = `cer-stream-${_streamingCounter++}`;\n const lightDOM = renderChildrenDSD(vnode.children, opts);\n _streamingCollector.push({\n id,\n tag,\n attrsString,\n hydrateAttr,\n useStyleCSS,\n lightDOM,\n opts,\n promise: asyncPromise,\n router: opts.router,\n });\n return (\n `<${tag} id=\"${id}\"${attrsString}${hydrateAttr}>` +\n `<template shadowrootmode=\"open\"></template>` +\n `${lightDOM}` +\n `</${tag}>`\n );\n }\n\n // Render the shadow DOM VNode tree to HTML (DSD-recursive for nested elements)\n let shadowHTML = '';\n if (shadowVNode !== null && shadowVNode !== undefined) {\n if (Array.isArray(shadowVNode)) {\n shadowHTML = (shadowVNode as VNode[])\n .map((n) => renderToDSD(n, opts))\n .join('');\n } else {\n shadowHTML = renderToDSD(shadowVNode as VNode, opts);\n }\n }\n\n const styleBlock = buildShadowStyleBlock(useStyleCSS, shadowHTML);\n\n // Light DOM children become slotted content — rendered outside the template\n const lightDOM = renderChildrenDSD(vnode.children, opts);\n\n return (\n `<${tag}${attrsString}${hydrateAttr}>` +\n `<template shadowrootmode=\"open\">${styleBlock}${shadowHTML}</template>` +\n `${lightDOM}` +\n `</${tag}>`\n );\n}\n\nfunction renderChildrenDSD(\n children: VNode['children'],\n opts: DSDRenderOptions,\n): string {\n if (!children) return '';\n if (typeof children === 'string') return escapeHTML(children) as string;\n if (Array.isArray(children)) {\n return children\n .filter((c) => c !== null && c !== undefined)\n .map((c) => renderToDSD(c as VNode, opts))\n .join('');\n }\n return renderToDSD(children as VNode, opts);\n}\n\n// ---------------------------------------------------------------------------\n// Public entry points\n// ---------------------------------------------------------------------------\n\n/**\n * Render a VNode tree to a DSD HTML string and optionally append the\n * DSD polyfill script for older browsers.\n */\nexport function renderToStringDSD(\n vnode: VNode,\n opts?: DSDRenderOptions,\n): string {\n const effectiveOpts: DSDRenderOptions = { dsd: true, ...opts };\n const html = renderToDSD(vnode, effectiveOpts);\n\n if (effectiveOpts.dsdPolyfill !== false) {\n // Inject polyfill before </body> if present, otherwise append\n if (html.includes('</body>')) {\n return html.replace('</body>', `${DSD_POLYFILL_SCRIPT}</body>`);\n }\n return html + DSD_POLYFILL_SCRIPT;\n }\n\n return html;\n}\n","/**\n * SSR entry point — import from `@jasonshimmy/custom-elements-runtime/ssr`.\n *\n * Provides four rendering modes:\n *\n * 1. **renderToString** — baseline HTML serialisation (no shadow DOM content).\n * Backwards-compatible with the original API.\n *\n * 2. **renderToStringWithJITCSS** — HTML + pre-generated JIT CSS injected into\n * `<head>` to prevent FOUC. Supports `dsd: true` for DSD output.\n *\n * 3. **renderToStringWithJITCSSDSD** — convenience alias for DSD mode.\n * Full Declarative Shadow DOM output with per-shadow-root CSS layer stack\n * (baseReset + useStyle() + JIT CSS). Enables true hydration, zero FOUC.\n *\n * 4. **renderToStream** — ReadableStream variant for streaming SSR.\n *\n * Entity map utilities are also exported for full HTML5 named-entity support.\n *\n * @example DSD usage (recommended)\n * ```ts\n * import { renderToStringWithJITCSSDSD } from '@jasonshimmy/custom-elements-runtime/ssr';\n *\n * const { htmlWithStyles } = renderToStringWithJITCSSDSD(appVNode, {\n * jit: { extendedColors: true },\n * });\n * res.send(`<!DOCTYPE html><html><head>${head}</head><body>${htmlWithStyles}</body></html>`);\n * ```\n */\n\n// ---------------------------------------------------------------------------\n// Re-exports — backwards-compatible\n// ---------------------------------------------------------------------------\n\nexport { renderToString } from './runtime/vdom-ssr';\nexport type { VNode } from './runtime/types';\nexport type { RenderOptions } from './runtime/vdom-ssr';\n\nexport {\n registerEntityMap,\n loadEntityMap,\n clearRegisteredEntityMap,\n} from './runtime/helpers';\n\nexport {\n renderToStringDSD,\n DSD_POLYFILL_SCRIPT,\n} from './runtime/vdom-ssr-dsd';\nexport type { DSDRenderOptions } from './runtime/vdom-ssr-dsd';\n\n// ---------------------------------------------------------------------------\n// Internal imports\n// ---------------------------------------------------------------------------\n\nimport { renderToString as _render } from './runtime/vdom-ssr';\nimport {\n renderToStringDSD as _renderToStringDSD,\n renderToDSD,\n buildShadowStyleBlock,\n beginStreamingCollection,\n endStreamingCollection,\n DSD_POLYFILL_SCRIPT,\n type AsyncStreamEntry,\n} from './runtime/vdom-ssr-dsd';\nimport { jitCSS, enableJITCSS, type JITCSSOptions } from './runtime/style';\nimport type { VNode } from './runtime/types';\nimport type { RenderOptions } from './runtime/vdom-ssr';\nimport type { DSDRenderOptions } from './runtime/vdom-ssr-dsd';\nimport {\n beginSSRGlobalStyleCollection,\n endSSRGlobalStyleCollection,\n} from './runtime/ssr-context';\n\n// ---------------------------------------------------------------------------\n// Result type\n// ---------------------------------------------------------------------------\n\n/**\n * Result of `renderToStringWithJITCSS()` and `renderToStringWithJITCSSDSD()`.\n */\nexport interface SSRJITResult {\n /** The rendered HTML string (styles not yet injected). */\n html: string;\n /**\n * Global JIT CSS extracted from the rendered HTML.\n * For DSD renders, each shadow root embeds its own scoped styles; this field\n * holds any residual light-DOM utility CSS.\n */\n css: string;\n /**\n * CSS captured from `useGlobalStyle()` calls during this render pass\n * (e.g. `@font-face`, `:root` custom properties).\n * Inject in a `<style id=\"cer-ssr-global\">` in `<head>`.\n */\n globalStyles: string;\n /**\n * Convenience: `html` with both `<style>` tags injected before `</head>`.\n * If no `</head>` is found, the styles are prepended.\n */\n htmlWithStyles: string;\n}\n\n// ---------------------------------------------------------------------------\n// renderToStringWithJITCSS — primary API, supports both modes\n// ---------------------------------------------------------------------------\n\n/**\n * Server-side render a VNode tree and simultaneously pre-generate JIT CSS.\n *\n * Pass `dsd: true` to enable Declarative Shadow DOM output with full per-shadow-\n * root CSS layer extraction (recommended for new apps).\n *\n * @example Standard (no DSD)\n * ```ts\n * const { htmlWithStyles } = renderToStringWithJITCSS(appVNode);\n * ```\n *\n * @example With DSD\n * ```ts\n * const { htmlWithStyles } = renderToStringWithJITCSS(appVNode, {\n * dsd: true,\n * jit: { extendedColors: true },\n * });\n * ```\n */\nexport function renderToStringWithJITCSS(\n vnode: VNode,\n options?: RenderOptions & DSDRenderOptions & { jit?: JITCSSOptions },\n): SSRJITResult {\n const { jit, dsd, dsdPolyfill, ...renderOptions } = options ?? {};\n\n if (jit) enableJITCSS(jit);\n\n beginSSRGlobalStyleCollection();\n\n let html!: string;\n let globalStylesCaptured!: string[];\n try {\n if (dsd) {\n // renderToStringDSD handles DSD wrapping but skips the polyfill so we can\n // place it correctly relative to other injected style tags below.\n html = _renderToStringDSD(vnode, {\n ...renderOptions,\n dsd: true,\n dsdPolyfill: false,\n });\n } else {\n html = _render(vnode, renderOptions);\n }\n } finally {\n // Always end collection — even when the render throws — so the collector\n // is never left non-null, which would cause subsequent non-SSR\n // useGlobalStyle() calls to silently skip DOM injection.\n globalStylesCaptured = endSSRGlobalStyleCollection();\n }\n\n const css = jitCSS(html);\n const globalStyles = globalStylesCaptured.join('\\n');\n\n const styleTags: string[] = [];\n if (css) styleTags.push(`<style id=\"cer-ssr-jit\">${css}</style>`);\n if (globalStyles.trim())\n styleTags.push(`<style id=\"cer-ssr-global\">${globalStyles}</style>`);\n\n let htmlWithStyles = html;\n if (styleTags.length) {\n const injection = styleTags.join('');\n htmlWithStyles = html.includes('</head>')\n ? html.replace('</head>', `${injection}</head>`)\n : `${injection}${html}`;\n }\n\n // Append DSD polyfill script inside </body> when in DSD mode\n if (dsd && dsdPolyfill !== false) {\n htmlWithStyles = htmlWithStyles.includes('</body>')\n ? htmlWithStyles.replace('</body>', `${DSD_POLYFILL_SCRIPT}</body>`)\n : htmlWithStyles + DSD_POLYFILL_SCRIPT;\n }\n\n return { html, css, globalStyles, htmlWithStyles };\n}\n\n// ---------------------------------------------------------------------------\n// renderToStringWithJITCSSDSD — convenience alias\n// ---------------------------------------------------------------------------\n\n/**\n * Convenience alias: `renderToStringWithJITCSS(vnode, { dsd: true, ...options })`.\n *\n * Renders with Declarative Shadow DOM output, full per-shadow-root CSS layer\n * extraction, and the DSD browser polyfill. This is the recommended function\n * for all new server-rendered applications.\n *\n * @example\n * ```ts\n * import { renderToStringWithJITCSSDSD } from '@jasonshimmy/custom-elements-runtime/ssr';\n *\n * const { htmlWithStyles } = renderToStringWithJITCSSDSD(appVNode, {\n * jit: { extendedColors: true },\n * });\n * ```\n */\nexport function renderToStringWithJITCSSDSD(\n vnode: VNode,\n options?: Omit<\n RenderOptions & DSDRenderOptions & { jit?: JITCSSOptions },\n 'dsd'\n >,\n): SSRJITResult {\n return renderToStringWithJITCSS(vnode, { ...options, dsd: true });\n}\n\n// ---------------------------------------------------------------------------\n// renderToStream — streaming SSR\n// ---------------------------------------------------------------------------\n\n/**\n * Render a VNode tree to a `ReadableStream<string>`.\n *\n * Supports true incremental streaming: synchronous components are flushed as\n * the first chunk, then each async component's resolved output is streamed as\n * an inline swap `<script>` that fills the placeholder's shadow root.\n *\n * @example Node.js\n * ```ts\n * import { renderToStream } from '@jasonshimmy/custom-elements-runtime/ssr';\n *\n * app.get('/', (req, res) => {\n * const stream = renderToStream(appVNode, { dsd: true });\n * const reader = stream.getReader();\n * const pump = () =>\n * reader.read().then(({ value, done }) => {\n * if (done) { res.end(); return; }\n * res.write(value);\n * pump();\n * });\n * pump();\n * });\n * ```\n */\nexport function renderToStream(\n vnode: VNode,\n options?: RenderOptions & DSDRenderOptions & { jit?: JITCSSOptions },\n): ReadableStream<string> {\n return new ReadableStream<string>({\n async start(controller) {\n const asyncEntries: AsyncStreamEntry[] = [];\n beginStreamingCollection(asyncEntries);\n\n try {\n const { htmlWithStyles } = renderToStringWithJITCSS(vnode, options);\n controller.enqueue(htmlWithStyles);\n } catch (err) {\n controller.error(err);\n return;\n } finally {\n endStreamingCollection();\n }\n\n // Resolve async components and stream swap scripts as they settle.\n // Each resolved component replaces its placeholder via an inline script.\n for (const entry of asyncEntries) {\n try {\n const resolvedVNodes = await entry.promise;\n const shadowHTML = Array.isArray(resolvedVNodes)\n ? (resolvedVNodes as VNode[]).map((n) => renderToDSD(n, entry.opts)).join('')\n : renderToDSD(resolvedVNodes as VNode, entry.opts);\n const styleBlock = buildShadowStyleBlock(entry.useStyleCSS, shadowHTML);\n const shadowContent = `${styleBlock}${shadowHTML}`;\n controller.enqueue(\n `<script>(function(){` +\n `var e=document.getElementById(${JSON.stringify(entry.id)});` +\n `if(!e)return;` +\n // The placeholder already has an empty shadow root attached (native DSD or polyfill).\n // If for some reason it doesn't, attach one now.\n `var s=e.shadowRoot;` +\n `if(!s&&e.attachShadow)try{s=e.attachShadow({mode:'open'});}catch(_){};` +\n `if(s)s.innerHTML=${JSON.stringify(shadowContent)};` +\n `e.removeAttribute('id');` +\n `})();</script>`,\n );\n } catch {\n // Async render failed — leave placeholder for client hydration.\n }\n }\n\n controller.close();\n },\n });\n}\n"],"names":["VOID_ELEMENTS","buildAttrs","attrs","tag","opts","inject","injectKnown","merged","SVG_NS","TAG_NAMESPACE_MAP","k","v","escapeHTML","buildRawAttrs","renderToString","vnode","c","attrsObj","attrsString","children","DSD_POLYFILL_SCRIPT","isRegisteredCustomElement","registry","buildShadowStyleBlock","useStyleCSS","shadowHTML","parts","baseReset","jit","jitCSS","combined","minifyCSS","_streamingCollector","_streamingCounter","beginStreamingCollection","collector","endStreamingCollection","renderToDSD","renderCustomElementDSD","renderChildrenDSD","config","rawAttrs","lightDOM","hydrateStrategy","hydrateAttr","shadowVNode","asyncPromise","runComponentSSRRender","devWarn","id","n","styleBlock","renderToStringDSD","effectiveOpts","html","renderToStringWithJITCSS","options","dsd","dsdPolyfill","renderOptions","beginSSRGlobalStyleCollection","globalStylesCaptured","_renderToStringDSD","_render","endSSRGlobalStyleCollection","css","globalStyles","styleTags","htmlWithStyles","injection","renderToStringWithJITCSSDSD","renderToStream","controller","asyncEntries","err","entry","resolvedVNodes","shadowContent"],"mappings":";;;;;;AAcO,MAAMA,wBAAoB,IAAI;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEM,SAASC,EACdC,GACAC,GACAC,GACQ;AACR,QAAMC,IAASD,EAAK,sBAAsB,IACpCE,IAAcF,EAAK,yBAAyBC,GAC5CE,IAAS,EAAE,GAAGL,EAAA;AAEpB,SAAIG,KAAUF,MAAQ,SAAS,EAAE,WAAWI,KAC1CA,EAAO,QAAWC,IACTF,KAAeH,KAAOM,KAAqB,EAAE,WAAWF,OACjEA,EAAO,QAAWE,EAAkBN,CAAG,IAGlC,OAA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