@lamatemaga/sterling 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 La Matemaga
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,336 @@
1
+ <p align="center">
2
+ <img src="./assets/sterling-banner.png" alt="Sterling — a palette and components for data stories" width="100%" />
3
+ </p>
4
+
5
+ <p align="center">
6
+ <a href="https://github.com/LaMatemaga/sterling/stargazers">
7
+ <img src="https://img.shields.io/github/stars/LaMatemaga/sterling?style=for-the-badge&label=STAR%20STERLING&labelColor=120D1F&color=9A79E7" alt="Star Sterling on GitHub" />
8
+ </a>
9
+ <a href="./CONTRIBUTING.md">
10
+ <img src="https://img.shields.io/badge/CONTRIBUTE-TO%20THE%20CONSTELLATION-25A08D?style=for-the-badge&labelColor=120D1F" alt="Contribute to Sterling" />
11
+ </a>
12
+ <a href="#work-in-progress">
13
+ <img src="https://img.shields.io/badge/ROADMAP-OPEN%20FUTURE-B69AF2?style=for-the-badge&labelColor=120D1F" alt="Explore the Sterling roadmap" />
14
+ </a>
15
+ </p>
16
+
17
+ # Sterling ✦
18
+
19
+ **A palette and plug-and-play React/MDX figure system for editorial data stories.**
20
+
21
+ An open-source editorial system by [La Matemaga](https://www.lamatemaga.com/sterling).
22
+
23
+ Sterling is for people who publish charts inside Markdown and do not want every post to reinvent its visual language. A single figure shell keeps hierarchy, a QED-like title mark, captions, source treatment, exports, colour grammar, and accessible chart labels consistent across an entire blog or documentation site. Chart primitives draw the data; the shell keeps the editorial contract.
24
+
25
+ The name is associated with *little star* and with the standard of precious metals: a useful metaphor for visualizations that aspire to clarity, consistency, and care.
26
+
27
+ > **Status:** pre-release extraction. The package source is ready to become independent; it has not been published to npm yet.
28
+
29
+ ## What is included
30
+
31
+ - A reusable `SterlingFigure` wrapper for React and MDX.
32
+ - D3/SVG chart primitives: bars, scatterplots, lines, histograms, boxplots, violins, heatmaps, correlation matrices, lollipops, pie/donut, chord, Sankey, candlestick, radar, ridgeline, treemap, network, dendrogram, volcano, Manhattan, expression, geographic map, and more.
33
+ - A colour system with categorical, sequential, diverging, heat, and per-category sequential ramps.
34
+ - A `createTailwindSterlingPalette` helper for Tailwind-style `100`–`950` colour scales. Tailwind itself stays optional.
35
+ - MDX registration, localized English/Spanish interface copy, title/caption conventions, and inline legends.
36
+ - Image copy, PNG export, Web Share support where available, and CSV export of the **processed rows behind a figure**.
37
+
38
+ Sterling intentionally does **not** include La Matemaga’s original datasets, site pages, images, or visual examples. It is the reusable library layer only.
39
+
40
+ > **Using an AI coding agent?** Start with [`AGENTS.md`](./AGENTS.md). It gives agents an editorial/data contract, the questions to ask before generating a figure, configuration rules, and a reproducible export workflow for slide-deck assets.
41
+
42
+ ## Read the story, explore the system
43
+
44
+ - [**Sterling: a palette for data with a voice of its own**](https://www.lamatemaga.com/en/blog/sterling-una-paleta-para-datos-con-voz-propia) is the construction chronicle: why the system exists, how its editorial and statistical decisions were made, and what it means to publish data stories that are shareable, traceable, and worth revisiting.
45
+ - [**The live visualization catalog**](https://www.lamatemaga.com/en/sterling#catalog) lets you explore Sterling’s current chart species in context. It is the visual reference for the system; this README remains the source for installation and implementation details.
46
+
47
+ ## Installation
48
+
49
+ ### When published
50
+
51
+ ```bash
52
+ npm install @lamatemaga/sterling
53
+ ```
54
+
55
+ ### From this checkout, before publishing
56
+
57
+ ```bash
58
+ npm install ../sterling
59
+ ```
60
+
61
+ Sterling requires React and React DOM 18.2 or later (React 18 and 19 are supported). D3 modules, `html-to-image`, `lucide-react`, and `topojson-client` are normal package dependencies and install with Sterling. The local package's `prepare` script builds `dist` during installation; Next.js, MDX, and Tailwind are optional integrations.
62
+
63
+ Import the base styles once in your app entry point:
64
+
65
+ ```tsx
66
+ import "@lamatemaga/sterling/styles.css";
67
+ ```
68
+
69
+ The package root is an explicit React client boundary: use it for figures,
70
+ MDX registration, and browser actions. Static SVG primitives, palette helpers,
71
+ CSV helpers, and types are also available from the server-safe subpath:
72
+
73
+ ```tsx
74
+ import { defineSterlingPalette, SterlingScatterPlot } from "@lamatemaga/sterling/server";
75
+ ```
76
+
77
+ ## Quick start
78
+
79
+ ```tsx
80
+ import {
81
+ SterlingBarChart,
82
+ SterlingFigure,
83
+ sterlingCredit,
84
+ type SterlingDataExport,
85
+ } from "@lamatemaga/sterling";
86
+
87
+ const rows = [
88
+ { treatment: "A", mean: 14.5 },
89
+ { treatment: "B", mean: 15.3 },
90
+ { treatment: "C", mean: 2.1 },
91
+ ];
92
+
93
+ export function TreatmentMeans() {
94
+ return (
95
+ <SterlingFigure
96
+ labelPrimary="Bars"
97
+ labelSecondary="Categorical"
98
+ title="Treatment means at a glance"
99
+ subtitle="Means calculated from the complete processed dataset."
100
+ source="Your published source"
101
+ size="wide"
102
+ signature={sterlingCredit({ author: "Your name" })}
103
+ dataExport={{ rows, fileName: "treatment-means" } satisfies SterlingDataExport}
104
+ >
105
+ <SterlingBarChart
106
+ data={rows.map(({ treatment, mean }) => ({ label: treatment, value: mean }))}
107
+ ariaLabel="Mean value by treatment"
108
+ />
109
+ </SterlingFigure>
110
+ );
111
+ }
112
+ ```
113
+
114
+ `size` is optional and defaults to `medium`. Use `compact`, `medium`, `wide`, or `full`. Every figure also accepts `palette`, `editorial`, `signature`, `sourceLabel`, `titleMarkHref`, `className`, and `style`; omitted fields keep Sterling’s defaults.
115
+
116
+ ## Use with MDX
117
+
118
+ Register the components once. Dataset-backed wrapper components stay in your own project, which lets your data and source citations live wherever your publishing workflow needs them.
119
+
120
+ ```tsx
121
+ import { createSterlingMdxComponents, sterlingCredit } from "@lamatemaga/sterling";
122
+ import { IrisScatterFigure } from "./IrisScatterFigure";
123
+
124
+ export const mdxComponents = createSterlingMdxComponents({
125
+ locale: "en",
126
+ figureDefaults: {
127
+ editorial: { titleMark: "." },
128
+ signature: sterlingCredit({ author: "Ada Lovelace" }),
129
+ },
130
+ additionalComponents: { IrisScatterFigure },
131
+ });
132
+ ```
133
+
134
+ Then use it in an `.mdx` file:
135
+
136
+ ```mdx
137
+ <IrisScatterFigure />
138
+ ```
139
+
140
+ ## Editorial configuration
141
+
142
+ Sterling’s defaults are intentionally portable:
143
+
144
+ - The title gets a non-linking `.` by default; it can be removed or linked.
145
+ - The default caption credit is a link to [Sterling](https://www.lamatemaga.com/sterling): `Made with Sterling ✦`.
146
+ - Set the credit to your own author with `sterlingCredit({ author: "Your name" })`, which becomes `Made by Your name with Sterling ✦`.
147
+ - Consumers may remove or replace the credit entirely. The link is a useful attribution default, not a lock-in.
148
+
149
+ ```tsx
150
+ <SterlingFigure
151
+ // Everything below is optional.
152
+ editorial={{
153
+ titleMark: "∎",
154
+ titleMarkHref: "/",
155
+ titleMarkLabel: "Back to home",
156
+ sourceLabel: "Data source",
157
+ }}
158
+ signature={false}
159
+ {...figureProps}
160
+ />
161
+ ```
162
+
163
+ To preserve the original La Matemaga treatment, set your own `signature` and `editorial` in the consuming site; the library contains no site-specific branding.
164
+
165
+ ## Themes, typography, and palette
166
+
167
+ Sterling starts in light mode. Add `data-sterling-theme="dark"` or `.sterling-theme-dark` on an ancestor for its dark surface. The package uses local CSS variables, so it does not change your site’s global theme.
168
+
169
+ ```tsx
170
+ <main data-sterling-theme="dark">
171
+ <TreatmentMeans />
172
+ </main>
173
+ ```
174
+
175
+ The base stylesheet stays neutral and inherits your publication's type system.
176
+ For Sterling's complete editorial treatment, import the optional stylesheet after
177
+ the base one. It bundles Fraunces SemiBold and JetBrains Mono under their OFL
178
+ licenses; see [`assets/fonts/NOTICE.md`](./assets/fonts/NOTICE.md).
179
+
180
+ ```tsx
181
+ import "@lamatemaga/sterling/styles.css";
182
+ import "@lamatemaga/sterling/editorial.css";
183
+ ```
184
+
185
+ Or load your own display, sans, and mono fonts, then map them:
186
+
187
+ ```css
188
+ :root {
189
+ --sterling-font-display: "Fraunces", Georgia, serif;
190
+ --sterling-font-sans: "Inter", system-ui, sans-serif;
191
+ --sterling-font-mono: "JetBrains Mono", ui-monospace, monospace;
192
+ }
193
+ ```
194
+
195
+ ### Palette contract
196
+
197
+ Pass `palette` to a figure to override only the parts you need. `defineSterlingPalette` preserves literal values and provides TypeScript autocomplete.
198
+
199
+ ### Colour-vision accessibility
200
+
201
+ Sterling includes colour-vision-tested categorical subsets; it is deliberately not presented as a universally safe eight-colour palette. The full default palette passes simulations for **protanomaly, deuteranomaly, tritanomaly, and achromatomaly**. For simulated full dichromacy, use the validated reduced subsets: six colours for protanopia, and seven colours for deuteranopia or tritanopia. Achromatopsia is the most restrictive case and requires a validated four-colour subset.
202
+
203
+ These limits are part of the reading contract, not an afterthought. When categories carry meaning, pair colour with a clear inline legend, labels, shape, position, or another redundant cue. If your audience includes people with a specific colour-vision deficiency, select and test the appropriate subset rather than assuming that any arbitrary selection of Sterling colours will remain distinguishable.
204
+
205
+ ```tsx
206
+ import { defineSterlingPalette } from "@lamatemaga/sterling";
207
+
208
+ const studioPalette = defineSterlingPalette({
209
+ surface: { paper: "#fffdf8", plot: "#fff", text: "#18211e", grid: "#dae2dc" },
210
+ categorical: ["#7c3aed", "#0f766e", "#db2777", "#d97706"],
211
+ legend: ["#5b21b6", "#115e59", "#9d174d", "#92400e"],
212
+ });
213
+
214
+ <SterlingFigure palette={studioPalette} {...figureProps} />
215
+ ```
216
+
217
+ ### Tailwind scales (100–950)
218
+
219
+ Use Tailwind’s colour objects without adding Tailwind as a Sterling runtime dependency. Categorical `500` values become marks, `700` values become inline-legend text, `100`–`950` become sequential/diverging/heat stops, and `200`–`800` become per-category ramps.
220
+
221
+ ```tsx
222
+ import { amber, blue, fuchsia, lime, rose, slate, teal, violet } from "tailwindcss/colors";
223
+ import { createTailwindSterlingPalette } from "@lamatemaga/sterling";
224
+
225
+ const tailwindPalette = createTailwindSterlingPalette({
226
+ categorical: [violet, teal, fuchsia, amber, blue, rose, lime, slate],
227
+ divergent: teal,
228
+ heat: amber,
229
+ surface: {
230
+ paper: slate[50], plot: "#ffffff", plotAlt: slate[100], text: slate[950],
231
+ muted: slate[600], grid: slate[200], edge: slate[300], period: violet[600],
232
+ },
233
+ });
234
+ ```
235
+
236
+ The helper is deliberately a starting point: choose a divergent scale for values around a meaningful midpoint, a sequential scale for ordered magnitude, and a categorical palette only for distinct groups. For an otherwise neutral visualization with one highlighted region, pass a neutral surface/series palette and a deliberate `color` on the selected mark or wrapper component.
237
+
238
+ ## Data, exports, and accessibility
239
+
240
+ Provide `dataExport={{ rows }}` with the **exact processed data** rendered by the figure. Sterling turns those rows into a UTF-8 CSV from its action menu; it does not pretend to redistribute an original source dataset. This makes the summarized table inspectable without asking readers to reverse-engineer pixels.
241
+
242
+ Every primitive requires an `ariaLabel`. Keep source text in the figure caption, use legends in the subtitle for categorical colour/shape encodings, and retain meaningful field names in `dataExport` whenever possible.
243
+
244
+ The top-right controls intentionally remain compact:
245
+
246
+ - **Copy image** is always visible.
247
+ - **Export or share** opens PNG download, processed CSV download, and native system sharing on compatible devices.
248
+
249
+ ## Updating Sterling
250
+
251
+ When installed from npm:
252
+
253
+ ```bash
254
+ npm update @lamatemaga/sterling
255
+ ```
256
+
257
+ For intentional major-version updates:
258
+
259
+ ```bash
260
+ npm install @lamatemaga/sterling@latest
261
+ ```
262
+
263
+ When installed from a local checkout, pull the desired commit in the Sterling folder, run `npm install` there, and reinstall the local path in the consuming app. `prepare` rebuilds the package automatically:
264
+
265
+ ```bash
266
+ git pull
267
+ npm install
268
+ cd ../your-site
269
+ npm install ../sterling
270
+ ```
271
+
272
+ Read the release notes before upgrading a major version. Keep the stylesheet import in place; a package update does not add it automatically.
273
+
274
+ ## Development
275
+
276
+ ```bash
277
+ npm install
278
+ npm run typecheck
279
+ npm run build
280
+ npm run test:consumer
281
+ npm pack --dry-run
282
+ ```
283
+
284
+ The public client entry point is `src/index.ts`; `src/server.ts` exposes the
285
+ server-safe static API. Do not import internal source files from applications.
286
+ Keep all chart geometry inside primitives, and keep editorial decisions in
287
+ `SterlingFigure` or your own wrapper. A change to shared tokens should make all
288
+ affected chart types more consistent, not merely improve one example.
289
+
290
+ ## Work in progress
291
+
292
+ Sterling is designed to grow in the open. Contributions are welcome, especially when they preserve the package’s editorial grammar and data integrity.
293
+
294
+ - Additional chart primitives and small-multiple/composition layouts.
295
+ - A first-class scale selector: categorical, sequential, diverging, and neutral-with-highlight modes.
296
+ - A neutral-scale/highlight API for calling out an interval, region, or observation without turning the entire chart categorical.
297
+ - More accessible descriptions, keyboard affordances, and export test coverage.
298
+ - A visual regression suite for light, dark, and print surfaces, beginning with five high-risk specimens (violin, correlogram, heatmap, scatterplot, and exported figure) across the three modes.
299
+ - Framework adapters and downloadable palette artifacts for R, Python, Julia, and other visualization ecosystems. These are explicitly **future work**, not part of this initial package.
300
+
301
+ Use the [feature request form](https://github.com/LaMatemaga/sterling/issues/new?template=feature-request.yml) to propose a component or capability. Bring the reading task, a public or synthetic data shape, accessibility considerations, and success criteria; a sketch or reference is welcome. For a pull request, keep the data transformation explicit, add a focused fixture, maintain the shared opacity/outline tokens, and document any new public prop. See [CONTRIBUTING.md](./CONTRIBUTING.md) for the full guide.
302
+
303
+ ## Community and security
304
+
305
+ - Read [CONTRIBUTING.md](./CONTRIBUTING.md) before opening a pull request.
306
+ - Use the [feature request form](https://github.com/LaMatemaga/sterling/issues/new?template=feature-request.yml) for a component or capability, or the [bug report form](https://github.com/LaMatemaga/sterling/issues/new?template=bug-report.yml) for reproducible behavior that differs from the documented contract.
307
+ - Contributions follow the [Code of Conduct](./CODE_OF_CONDUCT.md).
308
+ - Report vulnerabilities through [private vulnerability reporting](https://github.com/LaMatemaga/sterling/security/advisories/new), not in a public issue. See [SECURITY.md](./SECURITY.md).
309
+
310
+ ## License
311
+
312
+ Sterling is licensed under the [MIT License](./LICENSE).
313
+ Release history follows [Semantic Versioning](https://semver.org/) in the
314
+ [changelog](./CHANGELOG.md).
315
+
316
+ ## Credits
317
+
318
+ Sterling was conceived, art-directed, and reviewed by **La Matemaga**. Product, brand, and data-visualization decisions remained under that direction throughout implementation.
319
+
320
+ - **OpenAI Codex:** GPT-5.6 Sol High was the principal implementation collaborator through the core-system build; GPT-5.6 Terra High carried final fidelity corrections, open-source extraction, package hardening, and release verification. Both worked under La Matemaga's product, art direction, and review.
321
+ - **Anthropic Claude:** Opus 4.8 for a data-visualization correctness pass—auditing the component set against the v1.5 reference, using R/ggplot2 as the verification oracle, building the shared D3 axis foundation, and porting the clustered expression matrix from the original implementation. It was used after Fable blocked work involving bioinformatics charts. Directed and reviewed by La Matemaga.
322
+ - **R:** transformed source datasets into JSON and served as the verification oracle. Canonical ggplot2 renders were compared with the React implementation to validate distributions, outliers, palette ramps, and scales.
323
+ - **Skills/methods:** `design-taste-frontend` (editorial anti-slop interface discipline) and `visualize` (data visualization exploration).
324
+ - **Product demo video:** a Full HD 16:9 Sterling demo was produced in Cursor with Remotion. It uses live Sterling figures and source data—not mock charts—to move from the article and embedded legends through MDX installation, responsive figure sizing, exports and sharing, theme comparison, and the portfolio visualization catalog. Its production used `appshot-videos` for the Remotion/Appshot workflow, `frontend-design` for typography and visual QA, and `hallmark` for editorial-composition review and anti-slop cleanup. The main implementation/design agent was GPT-5.6 Terra; no model-specific subagents were run.
325
+
326
+ The original site and live system are documented at [lamatemaga.com/sterling](https://www.lamatemaga.com/sterling).
327
+
328
+ ### How Codex was used
329
+
330
+ Codex was used as an implementation collaborator under La Matemaga's product, art-direction, and data-visualization review—not as a substitute for those decisions.
331
+
332
+ **GPT-5.6 Sol High — core system build.** Sol was the principal Codex implementation collaborator for the work that turned the v1.5 field tests into a working editorial system. Under La Matemaga’s direction, it helped establish reusable visual tokens and figure contracts; build the shared React/MDX figure shell; and integrate the palette, chart primitives, localized interface copy, inline legends, source and caption treatment, responsive editorial widths, and export interactions. It also supported the live Sterling article, portfolio feature, and visualization catalog that made the system inspectable in context. The important architectural result was that a correction to hierarchy, captioning, palette, or interaction could propagate across every installed figure rather than being redone chart by chart.
333
+
334
+ **GPT-5.6 Terra High — fidelity, extraction, and release hardening.** Terra handled the exacting last mile: preserving the site’s editorial typography and light/dark behavior; unifying opacity and outline decisions while retaining semantic exceptions such as the violin’s interquartile interval; refining portable component APIs and their documentation; and separating Sterling from the La Matemaga website into an installable package. It defined the public client/server entry points, stylesheet and font boundary, configurable palette and attribution helpers, Tailwind-scale helper, consumer smoke test, package build, and publishable tarball verification. This was not cosmetic cleanup: it made the system safer to adopt in another Markdown/React site without inheriting the originating website’s code or branding.
335
+
336
+ All generated work was directed and reviewed by La Matemaga. R/ggplot2 checks, comparison against the v1.5 reference, and visual review of the live site were used to validate the resulting implementation.
@@ -0,0 +1,12 @@
1
+ # Bundled font notices
2
+
3
+ Sterling includes two optional fonts for consumers who import
4
+ `@lamatemaga/sterling/editorial.css`.
5
+
6
+ - **Fraunces SemiBold** by Undercase Type. Distributed under the SIL Open Font
7
+ License 1.1. Source and licence: <https://github.com/undercasetype/Fraunces>.
8
+ - **JetBrains Mono Regular** by JetBrains. Distributed under the SIL Open Font
9
+ License 1.1. Source and licence: <https://github.com/JetBrains/JetBrainsMono>.
10
+
11
+ The Sterling code itself is licensed under MIT; these font files retain their
12
+ own licences. The bundled [OFL-1.1 text](./OFL-1.1.txt) applies to both fonts.
@@ -0,0 +1,79 @@
1
+ SIL OPEN FONT LICENSE
2
+ Version 1.1 - 26 February 2007
3
+
4
+ PREAMBLE
5
+ The goals of the Open Font License (OFL) are to stimulate worldwide development
6
+ of collaborative font projects, to support the font creation efforts of
7
+ academic and linguistic communities, and to provide a free and open framework
8
+ in which fonts may be shared and improved in partnership with others.
9
+
10
+ The OFL allows the licensed fonts to be used, studied, modified and
11
+ redistributed freely as long as they are not sold by themselves. The fonts,
12
+ including any derivative works, can be bundled, embedded, redistributed and/or
13
+ sold with any software provided that any reserved names are not used by
14
+ derivative works. The fonts and derivatives, however, cannot be released under
15
+ any other type of license. The requirement for fonts to remain under this
16
+ license does not apply to any document created using the fonts or their
17
+ derivatives.
18
+
19
+ DEFINITIONS
20
+ "Font Software" refers to the set of files released by the Copyright Holder(s)
21
+ under this license and clearly marked as such. This may include source files,
22
+ build scripts and documentation.
23
+
24
+ "Reserved Font Name" refers to any names specified as such after the copyright
25
+ statement(s).
26
+
27
+ "Original Version" refers to the collection of Font Software components as
28
+ distributed by the Copyright Holder(s).
29
+
30
+ "Modified Version" refers to any derivative made by adding to, deleting, or
31
+ substituting, in part or in whole, any of the components of the Original
32
+ Version, by changing porting, or by modifying the Font Software.
33
+
34
+ "Author" refers to any designer, engineer, programmer, technical writer or
35
+ other person who contributed to the Font Software.
36
+
37
+ PERMISSION & CONDITIONS
38
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
39
+ the Font Software, to use, study, copy, merge, embed, modify, redistribute, and
40
+ sell modified and unmodified copies of the Font Software, subject to the
41
+ following conditions:
42
+
43
+ 1) Neither the Font Software nor any of its individual components, in Original
44
+ or Modified Versions, may be sold by itself.
45
+
46
+ 2) Original or Modified Versions of the Font Software may be bundled,
47
+ redistributed and/or sold with any software, provided that each copy contains
48
+ the above copyright notice and this license. These can be included either as
49
+ stand-alone text files, human-readable headers or in the appropriate
50
+ machine-readable metadata fields within text or binary files as long as those
51
+ fields can be easily viewed by the user.
52
+
53
+ 3) No Modified Version of the Font Software may use the Reserved Font Name(s)
54
+ unless explicit written permission is granted by the corresponding Copyright
55
+ Holder. This restriction only applies to the primary font name as presented to
56
+ the users.
57
+
58
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software
59
+ shall not be used to promote, endorse or advertise any Modified Version, except
60
+ to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s)
61
+ or with their explicit written permission.
62
+
63
+ 5) The Font Software, modified or unmodified, in part or in whole, must be
64
+ distributed entirely under this license, and must not be distributed under any
65
+ other license. The requirement for fonts to remain under this license does not
66
+ apply to any document created using the Font Software.
67
+
68
+ TERMINATION
69
+ This license becomes null and void if any of the above conditions are not met.
70
+
71
+ DISCLAIMER
72
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
73
+ IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
74
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
75
+ TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR
76
+ ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT,
77
+ INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR
78
+ OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR
79
+ FROM OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Optional complete Sterling typographic treatment.
3
+ *
4
+ * Import this after `@lamatemaga/sterling/styles.css` when a project wants
5
+ * Sterling's Fraunces + JetBrains Mono pairing. The base stylesheet stays
6
+ * font-neutral so it can inherit a consuming publication's own type system.
7
+ */
8
+ @font-face {
9
+ font-family: "Sterling Fraunces";
10
+ src: url("../assets/fonts/Fraunces-SemiBold.ttf") format("truetype");
11
+ font-style: normal;
12
+ font-weight: 600;
13
+ font-display: swap;
14
+ }
15
+
16
+ @font-face {
17
+ font-family: "Sterling JetBrains Mono";
18
+ src: url("../assets/fonts/JetBrainsMono-Regular.ttf") format("truetype");
19
+ font-style: normal;
20
+ font-weight: 400;
21
+ font-display: swap;
22
+ }
23
+
24
+ .sterling-figure {
25
+ --sterling-font-display: "Sterling Fraunces", Georgia, serif;
26
+ --sterling-font-mono: "Sterling JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
27
+ }