@jasonshimmy/vite-plugin-cer-app 0.21.4 → 0.23.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 (40) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/commits.txt +1 -1
  3. package/dist/plugin/dev-server.d.ts +1 -0
  4. package/dist/plugin/dev-server.d.ts.map +1 -1
  5. package/dist/plugin/generated-dir.js +2 -2
  6. package/dist/plugin/generated-dir.js.map +1 -1
  7. package/dist/plugin/index.d.ts.map +1 -1
  8. package/dist/plugin/index.js +3 -2
  9. package/dist/plugin/index.js.map +1 -1
  10. package/dist/runtime/app-template.d.ts +5 -2
  11. package/dist/runtime/app-template.d.ts.map +1 -1
  12. package/dist/runtime/app-template.js +11 -3
  13. package/dist/runtime/app-template.js.map +1 -1
  14. package/dist/runtime/composables/use-content-search.d.ts +8 -3
  15. package/dist/runtime/composables/use-content-search.d.ts.map +1 -1
  16. package/dist/runtime/composables/use-content-search.js +41 -18
  17. package/dist/runtime/composables/use-content-search.js.map +1 -1
  18. package/dist/types/config.d.ts +19 -0
  19. package/dist/types/config.d.ts.map +1 -1
  20. package/dist/types/config.js.map +1 -1
  21. package/docs/composables.md +5 -3
  22. package/docs/configuration.md +46 -1
  23. package/e2e/cypress/e2e/content.cy.ts +23 -3
  24. package/e2e/cypress/e2e/jit-css-custom-colors.cy.ts +43 -0
  25. package/e2e/kitchen-sink/app/pages/content-search.ts +4 -3
  26. package/e2e/kitchen-sink/app/pages/jit-css-custom-colors-test.ts +14 -0
  27. package/e2e/kitchen-sink/cer.config.ts +6 -0
  28. package/package.json +1 -1
  29. package/src/__tests__/plugin/app-template.test.ts +51 -1
  30. package/src/__tests__/plugin/cer-app-plugin.test.ts +3 -3
  31. package/src/__tests__/plugin/generated-dir.test.ts +2 -1
  32. package/src/__tests__/plugin/resolve-config.test.ts +24 -0
  33. package/src/__tests__/runtime/app-template.test.ts +3 -1
  34. package/src/__tests__/runtime/use-content-search.test.ts +4 -2
  35. package/src/plugin/dev-server.ts +1 -1
  36. package/src/plugin/generated-dir.ts +2 -2
  37. package/src/plugin/index.ts +3 -2
  38. package/src/runtime/app-template.ts +15 -3
  39. package/src/runtime/composables/use-content-search.ts +40 -15
  40. package/src/types/config.ts +19 -0
package/CHANGELOG.md CHANGED
@@ -1,6 +1,14 @@
1
1
  # Changelog
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
+ ## [v0.23.0] - 2026-04-17
5
+
6
+ - feat: enhance useContentSearch with loading state and update related tests (d1cee0e)
7
+
8
+ ## [v0.22.0] - 2026-04-16
9
+
10
+ - feat: add customColors support for jitCss configuration and implement related tests (b8061ef)
11
+
4
12
  ## [v0.21.4] - 2026-04-16
5
13
 
6
14
  - fix: update path resolution for auto-imported components to be relative from .cer/ (633a241)
package/commits.txt CHANGED
@@ -1 +1 @@
1
- - fix: update path resolution for auto-imported components to be relative from .cer/ (633a241)
1
+ - feat: enhance useContentSearch with loading state and update related tests (d1cee0e)
@@ -25,6 +25,7 @@ export interface ResolvedCerConfig {
25
25
  jitCss: {
26
26
  content: string[];
27
27
  extendedColors: boolean;
28
+ customColors?: Record<string, Record<string, string>>;
28
29
  };
29
30
  autoImports: {
30
31
  components: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"dev-server.d.ts","sourceRoot":"","sources":["../../src/plugin/dev-server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,MAAM,CAAA;AAOzC,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAA;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,cAAc,EAAE,MAAM,CAAA;IACtB,UAAU,EAAE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G,IAAI,EAAE,OAAO,oBAAoB,EAAE,UAAU,GAAG,IAAI,CAAA;IACpD,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,EAAE,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,QAAQ,GAAG,uBAAuB,GAAG,WAAW,CAAA;KAAE,GAAG,IAAI,CAAA;CACtH;AAwID;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,iBAAiB,GACxB,IAAI,CA2MN"}
@@ -1,6 +1,6 @@
1
1
  import { writeFileSync, existsSync, mkdirSync, readFileSync, appendFileSync } from 'node:fs';
2
2
  import { join } from 'pathe';
3
- import { APP_ENTRY_TEMPLATE } from '../runtime/app-template.js';
3
+ import { generateAppEntryTemplate } from '../runtime/app-template.js';
4
4
  import { ENTRY_SERVER_TEMPLATE } from '../runtime/entry-server-template.js';
5
5
  /** The name of the generated directory relative to the project root. */
6
6
  export const GENERATED_DIR_NAME = '.cer';
@@ -99,7 +99,7 @@ export function writeGeneratedDir(config) {
99
99
  // Always write the generated app.ts — this is the framework entry point and
100
100
  // is never user-owned. Regenerating it on every dev/build ensures consumers
101
101
  // automatically get the latest bootstrap code on plugin update (Nuxt-style).
102
- writeFileSync(join(dir, 'app.ts'), APP_ENTRY_TEMPLATE, 'utf-8');
102
+ writeFileSync(join(dir, 'app.ts'), generateAppEntryTemplate(config.jitCss.customColors), 'utf-8');
103
103
  // Always write the SSR entry — used by the dev server's ssrLoadModule call.
104
104
  // The production build injects this as a virtual module, but the dev server
105
105
  // needs a real file on disk because ssrLoadModule resolves by file path.
@@ -1 +1 @@
1
- {"version":3,"file":"generated-dir.js","sourceRoot":"","sources":["../../src/plugin/generated-dir.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC5F,OAAO,EAAE,IAAI,EA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C,MAAM,CAAC,IAAI,CAAC,CAAA;IACxC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACrB,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IACrC,CAAC;IAED,4EAA4E;IAC5E,4EAA4E;IAC5E,6EAA6E;IAC7E,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,EAAE,wBAAwB,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,CAAA;IAEjG,4EAA4E;IAC5E,4EAA4E;IAC5E,yEAAyE;IACzE,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE,iBAAiB,CAAC,EAAE,qBAAqB,EAAE,OAAO,CAAC,CAAA;IAE3E,+EAA+E;IAC/E,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE,YAAY,CAAC,EAAE,mBAAmB,EAAE,EAAE,OAAO,CAAC,CAAA;IAEtE,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;AAC9B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,MAAM,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAiDxD;;GAEG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,YAAY,EAAE,IAAI,GAAE,MAAsB,GAAG,iBAAiB,CAsDvG;AAiJD;;;GAGG;AACH,wBAAgB,MAAM,CAAC,UAAU,GAAE,YAAiB,GAAG,MAAM,EAAE,CAoS9D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,MAAM,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAiDxD;;GAEG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,YAAY,EAAE,IAAI,GAAE,MAAsB,GAAG,iBAAiB,CAuDvG;AAiJD;;;GAGG;AACH,wBAAgB,MAAM,CAAC,UAAU,GAAE,YAAiB,GAAG,MAAM,EAAE,CAoS9D"}
@@ -5,7 +5,7 @@ import { autoImportTransform } from './transforms/auto-import.js';
5
5
  import { scanComposableExports, writeAutoImportDts, writeTsconfigPaths } from './dts-generator.js';
6
6
  import { configureCerDevServer } from './dev-server.js';
7
7
  import { writeGeneratedDir, getGeneratedDir } from './generated-dir.js';
8
- import { APP_ENTRY_TEMPLATE } from '../runtime/app-template.js';
8
+ import { generateAppEntryTemplate } from '../runtime/app-template.js';
9
9
  import { generateRoutesCode } from './virtual/routes.js';
10
10
  import { generateLayoutsCode } from './virtual/layouts.js';
11
11
  import { generateComposablesCode } from './virtual/composables.js';
@@ -78,6 +78,7 @@ export function resolveConfig(userConfig, root = process.cwd()) {
78
78
  `${srcDir}/layouts/**/*.ts`,
79
79
  ],
80
80
  extendedColors: userConfig.jitCss?.extendedColors ?? false,
81
+ customColors: userConfig.jitCss?.customColors,
81
82
  },
82
83
  autoImports: {
83
84
  components: userConfig.autoImports?.components ?? true,
@@ -278,7 +279,7 @@ export function cerApp(userConfig = {}) {
278
279
  },
279
280
  async load(id, options) {
280
281
  if (id === RESOLVED_APP_ENTRY)
281
- return APP_ENTRY_TEMPLATE;
282
+ return generateAppEntryTemplate(config.jitCss.customColors);
282
283
  const allResolved = Object.values(RESOLVED_IDS);
283
284
  if (!allResolved.includes(id))
284
285
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE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YAClD,CAAC;YACD,OAAO,IAAI,CAAA;QACb,CAAC;QACD,UAAU,CAAC,IAAI;YACb,gEAAgE;YAChE,kFAAkF;YAClF,iBAAiB,GAAG,mBAAmB,CAAC;gBACtC,aAAa,EAAE,MAAM,CAAC,aAAa;gBACnC,OAAO,EAAE,MAAM,CAAC,MAAM;aACvB,CAAW,CAAA;YACZ,OAAQ,iBAAiB,EAAE,UAAgE;gBACzF,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QACtB,CAAC;QACD,WAAW,CAAC,EAAU,EAAE,MAAiD;YACvE,OAAQ,iBAAiB,EAAE,WAAkF;gBAC3G,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,MAAM,CAAC,CAAA;QAC5B,CAAC;QACD,SAAS,CAAC,IAAY,EAAE,EAAU;YAChC,OAAQ,iBAAiB,EAAE,SAAgF;gBACzG,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,CAAA;QAClC,CAAC;QACD,eAAe,CAAC,GAAY;YAC1B,CAAC;YAAC,iBAAiB,EAAE,eAAuE;gBAC1F,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;QACrB,CAAC;KACF,CAAA;IAED,OAAO;QACL,YAAY;QACZ,GAAG,UAAU;QACb,GAAG,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAChF,UAAU,CACR,UAAU,CAAC,OAAO,CACnB;KACF,CAAA;AACH,CAAC"}
@@ -1,9 +1,12 @@
1
1
  /**
2
- * Template string for `.cer/app.ts` — the framework client entry point.
2
+ * Generates the `.cer/app.ts` framework client entry point.
3
3
  *
4
4
  * Always written to `.cer/app.ts` on every dev/build so consumers
5
5
  * automatically receive the latest bootstrap code on plugin update.
6
6
  * This file is gitignored and should never be edited directly.
7
+ *
8
+ * @param customColors - Project-specific color families to register in the JIT
9
+ * CSS engine at runtime. Serialized as a JSON literal in the generated source.
7
10
  */
8
- export declare const APP_ENTRY_TEMPLATE = "// AUTO-GENERATED by @jasonshimmy/vite-plugin-cer-app \u2014 do not edit.\n// Regenerated automatically on every dev server start and build.\n\nimport '@jasonshimmy/custom-elements-runtime/css'\nimport 'virtual:cer-jit-css'\nimport 'virtual:cer-content-components'\nimport routes from 'virtual:cer-routes'\nimport layouts from 'virtual:cer-layouts'\nimport plugins from 'virtual:cer-plugins'\nimport { hasLoading, loadingTag } from 'virtual:cer-loading'\nimport { hasError, errorTag } from 'virtual:cer-error'\nimport { runtimeConfig } from 'virtual:cer-app-config'\nimport {\n component,\n ref,\n provide,\n setDevMode,\n useOnConnected,\n useOnDisconnected,\n registerBuiltinComponents,\n} from '@jasonshimmy/custom-elements-runtime'\nimport { initRouter } from '@jasonshimmy/custom-elements-runtime/router'\nimport { enableJITCSS } from '@jasonshimmy/custom-elements-runtime/jit-css'\nimport { initRuntimeConfig } from '@jasonshimmy/vite-plugin-cer-app/composables'\n\nconst _cerProcess = (globalThis).process\nconst _cerNodeEnv = _cerProcess?.env?.NODE_ENV ?? _cerProcess?.env?.MODE\nconst _cerRuntimeDev =\n typeof _cerNodeEnv === 'string'\n ? _cerNodeEnv !== 'production'\n : typeof import.meta.env?.DEV === 'boolean'\n ? import.meta.env.DEV\n : typeof import.meta.env?.PROD === 'boolean'\n ? !import.meta.env.PROD\n : typeof import.meta.env?.MODE === 'string'\n ? import.meta.env.MODE !== 'production'\n : false\n;(globalThis).__CE_RUNTIME_DEV__ = _cerRuntimeDev\n\nregisterBuiltinComponents()\nsetDevMode(_cerRuntimeDev)\nenableJITCSS()\ninitRuntimeConfig(runtimeConfig)\n\nconst router = initRouter({ routes })\n\n// Expose the router globally so useRoute() and navigateTo() can access it\n// from any composable without circular imports.\n;(globalThis).__cerRouter = router\n\n// \u2500\u2500\u2500 Page loader state \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n// Holds the pre-loaded page tag and loader-derived attrs for the current route.\n// Set by _loadPageForPath before every navigation so cer-layout-view can render\n// the page element directly with the correct attributes (enabling useProps()).\nlet _currentPageTag = null\nlet _currentPageAttrs = {}\n// The pathname this tag was loaded for \u2014 used to detect router-internal\n// redirects (e.g. middleware returning '/login') so cer-layout-view falls\n// back to <router-view> when the current route differs from what was pre-loaded.\nlet _currentPagePath = null\n\nfunction _toLoaderAttrs(data) {\n if (data === undefined || data === null || typeof data !== 'object') return {}\n return Object.fromEntries(\n Object.entries(data).filter(([, v]) => v !== null && v !== undefined && typeof v !== 'object' && typeof v !== 'function')\n )\n}\n\n// Pre-loads the page module for `path`, calls its loader if present, and\n// stores the results so cer-layout-view can pass them as element attributes.\nasync function _loadPageForPath(path, options = {}) {\n try {\n const url = new URL(path, 'http://x')\n const query = Object.fromEntries(url.searchParams)\n const { runLoader = true, initialData } = options ?? {}\n const matched = router.matchRoute(url.pathname)\n const route = matched?.route\n if (!route?.load) {\n _currentPageTag = null\n _currentPageAttrs = {}\n _currentPagePath = url.pathname\n return\n }\n const mod = await route.load()\n _currentPageTag = mod.default ?? null\n _currentPagePath = url.pathname\n const params = matched.params ?? {}\n let loaderAttrs = { ...params }\n let loaderData = initialData\n if (typeof mod.loader === 'function' && runLoader) {\n try {\n const data = await mod.loader({ params, query })\n if (data !== undefined && data !== null) {\n loaderData = data\n // Make loader data available via usePageData() for this navigation.\n ;(globalThis).__CER_DATA__ = data\n }\n } catch (err) {\n // Loader errors are surfaced through currentError so the error boundary\n // (app/error.ts) can display a meaningful message \u2014 consistent with how\n // the server-side handler behaves when a loader throws.\n currentError.value = err instanceof Error ? err.message : String(err)\n }\n }\n // For the very first hydration pass in SSR/SSG we already have the server's\n // loader payload in globalThis.__CER_DATA__ / window.__CER_DATA__. Reuse it\n // instead of re-running the loader on the client, then derive primitive attrs\n // from that payload so useProps() stays consistent with usePageData().\n loaderAttrs = { ...loaderAttrs, ..._toLoaderAttrs(loaderData) }\n _currentPageAttrs = loaderAttrs\n } catch {\n _currentPageTag = null\n _currentPageAttrs = {}\n _currentPagePath = null\n }\n}\n\n// \u2500\u2500\u2500 Navigation state \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nconst isNavigating = ref(false)\nconst currentError = ref(null)\n\nconst resetError = () => {\n currentError.value = null\n void router.replace(router.getCurrent().path)\n}\n;(globalThis).resetError = resetError\n\nconst _push = router.push.bind(router)\nconst _replace = router.replace.bind(router)\n\nrouter.push = async (path) => {\n isNavigating.value = true\n currentError.value = null\n try {\n // Clear stale loader data from the previous route before loading the new one.\n // If the new route has no loader, __CER_DATA__ stays undefined so usePageData()\n // correctly returns null instead of leaking the previous page's data.\n delete (globalThis).__CER_DATA__\n await _loadPageForPath(path)\n await _push(path)\n } catch (err) {\n currentError.value = err instanceof Error ? err.message : String(err)\n } finally {\n isNavigating.value = false\n }\n}\n\nrouter.replace = async (path) => {\n isNavigating.value = true\n currentError.value = null\n try {\n // Clear stale loader data from the previous route before loading the new one.\n delete (globalThis).__CER_DATA__\n await _loadPageForPath(path)\n await _replace(path)\n } catch (err) {\n currentError.value = err instanceof Error ? err.message : String(err)\n } finally {\n isNavigating.value = false\n }\n}\n\n// \u2500\u2500\u2500 Plugins \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n// Collect plugin-provided values so cer-layout-view can forward them into\n// the component context tree via the real provide() hook (which inject() walks).\n// Declared BEFORE component('cer-layout-view') to avoid a temporal dead zone\n// ReferenceError: customElements.define() upgrades existing DOM elements\n// synchronously, calling the render function immediately.\nconst _pluginProvides = new Map()\n// Expose plugin provides globally so page components can read them synchronously\n// regardless of render order.\n;(globalThis).__cerPluginProvides = _pluginProvides\n\n// \u2500\u2500\u2500 <cer-layout-view> \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n// True until the initial page module has loaded and _replace has been called.\n// While true, cer-layout-view renders a <slot> so the SSR/SSG pre-rendered\n// light-DOM content stays visible and no FOUC occurs during the hydration gap.\n// Declared here (before component()) because customElements.define() upgrades\n// existing DOM elements synchronously, so the render function reads this ref\n// on the very first call \u2014 before _doHydrate has a chance to run.\nconst _cerHydrating = ref(true)\n\ncomponent('cer-layout-view', () => {\n // Forward plugin-provided values into the component context so inject() in\n // any descendant component can resolve them by walking up the DOM tree.\n for (const [key, value] of _pluginProvides) {\n provide(key, value)\n }\n\n const current = ref(router.getCurrent())\n let unsub\n let _sawInitialRouteState = false\n\n useOnConnected(() => {\n // store.subscribe() synchronously pushes the current route once on\n // subscription. That initial callback is not a real navigation and must not\n // tear down the SSR slot before _doHydrate has pre-loaded the page.\n // Subsequent callbacks are real navigations (including the initial _replace\n // in _doHydrate), so if they arrive during the hydration gap we drop the\n // slot immediately and let the live render take over.\n unsub = router.subscribe((s) => {\n const _isInitialSubscribePush = !_sawInitialRouteState\n _sawInitialRouteState = true\n if (_isInitialSubscribePush) {\n current.value = s\n return\n }\n if (_cerHydrating.value) _cerHydrating.value = false\n current.value = s\n })\n })\n useOnDisconnected(() => { unsub?.(); unsub = undefined })\n\n // While the initial page module is being loaded, keep the SSR/SSG\n // pre-rendered light-DOM content visible by forwarding it through a <slot>.\n // This prevents the intermediate blank state that occurs when the shadow DOM\n // renders layout-default with an empty <router-view> before the page chunk\n // has arrived. In SPA mode (no pre-rendered content) the slot is empty, which\n // is no worse than the current router-view behaviour.\n if (_cerHydrating.value) {\n return { tag: 'slot', props: {}, children: [] }\n }\n\n const matched = router.matchRoute(current.value.path)\n const routeMeta = matched?.route?.meta\n\n if (currentError.value !== null) {\n const routeErrorTag = routeMeta?.errorTag ?? null\n const effectiveErrorTag = routeErrorTag ?? (hasError ? errorTag : null)\n if (effectiveErrorTag) {\n return { tag: effectiveErrorTag, props: { attrs: { error: String(currentError.value) } }, children: [] }\n }\n return { tag: 'div', props: { attrs: { style: 'padding:2rem;font-family:monospace' } }, children: String(currentError.value) }\n }\n\n if (isNavigating.value && hasLoading && loadingTag) {\n return { tag: loadingTag, props: {}, children: [] }\n }\n\n // Render the page component directly when a pre-loaded tag is available AND\n // the loaded path matches the current route. The path guard detects\n // router-internal redirects (e.g. middleware returning '/login'): when the\n // router redirects to a different path, _currentPagePath won't match\n // current.value.path and we fall back to <router-view> so the correct page\n // is rendered without stale pre-loaded state.\n const _useDirectRender = _currentPageTag && _currentPagePath === current.value.path\n const pageVnode = _useDirectRender\n ? { tag: _currentPageTag, props: { attrs: _currentPageAttrs }, children: [] }\n : { tag: 'router-view', props: {}, children: [] }\n\n // Support nested layout chains: meta.layoutChain = ['default', 'admin']\n // renders <layout-default><layout-admin><page/></layout-admin></layout-default>\n const chain = routeMeta?.layoutChain\n ? routeMeta.layoutChain\n : [routeMeta?.layout ?? 'default']\n\n // Build nested vnodes from innermost to outermost.\n let vnode = pageVnode\n for (let i = chain.length - 1; i >= 0; i--) {\n const tag = layouts[chain[i]]\n if (tag) vnode = { tag, props: {}, children: [vnode] }\n }\n return vnode\n})\n\nfor (const plugin of plugins) {\n if (plugin && typeof plugin.setup === 'function') {\n await plugin.setup({\n router,\n provide: (key, value) => { _pluginProvides.set(key, value) },\n config: {},\n })\n }\n}\n\n// \u2500\u2500\u2500 Pre-load initial route + hydration strategy \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// Download the current page's route chunk AFTER plugins run so that\n// cer-layout-view's first render (which calls provide()) completes before\n// page components are defined and their renders are scheduled. This ensures\n// inject() in child components can find values stored by provide().\n//\n// meta.hydrate controls WHEN the initial page activates:\n// 'load' \u2014 immediately (default)\n// 'idle' \u2014 deferred until requestIdleCallback (browser idle)\n// 'visible' \u2014 deferred until cer-layout-view enters the viewport\n// 'none' \u2014 never: SSR HTML stays as-is, no JS activation\n\nif (typeof window !== 'undefined') {\n const _initMatch = router.matchRoute(window.location.pathname)\n const _hydrateStrategy = _initMatch?.route?.meta?.hydrate ?? 'load'\n\n if (_hydrateStrategy === 'none') {\n // Static HTML only \u2014 leave SSR output untouched, clean up data immediately.\n delete (globalThis).__CER_DATA__\n } else {\n const _doHydrate = async () => {\n const _initPath = window.location.pathname + window.location.search + window.location.hash\n const _hasInitialLoaderData = Object.prototype.hasOwnProperty.call(globalThis, '__CER_DATA__')\n // Pre-load the page module and run the loader so cer-layout-view renders\n // the page tag directly with loader attrs (enables useProps() on hydration).\n await _loadPageForPath(\n _initPath,\n _hasInitialLoaderData\n ? { runLoader: false, initialData: (globalThis).__CER_DATA__ }\n : undefined,\n )\n // Only activate the initial route if the URL hasn't changed while we were\n // loading the module asynchronously (e.g. a test or plugin navigated away\n // before _doHydrate finished). Calling _replace with a stale path would\n // override any navigation that happened during the async gap.\n const _currentPath = window.location.pathname + window.location.search + window.location.hash\n // Drop the hydration slot cover unconditionally: the page module is loaded\n // and cer-layout-view must switch from the <slot> to live rendering whether\n // or not a redirect changed the path during loading.\n _cerHydrating.value = false\n if (_currentPath === _initPath) {\n // Use the original (unwrapped) replace so isNavigating stays false during\n // the initial paint \u2014 the loading component must not flash over pre-rendered content.\n await _replace(_initPath)\n }\n // The client entry marks the already-rendered entry URL so generated\n // route middleware can skip the browser router's startup replay once.\n // Clear any leftover flag after the first hydrated route commits so later\n // navigations always run middleware normally.\n queueMicrotask(() => { delete (globalThis).__CER_HYDRATION_ENTRY__ })\n // Keep the initial route's SSR data available after hydration.\n // Browser engines do not all upgrade and re-render custom elements with\n // identical timing, so deleting __CER_DATA__ here can cause a later\n // hydration render to fall back to the client-only path. The next real\n // router.push/router.replace clears __CER_DATA__ before loading the new\n // route, so stale page data still does not leak across navigations.\n }\n\n if (_hydrateStrategy === 'idle') {\n // Defer until the browser has finished higher-priority work.\n if (typeof requestIdleCallback !== 'undefined') {\n requestIdleCallback(() => { void _doHydrate() })\n } else {\n // Safari / older environments fallback.\n setTimeout(() => { void _doHydrate() }, 1)\n }\n } else if (_hydrateStrategy === 'visible') {\n // Defer until cer-layout-view (or body as fallback) enters the viewport.\n const _el = document.querySelector('cer-layout-view') ?? document.body\n const _io = new IntersectionObserver(([entry]) => {\n if (entry.isIntersecting) { _io.disconnect(); void _doHydrate() }\n })\n _io.observe(_el)\n } else {\n // 'load' \u2014 hydrate immediately (default behaviour).\n await _doHydrate()\n }\n }\n}\n\nexport { router }\n";
11
+ export declare function generateAppEntryTemplate(customColors?: Record<string, Record<string, string>>): string;
9
12
  //# sourceMappingURL=app-template.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-template.d.ts","sourceRoot":"","sources":["../../src/runtime/app-template.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,8thBAwW9B,CAAA"}
1
+ {"version":3,"file":"app-template.d.ts","sourceRoot":"","sources":["../../src/runtime/app-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CACtC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GACpD,MAAM,CA+WR"}
@@ -1,11 +1,18 @@
1
1
  /**
2
- * Template string for `.cer/app.ts` — the framework client entry point.
2
+ * Generates the `.cer/app.ts` framework client entry point.
3
3
  *
4
4
  * Always written to `.cer/app.ts` on every dev/build so consumers
5
5
  * automatically receive the latest bootstrap code on plugin update.
6
6
  * This file is gitignored and should never be edited directly.
7
+ *
8
+ * @param customColors - Project-specific color families to register in the JIT
9
+ * CSS engine at runtime. Serialized as a JSON literal in the generated source.
7
10
  */
8
- export const APP_ENTRY_TEMPLATE = `// AUTO-GENERATED by @jasonshimmy/vite-plugin-cer-app — do not edit.
11
+ export function generateAppEntryTemplate(customColors) {
12
+ const enableJITCSSCall = customColors && Object.keys(customColors).length > 0
13
+ ? `enableJITCSS({ customColors: ${JSON.stringify(customColors)} })`
14
+ : `enableJITCSS()`;
15
+ return `// AUTO-GENERATED by @jasonshimmy/vite-plugin-cer-app — do not edit.
9
16
  // Regenerated automatically on every dev server start and build.
10
17
 
11
18
  import '@jasonshimmy/custom-elements-runtime/css'
@@ -46,7 +53,7 @@ const _cerRuntimeDev =
46
53
 
47
54
  registerBuiltinComponents()
48
55
  setDevMode(_cerRuntimeDev)
49
- enableJITCSS()
56
+ ${enableJITCSSCall}
50
57
  initRuntimeConfig(runtimeConfig)
51
58
 
52
59
  const router = initRouter({ routes })
@@ -366,4 +373,5 @@ if (typeof window !== 'undefined') {
366
373
 
367
374
  export { router }
368
375
  `;
376
+ }
369
377
  //# sourceMappingURL=app-template.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-template.js","sourceRoot":"","sources":["../../src/runtime/app-template.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwWjC,CAAA"}
1
+ {"version":3,"file":"app-template.js","sourceRoot":"","sources":["../../src/runtime/app-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,UAAU,wBAAwB,CACtC,YAAqD;IAErD,MAAM,gBAAgB,GACpB,YAAY,IAAI,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,MAAM,GAAG,CAAC;QAClD,CAAC,CAAC,gCAAgC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,KAAK;QACnE,CAAC,CAAC,gBAAgB,CAAA;IAEtB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyCP,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+TjB,CAAA;AACD,CAAC"}
@@ -13,6 +13,8 @@ export declare function resetIndexSingleton(): void;
13
13
  export interface UseContentSearchReturn {
14
14
  query: ReactiveState<string>;
15
15
  results: ReactiveState<ContentSearchResult[]>;
16
+ /** `true` from the moment the user starts typing until results (or an error) arrive. `false` when the query is empty or the search is complete. */
17
+ loading: ReactiveState<boolean>;
16
18
  }
17
19
  /**
18
20
  * Full-text content search composable.
@@ -21,8 +23,10 @@ export interface UseContentSearchReturn {
21
23
  * `/_content/search-index.json`. Both MiniSearch and the index are loaded via
22
24
  * dynamic import — neither is in the app bundle.
23
25
  *
24
- * Searches `title` and `description` fields. Results are empty until at least
25
- * 2 characters are entered.
26
+ * Searches `title` and `description` fields. Input is debounced (200 ms) so
27
+ * the index is not queried on every keystroke. `loading` becomes `true` as soon
28
+ * as the user starts typing and returns to `false` once results arrive. Results
29
+ * are empty when the query is empty.
26
30
  *
27
31
  * **SSR note**: search is always client-side. In SSR mode the component renders
28
32
  * with empty results and hydrates on mount.
@@ -30,10 +34,11 @@ export interface UseContentSearchReturn {
30
34
  * @example
31
35
  * ```ts
32
36
  * component('site-search', () => {
33
- * const { query, results } = useContentSearch()
37
+ * const { query, results, loading } = useContentSearch()
34
38
  *
35
39
  * return html`
36
40
  * <input type="search" :model="${query}" placeholder="Search…" />
41
+ * ${loading.value ? html`<p>Searching…</p>` : ''}
37
42
  * ${when(results.value.length > 0, () => html`
38
43
  * <ul>
39
44
  * ${each(results.value, r => html`
@@ -1 +1 @@
1
- {"version":3,"file":"use-content-search.d.ts","sourceRoot":"","sources":["../../../src/runtime/composables/use-content-search.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAA;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AASjE;;;;;;GAMG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAiBlD;AAED,uEAAuE;AACvE,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C;AAID,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAC5B,OAAO,EAAE,aAAa,CAAC,mBAAmB,EAAE,CAAC,CAAA;CAC9C;AAmCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,gBAAgB,IAAI,sBAAsB,CAEzD"}
1
+ {"version":3,"file":"use-content-search.d.ts","sourceRoot":"","sources":["../../../src/runtime/composables/use-content-search.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAA;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AASjE;;;;;;GAMG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAiBlD;AAED,uEAAuE;AACvE,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C;AAID,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAC5B,OAAO,EAAE,aAAa,CAAC,mBAAmB,EAAE,CAAC,CAAA;IAC7C,mJAAmJ;IACnJ,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,CAAA;CAChC;AAuDD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,gBAAgB,IAAI,sBAAsB,CAEzD"}
@@ -38,31 +38,51 @@ export function resetIndexSingleton() {
38
38
  const _factory = createComposable(() => {
39
39
  const query = ref('');
40
40
  const results = ref([]);
41
+ const loading = ref(false);
41
42
  // Pre-warm index on mount
42
43
  useOnConnected(() => {
43
44
  loadIndex().catch(() => { });
44
45
  });
45
46
  // Monotonic counter to discard stale async results
46
47
  let _seq = 0;
47
- watch(query, async (q) => {
48
- const seq = ++_seq;
49
- if (!q || q.length < 2) {
50
- results.value = [];
51
- return;
48
+ let _debounceTimer = null;
49
+ watch(query, (q) => {
50
+ if (_debounceTimer !== null) {
51
+ clearTimeout(_debounceTimer);
52
+ _debounceTimer = null;
52
53
  }
53
- try {
54
- const index = await loadIndex();
55
- if (seq !== _seq)
56
- return; // stale — a newer query is in flight
57
- results.value = index.search(q, { prefix: true });
58
- }
59
- catch {
60
- if (seq !== _seq)
61
- return;
54
+ if (!q) {
55
+ // Increment seq so any in-flight async search is discarded when it resolves
56
+ _seq++;
57
+ loading.value = false;
62
58
  results.value = [];
59
+ return;
63
60
  }
61
+ // Signal loading immediately so the UI can respond before the debounce fires
62
+ loading.value = true;
63
+ _debounceTimer = setTimeout(async () => {
64
+ _debounceTimer = null;
65
+ const seq = ++_seq;
66
+ try {
67
+ const index = await loadIndex();
68
+ if (seq !== _seq)
69
+ return; // stale — a newer query is in flight
70
+ results.value = index.search(q, { prefix: true });
71
+ }
72
+ catch {
73
+ if (seq !== _seq)
74
+ return;
75
+ results.value = [];
76
+ }
77
+ finally {
78
+ // Only clear loading for the most recent search; a newer in-flight search
79
+ // keeps loading=true until it settles.
80
+ if (seq === _seq)
81
+ loading.value = false;
82
+ }
83
+ }, 200);
64
84
  });
65
- return { query, results };
85
+ return { query, results, loading };
66
86
  });
67
87
  /**
68
88
  * Full-text content search composable.
@@ -71,8 +91,10 @@ const _factory = createComposable(() => {
71
91
  * `/_content/search-index.json`. Both MiniSearch and the index are loaded via
72
92
  * dynamic import — neither is in the app bundle.
73
93
  *
74
- * Searches `title` and `description` fields. Results are empty until at least
75
- * 2 characters are entered.
94
+ * Searches `title` and `description` fields. Input is debounced (200 ms) so
95
+ * the index is not queried on every keystroke. `loading` becomes `true` as soon
96
+ * as the user starts typing and returns to `false` once results arrive. Results
97
+ * are empty when the query is empty.
76
98
  *
77
99
  * **SSR note**: search is always client-side. In SSR mode the component renders
78
100
  * with empty results and hydrates on mount.
@@ -80,10 +102,11 @@ const _factory = createComposable(() => {
80
102
  * @example
81
103
  * ```ts
82
104
  * component('site-search', () => {
83
- * const { query, results } = useContentSearch()
105
+ * const { query, results, loading } = useContentSearch()
84
106
  *
85
107
  * return html`
86
108
  * <input type="search" :model="${query}" placeholder="Search…" />
109
+ * ${loading.value ? html`<p>Searching…</p>` : ''}
87
110
  * ${when(results.value.length > 0, () => html`
88
111
  * <ul>
89
112
  * ${each(results.value, r => html`
@@ -1 +1 @@
1
- {"version":3,"file":"use-content-search.js","sourceRoot":"","sources":["../../../src/runtime/composables/use-content-search.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,GAAG,EACH,cAAc,EACd,KAAK,GACN,MAAM,sCAAsC,CAAA;AAG7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAE5D,iFAAiF;AAEjF,6EAA6E;AAC7E,iFAAiF;AACjF,IAAI,aAAa,GAA4B,IAAI,CAAA;AAEjD;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS;IAC7B,IAAI,aAAa;QAAE,OAAO,aAAa,CAAA;IACvC,aAAa,GAAG,CAAC,KAAK,IAAI,EAAE;QAC1B,MAAM,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,GAAG,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YACvD,MAAM,CAAC,YAAY,CAAC;YACpB,KAAK,CAAC,qBAAqB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;gBACxC,IAAI,CAAC,CAAC,CAAC,EAAE;oBAAE,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAA;gBACvE,OAAO,CAAC,CAAC,IAAI,EA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E,CAAC;QAAC,MAAM,CAAC;YACP,IAAI,GAAG,KAAK,IAAI;gBAAE,OAAM;YACxB,OAAO,CAAC,KAAK,GAAG,EAAE,CAAA;QACpB,CAAC;IACH,CAAC,CAAC,CAAA;IAEF,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAA;AAC3B,CAAC,CAAC,CAAA;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,QAAQ,EAAE,CAAA;AACnB,CAAC"}
1
+ {"version":3,"file":"use-content-search.js","sourceRoot":"","sources":["../../../src/runtime/composables/use-content-search.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,GAAG,EACH,cAAc,EACd,KAAK,GACN,MAAM,sCAAsC,CAAA;AAG7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAE5D,iFAAiF;AAEjF,6EAA6E;AAC7E,iFAAiF;AACjF,IAAI,aAAa,GAA4B,IAAI,CAAA;AAEjD;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS;IAC7B,IAAI,aAAa;QAAE,OAAO,aAAa,CAAA;IACvC,aAAa,GAAG,CAAC,KAAK,IAAI,EAAE;QAC1B,MAAM,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,GAAG,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YACvD,MAAM,CAAC,YAAY,CAAC;YACpB,KAAK,CAAC,qBAAqB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;gBACxC,IAAI,CAAC,CAAC,CAAC,EAAE;oBAAE,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAA;gBACvE,OAAO,CAAC,CAAC,IAAI,EAAE,CAAA;YACjB,CAAC,CAAC;SACH,CAAC,CAAA;QACF,OAAO,UAAU,CAAC,QAAQ,CAAC,GAAG,E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GAAG,IAAI,CAAA;YACrB,MAAM,GAAG,GAAG,EAAE,IAAI,CAAA;YAElB,IAAI,CAAC;gBACH,MAAM,KAAK,GAAG,MAAM,SAAS,EAA+E,CAAA;gBAC5G,IAAI,GAAG,KAAK,IAAI;oBAAE,OAAM,CAAC,qCAAqC;gBAC9D,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAA0B,CAAA;YAC5E,CAAC;YAAC,MAAM,CAAC;gBACP,IAAI,GAAG,KAAK,IAAI;oBAAE,OAAM;gBACxB,OAAO,CAAC,KAAK,GAAG,EAAE,CAAA;YACpB,CAAC;oBAAS,CAAC;gBACT,0EAA0E;gBAC1E,uCAAuC;gBACvC,IAAI,GAAG,KAAK,IAAI;oBAAE,OAAO,CAAC,KAAK,GAAG,KAAK,CAAA;YACzC,CAAC;QACH,CAAC,EAAE,GAAG,CAAC,CAAA;IACT,CAAC,CAAC,CAAA;IAEF,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,CAAA;AACpC,CAAC,CAAC,CAAA;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,QAAQ,EAAE,CAAA;AACnB,CAAC"}
@@ -131,6 +131,25 @@ export interface JitCssConfig {
131
131
  content?: string[];
132
132
  /** Enable the extended color palette. Defaults to `false`. */
133
133
  extendedColors?: boolean;
134
+ /**
135
+ * Project-specific color families registered in the JIT CSS engine at both
136
+ * build time and runtime. Each key is a color family name (e.g. `brand`);
137
+ * its value is a map of scale steps to CSS color values.
138
+ *
139
+ * Color family names must be a single lowercase word (no hyphens). Shades
140
+ * can be any string key — numeric steps (`'500'`) or semantic names
141
+ * (`'DEFAULT'`, `'on'`, `'container'`). When no shade is specified in a
142
+ * utility class (e.g. `bg-brand`), the `DEFAULT` shade is used.
143
+ *
144
+ * @example
145
+ * ```ts
146
+ * customColors: {
147
+ * brand: { '100': '#ede9fe', '500': '#7c3aed', '900': '#4c1d95' },
148
+ * surface: { DEFAULT: 'var(--md-sys-color-surface)' },
149
+ * }
150
+ * ```
151
+ */
152
+ customColors?: Record<string, Record<string, string>>;
134
153
  }
135
154
  /** Fine-grained control over which auto-import categories are injected into page/layout/component files. All categories are enabled by default. */
136
155
  export interface AutoImportsConfig {
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAA;AAC/E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAIhD;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,sCAAsC;IACtC,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,YAAY,CAAA;IACxC,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAA;IACZ,wCAAwC;IACxC,GAAG,EAAE,eAAe,CAAA;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAA;IACZ,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAA;IACd,wCAAwC;IACxC,GAAG,EAAE,eAAe,CAAA;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAA;IACZ,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAA;IACd,sDAAsD;IACtD,UAAU,EAAE,MAAM,CAAA;IAClB,oFAAoF;IACpF,QAAQ,EAAE,MAAM,CAAA;IAChB,wCAAwC;IACxC,GAAG,EAAE,eAAe,CAAA;CACrB;AAID,kGAAkG;AAClG,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,C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AAY,CAAA;IACrB,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,YAAY,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,CAAA;IACjF;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACvE;;;;;OAKG;IACH,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,kBAAkB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7D;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,mBAAmB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAChE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,YAAY,CAE/D"}
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AA0UA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,YAAY,CAAC,MAAoB;IAC/C,OAAO,MAAM,CAAA;AACf,CAAC"}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AA6VA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,YAAY,CAAC,MAAoB;IAC/C,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -868,16 +868,17 @@ import { queryContent } from '@jasonshimmy/vite-plugin-cer-app/composables'
868
868
 
869
869
  ### `useContentSearch()`
870
870
 
871
- Reactive full-text search over the content layer. Loads the MiniSearch index lazily on first use. Returns `query` and `results` refs that update reactively as the user types.
871
+ Reactive full-text search over the content layer. Loads the MiniSearch index lazily on first use. Returns `query`, `results`, and `loading` refs that update reactively as the user types.
872
872
 
873
873
  Requires `content: {}` in `cer.config.ts`. See [content.md](./content.md) for full documentation.
874
874
 
875
875
  ```ts
876
876
  component('page-search', () => {
877
- const { query, results } = useContentSearch()
877
+ const { query, results, loading } = useContentSearch()
878
878
 
879
879
  return html`
880
880
  <input type="search" :model="${query}" placeholder="Search…" />
881
+ ${loading.value ? html`<p>Searching…</p>` : ''}
881
882
  <ul>
882
883
  ${each(results.value, r => html`
883
884
  <li><a :href="${r._path}">${r.title}</a></li>
@@ -893,10 +894,11 @@ component('page-search', () => {
893
894
  interface UseContentSearchReturn {
894
895
  query: Ref<string> // bind with :model
895
896
  results: Ref<ContentSearchResult[]> // reactive search results
897
+ loading: Ref<boolean> // true while debounce is pending or search is in flight
896
898
  }
897
899
  ```
898
900
 
899
- Search activates when `query.value.length >= 2`. MiniSearch is loaded once and cached for the lifetime of the page. Searched fields are `title` and `description`.
901
+ Search is debounced (200 ms) so the index is not queried on every keystroke. `loading` is set to `true` as soon as the user starts typing and returns to `false` once results arrive or the query is cleared. An empty query clears results immediately and cancels any in-flight search. MiniSearch is loaded once and cached for the lifetime of the page. Searched fields are `title` and `description`.
900
902
 
901
903
  If you need it outside auto-imported directories:
902
904
 
@@ -142,12 +142,16 @@ Controls scroll-to-fragment (`#anchor`) behavior.
142
142
 
143
143
  ## `jitCss` options
144
144
 
145
- Passed to the runtime's `cerPlugin` for JIT (just-in-time) CSS generation.
145
+ Passed to the runtime's `cerPlugin` for JIT (just-in-time) CSS generation at build time and to `enableJITCSS()` at runtime.
146
146
 
147
147
  ```ts
148
148
  jitCss: {
149
149
  content: ['./app/pages/**/*.ts', './app/components/**/*.ts', './app/layouts/**/*.ts'],
150
150
  extendedColors: false,
151
+ customColors: {
152
+ brand: { '100': '#ede9fe', '500': '#7c3aed', '900': '#4c1d95' },
153
+ surface: { DEFAULT: 'var(--md-sys-color-surface)' },
154
+ },
151
155
  }
152
156
  ```
153
157
 
@@ -165,6 +169,47 @@ Glob patterns pointing to files that use utility classes. The JIT compiler scans
165
169
 
166
170
  Enables the extended color palette in the JIT CSS system.
167
171
 
172
+ ### `jitCss.customColors`
173
+
174
+ **Type:** `Record<string, Record<string, string>>`
175
+ **Default:** `undefined`
176
+
177
+ Registers project-specific color families in the JIT CSS engine. Each top-level key is a color family name; its value maps scale steps (or semantic names) to CSS color values. Custom colors are registered at both build time and runtime automatically:
178
+
179
+ **Light DOM elements** — covered by the static stylesheet generated from the `content` scan. `customColors` is passed to the build-time scanner, so any custom color utility classes found in your source files are emitted into `virtual:cer-jit-css`, a global document stylesheet that applies to all light DOM elements.
180
+
181
+ **Shadow DOM components** — covered at runtime. `customColors` is serialized into the `enableJITCSS()` call in the generated `.cer/app.ts`, so every component that renders after app startup has the custom colors available.
182
+
183
+ Color family names must be a single lowercase word (no hyphens). Shade keys can be numeric steps (`'500'`) or semantic names (`'DEFAULT'`, `'on'`, `'container'`). When a utility class omits the shade (e.g. `bg-brand`), the `DEFAULT` shade is used automatically.
184
+
185
+ Values can be any valid CSS color — hex strings, `rgb(...)`, `hsl(...)`, or CSS variable references:
186
+
187
+ ```ts
188
+ jitCss: {
189
+ customColors: {
190
+ // Numeric scale
191
+ brand: { '100': '#ede9fe', '500': '#7c3aed', '900': '#4c1d95' },
192
+ // Semantic shades (DEFAULT used when no shade is specified)
193
+ accent: { DEFAULT: '#f59e0b', muted: '#fcd34d' },
194
+ // CSS variable references (ideal for bridging design-token systems)
195
+ mdprimary: { DEFAULT: 'var(--md-sys-color-primary)', on: 'var(--md-sys-color-on-primary)' },
196
+ },
197
+ }
198
+ ```
199
+
200
+ Once registered, all standard JIT CSS utility prefixes apply:
201
+
202
+ | Utility | Example |
203
+ |---|---|
204
+ | Background | `bg-brand-500` |
205
+ | Text | `text-brand-500` |
206
+ | Border | `border-brand-500` |
207
+ | Ring | `ring-brand-500` |
208
+ | Shadow | `shadow-brand-500` |
209
+ | Gradient stops | `from-brand-500 to-brand-900` |
210
+ | With opacity modifier | `bg-brand-500/50` |
211
+ | With variants | `hover:bg-brand-500 dark:text-brand-100` |
212
+
168
213
  ---
169
214
 
170
215
  ## `autoImports` options
@@ -240,14 +240,14 @@ describe('Content search — useContentSearch()', () => {
240
240
  cy.get('[data-cy=content-search-input]').should('exist')
241
241
  })
242
242
 
243
- it('shows no results before typing 2 chars', () => {
243
+ it('shows results after typing a single character', () => {
244
244
  cy.visit('/content-search')
245
245
  cy.wait('@searchIndex')
246
246
  setSearchQuery('H')
247
- cy.get('[data-cy=content-search-result]').should('not.exist')
247
+ cy.get('[data-cy=content-search-result]', { timeout: 8000 }).should('have.length.at.least', 1)
248
248
  })
249
249
 
250
- it('shows results after typing a 2-char query', () => {
250
+ it('shows results after typing a multi-char query', () => {
251
251
  cy.visit('/content-search')
252
252
  cy.wait('@searchIndex')
253
253
  setSearchQuery('He')
@@ -275,6 +275,26 @@ describe('Content search — useContentSearch()', () => {
275
275
  cy.get('[data-cy=content-search-result]', { timeout: 8000 }).first().should('have.attr', 'data-path')
276
276
  })
277
277
 
278
+ it('shows loading indicator while search is in flight', () => {
279
+ cy.visit('/content-search')
280
+ cy.wait('@searchIndex')
281
+ setSearchQuery('Hello')
282
+ // loading indicator appears immediately after typing
283
+ cy.get('[data-cy=content-search-loading]').should('exist')
284
+ // loading indicator disappears once results arrive
285
+ cy.get('[data-cy=content-search-loading]', { timeout: 8000 }).should('not.exist')
286
+ cy.get('[data-cy=content-search-result]').should('have.length.at.least', 1)
287
+ })
288
+
289
+ it('clears loading indicator when query is cleared', () => {
290
+ cy.visit('/content-search')
291
+ cy.wait('@searchIndex')
292
+ setSearchQuery('Hello')
293
+ cy.get('[data-cy=content-search-loading]').should('exist')
294
+ setSearchQuery('')
295
+ cy.get('[data-cy=content-search-loading]').should('not.exist')
296
+ })
297
+
278
298
  it('clearing query clears results', () => {
279
299
  cy.visit('/content-search')
280
300
  cy.wait('@searchIndex')
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Verifies that jitCss.customColors defined in cer.config.ts are available
3
+ * as JIT CSS utility classes inside shadow DOM components.
4
+ *
5
+ * The kitchen-sink config registers:
6
+ * brand: { '500': '#7c3aed', '100': '#ede9fe', '900': '#4c1d95' }
7
+ *
8
+ * Tests run in every build mode (SPA, SSR, SSG).
9
+ */
10
+
11
+ describe('jitCss.customColors', () => {
12
+ beforeEach(() => {
13
+ cy.visit('/jit-css-custom-colors-test')
14
+ cy.get('cer-layout-view').shadow().find('page-jit-css-custom-colors-test').should('exist')
15
+ })
16
+
17
+ it('applies custom color as background-color', () => {
18
+ cy.get('cer-layout-view')
19
+ .shadow()
20
+ .find('page-jit-css-custom-colors-test')
21
+ .shadow()
22
+ .find('[data-cy="brand-bg"]')
23
+ .should('have.css', 'background-color', 'rgb(124, 58, 237)')
24
+ })
25
+
26
+ it('applies custom color as text color', () => {
27
+ cy.get('cer-layout-view')
28
+ .shadow()
29
+ .find('page-jit-css-custom-colors-test')
30
+ .shadow()
31
+ .find('[data-cy="brand-text"]')
32
+ .should('have.css', 'color', 'rgb(124, 58, 237)')
33
+ })
34
+
35
+ it('applies a different shade of the custom color', () => {
36
+ cy.get('cer-layout-view')
37
+ .shadow()
38
+ .find('page-jit-css-custom-colors-test')
39
+ .shadow()
40
+ .find('[data-cy="brand-light-bg"]')
41
+ .should('have.css', 'background-color', 'rgb(237, 233, 254)')
42
+ })
43
+ })
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * Content search page — exercises `useContentSearch()`.
3
- * Typing 2+ characters into the search box triggers MiniSearch results.
3
+ * Typing into the search box triggers MiniSearch results (debounced).
4
4
  * Route: /content-search
5
5
  */
6
6
 
7
7
  component('page-content-search', () => {
8
8
  useHead({ title: 'Content Search — Kitchen Sink' })
9
9
 
10
- const { query, results } = useContentSearch()
10
+ const { query, results, loading } = useContentSearch()
11
11
 
12
12
  return html`
13
13
  <div>
@@ -19,6 +19,7 @@ component('page-content-search', () => {
19
19
  .value="${query.value}"
20
20
  @input="${(e: Event) => { query.value = (e.target as HTMLInputElement).value }}"
21
21
  />
22
+ ${loading.value ? html`<p data-cy="content-search-loading">Searching…</p>` : ''}
22
23
  <ul data-cy="content-search-results">
23
24
  ${results.value.map(r => html`
24
25
  <li data-cy="content-search-result" data-path="${r._path}">
@@ -27,7 +28,7 @@ component('page-content-search', () => {
27
28
  </li>
28
29
  `)}
29
30
  </ul>
30
- ${results.value.length === 0 && query.value.length >= 2 ? html`
31
+ ${results.value.length === 0 && query.value.length > 0 && !loading.value ? html`
31
32
  <p data-cy="content-search-empty">No results for "${query.value}".</p>
32
33
  ` : ''}
33
34
  </div>
@@ -0,0 +1,14 @@
1
+ // Tests that jitCss.customColors registered in cer.config.ts are available
2
+ // as utility classes inside shadow DOM components.
3
+ component('page-jit-css-custom-colors-test', () => {
4
+ return html`
5
+ <div>
6
+ <h1 data-cy="heading">Custom Colors</h1>
7
+ <div data-cy="brand-bg" class="bg-brand-500 p-4">Brand background</div>
8
+ <p data-cy="brand-text" class="text-brand-500">Brand text</p>
9
+ <div data-cy="brand-light-bg" class="bg-brand-100 p-4">Brand light background</div>
10
+ </div>
11
+ `
12
+ })
13
+
14
+ export const meta = { layout: 'minimal' }
@@ -6,6 +6,12 @@ const LOG_FILE = '/tmp/cer-hooks-test.log'
6
6
  // Kitchen sink configuration — mode is overridden by --mode CLI flag
7
7
  export default {
8
8
  content: {},
9
+ jitCss: {
10
+ customColors: {
11
+ // A distinctive purple used to verify customColors reaches the runtime.
12
+ brand: { '500': '#7c3aed', '100': '#ede9fe', '900': '#4c1d95' },
13
+ },
14
+ },
9
15
  ssg: { routes: 'auto', concurrency: 2 },
10
16
  autoImports: { runtime: true, components: true, composables: true },
11
17
  runtimeConfig: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jasonshimmy/vite-plugin-cer-app",
3
- "version": "0.21.4",
3
+ "version": "0.23.0",
4
4
  "description": "Nuxt-style meta-framework for @jasonshimmy/custom-elements-runtime",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -1,13 +1,14 @@
1
1
  import { describe, it, expect } from 'vitest'
2
2
  import { readFileSync } from 'node:fs'
3
3
  import { resolve } from 'pathe'
4
+ import { generateAppEntryTemplate } from '../../runtime/app-template.js'
4
5
 
5
6
  const src = readFileSync(
6
7
  resolve(import.meta.dirname, '../../runtime/app-template.ts'),
7
8
  'utf-8',
8
9
  )
9
10
 
10
- describe('app-template (APP_ENTRY_TEMPLATE content)', () => {
11
+ describe('app-template (source content)', () => {
11
12
  it('does not import virtual:cer-components (components injected per-file by cerComponentImports)', () => {
12
13
  expect(src).not.toContain('virtual:cer-components')
13
14
  })
@@ -60,3 +61,52 @@ describe('app-template (APP_ENTRY_TEMPLATE content)', () => {
60
61
  expect(src).toContain('export { router }')
61
62
  })
62
63
  })
64
+
65
+ describe('generateAppEntryTemplate', () => {
66
+ it('calls enableJITCSS() with no arguments when customColors is omitted', () => {
67
+ const out = generateAppEntryTemplate()
68
+ expect(out).toContain('enableJITCSS()')
69
+ expect(out).not.toContain('customColors')
70
+ })
71
+
72
+ it('calls enableJITCSS() with no arguments when customColors is an empty object', () => {
73
+ const out = generateAppEntryTemplate({})
74
+ expect(out).toContain('enableJITCSS()')
75
+ expect(out).not.toContain('customColors')
76
+ })
77
+
78
+ it('serializes a single color family into the enableJITCSS call', () => {
79
+ const out = generateAppEntryTemplate({ brand: { '500': '#7c3aed' } })
80
+ expect(out).toContain('enableJITCSS({ customColors:')
81
+ expect(out).toContain('"brand"')
82
+ expect(out).toContain('"500"')
83
+ expect(out).toContain('"#7c3aed"')
84
+ })
85
+
86
+ it('serializes multiple color families correctly', () => {
87
+ const out = generateAppEntryTemplate({
88
+ brand: { '100': '#ede9fe', '900': '#4c1d95' },
89
+ accent: { DEFAULT: '#f59e0b' },
90
+ })
91
+ expect(out).toContain('"brand"')
92
+ expect(out).toContain('"accent"')
93
+ expect(out).toContain('"DEFAULT"')
94
+ expect(out).toContain('"#f59e0b"')
95
+ })
96
+
97
+ it('serializes CSS variable references as color values', () => {
98
+ const out = generateAppEntryTemplate({
99
+ surface: { DEFAULT: 'var(--md-sys-color-surface)' },
100
+ })
101
+ expect(out).toContain('"surface"')
102
+ expect(out).toContain('var(--md-sys-color-surface)')
103
+ })
104
+
105
+ it('still includes all standard template content when customColors is provided', () => {
106
+ const out = generateAppEntryTemplate({ brand: { '500': '#ff0000' } })
107
+ expect(out).toContain('virtual:cer-jit-css')
108
+ expect(out).toContain('virtual:cer-routes')
109
+ expect(out).toContain('enableJITCSS')
110
+ expect(out).toContain('export { router }')
111
+ })
112
+ })
@@ -38,7 +38,7 @@ vi.mock('../../plugin/virtual/content-components.js', () => ({ generateContentCo
38
38
  vi.mock('../../plugin/transforms/auto-import.js', () => ({ autoImportTransform: vi.fn().mockReturnValue(null) }))
39
39
 
40
40
  import { cerApp } from '../../plugin/index.js'
41
- import { APP_ENTRY_TEMPLATE } from '../../runtime/app-template.js'
41
+ import { generateAppEntryTemplate } from '../../runtime/app-template.js'
42
42
 
43
43
 
44
44
  type TestPlugin = {
@@ -177,12 +177,12 @@ describe('cerApp plugin — resolveId hook', () => {
177
177
  })
178
178
 
179
179
  describe('cerApp plugin — load hook', () => {
180
- it('loads \\0cer-app-entry with APP_ENTRY_TEMPLATE content', async () => {
180
+ it('loads \\0cer-app-entry with generated app entry content', async () => {
181
181
  const plugin = getCerPlugin()
182
182
  plugin.config({ root: '/project' }, { command: 'serve', mode: 'development' })
183
183
  plugin.configResolved(FAKE_RESOLVED)
184
184
  const result = await plugin.load('\0cer-app-entry')
185
- expect(result).toBe(APP_ENTRY_TEMPLATE)
185
+ expect(result).toBe(generateAppEntryTemplate())
186
186
  })
187
187
 
188
188
  it('returns null for unknown resolved ids', async () => {
@@ -11,7 +11,7 @@ vi.mock('node:fs', async (importOriginal) => {
11
11
  appendFileSync: vi.fn(),
12
12
  }
13
13
  })
14
- vi.mock('../../runtime/app-template.js', () => ({ APP_ENTRY_TEMPLATE: '// app template' }))
14
+ vi.mock('../../runtime/app-template.js', () => ({ generateAppEntryTemplate: vi.fn().mockReturnValue('// app template') }))
15
15
 
16
16
  import { existsSync, writeFileSync, mkdirSync, readFileSync, appendFileSync } from 'node:fs'
17
17
  import {
@@ -26,6 +26,7 @@ const ROOT = '/project'
26
26
  const mockConfig = {
27
27
  root: ROOT,
28
28
  srcDir: `${ROOT}/app`,
29
+ jitCss: { content: [], extendedColors: false },
29
30
  } as Parameters<typeof writeGeneratedDir>[0]
30
31
 
31
32
  beforeEach(() => {
@@ -126,6 +126,30 @@ describe('resolveConfig', () => {
126
126
  expect(cfg.jitCss.extendedColors).toBe(false)
127
127
  })
128
128
 
129
+ it('defaults jitCss.customColors to undefined', () => {
130
+ const cfg = resolveConfig({}, ROOT)
131
+ expect(cfg.jitCss.customColors).toBeUndefined()
132
+ })
133
+
134
+ it('passes jitCss.customColors through unchanged', () => {
135
+ const customColors = { brand: { '500': '#7c3aed', '100': '#ede9fe' } }
136
+ const cfg = resolveConfig({ jitCss: { customColors } }, ROOT)
137
+ expect(cfg.jitCss.customColors).toEqual(customColors)
138
+ })
139
+
140
+ it('passes jitCss.customColors with CSS variable values through', () => {
141
+ const customColors = { surface: { DEFAULT: 'var(--md-sys-color-surface)' } }
142
+ const cfg = resolveConfig({ jitCss: { customColors } }, ROOT)
143
+ expect(cfg.jitCss.customColors).toEqual(customColors)
144
+ })
145
+
146
+ it('allows jitCss.customColors alongside extendedColors', () => {
147
+ const customColors = { accent: { '500': '#f59e0b' } }
148
+ const cfg = resolveConfig({ jitCss: { extendedColors: true, customColors } }, ROOT)
149
+ expect(cfg.jitCss.extendedColors).toBe(true)
150
+ expect(cfg.jitCss.customColors).toEqual(customColors)
151
+ })
152
+
129
153
  it('passes router.base through', () => {
130
154
  const cfg = resolveConfig({ router: { base: '/app', scrollToFragment: false } }, ROOT)
131
155
  expect(cfg.router.base).toBe('/app')
@@ -1,5 +1,7 @@
1
1
  import { describe, it, expect } from 'vitest'
2
- import { APP_ENTRY_TEMPLATE } from '../../runtime/app-template.js'
2
+ import { generateAppEntryTemplate } from '../../runtime/app-template.js'
3
+
4
+ const APP_ENTRY_TEMPLATE = generateAppEntryTemplate()
3
5
 
4
6
  // ─── Hydration strategy ───────────────────────────────────────────────────────
5
7
 
@@ -7,9 +7,11 @@
7
7
  * - loadIndex() error path — fetch failure rejects cleanly; singleton reset allows retry
8
8
  * - loadIndex() returns a searchable MiniSearch instance
9
9
  *
10
- * Note: The full useContentSearch() composable (query reactive state, stale-seq
11
- * guard, useOnConnected pre-warm) requires a component context provided by the
10
+ * Note: The full useContentSearch() composable (debounce, stale-seq guard,
11
+ * useOnConnected pre-warm) requires a component context provided by the
12
12
  * custom-elements-runtime and is exercised by the e2e suite in content.cy.ts.
13
+ * Specifically: input is debounced (300 ms) and an empty query immediately
14
+ * clears results + increments the seq counter to cancel any in-flight search.
13
15
  */
14
16
  import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'
15
17
  import MiniSearch from 'minisearch'
@@ -21,7 +21,7 @@ export interface ResolvedCerConfig {
21
21
  port: number
22
22
  ssg: { routes: 'auto' | string[]; concurrency: number; fallback: boolean }
23
23
  router: { base?: string; scrollToFragment?: boolean | object }
24
- jitCss: { content: string[]; extendedColors: boolean }
24
+ jitCss: { content: string[]; extendedColors: boolean; customColors?: Record<string, Record<string, string>> }
25
25
  autoImports: { components: boolean; composables: boolean; directives: boolean; runtime: boolean }
26
26
  runtimeConfig: { public: Record<string, unknown>; private: import('../types/config.js').RuntimePrivateConfig }
27
27
  auth: import('../types/config.js').AuthConfig | null
@@ -1,7 +1,7 @@
1
1
  import { writeFileSync, existsSync, mkdirSync, readFileSync, appendFileSync } from 'node:fs'
2
2
  import { join } from 'pathe'
3
3
  import type { ResolvedCerConfig } from './dev-server.js'
4
- import { APP_ENTRY_TEMPLATE } from '../runtime/app-template.js'
4
+ import { generateAppEntryTemplate } from '../runtime/app-template.js'
5
5
  import { ENTRY_SERVER_TEMPLATE } from '../runtime/entry-server-template.js'
6
6
 
7
7
  /** The name of the generated directory relative to the project root. */
@@ -107,7 +107,7 @@ export function writeGeneratedDir(config: ResolvedCerConfig): void {
107
107
  // Always write the generated app.ts — this is the framework entry point and
108
108
  // is never user-owned. Regenerating it on every dev/build ensures consumers
109
109
  // automatically get the latest bootstrap code on plugin update (Nuxt-style).
110
- writeFileSync(join(dir, 'app.ts'), APP_ENTRY_TEMPLATE, 'utf-8')
110
+ writeFileSync(join(dir, 'app.ts'), generateAppEntryTemplate(config.jitCss.customColors), 'utf-8')
111
111
 
112
112
  // Always write the SSR entry — used by the dev server's ssrLoadModule call.
113
113
  // The production build injects this as a virtual module, but the dev server
@@ -8,7 +8,7 @@ import { autoImportTransform } from './transforms/auto-import.js'
8
8
  import { scanComposableExports, writeAutoImportDts, writeTsconfigPaths } from './dts-generator.js'
9
9
  import { configureCerDevServer } from './dev-server.js'
10
10
  import { writeGeneratedDir, getGeneratedDir } from './generated-dir.js'
11
- import { APP_ENTRY_TEMPLATE } from '../runtime/app-template.js'
11
+ import { generateAppEntryTemplate } from '../runtime/app-template.js'
12
12
  import { generateRoutesCode } from './virtual/routes.js'
13
13
  import { generateLayoutsCode } from './virtual/layouts.js'
14
14
  import { generateComposablesCode } from './virtual/composables.js'
@@ -88,6 +88,7 @@ export function resolveConfig(userConfig: CerAppConfig, root: string = process.c
88
88
  `${srcDir}/layouts/**/*.ts`,
89
89
  ],
90
90
  extendedColors: userConfig.jitCss?.extendedColors ?? false,
91
+ customColors: userConfig.jitCss?.customColors,
91
92
  },
92
93
  autoImports: {
93
94
  components: userConfig.autoImports?.components ?? true,
@@ -312,7 +313,7 @@ export function cerApp(userConfig: CerAppConfig = {}): Plugin[] {
312
313
  },
313
314
 
314
315
  async load(id: string, options?: { ssr?: boolean }) {
315
- if (id === RESOLVED_APP_ENTRY) return APP_ENTRY_TEMPLATE
316
+ if (id === RESOLVED_APP_ENTRY) return generateAppEntryTemplate(config.jitCss.customColors)
316
317
 
317
318
  const allResolved = Object.values(RESOLVED_IDS) as string[]
318
319
  if (!allResolved.includes(id)) return null
@@ -1,11 +1,22 @@
1
1
  /**
2
- * Template string for `.cer/app.ts` — the framework client entry point.
2
+ * Generates the `.cer/app.ts` framework client entry point.
3
3
  *
4
4
  * Always written to `.cer/app.ts` on every dev/build so consumers
5
5
  * automatically receive the latest bootstrap code on plugin update.
6
6
  * This file is gitignored and should never be edited directly.
7
+ *
8
+ * @param customColors - Project-specific color families to register in the JIT
9
+ * CSS engine at runtime. Serialized as a JSON literal in the generated source.
7
10
  */
8
- export const APP_ENTRY_TEMPLATE = `// AUTO-GENERATED by @jasonshimmy/vite-plugin-cer-app — do not edit.
11
+ export function generateAppEntryTemplate(
12
+ customColors?: Record<string, Record<string, string>>,
13
+ ): string {
14
+ const enableJITCSSCall =
15
+ customColors && Object.keys(customColors).length > 0
16
+ ? `enableJITCSS({ customColors: ${JSON.stringify(customColors)} })`
17
+ : `enableJITCSS()`
18
+
19
+ return `// AUTO-GENERATED by @jasonshimmy/vite-plugin-cer-app — do not edit.
9
20
  // Regenerated automatically on every dev server start and build.
10
21
 
11
22
  import '@jasonshimmy/custom-elements-runtime/css'
@@ -46,7 +57,7 @@ const _cerRuntimeDev =
46
57
 
47
58
  registerBuiltinComponents()
48
59
  setDevMode(_cerRuntimeDev)
49
- enableJITCSS()
60
+ ${enableJITCSSCall}
50
61
  initRuntimeConfig(runtimeConfig)
51
62
 
52
63
  const router = initRouter({ routes })
@@ -366,3 +377,4 @@ if (typeof window !== 'undefined') {
366
377
 
367
378
  export { router }
368
379
  `
380
+ }
@@ -50,11 +50,14 @@ export function resetIndexSingleton(): void {
50
50
  export interface UseContentSearchReturn {
51
51
  query: ReactiveState<string>
52
52
  results: ReactiveState<ContentSearchResult[]>
53
+ /** `true` from the moment the user starts typing until results (or an error) arrive. `false` when the query is empty or the search is complete. */
54
+ loading: ReactiveState<boolean>
53
55
  }
54
56
 
55
57
  const _factory = createComposable((): UseContentSearchReturn => {
56
58
  const query = ref('')
57
59
  const results = ref<ContentSearchResult[]>([])
60
+ const loading = ref(false)
58
61
 
59
62
  // Pre-warm index on mount
60
63
  useOnConnected(() => {
@@ -63,26 +66,45 @@ const _factory = createComposable((): UseContentSearchReturn => {
63
66
 
64
67
  // Monotonic counter to discard stale async results
65
68
  let _seq = 0
69
+ let _debounceTimer: ReturnType<typeof setTimeout> | null = null
66
70
 
67
- watch(query, async (q: string) => {
68
- const seq = ++_seq
71
+ watch(query, (q: string) => {
72
+ if (_debounceTimer !== null) {
73
+ clearTimeout(_debounceTimer)
74
+ _debounceTimer = null
75
+ }
69
76
 
70
- if (!q || q.length < 2) {
77
+ if (!q) {
78
+ // Increment seq so any in-flight async search is discarded when it resolves
79
+ _seq++
80
+ loading.value = false
71
81
  results.value = []
72
82
  return
73
83
  }
74
84
 
75
- try {
76
- const index = await loadIndex() as { search(q: string, opts?: { prefix?: boolean }): ContentSearchResult[] }
77
- if (seq !== _seq) return // stale — a newer query is in flight
78
- results.value = index.search(q, { prefix: true }) as ContentSearchResult[]
79
- } catch {
80
- if (seq !== _seq) return
81
- results.value = []
82
- }
85
+ // Signal loading immediately so the UI can respond before the debounce fires
86
+ loading.value = true
87
+
88
+ _debounceTimer = setTimeout(async () => {
89
+ _debounceTimer = null
90
+ const seq = ++_seq
91
+
92
+ try {
93
+ const index = await loadIndex() as { search(q: string, opts?: { prefix?: boolean }): ContentSearchResult[] }
94
+ if (seq !== _seq) return // stale — a newer query is in flight
95
+ results.value = index.search(q, { prefix: true }) as ContentSearchResult[]
96
+ } catch {
97
+ if (seq !== _seq) return
98
+ results.value = []
99
+ } finally {
100
+ // Only clear loading for the most recent search; a newer in-flight search
101
+ // keeps loading=true until it settles.
102
+ if (seq === _seq) loading.value = false
103
+ }
104
+ }, 200)
83
105
  })
84
106
 
85
- return { query, results }
107
+ return { query, results, loading }
86
108
  })
87
109
 
88
110
  /**
@@ -92,8 +114,10 @@ const _factory = createComposable((): UseContentSearchReturn => {
92
114
  * `/_content/search-index.json`. Both MiniSearch and the index are loaded via
93
115
  * dynamic import — neither is in the app bundle.
94
116
  *
95
- * Searches `title` and `description` fields. Results are empty until at least
96
- * 2 characters are entered.
117
+ * Searches `title` and `description` fields. Input is debounced (200 ms) so
118
+ * the index is not queried on every keystroke. `loading` becomes `true` as soon
119
+ * as the user starts typing and returns to `false` once results arrive. Results
120
+ * are empty when the query is empty.
97
121
  *
98
122
  * **SSR note**: search is always client-side. In SSR mode the component renders
99
123
  * with empty results and hydrates on mount.
@@ -101,10 +125,11 @@ const _factory = createComposable((): UseContentSearchReturn => {
101
125
  * @example
102
126
  * ```ts
103
127
  * component('site-search', () => {
104
- * const { query, results } = useContentSearch()
128
+ * const { query, results, loading } = useContentSearch()
105
129
  *
106
130
  * return html`
107
131
  * <input type="search" :model="${query}" placeholder="Search…" />
132
+ * ${loading.value ? html`<p>Searching…</p>` : ''}
108
133
  * ${when(results.value.length > 0, () => html`
109
134
  * <ul>
110
135
  * ${each(results.value, r => html`
@@ -144,6 +144,25 @@ export interface JitCssConfig {
144
144
  content?: string[]
145
145
  /** Enable the extended color palette. Defaults to `false`. */
146
146
  extendedColors?: boolean
147
+ /**
148
+ * Project-specific color families registered in the JIT CSS engine at both
149
+ * build time and runtime. Each key is a color family name (e.g. `brand`);
150
+ * its value is a map of scale steps to CSS color values.
151
+ *
152
+ * Color family names must be a single lowercase word (no hyphens). Shades
153
+ * can be any string key — numeric steps (`'500'`) or semantic names
154
+ * (`'DEFAULT'`, `'on'`, `'container'`). When no shade is specified in a
155
+ * utility class (e.g. `bg-brand`), the `DEFAULT` shade is used.
156
+ *
157
+ * @example
158
+ * ```ts
159
+ * customColors: {
160
+ * brand: { '100': '#ede9fe', '500': '#7c3aed', '900': '#4c1d95' },
161
+ * surface: { DEFAULT: 'var(--md-sys-color-surface)' },
162
+ * }
163
+ * ```
164
+ */
165
+ customColors?: Record<string, Record<string, string>>
147
166
  }
148
167
 
149
168
  /** Fine-grained control over which auto-import categories are injected into page/layout/component files. All categories are enabled by default. */