Skip to content

Commit 1909102

Browse files
authored
feat: service additions (#40)
Refactored protocol (likely more to come in the future). Added a column builder and updated services.
1 parent 24f5960 commit 1909102

File tree

178 files changed

+12023
-7480
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

178 files changed

+12023
-7480
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,10 @@ CLAUDE.md
4343
CLAUDE.*.md
4444
TODO*
4545
.claudedocs
46+
.env
47+
GEMINI.md
48+
GEMINI.*.md
49+
.cursor/
50+
.cursorrules
51+
CLAUDE*.md
52+
*CLAUDE*.md

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repos:
1717
- id: mixed-line-ending
1818
- id: trailing-whitespace
1919
- repo: https://github.com/charliermarsh/ruff-pre-commit
20-
rev: "v0.12.1"
20+
rev: "v0.12.2"
2121
hooks:
2222
- id: ruff
2323
args: ["--fix"]

docs/_static/custom.css

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
/* Theme color definitions */
2+
:root {
3+
--brand-font-size-xl: 6rem;
4+
--brand-font-size-lg: 5rem;
5+
--brand-font-size-md: 4rem;
6+
--brand-font-size-sm: 2.5rem;
7+
--brand-font-size-xs: 1.8rem;
8+
--brand-font-size-xxs: 1.6rem;
9+
10+
--brand-letter-spacing-xl: 0.25em;
11+
--brand-letter-spacing-lg: 0.2em;
12+
--brand-letter-spacing-md: 0.1em;
13+
--brand-letter-spacing-sm: 0.05em;
14+
--brand-letter-spacing-xs: 0.03em;
15+
}
16+
17+
html.light {
18+
--sl-color-primary: #202235;
19+
--sl-color-secondary: #edb641;
20+
--sl-color-accent: #ffd480;
21+
--sl-color-text-1: var(--sl-color-primary);
22+
--sl-color-text-2: var(--sl-color-secondary);
23+
--sy-c-foot-background: #f0f0f0;
24+
--yue-c-text: #000;
25+
--brand-text-glow: 0 0 10px rgba(32, 34, 53, 0.3),
26+
0 0 20px rgba(32, 34, 53, 0.2), 0 0 30px rgba(237, 182, 65, 0.1);
27+
}
28+
29+
html.dark {
30+
--sl-color-text-1: var(--sl-color-secondary);
31+
--sy-c-foot-background: black;
32+
--yue-c-text: #fff;
33+
--brand-text-glow: 0 0 10px rgba(237, 182, 65, 0.4),
34+
0 0 20px rgba(237, 182, 65, 0.3), 0 0 30px rgba(237, 182, 65, 0.2);
35+
}
36+
37+
.title-with-logo {
38+
display: flex;
39+
align-items: center;
40+
justify-content: center;
41+
margin: 5rem auto 4rem;
42+
width: 100%;
43+
padding: 0 2rem;
44+
user-select: none;
45+
-webkit-user-select: none;
46+
-moz-user-select: none;
47+
-ms-user-select: none;
48+
}
49+
50+
html[class] .title-with-logo .brand-text {
51+
font-family: var(--sl-font-sans);
52+
font-weight: 300;
53+
font-size: var(--brand-font-size-lg);
54+
letter-spacing: var(--brand-letter-spacing-xl);
55+
text-transform: uppercase;
56+
text-align: center;
57+
line-height: 1.4;
58+
max-width: 100%;
59+
word-break: break-word;
60+
word-wrap: break-word;
61+
overflow-wrap: break-word;
62+
hyphens: auto;
63+
-webkit-hyphens: auto;
64+
-ms-hyphens: auto;
65+
transition: color var(--sl-transition), text-shadow var(--sl-transition);
66+
}
67+
68+
html.light .title-with-logo .brand-text {
69+
color: var(--sl-color-text-1);
70+
text-shadow: var(--brand-text-glow);
71+
}
72+
73+
html.dark .title-with-logo .brand-text {
74+
color: var(--sl-color-text-2);
75+
text-shadow: var(--brand-text-glow);
76+
}
77+
78+
/* Button container wrapping */
79+
.buttons.wrap {
80+
display: flex;
81+
flex-wrap: wrap;
82+
gap: 0.5rem;
83+
}
84+
85+
.buttons.wrap .btn-no-wrap {
86+
flex: 0 0 auto;
87+
}
88+
89+
/* Large screens */
90+
@media (min-width: 1200px) {
91+
html[class] .title-with-logo .brand-text {
92+
font-size: var(--brand-font-size-xl);
93+
}
94+
}
95+
96+
/* Medium-small screens */
97+
@media (max-width: 991px) {
98+
html[class] .title-with-logo .brand-text {
99+
font-size: var(--brand-font-size-md);
100+
letter-spacing: var(--brand-letter-spacing-lg);
101+
}
102+
}
103+
104+
/* Small screens */
105+
@media (max-width: 767px) {
106+
html[class] .title-with-logo .brand-text {
107+
font-size: var(--brand-font-size-sm);
108+
letter-spacing: var(--brand-letter-spacing-md);
109+
}
110+
html[class] .title-with-logo {
111+
margin: 2rem auto 1.5rem;
112+
}
113+
}
114+
115+
/* Extra small screens */
116+
@media (max-width: 480px) {
117+
html[class] .title-with-logo .brand-text {
118+
font-size: var(--brand-font-size-xs);
119+
letter-spacing: var(--brand-letter-spacing-sm);
120+
line-height: 1.2;
121+
}
122+
html[class] .title-with-logo {
123+
margin: 1.5rem auto 1rem;
124+
padding: 0 1rem;
125+
}
126+
}
127+
128+
/* Smallest screens */
129+
@media (max-width: 360px) {
130+
html[class] .title-with-logo .brand-text {
131+
font-size: var(--brand-font-size-xxs);
132+
letter-spacing: var(--brand-letter-spacing-xs);
133+
}
134+
}
135+
136+
/* Preserve existing layout styles */
137+
#badges img {
138+
margin-top: 0;
139+
margin-bottom: 0;
140+
}
141+
142+
#badges {
143+
display: flex;
144+
flex-wrap: wrap;
145+
gap: 10px;
146+
margin-bottom: 3em;
147+
}

docs/_static/favicon.png

31.3 KB
Loading

docs/_static/logo-default.png

31.3 KB
Loading

docs/_static/theme.js

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
function initDropdowns() {
2+
const dropdownToggles = document.querySelectorAll(".st-dropdown-toggle")
3+
4+
const dropdowns = [...dropdownToggles].map(toggleEl => ({
5+
toggleEl,
6+
contentEL: toggleEl.parentElement.querySelector(".st-dropdown-menu")
7+
}))
8+
9+
const close = (dropdown) => {
10+
const {toggleEl, contentEL} = dropdown
11+
toggleEl.setAttribute("aria-expanded", "false")
12+
contentEL.classList.toggle("hidden", true)
13+
}
14+
15+
const closeAll = () => dropdowns.forEach(close)
16+
17+
const open = (dropdown) => {
18+
closeAll()
19+
dropdown.toggleEl.setAttribute("aria-expanded", "true")
20+
dropdown.contentEL.classList.toggle("hidden", false)
21+
const boundaries = [dropdown.contentEL, ...dropdownToggles]
22+
const clickOutsideListener = (event) => {
23+
const target = event.target
24+
if (!target) return
25+
26+
if (!boundaries.some(b => b.contains(target))) {
27+
closeAll()
28+
document.removeEventListener("click", clickOutsideListener)
29+
}
30+
31+
}
32+
document.addEventListener("click", clickOutsideListener)
33+
}
34+
35+
36+
dropdowns.forEach(dropdown => {
37+
dropdown.toggleEl.addEventListener("click", () => {
38+
if (dropdown.toggleEl.getAttribute("aria-expanded") === "true") {
39+
close(dropdown)
40+
} else {
41+
open(dropdown)
42+
}
43+
})
44+
})
45+
}
46+
47+
window.addEventListener("DOMContentLoaded", () => {
48+
initDropdowns()
49+
})

docs/_static/versioning.js

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
const loadVersions = async () => {
2+
const res = await fetch(
3+
DOCUMENTATION_OPTIONS.URL_ROOT + "_static/versions.json",
4+
);
5+
if (res.status !== 200) {
6+
return null;
7+
}
8+
return await res.json();
9+
};
10+
11+
const addVersionWarning = (currentVersion, latestVersion) => {
12+
if (currentVersion === latestVersion) {
13+
return;
14+
}
15+
16+
const header = document.querySelector(".bd-header__inner")?.parentElement;
17+
if (!header) {
18+
return;
19+
}
20+
21+
const container = document.createElement("div");
22+
container.id = "version-warning";
23+
24+
const warningText = document.createElement("span");
25+
warningText.textContent = `You are viewing the documentation for ${
26+
currentVersion === "dev" ||
27+
parseInt(currentVersion) > parseInt(latestVersion)
28+
? "a preview"
29+
: "an outdated"
30+
} version of SQLSpec.`;
31+
container.appendChild(warningText);
32+
33+
const latestLink = document.createElement("a");
34+
latestLink.textContent = "Click here to go to the latest version";
35+
latestLink.href = DOCUMENTATION_OPTIONS.URL_ROOT + "../latest";
36+
container.appendChild(latestLink);
37+
38+
header.before(container);
39+
};
40+
41+
const formatVersionName = (version, isLatest) =>
42+
version + (isLatest ? " (latest)" : "");
43+
44+
const addVersionSelect = (currentVersion, versionSpec) => {
45+
const navEnd = document.querySelector(".navbar-header-items__end");
46+
47+
if (!navEnd) {
48+
return;
49+
}
50+
51+
const container = document.createElement("div");
52+
container.classList.add("navbar-nav");
53+
54+
const dropdown = document.createElement("div");
55+
dropdown.classList.add("dropdown");
56+
container.appendChild(dropdown);
57+
58+
const dropdownToggle = document.createElement("button");
59+
dropdownToggle.classList.add("btn", "dropdown-toggle", "nav-item");
60+
dropdownToggle.setAttribute("data-bs-toggle", "dropdown");
61+
dropdownToggle.setAttribute("type", "button");
62+
dropdownToggle.textContent = `Version: ${formatVersionName(
63+
currentVersion,
64+
currentVersion === versionSpec.latest,
65+
)}`;
66+
dropdown.appendChild(dropdownToggle);
67+
68+
const dropdownContent = document.createElement("div");
69+
dropdownContent.classList.add("dropdown-menu");
70+
dropdown.appendChild(dropdownContent);
71+
72+
for (const version of versionSpec.versions) {
73+
const navItem = document.createElement("li");
74+
navItem.classList.add("nav-item");
75+
76+
const navLink = document.createElement("a");
77+
navLink.classList.add("nav-link", "nav-internal");
78+
navLink.href = DOCUMENTATION_OPTIONS.URL_ROOT + `../${version}`;
79+
navLink.textContent = formatVersionName(
80+
version,
81+
version === versionSpec.latest,
82+
);
83+
navItem.appendChild(navLink);
84+
85+
dropdownContent.appendChild(navItem);
86+
}
87+
88+
navEnd.prepend(container);
89+
};
90+
91+
const setupVersioning = (versions) => {
92+
if (versions === null) {
93+
return;
94+
}
95+
96+
const currentVersion = DOCUMENTATION_OPTIONS.VERSION;
97+
98+
addVersionWarning(currentVersion, versions.latest);
99+
addVersionSelect(currentVersion, versions);
100+
};
101+
102+
window.addEventListener("DOMContentLoaded", () => {
103+
loadVersions().then(setupVersioning);
104+
});

docs/_static/versions.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "versions": ["1", "latest"], "latest": "1" }

0 commit comments

Comments
 (0)