@shipload/item-renderer 0.2.3 → 1.0.0-beta1
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/package.json +47 -49
- package/src/assets/stardust-base64.ts +1 -1
- package/src/errors.ts +14 -14
- package/src/fonts/index.ts +24 -24
- package/src/fonts/load-bun.ts +12 -12
- package/src/index.ts +31 -31
- package/src/links.ts +13 -13
- package/src/meta.ts +26 -26
- package/src/payload/base64url.ts +21 -21
- package/src/payload/codec.ts +19 -19
- package/src/primitives/category-icon.ts +88 -86
- package/src/primitives/compact-row.ts +32 -32
- package/src/primitives/divider.ts +14 -14
- package/src/primitives/icon-hex.ts +36 -36
- package/src/primitives/module-slot.ts +131 -131
- package/src/primitives/panel.ts +18 -18
- package/src/primitives/quantity-badge.ts +32 -32
- package/src/primitives/span-paragraph.ts +56 -56
- package/src/primitives/stat-bar.ts +72 -72
- package/src/primitives/svg.ts +16 -16
- package/src/primitives/text.ts +33 -33
- package/src/primitives/wrap.ts +19 -19
- package/src/render.ts +20 -20
- package/src/templates/_shared.ts +5 -5
- package/src/templates/component.ts +124 -124
- package/src/templates/index.ts +23 -23
- package/src/templates/item-cell.ts +84 -84
- package/src/templates/module.ts +182 -181
- package/src/templates/packed-entity.ts +22 -22
- package/src/templates/resource.ts +136 -134
- package/src/templates/ship-panel.ts +122 -118
- package/src/templates/social-card.ts +36 -36
- package/src/tokens/colors.ts +42 -42
- package/src/tokens/index.ts +6 -6
- package/src/tokens/spacing.ts +9 -9
- package/src/tokens/typography.ts +18 -18
- package/.claude/settings.local.json +0 -6
- package/.github/workflows/ci.yml +0 -14
- package/.gitignore +0 -6
- package/Makefile +0 -50
- package/biome.json +0 -18
- package/bun.lock +0 -123
- package/scripts/check-bundle-size.ts +0 -37
- package/scripts/copy-fonts.ts +0 -41
- package/scripts/preview.ts +0 -41
- package/test/__image_snapshots__/.gitkeep +0 -0
- package/test/__image_snapshots__/component-hull-plates.diff.png +0 -0
- package/test/__image_snapshots__/component-hull-plates.png +0 -0
- package/test/__image_snapshots__/module-engine-t1.diff.png +0 -0
- package/test/__image_snapshots__/module-engine-t1.png +0 -0
- package/test/__image_snapshots__/module-storage-t1.diff.png +0 -0
- package/test/__image_snapshots__/module-storage-t1.png +0 -0
- package/test/__image_snapshots__/packed-entity-ship-t1-only-engine.diff.png +0 -0
- package/test/__image_snapshots__/packed-entity-ship-t1-only-engine.png +0 -0
- package/test/__image_snapshots__/packed-entity-ship-t1-two-modules.diff.png +0 -0
- package/test/__image_snapshots__/packed-entity-ship-t1-two-modules.png +0 -0
- package/test/__image_snapshots__/resource-ore-t1.diff.png +0 -0
- package/test/__image_snapshots__/resource-ore-t1.png +0 -0
- package/test/__snapshots__/templates-component.test.ts.snap +0 -5
- package/test/__snapshots__/templates-item-cell.test.ts.snap +0 -9
- package/test/__snapshots__/templates-module.test.ts.snap +0 -17
- package/test/__snapshots__/templates-packed-entity.test.ts.snap +0 -5
- package/test/__snapshots__/templates-resource.test.ts.snap +0 -7
- package/test/base64url.test.ts +0 -33
- package/test/codec.test.ts +0 -34
- package/test/errors.test.ts +0 -24
- package/test/fixtures/cargo-items.ts +0 -122
- package/test/fonts.test.ts +0 -28
- package/test/links-meta.test.ts +0 -43
- package/test/pixel.test.ts +0 -69
- package/test/primitives-category-icon.test.ts +0 -86
- package/test/primitives-compact-row.test.ts +0 -44
- package/test/primitives-domain.test.ts +0 -83
- package/test/primitives-layout.test.ts +0 -56
- package/test/primitives-module-slot.test.ts +0 -88
- package/test/render.test.ts +0 -43
- package/test/sanity.test.ts +0 -6
- package/test/sdk-link.test.ts +0 -19
- package/test/snapshots/.gitkeep +0 -0
- package/test/svg.test.ts +0 -30
- package/test/templates-component.test.ts +0 -36
- package/test/templates-dispatch.test.ts +0 -35
- package/test/templates-item-cell.test.ts +0 -94
- package/test/templates-module.test.ts +0 -63
- package/test/templates-packed-entity.test.ts +0 -47
- package/test/templates-resource.test.ts +0 -71
- package/test/templates-ship-panel.test.ts +0 -91
- package/test/tokens.test.ts +0 -34
- package/tsconfig.json +0 -20
package/src/tokens/colors.ts
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {tierColors} from '@shipload/sdk'
|
|
2
2
|
|
|
3
3
|
export const colors = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
} as const
|
|
4
|
+
surface: {
|
|
5
|
+
background: '#0a0a0c',
|
|
6
|
+
panel: '#11141a',
|
|
7
|
+
panelBorder: '#1e242e',
|
|
8
|
+
panelBorderBright: '#2a3340',
|
|
9
|
+
},
|
|
10
|
+
text: {
|
|
11
|
+
primary: '#e6e8ec',
|
|
12
|
+
secondary: '#8f98a8',
|
|
13
|
+
muted: '#5b6373',
|
|
14
|
+
accent: '#f4c96b',
|
|
15
|
+
},
|
|
16
|
+
brand: {
|
|
17
|
+
pink: '#ff4f9a',
|
|
18
|
+
teal: '#2fd6d1',
|
|
19
|
+
cyan: '#6cb9ff',
|
|
20
|
+
},
|
|
21
|
+
category: {
|
|
22
|
+
ore: '#C26D3F',
|
|
23
|
+
crystal: '#4ADBFF',
|
|
24
|
+
gas: '#B8E4A0',
|
|
25
|
+
regolith: '#C4A57B',
|
|
26
|
+
biomass: '#5A8B3E',
|
|
27
|
+
},
|
|
28
|
+
tier: tierColors,
|
|
29
|
+
accent: {
|
|
30
|
+
component: '#8f98a8',
|
|
31
|
+
},
|
|
32
|
+
capability: {
|
|
33
|
+
engine: '#4a8abf',
|
|
34
|
+
generator: '#22c55e',
|
|
35
|
+
gatherer: '#f59e0b',
|
|
36
|
+
loader: '#eab308',
|
|
37
|
+
manufacturing: '#a855f7',
|
|
38
|
+
storage: '#14b8a6',
|
|
39
|
+
hauler: '#f97316',
|
|
40
|
+
},
|
|
41
|
+
} as const
|
|
42
42
|
|
|
43
|
-
export type CategoryColorKey = keyof typeof colors.category
|
|
44
|
-
export type TierColorKey = keyof typeof colors.tier
|
|
45
|
-
export type CapabilityColorKey = keyof typeof colors.capability
|
|
43
|
+
export type CategoryColorKey = keyof typeof colors.category
|
|
44
|
+
export type TierColorKey = keyof typeof colors.tier
|
|
45
|
+
export type CapabilityColorKey = keyof typeof colors.capability
|
package/src/tokens/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import {colors} from './colors.ts'
|
|
2
|
+
import {spacing} from './spacing.ts'
|
|
3
|
+
import {typography} from './typography.ts'
|
|
4
4
|
|
|
5
|
-
export const tokens = {
|
|
6
|
-
export type Tokens = typeof tokens
|
|
7
|
-
export {
|
|
5
|
+
export const tokens = {colors, spacing, typography} as const
|
|
6
|
+
export type Tokens = typeof tokens
|
|
7
|
+
export {colors, spacing, typography}
|
package/src/tokens/spacing.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export const spacing = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} as const
|
|
2
|
+
panelWidth: 280,
|
|
3
|
+
panelPadding: 14,
|
|
4
|
+
rowGap: 6,
|
|
5
|
+
sectionGap: 12,
|
|
6
|
+
cornerRadius: 10,
|
|
7
|
+
statBarHeight: 4,
|
|
8
|
+
iconHexSize: 22,
|
|
9
|
+
quantityBadgeHeight: 18,
|
|
10
|
+
} as const
|
package/src/tokens/typography.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
export const typography = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} as const
|
|
2
|
+
display: '"Orbitron", "Orbitron Variable", system-ui, sans-serif',
|
|
3
|
+
sans: '"Inter", "Inter Variable", system-ui, sans-serif',
|
|
4
|
+
mono: '"JetBrains Mono", "JetBrains Mono Variable", ui-monospace, monospace',
|
|
5
|
+
sizes: {
|
|
6
|
+
title: 16,
|
|
7
|
+
subtitle: 11,
|
|
8
|
+
body: 12,
|
|
9
|
+
stat: 12,
|
|
10
|
+
statValue: 14,
|
|
11
|
+
label: 10,
|
|
12
|
+
caption: 10,
|
|
13
|
+
},
|
|
14
|
+
weights: {
|
|
15
|
+
regular: 400,
|
|
16
|
+
semibold: 600,
|
|
17
|
+
bold: 700,
|
|
18
|
+
},
|
|
19
|
+
} as const
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
name: ci
|
|
2
|
-
on:
|
|
3
|
-
push: { branches: [main] }
|
|
4
|
-
pull_request:
|
|
5
|
-
jobs:
|
|
6
|
-
test:
|
|
7
|
-
runs-on: ubuntu-latest
|
|
8
|
-
steps:
|
|
9
|
-
- uses: actions/checkout@v4
|
|
10
|
-
- uses: oven-sh/setup-bun@v1
|
|
11
|
-
with: { bun-version: latest }
|
|
12
|
-
- run: bun install
|
|
13
|
-
- run: bun test
|
|
14
|
-
- run: bun run scripts/check-bundle-size.ts
|
package/.gitignore
DELETED
package/Makefile
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
SHELL := /usr/bin/env bash
|
|
2
|
-
BIN := ./node_modules/.bin
|
|
3
|
-
|
|
4
|
-
.PHONY: dev
|
|
5
|
-
dev: node_modules
|
|
6
|
-
bun run scripts/preview.ts
|
|
7
|
-
|
|
8
|
-
.PHONY: test
|
|
9
|
-
test: node_modules
|
|
10
|
-
bun test
|
|
11
|
-
|
|
12
|
-
.PHONY: test-pixel
|
|
13
|
-
test-pixel: node_modules
|
|
14
|
-
bun test test/pixel.test.ts
|
|
15
|
-
|
|
16
|
-
.PHONY: test-update
|
|
17
|
-
test-update: node_modules
|
|
18
|
-
UPDATE_IMAGE_SNAPSHOTS=1 bun test --update-snapshots
|
|
19
|
-
|
|
20
|
-
.PHONY: typecheck
|
|
21
|
-
typecheck: node_modules
|
|
22
|
-
$(BIN)/tsc --noEmit
|
|
23
|
-
|
|
24
|
-
.PHONY: lint
|
|
25
|
-
lint: node_modules
|
|
26
|
-
$(BIN)/biome check src test scripts
|
|
27
|
-
|
|
28
|
-
.PHONY: format
|
|
29
|
-
format: node_modules
|
|
30
|
-
$(BIN)/biome format --write src test scripts
|
|
31
|
-
|
|
32
|
-
.PHONY: bundle-check
|
|
33
|
-
bundle-check: node_modules
|
|
34
|
-
bun run scripts/check-bundle-size.ts
|
|
35
|
-
|
|
36
|
-
.PHONY: fonts
|
|
37
|
-
fonts: node_modules
|
|
38
|
-
bun run scripts/copy-fonts.ts
|
|
39
|
-
|
|
40
|
-
.PHONY: check
|
|
41
|
-
check: typecheck lint test bundle-check
|
|
42
|
-
|
|
43
|
-
.PHONY: clean
|
|
44
|
-
clean:
|
|
45
|
-
rm -rf node_modules bun.lock
|
|
46
|
-
|
|
47
|
-
node_modules: package.json
|
|
48
|
-
bun install
|
|
49
|
-
bun link @shipload/sdk
|
|
50
|
-
@touch $@
|
package/biome.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://biomejs.dev/schemas/1.8.0/schema.json",
|
|
3
|
-
"organizeImports": { "enabled": true },
|
|
4
|
-
"linter": {
|
|
5
|
-
"enabled": true,
|
|
6
|
-
"rules": {
|
|
7
|
-
"recommended": true,
|
|
8
|
-
"suspicious": { "noExplicitAny": "error" },
|
|
9
|
-
"style": { "useImportType": "error" }
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
"formatter": {
|
|
13
|
-
"enabled": true,
|
|
14
|
-
"indentStyle": "space",
|
|
15
|
-
"indentWidth": 2,
|
|
16
|
-
"lineWidth": 100
|
|
17
|
-
}
|
|
18
|
-
}
|
package/bun.lock
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"lockfileVersion": 1,
|
|
3
|
-
"configVersion": 1,
|
|
4
|
-
"workspaces": {
|
|
5
|
-
"": {
|
|
6
|
-
"name": "@shipload/item-renderer",
|
|
7
|
-
"dependencies": {
|
|
8
|
-
"@shipload/sdk": "^2.0.0-rc25",
|
|
9
|
-
"@wharfkit/antelope": "^1.0.0",
|
|
10
|
-
},
|
|
11
|
-
"devDependencies": {
|
|
12
|
-
"@biomejs/biome": "^1.8.0",
|
|
13
|
-
"@fontsource/inter": "^5.2.8",
|
|
14
|
-
"@fontsource/jetbrains-mono": "^5.2.8",
|
|
15
|
-
"@fontsource/orbitron": "^5.2.8",
|
|
16
|
-
"@resvg/resvg-js": "^2.6.2",
|
|
17
|
-
"@types/bun": "latest",
|
|
18
|
-
"pixelmatch": "^6.0.0",
|
|
19
|
-
"pngjs": "^7.0.0",
|
|
20
|
-
"typescript": "^5.4.0",
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
"packages": {
|
|
25
|
-
"@biomejs/biome": ["@biomejs/biome@1.9.4", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "1.9.4", "@biomejs/cli-darwin-x64": "1.9.4", "@biomejs/cli-linux-arm64": "1.9.4", "@biomejs/cli-linux-arm64-musl": "1.9.4", "@biomejs/cli-linux-x64": "1.9.4", "@biomejs/cli-linux-x64-musl": "1.9.4", "@biomejs/cli-win32-arm64": "1.9.4", "@biomejs/cli-win32-x64": "1.9.4" }, "bin": { "biome": "bin/biome" } }, "sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog=="],
|
|
26
|
-
|
|
27
|
-
"@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@1.9.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw=="],
|
|
28
|
-
|
|
29
|
-
"@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@1.9.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg=="],
|
|
30
|
-
|
|
31
|
-
"@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@1.9.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g=="],
|
|
32
|
-
|
|
33
|
-
"@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@1.9.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA=="],
|
|
34
|
-
|
|
35
|
-
"@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@1.9.4", "", { "os": "linux", "cpu": "x64" }, "sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg=="],
|
|
36
|
-
|
|
37
|
-
"@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@1.9.4", "", { "os": "linux", "cpu": "x64" }, "sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg=="],
|
|
38
|
-
|
|
39
|
-
"@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@1.9.4", "", { "os": "win32", "cpu": "arm64" }, "sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg=="],
|
|
40
|
-
|
|
41
|
-
"@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@1.9.4", "", { "os": "win32", "cpu": "x64" }, "sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA=="],
|
|
42
|
-
|
|
43
|
-
"@fontsource/inter": ["@fontsource/inter@5.2.8", "", {}, "sha512-P6r5WnJoKiNVV+zvW2xM13gNdFhAEpQ9dQJHt3naLvfg+LkF2ldgSLiF4T41lf1SQCM9QmkqPTn4TH568IRagg=="],
|
|
44
|
-
|
|
45
|
-
"@fontsource/jetbrains-mono": ["@fontsource/jetbrains-mono@5.2.8", "", {}, "sha512-6w8/SG4kqvIMu7xd7wt6x3idn1Qux3p9N62s6G3rfldOUYHpWcc2FKrqf+Vo44jRvqWj2oAtTHrZXEP23oSKwQ=="],
|
|
46
|
-
|
|
47
|
-
"@fontsource/orbitron": ["@fontsource/orbitron@5.2.8", "", {}, "sha512-ruzrDl5vnqNykk5DZWY0Ezj4aeFZSbCnwJTc/98ojNJHSsHhlhT2r7rwQrA5sptmF8JtB8TQTAvlfRvcV28RPw=="],
|
|
48
|
-
|
|
49
|
-
"@resvg/resvg-js": ["@resvg/resvg-js@2.6.2", "", { "optionalDependencies": { "@resvg/resvg-js-android-arm-eabi": "2.6.2", "@resvg/resvg-js-android-arm64": "2.6.2", "@resvg/resvg-js-darwin-arm64": "2.6.2", "@resvg/resvg-js-darwin-x64": "2.6.2", "@resvg/resvg-js-linux-arm-gnueabihf": "2.6.2", "@resvg/resvg-js-linux-arm64-gnu": "2.6.2", "@resvg/resvg-js-linux-arm64-musl": "2.6.2", "@resvg/resvg-js-linux-x64-gnu": "2.6.2", "@resvg/resvg-js-linux-x64-musl": "2.6.2", "@resvg/resvg-js-win32-arm64-msvc": "2.6.2", "@resvg/resvg-js-win32-ia32-msvc": "2.6.2", "@resvg/resvg-js-win32-x64-msvc": "2.6.2" } }, "sha512-xBaJish5OeGmniDj9cW5PRa/PtmuVU3ziqrbr5xJj901ZDN4TosrVaNZpEiLZAxdfnhAe7uQ7QFWfjPe9d9K2Q=="],
|
|
50
|
-
|
|
51
|
-
"@resvg/resvg-js-android-arm-eabi": ["@resvg/resvg-js-android-arm-eabi@2.6.2", "", { "os": "android", "cpu": "arm" }, "sha512-FrJibrAk6v29eabIPgcTUMPXiEz8ssrAk7TXxsiZzww9UTQ1Z5KAbFJs+Z0Ez+VZTYgnE5IQJqBcoSiMebtPHA=="],
|
|
52
|
-
|
|
53
|
-
"@resvg/resvg-js-android-arm64": ["@resvg/resvg-js-android-arm64@2.6.2", "", { "os": "android", "cpu": "arm64" }, "sha512-VcOKezEhm2VqzXpcIJoITuvUS/fcjIw5NA/w3tjzWyzmvoCdd+QXIqy3FBGulWdClvp4g+IfUemigrkLThSjAQ=="],
|
|
54
|
-
|
|
55
|
-
"@resvg/resvg-js-darwin-arm64": ["@resvg/resvg-js-darwin-arm64@2.6.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-nmok2LnAd6nLUKI16aEB9ydMC6Lidiiq2m1nEBDR1LaaP7FGs4AJ90qDraxX+CWlVuRlvNjyYJTNv8qFjtL9+A=="],
|
|
56
|
-
|
|
57
|
-
"@resvg/resvg-js-darwin-x64": ["@resvg/resvg-js-darwin-x64@2.6.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-GInyZLjgWDfsVT6+SHxQVRwNzV0AuA1uqGsOAW+0th56J7Nh6bHHKXHBWzUrihxMetcFDmQMAX1tZ1fZDYSRsw=="],
|
|
58
|
-
|
|
59
|
-
"@resvg/resvg-js-linux-arm-gnueabihf": ["@resvg/resvg-js-linux-arm-gnueabihf@2.6.2", "", { "os": "linux", "cpu": "arm" }, "sha512-YIV3u/R9zJbpqTTNwTZM5/ocWetDKGsro0SWp70eGEM9eV2MerWyBRZnQIgzU3YBnSBQ1RcxRZvY/UxwESfZIw=="],
|
|
60
|
-
|
|
61
|
-
"@resvg/resvg-js-linux-arm64-gnu": ["@resvg/resvg-js-linux-arm64-gnu@2.6.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-zc2BlJSim7YR4FZDQ8OUoJg5holYzdiYMeobb9pJuGDidGL9KZUv7SbiD4E8oZogtYY42UZEap7dqkkYuA91pg=="],
|
|
62
|
-
|
|
63
|
-
"@resvg/resvg-js-linux-arm64-musl": ["@resvg/resvg-js-linux-arm64-musl@2.6.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-3h3dLPWNgSsD4lQBJPb4f+kvdOSJHa5PjTYVsWHxLUzH4IFTJUAnmuWpw4KqyQ3NA5QCyhw4TWgxk3jRkQxEKg=="],
|
|
64
|
-
|
|
65
|
-
"@resvg/resvg-js-linux-x64-gnu": ["@resvg/resvg-js-linux-x64-gnu@2.6.2", "", { "os": "linux", "cpu": "x64" }, "sha512-IVUe+ckIerA7xMZ50duAZzwf1U7khQe2E0QpUxu5MBJNao5RqC0zwV/Zm965vw6D3gGFUl7j4m+oJjubBVoftw=="],
|
|
66
|
-
|
|
67
|
-
"@resvg/resvg-js-linux-x64-musl": ["@resvg/resvg-js-linux-x64-musl@2.6.2", "", { "os": "linux", "cpu": "x64" }, "sha512-UOf83vqTzoYQO9SZ0fPl2ZIFtNIz/Rr/y+7X8XRX1ZnBYsQ/tTb+cj9TE+KHOdmlTFBxhYzVkP2lRByCzqi4jQ=="],
|
|
68
|
-
|
|
69
|
-
"@resvg/resvg-js-win32-arm64-msvc": ["@resvg/resvg-js-win32-arm64-msvc@2.6.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-7C/RSgCa+7vqZ7qAbItfiaAWhyRSoD4l4BQAbVDqRRsRgY+S+hgS3in0Rxr7IorKUpGE69X48q6/nOAuTJQxeQ=="],
|
|
70
|
-
|
|
71
|
-
"@resvg/resvg-js-win32-ia32-msvc": ["@resvg/resvg-js-win32-ia32-msvc@2.6.2", "", { "os": "win32", "cpu": "ia32" }, "sha512-har4aPAlvjnLcil40AC77YDIk6loMawuJwFINEM7n0pZviwMkMvjb2W5ZirsNOZY4aDbo5tLx0wNMREp5Brk+w=="],
|
|
72
|
-
|
|
73
|
-
"@resvg/resvg-js-win32-x64-msvc": ["@resvg/resvg-js-win32-x64-msvc@2.6.2", "", { "os": "win32", "cpu": "x64" }, "sha512-ZXtYhtUr5SSaBrUDq7DiyjOFJqBVL/dOBN7N/qmi/pO0IgiWW/f/ue3nbvu9joWE5aAKDoIzy/CxsY0suwGosQ=="],
|
|
74
|
-
|
|
75
|
-
"@shipload/sdk": ["@shipload/sdk@2.0.0-rc25", "", { "dependencies": { "@wharfkit/antelope": "1.2.0", "@wharfkit/contract": "^1.2.1", "@wharfkit/session": "^1.3.1", "tslib": "^2.1.0" } }, "sha512-Kjr8YH/hiGWaRm9gTtgus/H/YHJfLBfn9KtbU82iTRARS+ZIMZIYeMmvshTlOcOvGL9nIynbfM4mVz4jDQCq4g=="],
|
|
76
|
-
|
|
77
|
-
"@types/bun": ["@types/bun@1.3.12", "", { "dependencies": { "bun-types": "1.3.12" } }, "sha512-DBv81elK+/VSwXHDlnH3Qduw+KxkTIWi7TXkAeh24zpi5l0B2kUg9Ga3tb4nJaPcOFswflgi/yAvMVBPrxMB+A=="],
|
|
78
|
-
|
|
79
|
-
"@types/node": ["@types/node@25.6.0", "", { "dependencies": { "undici-types": "~7.19.0" } }, "sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ=="],
|
|
80
|
-
|
|
81
|
-
"@wharfkit/abicache": ["@wharfkit/abicache@1.2.2", "", { "dependencies": { "@wharfkit/antelope": "^1.0.2", "@wharfkit/signing-request": "^3.1.0", "pako": "^2.0.4", "tslib": "^2.1.0" } }, "sha512-yOsYz2qQpQy7Nb8XZj62pZqp8YnmWDqFlrenYksBb9jl+1aWIpFhWd+14VEez4tUAezRH4UWW+w1SX5vhmUY9A=="],
|
|
82
|
-
|
|
83
|
-
"@wharfkit/antelope": ["@wharfkit/antelope@1.2.0", "", { "dependencies": { "bn.js": "^4.11.9", "brorand": "^1.1.0", "elliptic": "^6.5.4", "hash.js": "^1.0.0", "pako": "^2.1.0", "tslib": "^2.0.3" } }, "sha512-9q0nvM8yUtjKTQlukKZODAhUN2S2/cfSlIYdh2mPnaOCSH8KOLJ2gYCPuQVvH1FE9AKu312lM5TzhkRccf1VjQ=="],
|
|
84
|
-
|
|
85
|
-
"@wharfkit/common": ["@wharfkit/common@1.5.0", "", { "dependencies": { "tslib": "^2.1.0" }, "peerDependencies": { "@wharfkit/antelope": "^1.0.0" } }, "sha512-eqXkOy+vshcEzK8kED+EsoTPJjlBKHYglgV9CBnZQgIlGrWIRXWH4YaXH3W7EbI/nCRJCaNqxm5fC+pgpFcp8g=="],
|
|
86
|
-
|
|
87
|
-
"@wharfkit/contract": ["@wharfkit/contract@1.2.1", "", { "dependencies": { "@wharfkit/abicache": "^1.2.0", "@wharfkit/antelope": "^1.0.4", "@wharfkit/signing-request": "^3.1.0", "tslib": "^2.1.0" } }, "sha512-3UhCtDYCyapfM2nRTrslcbvko864d4MOpxRAz7TR/ZUbRAgZsxhYLFLEv1v23/SU+vsFzAHNBmvzkLEG0OLaHQ=="],
|
|
88
|
-
|
|
89
|
-
"@wharfkit/session": ["@wharfkit/session@1.6.1", "", { "dependencies": { "@wharfkit/abicache": "^1.2.1", "@wharfkit/antelope": "^1.0.11", "@wharfkit/common": "^1.2.0", "@wharfkit/signing-request": "^3.1.0", "pako": "^2.0.4", "tslib": "^2.1.0" } }, "sha512-k6ntDGOe8bvD/Ps0erTPTFMdYVFrw5cRvPcEwxytlmRRcNV/M8xWcpCYWdmGDxa8QYqynf/hAkbVh1PSwRGl5A=="],
|
|
90
|
-
|
|
91
|
-
"@wharfkit/signing-request": ["@wharfkit/signing-request@3.4.0", "", { "dependencies": { "@wharfkit/antelope": "^1.1.1", "tslib": "^2.0.3" } }, "sha512-WstXfmR9i5pKaYXDUwNFNCgBIvN6u5IRGWSfj5O3XzthbtJUmRoJNtjGMaNnUqZ1MMx5YY4/JpY3b2e6LbpXLw=="],
|
|
92
|
-
|
|
93
|
-
"bn.js": ["bn.js@4.12.3", "", {}, "sha512-fGTi3gxV/23FTYdAoUtLYp6qySe2KE3teyZitipKNRuVYcBkoP/bB3guXN/XVKUe9mxCHXnc9C4ocyz8OmgN0g=="],
|
|
94
|
-
|
|
95
|
-
"brorand": ["brorand@1.1.0", "", {}, "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w=="],
|
|
96
|
-
|
|
97
|
-
"bun-types": ["bun-types@1.3.12", "", { "dependencies": { "@types/node": "*" } }, "sha512-HqOLj5PoFajAQciOMRiIZGNoKxDJSr6qigAttOX40vJuSp6DN/CxWp9s3C1Xwm4oH7ybueITwiaOcWXoYVoRkA=="],
|
|
98
|
-
|
|
99
|
-
"elliptic": ["elliptic@6.6.1", "", { "dependencies": { "bn.js": "^4.11.9", "brorand": "^1.1.0", "hash.js": "^1.0.0", "hmac-drbg": "^1.0.1", "inherits": "^2.0.4", "minimalistic-assert": "^1.0.1", "minimalistic-crypto-utils": "^1.0.1" } }, "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g=="],
|
|
100
|
-
|
|
101
|
-
"hash.js": ["hash.js@1.1.7", "", { "dependencies": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.1" } }, "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA=="],
|
|
102
|
-
|
|
103
|
-
"hmac-drbg": ["hmac-drbg@1.0.1", "", { "dependencies": { "hash.js": "^1.0.3", "minimalistic-assert": "^1.0.0", "minimalistic-crypto-utils": "^1.0.1" } }, "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg=="],
|
|
104
|
-
|
|
105
|
-
"inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="],
|
|
106
|
-
|
|
107
|
-
"minimalistic-assert": ["minimalistic-assert@1.0.1", "", {}, "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A=="],
|
|
108
|
-
|
|
109
|
-
"minimalistic-crypto-utils": ["minimalistic-crypto-utils@1.0.1", "", {}, "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg=="],
|
|
110
|
-
|
|
111
|
-
"pako": ["pako@2.1.0", "", {}, "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug=="],
|
|
112
|
-
|
|
113
|
-
"pixelmatch": ["pixelmatch@6.0.0", "", { "dependencies": { "pngjs": "^7.0.0" }, "bin": { "pixelmatch": "bin/pixelmatch" } }, "sha512-FYpL4XiIWakTnIqLqvt3uN4L9B3TsuHIvhLILzTiJZMJUsGvmKNeL4H3b6I99LRyerK9W4IuOXw+N28AtRgK2g=="],
|
|
114
|
-
|
|
115
|
-
"pngjs": ["pngjs@7.0.0", "", {}, "sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow=="],
|
|
116
|
-
|
|
117
|
-
"tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
|
118
|
-
|
|
119
|
-
"typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
|
|
120
|
-
|
|
121
|
-
"undici-types": ["undici-types@7.19.2", "", {}, "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg=="],
|
|
122
|
-
}
|
|
123
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { gzipSync } from "node:zlib";
|
|
2
|
-
|
|
3
|
-
const CORE_LIMIT_BYTES = 50 * 1024;
|
|
4
|
-
|
|
5
|
-
async function main() {
|
|
6
|
-
const result = await Bun.build({
|
|
7
|
-
entrypoints: ["./src/index.ts"],
|
|
8
|
-
target: "browser",
|
|
9
|
-
format: "esm",
|
|
10
|
-
minify: true,
|
|
11
|
-
external: ["@shipload/sdk", "@wharfkit/antelope"],
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
if (!result.success) {
|
|
15
|
-
for (const msg of result.logs) console.error(msg);
|
|
16
|
-
process.exit(1);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
let totalBytes = 0;
|
|
20
|
-
let totalGzipped = 0;
|
|
21
|
-
for (const out of result.outputs) {
|
|
22
|
-
const text = await out.text();
|
|
23
|
-
const bytes = new TextEncoder().encode(text).length;
|
|
24
|
-
const gz = gzipSync(new TextEncoder().encode(text)).length;
|
|
25
|
-
console.log(`${out.path}: ${bytes} bytes (${gz} gzipped)`);
|
|
26
|
-
totalBytes += bytes;
|
|
27
|
-
totalGzipped += gz;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
console.log(`core bundle total: ${totalBytes} bytes, ${totalGzipped} gzipped`);
|
|
31
|
-
if (totalGzipped > CORE_LIMIT_BYTES) {
|
|
32
|
-
console.error(`FAIL: core bundle is ${totalGzipped} gzipped, limit is ${CORE_LIMIT_BYTES}`);
|
|
33
|
-
process.exit(1);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
main();
|
package/scripts/copy-fonts.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { copyFile, mkdir } from "node:fs/promises";
|
|
2
|
-
import { dirname, resolve } from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
|
|
5
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
6
|
-
const OUT_DIR = resolve(__dirname, "../src/fonts");
|
|
7
|
-
const NM = resolve(__dirname, "../node_modules");
|
|
8
|
-
|
|
9
|
-
const FACES = [
|
|
10
|
-
{
|
|
11
|
-
src: `${NM}/@fontsource/orbitron/files/orbitron-latin-700-normal.woff2`,
|
|
12
|
-
out: "orbitron-700.woff2",
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
src: `${NM}/@fontsource/inter/files/inter-latin-400-normal.woff2`,
|
|
16
|
-
out: "inter-400.woff2",
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
src: `${NM}/@fontsource/inter/files/inter-latin-600-normal.woff2`,
|
|
20
|
-
out: "inter-600.woff2",
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
src: `${NM}/@fontsource/jetbrains-mono/files/jetbrains-mono-latin-500-normal.woff2`,
|
|
24
|
-
out: "jetbrains-500.woff2",
|
|
25
|
-
},
|
|
26
|
-
];
|
|
27
|
-
|
|
28
|
-
async function main() {
|
|
29
|
-
await mkdir(OUT_DIR, { recursive: true });
|
|
30
|
-
for (const face of FACES) {
|
|
31
|
-
const dest = resolve(OUT_DIR, face.out);
|
|
32
|
-
await copyFile(face.src, dest);
|
|
33
|
-
const size = (await Bun.file(dest).arrayBuffer()).byteLength;
|
|
34
|
-
console.log(`wrote ${face.out} (${size} bytes)`);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
main().catch((e) => {
|
|
39
|
-
console.error(e);
|
|
40
|
-
process.exit(1);
|
|
41
|
-
});
|
package/scripts/preview.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { resolveItem } from "@shipload/sdk";
|
|
2
|
-
import { renderItem } from "../src/render.ts";
|
|
3
|
-
import { FIXTURES } from "../test/fixtures/cargo-items.ts";
|
|
4
|
-
|
|
5
|
-
function page(): string {
|
|
6
|
-
const sections: string[] = [];
|
|
7
|
-
for (const [name, item] of Object.entries(FIXTURES)) {
|
|
8
|
-
const resolved = resolveItem(item.item_id, item.stats, item.modules);
|
|
9
|
-
const svg = renderItem(item, resolved);
|
|
10
|
-
sections.push(`<section><h3>${name}</h3><div class="wrap">${svg}</div></section>`);
|
|
11
|
-
}
|
|
12
|
-
return `
|
|
13
|
-
<!doctype html>
|
|
14
|
-
<html>
|
|
15
|
-
<head>
|
|
16
|
-
<meta charset="utf-8">
|
|
17
|
-
<title>item-renderer preview</title>
|
|
18
|
-
<style>
|
|
19
|
-
body { background: #0a0a0c; color: #e6e8ec; font-family: Inter, sans-serif; padding: 24px; }
|
|
20
|
-
main { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
|
|
21
|
-
section { background: #11141a; padding: 16px; border-radius: 10px; }
|
|
22
|
-
h3 { margin: 0 0 8px; color: #8f98a8; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
|
|
23
|
-
.wrap svg { display: block; }
|
|
24
|
-
</style>
|
|
25
|
-
</head>
|
|
26
|
-
<body>
|
|
27
|
-
<h1>Fixtures</h1>
|
|
28
|
-
<main>${sections.join("")}</main>
|
|
29
|
-
</body>
|
|
30
|
-
</html>
|
|
31
|
-
`;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const port = Number(process.env.PORT ?? 5173);
|
|
35
|
-
|
|
36
|
-
Bun.serve({
|
|
37
|
-
port,
|
|
38
|
-
fetch: () => new Response(page(), { headers: { "content-type": "text/html" } }),
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
console.log(`preview running at http://localhost:${port}`);
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// Bun Snapshot v1, https://bun.sh/docs/test/snapshots
|
|
2
|
-
|
|
3
|
-
exports[`matches the committed Hull Plates snapshot: component-hull-plates.svg 1`] = `"<svg xmlns="http://www.w3.org/2000/svg" width="280" height="164" viewBox="0 0 280 164"><rect x="0.5" y="0.5" width="279" height="163" rx="10" ry="10" fill="#11141a" stroke="#8b8b8b" stroke-width="1"/><polygon points="14.0,29.0 20.4,18.0 33.1,18.0 39.4,29.0 33.1,40.0 20.4,40.0" fill="none" stroke="#8f98a8" stroke-width="1.5"/><text x="26.701700000000002" y="32" font-family=""JetBrains Mono", "JetBrains Mono Variable", ui-monospace, monospace" font-size="9" font-weight="700" fill="#8f98a8" text-anchor="middle">01</text><text x="48" y="36" font-family=""Orbitron", "Orbitron Variable", system-ui, sans-serif" font-size="16" font-weight="700" fill="#e6e8ec">Hull Plates</text><text x="14" y="66" font-family=""Inter", "Inter Variable", system-ui, sans-serif" font-size="12" font-weight="400" fill="#8f98a8">Type</text><text x="266" y="66" font-family=""Inter", "Inter Variable", system-ui, sans-serif" font-size="12" font-weight="600" fill="#e6e8ec" text-anchor="end">COMPONENT · T1</text><text x="14" y="82" font-family=""Inter", "Inter Variable", system-ui, sans-serif" font-size="12" font-weight="400" fill="#8f98a8">Mass</text><text x="266" y="82" font-family=""Inter", "Inter Variable", system-ui, sans-serif" font-size="12" font-weight="600" fill="#e6e8ec" text-anchor="end">50,000</text><line x1="14" x2="266" y1="96" y2="96" stroke="#1e242e" stroke-width="1"/><text x="14" y="108" font-family=""JetBrains Mono", "JetBrains Mono Variable", ui-monospace, monospace" font-size="10" font-weight="700" fill="#C26D3F">STR</text><text x="36" y="108" font-family=""Inter", "Inter Variable", system-ui, sans-serif" font-size="12" font-weight="400" fill="#e6e8ec">Strength</text><text x="266" y="108" font-family=""Inter", "Inter Variable", system-ui, sans-serif" font-size="14" font-weight="700" fill="#C26D3F" text-anchor="end">745</text><rect x="14" y="114" width="252" height="4" rx="2" ry="2" fill="#1e242e"/><rect x="14" y="114" width="183" height="4" rx="2" ry="2" fill="#C26D3F"/><text x="14" y="134" font-family=""JetBrains Mono", "JetBrains Mono Variable", ui-monospace, monospace" font-size="10" font-weight="700" fill="#C26D3F">DEN</text><text x="36" y="134" font-family=""Inter", "Inter Variable", system-ui, sans-serif" font-size="12" font-weight="400" fill="#e6e8ec">Density</text><text x="266" y="134" font-family=""Inter", "Inter Variable", system-ui, sans-serif" font-size="14" font-weight="700" fill="#C26D3F" text-anchor="end">330</text><rect x="14" y="140" width="252" height="4" rx="2" ry="2" fill="#1e242e"/><rect x="14" y="140" width="170" height="4" rx="2" ry="2" fill="#C26D3F"/></svg>"`;
|
|
4
|
-
|
|
5
|
-
exports[`renderComponent ranges mode matches snapshot: component-ranges 1`] = `"<svg xmlns="http://www.w3.org/2000/svg" width="280" height="164" viewBox="0 0 280 164"><rect x="0.5" y="0.5" width="279" height="163" rx="10" ry="10" fill="#11141a" stroke="#8b8b8b" stroke-width="1"/><polygon points="14.0,29.0 20.4,18.0 33.1,18.0 39.4,29.0 33.1,40.0 20.4,40.0" fill="none" stroke="#8f98a8" stroke-width="1.5"/><text x="26.701700000000002" y="32" font-family=""JetBrains Mono", "JetBrains Mono Variable", ui-monospace, monospace" font-size="9" font-weight="700" fill="#8f98a8" text-anchor="middle">01</text><text x="48" y="36" font-family=""Orbitron", "Orbitron Variable", system-ui, sans-serif" font-size="16" font-weight="700" fill="#e6e8ec">Hull Plates</text><text x="14" y="66" font-family=""Inter", "Inter Variable", system-ui, sans-serif" font-size="12" font-weight="400" fill="#8f98a8">Type</text><text x="266" y="66" font-family=""Inter", "Inter Variable", system-ui, sans-serif" font-size="12" font-weight="600" fill="#e6e8ec" text-anchor="end">COMPONENT · T1</text><text x="14" y="82" font-family=""Inter", "Inter Variable", system-ui, sans-serif" font-size="12" font-weight="400" fill="#8f98a8">Mass</text><text x="266" y="82" font-family=""Inter", "Inter Variable", system-ui, sans-serif" font-size="12" font-weight="600" fill="#e6e8ec" text-anchor="end">50,000</text><line x1="14" x2="266" y1="96" y2="96" stroke="#1e242e" stroke-width="1"/><text x="14" y="108" font-family=""JetBrains Mono", "JetBrains Mono Variable", ui-monospace, monospace" font-size="10" font-weight="700" fill="#C26D3F">STR</text><text x="36" y="108" font-family=""Inter", "Inter Variable", system-ui, sans-serif" font-size="12" font-weight="400" fill="#e6e8ec">Strength</text><rect x="14" y="114" width="252" height="4" rx="2" ry="2" fill="#1e242e"/><text x="14" y="134" font-family=""JetBrains Mono", "JetBrains Mono Variable", ui-monospace, monospace" font-size="10" font-weight="700" fill="#C26D3F">DEN</text><text x="36" y="134" font-family=""Inter", "Inter Variable", system-ui, sans-serif" font-size="12" font-weight="400" fill="#e6e8ec">Density</text><rect x="14" y="140" width="252" height="4" rx="2" ry="2" fill="#1e242e"/></svg>"`;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// Bun Snapshot v1, https://bun.sh/docs/test/snapshots
|
|
2
|
-
|
|
3
|
-
exports[`matches golden SVG snapshot per itemType: item-cell-resource 1`] = `"<svg xmlns="http://www.w3.org/2000/svg" width="48" height="60" viewBox="0 0 48 60"><rect x="0.5" y="0.5" width="47" height="59" rx="6" ry="6" fill="#11141a" stroke="#8b8b8b" stroke-width="1.5"/><polygon points="24.00,11.52 30.65,15.36 30.65,23.04 24.00,26.88 17.35,23.04 17.35,15.36" fill="none" stroke="#C26D3F" stroke-width="1.5" stroke-linejoin="round"/><text x="42" y="54" font-family=""Orbitron", "Orbitron Variable", system-ui, sans-serif" font-size="11" font-weight="700" fill="#e6e8ec" text-anchor="end">3</text></svg>"`;
|
|
4
|
-
|
|
5
|
-
exports[`matches golden SVG snapshot per itemType: item-cell-component 1`] = `"<svg xmlns="http://www.w3.org/2000/svg" width="48" height="60" viewBox="0 0 48 60"><rect x="0.5" y="0.5" width="47" height="59" rx="6" ry="6" fill="#11141a" stroke="#8b8b8b" stroke-width="1.5"/><text x="24" y="21.6" font-family=""Orbitron", "Orbitron Variable", system-ui, sans-serif" font-size="13" font-weight="700" fill="#e6e8ec" text-anchor="middle">HP</text><text x="42" y="54" font-family=""Orbitron", "Orbitron Variable", system-ui, sans-serif" font-size="11" font-weight="700" fill="#e6e8ec" text-anchor="end">3</text></svg>"`;
|
|
6
|
-
|
|
7
|
-
exports[`matches golden SVG snapshot per itemType: item-cell-module 1`] = `"<svg xmlns="http://www.w3.org/2000/svg" width="48" height="60" viewBox="0 0 48 60"><rect x="0.5" y="0.5" width="47" height="59" rx="6" ry="6" fill="#11141a" stroke="#8b8b8b" stroke-width="1.5"/><text x="24" y="21.6" font-family=""Orbitron", "Orbitron Variable", system-ui, sans-serif" font-size="13" font-weight="700" fill="#e6e8ec" text-anchor="middle">EN</text><text x="42" y="54" font-family=""Orbitron", "Orbitron Variable", system-ui, sans-serif" font-size="11" font-weight="700" fill="#e6e8ec" text-anchor="end">3</text></svg>"`;
|
|
8
|
-
|
|
9
|
-
exports[`matches golden SVG snapshot per itemType: item-cell-entity 1`] = `"<svg xmlns="http://www.w3.org/2000/svg" width="48" height="60" viewBox="0 0 48 60"><rect x="0.5" y="0.5" width="47" height="59" rx="6" ry="6" fill="#11141a" stroke="#8b8b8b" stroke-width="1.5"/><text x="24" y="21.6" font-family=""Orbitron", "Orbitron Variable", system-ui, sans-serif" font-size="13" font-weight="700" fill="#e6e8ec" text-anchor="middle">SH</text><text x="42" y="54" font-family=""Orbitron", "Orbitron Variable", system-ui, sans-serif" font-size="11" font-weight="700" fill="#e6e8ec" text-anchor="end">3</text></svg>"`;
|