@observablehq/notebook-kit 1.0.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 +13 -0
- package/README.md +7 -0
- package/dist/bin/build.d.ts +2 -0
- package/dist/bin/build.js +63 -0
- package/dist/bin/download.d.ts +2 -0
- package/dist/bin/download.js +49 -0
- package/dist/bin/notebooks.d.ts +2 -0
- package/dist/bin/notebooks.js +33 -0
- package/dist/bin/preview.d.ts +2 -0
- package/dist/bin/preview.js +48 -0
- package/dist/package.json +73 -0
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.js +5 -0
- package/dist/src/javascript/assignments.d.ts +2 -0
- package/dist/src/javascript/assignments.js +37 -0
- package/dist/src/javascript/assignments.test.d.ts +1 -0
- package/dist/src/javascript/assignments.test.js +33 -0
- package/dist/src/javascript/awaits.d.ts +2 -0
- package/dist/src/javascript/awaits.js +23 -0
- package/dist/src/javascript/awaits.test.d.ts +1 -0
- package/dist/src/javascript/awaits.test.js +22 -0
- package/dist/src/javascript/declarations.d.ts +2 -0
- package/dist/src/javascript/declarations.js +45 -0
- package/dist/src/javascript/files.d.ts +3 -0
- package/dist/src/javascript/files.js +18 -0
- package/dist/src/javascript/globals.d.ts +1 -0
- package/dist/src/javascript/globals.js +86 -0
- package/dist/src/javascript/imports/jsr.d.ts +2 -0
- package/dist/src/javascript/imports/jsr.js +6 -0
- package/dist/src/javascript/imports/npm.d.ts +2 -0
- package/dist/src/javascript/imports/npm.js +47 -0
- package/dist/src/javascript/imports/npm.test.d.ts +1 -0
- package/dist/src/javascript/imports/npm.test.js +32 -0
- package/dist/src/javascript/imports/observable.d.ts +8 -0
- package/dist/src/javascript/imports/observable.js +64 -0
- package/dist/src/javascript/imports/observable.test.d.ts +1 -0
- package/dist/src/javascript/imports/observable.test.js +13 -0
- package/dist/src/javascript/imports.d.ts +21 -0
- package/dist/src/javascript/imports.js +146 -0
- package/dist/src/javascript/observable.d.ts +2 -0
- package/dist/src/javascript/observable.js +72 -0
- package/dist/src/javascript/parse.d.ts +11 -0
- package/dist/src/javascript/parse.js +53 -0
- package/dist/src/javascript/references.d.ts +8 -0
- package/dist/src/javascript/references.js +129 -0
- package/dist/src/javascript/references.test.d.ts +1 -0
- package/dist/src/javascript/references.test.js +38 -0
- package/dist/src/javascript/sourcemap.d.ts +21 -0
- package/dist/src/javascript/sourcemap.js +143 -0
- package/dist/src/javascript/sourcemap.test.d.ts +1 -0
- package/dist/src/javascript/sourcemap.test.js +88 -0
- package/dist/src/javascript/strings.d.ts +8 -0
- package/dist/src/javascript/strings.js +42 -0
- package/dist/src/javascript/strings.test.d.ts +1 -0
- package/dist/src/javascript/strings.test.js +31 -0
- package/dist/src/javascript/syntaxError.d.ts +2 -0
- package/dist/src/javascript/syntaxError.js +5 -0
- package/dist/src/javascript/template.d.ts +3 -0
- package/dist/src/javascript/template.js +141 -0
- package/dist/src/javascript/template.test.d.ts +1 -0
- package/dist/src/javascript/template.test.js +32 -0
- package/dist/src/javascript/transpile.d.ts +25 -0
- package/dist/src/javascript/transpile.js +42 -0
- package/dist/src/javascript/transpile.test.d.ts +1 -0
- package/dist/src/javascript/transpile.test.js +29 -0
- package/dist/src/javascript/walk.d.ts +5 -0
- package/dist/src/javascript/walk.js +13 -0
- package/dist/src/lib/notebook.d.ts +35 -0
- package/dist/src/lib/notebook.js +19 -0
- package/dist/src/lib/notebook.test.d.ts +1 -0
- package/dist/src/lib/notebook.test.js +26 -0
- package/dist/src/lib/serialize.d.ts +5 -0
- package/dist/src/lib/serialize.js +97 -0
- package/dist/src/lib/serialize.test.d.ts +1 -0
- package/dist/src/lib/serialize.test.js +125 -0
- package/dist/src/lib/text.d.ts +1 -0
- package/dist/src/lib/text.js +3 -0
- package/dist/src/runtime/define.d.ts +28 -0
- package/dist/src/runtime/define.js +62 -0
- package/dist/src/runtime/display.d.ts +16 -0
- package/dist/src/runtime/display.js +60 -0
- package/dist/src/runtime/index.d.ts +11 -0
- package/dist/src/runtime/index.js +14 -0
- package/dist/src/runtime/inspect.d.ts +3 -0
- package/dist/src/runtime/inspect.js +43 -0
- package/dist/src/runtime/stdlib/assets.d.ts +4 -0
- package/dist/src/runtime/stdlib/assets.js +110 -0
- package/dist/src/runtime/stdlib/assets.test.d.ts +1 -0
- package/dist/src/runtime/stdlib/assets.test.js +78 -0
- package/dist/src/runtime/stdlib/dom/canvas.d.ts +1 -0
- package/dist/src/runtime/stdlib/dom/canvas.js +6 -0
- package/dist/src/runtime/stdlib/dom/context2d.d.ts +1 -0
- package/dist/src/runtime/stdlib/dom/context2d.js +9 -0
- package/dist/src/runtime/stdlib/dom/index.d.ts +5 -0
- package/dist/src/runtime/stdlib/dom/index.js +5 -0
- package/dist/src/runtime/stdlib/dom/svg.d.ts +1 -0
- package/dist/src/runtime/stdlib/dom/svg.js +7 -0
- package/dist/src/runtime/stdlib/dom/text.d.ts +1 -0
- package/dist/src/runtime/stdlib/dom/text.js +3 -0
- package/dist/src/runtime/stdlib/dom/uid.d.ts +8 -0
- package/dist/src/runtime/stdlib/dom/uid.js +25 -0
- package/dist/src/runtime/stdlib/dot.d.ts +2 -0
- package/dist/src/runtime/stdlib/dot.js +34 -0
- package/dist/src/runtime/stdlib/duckdb.d.ts +24 -0
- package/dist/src/runtime/stdlib/duckdb.js +379 -0
- package/dist/src/runtime/stdlib/fileAttachment.d.ts +71 -0
- package/dist/src/runtime/stdlib/fileAttachment.js +199 -0
- package/dist/src/runtime/stdlib/generators/index.d.ts +5 -0
- package/dist/src/runtime/stdlib/generators/index.js +5 -0
- package/dist/src/runtime/stdlib/generators/input.d.ts +1 -0
- package/dist/src/runtime/stdlib/generators/input.js +45 -0
- package/dist/src/runtime/stdlib/generators/now.d.ts +1 -0
- package/dist/src/runtime/stdlib/generators/now.js +5 -0
- package/dist/src/runtime/stdlib/generators/observe.d.ts +1 -0
- package/dist/src/runtime/stdlib/generators/observe.js +31 -0
- package/dist/src/runtime/stdlib/generators/queue.d.ts +1 -0
- package/dist/src/runtime/stdlib/generators/queue.js +27 -0
- package/dist/src/runtime/stdlib/generators/width.d.ts +1 -0
- package/dist/src/runtime/stdlib/generators/width.js +13 -0
- package/dist/src/runtime/stdlib/highlight.d.ts +2 -0
- package/dist/src/runtime/stdlib/highlight.js +76 -0
- package/dist/src/runtime/stdlib/index.d.ts +56 -0
- package/dist/src/runtime/stdlib/index.js +23 -0
- package/dist/src/runtime/stdlib/inputs.css +15 -0
- package/dist/src/runtime/stdlib/inputs.d.ts +2 -0
- package/dist/src/runtime/stdlib/inputs.js +2 -0
- package/dist/src/runtime/stdlib/leaflet.d.ts +1 -0
- package/dist/src/runtime/stdlib/leaflet.js +7 -0
- package/dist/src/runtime/stdlib/mapboxgl.d.ts +1 -0
- package/dist/src/runtime/stdlib/mapboxgl.js +5 -0
- package/dist/src/runtime/stdlib/md.d.ts +5 -0
- package/dist/src/runtime/stdlib/md.js +72 -0
- package/dist/src/runtime/stdlib/mermaid.d.ts +2 -0
- package/dist/src/runtime/stdlib/mermaid.js +11 -0
- package/dist/src/runtime/stdlib/mutable.d.ts +8 -0
- package/dist/src/runtime/stdlib/mutable.js +30 -0
- package/dist/src/runtime/stdlib/observer.d.ts +16 -0
- package/dist/src/runtime/stdlib/observer.js +42 -0
- package/dist/src/runtime/stdlib/recommendedLibraries.d.ts +25 -0
- package/dist/src/runtime/stdlib/recommendedLibraries.js +26 -0
- package/dist/src/runtime/stdlib/require.d.ts +4 -0
- package/dist/src/runtime/stdlib/require.js +40 -0
- package/dist/src/runtime/stdlib/sampleDatasets.d.ts +12 -0
- package/dist/src/runtime/stdlib/sampleDatasets.js +31 -0
- package/dist/src/runtime/stdlib/sql.d.ts +5 -0
- package/dist/src/runtime/stdlib/sql.js +5 -0
- package/dist/src/runtime/stdlib/template.d.ts +7 -0
- package/dist/src/runtime/stdlib/template.js +2 -0
- package/dist/src/runtime/stdlib/tex.d.ts +7 -0
- package/dist/src/runtime/stdlib/tex.js +18 -0
- package/dist/src/runtime/stdlib/vega-lite.d.ts +1 -0
- package/dist/src/runtime/stdlib/vega-lite.js +4 -0
- package/dist/src/styles/abstract-dark.css +14 -0
- package/dist/src/styles/abstract-light.css +14 -0
- package/dist/src/styles/global.css +266 -0
- package/dist/src/styles/highlight.css +47 -0
- package/dist/src/styles/index.css +14 -0
- package/dist/src/styles/inspector.css +89 -0
- package/dist/src/styles/plot.css +7 -0
- package/dist/src/styles/syntax-dark.css +12 -0
- package/dist/src/styles/syntax-light.css +12 -0
- package/dist/src/styles/theme-air.css +7 -0
- package/dist/src/styles/theme-coffee.css +7 -0
- package/dist/src/styles/theme-cotton.css +7 -0
- package/dist/src/styles/theme-deep-space.css +16 -0
- package/dist/src/styles/theme-glacier.css +7 -0
- package/dist/src/styles/theme-ink.css +7 -0
- package/dist/src/styles/theme-midnight.css +7 -0
- package/dist/src/styles/theme-near-midnight.css +7 -0
- package/dist/src/styles/theme-ocean-floor.css +7 -0
- package/dist/src/styles/theme-parchment.css +7 -0
- package/dist/src/styles/theme-slate.css +7 -0
- package/dist/src/styles/theme-stark.css +16 -0
- package/dist/src/styles/theme-sun-faded.css +7 -0
- package/dist/src/templates/default.html +31 -0
- package/dist/src/vite/config.d.ts +2 -0
- package/dist/src/vite/config.js +30 -0
- package/dist/src/vite/index.d.ts +2 -0
- package/dist/src/vite/index.js +2 -0
- package/dist/src/vite/observable.d.ts +12 -0
- package/dist/src/vite/observable.js +176 -0
- package/package.json +73 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const aapl: () => Promise<any>;
|
|
2
|
+
export declare const alphabet: () => Promise<any>;
|
|
3
|
+
export declare const cars: () => Promise<any>;
|
|
4
|
+
export declare const citywages: () => Promise<any>;
|
|
5
|
+
export declare const diamonds: () => Promise<any>;
|
|
6
|
+
export declare const flare: () => Promise<any>;
|
|
7
|
+
export declare const industries: () => Promise<any>;
|
|
8
|
+
export declare const miserables: () => Promise<any>;
|
|
9
|
+
export declare const olympians: () => Promise<any>;
|
|
10
|
+
export declare const penguins: () => Promise<any>;
|
|
11
|
+
export declare const pizza: () => Promise<any>;
|
|
12
|
+
export declare const weather: () => Promise<any>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export const aapl = () => csv(dataset("aapl.csv"), true);
|
|
2
|
+
export const alphabet = () => csv(dataset("alphabet.csv"), true);
|
|
3
|
+
export const cars = () => csv(dataset("cars.csv"), true);
|
|
4
|
+
export const citywages = () => csv(dataset("citywages.csv"), true);
|
|
5
|
+
export const diamonds = () => csv(dataset("diamonds.csv"), true);
|
|
6
|
+
export const flare = () => csv(dataset("flare.csv"), true);
|
|
7
|
+
export const industries = () => csv(dataset("industries.csv"), true);
|
|
8
|
+
export const miserables = () => json(dataset("miserables.json"));
|
|
9
|
+
export const olympians = () => csv(dataset("olympians.csv"), true);
|
|
10
|
+
export const penguins = () => csv(dataset("penguins.csv"), true);
|
|
11
|
+
export const pizza = () => csv(dataset("pizza.csv"), true);
|
|
12
|
+
export const weather = () => csv(dataset("weather.csv"), true);
|
|
13
|
+
function dataset(name) {
|
|
14
|
+
return `https://cdn.jsdelivr.net/npm/@observablehq/sample-datasets/${name}`;
|
|
15
|
+
}
|
|
16
|
+
async function json(url) {
|
|
17
|
+
const response = await fetch(url);
|
|
18
|
+
if (!response.ok)
|
|
19
|
+
throw new Error(`unable to fetch ${url}: status ${response.status}`);
|
|
20
|
+
return response.json();
|
|
21
|
+
}
|
|
22
|
+
async function text(url) {
|
|
23
|
+
const response = await fetch(url);
|
|
24
|
+
if (!response.ok)
|
|
25
|
+
throw new Error(`unable to fetch ${url}: status ${response.status}`);
|
|
26
|
+
return response.text();
|
|
27
|
+
}
|
|
28
|
+
async function csv(url, typed) {
|
|
29
|
+
const [contents, d3] = await Promise.all([text(url), import("npm:d3-dsv")]);
|
|
30
|
+
return d3.csvParse(contents, typed && d3.autoType);
|
|
31
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type TemplateRenderer<T = Node> = (template: readonly string[], ...values: any[]) => T;
|
|
2
|
+
export type RawTemplateRenderer<T = Node> = (template: {
|
|
3
|
+
raw: readonly string[];
|
|
4
|
+
}, ...values: any[]) => T;
|
|
5
|
+
export type AsyncRawTemplateRenderer<T = Node> = (template: {
|
|
6
|
+
raw: readonly string[];
|
|
7
|
+
}, ...values: any[]) => Promise<T>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import katex from "npm:katex";
|
|
3
|
+
const link = document.createElement("link");
|
|
4
|
+
link.href = "https://cdn.jsdelivr.net/npm/katex/dist/katex.min.css";
|
|
5
|
+
link.rel = "stylesheet";
|
|
6
|
+
document.head.appendChild(link);
|
|
7
|
+
export const tex = Object.assign(renderer(), {
|
|
8
|
+
options: renderer,
|
|
9
|
+
block: renderer({ displayMode: true })
|
|
10
|
+
});
|
|
11
|
+
function renderer(options) {
|
|
12
|
+
return function (template, ...values) {
|
|
13
|
+
const source = String.raw.call(String, template, ...values);
|
|
14
|
+
const root = document.createElement("div");
|
|
15
|
+
katex.render(source, root, { ...options, output: "html" });
|
|
16
|
+
return root.removeChild(root.firstChild);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const vl: any;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@import url("./syntax-dark.css");
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--theme-background-a: color-mix(in srgb, var(--theme-foreground) 4%, var(--theme-background-b));
|
|
5
|
+
--theme-background: var(--theme-background-a);
|
|
6
|
+
--theme-background-alt: var(--theme-background-b);
|
|
7
|
+
--theme-foreground-alt: color-mix(in srgb, var(--theme-foreground) 90%, var(--theme-background-b));
|
|
8
|
+
--theme-foreground-muted: color-mix(in srgb, var(--theme-foreground) 60%, var(--theme-background-b));
|
|
9
|
+
--theme-foreground-faint: color-mix(in srgb, var(--theme-foreground) 50%, var(--theme-background-b));
|
|
10
|
+
--theme-foreground-fainter: color-mix(in srgb, var(--theme-foreground) 30%, var(--theme-background-b));
|
|
11
|
+
--theme-foreground-faintest: color-mix(in srgb, var(--theme-foreground) 14%, var(--theme-background-b));
|
|
12
|
+
--theme-error: #e7040f;
|
|
13
|
+
color-scheme: dark;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@import url("./syntax-light.css");
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--theme-background-b: color-mix(in srgb, var(--theme-foreground) 4%, var(--theme-background-a));
|
|
5
|
+
--theme-background: var(--theme-background-a);
|
|
6
|
+
--theme-background-alt: var(--theme-background-b);
|
|
7
|
+
--theme-foreground-alt: color-mix(in srgb, var(--theme-foreground) 90%, var(--theme-background-a));
|
|
8
|
+
--theme-foreground-muted: color-mix(in srgb, var(--theme-foreground) 60%, var(--theme-background-a));
|
|
9
|
+
--theme-foreground-faint: color-mix(in srgb, var(--theme-foreground) 50%, var(--theme-background-a));
|
|
10
|
+
--theme-foreground-fainter: color-mix(in srgb, var(--theme-foreground) 30%, var(--theme-background-a));
|
|
11
|
+
--theme-foreground-faintest: color-mix(in srgb, var(--theme-foreground) 14%, var(--theme-background-a));
|
|
12
|
+
--theme-error: #e7040f;
|
|
13
|
+
color-scheme: light;
|
|
14
|
+
}
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--serif:
|
|
3
|
+
"Source Serif 4", "Iowan Old Style", "Apple Garamond", "Palatino Linotype", "Times New Roman",
|
|
4
|
+
"Droid Serif", Times, serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
|
5
|
+
--sans-serif:
|
|
6
|
+
"Inter", -apple-system, BlinkMacSystemFont, "avenir next", avenir, helvetica, "helvetica neue",
|
|
7
|
+
ubuntu, roboto, noto, "segoe ui", arial, sans-serif;
|
|
8
|
+
--monospace: "Spline Sans Mono", Menlo, Consolas, monospace;
|
|
9
|
+
--monospace-font: 14px/1.5 var(--monospace);
|
|
10
|
+
--max-width: calc(1024px - 4 * 16px); /* max-w-5xl p-4 */
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
html {
|
|
14
|
+
font: 17px/1.5 var(--serif);
|
|
15
|
+
-webkit-text-size-adjust: 100%;
|
|
16
|
+
-webkit-font-smoothing: antialiased;
|
|
17
|
+
-moz-osx-font-smoothing: grayscale;
|
|
18
|
+
background: var(--theme-background);
|
|
19
|
+
color: var(--theme-foreground);
|
|
20
|
+
margin-top: 16px;
|
|
21
|
+
padding: 16px 24px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
body {
|
|
25
|
+
margin: auto;
|
|
26
|
+
max-width: var(--max-width);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
h1,
|
|
30
|
+
h2,
|
|
31
|
+
h3,
|
|
32
|
+
h4,
|
|
33
|
+
h5,
|
|
34
|
+
h6 {
|
|
35
|
+
color: var(--theme-foreground-alt);
|
|
36
|
+
font-weight: 700;
|
|
37
|
+
line-height: 1.15;
|
|
38
|
+
margin-top: 0;
|
|
39
|
+
margin-bottom: 0.25rem;
|
|
40
|
+
text-wrap: balance;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
h2 + p,
|
|
44
|
+
h3 + p,
|
|
45
|
+
h4 + p,
|
|
46
|
+
h2 + table,
|
|
47
|
+
h3 + table,
|
|
48
|
+
h4 + table {
|
|
49
|
+
margin-top: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.observablehq:first-of-type h1 + h2 {
|
|
53
|
+
color: var(--theme-foreground);
|
|
54
|
+
font-size: 20px;
|
|
55
|
+
font-style: italic;
|
|
56
|
+
font-weight: normal;
|
|
57
|
+
margin-bottom: 1rem; /* see h2 ~ p */
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
a[href] {
|
|
61
|
+
color: var(--theme-foreground-focus);
|
|
62
|
+
text-decoration: none;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
a[href]:hover,
|
|
66
|
+
a[href]:focus {
|
|
67
|
+
text-decoration: underline;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
pre,
|
|
71
|
+
code,
|
|
72
|
+
tt {
|
|
73
|
+
font-family: var(--monospace);
|
|
74
|
+
font-size: 82.35294117%; /* from 17px to 14px */
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
pre code,
|
|
78
|
+
figcaption code {
|
|
79
|
+
font-size: inherit;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
pre[data-language] {
|
|
83
|
+
position: relative;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
pre[data-language]::before {
|
|
87
|
+
content: attr(data-language);
|
|
88
|
+
float: right;
|
|
89
|
+
margin: -4px -8px -4px -4px;
|
|
90
|
+
padding: 4px;
|
|
91
|
+
font-size: 12px;
|
|
92
|
+
line-height: 21px;
|
|
93
|
+
color: var(--theme-foreground-muted);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
h1 code,
|
|
97
|
+
h2 code,
|
|
98
|
+
h3 code,
|
|
99
|
+
h4 code,
|
|
100
|
+
h5 code,
|
|
101
|
+
h6 code {
|
|
102
|
+
font-size: 88.235294117%; /* from 17px to 15px */
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
h2[id] a[href],
|
|
106
|
+
h3[id] a[href] {
|
|
107
|
+
color: inherit;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
pre {
|
|
111
|
+
line-height: 1.5;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
img {
|
|
115
|
+
max-width: 100%;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
p,
|
|
119
|
+
table,
|
|
120
|
+
figure,
|
|
121
|
+
figcaption,
|
|
122
|
+
h1,
|
|
123
|
+
h2,
|
|
124
|
+
h3,
|
|
125
|
+
h4,
|
|
126
|
+
h5,
|
|
127
|
+
h6,
|
|
128
|
+
.katex-display {
|
|
129
|
+
max-width: 640px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
blockquote,
|
|
133
|
+
ol,
|
|
134
|
+
ul {
|
|
135
|
+
max-width: 600px;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
blockquote {
|
|
139
|
+
margin: 1rem 1.5rem;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
ul,
|
|
143
|
+
ol {
|
|
144
|
+
padding-left: 28px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
hr {
|
|
148
|
+
height: 1px;
|
|
149
|
+
margin: 1rem 0;
|
|
150
|
+
padding: 1rem 0;
|
|
151
|
+
border: none;
|
|
152
|
+
background: no-repeat center/100% 1px
|
|
153
|
+
linear-gradient(to right, var(--theme-foreground-faintest), var(--theme-foreground-faintest));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
pre {
|
|
157
|
+
background-color: var(--theme-background-alt);
|
|
158
|
+
border-radius: 4px;
|
|
159
|
+
margin: 1rem -1rem;
|
|
160
|
+
/* max-width: 960px; */
|
|
161
|
+
min-height: 1.5em;
|
|
162
|
+
padding: 4px 1rem;
|
|
163
|
+
overflow-x: auto;
|
|
164
|
+
box-sizing: border-box;
|
|
165
|
+
white-space: pre-wrap;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
input:not([type]),
|
|
169
|
+
input[type="email"],
|
|
170
|
+
input[type="number"],
|
|
171
|
+
input[type="password"],
|
|
172
|
+
input[type="range"],
|
|
173
|
+
input[type="search"],
|
|
174
|
+
input[type="tel"],
|
|
175
|
+
input[type="text"],
|
|
176
|
+
input[type="url"] {
|
|
177
|
+
width: 240px;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
input,
|
|
181
|
+
canvas,
|
|
182
|
+
button {
|
|
183
|
+
vertical-align: middle;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
button,
|
|
187
|
+
input,
|
|
188
|
+
textarea {
|
|
189
|
+
accent-color: var(--theme-foreground-focus);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
table {
|
|
193
|
+
width: 100%;
|
|
194
|
+
border-collapse: collapse;
|
|
195
|
+
font: 13px/1.2 var(--sans-serif);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
table pre,
|
|
199
|
+
table code,
|
|
200
|
+
table tt {
|
|
201
|
+
font-size: inherit;
|
|
202
|
+
line-height: inherit;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
th > pre:only-child,
|
|
206
|
+
td > pre:only-child {
|
|
207
|
+
margin: 0;
|
|
208
|
+
padding: 0;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
th {
|
|
212
|
+
color: var(--theme-foreground);
|
|
213
|
+
text-align: left;
|
|
214
|
+
vertical-align: bottom;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
td {
|
|
218
|
+
color: var(--theme-foreground-alt);
|
|
219
|
+
vertical-align: top;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
th,
|
|
223
|
+
td {
|
|
224
|
+
padding: 3px 6.5px 3px 0;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
th:last-child,
|
|
228
|
+
td:last-child {
|
|
229
|
+
padding-right: 0;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
tr:not(:last-child) {
|
|
233
|
+
border-bottom: solid 1px var(--theme-foreground-faintest);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
thead tr {
|
|
237
|
+
border-bottom: solid 1px var(--theme-foreground-fainter);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
figure,
|
|
241
|
+
table {
|
|
242
|
+
margin: 1rem 0;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
figure img {
|
|
246
|
+
max-width: 100%;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
figure > h2,
|
|
250
|
+
figure > h3 {
|
|
251
|
+
font-family: var(--sans-serif);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
figure > h2 {
|
|
255
|
+
font-size: 20px;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
figure > h3 {
|
|
259
|
+
font-size: 16px;
|
|
260
|
+
font-weight: normal;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
figcaption {
|
|
264
|
+
font: small var(--sans-serif);
|
|
265
|
+
color: var(--theme-foreground-muted);
|
|
266
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
.tok-link {
|
|
2
|
+
color: var(--syntax-link);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.tok-strong {
|
|
6
|
+
font-weight: 600;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.tok-emphasis {
|
|
10
|
+
font-style: italic;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.tok-keyword {
|
|
14
|
+
color: var(--syntax-keyword);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.tok-atom {
|
|
18
|
+
color: var(--syntax-atom);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.tok-literal {
|
|
22
|
+
color: var(--syntax-literal);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.tok-string {
|
|
26
|
+
color: var(--syntax-string);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.tok-comment {
|
|
30
|
+
color: var(--syntax-comment);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.tok-invalid {
|
|
34
|
+
color: var(--syntax-invalid);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.tok-variable {
|
|
38
|
+
color: var(--syntax-variable);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.tok-definition {
|
|
42
|
+
color: var(--syntax-definition);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.tok-meta {
|
|
46
|
+
color: var(--syntax-meta);
|
|
47
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* Copyright 2025 Observable, Inc. */
|
|
2
|
+
|
|
3
|
+
@import url("./global.css");
|
|
4
|
+
@import url("./inspector.css");
|
|
5
|
+
@import url("./highlight.css");
|
|
6
|
+
@import url("./plot.css");
|
|
7
|
+
|
|
8
|
+
.observablehq--cell:empty {
|
|
9
|
+
min-height: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.observablehq--cell:not(:empty) + pre {
|
|
13
|
+
margin-top: -11px;
|
|
14
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
.observablehq--collapsed,
|
|
2
|
+
.observablehq--expanded.observablehq--inspect a {
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.observablehq--caret {
|
|
7
|
+
margin-right: 4px;
|
|
8
|
+
vertical-align: baseline;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.observablehq--field {
|
|
12
|
+
text-indent: -1rem;
|
|
13
|
+
margin-left: 1rem;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.observablehq--inspect {
|
|
17
|
+
font: var(--monospace-font);
|
|
18
|
+
overflow-x: auto;
|
|
19
|
+
white-space: pre;
|
|
20
|
+
display: block;
|
|
21
|
+
padding: 2px 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.observablehq--inspect.observablehq--import {
|
|
25
|
+
white-space: normal;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.observablehq--inspect::-webkit-scrollbar {
|
|
29
|
+
display: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.observablehq--error .observablehq--inspect {
|
|
33
|
+
word-break: break-all;
|
|
34
|
+
white-space: pre-wrap;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.observablehq--string-expand {
|
|
38
|
+
margin-left: 6px;
|
|
39
|
+
padding: 2px 6px;
|
|
40
|
+
border-radius: 2px;
|
|
41
|
+
font-size: 80%;
|
|
42
|
+
background: var(--theme-background-alt);
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
vertical-align: middle;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.observablehq--keyword {
|
|
48
|
+
color: var(--syntax-keyword);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.observablehq--index,
|
|
52
|
+
.observablehq--key {
|
|
53
|
+
color: var(--syntax-definition);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.observablehq--symbol,
|
|
57
|
+
.observablehq--regexp,
|
|
58
|
+
.observablehq--string {
|
|
59
|
+
color: var(--syntax-string);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.observablehq--null {
|
|
63
|
+
color: var(--syntax-keyword);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.observablehq--undefined {
|
|
67
|
+
color: var(--syntax-variable);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.observablehq--prototype-key {
|
|
71
|
+
color: var(--syntax-comment);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.observablehq--bigint,
|
|
75
|
+
.observablehq--boolean,
|
|
76
|
+
.observablehq--date,
|
|
77
|
+
.observablehq--forbidden,
|
|
78
|
+
.observablehq--number {
|
|
79
|
+
color: var(--syntax-literal);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.observablehq--error {
|
|
83
|
+
color: var(--theme-error);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.observablehq--cell {
|
|
87
|
+
margin: 17px 0;
|
|
88
|
+
min-height: 1px; /* prevent margin collapse when empty */
|
|
89
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--syntax-link: var(--theme-foreground-focus);
|
|
3
|
+
--syntax-keyword: #ffa657;
|
|
4
|
+
--syntax-atom: #a5d6ff;
|
|
5
|
+
--syntax-literal: #d2a8ff;
|
|
6
|
+
--syntax-string: #7ee787;
|
|
7
|
+
--syntax-comment: var(--theme-foreground-muted);
|
|
8
|
+
--syntax-invalid: var(--theme-error);
|
|
9
|
+
--syntax-definition: #79c0ff;
|
|
10
|
+
--syntax-variable: var(--theme-foreground-alt);
|
|
11
|
+
--syntax-meta: #ff7b72;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--syntax-link: var(--theme-foreground-focus);
|
|
3
|
+
--syntax-keyword: #e36209;
|
|
4
|
+
--syntax-atom: #032f62;
|
|
5
|
+
--syntax-literal: #6f42c1;
|
|
6
|
+
--syntax-string: #22863a;
|
|
7
|
+
--syntax-comment: var(--theme-foreground-muted);
|
|
8
|
+
--syntax-invalid: var(--theme-error);
|
|
9
|
+
--syntax-definition: #005cc5;
|
|
10
|
+
--syntax-variable: var(--theme-foreground-alt);
|
|
11
|
+
--syntax-meta: #d73a49;
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@import url("./syntax-dark.css");
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--theme-foreground: #e6e6e6;
|
|
5
|
+
--theme-foreground-focus: #bd89ff;
|
|
6
|
+
--theme-background-a: #000000;
|
|
7
|
+
--theme-background-b: color-mix(in srgb, var(--theme-foreground) 6%, var(--theme-background-a));
|
|
8
|
+
--theme-background: var(--theme-background-a);
|
|
9
|
+
--theme-background-alt: var(--theme-background-b);
|
|
10
|
+
--theme-foreground-alt: color-mix(in srgb, var(--theme-foreground) 90%, var(--theme-background-a));
|
|
11
|
+
--theme-foreground-muted: color-mix(in srgb, var(--theme-foreground) 60%, var(--theme-background-a));
|
|
12
|
+
--theme-foreground-faint: color-mix(in srgb, var(--theme-foreground) 50%, var(--theme-background-a));
|
|
13
|
+
--theme-foreground-fainter: color-mix(in srgb, var(--theme-foreground) 30%, var(--theme-background-a));
|
|
14
|
+
--theme-foreground-faintest: color-mix(in srgb, var(--theme-foreground) 14%, var(--theme-background-a));
|
|
15
|
+
color-scheme: dark;
|
|
16
|
+
}
|