@whatsaaaa/design-system 0.0.0-stage → 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.
Files changed (169) hide show
  1. package/LICENSE +51 -0
  2. package/README.md +150 -2
  3. package/assets/building-blocks/apple-touch-icon.png +0 -0
  4. package/assets/building-blocks/favicon-16.png +0 -0
  5. package/assets/building-blocks/favicon-32.png +0 -0
  6. package/assets/building-blocks/favicon.ico +0 -0
  7. package/assets/building-blocks/favicon.svg +1 -0
  8. package/assets/building-blocks/icon-192.png +0 -0
  9. package/assets/building-blocks/icon-512.png +0 -0
  10. package/assets/building-blocks/lockup-dark.svg +1 -0
  11. package/assets/building-blocks/lockup-light.svg +1 -0
  12. package/assets/building-blocks/mark-mono.svg +1 -0
  13. package/assets/building-blocks/mark-on-dark.svg +1 -0
  14. package/assets/building-blocks/mark-on-light.svg +1 -0
  15. package/assets/building-blocks/mark.svg +1 -0
  16. package/assets/building-blocks/readme-header.png +0 -0
  17. package/assets/building-blocks/readme-header.svg +1 -0
  18. package/assets/building-blocks/social-card.png +0 -0
  19. package/assets/building-blocks/social-card.svg +1 -0
  20. package/assets/building-blocks/wordmark-dark.svg +1 -0
  21. package/assets/building-blocks/wordmark-light.svg +1 -0
  22. package/assets/dotfiles/apple-touch-icon.png +0 -0
  23. package/assets/dotfiles/favicon-16.png +0 -0
  24. package/assets/dotfiles/favicon-32.png +0 -0
  25. package/assets/dotfiles/favicon.ico +0 -0
  26. package/assets/dotfiles/favicon.svg +1 -0
  27. package/assets/dotfiles/icon-192.png +0 -0
  28. package/assets/dotfiles/icon-512.png +0 -0
  29. package/assets/dotfiles/lockup-dark.svg +1 -0
  30. package/assets/dotfiles/lockup-light.svg +1 -0
  31. package/assets/dotfiles/mark-mono.svg +1 -0
  32. package/assets/dotfiles/mark-on-dark.svg +1 -0
  33. package/assets/dotfiles/mark-on-light.svg +1 -0
  34. package/assets/dotfiles/mark.svg +1 -0
  35. package/assets/dotfiles/readme-header.png +0 -0
  36. package/assets/dotfiles/readme-header.svg +1 -0
  37. package/assets/dotfiles/social-card.png +0 -0
  38. package/assets/dotfiles/social-card.svg +1 -0
  39. package/assets/dotfiles/wordmark-dark.svg +1 -0
  40. package/assets/dotfiles/wordmark-light.svg +1 -0
  41. package/assets/form-builder/apple-touch-icon.png +0 -0
  42. package/assets/form-builder/favicon-16.png +0 -0
  43. package/assets/form-builder/favicon-32.png +0 -0
  44. package/assets/form-builder/favicon.ico +0 -0
  45. package/assets/form-builder/favicon.svg +1 -0
  46. package/assets/form-builder/icon-192.png +0 -0
  47. package/assets/form-builder/icon-512.png +0 -0
  48. package/assets/form-builder/lockup-dark.svg +1 -0
  49. package/assets/form-builder/lockup-light.svg +1 -0
  50. package/assets/form-builder/mark-mono.svg +1 -0
  51. package/assets/form-builder/mark-on-dark.svg +1 -0
  52. package/assets/form-builder/mark-on-light.svg +1 -0
  53. package/assets/form-builder/mark.svg +1 -0
  54. package/assets/form-builder/readme-header.png +0 -0
  55. package/assets/form-builder/readme-header.svg +1 -0
  56. package/assets/form-builder/social-card.png +0 -0
  57. package/assets/form-builder/social-card.svg +1 -0
  58. package/assets/form-builder/wordmark-dark.svg +1 -0
  59. package/assets/form-builder/wordmark-light.svg +1 -0
  60. package/assets/manifest.json +541 -0
  61. package/assets/whatsaaaa/apple-touch-icon.png +0 -0
  62. package/assets/whatsaaaa/favicon-16.png +0 -0
  63. package/assets/whatsaaaa/favicon-32.png +0 -0
  64. package/assets/whatsaaaa/favicon.ico +0 -0
  65. package/assets/whatsaaaa/favicon.svg +1 -0
  66. package/assets/whatsaaaa/icon-192.png +0 -0
  67. package/assets/whatsaaaa/icon-512.png +0 -0
  68. package/assets/whatsaaaa/lockup-dark.svg +1 -0
  69. package/assets/whatsaaaa/lockup-light.svg +1 -0
  70. package/assets/whatsaaaa/mark-mono.svg +1 -0
  71. package/assets/whatsaaaa/mark-on-dark.svg +1 -0
  72. package/assets/whatsaaaa/mark-on-light.svg +1 -0
  73. package/assets/whatsaaaa/mark.svg +1 -0
  74. package/assets/whatsaaaa/pose-blink-dark.svg +1 -0
  75. package/assets/whatsaaaa/pose-blink-light.svg +1 -0
  76. package/assets/whatsaaaa/pose-idle-dark.svg +1 -0
  77. package/assets/whatsaaaa/pose-idle-light.svg +1 -0
  78. package/assets/whatsaaaa/pose-lost-dark.svg +1 -0
  79. package/assets/whatsaaaa/pose-lost-light.svg +1 -0
  80. package/assets/whatsaaaa/pose-shout-dark.svg +1 -0
  81. package/assets/whatsaaaa/pose-shout-light.svg +1 -0
  82. package/assets/whatsaaaa/pose-wag-left-dark.svg +1 -0
  83. package/assets/whatsaaaa/pose-wag-left-light.svg +1 -0
  84. package/assets/whatsaaaa/pose-wag-right-dark.svg +1 -0
  85. package/assets/whatsaaaa/pose-wag-right-light.svg +1 -0
  86. package/assets/whatsaaaa/readme-header.png +0 -0
  87. package/assets/whatsaaaa/readme-header.svg +1 -0
  88. package/assets/whatsaaaa/social-card.png +0 -0
  89. package/assets/whatsaaaa/social-card.svg +1 -0
  90. package/assets/whatsaaaa/wordmark-dark.svg +1 -0
  91. package/assets/whatsaaaa/wordmark-light.svg +1 -0
  92. package/dist/color.d.ts +5 -0
  93. package/dist/color.js +7 -0
  94. package/dist/css/base.css +50 -0
  95. package/dist/css/callout.css +64 -0
  96. package/dist/css/code.css +50 -0
  97. package/dist/css/ghost.css +93 -0
  98. package/dist/css/icons.css +8 -0
  99. package/dist/css/prose.css +320 -0
  100. package/dist/css/terminal.css +424 -0
  101. package/dist/fonts/inter-latin-ext-wght-italic.woff2 +0 -0
  102. package/dist/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
  103. package/dist/fonts/inter-latin-wght-italic.woff2 +0 -0
  104. package/dist/fonts/inter-latin-wght-normal.woff2 +0 -0
  105. package/dist/fonts/inter.OFL.txt +93 -0
  106. package/dist/fonts/jetbrains-mono-latin-ext-wght-italic.woff2 +0 -0
  107. package/dist/fonts/jetbrains-mono-latin-ext-wght-normal.woff2 +0 -0
  108. package/dist/fonts/jetbrains-mono-latin-wght-italic.woff2 +0 -0
  109. package/dist/fonts/jetbrains-mono-latin-wght-normal.woff2 +0 -0
  110. package/dist/fonts/jetbrains-mono.OFL.txt +93 -0
  111. package/dist/fonts.css +85 -0
  112. package/dist/ghost/bubble.d.ts +16 -0
  113. package/dist/ghost/bubble.js +50 -0
  114. package/dist/ghost/glyphs.d.ts +12 -0
  115. package/dist/ghost/glyphs.js +19 -0
  116. package/dist/ghost/index.d.ts +57 -0
  117. package/dist/ghost/index.js +227 -0
  118. package/dist/identity/ghost.d.ts +28 -0
  119. package/dist/identity/ghost.js +129 -0
  120. package/dist/identity/marks.d.ts +48 -0
  121. package/dist/identity/marks.js +52 -0
  122. package/dist/identity/sprite.d.ts +43 -0
  123. package/dist/identity/sprite.js +100 -0
  124. package/dist/index.css +1404 -0
  125. package/dist/shiki/index.d.ts +20 -0
  126. package/dist/shiki/index.js +64 -0
  127. package/dist/shortcuts/index.d.ts +62 -0
  128. package/dist/shortcuts/index.js +169 -0
  129. package/dist/shortcuts/init.js +2 -0
  130. package/dist/theme/index.d.ts +24 -0
  131. package/dist/theme/index.js +60 -0
  132. package/dist/theme/init.js +2 -0
  133. package/dist/tokens.css +537 -0
  134. package/dist/tokens.d.ts +194 -0
  135. package/dist/tokens.js +336 -0
  136. package/dist/vitepress-config/index.d.ts +16 -0
  137. package/dist/vitepress-config/index.js +36 -0
  138. package/dist/vitepress-config/markdown.d.ts +6 -0
  139. package/dist/vitepress-config/markdown.js +50 -0
  140. package/dist/vitepress-config/types.d.ts +16 -0
  141. package/dist/vitepress-config/types.js +1 -0
  142. package/docs/usage.md +226 -0
  143. package/licenses/README.md +10 -0
  144. package/licenses/departure-mono.OFL.txt +93 -0
  145. package/licenses/rose-pine-palette.LICENSE +21 -0
  146. package/package.json +162 -3
  147. package/src/vitepress/Layout.vue +77 -0
  148. package/src/vitepress/components/Crumb.vue +32 -0
  149. package/src/vitepress/components/NavGhost.vue +23 -0
  150. package/src/vitepress/components/NotFound.vue +22 -0
  151. package/src/vitepress/components/StatusLine.vue +128 -0
  152. package/src/vitepress/env.d.ts +2 -0
  153. package/src/vitepress/index.ts +34 -0
  154. package/src/vitepress/path.ts +19 -0
  155. package/src/vitepress/styles/doc.css +385 -0
  156. package/src/vitepress/styles/home.css +47 -0
  157. package/src/vitepress/styles/layout.css +97 -0
  158. package/src/vitepress/styles/nav.css +441 -0
  159. package/src/vitepress/styles/search.css +55 -0
  160. package/src/vitepress/styles/sidebar.css +173 -0
  161. package/src/vitepress/styles/vars.css +204 -0
  162. package/src/vitepress/support.ts +15 -0
  163. package/src/vitepress/theme.d.ts +8 -0
  164. package/tokens/contrast.json +271 -0
  165. package/tokens/core.tokens.json +743 -0
  166. package/tokens/palette.tokens.json +222 -0
  167. package/tokens/theme-dark.tokens.json +146 -0
  168. package/tokens/theme-light.tokens.json +146 -0
  169. package/tokens/whatsaaaa.resolver.json +43 -0
@@ -0,0 +1,173 @@
1
+ /* Side navigation and the page outline: mono labels, uppercase group headings, a love marker. */
2
+ .VPSidebar.VPSidebar {
3
+ font-family: var(--ws-font-family-mono);
4
+ }
5
+
6
+ .VPSidebar .group + .group {
7
+ border-top: 0;
8
+ padding-top: 0;
9
+ }
10
+
11
+ .VPSidebar .VPSidebarItem.level-0 {
12
+ padding-bottom: var(--ws-space-24);
13
+ }
14
+
15
+ /* group heading */
16
+ .VPSidebar .VPSidebarItem.level-0 > .item .text {
17
+ padding: 0 0 var(--ws-space-8);
18
+ color: var(--ws-color-text-secondary);
19
+ font: var(--ws-text-overline);
20
+ letter-spacing: 0.12em;
21
+ text-transform: uppercase;
22
+ }
23
+
24
+ .VPSidebar .VPSidebarItem.level-0.has-active > .item > .text,
25
+ .VPSidebar .VPSidebarItem.level-0.has-active > .item > .link > .text {
26
+ color: var(--ws-color-text-secondary);
27
+ }
28
+
29
+ /* links */
30
+ .VPSidebar .VPSidebarItem:not(.level-0) > .item > .link > .text,
31
+ .VPSidebar .VPSidebarItem:not(.level-0) > .item > .text {
32
+ padding: var(--ws-space-4) var(--ws-space-12);
33
+ border-left: var(--ws-border-width-medium) solid transparent;
34
+ color: var(--ws-color-text-secondary);
35
+ font: var(--ws-text-label-sm);
36
+ transition: none;
37
+ }
38
+
39
+ .VPSidebar .VPSidebarItem:not(.level-0).is-link > .item > .link:hover .text {
40
+ color: var(--ws-color-text);
41
+ }
42
+
43
+ .VPSidebar .VPSidebarItem:not(.level-0).is-active > .item .link > .text {
44
+ border-left-color: var(--ws-color-brand);
45
+ background: var(--ws-color-raised);
46
+ color: var(--ws-color-text);
47
+ font-weight: var(--ws-font-weight-bold);
48
+ }
49
+
50
+ .VPSidebar .VPSidebarItem .indicator {
51
+ display: none;
52
+ }
53
+
54
+ .VPSidebar .VPSidebarItem .items {
55
+ border-left: 0;
56
+ padding-left: 0;
57
+ }
58
+
59
+ .VPSidebar .VPSidebarItem.level-2 .items,
60
+ .VPSidebar .VPSidebarItem.level-1 .items {
61
+ padding-left: var(--ws-space-12);
62
+ }
63
+
64
+ /* outline */
65
+ .VPDocAside .VPDocAsideOutline .content {
66
+ border-left: var(--ws-border-width-thin) solid var(--ws-color-border);
67
+ padding-left: 0;
68
+ font-family: var(--ws-font-family-mono);
69
+ }
70
+
71
+ .VPDocAside .VPDocAsideOutline .outline-title {
72
+ padding-left: var(--ws-space-12);
73
+ color: var(--ws-color-text-secondary);
74
+ font: var(--ws-text-overline);
75
+ letter-spacing: 0.12em;
76
+ line-height: 2rem;
77
+ text-transform: uppercase;
78
+ }
79
+
80
+ .VPDocAside .VPDocAsideOutline .outline-marker {
81
+ left: -1px;
82
+ width: var(--ws-border-width-thin);
83
+ border-radius: 0;
84
+ background-color: var(--ws-color-brand);
85
+ }
86
+
87
+ .VPDocAside .VPDocOutlineItem .outline-link {
88
+ padding: var(--ws-space-4) var(--ws-space-12);
89
+ overflow: visible;
90
+ color: var(--ws-color-text-secondary);
91
+ font: var(--ws-text-label-sm);
92
+ white-space: normal;
93
+ transition: none;
94
+ }
95
+
96
+ .VPDocAside .VPDocOutlineItem .outline-link:hover,
97
+ .VPDocAside .VPDocOutlineItem .outline-link.active {
98
+ color: var(--ws-color-text);
99
+ }
100
+
101
+ .VPDocAside .VPDocOutlineItem.nested {
102
+ padding-left: var(--ws-space-12);
103
+ }
104
+
105
+ /* the row under the bar on narrow screens: the menu and the outline */
106
+ .VPLocalNav.VPLocalNav {
107
+ border-top: 0;
108
+ border-bottom-color: var(--ws-color-border);
109
+ font-family: var(--ws-font-family-mono);
110
+ }
111
+
112
+ .VPLocalNav .menu,
113
+ .VPLocalNav .VPLocalNavOutlineDropdown > button {
114
+ color: var(--ws-color-text-secondary);
115
+ font: var(--ws-text-label-sm);
116
+ line-height: 2.5rem;
117
+ transition: none;
118
+ }
119
+
120
+ .VPLocalNav .VPLocalNavOutlineDropdown > button {
121
+ padding: 0;
122
+ }
123
+
124
+ .VPLocalNav .VPLocalNavOutlineDropdown .items {
125
+ border: var(--ws-border-width-thin) solid var(--ws-color-border);
126
+ border-radius: var(--ws-radius-lg);
127
+ background: var(--ws-color-surface);
128
+ box-shadow: none;
129
+ }
130
+
131
+ .VPLocalNav .VPLocalNavOutlineDropdown .header {
132
+ background: var(--ws-color-surface);
133
+ }
134
+
135
+ .VPLocalNav .VPLocalNavOutlineDropdown .top-link,
136
+ .VPLocalNav .VPLocalNavOutlineDropdown .outline-link {
137
+ color: var(--ws-color-text-secondary);
138
+ font: var(--ws-text-label-sm);
139
+ line-height: 2rem;
140
+ }
141
+
142
+ .VPLocalNav .VPLocalNavOutlineDropdown .top-link {
143
+ color: var(--ws-color-interactive);
144
+ }
145
+
146
+ @media (width >= 60rem) {
147
+ /*
148
+ * The sidebar keeps one width at every width of the window, and the page starts where it
149
+ * ends. The default theme centers a frame in a wide window and stretches the sidebar to
150
+ * the edge of the window. Here the bars reach from edge to edge, so the sidebar stays at
151
+ * the left and its border stays under the left border of the first tab (see nav.css). Its
152
+ * padding at the sides is the padding of the bar, so its headings start under the brand.
153
+ */
154
+ .VPSidebar.VPSidebar {
155
+ bottom: var(--ws-size-status-line);
156
+ width: var(--vp-sidebar-width);
157
+ padding: calc(var(--vp-nav-height) + var(--ws-space-32)) var(--ws-space-20) var(--ws-space-32);
158
+ border-right: var(--ws-border-width-thin) solid var(--ws-color-border);
159
+ }
160
+
161
+ .VPContent.VPContent.has-sidebar {
162
+ padding-right: 0;
163
+ padding-left: var(--vp-sidebar-width);
164
+ }
165
+
166
+ .VPSidebar .nav {
167
+ padding-top: 0;
168
+ }
169
+
170
+ .VPSidebar .curtain {
171
+ display: none;
172
+ }
173
+ }
@@ -0,0 +1,204 @@
1
+ /*
2
+ * The default theme's variables, pointed at the tokens. The mapping is the same in both
3
+ * themes, because the role tokens change with the theme themselves.
4
+ * Listed for :root and .dark so it wins over the default theme's values for both.
5
+ */
6
+ :root,
7
+ .dark {
8
+ /* page */
9
+ --vp-c-bg: var(--ws-color-bg);
10
+ --vp-c-bg-alt: var(--ws-color-bg);
11
+ --vp-c-bg-elv: var(--ws-color-surface);
12
+ --vp-c-bg-soft: var(--ws-color-surface);
13
+ --vp-c-border: var(--ws-color-field-border);
14
+ --vp-c-divider: var(--ws-color-border);
15
+ --vp-c-gutter: var(--ws-color-border);
16
+ --vp-c-text-1: var(--ws-color-text);
17
+ --vp-c-text-2: var(--ws-color-text-secondary);
18
+ --vp-c-text-3: var(--ws-color-text-faint);
19
+ --vp-c-neutral: var(--ws-color-text);
20
+ --vp-c-neutral-inverse: var(--ws-color-bg);
21
+
22
+ /* "default" is the quiet gray of the default theme: raised chips and hovers */
23
+ --vp-c-default-1: var(--ws-color-border-strong);
24
+ --vp-c-default-2: var(--ws-color-border);
25
+ --vp-c-default-3: var(--ws-color-raised);
26
+ --vp-c-default-soft: var(--ws-color-raised);
27
+
28
+ /* the default theme's "brand" is its link and button color: the interactive role here */
29
+ --vp-c-brand-1: var(--ws-color-interactive);
30
+ --vp-c-brand-2: var(--ws-color-interactive);
31
+ --vp-c-brand-3: var(--ws-color-interactive);
32
+ --vp-c-brand-soft: var(--ws-color-tag-bg);
33
+ --vp-c-tip-1: var(--ws-color-tip);
34
+ --vp-c-tip-2: var(--ws-color-tip);
35
+ --vp-c-tip-3: var(--ws-color-tip);
36
+ --vp-c-tip-soft: var(--ws-color-tip-tint);
37
+ --vp-c-success-1: var(--ws-color-tip);
38
+ --vp-c-success-2: var(--ws-color-tip);
39
+ --vp-c-success-3: var(--ws-color-tip);
40
+ --vp-c-success-soft: var(--ws-color-tip-tint);
41
+ --vp-c-note-1: var(--ws-color-note);
42
+ --vp-c-note-2: var(--ws-color-note);
43
+ --vp-c-note-3: var(--ws-color-note);
44
+ --vp-c-note-soft: var(--ws-color-note-tint);
45
+ --vp-c-important-1: var(--ws-color-note);
46
+ --vp-c-important-2: var(--ws-color-note);
47
+ --vp-c-important-3: var(--ws-color-note);
48
+ --vp-c-important-soft: var(--ws-color-note-tint);
49
+ --vp-c-warning-1: var(--ws-color-warning);
50
+ --vp-c-warning-2: var(--ws-color-warning);
51
+ --vp-c-warning-3: var(--ws-color-warning);
52
+ --vp-c-warning-soft: var(--ws-color-warning-tint);
53
+ --vp-c-danger-1: var(--ws-color-danger);
54
+ --vp-c-danger-2: var(--ws-color-danger);
55
+ --vp-c-danger-3: var(--ws-color-danger);
56
+ --vp-c-danger-soft: var(--ws-color-danger-tint);
57
+ --vp-c-caution-1: var(--ws-color-danger);
58
+ --vp-c-caution-2: var(--ws-color-danger);
59
+ --vp-c-caution-3: var(--ws-color-danger);
60
+ --vp-c-caution-soft: var(--ws-color-danger-tint);
61
+
62
+ /* type */
63
+ --vp-font-family-base: var(--ws-font-family-sans);
64
+ --vp-font-family-mono: var(--ws-font-family-mono);
65
+
66
+ /* flat: borders separate things, not shadows */
67
+ --vp-shadow-1: none;
68
+ --vp-shadow-2: none;
69
+ --vp-shadow-3: 0 0 0 1px var(--ws-color-border);
70
+ --vp-shadow-4: 0 0 0 1px var(--ws-color-border);
71
+ --vp-shadow-5: 0 0 0 1px var(--ws-color-border);
72
+
73
+ /* layout */
74
+ --vp-layout-max-width: var(--ws-size-frame);
75
+ --vp-nav-height: var(--ws-size-tab-bar);
76
+ --vp-nav-logo-height: 1.5rem;
77
+ --vp-nav-bg-color: var(--ws-color-bg);
78
+ --vp-nav-screen-bg-color: var(--ws-color-bg);
79
+ --vp-local-nav-bg-color: var(--ws-color-bg);
80
+ --vp-sidebar-width: var(--ws-size-sidebar);
81
+ --vp-sidebar-bg-color: var(--ws-color-bg);
82
+ --vp-backdrop-bg-color: color-mix(in srgb, var(--ws-palette-main-base) 70%, transparent);
83
+
84
+ /* code: dark in both themes */
85
+ --vp-code-line-height: var(--ws-text-code-line-height);
86
+ --vp-code-font-size: 0.8125em;
87
+ --vp-code-color: var(--ws-color-text);
88
+ --vp-code-link-color: var(--ws-color-interactive);
89
+ --vp-code-link-hover-color: var(--ws-color-interactive);
90
+ --vp-code-bg: var(--ws-color-raised);
91
+ --vp-code-block-color: var(--ws-code-text);
92
+ --vp-code-block-bg: var(--ws-code-bg);
93
+ --vp-code-block-divider-color: var(--ws-code-border);
94
+ --vp-code-lang-color: var(--ws-code-text-secondary);
95
+ --vp-code-line-highlight-color: var(--ws-code-line-highlight);
96
+ --vp-code-line-number-color: var(--ws-code-text-secondary);
97
+ --vp-code-line-diff-add-color: var(--ws-code-line-added);
98
+ --vp-code-line-diff-add-symbol-color: var(--ws-syntax-type);
99
+ --vp-code-line-diff-remove-color: var(--ws-code-line-removed);
100
+ --vp-code-line-diff-remove-symbol-color: var(--ws-syntax-keyword);
101
+ --vp-code-line-warning-color: color-mix(in srgb, var(--ws-syntax-string) 14%, transparent);
102
+ --vp-code-line-error-color: var(--ws-code-line-removed);
103
+ --vp-code-copy-code-border-color: var(--ws-code-border);
104
+ --vp-code-copy-code-bg: var(--ws-code-header-bg);
105
+ --vp-code-copy-code-hover-border-color: var(--ws-code-text-secondary);
106
+ --vp-code-copy-code-hover-bg: var(--ws-code-header-bg);
107
+ --vp-code-copy-code-active-text: var(--ws-code-text-secondary);
108
+ --vp-code-tab-divider: var(--ws-code-border);
109
+ --vp-code-tab-text-color: var(--ws-code-text-secondary);
110
+ --vp-code-tab-bg: var(--ws-code-header-bg);
111
+ --vp-code-tab-hover-text-color: var(--ws-code-text);
112
+ --vp-code-tab-active-text-color: var(--ws-code-text);
113
+ --vp-code-tab-active-bar-color: var(--ws-palette-main-love);
114
+
115
+ /* buttons: the primary one is filled with the interactive color */
116
+ --vp-button-brand-border: transparent;
117
+ --vp-button-brand-text: var(--ws-color-on-interactive);
118
+ --vp-button-brand-bg: var(--ws-color-interactive);
119
+ --vp-button-brand-hover-border: transparent;
120
+ --vp-button-brand-hover-text: var(--ws-color-on-interactive);
121
+ --vp-button-brand-hover-bg: var(--ws-color-interactive);
122
+ --vp-button-brand-active-border: transparent;
123
+ --vp-button-brand-active-text: var(--ws-color-on-interactive);
124
+ --vp-button-brand-active-bg: var(--ws-color-interactive);
125
+ --vp-button-alt-border: var(--ws-color-field-border);
126
+ --vp-button-alt-text: var(--ws-color-text);
127
+ --vp-button-alt-bg: transparent;
128
+ --vp-button-alt-hover-border: var(--ws-color-text);
129
+ --vp-button-alt-hover-text: var(--ws-color-text);
130
+ --vp-button-alt-hover-bg: transparent;
131
+ --vp-button-alt-active-border: var(--ws-color-text);
132
+ --vp-button-alt-active-text: var(--ws-color-text);
133
+ --vp-button-alt-active-bg: var(--ws-color-raised);
134
+
135
+ /* callouts: the label follows the theme, the bar and tint carry the hue */
136
+ --vp-custom-block-font-size: var(--ws-font-size-16);
137
+ --vp-custom-block-code-font-size: 0.8125em;
138
+ --vp-custom-block-info-border: transparent;
139
+ --vp-custom-block-info-text: var(--ws-color-text);
140
+ --vp-custom-block-info-bg: var(--ws-color-note-tint);
141
+ --vp-custom-block-info-code-bg: var(--ws-color-raised);
142
+ --vp-custom-block-note-border: transparent;
143
+ --vp-custom-block-note-text: var(--ws-color-text);
144
+ --vp-custom-block-note-bg: var(--ws-color-note-tint);
145
+ --vp-custom-block-note-code-bg: var(--ws-color-raised);
146
+ --vp-custom-block-tip-border: transparent;
147
+ --vp-custom-block-tip-text: var(--ws-color-text);
148
+ --vp-custom-block-tip-bg: var(--ws-color-tip-tint);
149
+ --vp-custom-block-tip-code-bg: var(--ws-color-raised);
150
+ --vp-custom-block-important-border: transparent;
151
+ --vp-custom-block-important-text: var(--ws-color-text);
152
+ --vp-custom-block-important-bg: var(--ws-color-note-tint);
153
+ --vp-custom-block-important-code-bg: var(--ws-color-raised);
154
+ --vp-custom-block-warning-border: transparent;
155
+ --vp-custom-block-warning-text: var(--ws-color-text);
156
+ --vp-custom-block-warning-bg: var(--ws-color-warning-tint);
157
+ --vp-custom-block-warning-code-bg: var(--ws-color-raised);
158
+ --vp-custom-block-danger-border: transparent;
159
+ --vp-custom-block-danger-text: var(--ws-color-text);
160
+ --vp-custom-block-danger-bg: var(--ws-color-danger-tint);
161
+ --vp-custom-block-danger-code-bg: var(--ws-color-raised);
162
+ --vp-custom-block-caution-border: transparent;
163
+ --vp-custom-block-caution-text: var(--ws-color-text);
164
+ --vp-custom-block-caution-bg: var(--ws-color-danger-tint);
165
+ --vp-custom-block-caution-code-bg: var(--ws-color-raised);
166
+ --vp-custom-block-details-border: transparent;
167
+ --vp-custom-block-details-text: var(--ws-color-text);
168
+ --vp-custom-block-details-bg: var(--ws-color-surface);
169
+ --vp-custom-block-details-code-bg: var(--ws-color-raised);
170
+
171
+ /* inputs and the appearance switch */
172
+ --vp-input-border-color: var(--ws-color-field-border);
173
+ --vp-input-bg-color: var(--ws-color-surface);
174
+ --vp-input-switch-bg-color: var(--ws-color-raised);
175
+
176
+ /* home */
177
+ --vp-home-hero-name-color: var(--ws-color-text);
178
+ --vp-home-hero-name-background: none;
179
+ --vp-home-hero-image-background-image: none;
180
+ --vp-home-hero-image-filter: none;
181
+
182
+ /* badges */
183
+ --vp-badge-info-border: transparent;
184
+ --vp-badge-info-text: var(--ws-color-text);
185
+ --vp-badge-info-bg: var(--ws-color-raised);
186
+ --vp-badge-tip-border: transparent;
187
+ --vp-badge-tip-text: var(--ws-color-tag-text);
188
+ --vp-badge-tip-bg: var(--ws-color-tag-bg);
189
+ --vp-badge-warning-border: transparent;
190
+ --vp-badge-warning-text: var(--ws-color-text);
191
+ --vp-badge-warning-bg: var(--ws-color-warning-tint);
192
+ --vp-badge-danger-border: transparent;
193
+ --vp-badge-danger-text: var(--ws-color-text);
194
+ --vp-badge-danger-bg: var(--ws-color-danger-tint);
195
+
196
+ /* local search */
197
+ --vp-local-search-bg: var(--ws-color-surface);
198
+ --vp-local-search-result-bg: var(--ws-color-surface);
199
+ --vp-local-search-result-border: var(--ws-color-border);
200
+ --vp-local-search-result-selected-bg: var(--ws-color-raised);
201
+ --vp-local-search-result-selected-border: var(--ws-color-interactive);
202
+ --vp-local-search-highlight-bg: var(--ws-color-brand-fill);
203
+ --vp-local-search-highlight-text: var(--ws-color-on-brand);
204
+ }
@@ -0,0 +1,15 @@
1
+ /** A path the way VitePress compares it: no query, hash or extension, and an index page as its folder. */
2
+ const normalize = (path: string) =>
3
+ path.replace(/[?#].*$/, '').replace(/(?:(^|\/)index)?\.(?:md|html)$/, '$1')
4
+
5
+ const withoutSlash = (path: string) => path.replace(/\/$/, '')
6
+
7
+ /**
8
+ * Whether a nav or sidebar link points at the page with this relative path.
9
+ * With `asRegex` the link is the `activeMatch` pattern of a nav item.
10
+ */
11
+ export function isActiveLink(relativePath: string, link: string, asRegex = false): boolean {
12
+ const current = normalize(`/${relativePath}`)
13
+ if (asRegex) return new RegExp(link).test(current)
14
+ return withoutSlash(current) === withoutSlash(normalize(link.replace(/^\/?/, '/')))
15
+ }
@@ -0,0 +1,8 @@
1
+ // The types of index.ts, for a site's type checker. index.ts imports stylesheets and .vue
2
+ // files, which only the site's bundler reads, so the export points the checker here instead.
3
+ import type { Theme } from 'vitepress'
4
+
5
+ export type { ThemeConfig, WhatsaaaaThemeConfig } from '../../dist/vitepress-config/types.js'
6
+
7
+ declare const theme: Theme
8
+ export default theme
@@ -0,0 +1,271 @@
1
+ {
2
+ "note": "The color pairs the system relies on, with the WCAG 2 contrast each one has to reach in both themes: 4.5 for text, 3 for large type, outlines and graphics. A pair listed under `below` in a theme is known to miss its bar there, and says how the meaning is carried instead.",
3
+ "pairs": [
4
+ {
5
+ "foreground": "color.text",
6
+ "background": "color.bg",
7
+ "min": 4.5,
8
+ "use": "Body text and headings on the page"
9
+ },
10
+ {
11
+ "foreground": "color.text",
12
+ "background": "color.surface",
13
+ "min": 4.5,
14
+ "use": "Text on panels and cards"
15
+ },
16
+ {
17
+ "foreground": "color.text",
18
+ "background": "color.raised",
19
+ "min": 4.5,
20
+ "use": "Inline code and the current navigation item"
21
+ },
22
+ {
23
+ "foreground": "color.text",
24
+ "background": "color.selection",
25
+ "min": 4.5,
26
+ "use": "Selected text"
27
+ },
28
+ {
29
+ "foreground": "color.text-secondary",
30
+ "background": "color.bg",
31
+ "min": 4.5,
32
+ "use": "Descriptions, captions and idle navigation"
33
+ },
34
+ {
35
+ "foreground": "color.text-secondary",
36
+ "background": "color.surface",
37
+ "min": 4.5,
38
+ "use": "Secondary text on panels and table heads"
39
+ },
40
+ {
41
+ "foreground": "color.text-secondary",
42
+ "background": "color.raised",
43
+ "min": 4.5,
44
+ "use": "Secondary text on a raised chip"
45
+ },
46
+ {
47
+ "foreground": "color.text-faint",
48
+ "background": "color.bg",
49
+ "min": 3,
50
+ "use": "Idle indicators, tab numbers and disabled text. Never body text"
51
+ },
52
+ {
53
+ "foreground": "color.field-border",
54
+ "background": "color.surface",
55
+ "min": 3,
56
+ "use": "Outlines of inputs and buttons"
57
+ },
58
+ {
59
+ "foreground": "color.field-border",
60
+ "background": "color.bg",
61
+ "min": 3,
62
+ "use": "Outlines of inputs and buttons on the page"
63
+ },
64
+ {
65
+ "foreground": "color.brand",
66
+ "background": "color.bg",
67
+ "min": 3,
68
+ "use": "The tongue, cursor, prompt chevron and heading hash. Graphics and large type"
69
+ },
70
+ {
71
+ "foreground": "color.brand",
72
+ "background": "color.surface",
73
+ "min": 3,
74
+ "use": "Brand marks on a panel"
75
+ },
76
+ {
77
+ "foreground": "color.on-brand",
78
+ "background": "color.brand-fill",
79
+ "min": 4.5,
80
+ "use": "Small text on the brand fill, such as the mode of the status line"
81
+ },
82
+ {
83
+ "foreground": "color.interactive",
84
+ "background": "color.bg",
85
+ "min": 4.5,
86
+ "use": "Links and the focus ring"
87
+ },
88
+ {
89
+ "foreground": "color.interactive",
90
+ "background": "color.surface",
91
+ "min": 4.5,
92
+ "use": "Links on panels"
93
+ },
94
+ {
95
+ "foreground": "color.on-interactive",
96
+ "background": "color.interactive",
97
+ "min": 4.5,
98
+ "use": "The label of a primary button"
99
+ },
100
+ { "foreground": "color.tag-text", "background": "color.tag-bg", "min": 4.5, "use": "Tags" },
101
+ {
102
+ "foreground": "color.tip",
103
+ "background": "color.bg",
104
+ "min": 3,
105
+ "use": "Tip: bar and the active dot"
106
+ },
107
+ { "foreground": "color.note", "background": "color.bg", "min": 3, "use": "Note: bar" },
108
+ {
109
+ "foreground": "color.warning",
110
+ "background": "color.bg",
111
+ "min": 3,
112
+ "use": "Warning: bar and the experimental dot",
113
+ "below": {
114
+ "light": "Dawn gold cannot reach 3:1 on a light page. The bar and the dot never carry the meaning alone: the label, the icon and the word next to the dot are set in the text color."
115
+ }
116
+ },
117
+ { "foreground": "color.danger", "background": "color.bg", "min": 3, "use": "Danger: bar" },
118
+ {
119
+ "foreground": "color.danger",
120
+ "background": "color.surface",
121
+ "min": 3,
122
+ "use": "The border of a field with an error"
123
+ },
124
+ {
125
+ "foreground": "color.tip-text",
126
+ "background": "color.tip-tint",
127
+ "min": 4.5,
128
+ "use": "Tip: label"
129
+ },
130
+ {
131
+ "foreground": "color.note-text",
132
+ "background": "color.note-tint",
133
+ "min": 4.5,
134
+ "use": "Note: label"
135
+ },
136
+ {
137
+ "foreground": "color.warning-text",
138
+ "background": "color.warning-tint",
139
+ "min": 4.5,
140
+ "use": "Warning: label"
141
+ },
142
+ {
143
+ "foreground": "color.danger-text",
144
+ "background": "color.danger-tint",
145
+ "min": 4.5,
146
+ "use": "Danger: label"
147
+ },
148
+ {
149
+ "foreground": "color.danger-text",
150
+ "background": "color.surface",
151
+ "min": 4.5,
152
+ "use": "Error message under a field"
153
+ },
154
+ {
155
+ "foreground": "color.text",
156
+ "background": "color.tip-tint",
157
+ "min": 4.5,
158
+ "use": "Text in a tip"
159
+ },
160
+ {
161
+ "foreground": "color.text",
162
+ "background": "color.note-tint",
163
+ "min": 4.5,
164
+ "use": "Text in a note"
165
+ },
166
+ {
167
+ "foreground": "color.text",
168
+ "background": "color.warning-tint",
169
+ "min": 4.5,
170
+ "use": "Text in a warning"
171
+ },
172
+ {
173
+ "foreground": "color.text",
174
+ "background": "color.danger-tint",
175
+ "min": 4.5,
176
+ "use": "Text in a danger block"
177
+ },
178
+ {
179
+ "foreground": "color.interactive",
180
+ "background": "color.tip-tint",
181
+ "min": 4.5,
182
+ "use": "Links in a tip"
183
+ },
184
+ {
185
+ "foreground": "color.interactive",
186
+ "background": "color.note-tint",
187
+ "min": 4.5,
188
+ "use": "Links in a note"
189
+ },
190
+ {
191
+ "foreground": "color.interactive",
192
+ "background": "color.warning-tint",
193
+ "min": 4.5,
194
+ "use": "Links in a warning"
195
+ },
196
+ {
197
+ "foreground": "color.interactive",
198
+ "background": "color.danger-tint",
199
+ "min": 4.5,
200
+ "use": "Links in a danger block"
201
+ },
202
+ {
203
+ "foreground": "mark.body",
204
+ "background": "mark.tile",
205
+ "min": 3,
206
+ "use": "The mark on its tile"
207
+ },
208
+ {
209
+ "foreground": "mark.tongue",
210
+ "background": "mark.tile",
211
+ "min": 3,
212
+ "use": "The love element on the tile"
213
+ },
214
+ { "foreground": "code.text", "background": "code.bg", "min": 4.5, "use": "Code" },
215
+ {
216
+ "foreground": "code.text",
217
+ "background": "code.line-highlight",
218
+ "min": 4.5,
219
+ "over": "code.bg",
220
+ "use": "Code on a highlighted line"
221
+ },
222
+ {
223
+ "foreground": "code.text",
224
+ "background": "code.line-added",
225
+ "min": 4.5,
226
+ "over": "code.bg",
227
+ "use": "Code on an added line"
228
+ },
229
+ {
230
+ "foreground": "code.text",
231
+ "background": "code.line-removed",
232
+ "min": 4.5,
233
+ "over": "code.bg",
234
+ "use": "Code on a removed line"
235
+ },
236
+ {
237
+ "foreground": "code.text-secondary",
238
+ "background": "code.bg",
239
+ "min": 4.5,
240
+ "use": "Line numbers"
241
+ },
242
+ {
243
+ "foreground": "code.text-secondary",
244
+ "background": "code.header-bg",
245
+ "min": 4.5,
246
+ "use": "File name and language in the caption"
247
+ },
248
+ { "foreground": "syntax.keyword", "background": "code.bg", "min": 4.5, "use": "Keywords" },
249
+ { "foreground": "syntax.string", "background": "code.bg", "min": 4.5, "use": "Strings" },
250
+ { "foreground": "syntax.function", "background": "code.bg", "min": 4.5, "use": "Functions" },
251
+ {
252
+ "foreground": "syntax.type",
253
+ "background": "code.bg",
254
+ "min": 4.5,
255
+ "use": "Types, tags and keys"
256
+ },
257
+ {
258
+ "foreground": "syntax.constant",
259
+ "background": "code.bg",
260
+ "min": 4.5,
261
+ "use": "Numbers and constants"
262
+ },
263
+ { "foreground": "syntax.comment", "background": "code.bg", "min": 4.5, "use": "Comments" },
264
+ {
265
+ "foreground": "syntax.punctuation",
266
+ "background": "code.bg",
267
+ "min": 4.5,
268
+ "use": "Punctuation"
269
+ }
270
+ ]
271
+ }