starlight-theme-apple 0.6.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 +37 -0
- package/README.md +47 -5
- package/components/Footer.astro +19 -0
- package/components/Header.astro +55 -0
- package/components/NavLink.astro +24 -0
- package/components/PageFrame.astro +11 -0
- package/components/PageTitle.astro +24 -40
- package/components/Pagination.astro +22 -29
- package/components/Sidebar.astro +27 -0
- package/components/SiteFooter.astro +61 -0
- package/components/SocialIcons.astro +22 -0
- package/components.ts +10 -0
- package/index.ts +81 -120
- package/libs/breadcrumbs.ts +80 -0
- package/libs/config.ts +54 -0
- package/libs/expressive-code.ts +246 -0
- package/libs/links.ts +38 -0
- package/package.json +11 -5
- package/styles/base.css +35 -53
- package/styles/code.css +7 -83
- package/styles/components.css +599 -0
- package/styles/content.css +224 -414
- package/styles/header.css +217 -62
- package/styles/reference.css +332 -0
- package/styles/search.css +87 -73
- package/styles/sidebar.css +77 -56
- package/styles/toc.css +55 -40
- package/styles/tokens.css +134 -93
- package/styles.css +4 -4
- package/translations.ts +31 -0
- package/user-components/Availability.astro +21 -0
- package/user-components/Declaration.astro +16 -0
- package/user-components/Figure.astro +58 -0
- package/user-components/Parameter.astro +14 -0
- package/user-components/ParameterList.astro +11 -0
- package/user-components/ReferenceEntry.astro +12 -0
- package/user-components/ReferenceMeta.astro +30 -0
- package/user-components/TopicLink.astro +17 -0
- package/user-components/TopicList.astro +5 -0
- package/user-components/ValueList.astro +20 -0
- package/virtual.d.ts +10 -0
- package/styles/controls.css +0 -190
- package/styles/responsive.css +0 -148
package/styles/search.css
CHANGED
|
@@ -1,88 +1,102 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
/* Search field in the navigation bar. */
|
|
2
|
+
@media (min-width: 50rem) {
|
|
3
|
+
site-search > button[data-open-modal] {
|
|
4
|
+
width: clamp(10rem, 16vw, 14rem);
|
|
5
|
+
min-height: 2rem;
|
|
6
|
+
padding-inline: 0.625rem 0.375rem;
|
|
7
|
+
border: 0;
|
|
8
|
+
border-radius: 0.5rem;
|
|
9
|
+
background: var(--apple-fill-secondary);
|
|
10
|
+
color: var(--apple-tertiary-foreground);
|
|
11
|
+
font-size: 0.875rem;
|
|
12
|
+
letter-spacing: -0.016em;
|
|
13
|
+
}
|
|
14
|
+
:root[data-theme="light"] site-search > button[data-open-modal] {
|
|
15
|
+
background: var(--apple-fill-secondary);
|
|
16
|
+
}
|
|
17
|
+
site-search > button[data-open-modal]:hover {
|
|
18
|
+
background: var(--apple-fill);
|
|
19
|
+
color: var(--apple-secondary-foreground);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
site-search > button[data-open-modal] {
|
|
14
23
|
color: var(--apple-foreground);
|
|
15
24
|
}
|
|
16
|
-
site-search
|
|
17
|
-
|
|
18
|
-
border-radius: 0.75rem;
|
|
19
|
-
background: var(--apple-secondary-background);
|
|
20
|
-
box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
|
|
21
|
-
}
|
|
22
|
-
site-search > button kbd {
|
|
23
|
-
gap: 0.2rem;
|
|
25
|
+
site-search > button[data-open-modal] > kbd {
|
|
26
|
+
gap: 0.125rem;
|
|
24
27
|
border: 0;
|
|
25
28
|
background: transparent;
|
|
26
29
|
color: var(--apple-tertiary-foreground);
|
|
27
|
-
font-
|
|
28
|
-
font-size: 0.6875rem;
|
|
30
|
+
font-size: 0.75rem;
|
|
29
31
|
}
|
|
30
|
-
site-search > button kbd kbd {
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
site-search > button[data-open-modal] > kbd kbd {
|
|
33
|
+
padding: 0;
|
|
34
|
+
border: 0;
|
|
35
|
+
background: transparent;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* Search dialog and Pagefind results. */
|
|
39
|
+
site-search dialog {
|
|
33
40
|
border: 1px solid var(--apple-hairline);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
background: var(--apple-background);
|
|
42
|
+
box-shadow: var(--sl-shadow-lg);
|
|
43
|
+
}
|
|
44
|
+
@media (min-width: 50rem) {
|
|
45
|
+
site-search dialog {
|
|
46
|
+
border-radius: var(--apple-radius-panel);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
#starlight__search {
|
|
51
|
+
--pagefind-ui-primary: var(--apple-link);
|
|
52
|
+
--pagefind-ui-text: var(--apple-foreground);
|
|
53
|
+
--pagefind-ui-font: var(--apple-font-sans);
|
|
54
|
+
--pagefind-ui-background: var(--apple-background);
|
|
55
|
+
--pagefind-ui-border: var(--apple-hairline);
|
|
56
|
+
--pagefind-ui-tag: var(--apple-fill);
|
|
57
|
+
--pagefind-ui-border-radius: 0.625rem;
|
|
50
58
|
}
|
|
51
59
|
#starlight__search .pagefind-ui__search-input {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
min-width: 2.75rem;
|
|
56
|
-
min-height: 2.75rem;
|
|
57
|
-
padding: 0.5rem;
|
|
58
|
-
border-radius: var(--apple-radius-sm);
|
|
59
|
-
}
|
|
60
|
-
site-search [data-close-modal]:hover {
|
|
61
|
-
background: var(--apple-active-surface);
|
|
62
|
-
}
|
|
63
|
-
site-search input:focus {
|
|
64
|
-
border-color: var(--apple-link);
|
|
65
|
-
box-shadow: 0 0 0 3px var(--apple-focus);
|
|
66
|
-
outline: 0;
|
|
67
|
-
}
|
|
68
|
-
.pagefind-ui__result {
|
|
69
|
-
border-color: var(--apple-hairline) !important;
|
|
70
|
-
border-radius: 0;
|
|
71
|
-
transition: background-color var(--apple-transition);
|
|
60
|
+
background: var(--apple-fill-secondary);
|
|
61
|
+
color: var(--apple-foreground);
|
|
62
|
+
font-weight: 400;
|
|
72
63
|
}
|
|
73
|
-
.pagefind-
|
|
74
|
-
|
|
64
|
+
#starlight__search .pagefind-ui__search-input::placeholder {
|
|
65
|
+
color: var(--apple-tertiary-foreground);
|
|
66
|
+
opacity: 1;
|
|
75
67
|
}
|
|
76
|
-
.pagefind-
|
|
77
|
-
|
|
68
|
+
#starlight__search .pagefind-ui__search-input:focus {
|
|
69
|
+
outline: 3px solid var(--apple-focus);
|
|
70
|
+
outline-offset: 0;
|
|
78
71
|
}
|
|
79
|
-
.pagefind-ui__result-link
|
|
80
|
-
color: var(--apple-link)
|
|
72
|
+
#starlight__search .pagefind-ui__result-link {
|
|
73
|
+
color: var(--apple-link);
|
|
81
74
|
}
|
|
82
|
-
.pagefind-ui__result-excerpt {
|
|
83
|
-
color: var(--apple-secondary-foreground)
|
|
75
|
+
#starlight__search .pagefind-ui__result-excerpt {
|
|
76
|
+
color: var(--apple-secondary-foreground);
|
|
84
77
|
}
|
|
85
|
-
.pagefind-
|
|
86
|
-
|
|
87
|
-
color: var(--apple-
|
|
78
|
+
#starlight__search .pagefind-ui__result-excerpt mark {
|
|
79
|
+
background: transparent;
|
|
80
|
+
color: var(--apple-foreground);
|
|
81
|
+
font-weight: 600;
|
|
82
|
+
}
|
|
83
|
+
#starlight__search
|
|
84
|
+
.pagefind-ui__result-title:not(:where(.pagefind-ui__result-nested *)),
|
|
85
|
+
#starlight__search .pagefind-ui__result-nested {
|
|
86
|
+
border-color: var(--apple-hairline);
|
|
87
|
+
background: var(--apple-fill-secondary);
|
|
88
|
+
}
|
|
89
|
+
#starlight__search
|
|
90
|
+
.pagefind-ui__result-title:not(:where(.pagefind-ui__result-nested *)):hover,
|
|
91
|
+
#starlight__search
|
|
92
|
+
.pagefind-ui__result-title:not(
|
|
93
|
+
:where(.pagefind-ui__result-nested *)
|
|
94
|
+
):focus-within,
|
|
95
|
+
#starlight__search .pagefind-ui__result-nested:hover,
|
|
96
|
+
#starlight__search .pagefind-ui__result-nested:focus-within {
|
|
97
|
+
outline: 2px solid var(--apple-link);
|
|
98
|
+
outline-offset: -2px;
|
|
99
|
+
}
|
|
100
|
+
site-search button[data-close-modal] {
|
|
101
|
+
color: var(--apple-link);
|
|
88
102
|
}
|
package/styles/sidebar.css
CHANGED
|
@@ -1,85 +1,106 @@
|
|
|
1
|
+
/* Navigator: neutral rows, gray group headings, a filled selection without accent color. */
|
|
1
2
|
.sidebar-pane {
|
|
2
3
|
border-inline-end: 1px solid var(--apple-hairline);
|
|
3
|
-
background: var(--apple-
|
|
4
|
+
background: var(--apple-background);
|
|
5
|
+
overscroll-behavior: contain;
|
|
6
|
+
scrollbar-color: var(--apple-hairline) transparent;
|
|
7
|
+
scrollbar-width: thin;
|
|
4
8
|
}
|
|
5
9
|
|
|
6
10
|
.sidebar-content {
|
|
7
|
-
|
|
8
|
-
|
|
11
|
+
gap: 1.5rem;
|
|
12
|
+
padding: 1.25rem var(--sl-sidebar-pad-x) 2.5rem;
|
|
9
13
|
}
|
|
10
14
|
|
|
11
|
-
.sidebar-content
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
.sidebar-content ul {
|
|
16
|
+
--sl-sidebar-item-padding-inline: 0.625rem;
|
|
17
|
+
}
|
|
18
|
+
.sidebar-content li {
|
|
19
|
+
overflow-wrap: break-word;
|
|
15
20
|
}
|
|
16
|
-
.sidebar-content .top-level > li {
|
|
17
|
-
margin-
|
|
21
|
+
.sidebar-content .top-level > li + li {
|
|
22
|
+
margin-top: 1.25rem;
|
|
23
|
+
}
|
|
24
|
+
.sidebar-content ul ul {
|
|
25
|
+
margin-top: 0.125rem;
|
|
26
|
+
}
|
|
27
|
+
.sidebar-content ul ul li {
|
|
28
|
+
margin-inline-start: 0.75rem;
|
|
29
|
+
padding-inline-start: 0;
|
|
30
|
+
border-inline-start: 0;
|
|
31
|
+
}
|
|
32
|
+
.sidebar-content .top-level > li > details > ul > li {
|
|
33
|
+
margin-inline-start: 0;
|
|
18
34
|
}
|
|
19
35
|
|
|
20
|
-
.sidebar-content summary {
|
|
21
|
-
min-height:
|
|
22
|
-
padding: 0.
|
|
36
|
+
.sidebar-content :is(a, summary) {
|
|
37
|
+
min-height: 2rem;
|
|
38
|
+
padding: 0.3125rem var(--sl-sidebar-item-padding-inline);
|
|
23
39
|
border-radius: var(--apple-radius-sm);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
line-height: 1.3125rem;
|
|
28
|
-
letter-spacing: -0.005em;
|
|
40
|
+
font-size: 0.9375rem;
|
|
41
|
+
line-height: 1.375rem;
|
|
42
|
+
letter-spacing: -0.012em;
|
|
29
43
|
}
|
|
30
|
-
|
|
31
|
-
.sidebar-content
|
|
32
|
-
color: inherit;
|
|
44
|
+
|
|
45
|
+
.sidebar-content .large {
|
|
33
46
|
font-size: inherit;
|
|
34
47
|
font-weight: inherit;
|
|
48
|
+
color: inherit;
|
|
35
49
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
.sidebar-content .caret {
|
|
41
|
-
width: 1rem;
|
|
50
|
+
|
|
51
|
+
/* Top-level groups read as section headings. */
|
|
52
|
+
.sidebar-content .top-level > li > details > summary {
|
|
42
53
|
color: var(--apple-tertiary-foreground);
|
|
43
|
-
|
|
54
|
+
font-weight: 600;
|
|
44
55
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
margin-inline-start: 0.75rem;
|
|
48
|
-
padding-inline-start: 0.5rem;
|
|
49
|
-
border-inline-start: 0;
|
|
56
|
+
.sidebar-content summary {
|
|
57
|
+
color: var(--apple-foreground);
|
|
50
58
|
}
|
|
51
|
-
.sidebar-content
|
|
52
|
-
|
|
59
|
+
.sidebar-content summary:hover {
|
|
60
|
+
color: var(--apple-foreground);
|
|
53
61
|
}
|
|
54
|
-
.sidebar-content
|
|
55
|
-
|
|
56
|
-
|
|
62
|
+
.sidebar-content .caret {
|
|
63
|
+
width: 0.875rem;
|
|
64
|
+
height: 0.875rem;
|
|
65
|
+
color: var(--apple-tertiary-foreground);
|
|
66
|
+
opacity: 0.7;
|
|
67
|
+
}
|
|
68
|
+
.sidebar-content summary:hover .caret {
|
|
69
|
+
opacity: 1;
|
|
57
70
|
}
|
|
58
71
|
|
|
59
72
|
.sidebar-content a {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
color: var(--apple-secondary-foreground);
|
|
65
|
-
font-size: 0.875rem;
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
gap: 0.375rem;
|
|
76
|
+
color: var(--apple-foreground);
|
|
66
77
|
font-weight: 400;
|
|
67
|
-
line-height: 1.3125rem;
|
|
68
|
-
text-decoration: none;
|
|
69
78
|
}
|
|
70
|
-
.sidebar-content a:
|
|
71
|
-
|
|
72
|
-
|
|
79
|
+
.sidebar-content a:hover,
|
|
80
|
+
.sidebar-content ul ul summary:hover {
|
|
81
|
+
background: var(--apple-fill-secondary);
|
|
82
|
+
color: var(--apple-foreground);
|
|
73
83
|
}
|
|
74
|
-
.sidebar-content a
|
|
84
|
+
.sidebar-content a[aria-current="page"],
|
|
85
|
+
.sidebar-content a[aria-current="page"]:is(:hover, :focus) {
|
|
86
|
+
background: var(--apple-fill);
|
|
87
|
+
color: var(--apple-foreground);
|
|
88
|
+
font-weight: 600;
|
|
89
|
+
}
|
|
90
|
+
.sidebar-content :is(a, summary):focus-visible {
|
|
75
91
|
outline-offset: -2px;
|
|
76
92
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
font-weight: 500;
|
|
93
|
+
|
|
94
|
+
.sidebar-content .sl-badge {
|
|
95
|
+
margin-inline-start: auto;
|
|
81
96
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
97
|
+
|
|
98
|
+
@media (max-width: 49.99rem) {
|
|
99
|
+
.sidebar-content {
|
|
100
|
+
padding-inline: 1rem;
|
|
101
|
+
}
|
|
102
|
+
.sidebar-content :is(a, summary) {
|
|
103
|
+
min-height: 2.75rem;
|
|
104
|
+
font-size: 1.0625rem;
|
|
105
|
+
}
|
|
85
106
|
}
|
package/styles/toc.css
CHANGED
|
@@ -1,70 +1,85 @@
|
|
|
1
|
+
/* “On this page”: a quiet rail with a single accent marker on the active section. */
|
|
1
2
|
.right-sidebar {
|
|
2
|
-
width: var(--apple-toc-width);
|
|
3
3
|
border-inline-start: 0;
|
|
4
|
-
background:
|
|
4
|
+
background: var(--apple-background);
|
|
5
|
+
scrollbar-width: none;
|
|
5
6
|
}
|
|
6
7
|
.right-sidebar-panel {
|
|
7
|
-
padding
|
|
8
|
+
padding: 2.5rem 1.25rem 2rem 0.5rem;
|
|
9
|
+
}
|
|
10
|
+
.right-sidebar-panel .sl-container {
|
|
11
|
+
width: auto;
|
|
12
|
+
max-width: none;
|
|
8
13
|
}
|
|
9
|
-
|
|
10
|
-
|
|
14
|
+
|
|
15
|
+
starlight-toc h2 {
|
|
16
|
+
margin-bottom: 0.75rem;
|
|
11
17
|
color: var(--apple-foreground);
|
|
12
|
-
font-size: 0.
|
|
18
|
+
font-size: 0.8125rem;
|
|
13
19
|
font-weight: 600;
|
|
14
|
-
line-height:
|
|
15
|
-
letter-spacing: 0.
|
|
16
|
-
}
|
|
17
|
-
.right-sidebar ul {
|
|
18
|
-
border-inline-start: 0;
|
|
20
|
+
line-height: 1.125rem;
|
|
21
|
+
letter-spacing: -0.008em;
|
|
19
22
|
}
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
starlight-toc nav > ul {
|
|
24
|
+
border-inline-start: 1px solid var(--apple-hairline);
|
|
22
25
|
}
|
|
23
|
-
|
|
24
|
-
margin-
|
|
25
|
-
padding: 0;
|
|
26
|
-
|
|
26
|
+
starlight-toc a {
|
|
27
|
+
margin-inline-start: -1px;
|
|
28
|
+
padding-block: 0.3125rem;
|
|
29
|
+
padding-inline: calc(0.75rem * var(--depth) + 0.875rem) 0;
|
|
30
|
+
border-radius: 0;
|
|
31
|
+
border-inline-start: 2px solid transparent;
|
|
27
32
|
color: var(--apple-secondary-foreground);
|
|
28
|
-
font-size: 0.
|
|
33
|
+
font-size: 0.8125rem;
|
|
29
34
|
line-height: 1.125rem;
|
|
35
|
+
letter-spacing: -0.008em;
|
|
36
|
+
text-decoration: none;
|
|
37
|
+
overflow-wrap: anywhere;
|
|
30
38
|
}
|
|
31
|
-
|
|
32
|
-
color: var(--apple-
|
|
33
|
-
}
|
|
34
|
-
.right-sidebar a:focus-visible {
|
|
35
|
-
border-radius: 2px;
|
|
36
|
-
color: var(--apple-link);
|
|
37
|
-
outline-offset: 2px;
|
|
39
|
+
starlight-toc a:hover {
|
|
40
|
+
color: var(--apple-foreground);
|
|
38
41
|
}
|
|
39
|
-
|
|
42
|
+
starlight-toc a[aria-current="true"] {
|
|
43
|
+
border-inline-start-color: var(--apple-link);
|
|
40
44
|
color: var(--apple-foreground);
|
|
41
|
-
font-weight:
|
|
45
|
+
font-weight: 600;
|
|
46
|
+
}
|
|
47
|
+
starlight-toc a:focus-visible {
|
|
48
|
+
outline-offset: -2px;
|
|
42
49
|
}
|
|
43
50
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
backdrop-filter: saturate(180%) blur(20px);
|
|
51
|
+
/* Narrow layouts: Starlight’s collapsible “On this page” bar under the header. */
|
|
52
|
+
mobile-starlight-toc nav {
|
|
53
|
+
border-bottom: 1px solid var(--apple-hairline);
|
|
54
|
+
background: var(--apple-background);
|
|
49
55
|
}
|
|
50
56
|
mobile-starlight-toc summary {
|
|
51
57
|
color: var(--apple-secondary-foreground);
|
|
52
58
|
font-size: 0.8125rem;
|
|
53
59
|
}
|
|
54
60
|
mobile-starlight-toc .toggle {
|
|
55
|
-
|
|
56
|
-
border-
|
|
57
|
-
|
|
58
|
-
|
|
61
|
+
border: 0;
|
|
62
|
+
border-radius: 980px;
|
|
63
|
+
background: var(--apple-fill-secondary);
|
|
64
|
+
color: var(--apple-foreground);
|
|
59
65
|
}
|
|
60
66
|
mobile-starlight-toc details[open] .toggle,
|
|
61
67
|
mobile-starlight-toc .toggle:hover {
|
|
62
|
-
border
|
|
63
|
-
background: var(--apple-
|
|
68
|
+
border: 0;
|
|
69
|
+
background: var(--apple-fill);
|
|
70
|
+
color: var(--apple-foreground);
|
|
71
|
+
}
|
|
72
|
+
mobile-starlight-toc .display-current {
|
|
64
73
|
color: var(--apple-foreground);
|
|
65
74
|
}
|
|
66
75
|
mobile-starlight-toc .dropdown {
|
|
67
|
-
border
|
|
76
|
+
border: 1px solid var(--apple-hairline);
|
|
77
|
+
border-radius: 0 0 var(--apple-radius-panel) var(--apple-radius-panel);
|
|
68
78
|
background: var(--apple-background);
|
|
69
|
-
box-shadow:
|
|
79
|
+
box-shadow: var(--sl-shadow-lg);
|
|
80
|
+
}
|
|
81
|
+
mobile-starlight-toc .dropdown a {
|
|
82
|
+
border-color: var(--apple-hairline);
|
|
83
|
+
color: var(--apple-foreground);
|
|
84
|
+
overflow-wrap: anywhere;
|
|
70
85
|
}
|