@rickyzhangca/fpsr 0.0.1
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/CHANGELOG.md +10 -0
- package/LICENSE +21 -0
- package/README.md +267 -0
- package/dist/abort-CrgARaZd.js +43 -0
- package/dist/abort-CrgARaZd.js.map +1 -0
- package/dist/assets-Dy4fqZBV.d.ts +85 -0
- package/dist/assets-Dy4fqZBV.d.ts.map +1 -0
- package/dist/canvas.d.ts +98 -0
- package/dist/canvas.d.ts.map +1 -0
- package/dist/canvas.js +3 -0
- package/dist/execute-CRZV5zw1.js +963 -0
- package/dist/execute-CRZV5zw1.js.map +1 -0
- package/dist/host-DdX4g1YM.d.ts +34 -0
- package/dist/host-DdX4g1YM.d.ts.map +1 -0
- package/dist/index.d.ts +463 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1776 -0
- package/dist/index.js.map +1 -0
- package/dist/node.d.ts +16 -0
- package/dist/node.d.ts.map +1 -0
- package/dist/node.js +101 -0
- package/dist/node.js.map +1 -0
- package/dist/planner.d.ts +418 -0
- package/dist/planner.d.ts.map +1 -0
- package/dist/planner.js +96 -0
- package/dist/planner.js.map +1 -0
- package/dist/profile-CTN1Q5SI.d.ts +365 -0
- package/dist/profile-CTN1Q5SI.d.ts.map +1 -0
- package/dist/profile-DR4i6HDp.js +610 -0
- package/dist/profile-DR4i6HDp.js.map +1 -0
- package/dist/render-db-BFQIspDB.d.ts +426 -0
- package/dist/render-db-BFQIspDB.d.ts.map +1 -0
- package/dist/render-db.d.ts +2 -0
- package/dist/render-db.js +1 -0
- package/dist/tiled-draw-list-Dc-5Ledi.js +3990 -0
- package/dist/tiled-draw-list-Dc-5Ledi.js.map +1 -0
- package/dist/types-CHgZBSra.d.ts +105 -0
- package/dist/types-CHgZBSra.d.ts.map +1 -0
- package/dist/upgrade-planner-CNjnMHPJ.d.ts +385 -0
- package/dist/upgrade-planner-CNjnMHPJ.d.ts.map +1 -0
- package/package.json +86 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { a as CanvasTextBaseline, c as ImageSource, i as CanvasTextAlign, n as CanvasFillStyle, o as GlobalCompositeOperation, r as CanvasLineCap } from "./host-DdX4g1YM.js";
|
|
2
|
+
import { b as SpaceBackground, h as FrameMeta, w as TerrainPatchBackground } from "./render-db-BFQIspDB.js";
|
|
3
|
+
|
|
4
|
+
//#region src/canvas2d/types.d.ts
|
|
5
|
+
/** Minimal Canvas 2D surface used by the backend (browser or skia-canvas). */
|
|
6
|
+
interface Canvas2DContextLike {
|
|
7
|
+
save(): void;
|
|
8
|
+
restore(): void;
|
|
9
|
+
scale(x: number, y: number): void;
|
|
10
|
+
rotate(angle: number): void;
|
|
11
|
+
translate(x: number, y: number): void;
|
|
12
|
+
fillRect(x: number, y: number, w: number, h: number): void;
|
|
13
|
+
strokeRect?(x: number, y: number, w: number, h: number): void;
|
|
14
|
+
clearRect(x: number, y: number, w: number, h: number): void;
|
|
15
|
+
beginPath(): void;
|
|
16
|
+
moveTo(x: number, y: number): void;
|
|
17
|
+
lineTo(x: number, y: number): void;
|
|
18
|
+
quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
|
|
19
|
+
arc(x: number, y: number, radius: number, startAngle: number, endAngle: number): void;
|
|
20
|
+
stroke(): void;
|
|
21
|
+
fill(): void;
|
|
22
|
+
roundRect?(x: number, y: number, w: number, h: number, radii: number | number[]): void;
|
|
23
|
+
rect(x: number, y: number, w: number, h: number): void;
|
|
24
|
+
clip(): void;
|
|
25
|
+
drawImage(image: ImageSource, dx: number, dy: number, dw: number, dh: number): void;
|
|
26
|
+
drawImage(image: ImageSource, sx: number, sy: number, sw: number, sh: number, dx: number, dy: number, dw: number, dh: number): void;
|
|
27
|
+
fillText(text: string, x: number, y: number): void;
|
|
28
|
+
set fillStyle(value: CanvasFillStyle);
|
|
29
|
+
set strokeStyle(value: CanvasFillStyle);
|
|
30
|
+
set lineWidth(value: number);
|
|
31
|
+
set lineCap(value: CanvasLineCap);
|
|
32
|
+
setLineDash?(segments: number[]): void;
|
|
33
|
+
set globalAlpha(value: number);
|
|
34
|
+
get globalAlpha(): number;
|
|
35
|
+
set globalCompositeOperation(value: GlobalCompositeOperation);
|
|
36
|
+
get globalCompositeOperation(): GlobalCompositeOperation;
|
|
37
|
+
set filter(value: string);
|
|
38
|
+
set font(value: string);
|
|
39
|
+
set textBaseline(value: CanvasTextBaseline);
|
|
40
|
+
set textAlign(value: CanvasTextAlign);
|
|
41
|
+
imageSmoothingEnabled: boolean;
|
|
42
|
+
imageSmoothingQuality?: "low" | "medium" | "high";
|
|
43
|
+
}
|
|
44
|
+
interface ExecuteDrawListOptions {
|
|
45
|
+
pixelsPerTile: number;
|
|
46
|
+
padTiles?: number;
|
|
47
|
+
/** Integer tile viewport; when set, canvas origin aligns to tile grid. */
|
|
48
|
+
tileFrame?: {
|
|
49
|
+
minX: number;
|
|
50
|
+
minY: number;
|
|
51
|
+
maxX: number;
|
|
52
|
+
maxY: number;
|
|
53
|
+
};
|
|
54
|
+
/** Full output frame when `tileFrame` is only one tiled-render viewport. */
|
|
55
|
+
outputTileFrame?: {
|
|
56
|
+
minX: number;
|
|
57
|
+
minY: number;
|
|
58
|
+
maxX: number;
|
|
59
|
+
maxY: number;
|
|
60
|
+
};
|
|
61
|
+
background?: [number, number, number, number] | null;
|
|
62
|
+
/** Draw tile-aligned checkerboard behind commands (replaces solid background). */
|
|
63
|
+
showCheckerboard?: boolean;
|
|
64
|
+
/** Draw a procedural space starfield behind commands (replaces solid/checkerboard). */
|
|
65
|
+
showSpace?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* When `showSpace` is set, also draw the render-db space-platform planet
|
|
68
|
+
* (e.g. Nauvis) in the bottom-left. Starfield-only when omitted/false.
|
|
69
|
+
*/
|
|
70
|
+
showSpacePlanet?: boolean;
|
|
71
|
+
/** Selected natural-terrain definition from the render database. */
|
|
72
|
+
terrainBackground?: TerrainPatchBackground;
|
|
73
|
+
/** Optional space-platform planet decoration from the render database. */
|
|
74
|
+
spaceBackground?: SpaceBackground;
|
|
75
|
+
/** Draw tile grid lines and map-space coordinate labels after commands. */
|
|
76
|
+
showCoordinates?: boolean;
|
|
77
|
+
/** Transparent per-frame icon crops used for alpha-safe silhouette filtering. */
|
|
78
|
+
iconImages?: ReadonlyMap<number, ImageSource>;
|
|
79
|
+
/** Padded, dilated black silhouettes keyed by icon frame index. */
|
|
80
|
+
silhouetteImages?: ReadonlyMap<number, ImageSource>;
|
|
81
|
+
/**
|
|
82
|
+
* Frame table from the RenderDb that produced `list`. Required for trim math;
|
|
83
|
+
* not in the CONTRACTS.md sketch — see M1 report.
|
|
84
|
+
*/
|
|
85
|
+
frames: FrameMeta[];
|
|
86
|
+
/** Optional canvas factory for offscreen tint compositing (Node/skia). */
|
|
87
|
+
createCanvas?: (width: number, height: number) => {
|
|
88
|
+
width: number;
|
|
89
|
+
height: number;
|
|
90
|
+
getContext(type: "2d"): Canvas2DContextLike | null;
|
|
91
|
+
};
|
|
92
|
+
/** Shadow scratch-tile edge length. Defaults to 1024 px. */
|
|
93
|
+
shadowTileSize?: number;
|
|
94
|
+
/** Optional mutable performance counters populated during painting. */
|
|
95
|
+
stats?: ExecuteDrawListStats;
|
|
96
|
+
}
|
|
97
|
+
interface ExecuteDrawListStats {
|
|
98
|
+
shadowRuns: number;
|
|
99
|
+
shadowTiles: number;
|
|
100
|
+
shadowCompositedPixels: number;
|
|
101
|
+
shadowPeakScratchPixels: number;
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
export { ExecuteDrawListOptions as n, ExecuteDrawListStats as r, Canvas2DContextLike as t };
|
|
105
|
+
//# sourceMappingURL=types-CHgZBSra.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-CHgZBSra.d.ts","names":[],"sources":["../src/canvas2d/types.ts"],"mappings":";;;;;UAWiB,mBAAA;EACf,IAAA;EACA,OAAA;EACA,KAAA,CAAM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O,KAAA;EAAA,IACP,IAAA,CAAK,KAAA;EAAA,IACL,YAAA,CAAa,KAAA,EAAO,kBAAA;EAAA,IACpB,SAAA,CAAU,KAAA,EAAO,eAAA;EACrB,qBAAA;EACA,qBAAA;AAAA;AAAA,UAGe,sBAAA;EACf,aAAA;EACA,QAAA;EAzCA;EA2CA,SAAA;IAAc,IAAA;IAAc,IAAA;IAAc,IAAA;IAAc,IAAA;EAAA;EAzCvC;EA2CjB,eAAA;IAAoB,IAAA;IAAc,IAAA;IAAc,IAAA;IAAc,IAAA;EAAA;EAC9D,UAAA;EA3C0C;EA6C1C,gBAAA;EA5CA;EA8CA,SAAA;EA5CA;;;;EAiDA,eAAA;EAjDuD;EAmDvD,iBAAA,GAAoB,sBAAA;EAlDf;EAoDL,eAAA,GAAkB,eAAA;EApDS;EAsD3B,eAAA;EArDA;EAuDA,UAAA,GAAa,WAAA,SAAoB,WAAA;EAtDhB;EAwDjB,gBAAA,GAAmB,WAAA,SAAoB,WAAA;EAxDT;;;;EA6D9B,MAAA,EAAQ,SAAA;EA3DC;EA6DT,YAAA,IACE,KAAA,UACA,MAAA;IAEA,KAAA;IACA,MAAA;IACA,UAAA,CAAW,IAAA,SAAa,mBAAA;EAAA;EA9DxB;EAiEF,cAAA;EA/DE;EAiEF,KAAA,GAAQ,oBAAA;AAAA;AAAA,UAGO,oBAAA;EACf,UAAA;EACA,WAAA;EACA,sBAAA;EACA,uBAAA;AAAA"}
|
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
import { v as RenderDb } from "./render-db-BFQIspDB.js";
|
|
2
|
+
import { p as DrawList } from "./profile-CTN1Q5SI.js";
|
|
3
|
+
|
|
4
|
+
//#region src/types/blueprint.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Decoded model for the Factorio 2.x blueprint string format.
|
|
7
|
+
* Reference: https://wiki.factorio.com/Blueprint_string_format and the 2.1.11
|
|
8
|
+
* runtime docs (BlueprintEntity, BlueprintWire).
|
|
9
|
+
*
|
|
10
|
+
* Design rules:
|
|
11
|
+
* - Types are permissive: every object keeps an index signature so unknown or
|
|
12
|
+
* future fields survive a decode -> encode round trip byte-for-byte (after
|
|
13
|
+
* JSON canonicalization). The decoder must never drop fields it does not know.
|
|
14
|
+
* - Field names mirror the JSON exactly (snake_case).
|
|
15
|
+
*/
|
|
16
|
+
interface Color {
|
|
17
|
+
r: number;
|
|
18
|
+
g: number;
|
|
19
|
+
b: number;
|
|
20
|
+
a?: number;
|
|
21
|
+
}
|
|
22
|
+
interface Position {
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
}
|
|
26
|
+
/** A signal id used in icons, filters, and control behavior. */
|
|
27
|
+
interface SignalId {
|
|
28
|
+
name: string;
|
|
29
|
+
/** "item" (default), "fluid", "virtual", "entity", "recipe", "space-location", "asteroid-chunk", "quality" */
|
|
30
|
+
type?: string;
|
|
31
|
+
quality?: string;
|
|
32
|
+
[key: string]: unknown;
|
|
33
|
+
}
|
|
34
|
+
interface Icon {
|
|
35
|
+
signal: SignalId;
|
|
36
|
+
/** 1-based */
|
|
37
|
+
index: number;
|
|
38
|
+
[key: string]: unknown;
|
|
39
|
+
}
|
|
40
|
+
/** Item/signal filter shapes used by inventories, inserters, loaders, and splitters. */
|
|
41
|
+
interface BlueprintFilter {
|
|
42
|
+
index?: number;
|
|
43
|
+
name?: string;
|
|
44
|
+
quality?: string;
|
|
45
|
+
comparator?: string;
|
|
46
|
+
id?: SignalId;
|
|
47
|
+
value?: SignalId;
|
|
48
|
+
[key: string]: unknown;
|
|
49
|
+
}
|
|
50
|
+
/** One target stack for an item requested by a blueprint entity. */
|
|
51
|
+
interface BlueprintInventoryPosition {
|
|
52
|
+
inventory: number;
|
|
53
|
+
/** Zero-based stack index. */
|
|
54
|
+
stack: number;
|
|
55
|
+
/** Number of items requested for this stack; defaults to 1. */
|
|
56
|
+
count?: number;
|
|
57
|
+
[key: string]: unknown;
|
|
58
|
+
}
|
|
59
|
+
/** Inventory/equipment-grid destinations for a requested blueprint item. */
|
|
60
|
+
interface BlueprintItemInventoryPositions {
|
|
61
|
+
in_inventory?: BlueprintInventoryPosition[];
|
|
62
|
+
grid_count?: number;
|
|
63
|
+
[key: string]: unknown;
|
|
64
|
+
}
|
|
65
|
+
interface BlueprintInsertPlan {
|
|
66
|
+
id: SignalId;
|
|
67
|
+
items?: BlueprintItemInventoryPositions;
|
|
68
|
+
[key: string]: unknown;
|
|
69
|
+
}
|
|
70
|
+
interface BlueprintInventory {
|
|
71
|
+
filters?: BlueprintFilter[];
|
|
72
|
+
bar?: number;
|
|
73
|
+
[key: string]: unknown;
|
|
74
|
+
}
|
|
75
|
+
interface Tile {
|
|
76
|
+
name: string;
|
|
77
|
+
/** Top-left corner of the tile. */
|
|
78
|
+
position: Position;
|
|
79
|
+
[key: string]: unknown;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* A wire connection (2.0 top-level format):
|
|
83
|
+
* [source_entity_number, source_wire_connector_id, target_entity_number, target_wire_connector_id]
|
|
84
|
+
* Connector ids follow defines.wire_connector_id (see wire-connectors.ts).
|
|
85
|
+
*/
|
|
86
|
+
type BlueprintWire = [number, number, number, number];
|
|
87
|
+
/**
|
|
88
|
+
* Factorio 2.0 top-level rolling-stock coupling entry
|
|
89
|
+
* (`BlueprintRollingStockConnection`).
|
|
90
|
+
*/
|
|
91
|
+
interface BlueprintRollingStockConnection {
|
|
92
|
+
/** entity_number of this rolling-stock piece. */
|
|
93
|
+
stock: number;
|
|
94
|
+
/** entity_number of the stock coupled to this piece's front joint. */
|
|
95
|
+
front?: number;
|
|
96
|
+
/** entity_number of the stock coupled to this piece's back joint. */
|
|
97
|
+
back?: number;
|
|
98
|
+
}
|
|
99
|
+
interface BlueprintEntity {
|
|
100
|
+
entity_number: number;
|
|
101
|
+
name: string;
|
|
102
|
+
/** Entity center, tile units. */
|
|
103
|
+
position: Position;
|
|
104
|
+
/** 16-way direction (0 = N, 4 = E, 8 = S, 12 = W). Absent means 0. */
|
|
105
|
+
direction?: number;
|
|
106
|
+
/** 2.0: flipped entity (splitters/refineries etc. in mirrored blueprints). */
|
|
107
|
+
mirror?: boolean;
|
|
108
|
+
quality?: string;
|
|
109
|
+
/** Rolling stock / some rails: continuous orientation in [0, 1). */
|
|
110
|
+
orientation?: number;
|
|
111
|
+
/** Rolling stock / train-stop paint color (0–1 channels; some exports use 0–255). */
|
|
112
|
+
color?: Color;
|
|
113
|
+
recipe?: string;
|
|
114
|
+
recipe_quality?: string;
|
|
115
|
+
/** "input" | "output" for underground belts and loaders. */
|
|
116
|
+
type?: string;
|
|
117
|
+
/** Item requests (2.0 insert plans with inventory positions and/or equipment-grid count). */
|
|
118
|
+
items?: BlueprintInsertPlan[];
|
|
119
|
+
bar?: number;
|
|
120
|
+
filters?: BlueprintFilter[];
|
|
121
|
+
/** Inserter filter mode may be enabled even when no static filter is selected. */
|
|
122
|
+
use_filters?: boolean;
|
|
123
|
+
filter?: BlueprintFilter;
|
|
124
|
+
filter_mode?: "whitelist" | "blacklist";
|
|
125
|
+
input_priority?: "left" | "right" | "none";
|
|
126
|
+
output_priority?: "left" | "right" | "none";
|
|
127
|
+
"priority-list"?: BlueprintFilter[];
|
|
128
|
+
"chunk-filter"?: BlueprintFilter[];
|
|
129
|
+
fluid_filter?: string;
|
|
130
|
+
request_filters?: Record<string, unknown>;
|
|
131
|
+
inventory?: BlueprintInventory;
|
|
132
|
+
trunk_inventory?: BlueprintInventory;
|
|
133
|
+
ammo_inventory?: BlueprintInventory;
|
|
134
|
+
burner_fuel_inventory?: BlueprintInventory;
|
|
135
|
+
"result-inventory"?: BlueprintInventory;
|
|
136
|
+
icon?: SignalId;
|
|
137
|
+
control_behavior?: Record<string, unknown>;
|
|
138
|
+
tags?: Record<string, unknown>;
|
|
139
|
+
[key: string]: unknown;
|
|
140
|
+
}
|
|
141
|
+
interface Blueprint {
|
|
142
|
+
item: "blueprint";
|
|
143
|
+
label?: string;
|
|
144
|
+
label_color?: Color;
|
|
145
|
+
description?: string;
|
|
146
|
+
icons?: Icon[];
|
|
147
|
+
entities?: BlueprintEntity[];
|
|
148
|
+
tiles?: Tile[];
|
|
149
|
+
wires?: BlueprintWire[];
|
|
150
|
+
schedules?: unknown[];
|
|
151
|
+
/**
|
|
152
|
+
* Factorio 2.0 rolling-stock coupling graph.
|
|
153
|
+
* Each entry: which wagon (`stock`) and optional front/back neighbors by entity_number.
|
|
154
|
+
*/
|
|
155
|
+
stock_connections?: BlueprintRollingStockConnection[];
|
|
156
|
+
parameters?: unknown[];
|
|
157
|
+
/** Encoded game version (major<<48 | minor<<32 | patch<<16). Fits in a JS number. */
|
|
158
|
+
version: number;
|
|
159
|
+
"snap-to-grid"?: Position;
|
|
160
|
+
"absolute-snapping"?: boolean;
|
|
161
|
+
"position-relative-to-grid"?: Position;
|
|
162
|
+
[key: string]: unknown;
|
|
163
|
+
}
|
|
164
|
+
/** Book-slot wrappers: exactly one content key is present (unknown fields preserved). */
|
|
165
|
+
type BlueprintBookEntry = {
|
|
166
|
+
/** 0-based slot index. */index: number;
|
|
167
|
+
[key: string]: unknown;
|
|
168
|
+
} & ({
|
|
169
|
+
blueprint: Blueprint;
|
|
170
|
+
blueprint_book?: never;
|
|
171
|
+
upgrade_planner?: never;
|
|
172
|
+
deconstruction_planner?: never;
|
|
173
|
+
} | {
|
|
174
|
+
blueprint_book: BlueprintBook;
|
|
175
|
+
blueprint?: never;
|
|
176
|
+
upgrade_planner?: never;
|
|
177
|
+
deconstruction_planner?: never;
|
|
178
|
+
} | {
|
|
179
|
+
upgrade_planner: Record<string, unknown>;
|
|
180
|
+
blueprint?: never;
|
|
181
|
+
blueprint_book?: never;
|
|
182
|
+
deconstruction_planner?: never;
|
|
183
|
+
} | {
|
|
184
|
+
deconstruction_planner: Record<string, unknown>;
|
|
185
|
+
blueprint?: never;
|
|
186
|
+
blueprint_book?: never;
|
|
187
|
+
upgrade_planner?: never;
|
|
188
|
+
});
|
|
189
|
+
interface BlueprintBook {
|
|
190
|
+
item: "blueprint-book";
|
|
191
|
+
label?: string;
|
|
192
|
+
label_color?: Color;
|
|
193
|
+
description?: string;
|
|
194
|
+
icons?: Icon[];
|
|
195
|
+
blueprints?: BlueprintBookEntry[];
|
|
196
|
+
active_index?: number;
|
|
197
|
+
version: number;
|
|
198
|
+
[key: string]: unknown;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Top-level decoded document: exactly one wrapper key is present.
|
|
202
|
+
* Unknown extra fields are preserved for encode round-trips.
|
|
203
|
+
*/
|
|
204
|
+
type BlueprintDocument = {
|
|
205
|
+
[key: string]: unknown;
|
|
206
|
+
} & ({
|
|
207
|
+
blueprint: Blueprint;
|
|
208
|
+
blueprint_book?: never;
|
|
209
|
+
upgrade_planner?: never;
|
|
210
|
+
deconstruction_planner?: never;
|
|
211
|
+
} | {
|
|
212
|
+
blueprint_book: BlueprintBook;
|
|
213
|
+
blueprint?: never;
|
|
214
|
+
upgrade_planner?: never;
|
|
215
|
+
deconstruction_planner?: never;
|
|
216
|
+
} | {
|
|
217
|
+
upgrade_planner: Record<string, unknown>;
|
|
218
|
+
blueprint?: never;
|
|
219
|
+
blueprint_book?: never;
|
|
220
|
+
deconstruction_planner?: never;
|
|
221
|
+
} | {
|
|
222
|
+
deconstruction_planner: Record<string, unknown>;
|
|
223
|
+
blueprint?: never;
|
|
224
|
+
blueprint_book?: never;
|
|
225
|
+
upgrade_planner?: never;
|
|
226
|
+
});
|
|
227
|
+
/** Flattened reference to a renderable blueprint inside a (possibly nested) book. */
|
|
228
|
+
interface BlueprintRef {
|
|
229
|
+
/** Book-entry index path from the root; [] when the root is a bare blueprint. */
|
|
230
|
+
path: number[];
|
|
231
|
+
label?: string;
|
|
232
|
+
/** Nesting depth (0 = root). */
|
|
233
|
+
depth: number;
|
|
234
|
+
}
|
|
235
|
+
declare function decodeVersion(v: number): {
|
|
236
|
+
major: number;
|
|
237
|
+
minor: number;
|
|
238
|
+
patch: number;
|
|
239
|
+
};
|
|
240
|
+
//#endregion
|
|
241
|
+
//#region src/upgrade-planner.d.ts
|
|
242
|
+
/** Factorio upgrade planner filter window has 24 entity slot pairs. */
|
|
243
|
+
declare const UPGRADE_PLANNER_SLOT_COUNT = 24;
|
|
244
|
+
/** Source side of an upgrade mapper (`UpgradeMapperSource`). */
|
|
245
|
+
interface UpgradeMapperSource {
|
|
246
|
+
type?: string;
|
|
247
|
+
name?: string;
|
|
248
|
+
quality?: string;
|
|
249
|
+
comparator?: string;
|
|
250
|
+
[key: string]: unknown;
|
|
251
|
+
}
|
|
252
|
+
/** Destination side of an upgrade mapper (`UpgradeMapperDestination`). */
|
|
253
|
+
interface UpgradeMapperDestination {
|
|
254
|
+
type?: string;
|
|
255
|
+
name?: string;
|
|
256
|
+
quality?: string;
|
|
257
|
+
module_limit?: number;
|
|
258
|
+
module_slots?: unknown[];
|
|
259
|
+
[key: string]: unknown;
|
|
260
|
+
}
|
|
261
|
+
interface UpgradeMapper {
|
|
262
|
+
index: number;
|
|
263
|
+
from?: UpgradeMapperSource;
|
|
264
|
+
to?: UpgradeMapperDestination;
|
|
265
|
+
[key: string]: unknown;
|
|
266
|
+
}
|
|
267
|
+
interface UpgradePlanner {
|
|
268
|
+
item?: string;
|
|
269
|
+
label?: string;
|
|
270
|
+
label_color?: Color;
|
|
271
|
+
description?: string;
|
|
272
|
+
icons?: Icon[];
|
|
273
|
+
version?: number;
|
|
274
|
+
settings?: {
|
|
275
|
+
mappers?: UpgradeMapper[];
|
|
276
|
+
[key: string]: unknown;
|
|
277
|
+
};
|
|
278
|
+
[key: string]: unknown;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Expand `settings.mappers` into a fixed-length slot array keyed by `mapper.index`.
|
|
282
|
+
* Out-of-range indices are ignored. Duplicate indices keep the last mapper.
|
|
283
|
+
*/
|
|
284
|
+
declare function upgradePlannerMappers(planner: Record<string, unknown> | UpgradePlanner): (UpgradeMapper | undefined)[];
|
|
285
|
+
/**
|
|
286
|
+
* Icons for the upgrade-planner inventory thumbnail.
|
|
287
|
+
* Prefers an explicit `icons` field; otherwise uses the `to` side of the first
|
|
288
|
+
* four filled mapper pairs (Factorio GUI behavior).
|
|
289
|
+
*/
|
|
290
|
+
declare function upgradePlannerIcons(planner: Record<string, unknown> | UpgradePlanner): Icon[];
|
|
291
|
+
/** Read a typed upgrade planner view from an opaque document payload. */
|
|
292
|
+
declare function asUpgradePlanner(planner: Record<string, unknown> | UpgradePlanner): UpgradePlanner;
|
|
293
|
+
//#endregion
|
|
294
|
+
//#region src/deconstruction-planner.d.ts
|
|
295
|
+
/** Factorio default entity filter slot count on the deconstruction planner. */
|
|
296
|
+
declare const DECONSTRUCTION_ENTITY_FILTER_SLOT_COUNT = 30;
|
|
297
|
+
/** Factorio default tile filter slot count on the deconstruction planner. */
|
|
298
|
+
declare const DECONSTRUCTION_TILE_FILTER_SLOT_COUNT = 30;
|
|
299
|
+
/** `defines.deconstruction_item.entity_filter_mode` / `tile_filter_mode`. */
|
|
300
|
+
type DeconstructionFilterMode = "whitelist" | "blacklist";
|
|
301
|
+
/** `defines.deconstruction_item.tile_selection_mode`. */
|
|
302
|
+
type DeconstructionTileSelectionMode = "normal" | "always" | "never" | "only";
|
|
303
|
+
interface DeconstructionEntityFilter {
|
|
304
|
+
index: number;
|
|
305
|
+
name?: string;
|
|
306
|
+
type?: string;
|
|
307
|
+
quality?: string;
|
|
308
|
+
comparator?: string;
|
|
309
|
+
[key: string]: unknown;
|
|
310
|
+
}
|
|
311
|
+
interface DeconstructionTileFilter {
|
|
312
|
+
index: number;
|
|
313
|
+
name?: string;
|
|
314
|
+
[key: string]: unknown;
|
|
315
|
+
}
|
|
316
|
+
interface DeconstructionPlannerSettings {
|
|
317
|
+
entity_filters?: DeconstructionEntityFilter[];
|
|
318
|
+
tile_filters?: DeconstructionTileFilter[];
|
|
319
|
+
/** 0 whitelist, 1 blacklist (Factorio enum). */
|
|
320
|
+
entity_filter_mode?: number;
|
|
321
|
+
/** 0 whitelist, 1 blacklist (Factorio enum). */
|
|
322
|
+
tile_filter_mode?: number;
|
|
323
|
+
/** 0 normal, 1 always, 2 never, 3 only (Factorio enum). */
|
|
324
|
+
tile_selection_mode?: number;
|
|
325
|
+
trees_and_rocks_only?: boolean;
|
|
326
|
+
[key: string]: unknown;
|
|
327
|
+
}
|
|
328
|
+
interface DeconstructionPlanner {
|
|
329
|
+
item?: string;
|
|
330
|
+
label?: string;
|
|
331
|
+
label_color?: Color;
|
|
332
|
+
description?: string;
|
|
333
|
+
icons?: Icon[];
|
|
334
|
+
version?: number;
|
|
335
|
+
settings?: DeconstructionPlannerSettings;
|
|
336
|
+
[key: string]: unknown;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Expand `settings.entity_filters` into a fixed-length slot array keyed by `index`.
|
|
340
|
+
* Out-of-range indices are ignored. Duplicate indices keep the last filter.
|
|
341
|
+
*/
|
|
342
|
+
declare function deconstructionEntityFilters(planner: Record<string, unknown> | DeconstructionPlanner): (DeconstructionEntityFilter | undefined)[];
|
|
343
|
+
/**
|
|
344
|
+
* Expand `settings.tile_filters` into a fixed-length slot array keyed by `index`.
|
|
345
|
+
* Out-of-range indices are ignored. Duplicate indices keep the last filter.
|
|
346
|
+
*/
|
|
347
|
+
declare function deconstructionTileFilters(planner: Record<string, unknown> | DeconstructionPlanner): (DeconstructionTileFilter | undefined)[];
|
|
348
|
+
declare function deconstructionEntityFilterMode(planner: Record<string, unknown> | DeconstructionPlanner): DeconstructionFilterMode;
|
|
349
|
+
declare function deconstructionTileFilterMode(planner: Record<string, unknown> | DeconstructionPlanner): DeconstructionFilterMode;
|
|
350
|
+
declare function deconstructionTileSelectionMode(planner: Record<string, unknown> | DeconstructionPlanner): DeconstructionTileSelectionMode;
|
|
351
|
+
declare function deconstructionTreesAndRocksOnly(planner: Record<string, unknown> | DeconstructionPlanner): boolean;
|
|
352
|
+
declare function formatDeconstructionFilterMode(mode: DeconstructionFilterMode): string;
|
|
353
|
+
declare function formatDeconstructionTileSelectionMode(mode: DeconstructionTileSelectionMode): string;
|
|
354
|
+
/**
|
|
355
|
+
* Icons for the deconstruction-planner inventory thumbnail.
|
|
356
|
+
* Prefers an explicit `icons` field; `trees_and_rocks_only` uses tree-01;
|
|
357
|
+
* otherwise uses the first filled entity filters then tile filters (max 4).
|
|
358
|
+
*/
|
|
359
|
+
declare function deconstructionPlannerIcons(planner: Record<string, unknown> | DeconstructionPlanner): Icon[];
|
|
360
|
+
/** Read a typed deconstruction planner view from an opaque document payload. */
|
|
361
|
+
declare function asDeconstructionPlanner(planner: Record<string, unknown> | DeconstructionPlanner): DeconstructionPlanner;
|
|
362
|
+
//#endregion
|
|
363
|
+
//#region src/plan/deconstruction-planner.d.ts
|
|
364
|
+
/** Columns in the Factorio-style deconstruction planner filter grids. */
|
|
365
|
+
declare const DECONSTRUCTION_PLANNER_COLUMNS = 12;
|
|
366
|
+
/**
|
|
367
|
+
* Plan a Factorio-style deconstruction planner window as a draw list.
|
|
368
|
+
* Empty entity/tile sections are omitted. `trees_and_rocks_only` renders a
|
|
369
|
+
* single tree icon + label (no filter grids). Icon centers snap to the tile grid.
|
|
370
|
+
*/
|
|
371
|
+
declare function planDeconstructionPlannerDrawList(planner: Record<string, unknown> | DeconstructionPlanner, db: RenderDb): DrawList;
|
|
372
|
+
//#endregion
|
|
373
|
+
//#region src/plan/upgrade-planner.d.ts
|
|
374
|
+
/** Columns in the Factorio upgrade planner filter window. */
|
|
375
|
+
declare const UPGRADE_PLANNER_COLUMNS = 4;
|
|
376
|
+
/**
|
|
377
|
+
* Plan a Factorio-style upgrade planner filter window as a draw list:
|
|
378
|
+
* filled slots as from → right-arrow → to on a 1×1 tile grid (4 columns),
|
|
379
|
+
* with 1-tile gaps between pairs and 1-tile outer padding.
|
|
380
|
+
* Height covers only rows up to the last occupied mapper index.
|
|
381
|
+
*/
|
|
382
|
+
declare function planUpgradePlannerDrawList(planner: Record<string, unknown> | UpgradePlanner, db: RenderDb): DrawList;
|
|
383
|
+
//#endregion
|
|
384
|
+
export { upgradePlannerMappers as A, BlueprintItemInventoryPositions as B, UPGRADE_PLANNER_SLOT_COUNT as C, UpgradePlanner as D, UpgradeMapperSource as E, BlueprintEntity as F, Icon as G, BlueprintRollingStockConnection as H, BlueprintFilter as I, Tile as J, Position as K, BlueprintInsertPlan as L, BlueprintBook as M, BlueprintBookEntry as N, asUpgradePlanner as O, BlueprintDocument as P, BlueprintInventory as R, formatDeconstructionTileSelectionMode as S, UpgradeMapperDestination as T, BlueprintWire as U, BlueprintRef as V, Color as W, decodeVersion as Y, deconstructionTileFilterMode as _, DECONSTRUCTION_ENTITY_FILTER_SLOT_COUNT as a, deconstructionTreesAndRocksOnly as b, DeconstructionFilterMode as c, DeconstructionTileFilter as d, DeconstructionTileSelectionMode as f, deconstructionPlannerIcons as g, deconstructionEntityFilters as h, planDeconstructionPlannerDrawList as i, Blueprint as j, upgradePlannerIcons as k, DeconstructionPlanner as l, deconstructionEntityFilterMode as m, planUpgradePlannerDrawList as n, DECONSTRUCTION_TILE_FILTER_SLOT_COUNT as o, asDeconstructionPlanner as p, SignalId as q, DECONSTRUCTION_PLANNER_COLUMNS as r, DeconstructionEntityFilter as s, UPGRADE_PLANNER_COLUMNS as t, DeconstructionPlannerSettings as u, deconstructionTileFilters as v, UpgradeMapper as w, formatDeconstructionFilterMode as x, deconstructionTileSelectionMode as y, BlueprintInventoryPosition as z };
|
|
385
|
+
//# sourceMappingURL=upgrade-planner-CNjnMHPJ.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upgrade-planner-CNjnMHPJ.d.ts","names":[],"sources":["../src/types/blueprint.ts","../src/upgrade-planner.ts","../src/deconstruction-planner.ts","../src/plan/deconstruction-planner.ts","../src/plan/upgrade-planner.ts"],"mappings":";;;;;;;;AAYA;;;;;;;UAAiB,KAAA;EACf,CAAA;EACA,CAAA;EACA,CAAA;EACA,CAAA;AAAA;AAAA,UAGe,QAAA;EACf,CAAA;EACA,CAA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"}
|
package/package.json
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rickyzhangca/fpsr",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Headless Factorio 2.1.11 blueprint string renderer for browser and Node.js",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"blueprint",
|
|
7
|
+
"canvas",
|
|
8
|
+
"factorio",
|
|
9
|
+
"renderer",
|
|
10
|
+
"typescript"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://github.com/rickyzhangca/fpsr#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/rickyzhangca/fpsr/issues"
|
|
15
|
+
},
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"author": "Ricky Zhang",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "https://github.com/rickyzhangca/fpsr.git",
|
|
21
|
+
"directory": "packages/renderer"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist",
|
|
25
|
+
"CHANGELOG.md",
|
|
26
|
+
"LICENSE",
|
|
27
|
+
"README.md"
|
|
28
|
+
],
|
|
29
|
+
"type": "module",
|
|
30
|
+
"sideEffects": false,
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"import": "./dist/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./planner": {
|
|
37
|
+
"types": "./dist/planner.d.ts",
|
|
38
|
+
"import": "./dist/planner.js"
|
|
39
|
+
},
|
|
40
|
+
"./canvas": {
|
|
41
|
+
"types": "./dist/canvas.d.ts",
|
|
42
|
+
"import": "./dist/canvas.js"
|
|
43
|
+
},
|
|
44
|
+
"./render-db": {
|
|
45
|
+
"types": "./dist/render-db.d.ts",
|
|
46
|
+
"import": "./dist/render-db.js"
|
|
47
|
+
},
|
|
48
|
+
"./node": {
|
|
49
|
+
"types": "./dist/node.d.ts",
|
|
50
|
+
"import": "./dist/node.js"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"publishConfig": {
|
|
54
|
+
"access": "public"
|
|
55
|
+
},
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"fflate": "^0.8.2"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@types/node": "22.20.1",
|
|
61
|
+
"tsx": "4.23.0",
|
|
62
|
+
"typescript": "5.9.3",
|
|
63
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@0.2.4",
|
|
64
|
+
"vite-plus": "0.2.4"
|
|
65
|
+
},
|
|
66
|
+
"peerDependencies": {
|
|
67
|
+
"skia-canvas": "^2.0.0"
|
|
68
|
+
},
|
|
69
|
+
"peerDependenciesMeta": {
|
|
70
|
+
"skia-canvas": {
|
|
71
|
+
"optional": true
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"engines": {
|
|
75
|
+
"node": ">=20"
|
|
76
|
+
},
|
|
77
|
+
"scripts": {
|
|
78
|
+
"build": "vp pack",
|
|
79
|
+
"test": "vp test run",
|
|
80
|
+
"lint": "vp lint",
|
|
81
|
+
"typecheck": "tsc --noEmit && tsc -p tsconfig.test.json --noEmit",
|
|
82
|
+
"typecheck:node-decls": "tsc -p tsconfig.node-decls.json --noEmit",
|
|
83
|
+
"format": "vp fmt",
|
|
84
|
+
"fixtures": "tsx scripts/make-fixtures.ts"
|
|
85
|
+
}
|
|
86
|
+
}
|