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.
Files changed (43) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +47 -5
  3. package/components/Footer.astro +19 -0
  4. package/components/Header.astro +55 -0
  5. package/components/NavLink.astro +24 -0
  6. package/components/PageFrame.astro +11 -0
  7. package/components/PageTitle.astro +24 -40
  8. package/components/Pagination.astro +22 -29
  9. package/components/Sidebar.astro +27 -0
  10. package/components/SiteFooter.astro +61 -0
  11. package/components/SocialIcons.astro +22 -0
  12. package/components.ts +10 -0
  13. package/index.ts +81 -120
  14. package/libs/breadcrumbs.ts +80 -0
  15. package/libs/config.ts +54 -0
  16. package/libs/expressive-code.ts +246 -0
  17. package/libs/links.ts +38 -0
  18. package/package.json +11 -5
  19. package/styles/base.css +35 -53
  20. package/styles/code.css +7 -83
  21. package/styles/components.css +599 -0
  22. package/styles/content.css +224 -414
  23. package/styles/header.css +217 -62
  24. package/styles/reference.css +332 -0
  25. package/styles/search.css +87 -73
  26. package/styles/sidebar.css +77 -56
  27. package/styles/toc.css +55 -40
  28. package/styles/tokens.css +134 -93
  29. package/styles.css +4 -4
  30. package/translations.ts +31 -0
  31. package/user-components/Availability.astro +21 -0
  32. package/user-components/Declaration.astro +16 -0
  33. package/user-components/Figure.astro +58 -0
  34. package/user-components/Parameter.astro +14 -0
  35. package/user-components/ParameterList.astro +11 -0
  36. package/user-components/ReferenceEntry.astro +12 -0
  37. package/user-components/ReferenceMeta.astro +30 -0
  38. package/user-components/TopicLink.astro +17 -0
  39. package/user-components/TopicList.astro +5 -0
  40. package/user-components/ValueList.astro +20 -0
  41. package/virtual.d.ts +10 -0
  42. package/styles/controls.css +0 -190
  43. package/styles/responsive.css +0 -148
@@ -1,190 +0,0 @@
1
- .sl-markdown-content .sl-link-button,
2
- .hero .sl-link-button {
3
- display: inline-flex;
4
- align-items: center;
5
- justify-content: center;
6
- gap: 0.375rem;
7
- min-width: 1.875rem;
8
- min-height: 2.0625rem;
9
- padding: 0.25rem 0.9375rem;
10
- border: 0;
11
- border-radius: 0.25rem;
12
- box-shadow: none;
13
- font-size: 1.0625rem;
14
- font-weight: 400;
15
- line-height: 1.5625rem;
16
- letter-spacing: normal;
17
- text-decoration: none;
18
- cursor: pointer;
19
- transition:
20
- color var(--apple-transition),
21
- background-color var(--apple-transition),
22
- border-color var(--apple-transition),
23
- box-shadow var(--apple-transition);
24
- }
25
- .sl-markdown-content .sl-link-button + .sl-link-button {
26
- margin-inline-start: 0.5rem;
27
- }
28
- .hero .sl-link-button {
29
- min-height: 2.0625rem;
30
- padding: 0.25rem 0.9375rem;
31
- }
32
- .hero .sl-link-button svg,
33
- .sl-markdown-content .sl-link-button svg {
34
- flex-shrink: 0;
35
- font-size: 1rem;
36
- }
37
-
38
- :is(.hero, .sl-markdown-content) .sl-link-button.primary {
39
- background: var(--apple-button-background);
40
- color: var(--apple-control-primary-text);
41
- }
42
- :is(.hero, .sl-markdown-content)
43
- .sl-link-button.primary:is(:hover, :focus-visible) {
44
- background: var(--apple-button-background-hover);
45
- color: var(--apple-control-primary-text);
46
- text-decoration: none;
47
- }
48
- :is(.hero, .sl-markdown-content) .sl-link-button.primary:active {
49
- background: var(--apple-button-background-active);
50
- }
51
- :is(.hero, .sl-markdown-content) .sl-link-button.secondary {
52
- background: var(--apple-button-secondary-background);
53
- color: var(--apple-link);
54
- }
55
- :is(.hero, .sl-markdown-content)
56
- .sl-link-button.secondary:is(:hover, :focus-visible) {
57
- background: var(--apple-button-secondary-hover);
58
- color: var(--apple-link);
59
- text-decoration: none;
60
- }
61
- :is(.hero, .sl-markdown-content) .sl-link-button.minimal {
62
- min-width: 0;
63
- padding-inline: 0;
64
- background: transparent;
65
- color: var(--apple-link);
66
- }
67
- :is(.hero, .sl-markdown-content)
68
- .sl-link-button.minimal:is(:hover, :focus-visible) {
69
- background: transparent;
70
- color: var(--apple-link);
71
- text-decoration: underline;
72
- text-underline-offset: 0.14em;
73
- }
74
- :is(.hero, .sl-markdown-content) .sl-link-button:focus-visible {
75
- outline: 0;
76
- box-shadow: 0 0 0 4px var(--apple-focus);
77
- }
78
-
79
- .sl-markdown-content starlight-tabs {
80
- display: block;
81
- margin-block: 1.5rem;
82
- border: 1px solid var(--apple-hairline);
83
- border-radius: 0.75rem;
84
- background: var(--apple-secondary-background);
85
- }
86
- .sl-markdown-content starlight-tabs .tablist-wrapper {
87
- margin-bottom: 0;
88
- padding-inline: 0.5rem;
89
- border-bottom: 1px solid var(--apple-hairline);
90
- }
91
- .sl-markdown-content starlight-tabs ul[role="tablist"] {
92
- gap: 0.25rem;
93
- margin: 0;
94
- padding-inline: 0;
95
- }
96
- .sl-markdown-content starlight-tabs a[role="tab"] {
97
- display: inline-flex;
98
- align-items: center;
99
- min-height: 2.5rem;
100
- padding: 0.5rem 0.75rem;
101
- border-bottom: 2px solid transparent;
102
- border-radius: var(--apple-radius-sm) var(--apple-radius-sm) 0 0;
103
- font-size: 0.875rem;
104
- font-weight: 500;
105
- line-height: 1.25rem;
106
- text-decoration: none;
107
- }
108
- .sl-markdown-content starlight-tabs a[role="tab"]:hover {
109
- background: var(--apple-hover-surface);
110
- color: var(--apple-link);
111
- }
112
- .sl-markdown-content starlight-tabs a[role="tab"][aria-selected="true"] {
113
- border-bottom-color: var(--apple-link);
114
- color: var(--apple-link);
115
- font-weight: 600;
116
- }
117
- .sl-markdown-content starlight-tabs [role="tabpanel"] {
118
- padding: 1rem;
119
- }
120
- .sl-markdown-content starlight-tabs [role="tabpanel"] > :first-child {
121
- margin-top: 0;
122
- }
123
-
124
- .sl-badge {
125
- display: inline-flex;
126
- align-items: center;
127
- min-height: 1.375rem;
128
- padding-inline: 0.5rem;
129
- border: 0;
130
- border-radius: 999px;
131
- background: var(--sl-color-bg-badge);
132
- color: var(--sl-color-text-badge);
133
- font-weight: 600;
134
- line-height: 1.2;
135
- vertical-align: 0.08em;
136
- }
137
- .sl-badge + .sl-badge {
138
- margin-inline-start: 0.25rem;
139
- }
140
-
141
- .sidebar-content .sl-badge {
142
- min-height: 1.125rem;
143
- margin-inline-start: 0.375rem;
144
- padding-inline: 0.4rem;
145
- font-size: 0.6875rem;
146
- line-height: 1;
147
- }
148
- .sidebar-content a[aria-current="page"] > .sl-badge {
149
- color: inherit;
150
- }
151
-
152
- .sl-markdown-content :is(input, select, textarea):not(:where(.not-content *)) {
153
- min-height: 2.25rem;
154
- border: 1px solid var(--apple-border);
155
- border-radius: 0.5rem;
156
- background: var(--apple-secondary-background);
157
- color: var(--apple-foreground);
158
- font: inherit;
159
- }
160
- .sl-markdown-content button:not(:where(.not-content *)) {
161
- min-width: 1.875rem;
162
- min-height: 2.0625rem;
163
- padding: 0.25rem 0.9375rem;
164
- border: 0;
165
- border-radius: 0.25rem;
166
- background: var(--apple-button-background);
167
- color: var(--apple-control-primary-text);
168
- box-shadow: none;
169
- font: inherit;
170
- font-size: 1.0625rem;
171
- font-weight: 400;
172
- line-height: 1.5625rem;
173
- cursor: pointer;
174
- }
175
- .sl-markdown-content
176
- button:is(:hover, :focus-visible):not(:where(.not-content *)) {
177
- background: var(--apple-button-background-hover);
178
- }
179
- .sl-markdown-content button:active:not(:where(.not-content *)) {
180
- background: var(--apple-button-background-active);
181
- box-shadow: none;
182
- }
183
- .sl-markdown-content button:focus-visible:not(:where(.not-content *)) {
184
- outline: 0;
185
- box-shadow: 0 0 0 4px var(--apple-focus);
186
- }
187
- .sl-markdown-content :is(input, select, textarea):focus {
188
- border-color: var(--apple-link);
189
- box-shadow: 0 0 0 3px var(--apple-focus);
190
- }
@@ -1,148 +0,0 @@
1
- @media (min-width: 50rem) {
2
- :root {
3
- --sl-sidebar-pad-x: 0.75rem;
4
- }
5
- .sidebar-pane {
6
- top: var(--apple-header-height);
7
- height: calc(100vh - var(--apple-header-height));
8
- }
9
- .sidebar :is(.sl-menu-button, button[aria-controls="starlight__sidebar"]) {
10
- display: none !important;
11
- }
12
- }
13
- @media (min-width: 72rem) {
14
- :root {
15
- --sl-mobile-toc-height: 0rem;
16
- }
17
- .main-frame {
18
- grid-template-columns: var(--apple-sidebar-width) minmax(0, 1fr) var(
19
- --apple-toc-width
20
- );
21
- }
22
- .main-pane main {
23
- margin-inline: auto;
24
- }
25
- }
26
- @media (max-width: 71.99rem) {
27
- .content-panel:first-of-type .sl-container {
28
- padding-top: clamp(2rem, 5vw, 3.5rem);
29
- }
30
- .content-panel h1 {
31
- font-size: 2.5rem;
32
- line-height: 2.75rem;
33
- }
34
- .sl-markdown-content h2:not(:where(.not-content *)) {
35
- font-size: 1.75rem;
36
- line-height: 2.25rem;
37
- }
38
- .sl-markdown-content h3:not(:where(.not-content *)) {
39
- font-size: 1.5rem;
40
- line-height: 1.75rem;
41
- }
42
- .sl-markdown-content h4:not(:where(.not-content *)) {
43
- font-size: 1.3125rem;
44
- line-height: 1.5625rem;
45
- }
46
- }
47
- @media (max-width: 49.99rem) {
48
- :root {
49
- --apple-header-height: 3rem;
50
- --sl-mobile-toc-height: 3rem;
51
- }
52
- .sidebar-pane {
53
- background: var(--apple-navigator-background);
54
- }
55
- .sidebar-content {
56
- padding: 1rem;
57
- }
58
- .mobile-preferences {
59
- align-items: center;
60
- min-height: 3.5rem;
61
- padding-block: 0.625rem;
62
- }
63
- .mobile-preferences .social-icons {
64
- align-items: center;
65
- height: 2.25rem;
66
- margin-inline-end: 0;
67
- padding-block: 0;
68
- }
69
- .mobile-preferences :is(starlight-theme-select, starlight-lang-select) {
70
- margin-block: 0;
71
- }
72
- .content-panel:first-of-type .sl-container {
73
- padding-top: 2rem;
74
- }
75
- .content-panel h1 {
76
- font-size: 2rem;
77
- line-height: 2.25rem;
78
- }
79
- .content-panel
80
- .sl-container
81
- > p:first-of-type:not(:where(.sl-markdown-content *)) {
82
- font-size: 1.1875rem;
83
- line-height: 1.6875rem;
84
- }
85
- .sl-markdown-content .sl-heading-wrapper.level-h2 {
86
- margin-top: 2.25rem;
87
- }
88
- .sl-markdown-content h2:not(:where(.not-content *)) {
89
- font-size: 1.5rem;
90
- line-height: 2rem;
91
- }
92
- .sl-markdown-content h3:not(:where(.not-content *)) {
93
- font-size: 1.3125rem;
94
- line-height: 1.5625rem;
95
- }
96
- .sl-markdown-content h4:not(:where(.not-content *)) {
97
- font-size: 1.1875rem;
98
- line-height: 1.4375rem;
99
- }
100
- .pagination-links {
101
- grid-template-columns: 1fr;
102
- gap: 1rem;
103
- }
104
- .hero {
105
- gap: 2.5rem;
106
- padding-block: 3.5rem;
107
- }
108
- .hero > img {
109
- flex-basis: min(70%, 16rem);
110
- width: min(70%, 16rem);
111
- }
112
- .hero .actions {
113
- gap: 0.625rem;
114
- }
115
- .sl-markdown-content table:not(:where(.not-content *)) {
116
- display: block;
117
- max-width: 100%;
118
- overflow-x: auto;
119
- overscroll-behavior-inline: contain;
120
- }
121
- }
122
- @media (max-width: 30rem) {
123
- :root {
124
- --sl-content-pad-x: 1.25rem;
125
- }
126
- header.header > .header {
127
- padding-inline: 0.75rem;
128
- }
129
- .site-title {
130
- font-size: 1.0625rem;
131
- line-height: 1.25rem;
132
- }
133
- .sl-markdown-content .sl-link-button {
134
- width: 100%;
135
- }
136
- .sl-markdown-content .sl-link-button + .sl-link-button {
137
- margin-inline-start: 0;
138
- }
139
- .hero .actions .sl-link-button {
140
- width: 100%;
141
- }
142
- }
143
-
144
- @media (hover: none) {
145
- .sl-heading-wrapper .sl-anchor-link {
146
- opacity: 1;
147
- }
148
- }