@atelic-action/ui 8.1.0 → 8.3.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 (45) hide show
  1. package/README.md +117 -34
  2. package/dist/monitoring/server.d.ts +58 -1
  3. package/dist/monitoring/server.js +129 -1
  4. package/package.json +1 -1
  5. package/src/chrome/BrandLockup.tsx +12 -3
  6. package/src/chrome/ContactDock.tsx +16 -2
  7. package/src/chrome/Footer.tsx +50 -12
  8. package/src/chrome/NavMegaPanel.tsx +6 -12
  9. package/src/chrome/SiteHeader.tsx +39 -17
  10. package/src/chrome/SiteMenu.tsx +211 -76
  11. package/src/chrome/SiteShell.tsx +9 -2
  12. package/src/chrome/StickyCTABar.tsx +48 -20
  13. package/src/chrome/index.ts +3 -0
  14. package/src/components/DataTable.tsx +1 -1
  15. package/src/components/ReportCard.tsx +3 -3
  16. package/src/lib/hours.ts +9 -2
  17. package/src/lib/phoneText.tsx +9 -0
  18. package/src/monitoring/ErrorCatcherScript.tsx +17 -6
  19. package/src/monitoring/index.ts +1 -1
  20. package/src/monitoring/server.ts +158 -1
  21. package/src/primitives/Button.tsx +2 -2
  22. package/src/routing/index.ts +10 -32
  23. package/src/routing/miss.ts +14 -3
  24. package/src/routing/routerErrors.tsx +57 -0
  25. package/src/routing/staticNotFound.tsx +77 -0
  26. package/src/scripts/check-sentry.ts +22 -1
  27. package/src/sections/CalloutPanel.tsx +4 -1
  28. package/src/sections/ContactInfoCard.tsx +9 -2
  29. package/src/sections/FeatureGrid.tsx +31 -7
  30. package/src/sections/Hero.tsx +2 -2
  31. package/src/sections/HoursTable.tsx +5 -3
  32. package/src/sections/LocationSection.tsx +2 -2
  33. package/src/sections/LogoMarquee.tsx +1 -1
  34. package/src/sections/PricingBand.tsx +1 -1
  35. package/src/sections/ProcessSteps.tsx +1 -1
  36. package/src/sections/ReviewWall.tsx +2 -2
  37. package/src/sections/index.ts +1 -0
  38. package/src/sections/siteConfig.ts +57 -0
  39. package/src/styles/base.css +34 -17
  40. package/src/styles/chrome.css +358 -42
  41. package/src/styles/components.css +0 -22
  42. package/src/styles/defaults.css +90 -3
  43. package/src/styles/primitives.css +9 -3
  44. package/src/styles/sections.css +46 -26
  45. package/src/types.ts +38 -1
@@ -38,7 +38,7 @@ export function LogoMarquee({
38
38
  </div>
39
39
  );
40
40
  return (
41
- <section className="creds" aria-label={ariaLabel}>
41
+ <section className="creds" data-ground="dark" aria-label={ariaLabel}>
42
42
  <div className="marquee" data-paused={paused || undefined}>
43
43
  <div className="marquee-track">
44
44
  {row(false)}
@@ -21,7 +21,7 @@ export interface PricingBandProps {
21
21
  export function PricingBand({ eyebrow, title, lead, price, unit, detail }: PricingBandProps) {
22
22
  const withBase = useWithBase();
23
23
  return (
24
- <section className="price-band">
24
+ <section className="price-band" data-ground="primary">
25
25
  <div className="wrap price-inner">
26
26
  <div>
27
27
  {eyebrow && <Eyebrow onDark>{eyebrow}</Eyebrow>}
@@ -36,7 +36,7 @@ export function ProcessSteps({
36
36
  }: ProcessStepsProps) {
37
37
  const Title = `h${headingLevel}` as const;
38
38
  return (
39
- <section className="section process" id={id}>
39
+ <section className="section process" data-ground="dark" id={id}>
40
40
  <div className="wrap process-grid">
41
41
  <div>
42
42
  {eyebrow && <Eyebrow onDark>{eyebrow}</Eyebrow>}
@@ -184,7 +184,7 @@ export function ReviewWall({
184
184
  <div className="rw-controls">
185
185
  {showFilter && (
186
186
  <label className="rw-select">
187
- <span className="rw-select-label">Filter reviews by tag</span>
187
+ <span className="rw-select-label visually-hidden">Filter reviews by tag</span>
188
188
  <select value={tag} onChange={(event) => setTag(event.target.value)}>
189
189
  <option value="">{allTagsLabel}</option>
190
190
  {tags.map((option) => (
@@ -197,7 +197,7 @@ export function ReviewWall({
197
197
  )}
198
198
  {showSort && (
199
199
  <label className="rw-select rw-select-end">
200
- <span className="rw-select-label">Sort reviews by date</span>
200
+ <span className="rw-select-label visually-hidden">Sort reviews by date</span>
201
201
  <select
202
202
  value={order}
203
203
  onChange={(event) => setOrder(event.target.value as "newest" | "oldest")}
@@ -77,6 +77,7 @@ export type {
77
77
  Density,
78
78
  Founder,
79
79
  GateConfig,
80
+ Meridiem,
80
81
  NavItem,
81
82
  OpeningHours,
82
83
  SiteConfig,
@@ -11,10 +11,13 @@
11
11
  import type {
12
12
  ContactDockConfig,
13
13
  FooterColumn,
14
+ FooterHoursPlacement,
14
15
  HeaderPhone,
16
+ MenuBurgerStyle,
15
17
  NavFeature,
16
18
  NavPanelSection,
17
19
  SiteLink,
20
+ SiteMenuSurface,
18
21
  SocialLink,
19
22
  } from "../types";
20
23
 
@@ -68,11 +71,31 @@ export interface CTA {
68
71
  * Defaults to `label`.
69
72
  */
70
73
  stickyLabel?: string;
74
+ /**
75
+ * Whether the phone's sticky bar shows from the first paint. Defaults to
76
+ * true on a page without a hero under the bar (`heroNav` off) and false on
77
+ * one with, where it slides in once the page scrolls; a page with a hero
78
+ * under a solid bar sets false to slide it in there too.
79
+ */
80
+ stickyFromTop?: boolean;
81
+ /**
82
+ * The phone menu's own words, when they should differ from `label` (a
83
+ * fuller "Order ahead for Saturday" where the bar says "Order
84
+ * ahead"). Defaults to `label`.
85
+ */
86
+ menuLabel?: string;
71
87
  }
72
88
 
73
89
  /** How opening hours print: "12h" reads "9a to 5p", "24h" reads "09:00 to 17:00". */
74
90
  export type Clock = "12h" | "24h";
75
91
 
92
+ /**
93
+ * How the 12 hour clock marks morning and afternoon: "letter" (the default)
94
+ * reads "9a" and "9:30a", "word" reads "9 am" and "9:30 am". The 24 hour
95
+ * clock marks neither.
96
+ */
97
+ export type Meridiem = "letter" | "word";
98
+
76
99
  export interface OpeningHours {
77
100
  /** Row label as displayed, e.g. "Monday" or "Friday to Sunday". */
78
101
  label: string;
@@ -207,6 +230,11 @@ export interface SiteConfig {
207
230
  * `opens` and `closes` are already 24 hour.
208
231
  */
209
232
  clock?: Clock;
233
+ /**
234
+ * How the 12 hour clock marks the time of day, wherever hours print:
235
+ * "letter" (the default) reads "9a to 5p", "word" reads "9 am to 5 pm".
236
+ */
237
+ meridiem?: Meridiem;
210
238
  /** Neighborhoods or cities served; feeds local SEO copy and structured data. */
211
239
  serviceAreas: string[];
212
240
  priceRange?: string;
@@ -260,6 +288,18 @@ export interface SiteConfig {
260
288
  * to true: a site whose config holds hours shows them in its footer.
261
289
  */
262
290
  showHours?: boolean;
291
+ /**
292
+ * Where the footer's hours sit: "column" (the default), a column of
293
+ * their own beside the link columns, or "brand", a compact list inside
294
+ * the brand column under the address, the phone, and the email.
295
+ */
296
+ hoursPlacement?: FooterHoursPlacement;
297
+ /**
298
+ * Whether the footer's hours drop a whole hour's minutes ("8a to 5p").
299
+ * Defaults to true; false prints them as the hours table does
300
+ * ("8:00a to 5:00p", or "8:00 am to 5:00 pm" with `meridiem: "word"`).
301
+ */
302
+ hoursShort?: boolean;
263
303
  };
264
304
  ogImage?: string;
265
305
  /** Profile URLs for the schema.org sameAs entity graph (socials, listings). */
@@ -303,6 +343,23 @@ export interface SiteConfig {
303
343
  * name the button. Absent, the burger stands alone as it always has.
304
344
  */
305
345
  menuLabel?: string;
346
+ /** The phone menu (the sheet the burger opens). */
347
+ menu?: {
348
+ /**
349
+ * The sheet's look: `dark` (the default) is the full screen sheet on
350
+ * the dark surface; `light` is the page's ground with the lockup and a
351
+ * round close button across the top, the entries as rows, and the
352
+ * call to action and the header's numbers in a foot on the alternate
353
+ * ground.
354
+ */
355
+ surface?: SiteMenuSurface;
356
+ /**
357
+ * How the burger is drawn: `labelAfter` sets the lines before the
358
+ * words beside it (`menuLabel`), `outlined` sets it in an outlined
359
+ * pill. Both off by default.
360
+ */
361
+ burger?: MenuBurgerStyle;
362
+ };
306
363
  /** What the header shows beyond the nav and the CTA. */
307
364
  header?: {
308
365
  /** Up to two numbers in the bar, each a tel link; the first is the phone's call button. */
@@ -8,6 +8,16 @@
8
8
  them. Everything sits in the atelic-ui layer, so any rule a site
9
9
  writes outside a layer wins without a specificity fight.
10
10
  ================================================================= */
11
+ /* The h4's tracking, two thirds of --subheading-tracking, computed on the
12
+ h4 itself. Registered as a length so a value that is not one (a theme's
13
+ --subheading-tracking: normal, which no arithmetic takes) falls to 0px,
14
+ flat as normal is, where an unregistered property left the h4 to inherit
15
+ whatever tracking its parent had. A registration sits outside any layer. */
16
+ @property --_h4-tracking {
17
+ syntax: "<length>";
18
+ inherits: false;
19
+ initial-value: 0px;
20
+ }
11
21
  @layer atelic-ui {
12
22
  /* ---- Resets ---- */
13
23
  *,
@@ -118,24 +128,33 @@
118
128
  a dark section heading's). */
119
129
  .atelic-ui h1,
120
130
  .atelic-ui h2 {
121
- text-transform: var(--heading-transform, none);
131
+ text-transform: var(--heading-transform);
122
132
  font-weight: var(--heading-weight, var(--weight-heavy));
123
- letter-spacing: var(--heading-tracking, -0.02em);
124
- color: var(--heading-color, inherit);
125
- }
126
- .atelic-ui
127
- :is(
128
- .on-primary,
129
- .on-dark,
130
- .hero,
131
- .creds,
132
- .callout-panel,
133
- .price-band,
134
- .process,
135
- .contact-info-card
136
- ) {
133
+ letter-spacing: var(--heading-tracking);
134
+ color: var(--heading-color);
135
+ }
136
+ /* A ground that is dark or the primary fill says so with data-ground
137
+ ("dark" or "primary"), which every such section the package draws
138
+ wears (the heroes, the credentials band, the callout panel, the price
139
+ band, the process band, the contact card), and a site's own dark band
140
+ may wear too; .on-primary and .on-dark say the same. Headings there
141
+ keep the ground's own words. A new section needs only the attribute.
142
+ The second list is those sections' classes, as 8.1.0 matched them, so
143
+ markup carrying a class without the attribute behaves as it did. */
144
+ .atelic-ui :is([data-ground="dark"], [data-ground="primary"], .on-primary, .on-dark),
145
+ .atelic-ui :is(.hero, .creds, .callout-panel, .price-band, .process, .contact-info-card) {
137
146
  --heading-color: currentColor;
138
147
  }
148
+ /* The smaller headings take the brand's tracking the same way: h3 at
149
+ --subheading-tracking, h4 at two thirds of it, the proportion they
150
+ always had (-0.015em and -0.01em). */
151
+ .atelic-ui h3 {
152
+ letter-spacing: var(--subheading-tracking);
153
+ }
154
+ .atelic-ui h4 {
155
+ --_h4-tracking: calc(var(--subheading-tracking) * 2 / 3);
156
+ letter-spacing: var(--_h4-tracking);
157
+ }
139
158
  .atelic-ui h1 {
140
159
  font-size: clamp(2.6rem, 8vw, 5rem);
141
160
  }
@@ -144,12 +163,10 @@
144
163
  }
145
164
  .atelic-ui h3 {
146
165
  font-size: clamp(1.35rem, 3vw, 1.85rem);
147
- letter-spacing: -0.015em;
148
166
  }
149
167
  .atelic-ui h4 {
150
168
  font-size: 1.15rem;
151
169
  font-weight: var(--weight-bold);
152
- letter-spacing: -0.01em;
153
170
  }
154
171
  .atelic-ui p {
155
172
  text-wrap: pretty;