@chassis-ui/docs 0.8.0 → 0.9.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @chassis-ui/docs
2
2
 
3
+ ## 0.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - **Breaking.** The package needs `@chassis-ui/css` 0.10.0 or later: the peer range was `>=0.6.0`. css 0.10 names the font families by their job and holds every text role in one group, and it removes the old Sass names without a deprecation step, so the styles of the package read `$font-lead` in place of `$font-context-lead`, and the footer and the docs sidebar use `.font-h6` and `.font-h5` in place of `.h6` and `.h5`, which css 0.10 deprecates. The roles keep their values, so the pages look as before. css 0.10 reads its tokens from the `@chassis-ui/tokens` that a site installs, which must be 0.10 too. See [UPGRADING.md](https://github.com/chassis-ui/website/blob/main/packages/docs/UPGRADING.md#from-08-to-09) for the dependencies and the names to replace in a site's own pages and styles: `.h1` to `.h6`, `.font-text`, the `--cx-*-text-*` and `--cx-*-html-*` properties and the `$font-context-*` maps.
8
+
3
9
  ## 0.8.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -23,7 +23,7 @@ pnpm add @chassis-ui/docs
23
23
  ```json
24
24
  {
25
25
  "@astrojs/markdown-remark": "^7.0.0",
26
- "@chassis-ui/css": ">=0.6.0",
26
+ "@chassis-ui/css": ">=0.10.0",
27
27
  "@pagefind/component-ui": "^1.0.0",
28
28
  "@shikijs/transformers": "^4.3.1",
29
29
  "astro": "^7.0.0",
@@ -415,21 +415,22 @@ The integration provides five modules: `virtual:chassis-docs/config`, `virtual:c
415
415
 
416
416
  "Requires" is what `package.json` of each version declares. "Built with" is what the website in this repository resolved and built when the version was released. CI also builds the [starter site](starter/) with the newest versions that its ranges accept.
417
417
 
418
- | `@chassis-ui/docs` | Requires Astro | Requires `@chassis-ui/css` | Requires Node | Built with |
419
- | ------------------ | -------------------------- | -------------------------- | ------------- | ------------------------------------ |
420
- | 0.8.0 | `^7.0.0` | `>=0.6.0` | `>=22.12.0` | Astro 7.3.5, css 0.7.1, tokens 0.7.0 |
421
- | 0.7.0 | `^7.0.0` | `>=0.6.0` | `>=22.12.0` | Astro 7.3.5, css 0.6.0, tokens 0.6.0 |
422
- | 0.6.3 | `^7.0.0` | `^0.5.0-0` | `>=22.12.0` | Astro 7.3.5, css 0.5.2, tokens 0.6.0 |
423
- | 0.6.2 | `^7.0.0` | `^0.5.0-0` | `>=22.12.0` | Astro 7.3.5, css 0.5.2, tokens 0.6.0 |
424
- | 0.6.1 | `^7.0.0` | `^0.5.0-0` | `>=22.12.0` | Astro 7.3.5, css 0.5.2, tokens 0.6.0 |
425
- | 0.6.0 | `^7.0.0` | `^0.5.0-0` | `>=22.12.0` | Astro 7.3.5, css 0.5.2, tokens 0.5.3 |
426
- | 0.5.1 | `^7.0.0` | `^0.5.0-0` | `>=22.12.0` | Astro 7.3.5, css 0.5.2, tokens 0.5.3 |
427
- | 0.5.0 | `^7.0.0` | `^0.5.0-0` | not declared | not recorded |
428
- | 0.4.0 | `^7.0.0` | `^0.4.0` | not declared | not recorded |
429
- | 0.3.0 to 0.3.10 | `^7.0.0` | `>=0.3.1` to `>=0.3.4` | not declared | not recorded |
430
- | 0.1.0 to 0.2.0 | `^5.0.0`, 0.1.0–0.1.1 `^4` | not declared | not declared | not recorded |
431
-
432
- `@chassis-ui/tokens` is not a dependency of the package. The styles take the design tokens that `@chassis-ui/css` carries: css 0.5 is built on tokens 0.5, css 0.4 on tokens 0.4. A site's own version of `@chassis-ui/tokens` matters only when the site puts it on the Sass load path in place of those. Tokens 0.6 renamed and removed some tokens, listed in its changelog.
418
+ | `@chassis-ui/docs` | Requires Astro | Requires `@chassis-ui/css` | Requires Node | Built with |
419
+ | ------------------ | -------------------------- | -------------------------- | ------------- | -------------------------------------- |
420
+ | 0.9.0 | `^7.0.0` | `>=0.10.0` | `>=22.12.0` | Astro 7.3.8, css 0.10.0, tokens 0.10.0 |
421
+ | 0.8.0 | `^7.0.0` | `>=0.6.0` | `>=22.12.0` | Astro 7.3.5, css 0.7.1, tokens 0.7.0 |
422
+ | 0.7.0 | `^7.0.0` | `>=0.6.0` | `>=22.12.0` | Astro 7.3.5, css 0.6.0, tokens 0.6.0 |
423
+ | 0.6.3 | `^7.0.0` | `^0.5.0-0` | `>=22.12.0` | Astro 7.3.5, css 0.5.2, tokens 0.6.0 |
424
+ | 0.6.2 | `^7.0.0` | `^0.5.0-0` | `>=22.12.0` | Astro 7.3.5, css 0.5.2, tokens 0.6.0 |
425
+ | 0.6.1 | `^7.0.0` | `^0.5.0-0` | `>=22.12.0` | Astro 7.3.5, css 0.5.2, tokens 0.6.0 |
426
+ | 0.6.0 | `^7.0.0` | `^0.5.0-0` | `>=22.12.0` | Astro 7.3.5, css 0.5.2, tokens 0.5.3 |
427
+ | 0.5.1 | `^7.0.0` | `^0.5.0-0` | `>=22.12.0` | Astro 7.3.5, css 0.5.2, tokens 0.5.3 |
428
+ | 0.5.0 | `^7.0.0` | `^0.5.0-0` | not declared | not recorded |
429
+ | 0.4.0 | `^7.0.0` | `^0.4.0` | not declared | not recorded |
430
+ | 0.3.0 to 0.3.10 | `^7.0.0` | `>=0.3.1` to `>=0.3.4` | not declared | not recorded |
431
+ | 0.1.0 to 0.2.0 | `^5.0.0`, 0.1.0–0.1.1 `^4` | not declared | not declared | not recorded |
432
+
433
+ `@chassis-ui/tokens` is not a dependency of the package, but a site installs it: the default token source of `@chassis-ui/css`, `scss/vendor/_chassis-tokens.scss`, forwards `@chassis-ui/tokens/dist/web/docs/chassis/main` from the site's `node_modules`, so the site needs the tokens that its css is built on: css 0.10 on tokens 0.10, css 0.7 on tokens 0.7. A site with tokens of its own puts them on the Sass load path in place of those, as [Styles](#styles) says.
433
434
 
434
435
  Before a release, the [canary](https://github.com/chassis-ui/website/blob/main/build/canary.js) builds the site of each Chassis repository whose range accepts the new version.
435
436
 
package/UPGRADING.md CHANGED
@@ -1,5 +1,52 @@
1
1
  # Upgrading @chassis-ui/docs
2
2
 
3
+ ## From 0.8 to 0.9
4
+
5
+ 0.9.0 needs `@chassis-ui/css` 0.10.0 or later. css 0.10 names the font families by their
6
+ job, `ui` in place of `text`, and holds every text role in one group, so `$font-context-lead`
7
+ is `$font-lead` now, and `.font-h1` to `.font-h6` are the classes of the heading roles. The
8
+ styles and the layouts of the package read the new names.
9
+
10
+ ### 1. Update the dependencies
11
+
12
+ ```sh
13
+ pnpm add -D @chassis-ui/docs@^0.9.0 @chassis-ui/css@^0.10.0 @chassis-ui/tokens@^0.10.0
14
+ ```
15
+
16
+ The default token source of css, `scss/vendor/_chassis-tokens.scss`, forwards the
17
+ `@chassis-ui/tokens` that your site installs, and css 0.10 reads tokens that only tokens 0.10
18
+ has, so the three move together. css 0.10.0 has changes of its own. Read its
19
+ [changelog](https://github.com/chassis-ui/css/blob/main/packages/css/CHANGELOG.md) first.
20
+
21
+ ### 2. Rename the typography names in your own pages and styles
22
+
23
+ css 0.10 keeps `.h1` to `.h6`, `.font-text` and `--cx-font-family-text` in this minor as
24
+ deprecated names, so a site builds and looks as before without this step. The next breaking
25
+ minor of css removes them. The other old names are gone in css 0.10.
26
+
27
+ | Old | New |
28
+ | -------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
29
+ | `.h1` to `.h6` | `.font-h1` to `.font-h6` |
30
+ | `.font-text` | `.font-ui` |
31
+ | `--cx-font-family-text` | `--cx-font-family-ui` |
32
+ | `--cx-font-size-text-lg`, `--cx-line-height-text-lg`, `--cx-font-weight-text-strong` and the other steps | `--cx-font-size-ui-lg`, `--cx-line-height-ui-lg`, `--cx-font-weight-ui-strong` |
33
+ | `--cx-font-size-html-h1`, `--cx-line-height-html-h1` and the other `--cx-*-html-*` properties | `--cx-font-size-h1`, `--cx-line-height-h1`; `--cx-font-family-heading` and `--cx-font-weight-heading` for the headings |
34
+ | `.font-display.font-lg` and the other display sizes | removed: a text role such as `.font-h2`, or `.font-prose.font-lg` |
35
+ | `$font-context-lead`, `$font-context-title-large` and the other `$font-context-*` maps | `$font-lead`, `$font-title-large` and the others |
36
+ | `$font-family-text` | `$font-family-ui` |
37
+
38
+ ### What changes in the package
39
+
40
+ - **The footer and the docs sidebar use `.font-h6` and `.font-h5`.** The three column
41
+ titles of the footer and the "On this page" label were `h6`, the section titles of the
42
+ sidebar `h5`. A rule of your own that matched them by class matches the new class.
43
+ - **`.cxd-subtitle` reads `$font-lead`,** the role that `$font-context-lead` was.
44
+
45
+ ### Check the result
46
+
47
+ Build the site before and after the upgrade and compare the pages in a browser. The roles
48
+ keep their values, so nothing of the package moves.
49
+
3
50
  ## From 0.7 to 0.8
4
51
 
5
52
  0.8.0 loads the fonts from the site's own static files, no longer from Google Fonts. The
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chassis-ui/docs",
3
3
  "description": "Shared Astro components and layouts for Chassis documentation sites.",
4
- "version": "0.8.0",
4
+ "version": "0.9.0",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",
@@ -70,7 +70,7 @@
70
70
  },
71
71
  "peerDependencies": {
72
72
  "@astrojs/markdown-remark": "^7.0.0",
73
- "@chassis-ui/css": ">=0.6.0",
73
+ "@chassis-ui/css": ">=0.10.0",
74
74
  "@pagefind/component-ui": "^1.0.0",
75
75
  "@shikijs/transformers": "^4.3.1",
76
76
  "astro": "^7.0.0",
@@ -95,8 +95,8 @@
95
95
  "clipboard": "^2.0.11",
96
96
  "github-slugger": "^2.0.0",
97
97
  "image-size": "^2.0.4",
98
- "js-yaml": "^5.4.2",
99
- "mdast-util-from-markdown": "^2.0.3",
98
+ "js-yaml": "^5.4.3",
99
+ "mdast-util-from-markdown": "^2.1.0",
100
100
  "mdast-util-mdx-jsx": "^3.2.0",
101
101
  "mdast-util-to-string": "^4.0.0",
102
102
  "medium-zoom": "^1.1.0",
@@ -106,16 +106,16 @@
106
106
  "unist-util-visit": "^5.1.0"
107
107
  },
108
108
  "devDependencies": {
109
- "@astrojs/markdown-remark": "^7.3.1",
110
- "@chassis-ui/css": "^0.7.1",
109
+ "@astrojs/markdown-remark": "^7.3.2",
110
+ "@chassis-ui/css": "^0.10.0",
111
111
  "@pagefind/component-ui": "^1.5.2",
112
112
  "@shikijs/transformers": "^4.5.0",
113
- "astro": "^7.3.5",
114
- "html-validate": "^11.16.1",
113
+ "astro": "^7.3.8",
114
+ "html-validate": "^11.16.2",
115
115
  "rehype-autolink-headings": "^7.1.0",
116
116
  "remark-mdx": "^3.1.1",
117
117
  "sass": "^1.105.1",
118
118
  "vfile": "^6.0.3",
119
- "vnu-jar": "^26.10.2"
119
+ "vnu-jar": "^26.10.9"
120
120
  }
121
121
  }
@@ -132,7 +132,7 @@ if (frontmatter.toc) {
132
132
  On this page
133
133
  <Icon name="chevron-sort-solid" class="icon-sm" />
134
134
  </button>
135
- <strong class="d-none md:d-block h6 my-xs">On this page</strong>
135
+ <strong class="d-none md:d-block font-h6 my-xs">On this page</strong>
136
136
  <hr class="d-none md:d-block my-xs" />
137
137
  <div class="collapse cxd-toc-collapse" id="tocContents">
138
138
  <nav id="TableOfContents" aria-label="Table of contents">
@@ -155,7 +155,7 @@ if (frontmatter.toc) {
155
155
  `${parentDirectory ? parentDirectory + '/' : ''}${section.slug ? section.slug : getSlug(section.title)}/`
156
156
  )}
157
157
  >
158
- <strong class="d-block h5 mb-2xs">{section.title}</strong>
158
+ <strong class="d-block font-h5 mb-2xs">{section.title}</strong>
159
159
  <span class="fg-subtle">{section.description}</span>
160
160
  </a>
161
161
  </div>
@@ -33,7 +33,7 @@ import { getStaticPath } from '../../site'
33
33
  </p>
34
34
  </div>
35
35
  <div class="col-span-full sm:col-span-4 lg:col-span-2 lg:col-start-7 mb-md">
36
- <p class="h6 mb-xs">Docs</p>
36
+ <p class="font-h6 mb-xs">Docs</p>
37
37
  <ul class="nav">
38
38
  <li>
39
39
  <a href="/tokens">Design Tokens</a>
@@ -56,7 +56,7 @@ import { getStaticPath } from '../../site'
56
56
  </ul>
57
57
  </div>
58
58
  <div class="col-span-full sm:col-span-4 lg:col-span-2 mb-md">
59
- <p class="h6 mb-xs">Github</p>
59
+ <p class="font-h6 mb-xs">Github</p>
60
60
  <ul class="nav">
61
61
  <li>
62
62
  <a href="https://github.com/chassis-ui/tokens">Chassis Tokens</a>
@@ -79,7 +79,7 @@ import { getStaticPath } from '../../site'
79
79
  </ul>
80
80
  </div>
81
81
  <div class="col-span-full sm:col-span-4 lg:col-span-2 mb-md">
82
- <p class="h6 mb-xs">Project</p>
82
+ <p class="font-h6 mb-xs">Project</p>
83
83
  <ul class="nav">
84
84
  <li>
85
85
  <a href="/about">About</a>
@@ -88,7 +88,7 @@
88
88
  }
89
89
 
90
90
  .cxd-subtitle {
91
- @include map-font($font-context-lead, "blockquote");
91
+ @include map-font($font-lead, "blockquote");
92
92
  @include font();
93
93
  }
94
94