mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-12-05 07:43:49 +01:00
changelogs
This commit is contained in:
18 files changed
+414
-157
No files matched your search
@@ -143,6 +143,7 @@
|
|||||||
"react-dom": "^19.3.0",
|
"react-dom": "^19.3.0",
|
||||||
"react-error-boundary": "^6.1.3",
|
"react-error-boundary": "^6.1.3",
|
||||||
"react-promise-suspense": "^0.3.4",
|
"react-promise-suspense": "^0.3.4",
|
||||||
|
"simple-git": "^4.1.0",
|
||||||
"soapstone": "^1.2.0",
|
"soapstone": "^1.2.0",
|
||||||
"three": "^0.180.0",
|
"three": "^0.180.0",
|
||||||
"three-stdlib": "^2.36.0",
|
"three-stdlib": "^2.36.0",
|
||||||
@@ -636,6 +637,10 @@
|
|||||||
|
|
||||||
"@jridgewell/trace-mapping": ["@jridgewell/[email protected]", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="],
|
"@jridgewell/trace-mapping": ["@jridgewell/[email protected]", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="],
|
||||||
|
|
||||||
|
"@kwsites/file-exists": ["@kwsites/[email protected]", "", { "dependencies": { "debug": "^4.1.1" } }, "sha512-m9/5YGR18lIwxSFDwfE3oA7bWuq9kdau6ugN4H2rJeyhFQZcG9AgSHkQtSD15a8WvTgfz9aikZMrKPHvbpqFiw=="],
|
||||||
|
|
||||||
|
"@kwsites/promise-deferred": ["@kwsites/[email protected]", "", {}, "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw=="],
|
||||||
|
|
||||||
"@mediapipe/tasks-vision": ["@mediapipe/[email protected]", "", {}, "sha512-CZWV/q6TTe8ta61cZXjfnnHsfWIdFhms03M9T7Cnd5y2mdpylJM0rF1qRq+wsQVRMLz1OYPVEBU9ph2Bx8cxrg=="],
|
"@mediapipe/tasks-vision": ["@mediapipe/[email protected]", "", {}, "sha512-CZWV/q6TTe8ta61cZXjfnnHsfWIdFhms03M9T7Cnd5y2mdpylJM0rF1qRq+wsQVRMLz1OYPVEBU9ph2Bx8cxrg=="],
|
||||||
|
|
||||||
"@monogrid/gainmap-js": ["@monogrid/[email protected]", "", { "dependencies": { "promise-worker-transferable": "^1.0.4" }, "peerDependencies": { "three": ">= 0.159.0" } }, "sha512-Obb0/gEd/HReTlg8ttaYk+0m62gQJmCblMOjHSMHRrBP2zdfKMHLCRbh/6ex9fSUJMKdjjIEiohwkbGD3wj2Nw=="],
|
"@monogrid/gainmap-js": ["@monogrid/[email protected]", "", { "dependencies": { "promise-worker-transferable": "^1.0.4" }, "peerDependencies": { "three": ">= 0.159.0" } }, "sha512-Obb0/gEd/HReTlg8ttaYk+0m62gQJmCblMOjHSMHRrBP2zdfKMHLCRbh/6ex9fSUJMKdjjIEiohwkbGD3wj2Nw=="],
|
||||||
@@ -932,6 +937,10 @@
|
|||||||
|
|
||||||
"@shikijs/vscode-textmate": ["@shikijs/[email protected]", "", {}, "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg=="],
|
"@shikijs/vscode-textmate": ["@shikijs/[email protected]", "", {}, "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg=="],
|
||||||
|
|
||||||
|
"@simple-git/args-pathspec": ["@simple-git/[email protected]", "", {}, "sha512-EtMX6XjRWSastG2SdkmSQByPtJ9dx/NIjnHbpQPCYt62j4RmSx5rgLTGpw0YCjF5h191gZOmBfheOT23cRSFdw=="],
|
||||||
|
|
||||||
|
"@simple-git/argv-parser": ["@simple-git/[email protected]", "", { "dependencies": { "@simple-git/args-pathspec": "^1.0.4" } }, "sha512-MhLm6/9J7PiVZghJnaJG4tOc+rTotsSINJkjbUqZA7lYmYklOXdk+d0UZ8Pm8WFcMuxafx3oSUIYYYnPY92GTQ=="],
|
||||||
|
|
||||||
"@surma/rollup-plugin-off-main-thread": ["@surma/[email protected]", "", { "dependencies": { "ejs": "^3.1.6", "json5": "^2.2.0", "magic-string": "^0.25.0", "string.prototype.matchall": "^4.0.6" } }, "sha512-lR8q/9W7hZpMWweNiAKU7NQerBnzQQLvi8qnTDU/fxItPhtZVMbPV3lbCwjhIlNBe9Bbr5V+KHshvWmVSG9cxQ=="],
|
"@surma/rollup-plugin-off-main-thread": ["@surma/[email protected]", "", { "dependencies": { "ejs": "^3.1.6", "json5": "^2.2.0", "magic-string": "^0.25.0", "string.prototype.matchall": "^4.0.6" } }, "sha512-lR8q/9W7hZpMWweNiAKU7NQerBnzQQLvi8qnTDU/fxItPhtZVMbPV3lbCwjhIlNBe9Bbr5V+KHshvWmVSG9cxQ=="],
|
||||||
|
|
||||||
"@swc/helpers": ["@swc/[email protected]", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A=="],
|
"@swc/helpers": ["@swc/[email protected]", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A=="],
|
||||||
@@ -2188,6 +2197,8 @@
|
|||||||
|
|
||||||
"side-channel-weakmap": ["[email protected]", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.5", "object-inspect": "^1.13.3", "side-channel-map": "^1.0.1" } }, "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A=="],
|
"side-channel-weakmap": ["[email protected]", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.5", "object-inspect": "^1.13.3", "side-channel-map": "^1.0.1" } }, "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A=="],
|
||||||
|
|
||||||
|
"simple-git": ["[email protected]", "", { "dependencies": { "@kwsites/file-exists": "^1.1.1", "@kwsites/promise-deferred": "^1.1.1", "@simple-git/args-pathspec": "1.0.4", "@simple-git/argv-parser": "3.0.0", "debug": "^4.4.0" } }, "sha512-FZJESy4Vxahk4eOadmRsWF5TjhCrfpDP563j8jAMbMEi/phIHPDgzN/tDkRIZ2GyQdLKEeXMPXqA8hhWjAdQZA=="],
|
||||||
|
|
||||||
"simple-xml-to-json": ["[email protected]", "", {}, "sha512-kWJDCr9EWtZ+/EYYM5MareWj2cRnZGF93YDNpH4jQiHB+hBIZnfPFSQiVMzZOdk+zXWqTZ/9fTeQNu2DqeiudA=="],
|
"simple-xml-to-json": ["[email protected]", "", {}, "sha512-kWJDCr9EWtZ+/EYYM5MareWj2cRnZGF93YDNpH4jQiHB+hBIZnfPFSQiVMzZOdk+zXWqTZ/9fTeQNu2DqeiudA=="],
|
||||||
|
|
||||||
"sisteransi": ["[email protected]", "", {}, "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="],
|
"sisteransi": ["[email protected]", "", {}, "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="],
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
"react-dom": "^19.3.0",
|
"react-dom": "^19.3.0",
|
||||||
"react-error-boundary": "^6.1.3",
|
"react-error-boundary": "^6.1.3",
|
||||||
"react-promise-suspense": "^0.3.4",
|
"react-promise-suspense": "^0.3.4",
|
||||||
|
"simple-git": "^4.1.0",
|
||||||
"soapstone": "^1.2.0",
|
"soapstone": "^1.2.0",
|
||||||
"three": "^0.180.0",
|
"three": "^0.180.0",
|
||||||
"three-stdlib": "^2.36.0",
|
"three-stdlib": "^2.36.0",
|
||||||
|
|||||||
@@ -0,0 +1,218 @@
|
|||||||
|
---
|
||||||
|
import { changelogs } from "../core/blitzkit/changelogs";
|
||||||
|
import { Heading } from "./Heading";
|
||||||
|
import { Link } from "./Link";
|
||||||
|
import { Markdown } from "./Markdown";
|
||||||
|
import { ScrollerOrientation } from "./Scroller";
|
||||||
|
import { ScrollerCurtains } from "./ScrollerCurtains";
|
||||||
|
import { Separator } from "./Separator";
|
||||||
|
import { Text } from "./Text";
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
locale: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { locale } = Astro.props;
|
||||||
|
const dateFormat = new Intl.DateTimeFormat(locale, { dateStyle: "long" });
|
||||||
|
|
||||||
|
// Patches grouped under their major.minor release: releases newest first,
|
||||||
|
// patches within one oldest first
|
||||||
|
const groups = new Map<string, string[]>();
|
||||||
|
|
||||||
|
for (const key of changelogs.keys()) {
|
||||||
|
const release = key.split(".").slice(0, 2).join(".");
|
||||||
|
const group = groups.get(release);
|
||||||
|
|
||||||
|
if (group) {
|
||||||
|
group.unshift(key);
|
||||||
|
} else {
|
||||||
|
groups.set(release, [key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
---
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.page {
|
||||||
|
flex-grow: 1;
|
||||||
|
|
||||||
|
/* Centered within the page width, lined up with the navbar */
|
||||||
|
align-self: center;
|
||||||
|
width: 100%;
|
||||||
|
max-width: var(--page-width);
|
||||||
|
|
||||||
|
/* The navbar's gap above the page is matched on the sides and below */
|
||||||
|
padding: 0 var(--page-padding) var(--page-padding);
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: auto 1fr;
|
||||||
|
grid-template-areas: "panel content";
|
||||||
|
|
||||||
|
.panel {
|
||||||
|
grid-area: panel;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--space-4);
|
||||||
|
|
||||||
|
background-color: var(--gray-2);
|
||||||
|
|
||||||
|
position: sticky;
|
||||||
|
align-self: start;
|
||||||
|
top: calc(var(--navbar-big-height, 0px) + var(--page-padding));
|
||||||
|
|
||||||
|
/* Floats with the page padding clear above and below it */
|
||||||
|
max-height: calc(
|
||||||
|
100dvh - var(--navbar-big-height, 0px) - var(--page-padding) * 2
|
||||||
|
);
|
||||||
|
overflow-y: auto;
|
||||||
|
|
||||||
|
border-radius: var(--space-4);
|
||||||
|
padding: var(--space-5);
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.release {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--space-3);
|
||||||
|
|
||||||
|
.versions {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(3, auto);
|
||||||
|
gap: var(--space-2) var(--space-4);
|
||||||
|
|
||||||
|
.version {
|
||||||
|
justify-content: start;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
--padding: var(--space-5);
|
||||||
|
--page-compensated-padding: calc(var(--padding) - var(--page-padding));
|
||||||
|
|
||||||
|
grid-area: content;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--space-5);
|
||||||
|
|
||||||
|
min-width: 0;
|
||||||
|
padding: var(--padding);
|
||||||
|
padding-top: var(--page-compensated-padding);
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
/* Keeps versions below the navbar, read by the panel's script too */
|
||||||
|
.entry {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--space-3);
|
||||||
|
|
||||||
|
scroll-margin-top: calc(
|
||||||
|
var(--navbar-big-height, 0px) + var(--page-padding)
|
||||||
|
);
|
||||||
|
|
||||||
|
/* The title and its date share a line, wrapping once it runs out */
|
||||||
|
.header {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: start;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: var(--space-2) var(--space-4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (width < 44rem) {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
grid-template-areas: "content";
|
||||||
|
|
||||||
|
.panel {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
padding: var(--page-compensated-padding);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div class="page">
|
||||||
|
<nav class="panel" id="changelog-panel">
|
||||||
|
<ScrollerCurtains orientation={ScrollerOrientation.Vertical} client:load />
|
||||||
|
|
||||||
|
{[...groups].map(([release, versions]) => (
|
||||||
|
<section class="release">
|
||||||
|
<Heading size="5" lowContrast>
|
||||||
|
{release}
|
||||||
|
</Heading>
|
||||||
|
|
||||||
|
<div class="versions">
|
||||||
|
{versions.map((key) => (
|
||||||
|
<Link
|
||||||
|
className="version"
|
||||||
|
href={`#${key}`}
|
||||||
|
color="gray"
|
||||||
|
highContrast
|
||||||
|
underline="hover"
|
||||||
|
>
|
||||||
|
{key}
|
||||||
|
</Link>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
))}
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
{[...changelogs].map(([version, { title, content, date }], index) => (
|
||||||
|
<>
|
||||||
|
{index > 0 && <Separator />}
|
||||||
|
|
||||||
|
<article class="entry" id={version}>
|
||||||
|
<header class="header">
|
||||||
|
<Heading size="2" className="title">
|
||||||
|
{title}
|
||||||
|
</Heading>
|
||||||
|
|
||||||
|
{date && (
|
||||||
|
<Text size="minor" lowContrast>
|
||||||
|
{dateFormat.format(date)}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<Markdown {content} />
|
||||||
|
</article>
|
||||||
|
</>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { reducesMotion } from "../core/blitzkit/reducesMotion";
|
||||||
|
|
||||||
|
const panel = document.getElementById("changelog-panel")!;
|
||||||
|
|
||||||
|
// Glides to the version below the navbar rather than jumping behind it
|
||||||
|
panel.addEventListener("click", (event) => {
|
||||||
|
const link = (event.target as HTMLElement).closest<HTMLAnchorElement>(
|
||||||
|
".version",
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!link) return;
|
||||||
|
|
||||||
|
const hash = link.getAttribute("href")!;
|
||||||
|
const entry = document.getElementById(hash.slice(1))!;
|
||||||
|
// The same offset the CSS gives links that open the page on a version
|
||||||
|
const margin = parseFloat(getComputedStyle(entry).scrollMarginTop);
|
||||||
|
const top = entry.getBoundingClientRect().top + window.scrollY - margin;
|
||||||
|
const behavior = reducesMotion() ? "instant" : "smooth";
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
|
history.replaceState(null, "", hash);
|
||||||
|
window.scrollTo({ top, behavior });
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -98,7 +98,7 @@ const strings = await api.strings(locale);
|
|||||||
>
|
>
|
||||||
{strings.website.footer.about.github}
|
{strings.website.footer.about.github}
|
||||||
</Link>
|
</Link>
|
||||||
<LinkI18n {locale} href="/docs/patches" color="gray">
|
<LinkI18n {locale} href="/changelogs" color="gray">
|
||||||
{strings.website.footer.about.patches}
|
{strings.website.footer.about.patches}
|
||||||
</LinkI18n>
|
</LinkI18n>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
.markdown {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--space-3);
|
||||||
|
|
||||||
|
line-height: 1.5;
|
||||||
|
|
||||||
|
.heading-1 {
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Sections set themselves apart from the content before them */
|
||||||
|
.heading-2 {
|
||||||
|
margin-top: var(--space-4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.heading-3 {
|
||||||
|
margin-top: var(--space-3);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* TODO: make formal ul/ol compoentns */
|
||||||
|
.list {
|
||||||
|
margin: 0;
|
||||||
|
padding-left: var(--space-5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.image {
|
||||||
|
max-width: 100%;
|
||||||
|
border-radius: var(--space-4);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,40 +1,60 @@
|
|||||||
import { Link, Table } from '@radix-ui/themes';
|
import MarkdownToJSX from "markdown-to-jsx";
|
||||||
import MarkdownToJSX from 'markdown-to-jsx';
|
import { Fragment, type ComponentProps } from "react";
|
||||||
import type { ComponentProps } from 'react';
|
import { docImageUrl, isExternalImage } from "../../core/blitzkit/docImages";
|
||||||
import { docImageUrl, isExternalImage } from '../../core/blitzkit/docImages';
|
import { Code } from "../Code";
|
||||||
import { LazyImage } from '../LazyImage';
|
import { Heading } from "../Heading";
|
||||||
|
import { Link } from "../Link";
|
||||||
|
import { Table } from "../Table";
|
||||||
|
import { Text } from "../Text";
|
||||||
|
import styles from "./index.module.css";
|
||||||
|
|
||||||
interface MarkdownProps {
|
interface MarkdownProps {
|
||||||
children: string;
|
content: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
function Image({ src, ...props }: ComponentProps<'img'>) {
|
// Loads right away rather than lazily, so images don't grow the page while it
|
||||||
return (
|
// scrolls to a version and push the target away
|
||||||
<LazyImage
|
function Image({ src, ...props }: ComponentProps<"img">) {
|
||||||
style={{ maxWidth: '100%' }}
|
const resolved = src && isExternalImage(src) ? docImageUrl(src) : src;
|
||||||
src={src && isExternalImage(src) ? docImageUrl(src) : src}
|
return <img {...props} className={styles.image} src={resolved} />;
|
||||||
{...props}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Markdown({ children }: MarkdownProps) {
|
export function Markdown({ content }: MarkdownProps) {
|
||||||
return (
|
return (
|
||||||
<MarkdownToJSX
|
<div className={styles.markdown}>
|
||||||
options={{
|
<MarkdownToJSX
|
||||||
overrides: {
|
options={{
|
||||||
a: { component: Link },
|
wrapper: Fragment,
|
||||||
table: { component: Table.Root },
|
overrides: {
|
||||||
thead: { component: Table.Header },
|
h1: {
|
||||||
tbody: { component: Table.Body },
|
component: Heading,
|
||||||
tr: { component: Table.Row },
|
props: { size: "2", className: styles["heading-1"] },
|
||||||
th: { component: Table.ColumnHeaderCell },
|
},
|
||||||
td: { component: Table.Cell },
|
h2: {
|
||||||
img: { component: Image },
|
component: Heading,
|
||||||
},
|
props: { size: "4", className: styles["heading-2"] },
|
||||||
}}
|
},
|
||||||
>
|
h3: {
|
||||||
{children}
|
component: Heading,
|
||||||
</MarkdownToJSX>
|
props: { size: "5", className: styles["heading-3"] },
|
||||||
|
},
|
||||||
|
p: { component: Text },
|
||||||
|
ul: { props: { className: styles.list } },
|
||||||
|
ol: { props: { className: styles.list } },
|
||||||
|
code: { component: Code },
|
||||||
|
a: { component: Link },
|
||||||
|
table: { component: Table.Root },
|
||||||
|
thead: { component: Table.Head },
|
||||||
|
tbody: { component: Table.Body },
|
||||||
|
tr: { component: Table.Row },
|
||||||
|
th: { component: Table.ColumnHeader },
|
||||||
|
td: { component: Table.Cell },
|
||||||
|
img: { component: Image },
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{content}
|
||||||
|
</MarkdownToJSX>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1,31 +1,18 @@
|
|||||||
<script>
|
<script>
|
||||||
import { App, ReduceMotion } from "../stores/app";
|
import {
|
||||||
|
reducedMotionMedia,
|
||||||
|
reducesMotion,
|
||||||
|
} from "../core/blitzkit/reducesMotion";
|
||||||
|
import { App } from "../stores/app";
|
||||||
|
|
||||||
// Runs before hydration so nothing animates before the setting applies
|
// Runs before hydration so nothing animates before the setting applies
|
||||||
const root = document.documentElement;
|
const root = document.documentElement;
|
||||||
const media = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
||||||
|
|
||||||
function apply() {
|
function apply() {
|
||||||
let reduceMotion: boolean;
|
root.dataset.reduceMotion = `${reducesMotion()}`;
|
||||||
|
|
||||||
switch (App.state.reduceMotion) {
|
|
||||||
case ReduceMotion.Device:
|
|
||||||
reduceMotion = media.matches;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ReduceMotion.On:
|
|
||||||
reduceMotion = true;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ReduceMotion.Off:
|
|
||||||
reduceMotion = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
root.dataset.reduceMotion = `${reduceMotion}`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply();
|
apply();
|
||||||
media.addEventListener("change", apply);
|
reducedMotionMedia.addEventListener("change", apply);
|
||||||
App.on((state) => state.reduceMotion, apply);
|
App.on((state) => state.reduceMotion, apply);
|
||||||
</script>
|
</script>
|
||||||
@@ -1,2 +1,7 @@
|
|||||||
.separator {
|
.separator {
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
|
height: var(--space-0);
|
||||||
|
|
||||||
|
background-color: var(--gray-a4);
|
||||||
}
|
}
|
||||||
@@ -83,7 +83,6 @@ export const tools: Record<string, Tool> = {
|
|||||||
banner_background_position: "bottom",
|
banner_background_position: "bottom",
|
||||||
},
|
},
|
||||||
changelogs: {
|
changelogs: {
|
||||||
disabled: true,
|
|
||||||
id: "changelogs",
|
id: "changelogs",
|
||||||
banner_background_position: "bottom",
|
banner_background_position: "bottom",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
import { compareVersions } from "compare-versions";
|
||||||
|
import { git } from "./git";
|
||||||
|
|
||||||
|
export interface Changelog {
|
||||||
|
// The leading "# " heading, split out so pages can lay it out themselves
|
||||||
|
title: string;
|
||||||
|
content: string;
|
||||||
|
// When the changelog was committed under its version, missing until it is
|
||||||
|
date: Date | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
const ROOT = "../../../../../docs/changelogs/";
|
||||||
|
|
||||||
|
const files = import.meta.glob<string>("../../../../../docs/changelogs/*.md", {
|
||||||
|
eager: true,
|
||||||
|
query: "?raw",
|
||||||
|
import: "default",
|
||||||
|
});
|
||||||
|
|
||||||
|
const entries = await Promise.all(
|
||||||
|
Object.entries(files).map(async ([file, markdown]) => {
|
||||||
|
const version = file.replace(ROOT, "").replace(".md", "");
|
||||||
|
// The oldest add or rename, so a promoted version dates from its promotion
|
||||||
|
const log = await git.raw([
|
||||||
|
"log",
|
||||||
|
"--follow",
|
||||||
|
"--diff-filter=AR",
|
||||||
|
"--format=%aI",
|
||||||
|
"--",
|
||||||
|
`docs/changelogs/${version}.md`,
|
||||||
|
]);
|
||||||
|
const added = log.trim().split("\n").at(-1);
|
||||||
|
const date = added ? new Date(added) : undefined;
|
||||||
|
const lineEnd = markdown.indexOf("\n");
|
||||||
|
const title = markdown.slice("# ".length, lineEnd).trim();
|
||||||
|
const content = markdown.slice(lineEnd + 1);
|
||||||
|
|
||||||
|
return [version, { title, content, date } satisfies Changelog] as const;
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
|
// Every changelog keyed by version, newest first
|
||||||
|
export const changelogs = new Map(
|
||||||
|
entries.sort(([a], [b]) => compareVersions(b, a)),
|
||||||
|
);
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import { simpleGit } from "simple-git";
|
||||||
|
|
||||||
|
const repository = (await simpleGit().revparse(["--show-toplevel"])).trim();
|
||||||
|
|
||||||
|
// Runs from the repository root, so paths are relative to it wherever this is
|
||||||
|
// imported from. Server only: it spawns git processes
|
||||||
|
export const git = simpleGit(repository);
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Quicklime } from 'quicklime';
|
import { Quicklime } from "quicklime";
|
||||||
|
|
||||||
export interface ModelTransformEventData {
|
export interface ModelTransformEventData {
|
||||||
yaw: number;
|
yaw: number;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { EventManager } from '@blitzkit/core';
|
import { EventManager } from "@blitzkit/core";
|
||||||
|
|
||||||
export enum Pose {
|
export enum Pose {
|
||||||
HullDown,
|
HullDown,
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
import { App, ReduceMotion } from "../../stores/app";
|
||||||
|
|
||||||
|
// The device preference, followed when the setting is left on Device
|
||||||
|
export const reducedMotionMedia = window.matchMedia(
|
||||||
|
"(prefers-reduced-motion: reduce)",
|
||||||
|
);
|
||||||
|
|
||||||
|
// Whether motion is reduced, following the device when the setting says to
|
||||||
|
export function reducesMotion() {
|
||||||
|
switch (App.state.reduceMotion) {
|
||||||
|
case ReduceMotion.Device:
|
||||||
|
return reducedMotionMedia.matches;
|
||||||
|
|
||||||
|
case ReduceMotion.On:
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case ReduceMotion.Off:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
import Changelog from "../../../../components/Changelog.astro";
|
||||||
|
import ToolBanner from "../../../../components/ToolBanner.astro";
|
||||||
|
import { tools } from "../../../../config/tools";
|
||||||
|
import BaseLayout from "../../../../layouts/BaseLayout.astro";
|
||||||
|
|
||||||
|
export { getStaticPaths } from "../index.astro";
|
||||||
|
|
||||||
|
const { locale } = Astro.props;
|
||||||
|
---
|
||||||
|
|
||||||
|
<BaseLayout tool={tools.changelogs} accent="bronze" {locale}>
|
||||||
|
<ToolBanner tool={tools.changelogs} {locale} />
|
||||||
|
<Changelog {locale} />
|
||||||
|
</BaseLayout>
|
||||||
-36
@@ -1,36 +0,0 @@
|
|||||||
---
|
|
||||||
import { readFile } from "fs/promises";
|
|
||||||
import { mixStaticPaths } from "../../../../../../core/blitzkit/mixStaticPaths";
|
|
||||||
import { tools } from "../../../../../../config/tools";
|
|
||||||
import BaseLayout from "../../../../../../layouts/BaseLayout.astro";
|
|
||||||
import { getStaticPaths as _getStaticPaths } from "../../../index.astro";
|
|
||||||
import { Page } from "./_index";
|
|
||||||
|
|
||||||
export const getStaticPaths = mixStaticPaths(_getStaticPaths, async () => {
|
|
||||||
const ROOT = "../../../../../../../../../docs/";
|
|
||||||
const files = import.meta.glob("../../../../../../../../../docs/**/*.md", {
|
|
||||||
eager: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
return await Promise.all(
|
|
||||||
Object.keys(files).map(async (file) => {
|
|
||||||
const couple = file.replace(ROOT, "").split("/");
|
|
||||||
couple[1] = couple[1].replace(".md", "");
|
|
||||||
const content = await readFile(
|
|
||||||
`../../docs/${couple[0]}/${couple[1]}.md`,
|
|
||||||
).then((buffer) => buffer.toString());
|
|
||||||
|
|
||||||
return {
|
|
||||||
params: { directory: couple[0], document: couple[1] },
|
|
||||||
props: { content },
|
|
||||||
};
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
const { content, locale } = Astro.props;
|
|
||||||
---
|
|
||||||
|
|
||||||
<BaseLayout tool={tools.home} {locale}>
|
|
||||||
<Page content={content} />
|
|
||||||
</BaseLayout>
|
|
||||||
-14
@@ -1,14 +0,0 @@
|
|||||||
import { Markdown } from "../../../../../../components/Markdown";
|
|
||||||
import { PageWrapper } from "../../../../../../components/PageWrapper";
|
|
||||||
|
|
||||||
interface PageProps {
|
|
||||||
content: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function Page({ content }: PageProps) {
|
|
||||||
return (
|
|
||||||
<PageWrapper maxWidth="50rem">
|
|
||||||
<Markdown>{content}</Markdown>
|
|
||||||
</PageWrapper>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
---
|
|
||||||
import { MagicWandIcon, StarFilledIcon } from "@radix-ui/react-icons";
|
|
||||||
import { Flex, Heading, Link } from "@radix-ui/themes";
|
|
||||||
import { compareVersions } from "compare-versions";
|
|
||||||
import { PageWrapper } from "../../../../../components/PageWrapper";
|
|
||||||
import { tools } from "../../../../../config/tools";
|
|
||||||
import BaseLayout from "../../../../../layouts/BaseLayout.astro";
|
|
||||||
|
|
||||||
export { getStaticPaths } from "../../index.astro";
|
|
||||||
|
|
||||||
// this can't be used in template literal :(
|
|
||||||
const ROOT = "../../../../../../../../docs/changelogs/";
|
|
||||||
|
|
||||||
const { locale } = Astro.props;
|
|
||||||
const versions = Object.keys(
|
|
||||||
import.meta.glob("../../../../../../../../docs/changelogs/*.md", {
|
|
||||||
eager: true,
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
.map((file) => file.replace(ROOT, "").replace(".md", ""))
|
|
||||||
.sort(compareVersions)
|
|
||||||
.reverse();
|
|
||||||
---
|
|
||||||
|
|
||||||
<BaseLayout tool={tools.changelogs} {locale}>
|
|
||||||
<PageWrapper align="center">
|
|
||||||
<Heading mt="6" mb="4">BlitzKit patches</Heading>
|
|
||||||
|
|
||||||
<Flex direction="column" gap="2" align="center">
|
|
||||||
{
|
|
||||||
versions.map((version) => {
|
|
||||||
const split = version.split(".").map(Number);
|
|
||||||
const isMajor = split[2] === 0;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Link
|
|
||||||
size="5"
|
|
||||||
href={`/docs/changelogs/${version}`}
|
|
||||||
mb={isMajor ? "6" : "0"}
|
|
||||||
>
|
|
||||||
<Flex align="center" gap="2">
|
|
||||||
{!isMajor && <MagicWandIcon />}
|
|
||||||
{isMajor && <StarFilledIcon />}
|
|
||||||
{version}
|
|
||||||
</Flex>
|
|
||||||
</Link>
|
|
||||||
);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</Flex>
|
|
||||||
</PageWrapper>
|
|
||||||
</BaseLayout>
|
|
||||||
Reference in new issue
Block a user