@jasonshimmy/custom-elements-runtime 2.8.2 → 3.0.0

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 (91) hide show
  1. package/README.md +159 -46
  2. package/dist/css-utils-Cg4o1MqY.js +643 -0
  3. package/dist/css-utils-Cg4o1MqY.js.map +1 -0
  4. package/dist/css-utils-RqkyBWft.cjs +576 -0
  5. package/dist/css-utils-RqkyBWft.cjs.map +1 -0
  6. package/dist/custom-elements-runtime.cjs.js +3 -3
  7. package/dist/custom-elements-runtime.cjs.js.map +1 -1
  8. package/dist/custom-elements-runtime.dom-jit-css.cjs.js +7 -0
  9. package/dist/custom-elements-runtime.dom-jit-css.cjs.js.map +1 -0
  10. package/dist/custom-elements-runtime.dom-jit-css.es.js +136 -0
  11. package/dist/custom-elements-runtime.dom-jit-css.es.js.map +1 -0
  12. package/dist/custom-elements-runtime.es.js +70 -67
  13. package/dist/custom-elements-runtime.es.js.map +1 -1
  14. package/dist/custom-elements-runtime.event-bus.cjs.js +1 -1
  15. package/dist/custom-elements-runtime.event-bus.cjs.js.map +1 -1
  16. package/dist/custom-elements-runtime.event-bus.es.js +62 -46
  17. package/dist/custom-elements-runtime.event-bus.es.js.map +1 -1
  18. package/dist/custom-elements-runtime.jit-css.cjs.js +2 -0
  19. package/dist/custom-elements-runtime.jit-css.cjs.js.map +1 -0
  20. package/dist/custom-elements-runtime.jit-css.es.js +38 -0
  21. package/dist/custom-elements-runtime.jit-css.es.js.map +1 -0
  22. package/dist/custom-elements-runtime.router.cjs.js +20 -20
  23. package/dist/custom-elements-runtime.router.cjs.js.map +1 -1
  24. package/dist/custom-elements-runtime.router.es.js +448 -434
  25. package/dist/custom-elements-runtime.router.es.js.map +1 -1
  26. package/dist/custom-elements-runtime.ssr.cjs.js +1 -1
  27. package/dist/custom-elements-runtime.ssr.cjs.js.map +1 -1
  28. package/dist/custom-elements-runtime.ssr.es.js +33 -18
  29. package/dist/custom-elements-runtime.ssr.es.js.map +1 -1
  30. package/dist/custom-elements-runtime.store.cjs.js +1 -1
  31. package/dist/custom-elements-runtime.store.cjs.js.map +1 -1
  32. package/dist/custom-elements-runtime.store.es.js +21 -16
  33. package/dist/custom-elements-runtime.store.es.js.map +1 -1
  34. package/dist/custom-elements-runtime.transitions.cjs.js +1 -1
  35. package/dist/custom-elements-runtime.transitions.cjs.js.map +1 -1
  36. package/dist/custom-elements-runtime.transitions.es.js +279 -7
  37. package/dist/custom-elements-runtime.transitions.es.js.map +1 -1
  38. package/dist/custom-elements-runtime.vite-plugin.cjs.js +2 -0
  39. package/dist/custom-elements-runtime.vite-plugin.cjs.js.map +1 -0
  40. package/dist/custom-elements-runtime.vite-plugin.es.js +73 -0
  41. package/dist/custom-elements-runtime.vite-plugin.es.js.map +1 -0
  42. package/dist/dom-jit-css.d.ts +66 -0
  43. package/dist/event-bus.d.ts +3 -1
  44. package/dist/{namespace-helpers-DhLBqt-7.js → helpers-CweFZFWU.js} +265 -287
  45. package/dist/helpers-CweFZFWU.js.map +1 -0
  46. package/dist/helpers-DeWjSmOl.cjs +5 -0
  47. package/dist/helpers-DeWjSmOl.cjs.map +1 -0
  48. package/dist/hooks-BrrLKSub.cjs +3 -0
  49. package/dist/hooks-BrrLKSub.cjs.map +1 -0
  50. package/dist/hooks-DyShDHKo.js +403 -0
  51. package/dist/hooks-DyShDHKo.js.map +1 -0
  52. package/dist/index.d.ts +3 -3
  53. package/dist/jit-css.d.ts +30 -0
  54. package/dist/namespace-helpers-CnpZ5__p.js +45 -0
  55. package/dist/namespace-helpers-CnpZ5__p.js.map +1 -0
  56. package/dist/namespace-helpers-CyIDtI97.cjs +2 -0
  57. package/dist/namespace-helpers-CyIDtI97.cjs.map +1 -0
  58. package/dist/router/types.d.ts +4 -2
  59. package/dist/runtime/css-utils.d.ts +33 -0
  60. package/dist/runtime/discovery-state.d.ts +3 -0
  61. package/dist/runtime/hooks.d.ts +78 -0
  62. package/dist/runtime/jit-hooks.d.ts +28 -0
  63. package/dist/runtime/render-bridge.d.ts +37 -0
  64. package/dist/runtime/scheduler.d.ts +3 -4
  65. package/dist/runtime/secure-expression-evaluator.d.ts +0 -1
  66. package/dist/runtime/style.d.ts +84 -26
  67. package/dist/runtime/template-compiler/lru-cache.d.ts +0 -3
  68. package/dist/runtime/vdom-helpers.d.ts +0 -1
  69. package/dist/ssr.d.ts +42 -0
  70. package/dist/{transitions-DMJXs_tY.js → style-BmyOIMcU.js} +904 -1344
  71. package/dist/style-BmyOIMcU.js.map +1 -0
  72. package/dist/style-D40DsIqJ.cjs +55 -0
  73. package/dist/style-D40DsIqJ.cjs.map +1 -0
  74. package/dist/style.css +1 -1
  75. package/dist/template-compiler-B5uN1EQw.js +3731 -0
  76. package/dist/template-compiler-B5uN1EQw.js.map +1 -0
  77. package/dist/template-compiler-Cx623BSB.cjs +23 -0
  78. package/dist/template-compiler-Cx623BSB.cjs.map +1 -0
  79. package/dist/variables.css +1 -1
  80. package/dist/vite-plugin.d.ts +52 -0
  81. package/package.json +55 -6
  82. package/dist/namespace-helpers-Ctd_h7j2.cjs +0 -5
  83. package/dist/namespace-helpers-Ctd_h7j2.cjs.map +0 -1
  84. package/dist/namespace-helpers-DhLBqt-7.js.map +0 -1
  85. package/dist/template-compiler-Bvx02nAT.js +0 -4020
  86. package/dist/template-compiler-Bvx02nAT.js.map +0 -1
  87. package/dist/template-compiler-bj-MFC_Y.cjs +0 -23
  88. package/dist/template-compiler-bj-MFC_Y.cjs.map +0 -1
  89. package/dist/transitions-DMJXs_tY.js.map +0 -1
  90. package/dist/transitions-f4KfN29T.cjs +0 -330
  91. package/dist/transitions-f4KfN29T.cjs.map +0 -1
package/README.md CHANGED
@@ -6,7 +6,10 @@
6
6
 
7
7
  Build modern components with strict TypeScript, zero dependencies, and a clean functional API. Designed for speed, standards compliance, and productivity.
8
8
 
9
- 🕹️ Try it on [Codepen.io](https://codepen.io/jshimkoski/pen/JoYmpxm).
9
+ - Try it on [Codepen.io](https://codepen.io/jshimkoski/pen/JoYmpxm).
10
+ - Check out the [Material Design 3 Components](https://github.com/jshimkoski/cer-material) built with this runtime.
11
+ - Play a game of [Solatro](https://solatro.netlify.app) built with this runtime in 100% Web Components.
12
+ - Learn more about the author at [jasonshimmy.com](https://jasonshimmy.com).
10
13
 
11
14
  ## ✨ Why You'll Love It
12
15
 
@@ -30,8 +33,11 @@ import {
30
33
  defineModel,
31
34
  html,
32
35
  } from '@jasonshimmy/custom-elements-runtime';
36
+ import { useJITCSS } from '@jasonshimmy/custom-elements-runtime/jit-css';
33
37
 
34
38
  component('my-counter', () => {
39
+ useJITCSS();
40
+
35
41
  const count = defineModel('count', 0);
36
42
 
37
43
  const handleClick = () => {
@@ -74,47 +80,49 @@ Below is the **complete list of public symbols** exported by the runtime and its
74
80
 
75
81
  **Package:** `@jasonshimmy/custom-elements-runtime`
76
82
 
77
- | Export | Description |
78
- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
79
- | `component` | Define a custom element with the functional component API. |
80
- | `html` | Template tag function producing runtime VNodes from template literals. |
81
- | `css` | Define component-scoped/JIT styles or register stylesheets. |
82
- | `ref` | Create a reactive reference object with a `.value` property. |
83
- | `computed` | Create a memoized, derived read-only value from other reactive sources. |
84
- | `watch` | Register watchers reacting to changes in reactive values. |
85
- | `watchEffect` | Auto-track reactive reads and re-run a side-effect whenever dependencies change. |
86
- | `nextTick` | Returns a Promise resolving after all pending DOM updates are flushed. |
87
- | `flushDOMUpdates` | Synchronously flush all pending DOM update tasks (useful in tests). |
88
- | `scheduleWithPriority` | Schedule a callback at a given `UpdatePriority` level. |
89
- | `provide` | Store a value on the current component for descendant injection. |
90
- | `inject` | Retrieve a value provided by an ancestor component. |
91
- | `createComposable` | Package reusable stateful logic (hooks, reactive state) into a composable. |
92
- | `getCurrentComponentContext` | Access the active component context from within a composable or render function. |
93
- | `useProps` | Hook to declare/consume typed component props with defaults. |
94
- | `defineModel` | Declare a two-way model binding prop; combines `useProps` + `useEmit` in one ergonomic hook. |
95
- | `useEmit` | Hook returning an emit function for dispatching custom events. |
96
- | `useOnConnected` | Hook that runs a callback when the component connects. |
97
- | `useOnDisconnected` | Hook that runs a callback when the component disconnects. |
98
- | `useOnAttributeChanged` | Hook observing host attribute changes. |
99
- | `useOnError` | Hook to register a component-level error handler. |
100
- | `useStyle` | Hook to register or compute component styles at runtime. |
101
- | `useExpose` | Publish methods and properties onto the host element as an imperative public API. |
102
- | `useSlots` | Inspect which named slots have been filled by the component consumer. |
103
- | `useTeleport` | Render virtual DOM content into any DOM node outside the shadow root. |
104
- | `registerKeepAlive` | Register `<cer-keep-alive>` to preserve component state across DOM removals. |
105
- | `registerSuspense` | Register the `<cer-suspense>` built-in component. |
106
- | `registerErrorBoundary` | Register the `<cer-error-boundary>` built-in component. |
107
- | `registerBuiltinComponents` | Register `<cer-keep-alive>`, `<cer-suspense>` and `<cer-error-boundary>` in one call. |
108
- | `unsafeHTML` | Insert raw HTML into a template (**unsafe; use carefully**). |
109
- | `decodeEntities` | Utility to decode HTML entities in strings. |
110
- | `setDevMode` | Toggle dev-mode logging on or off at runtime. |
111
- | `devLog` | Log a message to the console in dev mode only (no-op in production). |
112
- | `isReactiveState` | Type-guard returning `true` when a value is a `ReactiveState` instance. |
113
- | `createHealthMonitor` | Create a new health monitor instance (factory; each call returns an independent instance). |
114
- | `getHealthMonitor` | Return the global singleton health monitor instance (lazily created). |
115
- | `updateHealthMetric` | Update a named metric on the global singleton health monitor. |
116
- | `getHealthStatus` | Return the current `HealthReport` from the global singleton health monitor. |
117
- | **Types** | `ModelRef`, `DefineModelOptions`, `HealthMonitorInstance`, `HealthReport`, `UpdatePriority`, `TeleportHandle`, `ReactiveState`, `VNode` |
83
+ | Export | Description |
84
+ | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
85
+ | `component` | Define a custom element with the functional component API. |
86
+ | `html` | Template tag function producing runtime VNodes from template literals. |
87
+ | `css` | Define component-scoped/JIT styles or register stylesheets. |
88
+ | `ref` | Create a reactive reference object with a `.value` property. |
89
+ | `computed` | Create a memoized, derived read-only value from other reactive sources. |
90
+ | `watch` | Register watchers reacting to changes in reactive values. |
91
+ | `watchEffect` | Auto-track reactive reads and re-run a side-effect whenever dependencies change. |
92
+ | `nextTick` | Returns a Promise resolving after all pending DOM updates are flushed. |
93
+ | `flushDOMUpdates` | Synchronously flush all pending DOM update tasks (useful in tests). |
94
+ | `scheduleWithPriority` | Schedule a callback at a given `UpdatePriority` level. |
95
+ | `provide` | Store a value on the current component for descendant injection. |
96
+ | `inject` | Retrieve a value provided by an ancestor component. |
97
+ | `createComposable` | Package reusable stateful logic (hooks, reactive state) into a composable. |
98
+ | `getCurrentComponentContext` | Access the active component context from within a composable or render function. |
99
+ | `useProps` | Hook to declare/consume typed component props with defaults. |
100
+ | `defineModel` | Declare a two-way model binding prop; combines `useProps` + `useEmit` in one ergonomic hook. |
101
+ | `useEmit` | Hook returning an emit function for dispatching custom events. |
102
+ | `useOnConnected` | Hook that runs a callback when the component connects. |
103
+ | `useOnDisconnected` | Hook that runs a callback when the component disconnects. |
104
+ | `useOnAttributeChanged` | Hook observing host attribute changes. |
105
+ | `useOnError` | Hook to register a component-level error handler. |
106
+ | `useStyle` | Hook to register or compute component styles at runtime. |
107
+ | `useDesignTokens` | Apply typed design token overrides to `:host` as CSS custom properties. |
108
+ | `useGlobalStyle` | Inject CSS into `document.adoptedStyleSheets`, escaping Shadow DOM encapsulation. Use sparingly. |
109
+ | `useExpose` | Publish methods and properties onto the host element as an imperative public API. |
110
+ | `useSlots` | Inspect which named slots have been filled by the component consumer. |
111
+ | `useTeleport` | Render virtual DOM content into any DOM node outside the shadow root. |
112
+ | `registerKeepAlive` | Register `<cer-keep-alive>` to preserve component state across DOM removals. |
113
+ | `registerSuspense` | Register the `<cer-suspense>` built-in component. |
114
+ | `registerErrorBoundary` | Register the `<cer-error-boundary>` built-in component. |
115
+ | `registerBuiltinComponents` | Register `<cer-keep-alive>`, `<cer-suspense>` and `<cer-error-boundary>` in one call. |
116
+ | `unsafeHTML` | Insert raw HTML into a template (**unsafe; use carefully**). |
117
+ | `decodeEntities` | Utility to decode HTML entities in strings. |
118
+ | `setDevMode` | Toggle dev-mode logging on or off at runtime. |
119
+ | `devLog` | Log a message to the console in dev mode only (no-op in production). |
120
+ | `isReactiveState` | Type-guard returning `true` when a value is a `ReactiveState` instance. |
121
+ | `createHealthMonitor` | Create a new health monitor instance (factory; each call returns an independent instance). |
122
+ | `getHealthMonitor` | Return the global singleton health monitor instance (lazily created). |
123
+ | `updateHealthMetric` | Update a named metric on the global singleton health monitor. |
124
+ | `getHealthStatus` | Return the current `HealthReport` from the global singleton health monitor. |
125
+ | **Types** | `ModelRef`, `HealthMonitorInstance`, `HealthReport`, `UpdatePriority`, `TeleportHandle`, `ReactiveState`, `VNode`, `JITCSSOptions`, `DesignTokens` |
118
126
 
119
127
  ---
120
128
 
@@ -231,11 +239,13 @@ Below is the **complete list of public symbols** exported by the runtime and its
231
239
  | Export | Description |
232
240
  | -------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
233
241
  | `renderToString` | Render a VNode tree to HTML for server-side rendering. |
242
+ | `renderToStringWithJITCSS` | Render a VNode tree to HTML and simultaneously pre-generate JIT CSS for all utility classes, eliminating FOUC. |
234
243
  | `registerEntityMap` | Register a custom named-entity map for SSR `decodeEntities`. |
235
244
  | `loadEntityMap` | Async loader that dynamically imports the full HTML5 named-entity map; returns the map to pass to `registerEntityMap`. |
236
245
  | `clearRegisteredEntityMap` | Reset the registered entity map back to the built-in minimal set. |
237
246
  | `VNode` (type) | The runtime VNode shape used by renderers and SSR. |
238
247
  | `RenderOptions` (type) | Options for `renderToString` (`injectSvgNamespace`, `injectKnownNamespaces`). |
248
+ | `SSRJITResult` (type) | Result of `renderToStringWithJITCSS`: `{ html, css, htmlWithStyles }`. |
239
249
 
240
250
  ### Global Styles (CSS)
241
251
 
@@ -291,6 +301,91 @@ component('branded-card', () => {
291
301
  | `extendedColors` | Full extended palette — `Record<string, Record<string, string>>` (name → shade → hex). |
292
302
  | `ColorScale` | Type: single color scale with shade keys `50`–`950`. |
293
303
 
304
+ ---
305
+
306
+ ### JIT CSS Engine
307
+
308
+ **Package:** `@jasonshimmy/custom-elements-runtime/jit-css`
309
+
310
+ Opt-in JIT CSS engine with hooks, global control, and the `cls()` helper for IDE tooling.
311
+
312
+ | Export | Description |
313
+ | ------------------------ | ------------------------------------------------------------------------------------------------------------------- |
314
+ | `useJITCSS` | Enable JIT CSS for the current component (per-component opt-in). Pass `JITCSSOptions` to configure colors/variants. |
315
+ | `useDesignTokens` | Apply typed design token overrides to `:host` as CSS custom properties. |
316
+ | `useGlobalStyle` | Inject CSS into `document.adoptedStyleSheets`, escaping Shadow DOM encapsulation. |
317
+ | `enableJITCSS` | Enable JIT CSS globally for all components. |
318
+ | `disableJITCSS` | Disable JIT CSS globally. |
319
+ | `isJITCSSEnabled` | Returns `true` when JIT CSS is globally active. |
320
+ | `isJITCSSEnabledFor` | Returns `true` when JIT CSS is active for a specific `ShadowRoot`. |
321
+ | `jitCSS` | Generate CSS from an HTML string (low-level engine). |
322
+ | `extractClassesFromHTML` | Extract unique class names from an HTML string. |
323
+ | `cls` | Identity function that signals JIT class names to IDE tooling and static scanners (no-op at runtime). |
324
+ | `parseColorClass` | Parse a color utility class name to its CSS declaration. |
325
+ | `parseColorWithOpacity` | Parse a color class with an optional `/opacity` modifier into its CSS declaration. |
326
+ | `parseGradientColorStop` | Parse a gradient color stop utility (`from-*`, `via-*`, `to-*`) to its CSS declaration. |
327
+ | `parseSpacing` | Parse a spacing utility class name to its CSS declaration. |
328
+ | `parseArbitrary` | Parse an arbitrary value utility class name. |
329
+ | `utilityMap` | Complete mapping of all static utility class names to their CSS declarations. |
330
+ | `selectorVariants` | State and pseudo-class variant selector map (`hover:`, `focus:`, `disabled:`, `inert:`, etc.). |
331
+ | `mediaVariants` | Responsive breakpoint media query map (`sm:`, `md:`, `lg:`, `xl:`, `2xl:`, `dark:`). |
332
+ | `containerVariants` | Container query breakpoint map (`@sm:`, `@md:`, `@lg:`, `@xl:`, `@2xl:`). |
333
+ | `colors` | Semantic color palette object (`neutral`, `primary`, `secondary`, `success`, `info`, `warning`, `error`). |
334
+ | **Types** | `JITCSSOptions`, `DesignTokens` |
335
+
336
+ ---
337
+
338
+ ### DOM JIT CSS
339
+
340
+ **Package:** `@jasonshimmy/custom-elements-runtime/dom-jit-css`
341
+
342
+ Runtime DOM scanner for non-Shadow DOM contexts (React, Svelte, Vue, plain HTML).
343
+
344
+ ```ts
345
+ import { createDOMJITCSS } from '@jasonshimmy/custom-elements-runtime/dom-jit-css';
346
+
347
+ const jit = createDOMJITCSS({ extendedColors: true });
348
+ jit.mount(); // start watching
349
+ jit.destroy(); // tear down
350
+ ```
351
+
352
+ | Export | Description |
353
+ | ----------------- | --------------------------------------------------------------------------------------------------- |
354
+ | `createDOMJITCSS` | Create a DOM JIT CSS instance that watches class changes and injects utility CSS into the document. |
355
+ | **Types** | `DOMJITCSSOptions`, `DOMJITCSSHandle` |
356
+
357
+ ---
358
+
359
+ ### Vite Plugin
360
+
361
+ **Package:** `@jasonshimmy/custom-elements-runtime/vite-plugin`
362
+
363
+ Build-time static analysis plugin that emits pre-generated CSS, eliminating runtime parsing cost entirely.
364
+
365
+ _Please note:_ This plugin generates light-DOM JIT CSS. For Shadow DOM contexts, you must still use `useJITCSS` per component, or `enableJITCSS` for all components.
366
+
367
+ ```ts
368
+ // vite.config.ts
369
+ import { cerJITCSS } from '@jasonshimmy/custom-elements-runtime/vite-plugin';
370
+
371
+ export default defineConfig({
372
+ plugins: [
373
+ cerJITCSS({
374
+ content: ['./src/**/*.{ts,tsx,html}'],
375
+ output: 'src/generated-jit.css',
376
+ extendedColors: true,
377
+ }),
378
+ ],
379
+ });
380
+ ```
381
+
382
+ | Export | Description |
383
+ | ----------- | ---------------------------------------------------------------------------------- |
384
+ | `cerJITCSS` | Vite plugin that scans source files at build time and emits pre-generated JIT CSS. |
385
+ | **Types** | `CerJITCSSPluginOptions` |
386
+
387
+ ---
388
+
294
389
  ## 📖 Documentation Index
295
390
 
296
391
  Explore the complete documentation for every runtime feature:
@@ -319,7 +414,9 @@ Explore the complete documentation for every runtime feature:
319
414
 
320
415
  ### 🎨 **Styling**
321
416
 
322
- - [🎨 JIT CSS](./docs/jit-css.md) - On-demand utility-first styling system
417
+ - [🎨 JIT CSS](./docs/jit-css.md) - On-demand utility-first styling system (opt-in architecture, all utilities, `useJITCSS`, `useDesignTokens`, `useGlobalStyle`, `cls`)
418
+ - [⚡ DOM JIT CSS](./docs/dom-jit-css.md) - Runtime DOM scanner for non-Shadow DOM contexts (React, Svelte, Vue, plain HTML)
419
+ - [🔧 Vite Plugin](./docs/vite-plugin.md) - Build-time static analysis that eliminates runtime JIT parsing cost
323
420
  - [📏 Space Utilities](./docs/space-utilities.md) - Tailwind-style `space-x-*` and `space-y-*` spacing utilities
324
421
  - [📝 Prose Typography](./docs/prose.md) - Beautiful typography for long-form content
325
422
  - [🎨 Colors](./docs/colors.md) - Extended Tailwind-compatible color palette (`/css/colors` subpath)
@@ -340,7 +437,7 @@ Explore the complete documentation for every runtime feature:
340
437
  - [♻️ Keep-Alive](./docs/keep-alive.md) - Preserve component state across DOM removals with `<cer-keep-alive>`
341
438
  - [🩺 Health Monitor](./docs/health-monitor.md) - Track runtime metrics and receive periodic health reports with `createHealthMonitor()`
342
439
  - [🔮 Virtual DOM](./docs/virtual-dom.md) - VDOM implementation and performance details
343
- - [🌐 SSR](./docs/ssr.md) - Server-side rendering support
440
+ - [🌐 SSR](./docs/ssr.md) - Server-side rendering support, including `renderToStringWithJITCSS` for FOUC-free hydration
344
441
  - [♻️ HMR](./docs/hmr.md) - Hot module replacement
345
442
  - [🛡️ Infinite Loop Protection](./docs/infinite-loop-protection.md) - Runtime safeguards against infinite loops
346
443
  - [🔒 Secure Expression Evaluator](./docs/secure-expression-evaluator.md) - Safe evaluation of dynamic expressions in templates
@@ -352,10 +449,21 @@ Explore the complete documentation for every runtime feature:
352
449
  - [🅰️ Angular Integration](./docs/angular-integration.md) - Using components in Angular apps
353
450
  - [🔥 Svelte Integration](./docs/svelte-integration.md) - Using components in Svelte apps
354
451
 
355
- ### 🛠️ **Troubleshooting**
452
+ ### 🛡️ **Security & Quality**
356
453
 
454
+ - [🔒 Security](./docs/security.md) - XSS prevention, `unsafeHTML`, CSP guidance, and safe input handling
455
+ - [🧪 Testing](./docs/testing.md) - Testing components with Vitest + happy-dom, reactive state, events, and async components
456
+ - [⚡ Performance](./docs/performance.md) - Update scheduler, `computed` memoization, avoiding re-renders, profiling
357
457
  - [🔧 Troubleshooting](./docs/troubleshooting.md) - Common issues and solutions
358
458
 
459
+ ### 🔄 **Upgrading**
460
+
461
+ - [📦 Migration Guide](./docs/migration.md) - Upgrade instructions, including the v3.0 JIT CSS opt-in change
462
+
463
+ ### 📖 **Reference**
464
+
465
+ - [📚 Glossary](./docs/glossary.md) - Definitions for library-specific and web-components terms
466
+
359
467
  For examples and implementation details, explore the source code in `src/lib/`.
360
468
 
361
469
  ## 🧑‍🔬 Real-World Examples
@@ -372,8 +480,13 @@ For examples and implementation details, explore the source code in `src/lib/`.
372
480
  - **Contribute:** We welcome PRs for docs, features, and examples.
373
481
  - ❤️ Like what you see? [Support ongoing development on Patreon](https://patreon.com/jshimkoski)
374
482
 
483
+ ### Community Gallery
484
+
485
+ - [Material Design 3 Components](https://github.com/jshimkoski/cer-material) built with this runtime.
486
+ - [Solatro](https://solatro.netlify.app) is a RTS card-based game built with this runtime.
487
+
375
488
  ## 💖 Support This Project
376
489
 
377
- Custom Elements Runtime is a labor of love built to make modern web development faster and more expressive. If it's helping you build better components, consider [supporting me on Patreon](https://patreon.com/jshimkoski) to help keep the momentum going.
490
+ Custom Elements Runtime is a labor of love built to make modern web development faster and more expressive. If it's helping you build better components, [learn more about me](https://jasonshimmy.com) or consider [supporting me on Patreon](https://patreon.com/jshimkoski) to help keep the momentum going.
378
491
 
379
492
  Your support helps fund continued development, documentation, and community engagement. Every bit helps—thank you!