@meddleware/vitepress-theme 0.0.1 → 0.0.2

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
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.0.2] - 2026-11-01
9
+
10
+ ### Changed
11
+
12
+ - The fixture's accessibility gate is the shared sweep (`defineA11ySuite`): besides axe at AA and AAA in every colour mode × season it now
13
+ checks reflow at 320 px, 200% text, forced colours, reduced motion and the keyboard (focus visible and not hidden behind the fixed navigation bar).
14
+ - `SECURITY.md` is part of the published files.
15
+ - **The footer no longer lies under the sidebar.** VitePress's own footer hides on a page with a sidebar; ours stays (it holds the legal links), and the fixed full-height sidebar covered its left edge from 60rem, so the © link could not be seen when focused (WCAG 2.4.11). On such a page the footer now starts where the content does, with VitePress's own offsets. Three width tests in every browser hold it.
16
+ - VitePress 2.0.0-alpha.21 (peer and development pin; the landmark edits and the fixture sweep pass unchanged).
17
+
8
18
  ## [0.0.1] - 2026-10-31
9
19
 
10
20
  ### Added
package/SECURITY.md ADDED
@@ -0,0 +1,31 @@
1
+ # Security Policy
2
+
3
+ ## Scope
4
+
5
+ This policy covers `@meddleware/vitepress-theme`: the VitePress theme and site config for MeddleWare documentation sites. It runs at
6
+ build time (the config, and a Vite plugin that edits two components of VitePress's default theme as they compile) and in the browser
7
+ (the theme's components and CSS). It makes no network requests of its own and handles no user data.
8
+
9
+ It does not cover a consuming site, VitePress, or the content a site publishes.
10
+
11
+ ## What it guarantees
12
+
13
+ The theme maps VitePress's colours onto the design tokens and fixes two landmark problems in the default theme; its accessibility
14
+ checks are automated (axe, WCAG 2.2 AA and AAA) over a fixture site and are not a substitute for testing a real site with assistive
15
+ technology. The landmark edits are exact string replacements that fail the build, naming the file, if VitePress changes the text they
16
+ rely on.
17
+
18
+ ## Supply chain
19
+
20
+ Releases are published from this repository's `npm-publish.yml` with npm trusted publishing (OIDC and provenance); tokens are not
21
+ used. The Vite plugin runs in a consumer's build, so a compromised release could run code there: report anything that suggests
22
+ tampering.
23
+
24
+ ## Supported versions
25
+
26
+ Only the latest published npm version receives fixes.
27
+
28
+ ## Reporting a vulnerability
29
+
30
+ Please **do not** open a public GitHub issue for security vulnerabilities. Use GitHub's private vulnerability reporting for this
31
+ repository, or email dev@meddleware.co.uk.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meddleware/vitepress-theme",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "type": "module",
5
5
  "description": "The Meddleware VitePress theme and config: the default theme mapped onto the design tokens (colour mode, seasons, WCAG AAA contrast), a footer, and a shared site config.",
6
6
  "license": "0BSD",
@@ -18,7 +18,8 @@
18
18
  "files": [
19
19
  "src",
20
20
  "dist",
21
- "CHANGELOG.md"
21
+ "CHANGELOG.md",
22
+ "SECURITY.md"
22
23
  ],
23
24
  "exports": {
24
25
  ".": {
@@ -52,15 +53,15 @@
52
53
  "shots": "SHOTS=1 playwright test"
53
54
  },
54
55
  "peerDependencies": {
55
- "@meddleware/design-tokens": "^0.1.12",
56
- "@meddleware/ui": "^0.1.36",
57
- "vitepress": "2.0.0-alpha.20",
56
+ "@meddleware/design-tokens": "^0.1.13",
57
+ "@meddleware/ui": "^0.1.38",
58
+ "vitepress": "2.0.0-alpha.21",
58
59
  "vue": "^3.5.0"
59
60
  },
60
61
  "devDependencies": {
61
- "@meddleware/design-tokens": "^0.1.12",
62
- "@meddleware/frontend-config": "^0.0.1",
63
- "@meddleware/ui": "^0.1.36",
62
+ "@meddleware/design-tokens": "^0.1.13",
63
+ "@meddleware/frontend-config": "^0.0.2",
64
+ "@meddleware/ui": "^0.1.38",
64
65
  "@playwright/test": "~1.64.1",
65
66
  "@types/node": "~26.6.5",
66
67
  "@vue/eslint-config-typescript": "^14.9.0",
@@ -76,7 +77,7 @@
76
77
  "stylelint": "^17.16.0",
77
78
  "stylelint-config-standard": "^40.0.0",
78
79
  "typescript": "~6.0.0",
79
- "vitepress": "2.0.0-alpha.20",
80
+ "vitepress": "2.0.0-alpha.21",
80
81
  "vitest": "~5.0.5",
81
82
  "vue": "^3.5.44",
82
83
  "vue-eslint-parser": "^10.4.1",
@@ -1,17 +1,22 @@
1
1
  <script setup lang="ts">
2
2
  // The default layout with the Meddleware footer: the copyright line and the contact of the organisation, in a `contentinfo` landmark.
3
- import DefaultTheme from 'vitepress/theme'
3
+ import DefaultTheme, { useLayout } from 'vitepress/theme'
4
4
  import { AppFooter, CopyrightLine } from '@meddleware/ui'
5
5
 
6
6
  const { Layout } = DefaultTheme
7
+ // VitePress's own footer hides itself on a page with a sidebar. This one stays (it carries the legal links), so on such a page it starts
8
+ // where the content does, as the content does (theme.css), instead of lying under the fixed sidebar (WCAG 2.4.11).
9
+ const { hasSidebar } = useLayout()
7
10
  </script>
8
11
 
9
12
  <template>
10
13
  <Layout>
11
14
  <template #layout-bottom>
12
- <AppFooter>
13
- <CopyrightLine symbol-variant="kopimi" organisation-name="Meddleware" rights-statement="jam" />
14
- </AppFooter>
15
+ <div class="mw-layout-footer" :class="{ 'has-sidebar': hasSidebar }">
16
+ <AppFooter>
17
+ <CopyrightLine symbol-variant="kopimi" organisation-name="Meddleware" rights-statement="jam" />
18
+ </AppFooter>
19
+ </div>
15
20
  </template>
16
21
  </Layout>
17
22
  </template>
package/src/theme.css CHANGED
@@ -150,3 +150,17 @@ a.VPFeature .title,
150
150
  a.VPFeature .link-text {
151
151
  text-decoration: underline;
152
152
  }
153
+
154
+ /* The footer is below the page content, and the sidebar is fixed and runs the full height of the viewport (from 60rem): on a page that has
155
+ * one, the footer starts where the content does (the same offsets as VitePress's VPContent), or its links are covered. */
156
+ @media (width >= 60rem) {
157
+ .mw-layout-footer.has-sidebar {
158
+ padding-inline-start: var(--vp-sidebar-width);
159
+ }
160
+ }
161
+
162
+ @media (width >= 90rem) {
163
+ .mw-layout-footer.has-sidebar {
164
+ padding-inline-start: calc((100% - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width));
165
+ }
166
+ }