@astrojs/starlight 0.22.3 → 0.23.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 +49 -0
- package/__e2e__/fixtures/basics/node_modules/.bin/astro +2 -2
- package/__e2e__/fixtures/basics/package.json +1 -1
- package/components/Icons.ts +3 -0
- package/index.ts +9 -2
- package/package.json +6 -6
- package/schemas/social.ts +2 -0
- package/style/asides.css +5 -5
- package/style/markdown.css +74 -0
- package/translations/tr.json +6 -6
- package/user-components/Tabs.astro +1 -0
- package/utils/translations.ts +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,54 @@
|
|
|
1
1
|
# @astrojs/starlight
|
|
2
2
|
|
|
3
|
+
## 0.23.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1846](https://github.com/withastro/starlight/pull/1846) [`2de67039`](https://github.com/withastro/starlight/commit/2de6703971908cfc0df2915ebf89a63e0141f954) Thanks [@delucis](https://github.com/delucis)! - Updates `@astrojs/mdx` to v3 and enables MDX optimization by default
|
|
8
|
+
|
|
9
|
+
⚠️ **Potentially breaking change:** MDX optimization speeds up builds (Starlight’s docs are building ~40% faster for example), but restricts some advanced MDX features. See full details in the [MDX optimization documentation](https://docs.astro.build/en/guides/integrations-guide/mdx/#optimize).
|
|
10
|
+
|
|
11
|
+
Most Starlight users should be unaffected, but if you are using MDX files outside of Starlight pages with the `components` prop, you may see issues. You can disable optimization by adding MDX manually to your `integrations` array in `astro.config.mjs`:
|
|
12
|
+
|
|
13
|
+
```diff
|
|
14
|
+
import { defineConfig } from 'astro/config';
|
|
15
|
+
+ import mdx from '@astrojs/mdx';
|
|
16
|
+
import starlight from '@astrojs/starlight';
|
|
17
|
+
|
|
18
|
+
// https://astro.build/config
|
|
19
|
+
export default defineConfig({
|
|
20
|
+
integrations: [
|
|
21
|
+
starlight({
|
|
22
|
+
title: 'My docs',
|
|
23
|
+
// ...
|
|
24
|
+
}),
|
|
25
|
+
+ mdx(),
|
|
26
|
+
],
|
|
27
|
+
});
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
- [#1735](https://github.com/withastro/starlight/pull/1735) [`1a9ab50d`](https://github.com/withastro/starlight/commit/1a9ab50d458d6274994ffe66a23fe7a30681337a) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Adds custom styles for `<details>` and `<summary>` elements in Markdown content.
|
|
31
|
+
|
|
32
|
+
- [#1846](https://github.com/withastro/starlight/pull/1846) [`2de67039`](https://github.com/withastro/starlight/commit/2de6703971908cfc0df2915ebf89a63e0141f954) Thanks [@delucis](https://github.com/delucis)! - ⚠️ **BREAKING CHANGE:** The minimum supported version of Astro is now 4.8.6
|
|
33
|
+
|
|
34
|
+
Please update Astro and Starlight together:
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
npx @astrojs/upgrade
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## 0.22.4
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- [#1871](https://github.com/withastro/starlight/pull/1871) [`03bb126b`](https://github.com/withastro/starlight/commit/03bb126b74d9adaba1be2f0df3f34566815dd77f) Thanks [@delucis](https://github.com/delucis)! - Adds a `blueSky` icon and social link option
|
|
45
|
+
|
|
46
|
+
- [#1873](https://github.com/withastro/starlight/pull/1873) [`13f33b81`](https://github.com/withastro/starlight/commit/13f33b81fd51d18165eb52f2a0c02b890084e4bd) Thanks [@ekfuhrmann](https://github.com/ekfuhrmann)! - Adds 1 new icon: `alpine`
|
|
47
|
+
|
|
48
|
+
- [#1857](https://github.com/withastro/starlight/pull/1857) [`32cdfaf0`](https://github.com/withastro/starlight/commit/32cdfaf0155e65ff6fbe9c0cfacd6969ab0015d9) Thanks [@tarikcoskun](https://github.com/tarikcoskun)! - Updates Turkish UI translations
|
|
49
|
+
|
|
50
|
+
- [#1736](https://github.com/withastro/starlight/pull/1736) [`cfa94a34`](https://github.com/withastro/starlight/commit/cfa94a346ef10804b90db28d217be175e1c1d5ed) Thanks [@julien-deramond](https://github.com/julien-deramond)! - Prevent list items from overflowing Markdown content
|
|
51
|
+
|
|
3
52
|
## 0.22.3
|
|
4
53
|
|
|
5
54
|
### Patch Changes
|
|
@@ -6,9 +6,9 @@ case `uname` in
|
|
|
6
6
|
esac
|
|
7
7
|
|
|
8
8
|
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/home/runner/work/starlight/starlight/node_modules/.pnpm/astro@4.
|
|
9
|
+
export NODE_PATH="/home/runner/work/starlight/starlight/node_modules/.pnpm/astro@4.8.6_@types+node@18.16.19_typescript@5.4.5/node_modules/astro/node_modules:/home/runner/work/starlight/starlight/node_modules/.pnpm/astro@4.8.6_@types+node@18.16.19_typescript@5.4.5/node_modules:/home/runner/work/starlight/starlight/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/starlight/starlight/node_modules/.pnpm/astro@4.
|
|
11
|
+
export NODE_PATH="/home/runner/work/starlight/starlight/node_modules/.pnpm/astro@4.8.6_@types+node@18.16.19_typescript@5.4.5/node_modules/astro/node_modules:/home/runner/work/starlight/starlight/node_modules/.pnpm/astro@4.8.6_@types+node@18.16.19_typescript@5.4.5/node_modules:/home/runner/work/starlight/starlight/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
14
|
exec "$basedir/node" "$basedir/../astro/astro.js" "$@"
|
package/components/Icons.ts
CHANGED
|
@@ -119,8 +119,11 @@ export const BuiltInIcons = {
|
|
|
119
119
|
'<path d="M7.2 0Q6.5 0 6 .3a1 1 0 0 0-.4.8v21.8q0 .4.4.7.5.4 1.2.4t1.2-.3q.5-.4.5-.8V1c0-.3-.2-.6-.5-.8Q7.9 0 7.2 0m9.5 8.7q-.7 0-1.1.3L11 11.7c-.2.2-.3.5-.2.9q0 .6.5 1c.3.4.7.7 1 .7q.7.2 1-.1l1.7-1v9.7q0 .4.5.7c.3.3.7.4 1.1.4q.7 0 1.2-.3c.4-.3.5-.5.5-.8V9.7q0-.4-.5-.7-.4-.3-1.2-.3"/>',
|
|
120
120
|
openCollective:
|
|
121
121
|
'<path d="M21.86 5.17a11.94 11.94 0 0 1 0 13.66l-3.1-3.1a7.68 7.68 0 0 0 0-7.46l3.1-3.1Zm-3.03-3.03-3.1 3.1a7.71 7.71 0 1 0 0 13.51l3.1 3.11a12 12 0 1 1 0-19.73Z"/><path d="M21.86 5.17a11.94 11.94 0 0 1 0 13.66l-3.1-3.1a7.68 7.68 0 0 0 0-7.46l3.1-3.1Z"/>',
|
|
122
|
+
blueSky:
|
|
123
|
+
'<path d="M12 10.8c-1-2.1-4-6-6.8-8C2.6 1 1.6 1.3.9 1.6.1 1.9 0 3 0 3.8c0 .7.4 5.6.6 6.4C1.4 13 4.3 14 7 13.6h.4H7c-4 .6-7.4 2-2.8 7 5 5.3 6.8-1 7.8-4.2 1 3.2 2 9.3 7.7 4.3 4.3-4.3 1.2-6.5-2.7-7a9 9 0 0 1-.4-.1h.4c2.7.3 5.6-.6 6.4-3.4.2-.8.6-5.7.6-6.4 0-.7-.1-1.9-.9-2.2-.7-.3-1.7-.7-4.3 1.2-2.8 2-5.7 5.9-6.8 8"/>',
|
|
122
124
|
astro:
|
|
123
125
|
'<path d="M7.233 15.856c-.456 1.5-.132 3.586.948 4.57v-.036l.036-.096c.132-.636.648-1.032 1.309-1.008.612.012.96.336 1.044 1.044.036.264.036.528.048.803v.084c0 .6.168 1.176.504 1.68.3.48.72.851 1.284 1.103l-.024-.048-.024-.096c-.42-1.26-.12-2.135.984-2.879l.336-.227.745-.492a3.647 3.647 0 0 0 1.536-2.603c.06-.456 0-.9-.132-1.331l-.18.12c-1.668.887-3.577 1.2-5.425.84-1.117-.169-2.197-.48-3-1.416l.011-.012ZM2 15.592s3.205-1.559 6.421-1.559l2.437-7.508c.084-.36.348-.6.648-.6.3 0 .552.24.648.612l2.425 7.496c3.816 0 6.421 1.56 6.421 1.56L15.539.72c-.144-.444-.42-.72-.768-.72H8.24c-.348 0-.6.276-.768.72L2 15.592Z"/>',
|
|
126
|
+
alpine: '<path d="m18.7 6 5.3 5.3-5.3 5.3-5.4-5.3L18.7 6zM5.3 6l11 11H5.8L0 11.2 5.3 6z"/>',
|
|
124
127
|
pnpm: '<path d="M0 0v7.5h7.5V0H0Zm8.25 0v7.5h7.498V0H8.25Zm8.25 0v7.5H24V0h-7.5ZM8.25 8.25v7.5h7.498v-7.5H8.25Zm8.25 0v7.5H24v-7.5h-7.5ZM0 16.5V24h7.5v-7.5H0Zm8.25 0V24h7.498v-7.5H8.25Zm8.25 0V24H24v-7.5h-7.5Z"/>',
|
|
125
128
|
biome:
|
|
126
129
|
'<path d="m12 2-5.346 9.259a12.065 12.065 0 0 1 6.326-.22l1.807.427-1.7 7.208-1.81-.427c-2.223-.524-4.36.644-5.263 2.507l-1.672-.809c1.276-2.636 4.284-4.232 7.363-3.505l.848-3.593A10.213 10.213 0 0 0 0 22.785h24L12 2Z"/>',
|
package/index.ts
CHANGED
|
@@ -63,10 +63,17 @@ export default function StarlightIntegration({
|
|
|
63
63
|
integrations.push(starlightSitemap(starlightConfig));
|
|
64
64
|
}
|
|
65
65
|
if (!allIntegrations.find(({ name }) => name === '@astrojs/mdx')) {
|
|
66
|
-
integrations.push(mdx());
|
|
66
|
+
integrations.push(mdx({ optimize: true }));
|
|
67
67
|
}
|
|
68
|
+
|
|
69
|
+
// Add integrations immediately after Starlight in the config array.
|
|
70
|
+
// e.g. if a user has `integrations: [starlight(), tailwind()]`, then the order will be
|
|
71
|
+
// `[starlight(), expressiveCode(), sitemap(), mdx(), tailwind()]`.
|
|
72
|
+
// This ensures users can add integrations before/after Starlight and we respect that order.
|
|
73
|
+
const selfIndex = config.integrations.findIndex((i) => i.name === '@astrojs/starlight');
|
|
74
|
+
config.integrations.splice(selfIndex + 1, 0, ...integrations);
|
|
75
|
+
|
|
68
76
|
updateConfig({
|
|
69
|
-
integrations,
|
|
70
77
|
vite: {
|
|
71
78
|
plugins: [vitePluginStarlightUserConfig(starlightConfig, config)],
|
|
72
79
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrojs/starlight",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"description": "Build beautiful, high-performance documentation websites with Astro",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -175,18 +175,18 @@
|
|
|
175
175
|
"./style/markdown.css": "./style/markdown.css"
|
|
176
176
|
},
|
|
177
177
|
"peerDependencies": {
|
|
178
|
-
"astro": "^4.
|
|
178
|
+
"astro": "^4.8.6"
|
|
179
179
|
},
|
|
180
180
|
"devDependencies": {
|
|
181
181
|
"@astrojs/markdown-remark": "^4.2.1",
|
|
182
182
|
"@playwright/test": "^1.43.1",
|
|
183
183
|
"@types/node": "^18.16.19",
|
|
184
|
-
"@vitest/coverage-v8": "^1.
|
|
185
|
-
"astro": "^4.
|
|
186
|
-
"vitest": "^1.
|
|
184
|
+
"@vitest/coverage-v8": "^1.6.0",
|
|
185
|
+
"astro": "^4.8.6",
|
|
186
|
+
"vitest": "^1.6.0"
|
|
187
187
|
},
|
|
188
188
|
"dependencies": {
|
|
189
|
-
"@astrojs/mdx": "^
|
|
189
|
+
"@astrojs/mdx": "^3.0.0",
|
|
190
190
|
"@astrojs/sitemap": "^3.0.5",
|
|
191
191
|
"@pagefind/default-ui": "^1.0.3",
|
|
192
192
|
"@types/hast": "^3.0.3",
|
package/schemas/social.ts
CHANGED
|
@@ -29,6 +29,7 @@ export const socialLinks = [
|
|
|
29
29
|
'matrix',
|
|
30
30
|
'openCollective',
|
|
31
31
|
'hackerOne',
|
|
32
|
+
'blueSky',
|
|
32
33
|
] as const;
|
|
33
34
|
|
|
34
35
|
export const SocialLinksSchema = () =>
|
|
@@ -73,6 +74,7 @@ export const SocialLinksSchema = () =>
|
|
|
73
74
|
matrix: 'Matrix',
|
|
74
75
|
openCollective: 'Open Collective',
|
|
75
76
|
hackerOne: 'Hacker One',
|
|
77
|
+
blueSky: 'BlueSky',
|
|
76
78
|
}[key];
|
|
77
79
|
labelledLinks[key] = { label, url };
|
|
78
80
|
}
|
package/style/asides.css
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
.starlight-aside {
|
|
2
2
|
padding: 1rem;
|
|
3
|
-
border-inline-start: 0.25rem solid;
|
|
3
|
+
border-inline-start: 0.25rem solid var(--sl-color-asides-border);
|
|
4
4
|
color: var(--sl-color-white);
|
|
5
5
|
}
|
|
6
6
|
.starlight-aside--note {
|
|
7
7
|
--sl-color-asides-text-accent: var(--sl-color-blue-high);
|
|
8
|
-
|
|
8
|
+
--sl-color-asides-border: var(--sl-color-blue);
|
|
9
9
|
background-color: var(--sl-color-blue-low);
|
|
10
10
|
}
|
|
11
11
|
.starlight-aside--tip {
|
|
12
12
|
--sl-color-asides-text-accent: var(--sl-color-purple-high);
|
|
13
|
-
|
|
13
|
+
--sl-color-asides-border: var(--sl-color-purple);
|
|
14
14
|
background-color: var(--sl-color-purple-low);
|
|
15
15
|
}
|
|
16
16
|
.starlight-aside--caution {
|
|
17
17
|
--sl-color-asides-text-accent: var(--sl-color-orange-high);
|
|
18
|
-
|
|
18
|
+
--sl-color-asides-border: var(--sl-color-orange);
|
|
19
19
|
background-color: var(--sl-color-orange-low);
|
|
20
20
|
}
|
|
21
21
|
.starlight-aside--danger {
|
|
22
22
|
--sl-color-asides-text-accent: var(--sl-color-red-high);
|
|
23
|
-
|
|
23
|
+
--sl-color-asides-border: var(--sl-color-red);
|
|
24
24
|
background-color: var(--sl-color-red-low);
|
|
25
25
|
}
|
|
26
26
|
|
package/style/markdown.css
CHANGED
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
margin-top: 0.25rem;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
.sl-markdown-content li:not(:where(.not-content *)) {
|
|
22
|
+
overflow-wrap: anywhere;
|
|
23
|
+
}
|
|
24
|
+
|
|
21
25
|
.sl-markdown-content
|
|
22
26
|
li
|
|
23
27
|
> :last-child:not(li, ul, ol):not(a, strong, em, del, span, input, :where(.not-content *)) {
|
|
@@ -113,3 +117,73 @@
|
|
|
113
117
|
border: 0;
|
|
114
118
|
border-bottom: 1px solid var(--sl-color-hairline);
|
|
115
119
|
}
|
|
120
|
+
|
|
121
|
+
/* <details> and <summary> styles */
|
|
122
|
+
.sl-markdown-content details:not(:where(.not-content *)) {
|
|
123
|
+
--sl-details-border-color: var(--sl-color-gray-5);
|
|
124
|
+
|
|
125
|
+
border-inline-start: 2px solid var(--sl-details-border-color);
|
|
126
|
+
padding-inline-start: 1rem;
|
|
127
|
+
}
|
|
128
|
+
.sl-markdown-content details:not([open]):hover:not(:where(.not-content *)),
|
|
129
|
+
.sl-markdown-content details:has(> summary:hover):not(:where(.not-content *)) {
|
|
130
|
+
--sl-details-border-color: var(--sl-color-text-accent);
|
|
131
|
+
}
|
|
132
|
+
.sl-markdown-content summary:not(:where(.not-content *)) {
|
|
133
|
+
color: var(--sl-color-white);
|
|
134
|
+
cursor: pointer;
|
|
135
|
+
display: block; /* Needed to hide the default marker in some browsers. */
|
|
136
|
+
font-weight: 600;
|
|
137
|
+
/* Expand the outline so that the marker cannot distort it. */
|
|
138
|
+
margin-inline-start: -0.5rem;
|
|
139
|
+
padding-inline-start: 0.5rem;
|
|
140
|
+
}
|
|
141
|
+
.sl-markdown-content details[open] > summary:not(:where(.not-content *)) {
|
|
142
|
+
margin-bottom: 1rem;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* <summary> marker styles */
|
|
146
|
+
.sl-markdown-content summary:not(:where(.not-content *))::marker,
|
|
147
|
+
.sl-markdown-content summary:not(:where(.not-content *))::-webkit-details-marker {
|
|
148
|
+
display: none;
|
|
149
|
+
}
|
|
150
|
+
.sl-markdown-content summary:not(:where(.not-content *))::before {
|
|
151
|
+
--sl-details-marker-size: 1.25rem;
|
|
152
|
+
|
|
153
|
+
background-color: currentColor;
|
|
154
|
+
content: '';
|
|
155
|
+
display: inline-block;
|
|
156
|
+
height: var(--sl-details-marker-size);
|
|
157
|
+
width: var(--sl-details-marker-size);
|
|
158
|
+
margin-inline: calc((var(--sl-details-marker-size) / 4) * -1) 0.25rem;
|
|
159
|
+
vertical-align: middle;
|
|
160
|
+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14.8 11.3 10.6 7a1 1 0 1 0-1.4 1.5l3.5 3.5-3.5 3.5a1 1 0 0 0 0 1.4 1 1 0 0 0 .7.3 1 1 0 0 0 .7-.3l4.2-4.2a1 1 0 0 0 0-1.4Z'/%3E%3C/svg%3E%0A");
|
|
161
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14.8 11.3 10.6 7a1 1 0 1 0-1.4 1.5l3.5 3.5-3.5 3.5a1 1 0 0 0 0 1.4 1 1 0 0 0 .7.3 1 1 0 0 0 .7-.3l4.2-4.2a1 1 0 0 0 0-1.4Z'/%3E%3C/svg%3E%0A");
|
|
162
|
+
-webkit-mask-repeat: no-repeat;
|
|
163
|
+
mask-repeat: no-repeat;
|
|
164
|
+
}
|
|
165
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
166
|
+
.sl-markdown-content summary:not(:where(.not-content *))::before {
|
|
167
|
+
transition: transform 0.2s ease-in-out;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
.sl-markdown-content details[open] > summary:not(:where(.not-content *))::before {
|
|
171
|
+
transform: rotateZ(90deg);
|
|
172
|
+
}
|
|
173
|
+
[dir='rtl'] .sl-markdown-content summary:not(:where(.not-content *))::before,
|
|
174
|
+
.sl-markdown-content [dir='rtl'] summary:not(:where(.not-content *))::before {
|
|
175
|
+
transform: rotateZ(180deg);
|
|
176
|
+
}
|
|
177
|
+
/* <summary> with only a paragraph automatically added when using MDX */
|
|
178
|
+
.sl-markdown-content summary:not(:where(.not-content *)) p:only-child {
|
|
179
|
+
display: inline;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/* <details> styles inside asides */
|
|
183
|
+
.sl-markdown-content .starlight-aside details:not(:where(.not-content *)) {
|
|
184
|
+
--sl-details-border-color: var(--sl-color-asides-border);
|
|
185
|
+
}
|
|
186
|
+
.sl-markdown-content .starlight-aside details:not([open]):hover:not(:where(.not-content *)),
|
|
187
|
+
.sl-markdown-content .starlight-aside details:has(> summary:hover):not(:where(.not-content *)) {
|
|
188
|
+
--sl-details-border-color: var(--sl-color-asides-text-accent);
|
|
189
|
+
}
|
package/translations/tr.json
CHANGED
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
"page.lastUpdated": "Son güncelleme:",
|
|
19
19
|
"page.previousLink": "Önceki",
|
|
20
20
|
"page.nextLink": "Sonraki",
|
|
21
|
-
"page.draft": "
|
|
21
|
+
"page.draft": "Bu içerik taslaktır ve canlı sürümde bulunmayacaktır.",
|
|
22
22
|
"404.text": "Sayfa bulunamadı. URL'i kontrol edin ya da arama çubuğunu kullanmayı deneyin.",
|
|
23
|
-
"aside.note": "
|
|
24
|
-
"aside.tip": "
|
|
25
|
-
"aside.caution": "
|
|
26
|
-
"aside.danger": "
|
|
27
|
-
"fileTree.directory": "
|
|
23
|
+
"aside.note": "Not",
|
|
24
|
+
"aside.tip": "İpucu",
|
|
25
|
+
"aside.caution": "Dikkat",
|
|
26
|
+
"aside.danger": "Tehlike",
|
|
27
|
+
"fileTree.directory": "Dizin"
|
|
28
28
|
}
|
|
@@ -65,6 +65,7 @@ const { html, panels } = processPanels(panelHtml);
|
|
|
65
65
|
border-bottom: 2px solid var(--sl-color-gray-5);
|
|
66
66
|
color: var(--sl-color-gray-3);
|
|
67
67
|
outline-offset: var(--sl-outline-offset-inside);
|
|
68
|
+
overflow-wrap: initial;
|
|
68
69
|
}
|
|
69
70
|
.tab [role='tab'][aria-selected='true'] {
|
|
70
71
|
color: var(--sl-color-white);
|
package/utils/translations.ts
CHANGED
|
@@ -4,7 +4,9 @@ import type { i18nSchemaOutput } from '../schemas/i18n';
|
|
|
4
4
|
import { createTranslationSystem } from './createTranslationSystem';
|
|
5
5
|
|
|
6
6
|
type UserI18nSchema = 'i18n' extends DataCollectionKey
|
|
7
|
-
? CollectionEntry<'i18n'>
|
|
7
|
+
? CollectionEntry<'i18n'> extends { data: infer T }
|
|
8
|
+
? T
|
|
9
|
+
: i18nSchemaOutput
|
|
8
10
|
: i18nSchemaOutput;
|
|
9
11
|
|
|
10
12
|
/** Get all translation data from the i18n collection, keyed by `id`, which matches locale. */
|