@supertype.ai/foundations 0.1.24 → 0.1.26

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 (2) hide show
  1. package/README.md +22 -28
  2. package/package.json +4 -3
package/README.md CHANGED
@@ -20,23 +20,20 @@ local iteration against a consumer and for releasing.
20
20
 
21
21
  ## See it running
22
22
 
23
+ Run the example site locally:
24
+
23
25
  ```sh
24
26
  yarn example:install # once, to install Next, the peers and the package
25
27
  yarn example # then open http://localhost:3000
26
28
  ```
27
29
 
28
- [`examples/site`](examples/site) renders every component next to the source that
29
- produced it, carries whole-page [recipes](examples/site/app/_recipes) to copy,
30
- and puts the `dark` and `.editorial` surfaces on a switch. It is also where
31
- documentation changes get checked, so start here if you are improving the docs.
30
+ [`examples/site`](examples/site) renders every component along with the code, and include whole-page [recipes](examples/site/app/_recipes) to copy into your project along with the `dark` and `.editorial` switches.
32
31
 
33
- ---
32
+ ## Alternatively, check out: [the documentation site](https://supertypeai.github.io/foundations/)
34
33
 
35
- ## Install
34
+ ## Initialization and Diagnostics
36
35
 
37
- Get step 2 or 3 wrong and nothing throws an error; the components just render
38
- unstyled, or in the wrong typeface. So the package ships a CLI that writes the
39
- CSS for you and checks the rest:
36
+ This package also ships a CLI that writes the CSS for you and checks the rest:
40
37
 
41
38
  ```sh
42
39
  npx @supertype.ai/foundations init # edits your CSS entry, prints the rest
@@ -44,13 +41,11 @@ npx @supertype.ai/foundations doctor # checks this app against everything bel
44
41
  ```
45
42
 
46
43
  `init` edits one file: the CSS entry that imports Tailwind. It adds the imports
47
- you are missing and reorders the ones you already have, since the imports are a
48
- cascade. Run it with `--dry-run` first to see the patch. Everything else it
44
+ you are missing and reorders anything that is out of place. Run it with `--dry-run` first to see the patch. Everything else it
49
45
  prints for you to paste — the font binding, and the `llms.txt` line for a coding
50
- agent — because those belong in files the CLI has no business rewriting.
46
+ agent.
51
47
 
52
- The steps are written out below anyway. `init` is a shortcut through them, not
53
- a replacement for knowing what it changed. See [the CLI](docs/cli.md).
48
+ The steps performed by `init` are written out below anyway. See [the CLI](docs/cli.md) for the full list of checks and details.
54
49
 
55
50
  ### 1. Add the package
56
51
 
@@ -59,8 +54,7 @@ yarn add @supertype.ai/foundations
59
54
  # or: npm install @supertype.ai/foundations
60
55
  ```
61
56
 
62
- The package ships built, so there is no install-time build step. Peers are
63
- React 19+, Next 15+, `next-view-transitions` 0.3+ and `@base-ui/react` 1.4+.
57
+ Peers are React 19+, Next 15+, `next-view-transitions` 0.3+ and `@base-ui/react` 1.4+.
64
58
 
65
59
  <details>
66
60
  <summary>Installing from a git tag instead</summary>
@@ -71,7 +65,7 @@ untagged git dependency re-resolves to a different commit on any fresh install.
71
65
 
72
66
  ```jsonc
73
67
  // package.json
74
- "@supertype.ai/foundations": "https://github.com/supertypeai/foundations.git#v0.1.24"
68
+ "@supertype.ai/foundations": "https://github.com/supertypeai/foundations.git#v0.1.26"
75
69
  ```
76
70
 
77
71
  </details>
@@ -91,7 +85,7 @@ untagged git dependency re-resolves to a different commit on any fresh install.
91
85
  ```
92
86
 
93
87
  **The `@source` line is required.** Tailwind does not scan `node_modules` by
94
- default, so without it every class the package ships is purged and the components
88
+ default, so without it every class is purged and the components
95
89
  render with no styles at all.
96
90
 
97
91
  **`theme.css` is required.** `tokens.css` names the colour roles; `theme.css` is
@@ -100,7 +94,7 @@ resolves to nothing, so the page renders unpainted with no error. It also carrie
100
94
  `--secondary-ink`, `--subtle-foreground`, the four earth tones the marker
101
95
  highlight uses, and the `accordion-down` and `accordion-up` keyframes. Skip it
102
96
  only if you declare every role yourself; `foundations doctor` fails when neither
103
- is true, and names the roles you left unpainted.
97
+ is true.
104
98
 
105
99
  ### 3. Bind the fonts
106
100
 
@@ -247,15 +241,15 @@ package.
247
241
 
248
242
  | import | contains | docs |
249
243
  | --------------------------------------------------------------------- | ------------------------------------------------------------------------ | -------------------------------------------- |
250
- | `@supertype.ai/foundations` | all typography primitives, `cn` | [Typography](docs/typography.md) |
251
- | `@supertype.ai/foundations/blocks` | `Card`, `Callout`, `Steps`, `Tabs`, `Accordion`, `Disclosure`, `SEGMENT` | [Blocks](docs/blocks.md) |
252
- | `@supertype.ai/foundations/mdx` | `proseMdxComponents` — the MDX element map | [In MDX](docs/blocks.md#in-mdx) |
253
- | `@supertype.ai/foundations/essay` | the long-form shell, TOC, reading rail, post meta | [Essay](docs/essay.md) |
254
- | `@supertype.ai/foundations/seo` | `createSeo(...)` — metadata + JSON-LD | [Tooling](docs/tooling.md#seo-and-og-images) |
255
- | `@supertype.ai/foundations/og` | `ogCard`, `OG_SIZE` — an element for `next/og` | [Tooling](docs/tooling.md#seo-and-og-images) |
256
- | `@supertype.ai/foundations/eslint` | the design rules as ESLint selectors | [Tooling](docs/tooling.md#lint-rules) |
257
- | `@supertype.ai/foundations/rehype` | `rehypeProseCode` — **build-time only** | [In MDX](docs/blocks.md#in-mdx) |
258
- | `@supertype.ai/foundations/contrast` | token resolution + legibility checks, build-time only | [Tooling](docs/tooling.md#contrast-checks) |
244
+ | `@supertype.ai/foundations` | all typography primitives, `cn` | [Typography](docs/typography.md) |
245
+ | `@supertype.ai/foundations/blocks` | `Card`, `Callout`, `Steps`, `Tabs`, `Accordion`, `Disclosure`, `SEGMENT` | [Blocks](docs/blocks.md) |
246
+ | `@supertype.ai/foundations/mdx` | `proseMdxComponents` — the MDX element map | [In MDX](docs/blocks.md#in-mdx) |
247
+ | `@supertype.ai/foundations/essay` | the long-form shell, TOC, reading rail, post meta | [Essay](docs/essay.md) |
248
+ | `@supertype.ai/foundations/seo` | `createSeo(...)` — metadata + JSON-LD | [Tooling](docs/tooling.md#seo-and-og-images) |
249
+ | `@supertype.ai/foundations/og` | `ogCard`, `OG_SIZE` — an element for `next/og` | [Tooling](docs/tooling.md#seo-and-og-images) |
250
+ | `@supertype.ai/foundations/eslint` | the design rules as ESLint selectors | [Tooling](docs/tooling.md#lint-rules) |
251
+ | `@supertype.ai/foundations/rehype` | `rehypeProseCode` — **build-time only** | [In MDX](docs/blocks.md#in-mdx) |
252
+ | `@supertype.ai/foundations/contrast` | token resolution + legibility checks, build-time only | [Tooling](docs/tooling.md#contrast-checks) |
259
253
  | `./tokens.css` `./theme.css` `./type.css` `./prose.css` `./shiki.css` | the style layer | [Tokens and theming](#tokens-and-theming) |
260
254
  | `foundations` (bin) | `init` and `doctor` | [The CLI](docs/cli.md) |
261
255
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supertype.ai/foundations",
3
- "version": "0.1.24",
3
+ "version": "0.1.26",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -78,7 +78,8 @@
78
78
  "./og": {
79
79
  "types": "./dist/og.d.ts",
80
80
  "default": "./dist/og.js"
81
- }
81
+ },
82
+ "./package.json": "./package.json"
82
83
  },
83
84
  "scripts": {
84
85
  "build": "tsc -p tsconfig.json && tsc -p tsconfig.cjs.json && node scripts/cjs-marker.mjs && node scripts/check-llms.mjs && node scripts/pins.mjs",
@@ -127,7 +128,7 @@
127
128
  "type": "git",
128
129
  "url": "git+https://github.com/supertypeai/foundations.git"
129
130
  },
130
- "homepage": "https://github.com/supertypeai/foundations#readme",
131
+ "homepage": "https://supertypeai.github.io/foundations/",
131
132
  "contributors": [
132
133
  {
133
134
  "name": "Supertype Pte. Ltd.",