@canonical/summon-application 0.37.0 → 0.38.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 (35) hide show
  1. package/README.md +4 -2
  2. package/dist/esm/application/react/index.js +16 -2
  3. package/dist/esm/application/react/index.js.map +1 -1
  4. package/dist/esm/application/react/templates/.storybook/decorators/withRouter.tsx +3 -2
  5. package/dist/esm/application/react/templates/.storybook/preview.ts.ejs +4 -2
  6. package/dist/esm/application/react/templates/index.html.ejs +21 -3
  7. package/dist/esm/application/react/templates/package.json.ejs +2 -1
  8. package/dist/esm/application/react/templates/src/client/entry.tsx.ejs +12 -5
  9. package/dist/esm/application/react/templates/src/domains/account/AccountPage.tsx.ejs +4 -5
  10. package/dist/esm/application/react/templates/src/domains/account/LoginPage.tsx.ejs +4 -5
  11. package/dist/esm/application/react/templates/src/domains/catalog/CatalogPage.tsx.ejs +4 -5
  12. package/dist/esm/application/react/templates/src/domains/contact/ContactPage.tsx.ejs +4 -5
  13. package/dist/esm/application/react/templates/src/domains/marketing/GuidePage.tsx.ejs +4 -10
  14. package/dist/esm/application/react/templates/src/domains/marketing/HomePage.tsx.ejs +4 -5
  15. package/dist/esm/application/react/templates/src/formatDocumentTitle.ts.ejs +21 -0
  16. package/dist/esm/application/react/templates/src/i18n/ar.ts +4 -5
  17. package/dist/esm/application/react/templates/src/i18n/en.ts +4 -5
  18. package/dist/esm/application/react/templates/src/i18n/fr.ts +4 -5
  19. package/dist/esm/application/react/templates/src/lib/ExampleComponent/styles.css +13 -3
  20. package/dist/esm/application/react/templates/src/routes.tsx.ejs +3 -0
  21. package/dist/esm/application/react/templates/src/server/entry.tsx.ejs +50 -16
  22. package/dist/esm/application/react/templates/src/styles/app.css +23 -13
  23. package/dist/esm/application/react/templates/src/styles/index.css.ejs +27 -0
  24. package/dist/esm/application/react/templates/test/e2e/servers.e2e.ts.ejs +17 -2
  25. package/dist/esm/application/react/templates/tsconfig.json.ejs +1 -0
  26. package/dist/esm/application/react/templates/vite-plugin-ds-icons.ts +69 -0
  27. package/dist/esm/application/react/templates/vite.config.ts.ejs +11 -2
  28. package/dist/esm/domain/index.js +3 -4
  29. package/dist/esm/domain/index.js.map +1 -1
  30. package/dist/esm/route/index.js +2 -3
  31. package/dist/esm/route/index.js.map +1 -1
  32. package/dist/types/application/react/index.d.ts.map +1 -1
  33. package/dist/types/domain/index.d.ts.map +1 -1
  34. package/dist/types/route/index.d.ts.map +1 -1
  35. package/package.json +8 -8
package/README.md CHANGED
@@ -163,7 +163,7 @@ Produces:
163
163
 
164
164
  ```
165
165
  src/domains/billing/
166
- ├── MainPage.tsx # Page component with useHead()
166
+ ├── MainPage.tsx # Page component rendering <Head>
167
167
  └── routes.ts # Route barrel with example route entry
168
168
  ```
169
169
 
@@ -263,6 +263,7 @@ src/
263
263
  │ ├── schema.ts # Executable mock schema (graphql-js)
264
264
  │ └── __generated__/ # Committed relay-compiler artifacts
265
265
  ├── styles/ # CSS
266
+ ├── formatDocumentTitle.ts # Appends the app name to every page's title
266
267
  └── routes.tsx # Root route map, middleware, type registration
267
268
  ```
268
269
 
@@ -292,7 +293,8 @@ export default routes;
292
293
  ```
293
294
 
294
295
  - `content` receives the component directly (not a wrapper function)
295
- - Pages use `useHead()` from `@canonical/react-head` for title and meta
296
+ - Pages render `<Head>` from `@canonical/react-head` for title and meta — one
297
+ owner per document, so a layout or an entry never renders it
296
298
  - No `fetch()` / `warm()` unless needed for cache warming
297
299
  - No `.error` — use React error boundaries
298
300
  - Route files are `.ts` (no JSX in route definitions)
@@ -105,7 +105,7 @@ export const generator = {
105
105
  - Server-side rendering (Express + Bun dev servers) — the default
106
106
  --rendering ssr; --rendering spa omits the whole server layer
107
107
  - Routing with @canonical/router-core
108
- - Head management with @canonical/react-head
108
+ - Head management with @canonical/react-head (SSR-visible <title>/<meta>)
109
109
  - Two domains (marketing + account) with pages
110
110
  - Contact domain with form components (on by default; omit with --no-forms)
111
111
  - Relay (GraphQL) data layer with a local mock schema, catalog example
@@ -260,6 +260,11 @@ fallback.`,
260
260
  dest: dest("vite.config.ts"),
261
261
  vars,
262
262
  }),
263
+ // Icons delivery: design-system components fetch glyphs at runtime
264
+ // from `/icons/<name>.svg#<name>`; the plugin serves them from
265
+ // @canonical/ds-assets in dev and copies them into the client
266
+ // build output (wired into plugins in vite.config.ts above).
267
+ copy("vite-plugin-ds-icons.ts"),
263
268
  copy("vitest.config.ts"),
264
269
  // vitest setup (EJS — relay-test-utils' jest→vi alias only when --relay)
265
270
  template({
@@ -270,7 +275,8 @@ fallback.`,
270
275
  copy("vitest.e2e.config.ts"),
271
276
  // Relay compiler config (validates queries against the mock SDL)
272
277
  when(answers.relay, copy("relay.config.json")),
273
- // index.html (EJS — <title> uses the app name)
278
+ // index.html (EJS — the client-only arm titles the shell; the SSR
279
+ // arm leaves the title to the page, which owns it)
274
280
  template({
275
281
  source: src("index.html.ejs"),
276
282
  dest: dest("index.html"),
@@ -303,6 +309,14 @@ fallback.`,
303
309
  vars,
304
310
  }),
305
311
  copy("src/styles/app.css"),
312
+ // Document title template (EJS — carries the app name). Shared by the
313
+ // client entry, the server entry and the Storybook decorator so every
314
+ // one of them composes page titles the same way.
315
+ template({
316
+ source: src("src/formatDocumentTitle.ts.ejs"),
317
+ dest: dest("src/formatDocumentTitle.ts"),
318
+ vars,
319
+ }),
306
320
  // Client (EJS — RelayEnvironmentProvider only when --relay)
307
321
  template({
308
322
  source: src("src/client/entry.tsx.ejs"),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/application/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAMzC,OAAO,EACL,gBAAgB,EAChB,OAAO,EACP,QAAQ,EACR,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ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,IAAI,EAAE,IAAI,CAAC,oBAAoB,CAAC;wBAChC,IAAI;qBACL,CAAC;oBACF,QAAQ,CAAC;wBACP,MAAM,EAAE,GAAG,CAAC,2BAA2B,CAAC;wBACxC,IAAI,EAAE,IAAI,CAAC,uBAAuB,CAAC;wBACnC,IAAI;qBACL,CAAC;oBACF,IAAI,CAAC,sCAAsC,CAAC;oBAC5C,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,oCAAoC,CAAC,CAAC;oBAC9D,QAAQ,CAAC;wBACP,MAAM,EAAE,GAAG,CAAC,oCAAoC,CAAC;wBACjD,IAAI,EAAE,IAAI,CAAC,gCAAgC,CAAC;wBAC5C,IAAI;qBACL,CAAC;oBAEF,gFAAgF;oBAChF,IAAI,CAAC,qBAAqB,CAAC;oBAC3B,IAAI,CAAC,iBAAiB,CAAC;oBACvB,IAAI,CAAC,mBAAmB,CAAC;oBAEzB,qEAAqE;oBACrE,qEAAqE;oBACrE,wEAAwE;oBACxE,mEAAmE;oBACnE,WAAW,IAAI,IAAI,CAAC,SAAS,CAAC;oBAE9B,IAAI,CAAC,YAAY,CAAC;iBACnB,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/application/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAMzC,OAAO,EACL,gBAAgB,EAChB,OAAO,EACP,QAAQ,EACR,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,IAAI,EACJ,IAAI,GACL,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,kBAAkB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AkB,CAAC;wBAC9B,IAAI;qBACL,CAAC;oBAEF,aAAa;oBACb,IAAI,CAAC,mBAAmB,CAAC;oBAEzB,YAAY;oBACZ,gEAAgE;oBAChE,QAAQ,CAAC;wBACP,MAAM,EAAE,GAAG,CAAC,wBAAwB,CAAC;wBACrC,IAAI,EAAE,IAAI,CAAC,oBAAoB,CAAC;wBAChC,IAAI;qBACL,CAAC;oBACF,QAAQ,CAAC;wBACP,MAAM,EAAE,GAAG,CAAC,2BAA2B,CAAC;wBACxC,IAAI,EAAE,IAAI,CAAC,uBAAuB,CAAC;wBACnC,IAAI;qBACL,CAAC;oBACF,IAAI,CAAC,sCAAsC,CAAC;oBAC5C,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,oCAAoC,CAAC,CAAC;oBAC9D,QAAQ,CAAC;wBACP,MAAM,EAAE,GAAG,CAAC,oCAAoC,CAAC;wBACjD,IAAI,EAAE,IAAI,CAAC,gCAAgC,CAAC;wBAC5C,IAAI;qBACL,CAAC;oBAEF,gFAAgF;oBAChF,IAAI,CAAC,qBAAqB,CAAC;oBAC3B,IAAI,CAAC,iBAAiB,CAAC;oBACvB,IAAI,CAAC,mBAAmB,CAAC;oBAEzB,qEAAqE;oBACrE,qEAAqE;oBACrE,wEAAwE;oBACxE,mEAAmE;oBACnE,WAAW,IAAI,IAAI,CAAC,SAAS,CAAC;oBAE9B,IAAI,CAAC,YAAY,CAAC;iBACnB,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -3,6 +3,7 @@ import type { RouteMap } from "@canonical/router-core";
3
3
  import { Outlet } from "@canonical/router-react";
4
4
  import { withHashRouter } from "@canonical/storybook-addon-utils";
5
5
  import type { ElementType } from "react";
6
+ import formatDocumentTitle from "../../src/formatDocumentTitle.js";
6
7
 
7
8
  interface WithRouterOptions {
8
9
  readonly routes?: RouteMap;
@@ -17,7 +18,7 @@ interface WithRouterOptions {
17
18
  * The router itself (`createRouter` + hash adapter + `RouterProvider`) comes
18
19
  * from `@canonical/storybook-addon-utils`, so there is exactly one copy of that
19
20
  * wiring — and one hash listener — across the design system and this app. This
20
- * decorator only adds what is app-specific: the head provider, and the
21
+ * decorator only adds what is app-specific: the head title template, and the
21
22
  * `<Outlet />` that renders matched route content next to the story.
22
23
  *
23
24
  * @example
@@ -29,7 +30,7 @@ interface WithRouterOptions {
29
30
  const withRouter =
30
31
  ({ routes }: WithRouterOptions = {}) =>
31
32
  (Story: ElementType) => (
32
- <HeadProvider>
33
+ <HeadProvider titleTemplate={formatDocumentTitle}>
33
34
  {withHashRouter({ routes })(() => (
34
35
  <>
35
36
  <Story />
@@ -1,11 +1,13 @@
1
+ // The stylesheet comes first, before every component a story can reach: CSS is
2
+ // emitted in the order the bundler evaluates the modules that import it, and
3
+ // the layer order a browser applies is the one it reads first.
4
+ import "../src/styles/index.css";
1
5
  import previewConfig from "@canonical/storybook-config/preview";
2
6
  import type { Preview } from "@storybook/react-vite";
3
7
  <% if (intl) { -%>
4
8
  import { withI18n } from "./decorators/index.js";
5
9
  <% } -%>
6
10
 
7
- import "../src/styles/index.css";
8
-
9
11
  const preview: Preview = {
10
12
  ...previewConfig,
11
13
  <% if (intl) { -%>
@@ -1,5 +1,12 @@
1
1
  <!doctype html>
2
- <html lang="en">
2
+ <!-- The root declaration: one context (`app`, `site` or `docs`) and one density
3
+ (`comfortable` or `dense`), which together choose the --density-* channel
4
+ every control reads. A colour scheme is optional — `light` or `dark` pins
5
+ one, leaving both off follows the reader's operating system.
6
+
7
+ Those classes are the whole of it. Nothing on this element declares the
8
+ design system itself: its stylesheet applies to the page as it stands. -->
9
+ <html lang="en" class="app comfortable">
3
10
  <head>
4
11
  <meta charset="UTF-8" />
5
12
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
@@ -9,10 +16,21 @@
9
16
  <meta name="description" content="<%= name %> — a React application built with the Canonical design system, router, and SSR packages." />
10
17
  <% } -%>
11
18
  <link rel="icon" type="image/png" sizes="32x32" href="https://assets.ubuntu.com/v1/be7e4cc6-COF-favicon-32x32.png">
19
+ <% if (spa) { -%>
20
+ <!-- The client-only build serves this file as the document, so it carries a
21
+ title for the moment before React renders. The route page still owns
22
+ the real one: it renders <Head> from @canonical/react-head, and React
23
+ inserts that <title> ahead of this one in the head. -->
12
24
  <title><%= name %></title>
25
+ <% } else { -%>
26
+ <!-- No <title> here. The route page owns it, through <Head> from
27
+ @canonical/react-head, and React hoists that <title> into this head.
28
+ The server renderer re-emits this shell's head tags ahead of the
29
+ hoisted ones, and HTML takes the FIRST <title> in tree order — so a
30
+ <title> on this line would beat every page's. -->
31
+ <% } -%>
13
32
  </head>
14
- <!-- Surface declaration: context (app) + density (comfortable) — roots the design system's --density-* channel -->
15
- <body class="app comfortable">
33
+ <body>
16
34
  <div id="root"></div>
17
35
  <script type="module" src="/src/client/entry.tsx"></script>
18
36
  </body>
@@ -65,6 +65,7 @@
65
65
  <% } -%>
66
66
  },
67
67
  "dependencies": {
68
+ "@canonical/ds-assets": "<%= pragmaVersion %>",
68
69
  <% if (intl) { -%>
69
70
  "@canonical/i18n-core": "<%= pragmaVersion %>",
70
71
  "@canonical/i18n-react": "<%= pragmaVersion %>",
@@ -99,7 +100,7 @@
99
100
  "relay-runtime-network": "0.1.0"<% } %>
100
101
  },
101
102
  "devDependencies": {
102
- "@biomejs/biome": "2.4.9",
103
+ "@biomejs/biome": "2.5.13",
103
104
  "@canonical/biome-config": "<%= pragmaVersion %>",
104
105
  "@canonical/typescript-config-react": "<%= pragmaVersion %>",
105
106
  <% if (intl) { -%>
@@ -1,3 +1,10 @@
1
+ // The stylesheet comes first, before the routes and before every component
2
+ // import below. CSS is emitted in the order the bundler evaluates the modules
3
+ // that import it, so a component imported earlier would put its own rules —
4
+ // and its own `@layer` blocks — ahead of the design system's layer statement,
5
+ // and the layer order a browser applies is the one it reads first. Keeping
6
+ // this line at the top is what makes the built stylesheet deterministic.
7
+ import "#styles/index.css";
1
8
  <% if (intl) { -%>
2
9
  <% if (spa) { -%>
3
10
  import { negotiateLocale } from "@canonical/i18n-core";
@@ -38,6 +45,7 @@ import { catalogs, i18nConfig } from "#i18n/index.js";
38
45
  <% if (relay) { -%>
39
46
  import { getBrowserEnvironment } from "#relay/environment.js";
40
47
  <% } -%>
48
+ import formatDocumentTitle from "../formatDocumentTitle.js";
41
49
  <%# Same story: the SPA arm never pulls the two SSR payload symbols, so the three -%>
42
50
  <%# base names fit on one line and the formatter requires them there. -%>
43
51
  <% if (spa) { -%>
@@ -53,7 +61,6 @@ import {
53
61
  <% } -%>
54
62
  } from "../routes.js";
55
63
  <% } -%>
56
- import "#styles/index.css";
57
64
  <% if (relay && spa) { -%>
58
65
 
59
66
  // Claim the browser-session Relay environment FIRST — before the router exists
@@ -161,7 +168,7 @@ hydrateRoot(
161
168
  catalogs={catalogs}
162
169
  locale={resolveInitialLocale()}
163
170
  >
164
- <HeadProvider>
171
+ <HeadProvider titleTemplate={formatDocumentTitle}>
165
172
  <RelayEnvironmentProvider environment={relayEnvironment}>
166
173
  <RouterProvider router={router}>
167
174
  <Outlet fallback={<p>Loading…</p>} />
@@ -170,7 +177,7 @@ hydrateRoot(
170
177
  </HeadProvider>
171
178
  </I18nProvider>,
172
179
  <% } else if (relay) { -%>
173
- <HeadProvider>
180
+ <HeadProvider titleTemplate={formatDocumentTitle}>
174
181
  <RelayEnvironmentProvider environment={relayEnvironment}>
175
182
  <RouterProvider router={router}>
176
183
  <Outlet fallback={<p>Loading…</p>} />
@@ -183,14 +190,14 @@ hydrateRoot(
183
190
  catalogs={catalogs}
184
191
  locale={resolveInitialLocale()}
185
192
  >
186
- <HeadProvider>
193
+ <HeadProvider titleTemplate={formatDocumentTitle}>
187
194
  <RouterProvider router={router}>
188
195
  <Outlet fallback={<p>Loading…</p>} />
189
196
  </RouterProvider>
190
197
  </HeadProvider>
191
198
  </I18nProvider>,
192
199
  <% } else { -%>
193
- <HeadProvider>
200
+ <HeadProvider titleTemplate={formatDocumentTitle}>
194
201
  <RouterProvider router={router}>
195
202
  <Outlet fallback={<p>Loading…</p>} />
196
203
  </RouterProvider>
@@ -1,23 +1,22 @@
1
1
  <% if (intl) { -%>
2
2
  import { useTranslation } from "@canonical/i18n-react";
3
3
  <% } -%>
4
- import { useHead } from "@canonical/react-head";
4
+ import { Head } from "@canonical/react-head";
5
5
  import type { ReactElement } from "react";
6
6
 
7
7
  export default function AccountPage(): ReactElement {
8
8
  <% if (intl) { -%>
9
9
  const { t } = useTranslation();
10
- useHead({ title: t("account.title") });
11
- <% } else { -%>
12
- useHead({ title: "Account — Boilerplate" });
13
- <% } -%>
14
10
 
11
+ <% } -%>
15
12
  return (
16
13
  <section aria-labelledby="account-title">
17
14
  <% if (intl) { -%>
15
+ <Head title={t("account.title")} />
18
16
  <h1 id="account-title">{t("account.heading")}</h1>
19
17
  <p>{t("account.body")}</p>
20
18
  <% } else { -%>
19
+ <Head title="Account" />
21
20
  <h1 id="account-title">Account</h1>
22
21
  <p>Protected account page. You are signed in.</p>
23
22
  <% } -%>
@@ -1,7 +1,7 @@
1
1
  <% if (intl) { -%>
2
2
  import { useTranslation } from "@canonical/i18n-react";
3
3
  <% } -%>
4
- import { useHead } from "@canonical/react-head";
4
+ import { Head } from "@canonical/react-head";
5
5
  import type { ReactElement } from "react";
6
6
 
7
7
  interface LoginSearch {
@@ -15,20 +15,19 @@ export default function LoginPage({
15
15
  }): ReactElement {
16
16
  <% if (intl) { -%>
17
17
  const { t } = useTranslation();
18
- useHead({ title: t("login.title") });
19
- <% } else { -%>
20
- useHead({ title: "Login — Boilerplate" });
21
- <% } -%>
22
18
 
19
+ <% } -%>
23
20
  return (
24
21
  <section aria-labelledby="login-title">
25
22
  <% if (intl) { -%>
23
+ <Head title={t("login.title")} />
26
24
  <h1 id="login-title">{t("login.heading")}</h1>
27
25
  {/*
28
26
  The `?auth=1` literal is markup (<code>), which a plain message string
29
27
  cannot carry, so the sentence is catalogued as the fragments around it.
30
28
  */}
31
29
  <% } else { -%>
30
+ <Head title="Login" />
32
31
  <h1 id="login-title">Login</h1>
33
32
  <% } -%>
34
33
  <p>
@@ -1,7 +1,7 @@
1
1
  <% if (intl) { -%>
2
2
  import { useTranslation } from "@canonical/i18n-react";
3
3
  <% } -%>
4
- import { useHead } from "@canonical/react-head";
4
+ import { Head } from "@canonical/react-head";
5
5
  import { type ReactElement, Suspense } from "react";
6
6
  import { useRelayEnvironment } from "react-relay";
7
7
  import { createOperationDescriptor, getRequest } from "relay-runtime";
@@ -11,11 +11,8 @@ import ProductList, { PAGE_SIZE, productListQuery } from "./ProductList.js";
11
11
  export default function CatalogPage(): ReactElement {
12
12
  <% if (intl) { -%>
13
13
  const { t } = useTranslation();
14
- useHead({ title: t("catalog.title") });
15
- <% } else { -%>
16
- useHead({ title: "Catalog — Boilerplate" });
17
- <% } -%>
18
14
 
15
+ <% } -%>
19
16
  const environment = useRelayEnvironment();
20
17
  const canRenderQuery =
21
18
  typeof document !== "undefined" ||
@@ -28,12 +25,14 @@ export default function CatalogPage(): ReactElement {
28
25
  return (
29
26
  <section aria-labelledby="catalog-title">
30
27
  <% if (intl) { -%>
28
+ <Head title={t("catalog.title")} />
31
29
  <h1 id="catalog-title">{t("catalog.heading")}</h1>
32
30
  {/*
33
31
  Developer documentation rather than user-facing copy (file names,
34
32
  APIs), so it deliberately stays out of the message catalogs.
35
33
  */}
36
34
  <% } else { -%>
35
+ <Head title="Catalog" />
37
36
  <h1 id="catalog-title">Catalog</h1>
38
37
  <% } -%>
39
38
  <p>
@@ -3,7 +3,7 @@ import { useTranslation } from "@canonical/i18n-react";
3
3
  <% } -%>
4
4
  import { Button } from "@canonical/react-ds-global";
5
5
  import { Field, Form } from "@canonical/react-ds-global-form";
6
- import { useHead } from "@canonical/react-head";
6
+ import { Head } from "@canonical/react-head";
7
7
  import type { ReactElement } from "react";
8
8
 
9
9
  function handleSubmit(data: Record<string, unknown>) {
@@ -13,16 +13,15 @@ function handleSubmit(data: Record<string, unknown>) {
13
13
  export default function ContactPage(): ReactElement {
14
14
  <% if (intl) { -%>
15
15
  const { t } = useTranslation();
16
- useHead({ title: t("contact.title") });
17
- <% } else { -%>
18
- useHead({ title: "Contact" });
19
- <% } -%>
20
16
 
17
+ <% } -%>
21
18
  return (
22
19
  <section aria-labelledby="contact-title">
23
20
  <% if (intl) { -%>
21
+ <Head title={t("contact.title")} />
24
22
  <h1 id="contact-title">{t("contact.heading")}</h1>
25
23
  <% } else { -%>
24
+ <Head title="Contact" />
26
25
  <h1 id="contact-title">Contact</h1>
27
26
  <% } -%>
28
27
  <Form onSubmit={handleSubmit}>
@@ -1,7 +1,7 @@
1
1
  <% if (intl) { -%>
2
2
  import { useTranslation } from "@canonical/i18n-react";
3
3
  <% } -%>
4
- import { useHead } from "@canonical/react-head";
4
+ import { Head } from "@canonical/react-head";
5
5
  import type { ReactElement } from "react";
6
6
 
7
7
  export default function GuidePage({
@@ -10,18 +10,12 @@ export default function GuidePage({
10
10
  params: { slug: string };
11
11
  }): ReactElement {
12
12
  <% if (intl) { -%>
13
- const { t, locale } = useTranslation();
14
- // `locale` is a dependency: switching languages must retranslate the title.
15
- useHead({ title: t("guide.title", { slug: params.slug }) }, [
16
- params.slug,
17
- locale,
18
- ]);
19
- <% } else { -%>
20
- useHead({ title: `${params.slug} — Guides` }, [params.slug]);
21
- <% } -%>
13
+ const { t } = useTranslation();
22
14
 
15
+ <% } -%>
23
16
  return (
24
17
  <section aria-labelledby="guide-title">
18
+ <Head title={params.slug} />
25
19
  <h1 id="guide-title">{params.slug}</h1>
26
20
  <% if (intl) { -%>
27
21
  <p>{t("guide.body", { slug: params.slug })}</p>
@@ -1,24 +1,23 @@
1
1
  <% if (intl) { -%>
2
2
  import { useTranslation } from "@canonical/i18n-react";
3
3
  <% } -%>
4
- import { useHead } from "@canonical/react-head";
4
+ import { Head } from "@canonical/react-head";
5
5
  import { type ReactElement, Suspense } from "react";
6
6
  import { ExampleComponent, LazyComponent } from "#lib/index.js";
7
7
 
8
8
  export default function HomePage(): ReactElement {
9
9
  <% if (intl) { -%>
10
10
  const { t } = useTranslation();
11
- useHead({ title: t("home.title") });
12
- <% } else { -%>
13
- useHead({ title: "Home — Boilerplate" });
14
- <% } -%>
15
11
 
12
+ <% } -%>
16
13
  return (
17
14
  <section aria-labelledby="home-title">
18
15
  <% if (intl) { -%>
16
+ <Head title={t("home.title")} />
19
17
  <h1 id="home-title">{t("home.heading")}</h1>
20
18
  <p>{t("home.tagline")}</p>
21
19
  <% } else { -%>
20
+ <Head title="Home" />
22
21
  <h1 id="home-title">Home</h1>
23
22
  <p>Welcome to the pragma router boilerplate.</p>
24
23
  <% } -%>
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Compose a page's own title into the document title.
3
+ *
4
+ * Every page names only itself — `<Head title="Account" />` — and the
5
+ * application name is appended here, once. That keeps the name out of every
6
+ * message catalog, and it is what makes a page added later by
7
+ * `summon route <domain>/<name>` (whose scaffolded title is a bare noun) title
8
+ * itself consistently with the rest of the app.
9
+ <% if (spa) { -%>
10
+ *
11
+ * `HeadProvider` in the client entry is what installs it.
12
+ <% } else { -%>
13
+ *
14
+ * The client and the server entries must pass the same function to
15
+ * `HeadProvider`, or the server-rendered title would not match the one the
16
+ * client renders after hydration; both import this module for that reason.
17
+ <% } -%>
18
+ */
19
+ export default function formatDocumentTitle(pageTitle: string): string {
20
+ return `${pageTitle} — <%= name %>`;
21
+ }
@@ -23,18 +23,17 @@ const ar: Record<MessageKey, MessageValue> = {
23
23
  "locale.label": "اللغة",
24
24
  "notFound.heading": "الصفحة غير موجودة",
25
25
  "notFound.body": "الصفحة التي تبحث عنها غير موجودة.",
26
- "home.title": "الرئيسية — Boilerplate",
26
+ "home.title": "الرئيسية",
27
27
  "home.heading": "الرئيسية",
28
28
  "home.tagline": "مرحبًا بك في تطبيق pragma النموذجي.",
29
29
  "home.exampleHeading": "مكوّن مثال",
30
30
  "home.streamingHeading": "البث مع Suspense",
31
31
  "home.streamFallback": "جارٍ تحميل المحتوى المتدفق…",
32
- "guide.title": "{slug} — أدلة",
33
32
  "guide.body": "محتوى الدليل عن {slug}.",
34
- "account.title": "الحساب — Boilerplate",
33
+ "account.title": "الحساب",
35
34
  "account.heading": "الحساب",
36
35
  "account.body": "صفحة حساب محمية. أنت مسجّل الدخول.",
37
- "login.title": "تسجيل الدخول — Boilerplate",
36
+ "login.title": "تسجيل الدخول",
38
37
  "login.heading": "تسجيل الدخول",
39
38
  "login.hintBefore": "تسجيل دخول تجريبي. أضف",
40
39
  "login.hintAfter": "إلى أي عنوان محمي لمحاكاة المصادقة.",
@@ -51,7 +50,7 @@ const ar: Record<MessageKey, MessageValue> = {
51
50
  "contact.message": "الرسالة",
52
51
  "contact.messageHint": "500 حرف كحد أقصى",
53
52
  "contact.send": "إرسال الرسالة",
54
- "catalog.title": "الكتالوج — Boilerplate",
53
+ "catalog.title": "الكتالوج",
55
54
  "catalog.heading": "الكتالوج",
56
55
  "catalog.loading": "جارٍ تحميل الكتالوج…",
57
56
  "catalog.error": "تعذّر تحميل الكتالوج. أعد تحميل الصفحة للمحاولة مرة أخرى.",
@@ -23,18 +23,17 @@ const en = {
23
23
  "locale.label": "Language",
24
24
  "notFound.heading": "Page not found",
25
25
  "notFound.body": "The page you are looking for does not exist.",
26
- "home.title": "Home — Boilerplate",
26
+ "home.title": "Home",
27
27
  "home.heading": "Home",
28
28
  "home.tagline": "Welcome to the pragma router boilerplate.",
29
29
  "home.exampleHeading": "Example component",
30
30
  "home.streamingHeading": "Streaming with Suspense",
31
31
  "home.streamFallback": "Loading streamed content…",
32
- "guide.title": "{slug} — Guides",
33
32
  "guide.body": "Guide content for {slug}.",
34
- "account.title": "Account — Boilerplate",
33
+ "account.title": "Account",
35
34
  "account.heading": "Account",
36
35
  "account.body": "Protected account page. You are signed in.",
37
- "login.title": "Login — Boilerplate",
36
+ "login.title": "Login",
38
37
  "login.heading": "Login",
39
38
  "login.hintBefore": "Demo login. Add",
40
39
  "login.hintAfter": "to any protected URL to simulate authentication.",
@@ -51,7 +50,7 @@ const en = {
51
50
  "contact.message": "Message",
52
51
  "contact.messageHint": "Maximum 500 characters",
53
52
  "contact.send": "Send message",
54
- "catalog.title": "Catalog — Boilerplate",
53
+ "catalog.title": "Catalog",
55
54
  "catalog.heading": "Catalog",
56
55
  "catalog.loading": "Loading catalog…",
57
56
  "catalog.error": "The catalog failed to load. Reload the page to try again.",
@@ -19,18 +19,17 @@ const fr: Record<MessageKey, MessageValue> = {
19
19
  "locale.label": "Langue",
20
20
  "notFound.heading": "Page introuvable",
21
21
  "notFound.body": "La page que vous recherchez n'existe pas.",
22
- "home.title": "Accueil — Boilerplate",
22
+ "home.title": "Accueil",
23
23
  "home.heading": "Accueil",
24
24
  "home.tagline": "Bienvenue dans le boilerplate du routeur pragma.",
25
25
  "home.exampleHeading": "Composant d'exemple",
26
26
  "home.streamingHeading": "Streaming avec Suspense",
27
27
  "home.streamFallback": "Chargement du contenu diffusé…",
28
- "guide.title": "{slug} — Guides",
29
28
  "guide.body": "Contenu du guide pour {slug}.",
30
- "account.title": "Compte — Boilerplate",
29
+ "account.title": "Compte",
31
30
  "account.heading": "Compte",
32
31
  "account.body": "Page de compte protégée. Vous êtes connecté.",
33
- "login.title": "Connexion — Boilerplate",
32
+ "login.title": "Connexion",
34
33
  "login.heading": "Connexion",
35
34
  "login.hintBefore": "Connexion de démonstration. Ajoutez",
36
35
  "login.hintAfter":
@@ -48,7 +47,7 @@ const fr: Record<MessageKey, MessageValue> = {
48
47
  "contact.message": "Message",
49
48
  "contact.messageHint": "500 caractères maximum",
50
49
  "contact.send": "Envoyer le message",
51
- "catalog.title": "Catalogue — Boilerplate",
50
+ "catalog.title": "Catalogue",
52
51
  "catalog.heading": "Catalogue",
53
52
  "catalog.loading": "Chargement du catalogue…",
54
53
  "catalog.error":
@@ -1,7 +1,17 @@
1
1
  /* @canonical/generator-ds 0.9.0-experimental.9 */
2
2
 
3
- /*
4
- .ds.example-component {
3
+ /* This application's own CSS, in `app`. Left unlayered it would beat every
4
+ * rule the design system ships, because unlayered CSS outranks any layer —
5
+ * by accident rather than by intent. `app` sorts above the design system's
6
+ * own layers only while the entry imports `#styles/index.css`, and with it
7
+ * `@canonical/styles`' order statement, before anything that pulls this file
8
+ * in; that is what canonical/pragma#1122 puts in the generated entry, and
9
+ * this file lands after it. Keep that import first. */
5
10
 
11
+ @layer app {
12
+ /*
13
+ .ds.example-component {
14
+
15
+ }
16
+ */
6
17
  }
7
- */
@@ -1,6 +1,7 @@
1
1
  <% if (intl) { -%>
2
2
  import { useTranslation } from "@canonical/i18n-react";
3
3
  <% } -%>
4
+ import { Head } from "@canonical/react-head";
4
5
  import {
5
6
  type AnyRoute,
6
7
  group,
@@ -111,6 +112,7 @@ function NotFoundPage(): ReactElement {
111
112
 
112
113
  return (
113
114
  <section>
115
+ <Head title={t("notFound.heading")} />
114
116
  <h1>{t("notFound.heading")}</h1>
115
117
  <p>{t("notFound.body")}</p>
116
118
  </section>
@@ -125,6 +127,7 @@ const notFoundRoute = route({
125
127
  <% } else { -%>
126
128
  content: () => (
127
129
  <section>
130
+ <Head title="Page not found" />
128
131
  <h1>Page not found</h1>
129
132
  <p>The page you are looking for does not exist.</p>
130
133
  </section>
@@ -1,3 +1,9 @@
1
+ // Styles first, for the same reason as in the client entry: the order the
2
+ // bundler evaluates style imports in is the order the rules are emitted in.
3
+ // The server build only needs the application's own sheet — the design
4
+ // system's layers reach the browser through the client bundle's stylesheet,
5
+ // which the renderer links from the built HTML.
6
+ import "#styles/app.css";
1
7
  <% if (intl) { -%>
2
8
  import { documentAttrs, isSupportedLocale } from "@canonical/i18n-core";
3
9
  import { I18nProvider } from "@canonical/i18n-react";
@@ -19,6 +25,7 @@ import { catalogs, i18nConfig } from "#i18n/index.js";
19
25
  <% if (relay) { -%>
20
26
  import { createEnvironment } from "#relay/environment.js";
21
27
  <% } -%>
28
+ import formatDocumentTitle from "../formatDocumentTitle.js";
22
29
  import {
23
30
  appRoutes,
24
31
  getAuthRedirectForMatch,
@@ -32,7 +39,6 @@ import {
32
39
  serverQueries,
33
40
  <% } -%>
34
41
  } from "../routes.js";
35
- import "#styles/app.css";
36
42
 
37
43
  interface InitialData extends Record<string, unknown> {
38
44
  readonly url?: string;
@@ -282,27 +288,45 @@ export default function EntryServer(props: ServerEntrypointProps<InitialData>) {
282
288
  const { lang, dir } = documentAttrs(i18nConfig, locale);
283
289
 
284
290
  <% } -%>
285
- // Paint the cookie-resolved theme on <html> for a flash-free first render —
286
- // the same element `usePreferredTheme` toggles on the client, and one React
287
- // does not hydrate (only `#root` is), so there is no mismatch to reconcile.
291
+ // The root declaration plus the theme, on one element. `app` is the context
292
+ // and `comfortable` the density; together they choose the --density-* channel
293
+ // every control reads. The cookie-resolved theme joins them so the first
294
+ // paint is flash-free — it is the same element `usePreferredTheme` toggles on
295
+ // the client, and React does not hydrate it (only `#root` is), so there is no
296
+ // mismatch to reconcile. index.html carries the same classes for the
297
+ // client-only build.
298
+ //
299
+ // Context, density and the theme are the whole of the root contract. Nothing
300
+ // on this element declares the design system itself: its stylesheet applies
301
+ // to the page as it stands.
288
302
  <% if (relay) { -%>
289
303
  return (
290
304
  <% if (intl) { -%>
291
- <html lang={lang} dir={dir} className={initialData.theme}>
305
+ <html
306
+ lang={lang}
307
+ dir={dir}
308
+ className={["app comfortable", initialData.theme]
309
+ .filter(Boolean)
310
+ .join(" ")}
311
+ >
292
312
  <% } else { -%>
293
- <html lang={props.lang} className={initialData.theme}>
313
+ <html
314
+ lang={props.lang}
315
+ className={["app comfortable", initialData.theme]
316
+ .filter(Boolean)
317
+ .join(" ")}
318
+ >
294
319
  <% } -%>
295
320
  <head>
296
321
  {props.otherHeadElements}
297
322
  {props.scriptElements}
298
323
  {props.linkElements}
299
324
  </head>
300
- {/* Surface declaration: context (app) + density (comfortable) — roots the design system's --density-* channel */}
301
- <body className="app comfortable">
325
+ <body>
302
326
  <div id="root">
303
327
  <% if (intl) { -%>
304
328
  <I18nProvider config={i18nConfig} catalogs={catalogs} locale={locale}>
305
- <HeadProvider>
329
+ <HeadProvider titleTemplate={formatDocumentTitle}>
306
330
  <RelayEnvironmentProvider environment={relayEnvironment}>
307
331
  <RouterProvider router={router}>
308
332
  <Outlet fallback={<p>Loading…</p>} />
@@ -311,7 +335,7 @@ export default function EntryServer(props: ServerEntrypointProps<InitialData>) {
311
335
  </HeadProvider>
312
336
  </I18nProvider>
313
337
  <% } else { -%>
314
- <HeadProvider>
338
+ <HeadProvider titleTemplate={formatDocumentTitle}>
315
339
  <RelayEnvironmentProvider environment={relayEnvironment}>
316
340
  <RouterProvider router={router}>
317
341
  <Outlet fallback={<p>Loading…</p>} />
@@ -326,28 +350,38 @@ export default function EntryServer(props: ServerEntrypointProps<InitialData>) {
326
350
  <% } else { -%>
327
351
  return (
328
352
  <% if (intl) { -%>
329
- <html lang={lang} dir={dir} className={initialData.theme}>
353
+ <html
354
+ lang={lang}
355
+ dir={dir}
356
+ className={["app comfortable", initialData.theme]
357
+ .filter(Boolean)
358
+ .join(" ")}
359
+ >
330
360
  <% } else { -%>
331
- <html lang={props.lang} className={initialData.theme}>
361
+ <html
362
+ lang={props.lang}
363
+ className={["app comfortable", initialData.theme]
364
+ .filter(Boolean)
365
+ .join(" ")}
366
+ >
332
367
  <% } -%>
333
368
  <head>
334
369
  {props.otherHeadElements}
335
370
  {props.scriptElements}
336
371
  {props.linkElements}
337
372
  </head>
338
- {/* Surface declaration: context (app) + density (comfortable) — roots the design system's --density-* channel */}
339
- <body className="app comfortable">
373
+ <body>
340
374
  <div id="root">
341
375
  <% if (intl) { -%>
342
376
  <I18nProvider config={i18nConfig} catalogs={catalogs} locale={locale}>
343
- <HeadProvider>
377
+ <HeadProvider titleTemplate={formatDocumentTitle}>
344
378
  <RouterProvider router={router}>
345
379
  <Outlet fallback={<p>Loading…</p>} />
346
380
  </RouterProvider>
347
381
  </HeadProvider>
348
382
  </I18nProvider>
349
383
  <% } else { -%>
350
- <HeadProvider>
384
+ <HeadProvider titleTemplate={formatDocumentTitle}>
351
385
  <RouterProvider router={router}>
352
386
  <Outlet fallback={<p>Loading…</p>} />
353
387
  </RouterProvider>
@@ -1,16 +1,26 @@
1
- .app-shell {
2
- max-width: 1280px;
3
- margin: 0 auto;
4
- padding-inline: var(--grid-gap, 1.5rem);
5
- padding-block: var(--container-gap-loose, 1.5rem);
6
- }
1
+ /* This application's own CSS, in `app`. Left unlayered it would beat every
2
+ * rule the design system ships, because unlayered CSS outranks any layer —
3
+ * by accident rather than by intent. `app` sorts above the design system's
4
+ * own layers only while the entry imports `#styles/index.css`, and with it
5
+ * `@canonical/styles`' order statement, before anything that pulls this file
6
+ * in; that is what canonical/pragma#1122 puts in the generated entry, and
7
+ * this file lands after it. Keep that import first. */
7
8
 
8
- .shell-header {
9
- padding-block-end: var(--container-gap-default, 1rem);
10
- }
9
+ @layer app {
10
+ .app-shell {
11
+ max-width: 1280px;
12
+ margin: 0 auto;
13
+ padding-inline: var(--grid-gap, 1.5rem);
14
+ padding-block: var(--container-gap-loose, 1.5rem);
15
+ }
16
+
17
+ .shell-header {
18
+ padding-block-end: var(--container-gap-default, 1rem);
19
+ }
11
20
 
12
- .shell-header nav {
13
- grid-column: 1 / -1;
14
- display: flex;
15
- gap: var(--container-gap-default, 1rem);
21
+ .shell-header nav {
22
+ grid-column: 1 / -1;
23
+ display: flex;
24
+ gap: var(--container-gap-default, 1rem);
25
+ }
16
26
  }
@@ -1,4 +1,31 @@
1
+ /* The application's one stylesheet, and the order it is built in.
2
+ *
3
+ * Order is the whole point of this file. The cascade sorts by layer, and the
4
+ * layer order is fixed by the first `@layer` statement a browser sees, so
5
+ * whatever arrives first decides how everything after it is arbitrated. That
6
+ * is why this file — not a component, not a route — is the first thing the
7
+ * client entry imports.
8
+ *
9
+ * 1. fonts `@font-face` only. The cascade does not sort font faces, so
10
+ * they can sit ahead of the layer statement; they are a
11
+ * separate import because loading a typeface is a choice an
12
+ * application makes, not something a stylesheet imposes.
13
+ * 2. styles the layer statement, the tokens, the reset, the modifiers.
14
+ * 3. components every component stylesheet the design system ships, in one
15
+ * file, so that every component rule is in this stylesheet
16
+ * from the first paint and no lazily-loaded route can render
17
+ * before its own CSS arrives. It does not decide which of a
18
+ * component's rules and this application's wins a tie: both
19
+ * copies of a component sheet reach the build and the
20
+ * minifier keeps the last, which is the module's — measured,
21
+ * it lands after this file's app.css. The layer wrapper now
22
+ * landing on the component packages is what settles that.
23
+ * 4. app this application's own CSS, last.
24
+ */
25
+
26
+ @import url("@canonical/styles/fonts");
1
27
  @import url("@canonical/styles");
28
+ @import url("@canonical/react-ds-global/index.css");
2
29
  <% if (forms) { -%>
3
30
  @import url("@canonical/react-ds-global-form/dist/esm/index.css");
4
31
  <% } -%>
@@ -112,7 +112,22 @@ describe("server matrix (2×3) serves correctly", () => {
112
112
  expect(asset.headers.get("content-type")).toMatch(JS_CONTENT_TYPE);
113
113
  <% if (!spa) { -%>
114
114
 
115
- // 4. SSR cells render /sitemap.xml as XML from the sitemap renderer —
115
+ // 4. SSR cells carry the page's own title, inside <head>, in the
116
+ // served HTML — the point of @canonical/react-head's <Head>, and
117
+ // the thing that was silently missing before it: head tags were
118
+ // applied in an effect, which never runs on the server. Scoped to
119
+ // <head> deliberately: a title streamed in after a suspended
120
+ // boundary lands in <body>, which is a regression a whole-document
121
+ // match would not see. Exactly one, because the shell carries none
122
+ // for the page's to beat.
123
+ if (cell.ssr) {
124
+ const head = html.slice(0, html.indexOf("</head>"));
125
+
126
+ expect(head.match(/<title>/g)?.length ?? 0).toBe(1);
127
+ expect(head).toContain("<title>Home — <%= name %></title>");
128
+ }
129
+
130
+ // 5. SSR cells render /sitemap.xml as XML from the sitemap renderer —
116
131
  // the second renderer, picked by path, never the HTML app. (The SPA
117
132
  // dev/preview cells have no SSR route, so they are exempt.)
118
133
  if (cell.ssr) {
@@ -127,7 +142,7 @@ describe("server matrix (2×3) serves correctly", () => {
127
142
  <% } -%>
128
143
  <% if (intl) { -%>
129
144
  <% if (!spa) { -%>
130
- // 5. SSR cells negotiate the locale per request (i18n-core:
145
+ // 6. SSR cells negotiate the locale per request (i18n-core:
131
146
  // cookie > Accept-Language > default) and render the translated
132
147
  // document server-side: `<html lang dir>` plus the localized
133
148
  // navigation chrome, before any client JavaScript runs.
@@ -32,6 +32,7 @@
32
32
  ".storybook/*.ts",
33
33
  ".storybook/*.tsx",
34
34
  "vite.config.ts",
35
+ "vite-plugin-ds-icons.ts",
35
36
  "vitest.setup.ts",
36
37
  "vitest.config.ts",
37
38
  "vitest.e2e.config.ts",
@@ -0,0 +1,69 @@
1
+ import { createReadStream, existsSync } from "node:fs";
2
+ import { cp, mkdir } from "node:fs/promises";
3
+ import { dirname, join } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ import type { Plugin, ResolvedConfig } from "vite";
6
+
7
+ /**
8
+ * The design system's icons at `/icons`, in development and in the build.
9
+ *
10
+ * `Icon`, `Spinner`, and every component that renders one resolve
11
+ * `/icons/<name>.svg#<name>` at runtime, from the site root. An unserved
12
+ * icon renders as nothing at all — no error, no broken-image glyph — so the
13
+ * files must be reachable in development and in the assembled app alike.
14
+ * They live in `@canonical/ds-assets`; this plugin serves them from there
15
+ * rather than copying them into the repository, so they can never drift
16
+ * from the installed package version.
17
+ */
18
+ const iconsDir = () =>
19
+ join(
20
+ dirname(
21
+ fileURLToPath(import.meta.resolve("@canonical/ds-assets/package.json")),
22
+ ),
23
+ "icons",
24
+ );
25
+
26
+ /** One directory of SVGs, by exact name: no traversal, no directory listing. */
27
+ const ICON_NAME = /^[a-z0-9-]+\.svg$/;
28
+
29
+ export function dsIcons(): Plugin {
30
+ let config: ResolvedConfig;
31
+
32
+ return {
33
+ name: "design-system-icons-at-root",
34
+ configResolved(resolved) {
35
+ config = resolved;
36
+ },
37
+ configureServer(server) {
38
+ server.middlewares.use("/icons", (request, response, next) => {
39
+ const name = (request.url ?? "").split("?")[0].replace(/^\//, "");
40
+ if (!ICON_NAME.test(name)) {
41
+ next();
42
+ return;
43
+ }
44
+ const file = join(iconsDir(), name);
45
+ if (!existsSync(file)) {
46
+ // A real 404, not the SPA fallback: a missing icon should be
47
+ // visible in the network tab, not silently resolve to HTML.
48
+ response.statusCode = 404;
49
+ response.end();
50
+ return;
51
+ }
52
+ response.setHeader("Content-Type", "image/svg+xml");
53
+ createReadStream(file).pipe(response);
54
+ });
55
+ },
56
+ async writeBundle() {
57
+ // The client build only: `build:server` (the SSR renderers) has no
58
+ // static output to serve from. The dev/preview/production servers all
59
+ // serve the client output directory, so the copy lands where every
60
+ // one of them looks.
61
+ if (config.command !== "build" || config.build.ssr) {
62
+ return;
63
+ }
64
+ const target = join(config.build.outDir, "icons");
65
+ await mkdir(target, { recursive: true });
66
+ await cp(iconsDir(), target, { recursive: true });
67
+ },
68
+ };
69
+ }
@@ -9,6 +9,7 @@ import { defineConfig } from "vite";
9
9
  <% if (relay) { -%>
10
10
  import relay from "vite-plugin-relay-lite";
11
11
  <% } -%>
12
+ import { dsIcons } from "./vite-plugin-ds-icons.js";
12
13
 
13
14
  // Path aliases (#lib, #domains, #styles) are declared as Node subpath imports
14
15
  // in package.json "imports" and resolved natively by Vite — no resolver plugin.
@@ -49,9 +50,17 @@ export default defineConfig(({ mode }) => ({
49
50
  // artifacts are committed and regenerated explicitly via the `relay` /
50
51
  // `relay:watch` scripts.
51
52
  <% } -%>
52
- plugins: [relay({ codegen: false }), react()],
53
+ // dsIcons() serves the @canonical/ds-assets icons at /icons in dev and
54
+ // copies them into the client build output — design-system components
55
+ // fetch glyphs at runtime from `/icons/<name>.svg#<name>`, and an
56
+ // unserved icon renders empty with no error.
57
+ plugins: [dsIcons(), relay({ codegen: false }), react()],
53
58
  <% } else { -%>
54
- plugins: [react()],
59
+ // dsIcons() serves the @canonical/ds-assets icons at /icons in dev and
60
+ // copies them into the client build output — design-system components
61
+ // fetch glyphs at runtime from `/icons/<name>.svg#<name>`, and an
62
+ // unserved icon renders empty with no error.
63
+ plugins: [dsIcons(), react()],
55
64
  <% } -%>
56
65
  <% if (spa) { -%>
57
66
  // Honour the PORT env var for `dev` and `preview` alike.
@@ -22,14 +22,13 @@ const prompts = [
22
22
  ];
23
23
  function buildMainPage(domainName) {
24
24
  const title = toTitleCase(domainName);
25
- return `import { useHead } from "@canonical/react-head";
25
+ return `import { Head } from "@canonical/react-head";
26
26
  import type { ReactElement } from "react";
27
27
 
28
28
  export default function MainPage(): ReactElement {
29
- useHead({ title: "${title}" });
30
-
31
29
  return (
32
30
  <section aria-labelledby="main-title">
31
+ <Head title="${title}" />
33
32
  <h1 id="main-title">${title}</h1>
34
33
  <p>This is the main page for the ${domainName} domain.</p>
35
34
  </section>
@@ -59,7 +58,7 @@ export const generator = {
59
58
  description: "Create a domain folder with routes and a MainPage",
60
59
  version: packageVersion(),
61
60
  help: `Creates a domain directory under src/domains/ with:
62
- - MainPage.tsx — example page component with useHead()
61
+ - MainPage.tsx — example page component with <Head>
63
62
  - routes.ts — route barrel exporting the domain's routes
64
63
 
65
64
  Add more routes with: summon route <domain>/<route-name>`,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAKlC,OAAO,EACL,MAAM,EACN,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,KAAK,EACL,SAAS,EACT,SAAS,GACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAMtD,MAAM,OAAO,GAAuB;IAClC;QACE,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE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AAC,IAAI,CAAC,CAAC;YACpE,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;YACnE,IAAI,CACF,WAAW,IAAI,4EAA4E,CAC5F;SACF,CAAC,CAAC;QAEH,2EAA2E;QAC3E,2EAA2E;QAC3E,sCAAsC;QACtC,OAAO,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,CAC5C,OAAO;YACL,CAAC,CAAC,IAAI,CAAC;gBACH,IAAI,EAAE,eAAe;gBACrB,OAAO,EAAE,WAAW,SAAS,+DAA+D;aAC7F,CAAC;YACJ,CAAC,CAAC,QAAQ,CACb,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -24,14 +24,13 @@ function buildPage(routeName) {
24
24
  const pageName = `${toPascalCase(routeName)}Page`;
25
25
  const title = toTitleCase(routeName);
26
26
  const slugId = toCamelCase(routeName);
27
- return `import { useHead } from "@canonical/react-head";
27
+ return `import { Head } from "@canonical/react-head";
28
28
  import type { ReactElement } from "react";
29
29
 
30
30
  export default function ${pageName}(): ReactElement {
31
- useHead({ title: "${title}" });
32
-
33
31
  return (
34
32
  <section aria-labelledby="${slugId}-title">
33
+ <Head title="${title}" />
35
34
  <h1 id="${slugId}-title">${title}</h1>
36
35
  </section>
37
36
  );
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/route/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAKlC,OAAO,EACL,MAAM,EACN,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,SAAS,EACT,aAAa,EACb,SAAS,GACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM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AAC,uBAAuB,CAqjBlE,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/application/react/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,mBAAmB,EAGpB,MAAM,wBAAwB,CAAC;AAwBhC,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,KAAK,GAAG,KAAK,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B;AA+FD,eAAO,MAAM,SAAS,EAAE,mBAAmB,CAAC,uBAAuB,CAokBlE,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,mBAAmB,EAEpB,MAAM,wBAAwB,CAAC;AAgBhC,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAsDD,eAAO,MAAM,SAAS,EAAE,mBAAmB,CAAC,aAAa,CA+CxD,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,mBAAmB,EAEpB,MAAM,wBAAwB,CAAC;AAgBhC,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAqDD,eAAO,MAAM,SAAS,EAAE,mBAAmB,CAAC,aAAa,CA+CxD,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/route/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,mBAAmB,EAEpB,MAAM,wBAAwB,CAAC;AAgBhC,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAsCD,eAAO,MAAM,SAAS,EAAE,mBAAmB,CAAC,YAAY,CAmGvD,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/route/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,mBAAmB,EAEpB,MAAM,wBAAwB,CAAC;AAgBhC,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAqCD,eAAO,MAAM,SAAS,EAAE,mBAAmB,CAAC,YAAY,CAmGvD,CAAC;AAEF,eAAe,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@canonical/summon-application",
3
3
  "description": "Summon generators for application scaffolding: domain, route, and wrapper",
4
- "version": "0.37.0",
4
+ "version": "0.38.0",
5
5
  "type": "module",
6
6
  "main": "dist/esm/index.js",
7
7
  "module": "dist/esm/index.js",
@@ -36,17 +36,17 @@
36
36
  "test": "vitest run"
37
37
  },
38
38
  "dependencies": {
39
- "@canonical/summon-core": "^0.37.0",
40
- "@canonical/task": "^0.37.0",
41
- "@canonical/utils": "^0.37.0",
39
+ "@canonical/summon-core": "^0.38.0",
40
+ "@canonical/task": "^0.38.0",
41
+ "@canonical/utils": "^0.38.0",
42
42
  "typescript": "^5.9.3"
43
43
  },
44
44
  "devDependencies": {
45
- "@biomejs/biome": "2.4.9",
46
- "@canonical/biome-config": "^0.37.0",
47
- "@canonical/webarchitect": "^0.37.0",
45
+ "@biomejs/biome": "2.5.13",
46
+ "@canonical/biome-config": "^0.38.0",
47
+ "@canonical/webarchitect": "^0.38.0",
48
48
  "@types/node": "^26.0.0",
49
49
  "vitest": "^4.0.18"
50
50
  },
51
- "gitHead": "ac8383bdb4be1bcd6fa6c4960a1e3d78c0279688"
51
+ "gitHead": "4d10a68a9b299af6fe3d1d7d053e54ca128944ad"
52
52
  }