@shipload/item-renderer 1.0.0-next.14 → 1.0.0-next.15
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipload/item-renderer",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.15",
|
|
4
4
|
"description": "Deterministic SVG rendering for Shipload items",
|
|
5
5
|
"homepage": "https://github.com/shipload/toolkit/tree/master/packages/item-renderer",
|
|
6
6
|
"repository": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"fonts:copy": "bun run scripts/copy-fonts.ts"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@shipload/sdk": "^1.0.0-next.
|
|
48
|
+
"@shipload/sdk": "^1.0.0-next.15",
|
|
49
49
|
"@wharfkit/antelope": "1.2.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getRecipe,
|
|
5
5
|
getStatDefinitions,
|
|
6
6
|
categoryColors,
|
|
7
|
-
|
|
7
|
+
displayName,
|
|
8
8
|
formatLocation,
|
|
9
9
|
} from '@shipload/sdk'
|
|
10
10
|
import type {CargoItem} from '../payload/codec.ts'
|
|
@@ -106,7 +106,7 @@ export function renderComponent(
|
|
|
106
106
|
const name = text({
|
|
107
107
|
x: pad + 34,
|
|
108
108
|
y: pad + 22,
|
|
109
|
-
value:
|
|
109
|
+
value: displayName(resolved),
|
|
110
110
|
size: tokens.typography.sizes.title,
|
|
111
111
|
weight: 700,
|
|
112
112
|
family: tokens.typography.display,
|
package/src/templates/module.ts
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import type {ResolvedItem} from '@shipload/sdk'
|
|
2
|
-
import {
|
|
3
|
-
describeModuleForItem,
|
|
4
|
-
displayNameWithTier,
|
|
5
|
-
formatLocation,
|
|
6
|
-
renderDescription,
|
|
7
|
-
} from '@shipload/sdk'
|
|
2
|
+
import {describeModuleForItem, displayName, formatLocation, renderDescription} from '@shipload/sdk'
|
|
8
3
|
import type {CargoItem} from '../payload/codec.ts'
|
|
9
4
|
import {panel} from '../primitives/panel.ts'
|
|
10
5
|
import {iconHex} from '../primitives/icon-hex.ts'
|
|
@@ -102,7 +97,7 @@ export function renderModule(
|
|
|
102
97
|
const name = text({
|
|
103
98
|
x: pad + 34,
|
|
104
99
|
y: pad + 22,
|
|
105
|
-
value:
|
|
100
|
+
value: displayName(resolved),
|
|
106
101
|
size: tokens.typography.sizes.title,
|
|
107
102
|
weight: 700,
|
|
108
103
|
family: tokens.typography.display,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type {ResolvedItem, ResolvedModuleSlot} from '@shipload/sdk'
|
|
2
|
-
import {describeModuleForSlot,
|
|
2
|
+
import {describeModuleForSlot, displayName, renderDescription} from '@shipload/sdk'
|
|
3
3
|
import type {CargoItem} from '../payload/codec.ts'
|
|
4
4
|
import {renderShipPanel, type ShipPanelSlot} from './ship-panel.ts'
|
|
5
5
|
|
|
@@ -28,7 +28,7 @@ export function renderPackedEntity(
|
|
|
28
28
|
const quantity = Number(BigInt(item.quantity.toString()))
|
|
29
29
|
const slots = (resolved.moduleSlots ?? []).map(slotToPanelSlot)
|
|
30
30
|
return renderShipPanel({
|
|
31
|
-
name: `${
|
|
31
|
+
name: `${displayName(resolved)} (Packed)`,
|
|
32
32
|
tier: resolved.tier,
|
|
33
33
|
quantity,
|
|
34
34
|
location: opts?.location,
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import type {ResolvedItem} from '@shipload/sdk'
|
|
2
|
-
import {
|
|
3
|
-
getStatDefinitions,
|
|
4
|
-
categoryColors,
|
|
5
|
-
displayNameWithTier,
|
|
6
|
-
formatLocation,
|
|
7
|
-
} from '@shipload/sdk'
|
|
2
|
+
import {getStatDefinitions, categoryColors, displayName, formatLocation} from '@shipload/sdk'
|
|
8
3
|
import type {CargoItem} from '../payload/codec.ts'
|
|
9
4
|
import {panel} from '../primitives/panel.ts'
|
|
10
5
|
import {iconHex} from '../primitives/icon-hex.ts'
|
|
@@ -101,7 +96,7 @@ export function renderResource(
|
|
|
101
96
|
const name = text({
|
|
102
97
|
x: pad + 34,
|
|
103
98
|
y: pad + 22,
|
|
104
|
-
value:
|
|
99
|
+
value: displayName(resolved),
|
|
105
100
|
size: tokens.typography.sizes.title,
|
|
106
101
|
weight: 700,
|
|
107
102
|
family: tokens.typography.display,
|