@jasonshimmy/custom-elements-runtime 3.1.3 → 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 (109) 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 +19 -18
  34. package/dist/custom-elements-runtime.router.cjs.js.map +1 -1
  35. package/dist/custom-elements-runtime.router.es.js +554 -571
  36. package/dist/custom-elements-runtime.router.es.js.map +1 -1
  37. package/dist/custom-elements-runtime.ssr-middleware.cjs.js +5 -2
  38. package/dist/custom-elements-runtime.ssr-middleware.cjs.js.map +1 -1
  39. package/dist/custom-elements-runtime.ssr-middleware.es.js +54 -45
  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 -175
  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/runtime/ssr-context.d.ts +1 -13
  69. package/dist/runtime/vdom-ssr-dsd.d.ts +14 -0
  70. package/dist/ssr-B3lxl1vr.js +165 -0
  71. package/dist/ssr-B3lxl1vr.js.map +1 -0
  72. package/dist/ssr-DtD9e5iA.cjs +5 -0
  73. package/dist/ssr-DtD9e5iA.cjs.map +1 -0
  74. package/dist/ssr-middleware.d.ts +18 -2
  75. package/dist/ssr.d.ts +3 -4
  76. package/dist/style-Bjn8zDiZ.cjs +56 -0
  77. package/dist/style-Bjn8zDiZ.cjs.map +1 -0
  78. package/dist/{style-BmyOIMcU.js → style-DuDoj_xK.js} +724 -876
  79. package/dist/style-DuDoj_xK.js.map +1 -0
  80. package/dist/style.css +1 -1
  81. package/dist/template-compiler-BB4JJdqk.cjs +23 -0
  82. package/dist/template-compiler-BB4JJdqk.cjs.map +1 -0
  83. package/dist/template-compiler-Cs5axmn4.js +3236 -0
  84. package/dist/template-compiler-Cs5axmn4.js.map +1 -0
  85. package/dist/variables.css +1 -1
  86. package/package.json +7 -7
  87. package/dist/css-utils-Cg4o1MqY.js.map +0 -1
  88. package/dist/css-utils-RqkyBWft.cjs.map +0 -1
  89. package/dist/custom-elements-runtime.ssr.cjs.js.map +0 -1
  90. package/dist/custom-elements-runtime.ssr.es.js.map +0 -1
  91. package/dist/hooks-x8M4knLc.cjs +0 -6
  92. package/dist/hooks-x8M4knLc.cjs.map +0 -1
  93. package/dist/hooks-xWZhQHco.js +0 -1465
  94. package/dist/hooks-xWZhQHco.js.map +0 -1
  95. package/dist/logger-BvkEbVM4.js +0 -48
  96. package/dist/logger-BvkEbVM4.js.map +0 -1
  97. package/dist/logger-CSALKaYm.cjs +0 -2
  98. package/dist/logger-CSALKaYm.cjs.map +0 -1
  99. package/dist/namespace-helpers-D4wC2-qA.js +0 -61
  100. package/dist/namespace-helpers-D4wC2-qA.js.map +0 -1
  101. package/dist/namespace-helpers-ckeEOxpR.cjs +0 -2
  102. package/dist/namespace-helpers-ckeEOxpR.cjs.map +0 -1
  103. package/dist/style-BmyOIMcU.js.map +0 -1
  104. package/dist/style-D40DsIqJ.cjs +0 -55
  105. package/dist/style-D40DsIqJ.cjs.map +0 -1
  106. package/dist/template-compiler-CTUhEHr8.cjs +0 -22
  107. package/dist/template-compiler-CTUhEHr8.cjs.map +0 -1
  108. package/dist/template-compiler-ZhSg1yPh.js +0 -3724
  109. package/dist/template-compiler-ZhSg1yPh.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.1.3",
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;AA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AAO,gBAAkB,MAC3BA,IAAiB;AAAA,IACf,UAAU,CAAA;AAAA,IACV,aAAa,MAAM;AAAA,IAAC;AAAA,IACpB,UAAU,MAAMd,EAAUY,CAAS;AAAA,EAAA,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;AA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,EAAcA,EAAYQ,CAAI,EAAI,EAC3C,CAMO,SAASC,EAAcC,EAAsB,CAClD,OAAOT,EAAgBA,EAAcS,CAAI,EAAI,EAC/C,CAMO,SAASC,GAA2C,CACzD,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\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}\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);\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 });\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 * The current implementation flushes the complete rendered output as a single\n * chunk, providing the streaming API surface for framework adapters. True\n * incremental streaming (flush shell immediately, resolve async components\n * progressively) is planned for a future release.\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,M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,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\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}\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);\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 });\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 * The current implementation flushes the complete rendered output as a single\n * chunk, providing the streaming API surface for framework adapters. True\n * incremental streaming (flush shell immediately, resolve async components\n * progressively) is planned for a future release.\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,OAAO,QAAQI,CAAM,EACzB,IAAI,CAAC,CAACG,GAAGC,CAAC,MAAM,IAAID,CAAC,KAAKE,EAAW,OAAOD,CAAC,CAAC,CAAC,GAAG,EAClD,KAAK,EAAE;AACZ;AAEO,SAASE,EAAcX,GAAwC;AACpE,SAAO,OAAO,QAAQA,CAAK,EACxB,IAAI,CAAC,CAACQ,GAAGC,CAAC,MAAM,IAAID,CAAC,KAAKE,EAAW,OAAOD,CAAC,CAAC,CAAC,GAAG,EAClD,KAAK,EAAE;AACZ;AC1CO,SAASG,EAAeC,GAAcX,GAA8B;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A,IACb;AAAA,EAAA,CACD;AACH;"}
@@ -1,6 +0,0 @@
1
- "use strict";const g=require("./logger-CSALKaYm.cjs"),j=require("./css-utils-RqkyBWft.cjs");function z(){const r=(()=>{try{return globalThis.process?.env?.NODE_ENV}catch{return}})(),e=(()=>{try{if(typeof window>"u")return{vitest:!1,cypress:!1};const t=window;return{vitest:!!t.__vitest__,cypress:!!t.Cypress}}catch{return{vitest:!1,cypress:!1}}})();return{isTest:r==="test"||e.vitest||e.cypress,isVitest:e.vitest,isCypress:e.cypress}}class B{pendingUpdates=new Map;isFlushScheduled=!1;isFlushing=!1;testEnv;lastCleanup=0;CLEANUP_INTERVAL=300*1e3;MAX_PENDING_SIZE=1e4;pendingIdleUpdates=new Map;idleCallbackHandle=null;constructor(){this.testEnv=z(),this.schedulePeriodicCleanup()}schedule(e,n){const t=n||e;this.pendingUpdates.size>=this.MAX_PENDING_SIZE&&this.performEmergencyCleanup(),this.pendingUpdates.set(t,e),this.isFlushScheduled||this.scheduleFlush()}scheduleFlush(){this.isFlushScheduled=!0,this.testEnv.isTest&&!this.isFlushing?this.flush():queueMicrotask(()=>this.flush())}flush(){if(this.isFlushing)return;this.isFlushing=!0;const e=this.pendingUpdates;this.pendingUpdates=new Map,this.isFlushScheduled=!1;try{for(const n of e.values())try{n()}catch(t){g.devError("Error in batched update:",t)}}finally{this.isFlushing=!1}}flushImmediately(){this.pendingUpdates.size!==0&&(this.isFlushScheduled=!1,this.flush())}get pendingCount(){return this.pendingUpdates.size}get hasPendingUpdates(){return this.pendingUpdates.size>0}get isFlushingUpdates(){return this.isFlushing}schedulePeriodicCleanup(){if(this.testEnv.isTest)return;const e=()=>{this.performPeriodicCleanup(),this.testEnv.isTest||setTimeout(e,this.CLEANUP_INTERVAL)};setTimeout(e,this.CLEANUP_INTERVAL)}performPeriodicCleanup(){const e=Date.now();e-this.lastCleanup<this.CLEANUP_INTERVAL||(this.pendingUpdates.size>100&&g.devWarn(`Scheduler has ${this.pendingUpdates.size} pending updates. Consider investigating.`),this.lastCleanup=e)}performEmergencyCleanup(e=this.pendingUpdates){g.devWarn("Scheduler emergency cleanup: too many pending updates, clearing oldest entries");const n=Array.from(e.entries()),t=Math.floor(n.length/2);for(let s=0;s<t;s++)e.delete(n[s][0])}scheduleWithPriority(e,n="normal",t){if(n==="immediate"){try{e()}catch(o){g.devError("Error in immediate update:",o)}return}if(n==="idle"){const o=t??e;this.pendingIdleUpdates.size>=this.MAX_PENDING_SIZE&&this.performEmergencyCleanup(this.pendingIdleUpdates),this.pendingIdleUpdates.set(o,e),this.scheduleIdleFlush();return}const s=t??e;this.pendingUpdates.size>=this.MAX_PENDING_SIZE&&this.performEmergencyCleanup(),this.pendingUpdates.set(s,e),this.isFlushScheduled||(this.isFlushScheduled=!0,queueMicrotask(()=>this.flush()))}scheduleIdleFlush(){if(this.idleCallbackHandle===null){if(this.testEnv.isTest){this.idleCallbackHandle=setTimeout(()=>{this.idleCallbackHandle=null,this.flushIdleUpdates(null)},0);return}if(typeof requestIdleCallback<"u"){const e=requestIdleCallback(n=>{this.idleCallbackHandle=null,this.flushIdleUpdates(n)},{timeout:2e3});this.idleCallbackHandle=e}else this.idleCallbackHandle=setTimeout(()=>{this.idleCallbackHandle=null;const e=Date.now();this.flushIdleUpdates({timeRemaining:()=>Math.max(0,50-(Date.now()-e)),didTimeout:!1})},5)}}flushIdleUpdates(e){const n=Array.from(this.pendingIdleUpdates.entries());this.pendingIdleUpdates=new Map;for(let t=0;t<n.length;t++){if(e&&!e.didTimeout&&e.timeRemaining()<=0){for(let s=t;s<n.length;s++)this.pendingIdleUpdates.set(n[s][0],n[s][1]);this.scheduleIdleFlush();return}try{n[t][1]()}catch(s){g.devError("Error in idle update:",s)}}}}const E=new B;function G(r,e){E.schedule(r,e)}function Y(r,e="normal",n){E.scheduleWithPriority(r,e,n)}function J(){E.flushImmediately()}function Q(){return new Promise(r=>{let n=0;for(;E.hasPendingUpdates&&n<100;)E.flushImmediately(),n++;n>=100&&g.devWarn("[nextTick] Maximum flush iterations reached — possible circular update loop. Check for watchers or computed values that unconditionally mutate reactive state."),queueMicrotask(r)})}const U=new WeakSet;class ee{static cache=new WeakMap;static arrayHandlerCache=new WeakMap;static objectHandlerCache=new WeakMap;static getOrCreateProxy(e,n,t=!1){const s=this.cache.get(e);if(s)return s;const o=t?this.getOrCreateArrayHandler(n):this.getOrCreateObjectHandler(n),i=new Proxy(e,o);try{q.markAsProxy(i)}catch{}return this.cache.set(e,i),i}static getOrCreateArrayHandler(e){if(!this.arrayHandlerCache.has(e)){const n={get:(t,s,o)=>{const i=Reflect.get(t,s,o);return typeof i=="function"&&typeof s=="string"&&["push","pop","shift","unshift","splice","sort","reverse","fill","copyWithin"].includes(s)?function(...l){const a=i.apply(t,l);return e.triggerUpdate(),a}:i!==null&&typeof i=="object"&&typeof s=="string"?e.makeReactiveValue(i):i},set:(t,s,o)=>(t[s]=e.makeReactiveValue(o),e.triggerUpdate(),!0),deleteProperty:(t,s)=>(delete t[s],e.triggerUpdate(),!0)};this.arrayHandlerCache.set(e,n)}return this.arrayHandlerCache.get(e)}static getOrCreateObjectHandler(e){if(!this.objectHandlerCache.has(e)){const n={get:(t,s,o)=>{const i=Reflect.get(t,s,o);return i!==null&&typeof i=="object"&&typeof s=="string"?e.makeReactiveValue(i):i},set:(t,s,o)=>(t[s]=e.makeReactiveValue(o),e.triggerUpdate(),!0),deleteProperty:(t,s)=>(delete t[s],e.triggerUpdate(),!0)};this.objectHandlerCache.set(e,n)}return this.objectHandlerCache.get(e)}static hasProxy(e){return this.cache.has(e)}static clear(){this.cache=new WeakMap,this.arrayHandlerCache=new WeakMap,this.objectHandlerCache=new WeakMap}static getStats(){return{hasCachedProxies:this.cache instanceof WeakMap}}}class q{static contextCache=new WeakMap;static createReactiveProxy(e,n,t){try{if(U.has(e))return e}catch{}const s=Array.isArray(e);let o=this.contextCache.get(n);o||(o=new WeakMap,this.contextCache.set(n,o));let i=o.get(t);return i||(i={triggerUpdate:n,makeReactiveValue:t},o.set(t,i)),ee.getOrCreateProxy(e,i,s)}static markAsProxy(e){if(e)try{U.add(e)}catch{}}}let T=!1;function h(){return T}function te(){T&&g.devWarn("[CER] beginDiscoveryRender() called while a discovery render is already active. This usually means a component was registered inside another component's render function. Ensure component() calls are at module top-level."),T=!0}function ne(){T=!1}let re=0;function A(r){return`${r}-${++re}`}class se{currentComponentStack=[];componentData=new Map;stateStorage=new Map;trackingDisabled=!1;setCurrentComponent(e,n){if(this.currentComponentStack.push(e),!this.componentData.has(e))this.componentData.set(e,{dependencies:new Set,renderFn:n,stateIndex:0,lastWarnTime:0,watchers:new Map});else{const t=this.componentData.get(e);if(t.watchers&&t.watchers.size){for(const s of t.watchers.values())try{this.cleanup(s)}catch{}t.watchers.clear()}t.renderFn=n,t.stateIndex=0}}clearCurrentComponent(){this.currentComponentStack.pop()}getCurrentComponentId(){return this.currentComponentStack.length?this.currentComponentStack[this.currentComponentStack.length-1]:null}registerWatcher(e,n){const t=this.componentData.get(e);t&&t.watchers.set(n,n)}disableTracking(){this.trackingDisabled=!0}enableTracking(){this.trackingDisabled=!1}isRenderingComponent(){return this.currentComponentStack.length>0}shouldEmitRenderWarning(){const e=this.currentComponentStack.length?this.currentComponentStack[this.currentComponentStack.length-1]:null;if(!e)return!0;const n=this.componentData.get(e);if(!n)return!0;const t=Date.now();return t-n.lastWarnTime<1e3?!1:(n.lastWarnTime=t,!0)}withoutTracking(e){const n=this.trackingDisabled;this.trackingDisabled=!0;try{return e()}finally{this.trackingDisabled=n}}getOrCreateState(e){const n=this.currentComponentStack.length?this.currentComponentStack[this.currentComponentStack.length-1]:null;if(!n)return new D(e);const t=this.componentData.get(n);if(!t)return new D(e);const s=`${n}:${t.stateIndex++}`;let o=this.stateStorage.get(s);return o||(o=new D(e),this.stateStorage.set(s,o)),o}trackDependency(e){if(this.trackingDisabled)return;const n=this.currentComponentStack.length?this.currentComponentStack[this.currentComponentStack.length-1]:null;if(!n)return;const t=this.componentData.get(n);t&&(t.dependencies.add(e),e.addDependent(n))}propagateDependencies(e){if(this.trackingDisabled)return;const n=this.currentComponentStack.length?this.currentComponentStack[this.currentComponentStack.length-1]:null;if(!n||n===e)return;const t=this.componentData.get(e);if(!t)return;const s=this.componentData.get(n);if(s)for(const o of t.dependencies)s.dependencies.add(o),o.addDependent(n)}triggerUpdate(e){const n=e.getDependents();for(const t of n){const s=this.componentData.get(t);s&&G(s.renderFn,t)}}cleanup(e){const n=this.componentData.get(e);if(n){for(const s of n.dependencies)s.removeDependent(e);this.componentData.delete(e)}const t=e+":";for(const s of this.stateStorage.keys())s.startsWith(t)&&this.stateStorage.delete(s)}}const d=new se;class D{_value;_rawValue;dependents=new Set;constructor(e){this._rawValue=e,this._value=this.makeReactive(e);try{Object.defineProperty(this,Symbol.for("@cer/ReactiveState"),{value:!0,enumerable:!1,configurable:!1})}catch{}}get value(){return d.trackDependency(this),this._value}set value(e){Object.is(e,this._rawValue)||(d.isRenderingComponent()&&d.shouldEmitRenderWarning()&&g.devWarn(`🚨 State modification detected during render! This can cause infinite loops.
2
- • Move state updates to event handlers
3
- • Use watchEffect/watch for side effects
4
- • Ensure computed properties don't modify state`),this._rawValue=e,this._value=this.makeReactive(e),d.triggerUpdate(this))}peek(){return this._value}initSilent(e){this._rawValue=e,this._value=e}addDependent(e){this.dependents.add(e)}removeDependent(e){this.dependents.delete(e)}getDependents(){return this.dependents}makeReactive(e){return e===null||typeof e!="object"||e instanceof Node||e instanceof Element||e instanceof HTMLElement?e:q.createReactiveProxy(e,()=>d.triggerUpdate(this),n=>this.makeReactive(n))}}function oe(r){return d.getOrCreateState(r===void 0?null:r)}function C(r){if(!r||typeof r!="object")return!1;try{const e=Symbol.for("@cer/ReactiveState");return Object.prototype.hasOwnProperty.call(r,e)}catch{return!1}}function ie(r){let e,n=!0;const t=A("computed"),s=()=>{n=!0};try{const o=d.getCurrentComponentId();o&&d.registerWatcher(o,t)}catch{}return d.setCurrentComponent(t,s),e=r(),d.clearCurrentComponent(),n=!1,{get value(){return n&&(d.setCurrentComponent(t,s),e=r(),d.clearCurrentComponent(),n=!1),d.propagateDependencies(t),e}}}function ae(r){if(h())return()=>{};const e=A("effect");try{const t=d.getCurrentComponentId();t&&d.registerWatcher(t,e)}catch{}const n=()=>{d.setCurrentComponent(e,n);try{r()}finally{d.clearCurrentComponent()}};return n(),()=>{d.cleanup(e)}}const L=50;function R(r,e=new WeakMap,n=0){if(r===null||typeof r!="object")return r;const t=r;if(e.has(t))return e.get(t);if(n>L)return g.devWarn(`[watch] Deep clone exceeded ${L} nesting levels. Returning a reference at this depth instead of cloning further. Consider restructuring your state or switching to a shallow watch.`),r;if(typeof Node<"u"&&t instanceof Node)return r;if(t instanceof Date)return new Date(t.getTime());if(Array.isArray(t)){const o=[];e.set(t,o);for(let i=0;i<t.length;i++)o.push(R(t[i],e,n+1));return o}const s={};e.set(t,s);for(const o of Object.keys(t))try{s[o]=R(t[o],e,n+1)}catch{}return s}function ce(r,e,n){if(h())return()=>{};let t;const s=C(r)?()=>r.value:r,o=A("watch");try{const c=d.getCurrentComponentId();c&&d.registerWatcher(c,o)}catch{}const i=()=>{d.setCurrentComponent(o,i);const c=s();if(d.clearCurrentComponent(),n?.deep){const l=d.withoutTracking(()=>R(c));e(l,t),t=l}else c!==t&&(e(c,t),t=c)};return d.setCurrentComponent(o,i),t=s(),d.clearCurrentComponent(),n?.deep&&(t=d.withoutTracking(()=>R(t))),n&&n.immediate&&e(t,void 0),()=>{d.cleanup(o)}}const ue=r=>{try{r()}catch{}},v=new Map,_=new Map,M=new Map,O=500;let k,K,W=!1,F=!1,$;const le=!!globalThis.process?.versions?.node;function X(r){if(v.has(r))return v.get(r);const e=r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return v.size<O&&v.set(r,e),e}function x(r){if(_.has(r))return _.get(r);const e=r.replace(/-([a-z])/g,(n,t)=>t.toUpperCase());return _.size<O&&_.set(r,e),e}function de(r){if(typeof r=="string"){if(M.has(r))return M.get(r);const e=r.replace(/[&<>"']/g,n=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[n]);return e!==r&&M.size<O&&M.set(r,e),e}return r}function y(r){if(!r)return"";const e=String(r);if(typeof document<"u"&&typeof document.createElement=="function"){const c=e.replace(/</g,"").replace(/>/g,""),l=$||($=document.createElement("div"));try{y._el=l}catch{}return l.innerHTML=c,(l.textContent||"").replace(new RegExp("","g"),"<").replace(new RegExp("","g"),">")}const n={lt:"<",gt:">",amp:"&",quot:'"',apos:"'",nbsp:" "},t=k??y._namedMap;let s=t;if(!s&&le)try{const o=globalThis.require;if(typeof o=="function"){const i=["@jasonshimmy/custom-elements-runtime/entities.json","../../entities.json","../../../entities.json","../entities.json","./entities.json"];for(const c of i)try{const l=o(c);if(l&&typeof l=="object"){s=l;break}}catch{}}}catch{}if(!s){s=n,W=!0;try{y._usedFallback=!0}catch{}const o=y._namedMapLoader??K;o&&o().then(i=>{k=i;try{y._namedMap=i}catch{}}).catch(()=>{})}if((W||y._usedFallback)&&!(F||y._warnedFallback)){F=!0;try{y._warnedFallback=!0}catch{}try{g.devWarn("decodeEntities: using small SSR fallback entity map. Register the full entities.json via registerEntityMap(entities) on the server to enable full HTML5 named-entity decoding.")}catch{}}return e.replace(/&(#x?[0-9a-fA-F]+|[a-zA-Z]+);/g,(o,i)=>{if(i.charCodeAt(0)===35){const a=(i.charAt(1)||"").toLowerCase()==="x"?parseInt(i.slice(2),16):parseInt(i.slice(1),10);return Number.isNaN(a)?`&${i};`:String.fromCodePoint(a)}const c=s[i]??(t&&t[i]);return c!==void 0?c:`&${i};`})}async function P(){const r=["@jasonshimmy","custom-elements-runtime","entities.json"].join("/");try{const e=await import(r);return e&&(e.default||e)}catch{try{const e=[r,"./entities.json","../../entities.json","../../../entities.json"];for(const n of e)try{const t=await import(n);if(t)return t&&(t.default||t)}catch{}return{lt:"<",gt:">",amp:"&",quot:'"',apos:"'",nbsp:" "}}catch{return{lt:"<",gt:">",amp:"&",quot:'"',apos:"'",nbsp:" "}}}}K=P;y._namedMapLoader=P;function fe(r,e){!r||typeof r!="object"||k&&!e?.overwrite||(k=r)}function he(){k=void 0}function pe(r){const e=String(r);return{__unsafeHTML:e,__rawHTML:e}}function ge(r){return!!r&&(typeof r.__unsafeHTML=="string"||typeof r.__rawHTML=="string")}function me(r,e){if(typeof e=="string"){if(e==="")return;const n=e.split(".");let t=r;for(const s of n){if(t==null||typeof t!="object"){t=void 0;break}t=t[s]}return C(t)?t.value:t}return e}function ye(r,e,n){const t=String(e).split("."),s=t.pop();if(!s)return;const o=t.reduce((i,c)=>(i[c]==null&&(i[c]={}),i[c]),r);C(o[s])?o[s].value=n:o[s]=n}function Ce(r){try{if(r&&typeof r=="object"){if(C(r))return r.value;if("value"in r){const e=r.value;return e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"?e:r}}}catch{}return r}function be(r){const e=Ce(r);if(e==null)return null;const n=typeof e;return n==="string"||n==="number"||n==="boolean"?String(e):null}function we(r){if(!r||typeof r!="string")return!1;if(r==="class"||r.endsWith("Class"))return!0;if(r.includes("-"))try{if(r.split("-").some(n=>n==="class"))return!0}catch{}return!1}let b=null;function Se(){if(b!==null)throw new Error("[CER] Concurrent SSR render detected: beginSSRGlobalStyleCollection() called while a collection is already active. For concurrent request handling, use worker threads or multiple Node.js processes.");b=[]}function Ee(){const r=b??[];return b=null,r}function ke(r){return b!==null?(r&&!b.includes(r)&&b.push(r),!0):!1}function ve(r,e,n="unknown"){const t={};for(const[a,m]of Object.entries(e??{}))t[x(a)]=m;const s={getAttribute(a){const m=x(a);if(t[m]!==void 0&&t[m]!==null)return String(t[m]);const p=(e??{})[a];return p!=null?String(p):null},hasAttribute(a){return this.getAttribute(a)!==null},shadowRoot:null,tagName:"",parentElement:null},o={...t,_componentId:`cer-ssr-${Object.keys(t).join("-")||"root"}`,requestRender:()=>{},_requestRender:()=>{},emit:()=>!0,refs:{}};Object.defineProperty(o,"_host",{value:s,writable:!0,enumerable:!1,configurable:!0}),N(o);let i=null,c;try{const a=r.render(o);a instanceof Promise?c=a:i=a}catch(a){g.devWarn(`[SSR] Component "${n}" threw during SSR render. The shadow DOM will be empty. Error:`,a)}finally{H()}const l=String(o._computedStyle??"");return{shadowVNode:i,useStyleCSS:l,asyncPromise:c}}function _e(){return h()}let u=null;const S=Symbol("cer:provides");function N(r){u=r}function H(){u=null}function Me(){return u}function De(){if(!u)throw new Error("useEmit must be called during component render");if(h())return()=>!1;const r=u.emit;if(typeof r!="function")throw new Error("useEmit requires an emit function on the component context");const e=r;return(n,t,s)=>e(n,t,s)}function w(r){r._hookCallbacks||Object.defineProperty(r,"_hookCallbacks",{value:{},writable:!0,enumerable:!1,configurable:!0})}function Te(r){if(!u)throw new Error("useOnConnected must be called during component render");if(h())return;w(u);const e=u._hookCallbacks;e.onConnected||(e.onConnected=[]),e.onConnected.push(r)}function Re(r){if(!u)throw new Error("useOnDisconnected must be called during component render");if(h())return;w(u);const e=u._hookCallbacks;e.onDisconnected||(e.onDisconnected=[]),e.onDisconnected.push(r)}function Ne(r){if(!u)throw new Error("useOnAttributeChanged must be called during component render");if(h())return;w(u);const e=u._hookCallbacks;e.onAttributeChanged||(e.onAttributeChanged=[]),e.onAttributeChanged.push(r)}function xe(r){if(!u)throw new Error("useOnError must be called during component render");if(h())return;w(u);const e=u._hookCallbacks;e.onError||(e.onError=[]),e.onError.push(n=>{try{n instanceof Error?r(n):r(new Error(String(n)))}catch(t){g.devError("[useOnError] The error handler itself threw an exception:",t)}})}function Z(r){if(!u)throw new Error("useProps must be called during component render");w(u);const e=u._hookCallbacks;e.props={...e.props||{},...r};const n=u;try{const s=Object.keys(r||{});for(const o of s){if(typeof o!="string"||o.startsWith("_"))continue;const i=Object.getOwnPropertyDescriptor(n,o);if(!(i&&!i.configurable))try{let l=Object.prototype.hasOwnProperty.call(n,o)?n[o]:void 0;Object.defineProperty(n,o,{configurable:!0,enumerable:!0,get(){try{const a=n&&n._host;if(a){const m=X(o),p=a.getAttribute(m);if(p!==null){const f=typeof r[o];return f==="boolean"?p===""||p==="true":f==="number"?Number(p):p}if(typeof a[o]<"u"){const f=a[o];if(C(f)||f&&typeof f=="object"&&"value"in f&&!(f instanceof Node))return f.value;const I=typeof r[o];if(!(I==="string"&&f&&typeof f=="object"))return I==="boolean"&&typeof f=="string"?f===""||f==="true":f}}}catch{}return l},set(a){l=a}})}catch{}}}catch{}return new Proxy({},{get(s,o){if(typeof o!="string")return;const i=r[o];try{const l=n&&n._host;if(l){if(l instanceof HTMLElement||typeof l.getAttribute=="function"&&typeof l.hasAttribute=="function"){const m=o.replace(/([A-Z])/g,"-$1").toLowerCase(),p=l.getAttribute(m);if(p!==null)return typeof i=="boolean"?p===""||p==="true":typeof i=="number"?Number(p):p}const a=l[o];if(typeof a<"u"&&a!==""){const m=a&&typeof a=="object"&&"value"in a&&!(a instanceof Node);if(!(typeof i=="string"&&a&&typeof a=="object"&&!m&&!C(a)))return typeof i=="boolean"&&i===!1&&a===""?i:C(a)||m?a.value:typeof i=="boolean"&&typeof a=="string"?a===""||a==="true":typeof i=="number"&&typeof a=="string"&&!Number.isNaN(Number(a))?Number(a):a}}}catch{}const c=n[o];return typeof i=="boolean"&&c===""?i===!1?i:!0:C(c)||c&&typeof c=="object"&&"value"in c&&!(c instanceof Node)?c.value:c!=null&&c!==""?typeof i=="boolean"&&typeof c=="string"?c==="true":typeof i=="number"&&typeof c=="string"&&!Number.isNaN(Number(c))?Number(c):c:i},has(s,o){return typeof o=="string"&&(o in n||o in r)},ownKeys(){return Array.from(new Set([...Object.keys(r),...Object.keys(n||{})]))},getOwnPropertyDescriptor(){return{configurable:!0,enumerable:!0}}})}function Ae(r){if(!u)throw new Error("useStyle must be called during component render");if(!h()){w(u);try{const e=r();Object.defineProperty(u,"_computedStyle",{value:e,writable:!0,enumerable:!1,configurable:!0})}catch(e){g.devWarn("Error in useStyle callback:",e),Object.defineProperty(u,"_computedStyle",{value:"",writable:!0,enumerable:!1,configurable:!0})}}}const V=new Map;function Oe(r){let e;try{e=r()}catch{return}if(ke(e)||typeof document>"u"||typeof CSSStyleSheet>"u")return;g.devWarn("[useGlobalStyle] Injecting global styles from a component. This escapes Shadow DOM encapsulation — use sparingly.");const n=j.minifyCSS(j.sanitizeCSS(e));if(!(!n||V.has(n)))try{const t=new CSSStyleSheet;t.replaceSync(n),document.adoptedStyleSheets=[...document.adoptedStyleSheets,t],V.set(n,t)}catch{const t=document.createElement("style");t.textContent=n,(document.head??document.documentElement).appendChild(t)}}function Pe(r){if(!u)throw new Error("useDesignTokens must be called during component render");if(h())return;const e=[],n={primary:"--cer-color-primary-500",secondary:"--cer-color-secondary-500",neutral:"--cer-color-neutral-500",success:"--cer-color-success-500",info:"--cer-color-info-500",warning:"--cer-color-warning-500",error:"--cer-color-error-500"},t={fontSans:"--cer-font-sans",fontSerif:"--cer-font-serif",fontMono:"--cer-font-mono"};for(const[l,a]of Object.entries(r))a!==void 0&&(l in n?e.push(`${n[l]}:${a}`):l in t?e.push(`${t[l]}:${a}`):l.startsWith("--")&&e.push(`${l}:${a}`));if(e.length===0)return;const s=`:host{${e.join(";")}}`,i=u._computedStyle??"",c=i?`${i}
5
- ${s}`:s;Object.defineProperty(u,"_computedStyle",{value:c,writable:!0,enumerable:!1,configurable:!0})}function He(r,e){if(!u)throw new Error("provide must be called during component render");if(h())return;const n=u;n[S]||Object.defineProperty(n,S,{value:new Map,writable:!1,enumerable:!1,configurable:!0}),n[S].set(r,e)}function Ie(r,e){if(!u)throw new Error("inject must be called during component render");if(h())return e;try{const n=u._host;if(n){let t=n.parentNode;t||(t=n.getRootNode());let s=0;const o=50;for(;t&&s<o;)if(s++,t instanceof ShadowRoot){const i=t.host,c=i.context;if(c){const a=c[S];if(a?.has(r))return a.get(r)}if(t=i.parentNode??i.getRootNode(),t===document||t===i)break}else{if(t instanceof Element){const l=t.context;if(l){const a=l[S];if(a?.has(r))return a.get(r)}}const i=t;if(t=t.parentNode??t.getRootNode?.(),t===document||t===i)break}}}catch{}return e}function je(r){return e=>{const n=e??u;if(!n)throw new Error("createComposable: no component context available. Pass a context explicitly or call inside a render function.");const t=u;N(n);try{return r()}finally{t?N(t):H()}}}function Ue(r){if(!u)throw new Error("useExpose must be called during component render");if(h())return;w(u);const e=u._hookCallbacks;e.expose={...e.expose??{},...r};const n=u._host;if(n)for(const[t,s]of Object.entries(r))try{n[t]=s}catch{}}function Le(){if(!u)throw new Error("useSlots must be called during component render");if(h())return{has:()=>!1,getNodes:()=>[],names:()=>[]};const r=u._host,e=()=>{const n=new Map;if(!r)return n;for(const t of r.children){const s=t.getAttribute("slot")??"default",o=n.get(s);o?o.push(t):n.set(s,[t])}return n};return{has(n){if(!r)return!1;const t=!n||n==="default"?"default":n,s=e().get(t);return s!==void 0&&s.length>0},getNodes(n){if(!r)return[];const t=!n||n==="default"?"default":n;return e().get(t)??[]},names(){return r?Array.from(e().keys()):[]}}}function We(...r){if(!u)throw new Error("defineModel must be called during component render");const e=r.length===2?r[0]:"modelValue",n=r.length===2?r[1]:r.length===1?r[0]:void 0,t=Z({[e]:n}),o=h()?null:(()=>{const c=u.emit;return typeof c!="function"?null:c})(),i={get value(){return t[e]},set value(c){o&&o(`update:${e}`,c)}};try{Object.defineProperty(i,Symbol.for("@cer/ReactiveState"),{value:!0,enumerable:!1,configurable:!1})}catch{}return i}exports.ReactiveState=D;exports.beginDiscoveryRender=te;exports.beginSSRGlobalStyleCollection=Se;exports.clearCurrentComponentContext=H;exports.clearRegisteredEntityMap=he;exports.computed=ie;exports.createComposable=je;exports.decodeEntities=y;exports.defineModel=We;exports.detectTestEnvironment=z;exports.endDiscoveryRender=ne;exports.endSSRGlobalStyleCollection=Ee;exports.escapeHTML=de;exports.flushDOMUpdates=J;exports.getCurrentComponentContext=Me;exports.getNestedValue=me;exports.inject=Ie;exports.isClassLikeAttr=we;exports.isDiscoveryRender=_e;exports.isDiscoveryRender$1=h;exports.isReactiveState=C;exports.isUnsafeHTML=ge;exports.loadEntityMap=P;exports.nextTick=Q;exports.provide=He;exports.reactiveSystem=d;exports.ref=oe;exports.registerEntityMap=fe;exports.runComponentSSRRender=ve;exports.safe=ue;exports.safeSerializeAttr=be;exports.scheduleDOMUpdate=G;exports.scheduleWithPriority=Y;exports.setCurrentComponentContext=N;exports.setNestedValue=ye;exports.toCamel=x;exports.toKebab=X;exports.unsafeHTML=pe;exports.useDesignTokens=Pe;exports.useEmit=De;exports.useExpose=Ue;exports.useGlobalStyle=Oe;exports.useOnAttributeChanged=Ne;exports.useOnConnected=Te;exports.useOnDisconnected=Re;exports.useOnError=xe;exports.useProps=Z;exports.useSlots=Le;exports.useStyle=Ae;exports.watch=ce;exports.watchEffect=ae;
6
- //# sourceMappingURL=hooks-x8M4knLc.cjs.map