@atelic-action/ui 4.1.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @atelic-action/ui
2
2
 
3
- Shared UI for the Atelic templates: the site chrome (header, menu, footer, sticky CTA bar, and credit band), the not found page and the routing that keeps it alive, the scroll spy hook, and the one base stylesheet. The marketing and artifact templates install it instead of carrying their own copies, so a chrome fix lands once and every site picks it up with `bun update @atelic-action/ui --latest`.
3
+ Shared UI for the Atelic templates: the site chrome (header, menu, footer, sticky CTA bar, and closing bar), the not found page and the routing that keeps it alive, the scroll spy hook, and the one base stylesheet. The marketing and artifact templates install it instead of carrying their own copies, so a chrome fix lands once and every site picks it up with `bun update @atelic-action/ui --latest`.
4
4
 
5
5
  The package ships source, not a build. Its TSX and CSS arrive as written and compile inside each site's own Vite. The one exception is the access gate's server side, which ships compiled (see [The Access Gate](#the-access-gate)).
6
6
 
@@ -12,8 +12,8 @@ Every export, grouped by the entry it is imported from. The gallery column links
12
12
  |---|---|---|---|
13
13
  | `SiteHeader` | `@atelic-action/ui/chrome` | The fixed bar: the lockup, the nav or a page's own stops, the call to action, the burger; transparent, solid, or dark | [#site-header](https://ui.atelic.me/#site-header) |
14
14
  | `SiteMenu` | `@atelic-action/ui/chrome` | The phone's full screen menu, on a native modal dialog | [#site-menu](https://ui.atelic.me/#site-menu) |
15
- | `Footer` | `@atelic-action/ui/chrome` | The site's foot: brand column, nav, address, hours, copyright, credit band | [#footer](https://ui.atelic.me/#footer) |
16
- | `CreditBar` | `@atelic-action/ui/chrome` | The developer credit band | [#credit-bar](https://ui.atelic.me/#credit-bar) |
15
+ | `Footer` | `@atelic-action/ui/chrome` | The site's foot: brand column, nav, address, hours, legal links, closing bar | [#footer](https://ui.atelic.me/#footer) |
16
+ | `ClosingBar` | `@atelic-action/ui/chrome` | The line that closes every page: the copyright with the business's name, and the made with note crediting the practice | [#closing-bar](https://ui.atelic.me/#closing-bar) |
17
17
  | `StickyCTABar` | `@atelic-action/ui/chrome` | The phone's bottom bar: the call to action and a call shortcut, there from the top on an interior page (`fromTop`) and sliding in after a scroll on a hero page | [#sticky-cta-bar](https://ui.atelic.me/#sticky-cta-bar) |
18
18
  | `BrandLockup` | `@atelic-action/ui/chrome` | The header's identity as one link, with the recipient's mark on a sent document | [#brand-lockup](https://ui.atelic.me/#brand-lockup) |
19
19
  | `SkipLink` | `@atelic-action/ui/chrome` | The keyboard user's jump past the chrome | [#skip-link](https://ui.atelic.me/#skip-link) |
@@ -42,7 +42,7 @@ Every export, grouped by the entry it is imported from. The gallery column links
42
42
  | `SignOff`, `WriteupPerson` | `@atelic-action/ui/artifact` | The close a document ends on, and the person it names | [#sign-off](https://ui.atelic.me/#sign-off) |
43
43
  | `Shot`, `WriteupShot` | `@atelic-action/ui/artifact` | The owner's own screen, opening the full picture, over its caption; a portrait crop is marked `data-portrait` and held to 200px (1.8in in print) | [#shot](https://ui.atelic.me/#shot) |
44
44
  | `Paragraph`, `Runs`, `ArtifactAnchor`, `isEmpty`, `ArtifactLink`, `ArtifactParagraph` | `@atelic-action/ui/artifact` | Plain data text a routine can write as JSON: a paragraph, its runs alone, one link, the empty test, and the two types | [#paragraph](https://ui.atelic.me/#paragraph) |
45
- | `ArtifactShell` | `@atelic-action/ui/artifact` | The chrome around a document page: skip link, dark header, credit band, watermark | [#site-header](https://ui.atelic.me/#site-header) (its dark bar) |
45
+ | `ArtifactShell` | `@atelic-action/ui/artifact` | The chrome around a document page: skip link, dark header, closing bar, watermark | [#site-header](https://ui.atelic.me/#site-header) (its dark bar) |
46
46
  | `AppErrorBoundary`, `ErrorFallback` | `@atelic-action/ui/artifact` | The error boundary and the page it falls back to | none |
47
47
  | `buildPageHead`, `canonicalURL`, `newTabProps`, the `ArtifactConfig` types | `@atelic-action/ui/artifact` | A page's head, a link's new tab props, and a site's contract | none |
48
48
  | `whoIsReading` | `@atelic-action/ui/artifact` and `@atelic-action/ui/artifact/readers` | Who opened a document, by the email they signed in with; the second entry is the same function, built, for what Node runs | none |
@@ -344,7 +344,7 @@ The two pieces a reader sees are ordinary components, in `@atelic-action/ui/comp
344
344
  `@atelic-action/ui/artifact` is the pieces an artifact document is built from and the site around it, so a fix to a piece reaches every business's documents with one version bump. The composed documents themselves (`Writeup`, `Read`, `Report`, `Note`, and the sealed `Gate`, with their content types and their stylesheet) live in [`@atelic-action/artifact`](https://github.com/atelic-action/artifact) since 2.0.0, which depends on this package for everything below:
345
345
 
346
346
  - **The pieces:** `GradeChip` and `gradeLabel` with the `WriteupGrade` type, `SignOff` with the `WriteupPerson` type, `Shot` with the `WriteupShot` type (a crop taller than it is wide is measured in the browser, marked `data-portrait`, and held to 200px wide on screen and 1.8in in print; a layout that sizes its shots itself sets `--op-shot-portrait-max: none` to opt out, on screen and in print alike), and the plain data text (`Paragraph`, `Runs`, `ArtifactAnchor`, and `isEmpty`, with the `ArtifactLink` and `ArtifactParagraph` types: a paragraph is a string or runs of text and `{ text, href }` links, so a routine can write a document as JSON).
347
- - **The shell:** `ArtifactShell`, the `.atelic-ui` scope with the skip link, the dark header, the credit band, and the watermark around a page.
347
+ - **The shell:** `ArtifactShell`, the `.atelic-ui` scope with the skip link, the dark header, the closing bar, and the watermark around a page.
348
348
  - **The contract and the head:** the `ArtifactConfig` types, and `buildPageHead` and `canonicalURL` with their `PageMeta` type.
349
349
  - **Who opened it:** `whoIsReading`, the email a reader signed in with at the wall, by the form or by the sign in a send carried, and nobody on the sender's own domain. It is also built and exported alone as `@atelic-action/ui/artifact/readers`, because a Playwright spec runs under Node, which compiles nothing inside `node_modules`.
350
350
  - **The error boundary:** `AppErrorBoundary` and its `ErrorFallback`.
@@ -464,7 +464,7 @@ The provider stays in the source entry on purpose. A built copy of it would be a
464
464
 
465
465
  ### SiteShell
466
466
 
467
- `SiteShell` (in `@atelic-action/ui/chrome`) is the page wrapper: the `.atelic-ui` scope around the skip link, the header, `<main>`, the sticky CTA bar, the footer with its credit band, and the watermark, all mapped from the `SiteConfig`. It takes `site`, `currentPath` (the package imports no router), `basePath`, and `nav` (defaults to `site.nav`), plus `heroNav`, `stickyCTA`, `footer`, `pageNav`, `navOnDark`, `hideNavCTA`, and `credit` as before. A site keeps a wrapper a few lines long:
467
+ `SiteShell` (in `@atelic-action/ui/chrome`) is the page wrapper: the `.atelic-ui` scope around the skip link, the header, `<main>`, the sticky CTA bar, the footer with its closing bar, and the watermark, all mapped from the `SiteConfig`. It takes `site`, `currentPath` (the package imports no router), `basePath`, and `nav` (defaults to `site.nav`), plus `heroNav`, `stickyCTA`, `footer`, `pageNav`, `navOnDark`, `hideNavCTA`, and `credit` (the practice's credit after the closing bar's note; the copyright prints either way). 5.0.0 renames `CreditBar` to `ClosingBar` with no alias, replaces `.credit-bar` and `.footer-bottom` with `.closing-bar`, and `footer.note` now prints at the far right of the closing bar, followed by " by Atelic" while `credit` is on. A site keeps a wrapper a few lines long:
468
468
 
469
469
  ```tsx
470
470
  import { SiteShell as Shell, type SiteShellProps } from "@atelic-action/ui/chrome";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atelic-action/ui",
3
- "version": "4.1.0",
3
+ "version": "5.0.0",
4
4
  "description": "Shared UI for the Atelic templates: site chrome, base styles, the component library, the access gate, and the app shell they install",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
- import { CreditBar } from "../chrome/CreditBar";
2
+ import { ClosingBar } from "../chrome/ClosingBar";
3
3
  import { SiteHeader } from "../chrome/SiteHeader";
4
4
  import { SkipLink } from "../chrome/SkipLink";
5
5
  import { Watermark } from "../components/Watermark";
@@ -20,11 +20,11 @@ export interface ArtifactShellProps {
20
20
 
21
21
  /**
22
22
  * The wrapper every artifact page uses: the `.atelic-ui` theming
23
- * scope, the skip link, the header, the credit band, and the access gate's
23
+ * scope, the skip link, the header, the closing bar, and the access gate's
24
24
  * watermark, composed from the chrome. The header is always the dark
25
25
  * variant with the sender's lockup and never a site nav or a CTA, because the
26
26
  * document's own close is the ask. There is no footer and no sticky bar by
27
- * design: a document ends on its own sign off, and the credit band is the
27
+ * design: a document ends on its own sign off, and the closing bar is the
28
28
  * one line allowed after it.
29
29
  */
30
30
  export function ArtifactShell({ site, currentPath, stops, children }: ArtifactShellProps) {
@@ -43,7 +43,7 @@ export function ArtifactShell({ site, currentPath, stops, children }: ArtifactSh
43
43
  stops={stops}
44
44
  />
45
45
  <main id="main">{children}</main>
46
- <CreditBar />
46
+ <ClosingBar />
47
47
  <Watermark />
48
48
  </div>
49
49
  );
@@ -0,0 +1,59 @@
1
+ import { newTabProps } from "../lib/newTabProps";
2
+
3
+ /**
4
+ * The line that closes every page: the copyright with the business's name on
5
+ * the left and the made with note on the far right, crediting the practice
6
+ * in one link. Footer renders it at its foot, and a page with no footer,
7
+ * like a sent document, renders it on its own; given no name it is the note
8
+ * alone, centered.
9
+ *
10
+ * The heart ships as an escape sequence: the no emoji test bars literal
11
+ * pictographs from `src/`.
12
+ */
13
+ const DEFAULT_NOTE = "Made with \u{1F49A} in Denver, CO";
14
+
15
+ export interface ClosingBarProps {
16
+ /** The business's name, printed in the copyright. Omit it on a page that names no business. */
17
+ name?: string;
18
+ /** Suffix on the copyright, e.g. "Dr. Alex Rivers, PT, DPT". */
19
+ attribution?: string;
20
+ /** The made with note at the far right. Defaults to the practice's own line. */
21
+ note?: string;
22
+ /**
23
+ * Credit the practice after the note. Defaults on (client sites carry it);
24
+ * the practice's own site turns it off, since crediting yourself on your
25
+ * own page reads as noise.
26
+ */
27
+ credit?: boolean;
28
+ }
29
+
30
+ export function ClosingBar({
31
+ name,
32
+ attribution,
33
+ note = DEFAULT_NOTE,
34
+ credit = true,
35
+ }: ClosingBarProps) {
36
+ return (
37
+ <div className={name ? "closing-bar" : "closing-bar is-solo"}>
38
+ <div className="wrap closing-bar-line">
39
+ {name && (
40
+ <span>
41
+ © {new Date().getFullYear()} {name}
42
+ {attribution ? ` · ${attribution}` : ""}
43
+ </span>
44
+ )}
45
+ <span className="closing-bar-note">
46
+ {note}
47
+ {credit && (
48
+ <>
49
+ {" by "}
50
+ <a href="https://atelic.me" {...newTabProps("https://atelic.me", true)}>
51
+ Atelic
52
+ </a>
53
+ </>
54
+ )}
55
+ </span>
56
+ </div>
57
+ </div>
58
+ );
59
+ }
@@ -10,7 +10,7 @@ import type {
10
10
  SiteLink,
11
11
  SocialLink,
12
12
  } from "../types";
13
- import { CreditBar } from "./CreditBar";
13
+ import { ClosingBar } from "./ClosingBar";
14
14
 
15
15
  /*
16
16
  * lucide-react ships no brand marks (removed upstream by policy), and a code
@@ -106,14 +106,14 @@ export interface FooterProps {
106
106
  hours?: HoursRow[];
107
107
  /** Suffix on the copyright line, e.g. "Dr. Alex Rivers, PT, DPT". */
108
108
  attribution?: string;
109
- /** A short closing note beside the copyright line. */
109
+ /** The closing bar's made with note. Defaults to the practice's own line. */
110
110
  note?: string;
111
111
  legalLinks?: SiteLink[];
112
- /** The developer credit band at the foot. Defaults on. */
112
+ /** Credit the practice in the closing bar. Defaults on. */
113
113
  credit?: boolean;
114
114
  }
115
115
 
116
- /** The site footer: brand blurb, explore nav, NAP block, hours, and the credit band. */
116
+ /** The site footer: brand blurb, explore nav, NAP block, hours, legal links, and the closing bar. */
117
117
  export function Footer({
118
118
  brand,
119
119
  blurb,
@@ -221,23 +221,16 @@ export function Footer({
221
221
  </div>
222
222
  )}
223
223
  </div>
224
- <div className="footer-bottom">
225
- <span>
226
- © {new Date().getFullYear()} {name}
227
- {attribution ? ` · ${attribution}` : ""}
228
- </span>
229
- {note && <span>{note}</span>}
230
- {legalLinks && legalLinks.length > 0 && (
231
- <span className="footer-legal">
232
- {legalLinks.map((link) => (
233
- <FooterLink key={link.href} link={link} />
234
- ))}
235
- </span>
236
- )}
237
- </div>
224
+ {legalLinks && legalLinks.length > 0 && (
225
+ <div className="footer-legal">
226
+ {legalLinks.map((link) => (
227
+ <FooterLink key={link.href} link={link} />
228
+ ))}
229
+ </div>
230
+ )}
238
231
  </div>
239
232
  </footer>
240
- {credit && <CreditBar />}
233
+ <ClosingBar name={name} attribution={attribution} note={note} credit={credit} />
241
234
  </>
242
235
  );
243
236
  }
@@ -5,7 +5,7 @@ import { formatHoursRange } from "../lib/hours";
5
5
  import { BasePathProvider } from "../routing/BasePathProvider";
6
6
  import { joinBase, normalizeBasePath, stripBase } from "../routing/basePath";
7
7
  import type { NavItem, SiteConfig } from "../sections/siteConfig";
8
- import { CreditBar } from "./CreditBar";
8
+ import { ClosingBar } from "./ClosingBar";
9
9
  import { Footer } from "./Footer";
10
10
  import { SiteHeader, type SiteHeaderVariant } from "./SiteHeader";
11
11
  import { SkipLink } from "./SkipLink";
@@ -50,9 +50,9 @@ export interface SiteShellProps {
50
50
  /** Hide the header's primary CTA (e.g. a reveal, where the ask is the letter). The menu keeps it. */
51
51
  hideNavCTA?: boolean;
52
52
  /**
53
- * The developer credit band. Defaults on (client sites carry it); the
54
- * practice's own site turns it off, since crediting yourself on your
55
- * own page reads as noise.
53
+ * The practice's credit in the closing bar. Defaults on (client sites
54
+ * carry it); the practice's own site turns it off, since crediting
55
+ * yourself on your own page reads as noise. The copyright prints either way.
56
56
  */
57
57
  credit?: boolean;
58
58
  children: ReactNode;
@@ -60,7 +60,7 @@ export interface SiteShellProps {
60
60
 
61
61
  /**
62
62
  * The marketing page wrapper: the `.atelic-ui` scope around the skip link,
63
- * the header, `<main>`, the sticky CTA bar, the footer with its credit band,
63
+ * the header, `<main>`, the sticky CTA bar, the footer with its closing bar,
64
64
  * and the watermark, all mapped from the site's config. Moved here from
65
65
  * template-marketing in 0.19.0 (ATE-643); a site keeps a wrapper a few lines
66
66
  * long that reads the path from its router and passes it in.
@@ -140,7 +140,12 @@ export function SiteShell({
140
140
  credit={credit}
141
141
  />
142
142
  ) : (
143
- credit && <CreditBar />
143
+ <ClosingBar
144
+ name={brand.name}
145
+ attribution={site.attribution}
146
+ note={site.footer?.note}
147
+ credit={credit}
148
+ />
144
149
  )}
145
150
  <Watermark />
146
151
  </div>
@@ -13,7 +13,7 @@ export type {
13
13
  SocialLink,
14
14
  } from "../types";
15
15
  export { BrandLockup, type BrandLockupProps } from "./BrandLockup";
16
- export { CreditBar } from "./CreditBar";
16
+ export { ClosingBar, type ClosingBarProps } from "./ClosingBar";
17
17
  export { Footer, type FooterProps } from "./Footer";
18
18
  export { SiteHeader, type SiteHeaderProps, type SiteHeaderVariant } from "./SiteHeader";
19
19
  export { SiteMenu, type SiteMenuProps } from "./SiteMenu";
@@ -167,8 +167,8 @@ export interface SiteConfig {
167
167
  attribution?: string;
168
168
  /**
169
169
  * Footer wording overrides: the heading over the address column (defaults
170
- * to "Visit", which reads wrong for a practice with no storefront) and a
171
- * short closing note beside the copyright line ("Made with love in ...").
170
+ * to "Visit", which reads wrong for a practice with no storefront) and the
171
+ * closing bar's made with note, which defaults to the practice's own line.
172
172
  */
173
173
  footer?: {
174
174
  contactHeading?: string;
@@ -130,11 +130,11 @@
130
130
  }
131
131
 
132
132
  /* ---- print: the shell's chrome steps aside on every artifact page ----
133
- ArtifactShell's header, credit band, and skip link belong to the screen;
133
+ ArtifactShell's header, closing bar, and skip link belong to the screen;
134
134
  a printed document is the page alone. */
135
135
  @media print {
136
136
  .atelic-ui .nav,
137
- .atelic-ui .credit-bar,
137
+ .atelic-ui .closing-bar,
138
138
  .atelic-ui .skip-link {
139
139
  display: none;
140
140
  }
@@ -1,6 +1,6 @@
1
1
  /* =================================================================
2
2
  @atelic-action/ui CHROME: the skip link, the brand lockup, the
3
- header, the menu, the sticky CTA bar, the footer, and the credit
3
+ header, the menu, the sticky CTA bar, the footer, and the closing
4
4
  band. Tokens are read here and never defined. Everything sits in
5
5
  the atelic-ui layer, so any rule a site writes outside a layer wins.
6
6
  The chrome's buttons wear the site's own .btn classes.
@@ -432,26 +432,17 @@
432
432
  color: var(--primary-bright);
433
433
  border-color: var(--primary-bright);
434
434
  }
435
- .atelic-ui .footer-bottom {
435
+ .atelic-ui .footer-legal {
436
436
  margin-top: 48px;
437
- padding-top: 24px;
438
- border-top: 1px solid rgba(255, 255, 255, 0.1);
439
437
  display: flex;
438
+ gap: 20px;
440
439
  flex-wrap: wrap;
441
- gap: 12px 28px;
442
- justify-content: space-between;
443
- align-items: center;
440
+ justify-content: flex-end;
444
441
  font-size: 0.82rem;
445
- color: var(--neutral-500);
446
442
  }
447
- .atelic-ui .footer .footer-bottom a {
443
+ .atelic-ui .footer .footer-legal a {
448
444
  color: var(--neutral-300);
449
445
  }
450
- .atelic-ui .footer-legal {
451
- display: flex;
452
- gap: 20px;
453
- flex-wrap: wrap;
454
- }
455
446
  @media (min-width: 760px) {
456
447
  .atelic-ui .footer-grid {
457
448
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
@@ -467,27 +458,42 @@
467
458
  margin-bottom: 18px;
468
459
  }
469
460
 
470
- /* ---- Credit band ---- */
461
+ /* ---- Closing bar ---- */
471
462
  /* The developer credit below the footer: its own full width band, centered,
472
463
  small, and muted. Purely token themed (the hairline and hover lift derive
473
464
  from --surface through color-mix), so it rebrands with theme.css on any
474
465
  page it renders under, light or dark. */
475
- .atelic-ui .credit-bar {
466
+ .atelic-ui .closing-bar {
476
467
  background: var(--surface-dark);
477
468
  border-top: 1px solid color-mix(in srgb, var(--surface) 10%, transparent);
478
469
  color: var(--neutral-500);
479
- font-size: 0.78rem;
470
+ font-size: 0.82rem;
471
+ padding-block: 18px;
472
+ }
473
+ .atelic-ui .closing-bar-line {
474
+ display: flex;
475
+ flex-wrap: wrap;
476
+ gap: 6px 28px;
477
+ align-items: center;
478
+ justify-content: space-between;
479
+ }
480
+ .atelic-ui .closing-bar-note {
481
+ margin-left: auto;
482
+ }
483
+ .atelic-ui .closing-bar.is-solo .closing-bar-line {
484
+ justify-content: center;
480
485
  text-align: center;
481
- text-wrap: balance;
482
- padding: 16px 20px;
483
486
  }
484
- /* biome-ignore lint/style/noDescendingSpecificity: scoped to .credit-bar, so it never meets the footer's link rules */
485
- .atelic-ui .credit-bar a {
487
+ .atelic-ui .closing-bar.is-solo .closing-bar-note {
488
+ margin-left: 0;
489
+ }
490
+ /* biome-ignore lint/style/noDescendingSpecificity: scoped to .closing-bar, so it never meets the footer's link rules */
491
+ .atelic-ui .closing-bar a {
486
492
  color: var(--neutral-300);
487
493
  font-weight: 500;
488
494
  }
489
- /* biome-ignore lint/style/noDescendingSpecificity: scoped to .credit-bar, so it never meets the header's link rules */
490
- .atelic-ui .credit-bar a:hover {
495
+ /* biome-ignore lint/style/noDescendingSpecificity: scoped to .closing-bar, so it never meets the header's link rules */
496
+ .atelic-ui .closing-bar a:hover {
491
497
  color: color-mix(in srgb, var(--surface) 96%, white);
492
498
  }
493
499
  }
@@ -1,18 +0,0 @@
1
- /**
2
- * The standardized developer credit: a full width band, visually separate
3
- * from anything above it, centered and muted. Footer renders it at its foot,
4
- * and a page that drops the footer renders it on its own.
5
- *
6
- * The heart ships as an escape sequence: the no emoji test bars literal
7
- * pictographs from `src/`.
8
- */
9
- export function CreditBar() {
10
- return (
11
- <div className="credit-bar">
12
- Developed with {"\u{1F49A}"} in Denver by{" "}
13
- <a href="https://atelic.me" target="_blank" rel="noopener">
14
- Atelic
15
- </a>
16
- </div>
17
- );
18
- }