Compare commits

...
3 Commits
Author SHA1 Message Date
TrèsAbhi c1f765d5f7 feat: setup interop 2026-01-25 21:27:24 -06:00
TrèsAbhi 7f5b5b614f feat: setup game interface 2026-01-25 19:32:30 -06:00
TrèsAbhi 5cd149b2b9 feat: higher constrast low contrast 2026-01-25 19:21:07 -06:00
12 changed files with 122 additions and 45 deletions

No files matched your search

+11
View File
@@ -84,6 +84,12 @@
"yaml": "^2.8.1",
},
},
"packages/game": {
"name": "@blitzkit/game",
"dependencies": {
"node-api-dotnet": "^0.9.19",
},
},
"packages/i18n": {
"name": "@blitzkit/i18n",
"dependencies": {
@@ -186,6 +192,7 @@
"@astrolib/seo": "^1.0.0-beta.8",
"@blitzkit/closed": "workspace:*",
"@blitzkit/core": "workspace:*",
"@blitzkit/game": "workspace:*",
"@blitzkit/i18n": "workspace:*",
"@bufbuild/protobuf": "^2.10.2",
"@fontsource-variable/roboto-flex": "^5.2.8",
@@ -445,6 +452,8 @@
"@blitzkit/core": ["@blitzkit/core@workspace:packages/core"],
"@blitzkit/game": ["@blitzkit/game@workspace:packages/game"],
"@blitzkit/i18n": ["@blitzkit/i18n@workspace:packages/i18n"],
"@blitzkit/scripts": ["@blitzkit/scripts@workspace:packages/scripts"],
@@ -2111,6 +2120,8 @@
"nlcst-to-string": ["[email protected]", "", { "dependencies": { "@types/nlcst": "^2.0.0" } }, "sha512-YKLBCcUYKAg0FNlOBT6aI91qFmSiFKiluk655WzPF+DDMA02qIyy8uiRqI8QXtcFpEvll12LpL5MXqEmAZ+dcA=="],
"node-api-dotnet": ["[email protected]", "", {}, "sha512-7y+mPsIfebm8ftc+ZdQtC/05KT5IRK4N4Kdkb+VPpW7fLJsGupIiTOCCDZ3H4tKNPVvifNzFCbv0lak/JCKh+w=="],
"node-bignumber": ["[email protected]", "", {}, "sha512-VoTZHmdFQpZH1+q1dz2qcHNCwTWsJg2T3PYwlAyDNFOfVhSYUKQBLFcCpCud+wJBGgCttGavZILaIggDIKqEQQ=="],
"node-domexception": ["[email protected]", "", {}, "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ=="],
+57
View File
@@ -0,0 +1,57 @@
## A streamlined .gitignore for modern .NET projects
## including temporary files, build results, and
## files generated by popular .NET tools. If you are
## developing with Visual Studio, the VS .gitignore
## https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
## has more thorough IDE-specific entries.
##
## Get latest from https://github.com/github/gitignore/blob/main/Dotnet.gitignore
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# dotenv environment variables file
.env
# Others
~$*
*~
CodeCoverage/
# MSBuild Binary and Structured Log
*.binlog
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
+12
View File
@@ -0,0 +1,12 @@
using Microsoft.JavaScript.NodeApi;
namespace Game;
[JSExport]
public class Class1
{
public static void Test()
{
Console.WriteLine("lmao");
}
}
+13
View File
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<NodeApiAssemblyJSModuleType>esm</NodeApiAssemblyJSModuleType>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.JavaScript.NodeApi" Version="0.9.19" />
<PackageReference Include="Microsoft.JavaScript.NodeApi.Generator" Version="0.9.19" />
</ItemGroup>
</Project>
+9
View File
@@ -0,0 +1,9 @@
{
"name": "@blitzkit/game",
"private": true,
"type": "module",
"main": "src/index.ts",
"dependencies": {
"node-api-dotnet": "^0.9.19"
}
}
+3
View File
@@ -0,0 +1,3 @@
console.log("that's crazy yo");
export * from "../bin/Debug/net9.0/game";
+1
View File
@@ -16,6 +16,7 @@
"@blitzkit/closed": "workspace:*",
"@blitzkit/core": "workspace:*",
"@blitzkit/i18n": "workspace:*",
"@blitzkit/game": "workspace:*",
"@bufbuild/protobuf": "^2.10.2",
"@fontsource-variable/roboto-flex": "^5.2.8",
"@fontsource-variable/roboto-mono": "^5.2.8",
@@ -1,5 +1,10 @@
.text {
font-size: var(--font-size-regular);
color: var(--gray-12);
&[data-low-contrast="true"] {
color: var(--white-a9);
}
&[data-size="minor"] {
font-size: var(--font-size-minor);
@@ -1,10 +1,8 @@
import type { ComponentProps } from "react";
import { classNames } from "../../core/ui/classNames";
import type { Color } from "../../core/ui/color";
import "./index.css";
export interface TextProps extends ComponentProps<"span"> {
color?: Color | "accent";
weight?: "light" | "regular" | "medium" | "bold" | "black";
lowContrast?: boolean;
size?: "regular" | "minor" | "major";
@@ -12,7 +10,6 @@ export interface TextProps extends ComponentProps<"span"> {
}
export function Text({
color = "gray",
lowContrast,
className,
size = "regular",
@@ -24,7 +21,7 @@ export function Text({
return (
<span
className={classNames("text", className)}
style={{ color: `var(--${color}-${lowContrast ? 11 : 12})`, ...style }}
data-low-contrast={lowContrast}
data-size={size}
data-weight={weight}
data-align={align === "left" ? undefined : align}
+7 -7
View File
@@ -52,13 +52,6 @@ export const tools: Record<string, Tool> = {
banner_background_position: "bottom",
},
api: {
id: "api",
accent: "brown",
banner_background_position: "bottom",
},
playlist: {
id: "playlist",
@@ -86,4 +79,11 @@ export const tools: Record<string, Tool> = {
accent: "blue",
banner_background_position: "bottom",
},
api: {
id: "api",
accent: "brown",
banner_background_position: "bottom",
},
};
@@ -1,34 +0,0 @@
---
import locales from "@blitzkit/i18n/locales.json";
import "@radix-ui/colors/amber-dark.css";
import type { GetStaticPaths } from "astro";
import ColorScale from "../../components/ColorScale.astro";
import HomeHero from "../../components/HomeHero.astro";
import { Section } from "../../components/Section";
import ToolCard from "../../components/ToolCard.astro";
import { tools } from "../../core/tools/tools";
import BaseLayout from "../../layouts/BaseLayout.astro";
export const getStaticPaths = (() => {
return [
...locales.supported
.filter(({ locale }) => locale !== locales.default)
.map(({ locale }) => ({ params: { locale }, props: { locale } })),
{ params: { locale: undefined }, props: { locale: locales.default } },
];
}) satisfies GetStaticPaths;
const { locale } = Astro.props;
---
<BaseLayout {locale} accent="amber" noNavbar>
<ColorScale color="purple" slot="head" />
<ColorScale color="gold" slot="head" />
<ColorScale color="lime" slot="head" />
<HomeHero {locale} />
<Section>
{Object.values(tools).map((tool) => <ToolCard {locale} {tool} />)}
</Section>
</BaseLayout>
@@ -1,4 +1,5 @@
---
import { Class1 } from "@blitzkit/game";
import locales from "@blitzkit/i18n/locales.json";
import type { GetStaticPaths } from "astro";
import ColorScale from "../../components/ColorScale.astro";
@@ -17,6 +18,8 @@ export const getStaticPaths = (() => {
];
}) satisfies GetStaticPaths;
Class1.test();
const { locale } = Astro.props;
---