pixelkiln 0.144.2 → 0.145.0
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/dist/cli.js +191 -22
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +31 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +349 -4
- package/dist/index.d.ts +349 -4
- package/dist/index.js +29 -1
- package/dist/index.js.map +1 -1
- package/docs/CLI.md +5 -2
- package/docs/MANIFEST.md +4 -2
- package/docs/PARALLAX.md +52 -17
- package/docs/RESEARCH_PARALLAX.md +3 -2
- package/package.json +1 -1
- package/schema/manifest.schema.json +35 -0
- package/skills/pixelkiln/references/parallax.md +7 -3
package/dist/index.cjs
CHANGED
|
@@ -141,6 +141,8 @@ __export(index_exports, {
|
|
|
141
141
|
ParallaxRunSpriteSchema: () => ParallaxRunSpriteSchema,
|
|
142
142
|
ParallaxSetIdSchema: () => ParallaxSetIdSchema,
|
|
143
143
|
ParallaxSetSchema: () => ParallaxSetSchema,
|
|
144
|
+
ParallaxTimeIdSchema: () => ParallaxTimeIdSchema,
|
|
145
|
+
ParallaxTimeSchema: () => ParallaxTimeSchema,
|
|
144
146
|
ParallaxTintSchema: () => ParallaxTintSchema,
|
|
145
147
|
PixelKilnError: () => PixelKilnError,
|
|
146
148
|
PixelLabClient: () => PixelLabClient,
|
|
@@ -2366,6 +2368,13 @@ var ParallaxLayerSchema = import_zod.z.object({
|
|
|
2366
2368
|
ctx.addIssue({ code: import_zod.z.ZodIssueCode.custom, path: ["extend"], message: "extend repeats the bottom row, which foot thins out; use one or the other" });
|
|
2367
2369
|
}
|
|
2368
2370
|
});
|
|
2371
|
+
var ParallaxTimeSchema = import_zod.z.object({
|
|
2372
|
+
/** A style id, for that style's palette, or a list of colours. */
|
|
2373
|
+
palette: import_zod.z.union([import_zod.z.string().min(1), import_zod.z.array(HexColorSchema).min(2).max(256)]),
|
|
2374
|
+
/** Map only onto colours whose blue is at least their red, which leaves out a night palette's lamps and moon. */
|
|
2375
|
+
cool: import_zod.z.boolean().optional()
|
|
2376
|
+
}).strict();
|
|
2377
|
+
var ParallaxTimeIdSchema = import_zod.z.string().regex(/^[A-Za-z][A-Za-z0-9_-]{0,31}$/, "a time is letters, digits, - and _, starting with a letter");
|
|
2369
2378
|
var ParallaxSetSchema = import_zod.z.object({
|
|
2370
2379
|
/** The game's view in pixels, [width, height]. */
|
|
2371
2380
|
view: import_zod.z.tuple([import_zod.z.number().int().min(8).max(4096), import_zod.z.number().int().min(8).max(4096)]),
|
|
@@ -2379,8 +2388,21 @@ var ParallaxSetSchema = import_zod.z.object({
|
|
|
2379
2388
|
* the picture, so it adds none.
|
|
2380
2389
|
*/
|
|
2381
2390
|
palette: import_zod.z.union([import_zod.z.string().min(1), import_zod.z.array(HexColorSchema).min(2).max(256)]).optional(),
|
|
2391
|
+
/**
|
|
2392
|
+
* Other times of day for the same set, by name: each swaps the set's
|
|
2393
|
+
* `palette` for another by luminance rank. Godot exports carry them in
|
|
2394
|
+
* one shader; Tiled and LDtk get a map per time.
|
|
2395
|
+
*/
|
|
2396
|
+
times: import_zod.z.record(ParallaxTimeIdSchema, ParallaxTimeSchema).optional(),
|
|
2382
2397
|
layers: import_zod.z.array(ParallaxLayerSchema).min(1).max(32)
|
|
2383
|
-
}).strict()
|
|
2398
|
+
}).strict().superRefine((set, ctx) => {
|
|
2399
|
+
if (set.times && Object.keys(set.times).length && set.palette === void 0) {
|
|
2400
|
+
ctx.addIssue({ code: import_zod.z.ZodIssueCode.custom, path: ["times"], message: "times swap the set's palette, so the set needs a palette" });
|
|
2401
|
+
}
|
|
2402
|
+
if (set.times && Object.keys(set.times).length > 15) {
|
|
2403
|
+
ctx.addIssue({ code: import_zod.z.ZodIssueCode.custom, path: ["times"], message: "at most 15 times" });
|
|
2404
|
+
}
|
|
2405
|
+
});
|
|
2384
2406
|
var ParallaxSetIdSchema = import_zod.z.string().regex(/^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/, "a set id is letters, digits, - and _, starting with a letter or digit");
|
|
2385
2407
|
var ManifestSchema = import_zod.z.object({
|
|
2386
2408
|
$schema: import_zod.z.string().optional(),
|
|
@@ -14365,6 +14387,12 @@ ${issues}`);
|
|
|
14365
14387
|
if (!style) unknownReferences.push(`parallax.${setId}.palette: unknown style "${set.palette}"`);
|
|
14366
14388
|
else if (style.palette.length < 2) unknownReferences.push(`parallax.${setId}.palette: style "${set.palette}" has no palette`);
|
|
14367
14389
|
}
|
|
14390
|
+
for (const [time, spec] of Object.entries(set.times ?? {})) {
|
|
14391
|
+
if (typeof spec.palette !== "string") continue;
|
|
14392
|
+
const style = parsed.data.styles[spec.palette];
|
|
14393
|
+
if (!style) unknownReferences.push(`parallax.${setId}.times.${time}.palette: unknown style "${spec.palette}"`);
|
|
14394
|
+
else if (style.palette.length < 2) unknownReferences.push(`parallax.${setId}.times.${time}.palette: style "${spec.palette}" has no palette`);
|
|
14395
|
+
}
|
|
14368
14396
|
set.layers.forEach((layer, index) => {
|
|
14369
14397
|
const at2 = `parallax.${setId}.layers.${index}`;
|
|
14370
14398
|
const checkAsset = (where, ref) => {
|
|
@@ -30904,6 +30932,8 @@ async function workspaceStatus(ws, dir) {
|
|
|
30904
30932
|
ParallaxRunSpriteSchema,
|
|
30905
30933
|
ParallaxSetIdSchema,
|
|
30906
30934
|
ParallaxSetSchema,
|
|
30935
|
+
ParallaxTimeIdSchema,
|
|
30936
|
+
ParallaxTimeSchema,
|
|
30907
30937
|
ParallaxTintSchema,
|
|
30908
30938
|
PixelKilnError,
|
|
30909
30939
|
PixelLabClient,
|