@gjermundgaraba-designs/simple-rat 0.7.0 → 0.8.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/DESIGN.md +5 -5
- package/dist/highlight/highlight.d.ts.map +1 -1
- package/dist/highlight/highlight.js +66 -115
- package/dist/highlight/vite.d.ts +2 -1
- package/dist/highlight/vite.d.ts.map +1 -1
- package/dist/highlight/vite.js +5 -6
- package/dist/src/code/code.d.ts +4 -4
- package/dist/src/code/code.d.ts.map +1 -1
- package/dist/src/code/code.js +10 -7
- package/dist/src/code/index.d.ts.map +1 -1
- package/dist/src/{codeBlock/codeBlock.d.ts → code-block/code-block.d.ts} +2 -3
- package/dist/src/code-block/code-block.d.ts.map +1 -0
- package/dist/src/{codeBlock/codeBlock.js → code-block/code-block.js} +13 -7
- package/dist/src/code-block/index.d.ts +3 -0
- package/dist/src/code-block/index.d.ts.map +1 -0
- package/dist/src/code-block/index.js +1 -0
- package/dist/src/copy/copy.d.ts.map +1 -1
- package/dist/src/copy/copy.js +1 -7
- package/dist/src/{copyTab/copyTab.d.ts → copy-tab/copy-tab.d.ts} +3 -2
- package/dist/src/copy-tab/copy-tab.d.ts.map +1 -0
- package/dist/src/{copyTab/copyTab.js → copy-tab/copy-tab.js} +13 -13
- package/dist/src/copy-tab/index.d.ts +3 -0
- package/dist/src/copy-tab/index.d.ts.map +1 -0
- package/dist/src/{copyTab → copy-tab}/index.js +1 -1
- package/dist/src/diagram/diagram.d.ts.map +1 -1
- package/dist/src/diagram/index.d.ts.map +1 -1
- package/dist/src/footer/footer.d.ts.map +1 -1
- package/dist/src/footer/index.d.ts.map +1 -1
- package/dist/src/footnotes/footnotes.d.ts.map +1 -1
- package/dist/src/footnotes/footnotes.js +7 -2
- package/dist/src/footnotes/index.d.ts.map +1 -1
- package/dist/src/header/header.d.ts +1 -1
- package/dist/src/header/header.d.ts.map +1 -1
- package/dist/src/header/index.d.ts.map +1 -1
- package/dist/src/heading/heading.d.ts.map +1 -1
- package/dist/src/heading/index.d.ts.map +1 -1
- package/dist/src/index.d.ts +6 -6
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +6 -8
- package/dist/src/nav-link/index.d.ts +3 -0
- package/dist/src/nav-link/index.d.ts.map +1 -0
- package/dist/src/nav-link/index.js +1 -0
- package/dist/src/{navLink/navLink.d.ts → nav-link/nav-link.d.ts} +1 -1
- package/dist/src/nav-link/nav-link.d.ts.map +1 -0
- package/dist/src/{navLink/navLink.js → nav-link/nav-link.js} +1 -1
- package/dist/src/note/index.d.ts.map +1 -1
- package/dist/src/note/note.d.ts.map +1 -1
- package/dist/src/pager/index.d.ts.map +1 -1
- package/dist/src/pager/pager.d.ts.map +1 -1
- package/dist/src/post-list/index.d.ts +3 -0
- package/dist/src/post-list/index.d.ts.map +1 -0
- package/dist/src/post-list/index.js +1 -0
- package/dist/src/{postList/postList.d.ts → post-list/post-list.d.ts} +3 -2
- package/dist/src/post-list/post-list.d.ts.map +1 -0
- package/dist/src/post-list/post-list.js +6 -0
- package/dist/src/post-meta/index.d.ts +3 -0
- package/dist/src/post-meta/index.d.ts.map +1 -0
- package/dist/src/post-meta/index.js +1 -0
- package/dist/src/{postMeta/postMeta.d.ts → post-meta/post-meta.d.ts} +1 -1
- package/dist/src/post-meta/post-meta.d.ts.map +1 -0
- package/dist/src/{postMeta/postMeta.js → post-meta/post-meta.js} +3 -3
- package/dist/src/scheme/index.d.ts +1 -1
- package/dist/src/scheme/index.d.ts.map +1 -1
- package/dist/src/scheme/index.js +1 -1
- package/dist/src/scheme/{schemeSwitch.d.ts → scheme-switch.d.ts} +3 -2
- package/dist/src/scheme/scheme-switch.d.ts.map +1 -0
- package/dist/src/scheme/{schemeSwitch.js → scheme-switch.js} +7 -5
- package/dist/src/scheme/scheme.d.ts +0 -2
- package/dist/src/scheme/scheme.d.ts.map +1 -1
- package/dist/src/scheme/scheme.js +0 -2
- package/dist/src/scheme/switch.d.ts.map +1 -1
- package/dist/src/scheme/switch.js +12 -17
- package/dist/src/scrolls/scrolls.d.ts.map +1 -1
- package/dist/src/scrolls/scrolls.js +7 -9
- package/dist/src/skip-link/index.d.ts +2 -0
- package/dist/src/skip-link/index.d.ts.map +1 -0
- package/dist/src/skip-link/index.js +1 -0
- package/dist/src/{skipLink/skipLink.d.ts → skip-link/skip-link.d.ts} +1 -1
- package/dist/src/skip-link/skip-link.d.ts.map +1 -0
- package/dist/src/{skipLink/skipLink.js → skip-link/skip-link.js} +1 -1
- package/dist/src/table/index.d.ts.map +1 -1
- package/dist/src/table/table.d.ts +1 -1
- package/dist/src/table/table.d.ts.map +1 -1
- package/dist/src/table/table.js +3 -1
- package/highlight/highlight.ts +88 -118
- package/highlight/vite.ts +20 -10
- package/package.json +15 -16
- package/src/code/code.ts +18 -11
- package/src/code/index.ts +1 -0
- package/src/code/lines.d.ts +0 -5
- package/src/{codeBlock/codeBlock.ts → code-block/code-block.ts} +32 -14
- package/src/code-block/index.ts +3 -0
- package/src/copy/copy.ts +8 -17
- package/src/{copyTab/copyTab.ts → copy-tab/copy-tab.ts} +24 -8
- package/src/copy-tab/index.ts +12 -0
- package/src/diagram/diagram.ts +8 -4
- package/src/diagram/index.ts +1 -0
- package/src/footer/footer.ts +4 -2
- package/src/footer/index.ts +1 -0
- package/src/footnotes/footnotes.ts +26 -8
- package/src/footnotes/index.ts +1 -0
- package/src/header/header.ts +8 -5
- package/src/header/index.ts +1 -0
- package/src/heading/heading.ts +10 -2
- package/src/heading/index.ts +1 -0
- package/src/index.ts +23 -8
- package/src/nav-link/index.ts +3 -0
- package/src/{navLink/navLink.ts → nav-link/nav-link.ts} +14 -4
- package/src/note/index.ts +1 -0
- package/src/note/note.ts +6 -2
- package/src/pager/index.ts +1 -0
- package/src/pager/pager.ts +6 -2
- package/src/post-list/index.ts +3 -0
- package/src/post-list/post-list.ts +30 -0
- package/src/post-meta/index.ts +3 -0
- package/src/{postMeta/postMeta.ts → post-meta/post-meta.ts} +5 -2
- package/src/scheme/index.ts +3 -1
- package/src/scheme/{schemeSwitch.ts → scheme-switch.ts} +20 -8
- package/src/scheme/scheme.ts +3 -4
- package/src/scheme/switch.ts +9 -20
- package/src/scrolls/scrolls.ts +19 -13
- package/src/simple-rat.css +0 -47
- package/src/skip-link/index.ts +1 -0
- package/src/table/index.ts +1 -0
- package/src/table/table.ts +18 -9
- package/src/tokens.css +23 -32
- package/dist/src/codeBlock/codeBlock.d.ts.map +0 -1
- package/dist/src/codeBlock/index.d.ts +0 -3
- package/dist/src/codeBlock/index.d.ts.map +0 -1
- package/dist/src/codeBlock/index.js +0 -1
- package/dist/src/copyTab/copyTab.d.ts.map +0 -1
- package/dist/src/copyTab/index.d.ts +0 -3
- package/dist/src/copyTab/index.d.ts.map +0 -1
- package/dist/src/navLink/index.d.ts +0 -3
- package/dist/src/navLink/index.d.ts.map +0 -1
- package/dist/src/navLink/index.js +0 -1
- package/dist/src/navLink/navLink.d.ts.map +0 -1
- package/dist/src/postList/index.d.ts +0 -3
- package/dist/src/postList/index.d.ts.map +0 -1
- package/dist/src/postList/index.js +0 -1
- package/dist/src/postList/postList.d.ts.map +0 -1
- package/dist/src/postList/postList.js +0 -3
- package/dist/src/postMeta/index.d.ts +0 -3
- package/dist/src/postMeta/index.d.ts.map +0 -1
- package/dist/src/postMeta/index.js +0 -1
- package/dist/src/postMeta/postMeta.d.ts.map +0 -1
- package/dist/src/scheme/schemeSwitch.d.ts.map +0 -1
- package/dist/src/skipLink/index.d.ts +0 -2
- package/dist/src/skipLink/index.d.ts.map +0 -1
- package/dist/src/skipLink/index.js +0 -1
- package/dist/src/skipLink/skipLink.d.ts.map +0 -1
- package/src/codeBlock/index.ts +0 -2
- package/src/copyTab/index.ts +0 -2
- package/src/navLink/index.ts +0 -2
- package/src/postList/index.ts +0 -2
- package/src/postList/postList.ts +0 -19
- package/src/postMeta/index.ts +0 -2
- package/src/skipLink/index.ts +0 -1
- /package/src/{skipLink/skipLink.ts → skip-link/skip-link.ts} +0 -0
package/src/simple-rat.css
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* simple rat: a plain page design for references, docs and blogs.
|
|
3
|
-
* Base elements and every component, built on the tokens only.
|
|
4
|
-
* Link it (it imports tokens.css beside it) and write plain HTML, or render the
|
|
5
|
-
* Foldkit components, which write the same markup.
|
|
6
|
-
* The look comes from ratstack.sh.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
1
|
@import "./tokens.css";
|
|
10
2
|
|
|
11
|
-
/* Page ---------------------------------------------------------------------- */
|
|
12
|
-
|
|
13
3
|
html {
|
|
14
4
|
font-family: var(--font);
|
|
15
5
|
font-size: 100%;
|
|
@@ -20,7 +10,6 @@ html {
|
|
|
20
10
|
/* Thin strokes on macOS, where light text on the dark page otherwise reads heavy. */
|
|
21
11
|
-webkit-font-smoothing: antialiased;
|
|
22
12
|
-moz-osx-font-smoothing: grayscale;
|
|
23
|
-
/* Text as typed: no => arrows or merged dots from the font's contextual alternates. */
|
|
24
13
|
font-variant-ligatures: no-contextual;
|
|
25
14
|
-webkit-text-size-adjust: 100%;
|
|
26
15
|
text-size-adjust: 100%;
|
|
@@ -43,20 +32,16 @@ header nav {
|
|
|
43
32
|
margin-bottom: var(--space-sm);
|
|
44
33
|
}
|
|
45
34
|
|
|
46
|
-
/* An item after the first carries its middot, so a wrapped nav never ends on "·". It moves
|
|
47
|
-
to the next line whole; only an item wider than the line breaks inside. */
|
|
48
35
|
nav > span {
|
|
49
36
|
display: inline-block;
|
|
50
37
|
max-width: 100%;
|
|
51
38
|
overflow-wrap: anywhere;
|
|
52
39
|
}
|
|
53
40
|
|
|
54
|
-
/* Nav links don't turn purple: the nav is a map, not a reading history. */
|
|
55
41
|
nav a:visited {
|
|
56
42
|
color: var(--link);
|
|
57
43
|
}
|
|
58
44
|
|
|
59
|
-
/* The current page is plain text; the section a page belongs to is plain but underlined. */
|
|
60
45
|
nav a[aria-current] {
|
|
61
46
|
color: inherit;
|
|
62
47
|
}
|
|
@@ -65,7 +50,6 @@ nav a[aria-current="page"] {
|
|
|
65
50
|
text-decoration: none;
|
|
66
51
|
}
|
|
67
52
|
|
|
68
|
-
/* "Skip to content", shown only when it has keyboard focus. */
|
|
69
53
|
.skip {
|
|
70
54
|
left: var(--space-base);
|
|
71
55
|
padding: var(--space-hair) 1ch;
|
|
@@ -78,7 +62,6 @@ nav a[aria-current="page"] {
|
|
|
78
62
|
top: var(--space-base);
|
|
79
63
|
}
|
|
80
64
|
|
|
81
|
-
/* Text for screen readers only, such as the copy tab's "Copied". */
|
|
82
65
|
.visually-hidden {
|
|
83
66
|
clip-path: inset(50%);
|
|
84
67
|
height: 1px;
|
|
@@ -102,8 +85,6 @@ footer p {
|
|
|
102
85
|
margin: var(--space-md) 0 0;
|
|
103
86
|
}
|
|
104
87
|
|
|
105
|
-
/* Text ---------------------------------------------------------------------- */
|
|
106
|
-
|
|
107
88
|
h1,
|
|
108
89
|
h2,
|
|
109
90
|
h3 {
|
|
@@ -166,7 +147,6 @@ pre:focus-visible {
|
|
|
166
147
|
outline-offset: 2px;
|
|
167
148
|
}
|
|
168
149
|
|
|
169
|
-
/* The `#` after a section heading. */
|
|
170
150
|
a.self {
|
|
171
151
|
color: var(--muted);
|
|
172
152
|
font-weight: normal;
|
|
@@ -245,8 +225,6 @@ mark {
|
|
|
245
225
|
color: inherit;
|
|
246
226
|
}
|
|
247
227
|
|
|
248
|
-
/* Code ---------------------------------------------------------------------- */
|
|
249
|
-
|
|
250
228
|
code {
|
|
251
229
|
background: var(--code-fill);
|
|
252
230
|
border: 1px solid var(--code-rule);
|
|
@@ -273,14 +251,12 @@ pre {
|
|
|
273
251
|
white-space: pre;
|
|
274
252
|
}
|
|
275
253
|
|
|
276
|
-
/* A copyable block of prose (no language), like a prompt: it wraps and reads at text size. */
|
|
277
254
|
pre[data-copy]:not(:has(code[class])) {
|
|
278
255
|
font-size: 1em;
|
|
279
256
|
line-height: var(--leading);
|
|
280
257
|
white-space: pre-wrap;
|
|
281
258
|
}
|
|
282
259
|
|
|
283
|
-
/* On a phone, a copyable one-liner wraps rather than hiding its end. */
|
|
284
260
|
@media (max-width: 40rem) {
|
|
285
261
|
pre[data-copy]:not(figure.file pre) {
|
|
286
262
|
overflow-wrap: anywhere;
|
|
@@ -298,8 +274,6 @@ pre code[class^="language-"] {
|
|
|
298
274
|
color: var(--code-ink);
|
|
299
275
|
}
|
|
300
276
|
|
|
301
|
-
/* Tabs on a code block's top edge: a file name on the left, `copy` on the right.
|
|
302
|
-
2.25rem of room above is one tab line (1.5em) plus its border. */
|
|
303
277
|
.file,
|
|
304
278
|
.copyable {
|
|
305
279
|
margin: 2.25rem 0 var(--space-base);
|
|
@@ -317,9 +291,6 @@ pre code[class^="language-"] {
|
|
|
317
291
|
position: absolute;
|
|
318
292
|
}
|
|
319
293
|
|
|
320
|
-
/* A file block is a grid: its tabs are the first row, standing on the code below, which
|
|
321
|
-
spans the row. A long file name wraps inside its tab; the copy tab keeps its width beside
|
|
322
|
-
it, whatever it says. */
|
|
323
294
|
.file {
|
|
324
295
|
align-items: end;
|
|
325
296
|
display: grid;
|
|
@@ -368,7 +339,6 @@ pre code[class^="language-"] {
|
|
|
368
339
|
text-decoration-thickness: 2px;
|
|
369
340
|
}
|
|
370
341
|
|
|
371
|
-
/* The scheme switch at the end of the nav: system/light/dark, the current one plain text. */
|
|
372
342
|
.theme button {
|
|
373
343
|
background: none;
|
|
374
344
|
border: 0;
|
|
@@ -387,7 +357,6 @@ pre code[class^="language-"] {
|
|
|
387
357
|
text-decoration: none;
|
|
388
358
|
}
|
|
389
359
|
|
|
390
|
-
/* Bigger touch targets on touch screens, without moving the line they sit on. */
|
|
391
360
|
@media (pointer: coarse) {
|
|
392
361
|
nav a,
|
|
393
362
|
sup a {
|
|
@@ -409,8 +378,6 @@ pre code[class^="language-"] {
|
|
|
409
378
|
}
|
|
410
379
|
}
|
|
411
380
|
|
|
412
|
-
/* Figures ------------------------------------------------------------------- */
|
|
413
|
-
|
|
414
381
|
figure {
|
|
415
382
|
margin: var(--space-lg) var(--indent);
|
|
416
383
|
}
|
|
@@ -419,8 +386,6 @@ figure pre {
|
|
|
419
386
|
margin: 0;
|
|
420
387
|
}
|
|
421
388
|
|
|
422
|
-
/* Diagrams: box characters are exactly 1.2em tall, so a line a little under that makes
|
|
423
|
-
rows overlap by a hair and never open a gap when the browser rounds to pixels. */
|
|
424
389
|
pre[role="img"] {
|
|
425
390
|
line-height: var(--leading-diagram);
|
|
426
391
|
}
|
|
@@ -433,8 +398,6 @@ figure.file {
|
|
|
433
398
|
margin-inline: 0;
|
|
434
399
|
}
|
|
435
400
|
|
|
436
|
-
/* Notes --------------------------------------------------------------------- */
|
|
437
|
-
|
|
438
401
|
.note {
|
|
439
402
|
border: 1px solid currentColor;
|
|
440
403
|
margin: var(--space-lg) 0;
|
|
@@ -457,10 +420,6 @@ details[open] > summary {
|
|
|
457
420
|
margin-bottom: var(--space-sm);
|
|
458
421
|
}
|
|
459
422
|
|
|
460
|
-
/* Tables -------------------------------------------------------------------- */
|
|
461
|
-
|
|
462
|
-
/* A table is a table. Inside .table-scroll (Table.view writes it) a table wider than the
|
|
463
|
-
column scrolls sideways in its wrapper. */
|
|
464
423
|
.table-scroll {
|
|
465
424
|
margin: var(--space-lg) 0;
|
|
466
425
|
max-width: 100%;
|
|
@@ -537,9 +496,6 @@ td:has(.swatch) {
|
|
|
537
496
|
}
|
|
538
497
|
}
|
|
539
498
|
|
|
540
|
-
/* Blog ---------------------------------------------------------------------- */
|
|
541
|
-
|
|
542
|
-
/* A post list: date, then title. */
|
|
543
499
|
.posts {
|
|
544
500
|
display: grid;
|
|
545
501
|
gap: var(--space-hair) 2ch;
|
|
@@ -576,9 +532,6 @@ td:has(.swatch) {
|
|
|
576
532
|
margin-top: var(--space-md);
|
|
577
533
|
}
|
|
578
534
|
|
|
579
|
-
/* Motion -------------------------------------------------------------------- */
|
|
580
|
-
|
|
581
|
-
/* A followed link's destination washes yellow and fades. */
|
|
582
535
|
:target {
|
|
583
536
|
animation: target var(--wash) both;
|
|
584
537
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { view } from "./skip-link.ts";
|
package/src/table/index.ts
CHANGED
package/src/table/table.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Html, HtmlBuilder } from "foldkit/html";
|
|
|
2
2
|
|
|
3
3
|
/** Configuration for rendering a table with `view`. */
|
|
4
4
|
export type ViewConfig = Readonly<{
|
|
5
|
-
columns:
|
|
5
|
+
columns: readonly string[];
|
|
6
6
|
rows: ReadonlyArray<ReadonlyArray<Html | string>>;
|
|
7
7
|
/** Under 40rem each row becomes a card, its cells labelled with their column. Without it
|
|
8
8
|
the table stays a table on a phone and scrolls sideways. */
|
|
@@ -13,9 +13,13 @@ export type ViewConfig = Readonly<{
|
|
|
13
13
|
column. A stacked table also writes `data-label` on each cell and the ARIA table roles,
|
|
14
14
|
which keep it announced as a table in browsers that drop the table semantics once CSS
|
|
15
15
|
changes its display, as the stacked cards do. */
|
|
16
|
-
export const view = <Message>(
|
|
16
|
+
export const view = <Message>(
|
|
17
|
+
config: ViewConfig,
|
|
18
|
+
h: HtmlBuilder<Message>
|
|
19
|
+
): Html => {
|
|
17
20
|
const { columns, rows, isStacked = false } = config;
|
|
18
21
|
const role = (name: string) => (isStacked ? [h.Role(name)] : []);
|
|
22
|
+
|
|
19
23
|
return h.div(
|
|
20
24
|
[h.Class("table-scroll")],
|
|
21
25
|
[
|
|
@@ -23,7 +27,9 @@ export const view = <Message>(config: ViewConfig, h: HtmlBuilder<Message>): Html
|
|
|
23
27
|
h.thead(role("rowgroup"), [
|
|
24
28
|
h.tr(
|
|
25
29
|
role("row"),
|
|
26
|
-
columns.map((column) =>
|
|
30
|
+
columns.map((column) =>
|
|
31
|
+
h.keyed("th")(column, role("columnheader"), [column])
|
|
32
|
+
)
|
|
27
33
|
),
|
|
28
34
|
]),
|
|
29
35
|
h.tbody(
|
|
@@ -33,18 +39,21 @@ export const view = <Message>(config: ViewConfig, h: HtmlBuilder<Message>): Html
|
|
|
33
39
|
role("row"),
|
|
34
40
|
row.map((cell, index) => {
|
|
35
41
|
const label = columns[index];
|
|
42
|
+
|
|
36
43
|
return h.td(
|
|
37
44
|
[
|
|
38
45
|
...role("cell"),
|
|
39
|
-
...(isStacked && label !== undefined
|
|
46
|
+
...(isStacked && label !== undefined
|
|
47
|
+
? [h.DataAttribute("label", label)]
|
|
48
|
+
: []),
|
|
40
49
|
],
|
|
41
|
-
[cell]
|
|
50
|
+
[cell]
|
|
42
51
|
);
|
|
43
|
-
})
|
|
44
|
-
)
|
|
45
|
-
)
|
|
52
|
+
})
|
|
53
|
+
)
|
|
54
|
+
)
|
|
46
55
|
),
|
|
47
56
|
]),
|
|
48
|
-
]
|
|
57
|
+
]
|
|
49
58
|
);
|
|
50
59
|
};
|
package/src/tokens.css
CHANGED
|
@@ -1,43 +1,34 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* simple rat tokens: every colour, type, space and motion value the design uses.
|
|
3
|
-
* The look comes from ratstack.sh.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/* Each colour holds its light and dark value; the page's color-scheme picks one.
|
|
7
|
-
The page colours follow anoma.ly's notes: a warm grey page in light, a warm
|
|
8
|
-
near-black in dark, each with its text one step brighter. Catppuccin stays inside
|
|
9
|
-
code: Latte in light, darkened to pass AA on the code fill; Mocha in dark.
|
|
10
|
-
The page follows the reader's system unless <html data-scheme> says otherwise. */
|
|
11
1
|
:root {
|
|
12
2
|
color-scheme: light dark;
|
|
13
3
|
|
|
14
|
-
--ground: light-dark(#e8e7e3, #080807);
|
|
15
|
-
--ink: light-dark(#34322b, #e3ded5);
|
|
16
|
-
--muted: light-dark(#5f5b53, #958f85);
|
|
17
|
-
--rule: light-dark(#b7b5ad, #3a3834);
|
|
18
|
-
--link: light-dark(#1f3fc4, #9db8ff);
|
|
19
|
-
--visited: light-dark(#5a2e91, #c9a9f2);
|
|
20
|
-
--code-fill: light-dark(#dad8d1, #1a1917);
|
|
21
|
-
--code-rule: light-dark(#a9a69d, #44423d);
|
|
22
|
-
--code-ink: light-dark(#3d3a34, #d4cec4);
|
|
23
|
-
--mark: light-dark(#eed596, #3b3222);
|
|
24
|
-
--red: light-dark(#b0342d, #f2645b);
|
|
25
|
-
|
|
26
|
-
--t-kw: light-dark(#7832d2, #cba6f7);
|
|
27
|
-
--t-str: light-dark(#2a6a1c, #a6e3a1);
|
|
28
|
-
--t-num: light-dark(#9d3e07, #fab387);
|
|
29
|
-
--t-ty: light-dark(#815211, #f9e2af);
|
|
30
|
-
--t-fn: light-dark(#1955cb, #89b4fa);
|
|
31
|
-
--t-prop: light-dark(#10666b, #94e2d5);
|
|
32
|
-
--t-op: light-dark(#026389, #89dceb);
|
|
33
|
-
--t-com: light-dark(#595b6a, #9399b2);
|
|
34
|
-
--t-del: light-dark(#b90d32, #f38ba8);
|
|
4
|
+
--ground: light-dark(#e8e7e3, #080807);
|
|
5
|
+
--ink: light-dark(#34322b, #e3ded5);
|
|
6
|
+
--muted: light-dark(#5f5b53, #958f85);
|
|
7
|
+
--rule: light-dark(#b7b5ad, #3a3834);
|
|
8
|
+
--link: light-dark(#1f3fc4, #9db8ff);
|
|
9
|
+
--visited: light-dark(#5a2e91, #c9a9f2);
|
|
10
|
+
--code-fill: light-dark(#dad8d1, #1a1917);
|
|
11
|
+
--code-rule: light-dark(#a9a69d, #44423d);
|
|
12
|
+
--code-ink: light-dark(#3d3a34, #d4cec4);
|
|
13
|
+
--mark: light-dark(#eed596, #3b3222);
|
|
14
|
+
--red: light-dark(#b0342d, #f2645b);
|
|
15
|
+
|
|
16
|
+
--t-kw: light-dark(#7832d2, #cba6f7);
|
|
17
|
+
--t-str: light-dark(#2a6a1c, #a6e3a1);
|
|
18
|
+
--t-num: light-dark(#9d3e07, #fab387);
|
|
19
|
+
--t-ty: light-dark(#815211, #f9e2af);
|
|
20
|
+
--t-fn: light-dark(#1955cb, #89b4fa);
|
|
21
|
+
--t-prop: light-dark(#10666b, #94e2d5);
|
|
22
|
+
--t-op: light-dark(#026389, #89dceb);
|
|
23
|
+
--t-com: light-dark(#595b6a, #9399b2);
|
|
24
|
+
--t-del: light-dark(#b90d32, #f38ba8);
|
|
35
25
|
|
|
36
26
|
/* One monospace for every word. Berkeley Mono is licensed and not part of the design's
|
|
37
27
|
files: a site with its own licence serves it; everyone else gets the system monospace.
|
|
38
28
|
On macOS and Linux that has the same character width; Windows' Consolas is narrower, so
|
|
39
29
|
there the column widens about 9% when Berkeley Mono arrives. Lines never re-wrap. */
|
|
40
|
-
--font:
|
|
30
|
+
--font:
|
|
31
|
+
"Berkeley Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
41
32
|
--leading: 1.5;
|
|
42
33
|
--leading-tight: 1.25;
|
|
43
34
|
/* Box characters are 1.2em tall; a hair under that and diagram rows never gap. */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codeBlock.d.ts","sourceRoot":"","sources":["../../../src/codeBlock/codeBlock.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGtD,OAAO,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,KAAK,OAAO,MAAM,uBAAuB,CAAC;AAEjD,4DAA4D;AAC5D,MAAM,MAAM,UAAU,CAAC,aAAa,IAAI,QAAQ,CAAC;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb;wEACoE;IACpE,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;2DAEuD;IACvD,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;yBAEqB;IACrB,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACvD,yFAAyF;IACzF,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,KAAK,aAAa,CAAC;CAC9D,CAAC,CAAC;AAEH,8EAA8E;AAC9E,eAAO,MAAM,MAAM,SAAU,MAAM,SAAS,MAAM,KAAG,MAGpD,CAAC;AAEF;eACe;AACf,eAAO,MAAM,UAAU,SAAU,MAAM,SAAS,MAAM,KAAG,IAAI,CAAC,UAAU,EAAE,aAAa,CAGrF,CAAC;AAeH;0FAC0F;AAC1F,eAAO,MAAM,IAAI,GAAI,aAAa,UACxB,UAAU,CAAC,aAAa,CAAC,KAC9B,WAAW,CAAC,aAAa,CAAC,KAC5B,IAuBF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/codeBlock/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAClD,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { copyInputs, view } from "./codeBlock.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"copyTab.d.ts","sourceRoot":"","sources":["../../../src/copyTab/copyTab.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAKzC,cAAc,iBAAiB,CAAC;AAIhC,8EAA8E;AAC9E,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,qFAAqF;IACrF,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb;uDACmD;IACnD,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,CAAC,CAAC;AAkBH;;;;sEAIsE;AACtE,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;IA9Bf,qFAAqF;UAC/E,MAAM;IACZ,kCAAkC;UAC5B,MAAM;IACZ;uDACmD;iBACtC,MAAM,IAAI;GA0CxB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/copyTab/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpG,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/navLink/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { view } from "./navLink.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navLink.d.ts","sourceRoot":"","sources":["../../../src/navLink/navLink.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEtD,0DAA0D;AAC1D,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd;wCACoC;IACpC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;CAC1C,CAAC,CAAC;AAEH,qEAAqE;AACrE,eAAO,MAAM,IAAI,GAAI,OAAO,UAAU,UAAU,KAAK,WAAW,CAAC,OAAO,CAAC,KAAG,IAI3E,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/postList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { view } from "./postList.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postList.d.ts","sourceRoot":"","sources":["../../../src/postList/postList.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,MAAM,KAAK,GAAG,QAAQ,CAAC;IAAmB,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE7F,2DAA2D;AAC3D,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAAE,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC,CAAA;CAAE,CAAC,CAAC;AAEnE,yDAAyD;AACzD,eAAO,MAAM,IAAI,GAAI,OAAO,UAAU,UAAU,KAAK,WAAW,CAAC,OAAO,CAAC,KAAG,IAUzE,CAAC"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
|
|
2
|
-
/** A list of posts: date, then title, in two columns. */
|
|
3
|
-
export const view = (config, h) => __foldkitBrandViewResult((h.ul([h.Class("posts")], config.posts.map((post) => __foldkitBrandViewResult((h.keyed("li")(post.href, [], [h.time([h.Datetime(post.date)], [post.date]), h.a([h.Href(post.href)], [post.title])])), "@gjermundgaraba-designs/simple-rat/src/postList/postList.js#anonymous")))), "@gjermundgaraba-designs/simple-rat/src/postList/postList.js#view");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/postMeta/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { view } from "./postMeta.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postMeta.d.ts","sourceRoot":"","sources":["../../../src/postMeta/postMeta.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEtD,kEAAkE;AAClE,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,gBAAgB;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,IAAI,CAAC,EAAE,aAAa,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC;CACrC,CAAC,CAAC;AAEH,2FAA2F;AAC3F,eAAO,MAAM,IAAI,GAAI,OAAO,UAAU,UAAU,KAAK,WAAW,CAAC,OAAO,CAAC,KAAG,IAUzE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schemeSwitch.d.ts","sourceRoot":"","sources":["../../../src/scheme/schemeSwitch.ts"],"names":[],"mappings":"AAOA,cAAc,aAAa,CAAC;AAU5B;;;kCAGkC;AAClC,eAAO,MAAM,IAAI;;;;;;;;;;;QAqBhB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/skipLink/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { view } from "./skipLink.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skipLink.d.ts","sourceRoot":"","sources":["../../../src/skipLink/skipLink.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEtD;;;8CAG8C;AAC9C,eAAO,MAAM,IAAI,GAAI,OAAO,KAAK,WAAW,CAAC,OAAO,CAAC,KAAG,IACM,CAAC"}
|
package/src/codeBlock/index.ts
DELETED
package/src/copyTab/index.ts
DELETED
package/src/navLink/index.ts
DELETED
package/src/postList/index.ts
DELETED
package/src/postList/postList.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Html, HtmlBuilder } from "foldkit/html";
|
|
2
|
-
|
|
3
|
-
export type Entry = Readonly<{ /** ISO date. */ date: string; title: string; href: string }>;
|
|
4
|
-
|
|
5
|
-
/** Configuration for rendering a post list with `view`. */
|
|
6
|
-
export type ViewConfig = Readonly<{ posts: ReadonlyArray<Entry> }>;
|
|
7
|
-
|
|
8
|
-
/** A list of posts: date, then title, in two columns. */
|
|
9
|
-
export const view = <Message>(config: ViewConfig, h: HtmlBuilder<Message>): Html =>
|
|
10
|
-
h.ul(
|
|
11
|
-
[h.Class("posts")],
|
|
12
|
-
config.posts.map((post) =>
|
|
13
|
-
h.keyed("li")(
|
|
14
|
-
post.href,
|
|
15
|
-
[],
|
|
16
|
-
[h.time([h.Datetime(post.date)], [post.date]), h.a([h.Href(post.href)], [post.title])],
|
|
17
|
-
),
|
|
18
|
-
),
|
|
19
|
-
);
|
package/src/postMeta/index.ts
DELETED
package/src/skipLink/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { view } from "./skipLink.ts";
|
|
File without changes
|