@charmland/gem 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.
- package/LICENSE +177 -0
- package/NOTICE +13 -0
- package/README.md +24 -2
- package/assets/fonts/Hypography-Italic.woff2 +0 -0
- package/assets/fonts/Hypography-Regular.woff2 +0 -0
- package/assets/fonts/PPFraktionMono-Variable.ttf +0 -0
- package/assets/fonts/PPFraktionMonoItalic-Variable.ttf +0 -0
- package/assets/fonts/PPFraktionSans-Variable.ttf +0 -0
- package/assets/fonts/PPFraktionSansItalic-Variable.ttf +0 -0
- package/bin/gem-elm.js +3 -0
- package/dist/browser/boot.d.ts +10 -0
- package/dist/browser/boot.js +14 -0
- package/dist/browser/color-scheme.d.ts +9 -0
- package/dist/browser/color-scheme.js +76 -0
- package/dist/browser/ports.d.ts +37 -0
- package/dist/browser/ports.js +90 -0
- package/dist/browser/router.d.ts +5 -0
- package/dist/browser/router.js +35 -0
- package/dist/browser/runtime.d.ts +12 -0
- package/dist/browser/runtime.js +22 -0
- package/dist/browser/tabs.d.ts +9 -0
- package/dist/browser/tabs.js +69 -0
- package/dist/default/theme.css +4664 -0
- package/dist/default/theme.js +13652 -0
- package/dist/node/build.d.ts +16 -0
- package/dist/node/build.js +48 -0
- package/dist/node/cli.d.ts +2 -0
- package/dist/node/cli.js +21 -0
- package/elm.json +28 -0
- package/package.json +86 -4
- package/src/app/Gem/App.elm +1275 -0
- package/src/app/Gem/CharmSticker.elm +35 -0
- package/src/app/Gem/Components.elm +292 -0
- package/src/app/Gem/Main.elm +17 -0
- package/src/app/Gem/Ports.elm +32 -0
- package/src/app/Gem/Shell.elm +964 -0
- package/src/browser/theme.d.ts +1 -0
- package/src/core/Gem/Node.elm +219 -0
- package/src/core/Gem/Page.elm +409 -0
- package/src/core/Gem/Render.elm +472 -0
- package/src/core/Gem/Slots.elm +11 -0
- package/src/styles/docs.scss +1083 -0
- package/src/styles/fonts.scss +51 -0
- package/src/styles/gem.scss +362 -0
- package/src/styles/theme.scss +8 -0
- package/src/styles/ui/burger.scss +272 -0
- package/src/styles/ui/button.scss +350 -0
- package/src/styles/ui/charmtone.scss +70 -0
- package/src/styles/ui/controls-extra.scss +316 -0
- package/src/styles/ui/controls.scss +110 -0
- package/src/styles/ui/display.scss +359 -0
- package/src/styles/ui/dropdown.scss +341 -0
- package/src/styles/ui/form.scss +314 -0
- package/src/styles/ui/menu.scss +200 -0
- package/src/styles/ui/meter.scss +124 -0
- package/src/styles/ui/modal.scss +545 -0
- package/src/styles/ui/oauth.scss +50 -0
- package/src/styles/ui/page-nav.scss +63 -0
- package/src/styles/ui/reset.scss +111 -0
- package/src/styles/ui/scrollbar.scss +39 -0
- package/src/styles/ui/search.scss +164 -0
- package/src/styles/ui/sidebar.scss +229 -0
- package/src/styles/ui/squircle.scss +60 -0
- package/src/styles/ui/table.scss +97 -0
- package/src/styles/ui/theme.scss +132 -0
- package/src/styles/ui/toast.scss +587 -0
- package/src/styles/ui/toc.scss +128 -0
- package/src/styles/ui/typography.scss +21 -0
- package/src/styles/ui/ui.scss +33 -0
- package/src/ui/Ui/Badge.elm +51 -0
- package/src/ui/Ui/Banner.elm +97 -0
- package/src/ui/Ui/Burger.elm +259 -0
- package/src/ui/Ui/Button.elm +261 -0
- package/src/ui/Ui/Card.elm +32 -0
- package/src/ui/Ui/Cards.elm +15 -0
- package/src/ui/Ui/ChoiceGroup.elm +62 -0
- package/src/ui/Ui/CopyButton.elm +139 -0
- package/src/ui/Ui/Divider.elm +16 -0
- package/src/ui/Ui/Dropdown.elm +600 -0
- package/src/ui/Ui/Empty.elm +41 -0
- package/src/ui/Ui/ErrorBubble.elm +34 -0
- package/src/ui/Ui/Field.elm +45 -0
- package/src/ui/Ui/FormStatus.elm +32 -0
- package/src/ui/Ui/Icon.elm +381 -0
- package/src/ui/Ui/InlineForm.elm +51 -0
- package/src/ui/Ui/Input.elm +113 -0
- package/src/ui/Ui/KeyValue.elm +25 -0
- package/src/ui/Ui/ListRow.elm +67 -0
- package/src/ui/Ui/Loader.elm +32 -0
- package/src/ui/Ui/Logo/Charm.elm +21 -0
- package/src/ui/Ui/Logo/CharmMark.elm +32 -0
- package/src/ui/Ui/Logo/CharmSticker.elm +35 -0
- package/src/ui/Ui/Logo/Discord.elm +26 -0
- package/src/ui/Ui/Logo/GitHub.elm +21 -0
- package/src/ui/Ui/Logo/Google.elm +21 -0
- package/src/ui/Ui/Logo/Hexy.elm +29 -0
- package/src/ui/Ui/Logo/Hyper.elm +42 -0
- package/src/ui/Ui/Logo/Integration.elm +117 -0
- package/src/ui/Ui/Logo/Prism.elm +35 -0
- package/src/ui/Ui/Logos.elm +115 -0
- package/src/ui/Ui/Menu.elm +348 -0
- package/src/ui/Ui/Meter.elm +132 -0
- package/src/ui/Ui/Modal.elm +247 -0
- package/src/ui/Ui/Motion.elm +32 -0
- package/src/ui/Ui/NumberBox.elm +86 -0
- package/src/ui/Ui/OAuthButton.elm +39 -0
- package/src/ui/Ui/PageNav.elm +65 -0
- package/src/ui/Ui/Pager.elm +49 -0
- package/src/ui/Ui/Search.elm +396 -0
- package/src/ui/Ui/SearchBox.elm +78 -0
- package/src/ui/Ui/Section.elm +21 -0
- package/src/ui/Ui/Sidebar.elm +239 -0
- package/src/ui/Ui/Stat.elm +29 -0
- package/src/ui/Ui/Switch.elm +34 -0
- package/src/ui/Ui/Table.elm +89 -0
- package/src/ui/Ui/Tabs.elm +280 -0
- package/src/ui/Ui/ToC.elm +120 -0
- package/src/ui/Ui/Toast.elm +1145 -0
- package/src/ui/Ui/Toolbar.elm +31 -0
- package/src/ui/Ui/TwoStepConfirm.elm +159 -0
- package/src/ui/Ui/Typography.elm +33 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
@import url("https://stuff.charm.land/fonts/charmform/charmform.css");
|
|
2
|
+
|
|
3
|
+
@font-face {
|
|
4
|
+
font-family: "Fraktion Mono Web";
|
|
5
|
+
src: url("../../assets/fonts/PPFraktionMono-Variable.ttf") format("truetype-variations");
|
|
6
|
+
font-weight: 200 800;
|
|
7
|
+
font-style: normal;
|
|
8
|
+
font-display: swap;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@font-face {
|
|
12
|
+
font-family: "Fraktion Mono Web";
|
|
13
|
+
src: url("../../assets/fonts/PPFraktionMonoItalic-Variable.ttf")
|
|
14
|
+
format("truetype-variations");
|
|
15
|
+
font-weight: 200 800;
|
|
16
|
+
font-style: italic;
|
|
17
|
+
font-display: swap;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@font-face {
|
|
21
|
+
font-family: "Fraktion Sans Web";
|
|
22
|
+
src: url("../../assets/fonts/PPFraktionSans-Variable.ttf") format("truetype-variations");
|
|
23
|
+
font-weight: 200 800;
|
|
24
|
+
font-style: normal;
|
|
25
|
+
font-display: swap;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@font-face {
|
|
29
|
+
font-family: "Fraktion Sans Web";
|
|
30
|
+
src: url("../../assets/fonts/PPFraktionSansItalic-Variable.ttf")
|
|
31
|
+
format("truetype-variations");
|
|
32
|
+
font-weight: 200 800;
|
|
33
|
+
font-style: italic;
|
|
34
|
+
font-display: swap;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@font-face {
|
|
38
|
+
font-family: "Hypography Web";
|
|
39
|
+
src: url("../../assets/fonts/Hypography-Regular.woff2") format("woff2");
|
|
40
|
+
font-weight: 400;
|
|
41
|
+
font-style: normal;
|
|
42
|
+
font-display: swap;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@font-face {
|
|
46
|
+
font-family: "Hypography Web";
|
|
47
|
+
src: url("../../assets/fonts/Hypography-Italic.woff2") format("woff2");
|
|
48
|
+
font-weight: 400;
|
|
49
|
+
font-style: italic;
|
|
50
|
+
font-display: swap;
|
|
51
|
+
}
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
// Gem's additions to the docs chrome.
|
|
2
|
+
//
|
|
3
|
+
// Everything structural comes from the vendored library stylesheet and the
|
|
4
|
+
// docs layout ported from the kit's site (./css/docs.scss). This file only
|
|
5
|
+
// covers node kinds the library has no component for: callouts, code lines,
|
|
6
|
+
// ordered lists, unregistered tags.
|
|
7
|
+
|
|
8
|
+
@use "./ui/charmtone";
|
|
9
|
+
|
|
10
|
+
.code-block pre .gem-code-line {
|
|
11
|
+
display: block;
|
|
12
|
+
min-height: 1.5em;
|
|
13
|
+
white-space: pre;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.md-ol {
|
|
17
|
+
margin: 1rem 0;
|
|
18
|
+
padding-left: 1.5rem;
|
|
19
|
+
list-style: decimal;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
gap: 0.4rem;
|
|
23
|
+
max-width: 40rem;
|
|
24
|
+
line-height: 1.55;
|
|
25
|
+
|
|
26
|
+
> li > .md-p {
|
|
27
|
+
margin: 0;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.md-image {
|
|
32
|
+
max-width: 100%;
|
|
33
|
+
height: auto;
|
|
34
|
+
border-radius: 0.5rem;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.md-quote {
|
|
38
|
+
margin: 1rem 0;
|
|
39
|
+
padding-left: 1rem;
|
|
40
|
+
max-width: 40rem;
|
|
41
|
+
color: var(--muted);
|
|
42
|
+
border-left: 2px solid var(--frame);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// The callout: a tinted card with an icon tile and a mono eyebrow. The tone
|
|
46
|
+
// rides a local `--tone`, so the border, the wash and the label move together.
|
|
47
|
+
.callout {
|
|
48
|
+
--tone: var(--primary);
|
|
49
|
+
|
|
50
|
+
margin: 1.25rem 0;
|
|
51
|
+
padding: 0.9rem 1rem;
|
|
52
|
+
background: color-mix(in srgb, var(--tone) 10%, var(--bg));
|
|
53
|
+
border: 1px solid color-mix(in srgb, var(--tone) 28%, transparent);
|
|
54
|
+
border-radius: calc(0.6rem * var(--squircle-scale, 1));
|
|
55
|
+
|
|
56
|
+
.md-p,
|
|
57
|
+
.md-ul,
|
|
58
|
+
.md-ol {
|
|
59
|
+
margin: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.md-p + .md-p,
|
|
63
|
+
.md-p + .md-ul,
|
|
64
|
+
.md-ul + .md-p,
|
|
65
|
+
.md-p + .md-ol {
|
|
66
|
+
margin-top: 0.5rem;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.callout--note {
|
|
71
|
+
--tone: var(--primary);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.callout--warn {
|
|
75
|
+
--tone: var(--warn);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.callout--danger {
|
|
79
|
+
--tone: var(--danger);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.callout--success {
|
|
83
|
+
--tone: var(--ok);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.callout-head {
|
|
87
|
+
display: grid;
|
|
88
|
+
grid-template-columns: auto 1fr;
|
|
89
|
+
align-items: center;
|
|
90
|
+
gap: 0.5rem;
|
|
91
|
+
margin-bottom: 0.55rem;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.callout-icon {
|
|
95
|
+
display: flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
justify-content: center;
|
|
98
|
+
line-height: 1;
|
|
99
|
+
color: var(--tone);
|
|
100
|
+
|
|
101
|
+
svg {
|
|
102
|
+
display: block;
|
|
103
|
+
width: 1.5rem;
|
|
104
|
+
height: 1.5rem;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// A heading in the house face, not an eyebrow: it carries the callout.
|
|
109
|
+
.callout-title {
|
|
110
|
+
font-size: 1.0625rem;
|
|
111
|
+
font-weight: 700;
|
|
112
|
+
font-variation-settings: "OPTK" -10;
|
|
113
|
+
letter-spacing: -0.01em;
|
|
114
|
+
line-height: 1;
|
|
115
|
+
color: var(--tone);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// The code system: the plate as the fill, one hairline band over
|
|
119
|
+
// it, gutter numbers that recede, and inline code as a chip. Everything
|
|
120
|
+
// rides `--squircle-scale`, so corners follow the kit's shape.
|
|
121
|
+
.code-frame {
|
|
122
|
+
position: relative;
|
|
123
|
+
margin: 1.5rem 0;
|
|
124
|
+
background: var(--plate);
|
|
125
|
+
border: 1px solid var(--frame);
|
|
126
|
+
border-radius: calc(0.75rem * var(--squircle-scale, 1));
|
|
127
|
+
overflow: hidden;
|
|
128
|
+
|
|
129
|
+
.code-block {
|
|
130
|
+
margin: 0;
|
|
131
|
+
padding: 0;
|
|
132
|
+
background: none;
|
|
133
|
+
border-radius: 0;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.code-head {
|
|
138
|
+
display: flex;
|
|
139
|
+
align-items: center;
|
|
140
|
+
gap: 0.75rem;
|
|
141
|
+
min-height: 2.2rem;
|
|
142
|
+
padding: 0.3rem 0.45rem 0.3rem 0.9rem;
|
|
143
|
+
border-bottom: 1px solid var(--frame);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.code-id {
|
|
147
|
+
display: flex;
|
|
148
|
+
align-items: center;
|
|
149
|
+
gap: 0.5rem;
|
|
150
|
+
min-width: 0;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.code-title {
|
|
154
|
+
overflow: hidden;
|
|
155
|
+
font-family: "Fraktion Mono Web", ui-monospace, monospace;
|
|
156
|
+
font-size: 0.72rem;
|
|
157
|
+
font-weight: 600;
|
|
158
|
+
color: var(--fg);
|
|
159
|
+
text-overflow: ellipsis;
|
|
160
|
+
white-space: nowrap;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// The language is a caption, not a control: mono, quiet, no chrome of its
|
|
164
|
+
// own, so the band reads as a title and its qualifier.
|
|
165
|
+
.code-head .code-lang,
|
|
166
|
+
.code-float .code-lang {
|
|
167
|
+
flex: none;
|
|
168
|
+
height: 1.75rem;
|
|
169
|
+
padding: 0 0.5rem;
|
|
170
|
+
pointer-events: none;
|
|
171
|
+
border-color: transparent;
|
|
172
|
+
background: transparent;
|
|
173
|
+
color: var(--tertiary);
|
|
174
|
+
font-family: "Fraktion Mono Web", ui-monospace, monospace;
|
|
175
|
+
font-size: 0.6875rem;
|
|
176
|
+
font-weight: 520;
|
|
177
|
+
letter-spacing: 0.06em;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// The floating corner has code underneath, so its caption needs a fill.
|
|
181
|
+
.code-float .code-lang {
|
|
182
|
+
background: var(--bg);
|
|
183
|
+
border-radius: calc(0.4rem * var(--squircle-scale, 1));
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.code-actions {
|
|
187
|
+
display: flex;
|
|
188
|
+
align-items: center;
|
|
189
|
+
margin-left: auto;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// An untitled fence has no band: the language and the copy control float
|
|
193
|
+
// over the frame's top corner, and the first lines keep clear of them.
|
|
194
|
+
.code-float {
|
|
195
|
+
position: absolute;
|
|
196
|
+
top: 0.35rem;
|
|
197
|
+
right: 0.4rem;
|
|
198
|
+
z-index: 1;
|
|
199
|
+
display: flex;
|
|
200
|
+
align-items: center;
|
|
201
|
+
gap: 0.45rem;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.code-float + .code-block pre {
|
|
205
|
+
padding-right: 3rem;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.code-block pre {
|
|
209
|
+
margin: 0;
|
|
210
|
+
padding: 0.9rem 1.15rem 1rem 0.5rem;
|
|
211
|
+
font-family: "JetBrains Mono Variable", ui-monospace, monospace;
|
|
212
|
+
font-size: 0.8125rem;
|
|
213
|
+
line-height: 1.7;
|
|
214
|
+
color: var(--fg);
|
|
215
|
+
tab-size: 2;
|
|
216
|
+
overflow-x: auto;
|
|
217
|
+
scrollbar-width: thin;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.gem-code-line {
|
|
221
|
+
position: relative;
|
|
222
|
+
display: block;
|
|
223
|
+
min-height: 1.7em;
|
|
224
|
+
padding-left: 2.5rem;
|
|
225
|
+
white-space: pre;
|
|
226
|
+
|
|
227
|
+
&::before {
|
|
228
|
+
content: attr(data-line);
|
|
229
|
+
position: absolute;
|
|
230
|
+
left: 0;
|
|
231
|
+
width: 1.8rem;
|
|
232
|
+
text-align: right;
|
|
233
|
+
font-size: 0.7rem;
|
|
234
|
+
font-variant-numeric: tabular-nums;
|
|
235
|
+
color: color-mix(in srgb, var(--fg) 26%, transparent);
|
|
236
|
+
user-select: none;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// The copy control: the library's CopyButton wearing the kit's Xs
|
|
241
|
+
// secondary button (height, padding, radius, border all come from it). The
|
|
242
|
+
// well fill is the only local change: the float sits over the code, so the
|
|
243
|
+
// surface underneath must not show through the glyph.
|
|
244
|
+
.code-head button.copy,
|
|
245
|
+
.code-float button.copy {
|
|
246
|
+
margin-left: auto;
|
|
247
|
+
width: 1.75rem;
|
|
248
|
+
height: 1.75rem;
|
|
249
|
+
padding: 0;
|
|
250
|
+
justify-content: center;
|
|
251
|
+
background: var(--bg);
|
|
252
|
+
|
|
253
|
+
&:hover {
|
|
254
|
+
color: var(--fg);
|
|
255
|
+
background: color-mix(in srgb, var(--fg) 8%, var(--bg));
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
&.done {
|
|
259
|
+
color: charmtone.$julep;
|
|
260
|
+
border-color: color-mix(in srgb, charmtone.$julep 30%, transparent);
|
|
261
|
+
background: color-mix(in srgb, charmtone.$julep 14%, var(--bg));
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.copy-icon,
|
|
265
|
+
.check-icon {
|
|
266
|
+
width: 0.9rem;
|
|
267
|
+
height: 0.9rem;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// Token palette: the highlighting comes in as slot colors already; these
|
|
272
|
+
// legacy class hooks only exist for themes that render markup themselves.
|
|
273
|
+
.tok-kw {
|
|
274
|
+
color: charmtone.$charple;
|
|
275
|
+
font-weight: 620;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.tok-type {
|
|
279
|
+
color: charmtone.$dolly;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.tok-str {
|
|
283
|
+
color: charmtone.$julep;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.tok-comment {
|
|
287
|
+
color: var(--tertiary);
|
|
288
|
+
font-style: italic;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
// Inline code: a small squircle chip that stays readable inside prose.
|
|
292
|
+
.code-inline {
|
|
293
|
+
padding: 0.14em 0.42em;
|
|
294
|
+
background: color-mix(in srgb, var(--fg) 6%, transparent);
|
|
295
|
+
border: 1px solid color-mix(in srgb, var(--fg) 12%, transparent);
|
|
296
|
+
border-radius: calc(0.3rem * var(--squircle-scale, 1));
|
|
297
|
+
font-family: "JetBrains Mono Variable", ui-monospace, monospace;
|
|
298
|
+
font-size: 0.82em;
|
|
299
|
+
color: var(--fg);
|
|
300
|
+
white-space: nowrap;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.gem-raw {
|
|
304
|
+
font-family: "Fraktion Mono Web", ui-monospace, monospace;
|
|
305
|
+
font-size: 0.8125rem;
|
|
306
|
+
color: var(--tertiary);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// A tag nobody registered. Loud on purpose: a missing component should be
|
|
310
|
+
// visible while writing, not silently dropped.
|
|
311
|
+
.gem-unknown {
|
|
312
|
+
margin: 1rem 0;
|
|
313
|
+
padding: 0.6rem 0.8rem;
|
|
314
|
+
border: 1px dashed var(--frame);
|
|
315
|
+
border-radius: 0.5rem;
|
|
316
|
+
|
|
317
|
+
&::before {
|
|
318
|
+
content: "unregistered component: " attr(data-component);
|
|
319
|
+
display: block;
|
|
320
|
+
margin-bottom: 0.35rem;
|
|
321
|
+
font-family: "Fraktion Mono Web", ui-monospace, monospace;
|
|
322
|
+
font-size: 0.7rem;
|
|
323
|
+
color: var(--tertiary);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.gem-error {
|
|
328
|
+
margin: 2rem;
|
|
329
|
+
padding: 1rem;
|
|
330
|
+
font-family: "Fraktion Mono Web", ui-monospace, monospace;
|
|
331
|
+
font-size: 0.8125rem;
|
|
332
|
+
white-space: pre-wrap;
|
|
333
|
+
color: var(--fg);
|
|
334
|
+
background: var(--well);
|
|
335
|
+
border: 1px solid var(--danger);
|
|
336
|
+
border-radius: 0.5rem;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
// The code group: one underline tab bar over the framed panels. The
|
|
340
|
+
// head's label repeats the tab that named the panel, so the id group
|
|
341
|
+
// sits out inside a group; the copy control stays.
|
|
342
|
+
.code-group {
|
|
343
|
+
margin: 1.25rem 0;
|
|
344
|
+
|
|
345
|
+
.tabs.underline {
|
|
346
|
+
display: flex;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// The tab names the panel, so its fence renders untitled and the copy
|
|
350
|
+
// control floats; the language would just repeat the tab.
|
|
351
|
+
.code-float .code-lang {
|
|
352
|
+
display: none;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.code-frame {
|
|
356
|
+
margin: 0.9rem 0 0;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.code-panel[hidden] {
|
|
360
|
+
display: none;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// The default theme's stylesheet.
|
|
2
|
+
//
|
|
3
|
+
// Load order is the whole file: the docs chrome first (which pulls in the
|
|
4
|
+
// vendored library manifest, its tokens, and the type faces), then Gem's
|
|
5
|
+
// own additions for node kinds the library does not cover.
|
|
6
|
+
|
|
7
|
+
@use "./docs";
|
|
8
|
+
@use "./gem";
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
@use "charmtone";
|
|
2
|
+
@use "sass:color";
|
|
3
|
+
|
|
4
|
+
// The burger menu, ported from the hyper frontend's mobile navigation:
|
|
5
|
+
// a fixed bottom-right corner toggle (four stacked bars in the house
|
|
6
|
+
// zest-to-julep run over a salt label block), a dimming overlay, and a
|
|
7
|
+
// full-width drawer that drops from the top on a spring. Its logo band
|
|
8
|
+
// hangs off the drawer's head with the close chip on the shared right
|
|
9
|
+
// axis; under it the drawer carries the desktop sidebar verbatim on a
|
|
10
|
+
// pepper field. Mobile-only by default — the pieces display none above
|
|
11
|
+
// the 768px breakpoint, where the host is expected to show its
|
|
12
|
+
// permanent navigation.
|
|
13
|
+
|
|
14
|
+
// The drawer's shared column: the sidebar rows' own text inset, so the
|
|
15
|
+
// brand, the close chip and the controls all sit on the labels' axis.
|
|
16
|
+
$row-inset: 1.5rem;
|
|
17
|
+
|
|
18
|
+
.burger-toggle,
|
|
19
|
+
.burger-overlay,
|
|
20
|
+
.burger-drawer {
|
|
21
|
+
display: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.burger {
|
|
25
|
+
.burger-toggle {
|
|
26
|
+
position: fixed;
|
|
27
|
+
bottom: 1.05rem;
|
|
28
|
+
right: 1.22rem;
|
|
29
|
+
left: auto;
|
|
30
|
+
z-index: 100;
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
align-items: stretch;
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
padding: 0;
|
|
36
|
+
border: none;
|
|
37
|
+
font-family: inherit;
|
|
38
|
+
border-radius: calc(0.21rem * var(--squircle-scale, 1));
|
|
39
|
+
background: charmtone.$salt;
|
|
40
|
+
box-shadow: 0 0.51rem 0.51rem rgb(0 0 0 / 25%);
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
opacity: 1;
|
|
43
|
+
transition: opacity 175ms ease;
|
|
44
|
+
|
|
45
|
+
.bars {
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.bars div {
|
|
51
|
+
width: 100%;
|
|
52
|
+
height: 0.63rem;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.bars div:nth-child(1) {
|
|
56
|
+
background: charmtone.$zest;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.bars div:nth-child(2) {
|
|
60
|
+
background: color.mix(charmtone.$zest, charmtone.$julep, 66%);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.bars div:nth-child(3) {
|
|
64
|
+
background: color.mix(charmtone.$zest, charmtone.$julep, 33%);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.bars div:nth-child(4) {
|
|
68
|
+
background: charmtone.$julep;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.label {
|
|
72
|
+
font-size: 0.67rem;
|
|
73
|
+
font-weight: 720;
|
|
74
|
+
text-align: center;
|
|
75
|
+
white-space: pre-line;
|
|
76
|
+
line-height: 1;
|
|
77
|
+
padding: 0.25rem 0.63rem 0.17rem;
|
|
78
|
+
color: charmtone.$bbq;
|
|
79
|
+
background: charmtone.$salt;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// The overlay dims the page behind the drawer.
|
|
84
|
+
.burger-overlay {
|
|
85
|
+
position: fixed;
|
|
86
|
+
inset: 0;
|
|
87
|
+
z-index: 95;
|
|
88
|
+
background: rgb(0 0 0 / 80%);
|
|
89
|
+
opacity: 0;
|
|
90
|
+
pointer-events: none;
|
|
91
|
+
transition: opacity 175ms ease;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// The drawer drops from the top and scrolls its contents — the nav
|
|
95
|
+
// lives here on small screens. It's the desktop sidebar on its own
|
|
96
|
+
// dark field, so the ink is the theme's --fg.
|
|
97
|
+
.burger-drawer {
|
|
98
|
+
position: fixed;
|
|
99
|
+
top: -5rem;
|
|
100
|
+
left: 0;
|
|
101
|
+
right: 0;
|
|
102
|
+
bottom: auto;
|
|
103
|
+
z-index: 100;
|
|
104
|
+
height: calc(100dvh + 5rem);
|
|
105
|
+
display: flex;
|
|
106
|
+
flex-direction: column;
|
|
107
|
+
// The drawer is the page's own surface: it inherits the mode's --bg and
|
|
108
|
+
// --fg, so a light page opens a salt drawer with iron ink and the dark
|
|
109
|
+
// one stays bbq.
|
|
110
|
+
background: var(--bg);
|
|
111
|
+
color: var(--fg);
|
|
112
|
+
padding: 5rem 0 0;
|
|
113
|
+
transform: translateY(-100%);
|
|
114
|
+
overflow-y: auto;
|
|
115
|
+
visibility: hidden;
|
|
116
|
+
transition: visibility 0s 320ms;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.burger-content {
|
|
120
|
+
flex: 1;
|
|
121
|
+
min-height: 0;
|
|
122
|
+
display: flex;
|
|
123
|
+
flex-direction: column;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// The logo band hangs off the drawer's head: the band's lower edge
|
|
127
|
+
// crosses the glyph so the mark reads as docked under the bar, with no
|
|
128
|
+
// rule between it and the close chip or the controls below. The chip
|
|
129
|
+
// rides the band's right end, centered on the rows' inset axis. The
|
|
130
|
+
// band itself is click-through; only the chip answers.
|
|
131
|
+
.burger-logo {
|
|
132
|
+
display: flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
justify-content: space-between;
|
|
135
|
+
gap: 1rem;
|
|
136
|
+
margin-top: -4.5rem;
|
|
137
|
+
// The brand and the chip share the rows' inset, so the mark lines up
|
|
138
|
+
// with the labels under it and the chip with nothing else.
|
|
139
|
+
padding: 5rem $row-inset 0.42rem;
|
|
140
|
+
background: var(--bg);
|
|
141
|
+
pointer-events: none;
|
|
142
|
+
|
|
143
|
+
> *:first-child {
|
|
144
|
+
display: inline-flex;
|
|
145
|
+
align-items: center;
|
|
146
|
+
gap: 0.5rem;
|
|
147
|
+
text-decoration: none;
|
|
148
|
+
color: var(--fg);
|
|
149
|
+
font-family: "Hypography Web", "Charmform Web", system-ui, sans-serif;
|
|
150
|
+
font-size: 1.5rem;
|
|
151
|
+
letter-spacing: -0.02em;
|
|
152
|
+
|
|
153
|
+
.site-logo {
|
|
154
|
+
display: block;
|
|
155
|
+
width: 14.21rem;
|
|
156
|
+
max-width: 60vw;
|
|
157
|
+
height: auto;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
svg.logo {
|
|
162
|
+
width: 14.21rem;
|
|
163
|
+
height: auto;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.sprout-mark {
|
|
167
|
+
color: charmtone.$charple;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// The control row under the logo band: theme tabs and, on a
|
|
172
|
+
// multi-collection site, the collection switcher. Transparent on the
|
|
173
|
+
// pepper drawer so it does not cut a band across the list.
|
|
174
|
+
.burger-controls {
|
|
175
|
+
display: flex;
|
|
176
|
+
flex-direction: column;
|
|
177
|
+
align-items: flex-end;
|
|
178
|
+
gap: 0.6rem;
|
|
179
|
+
padding: 0.35rem $row-inset 0.6rem;
|
|
180
|
+
|
|
181
|
+
// The tabs track is start-aligned by the kit; in the drawer it ends on
|
|
182
|
+
// the close chip's axis, which the padding already lines up.
|
|
183
|
+
.tabs {
|
|
184
|
+
align-self: flex-end;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// The body is the desktop sidebar itself, full width on the pepper
|
|
189
|
+
// field.
|
|
190
|
+
.burger-panel {
|
|
191
|
+
display: flex;
|
|
192
|
+
flex-direction: column;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.burger-sidebar {
|
|
196
|
+
width: 100%;
|
|
197
|
+
|
|
198
|
+
.sidebar {
|
|
199
|
+
width: 100%;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.sidebar-items {
|
|
203
|
+
overflow: visible;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// The close chip: a dolly disc carrying the close glyph in zest, on
|
|
208
|
+
// the rows' right-hand axis. It answers clicks the band doesn't.
|
|
209
|
+
.burger-close {
|
|
210
|
+
pointer-events: auto;
|
|
211
|
+
display: flex;
|
|
212
|
+
align-items: center;
|
|
213
|
+
justify-content: center;
|
|
214
|
+
flex-shrink: 0;
|
|
215
|
+
// The kit's chip at the mobile root size: the reference site lifts
|
|
216
|
+
// <html> to 19px below 768px, so 2.35rem there is 2.8rem at Gem's 16px.
|
|
217
|
+
width: 2.8rem;
|
|
218
|
+
height: 2.8rem;
|
|
219
|
+
padding: 0;
|
|
220
|
+
border: none;
|
|
221
|
+
border-radius: 999px;
|
|
222
|
+
background: charmtone.$dolly;
|
|
223
|
+
cursor: pointer;
|
|
224
|
+
|
|
225
|
+
.burger-close-icon {
|
|
226
|
+
color: charmtone.$zest;
|
|
227
|
+
width: 1.35rem;
|
|
228
|
+
height: 1.35rem;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// Open state: the overlay shows, the toggle fades, the drawer is
|
|
233
|
+
// live.
|
|
234
|
+
&.open {
|
|
235
|
+
.burger-overlay {
|
|
236
|
+
opacity: 1;
|
|
237
|
+
pointer-events: auto;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.burger-toggle {
|
|
241
|
+
opacity: 0;
|
|
242
|
+
pointer-events: none;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.burger-drawer {
|
|
246
|
+
visibility: visible;
|
|
247
|
+
transition: visibility 0s;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// Mobile only: above the breakpoint the host's permanent navigation
|
|
253
|
+
// takes over and the whole assembly disappears.
|
|
254
|
+
@media (min-width: 768.02px) {
|
|
255
|
+
.burger-toggle,
|
|
256
|
+
.burger-overlay,
|
|
257
|
+
.burger-drawer {
|
|
258
|
+
display: none !important;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
@media (max-width: 768px) {
|
|
263
|
+
.burger .burger-toggle,
|
|
264
|
+
.burger .burger-drawer {
|
|
265
|
+
display: flex;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.burger .burger-overlay {
|
|
269
|
+
display: block;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|