pixelkiln 0.77.0 → 0.79.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/index.d.cts CHANGED
@@ -18121,6 +18121,12 @@ interface GalleryItem {
18121
18121
  providerMetadata: Record<string, unknown>;
18122
18122
  /** Post-processing recorded on the entry: the palette its files were snapped to, if any. */
18123
18123
  postprocess: Postprocess | null;
18124
+ /**
18125
+ * The manifest id an edit to this asset goes to: its own id, or the loop
18126
+ * shorthand (`animation.directions`) it was expanded from; null when the
18127
+ * manifest no longer declares it.
18128
+ */
18129
+ declaredAs: string | null;
18124
18130
  /** Manifest asset as declared, for the "intent" side of the record. */
18125
18131
  asset: Asset | null;
18126
18132
  /** Manifest-relative committed art placed instead of generated output. */
@@ -18891,6 +18897,11 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
18891
18897
  height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
18892
18898
  size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
18893
18899
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
18900
+ /**
18901
+ * A loop shorthand's `animation.directions`, replaced whole: each named
18902
+ * direction is drawn, and each one's flip comes free as a mirror.
18903
+ */
18904
+ loopDirections: z.ZodOptional<z.ZodArray<z.ZodEnum<["south", "south-east", "east", "north-east", "north", "north-west", "west", "south-west"]>, "many">>;
18894
18905
  }, "strict", z.ZodTypeAny, {
18895
18906
  width?: number | null | undefined;
18896
18907
  height?: number | null | undefined;
@@ -18902,6 +18913,7 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
18902
18913
  prompt: string | null;
18903
18914
  styleId: string;
18904
18915
  } | undefined;
18916
+ loopDirections?: ("south" | "south-east" | "east" | "north-east" | "north" | "north-west" | "west" | "south-west")[] | undefined;
18905
18917
  }, {
18906
18918
  width?: number | null | undefined;
18907
18919
  height?: number | null | undefined;
@@ -18913,6 +18925,7 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
18913
18925
  prompt: string | null;
18914
18926
  styleId: string;
18915
18927
  } | undefined;
18928
+ loopDirections?: ("south" | "south-east" | "east" | "north-east" | "north" | "north-west" | "west" | "south-west")[] | undefined;
18916
18929
  }>;
18917
18930
  } & {
18918
18931
  /** Workspace project id; omitted for a single-project gallery. */
@@ -18933,6 +18946,7 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
18933
18946
  prompt: string | null;
18934
18947
  styleId: string;
18935
18948
  } | undefined;
18949
+ loopDirections?: ("south" | "south-east" | "east" | "north-east" | "north" | "north-west" | "west" | "south-west")[] | undefined;
18936
18950
  };
18937
18951
  expectedSha256: string;
18938
18952
  project?: string | undefined;
@@ -18950,6 +18964,7 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
18950
18964
  prompt: string | null;
18951
18965
  styleId: string;
18952
18966
  } | undefined;
18967
+ loopDirections?: ("south" | "south-east" | "east" | "north-east" | "north" | "north-west" | "west" | "south-west")[] | undefined;
18953
18968
  };
18954
18969
  expectedSha256: string;
18955
18970
  project?: string | undefined;
@@ -19911,6 +19926,11 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
19911
19926
  height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
19912
19927
  size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
19913
19928
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
19929
+ /**
19930
+ * A loop shorthand's `animation.directions`, replaced whole: each named
19931
+ * direction is drawn, and each one's flip comes free as a mirror.
19932
+ */
19933
+ loopDirections: z.ZodOptional<z.ZodArray<z.ZodEnum<["south", "south-east", "east", "north-east", "north", "north-west", "west", "south-west"]>, "many">>;
19914
19934
  }, "strict", z.ZodTypeAny, {
19915
19935
  width?: number | null | undefined;
19916
19936
  height?: number | null | undefined;
@@ -19922,6 +19942,7 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
19922
19942
  prompt: string | null;
19923
19943
  styleId: string;
19924
19944
  } | undefined;
19945
+ loopDirections?: ("south" | "south-east" | "east" | "north-east" | "north" | "north-west" | "west" | "south-west")[] | undefined;
19925
19946
  }, {
19926
19947
  width?: number | null | undefined;
19927
19948
  height?: number | null | undefined;
@@ -19933,6 +19954,7 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
19933
19954
  prompt: string | null;
19934
19955
  styleId: string;
19935
19956
  } | undefined;
19957
+ loopDirections?: ("south" | "south-east" | "east" | "north-east" | "north" | "north-west" | "west" | "south-west")[] | undefined;
19936
19958
  }>;
19937
19959
  }, "strict", z.ZodTypeAny, {
19938
19960
  assetId: string;
@@ -19948,6 +19970,7 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
19948
19970
  prompt: string | null;
19949
19971
  styleId: string;
19950
19972
  } | undefined;
19973
+ loopDirections?: ("south" | "south-east" | "east" | "north-east" | "north" | "north-west" | "west" | "south-west")[] | undefined;
19951
19974
  };
19952
19975
  }, {
19953
19976
  assetId: string;
@@ -19963,6 +19986,7 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
19963
19986
  prompt: string | null;
19964
19987
  styleId: string;
19965
19988
  } | undefined;
19989
+ loopDirections?: ("south" | "south-east" | "east" | "north-east" | "north" | "north-west" | "west" | "south-west")[] | undefined;
19966
19990
  };
19967
19991
  }>, z.ZodObject<{
19968
19992
  action: z.ZodLiteral<"add-asset">;
@@ -20878,6 +20902,7 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
20878
20902
  prompt: string | null;
20879
20903
  styleId: string;
20880
20904
  } | undefined;
20905
+ loopDirections?: ("south" | "south-east" | "east" | "north-east" | "north" | "north-west" | "west" | "south-west")[] | undefined;
20881
20906
  };
20882
20907
  } | {
20883
20908
  assetId: string;
@@ -21007,6 +21032,7 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
21007
21032
  prompt: string | null;
21008
21033
  styleId: string;
21009
21034
  } | undefined;
21035
+ loopDirections?: ("south" | "south-east" | "east" | "north-east" | "north" | "north-west" | "west" | "south-west")[] | undefined;
21010
21036
  };
21011
21037
  } | {
21012
21038
  assetId: string;
package/dist/index.d.ts CHANGED
@@ -18121,6 +18121,12 @@ interface GalleryItem {
18121
18121
  providerMetadata: Record<string, unknown>;
18122
18122
  /** Post-processing recorded on the entry: the palette its files were snapped to, if any. */
18123
18123
  postprocess: Postprocess | null;
18124
+ /**
18125
+ * The manifest id an edit to this asset goes to: its own id, or the loop
18126
+ * shorthand (`animation.directions`) it was expanded from; null when the
18127
+ * manifest no longer declares it.
18128
+ */
18129
+ declaredAs: string | null;
18124
18130
  /** Manifest asset as declared, for the "intent" side of the record. */
18125
18131
  asset: Asset | null;
18126
18132
  /** Manifest-relative committed art placed instead of generated output. */
@@ -18891,6 +18897,11 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
18891
18897
  height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
18892
18898
  size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
18893
18899
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
18900
+ /**
18901
+ * A loop shorthand's `animation.directions`, replaced whole: each named
18902
+ * direction is drawn, and each one's flip comes free as a mirror.
18903
+ */
18904
+ loopDirections: z.ZodOptional<z.ZodArray<z.ZodEnum<["south", "south-east", "east", "north-east", "north", "north-west", "west", "south-west"]>, "many">>;
18894
18905
  }, "strict", z.ZodTypeAny, {
18895
18906
  width?: number | null | undefined;
18896
18907
  height?: number | null | undefined;
@@ -18902,6 +18913,7 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
18902
18913
  prompt: string | null;
18903
18914
  styleId: string;
18904
18915
  } | undefined;
18916
+ loopDirections?: ("south" | "south-east" | "east" | "north-east" | "north" | "north-west" | "west" | "south-west")[] | undefined;
18905
18917
  }, {
18906
18918
  width?: number | null | undefined;
18907
18919
  height?: number | null | undefined;
@@ -18913,6 +18925,7 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
18913
18925
  prompt: string | null;
18914
18926
  styleId: string;
18915
18927
  } | undefined;
18928
+ loopDirections?: ("south" | "south-east" | "east" | "north-east" | "north" | "north-west" | "west" | "south-west")[] | undefined;
18916
18929
  }>;
18917
18930
  } & {
18918
18931
  /** Workspace project id; omitted for a single-project gallery. */
@@ -18933,6 +18946,7 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
18933
18946
  prompt: string | null;
18934
18947
  styleId: string;
18935
18948
  } | undefined;
18949
+ loopDirections?: ("south" | "south-east" | "east" | "north-east" | "north" | "north-west" | "west" | "south-west")[] | undefined;
18936
18950
  };
18937
18951
  expectedSha256: string;
18938
18952
  project?: string | undefined;
@@ -18950,6 +18964,7 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
18950
18964
  prompt: string | null;
18951
18965
  styleId: string;
18952
18966
  } | undefined;
18967
+ loopDirections?: ("south" | "south-east" | "east" | "north-east" | "north" | "north-west" | "west" | "south-west")[] | undefined;
18953
18968
  };
18954
18969
  expectedSha256: string;
18955
18970
  project?: string | undefined;
@@ -19911,6 +19926,11 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
19911
19926
  height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
19912
19927
  size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
19913
19928
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
19929
+ /**
19930
+ * A loop shorthand's `animation.directions`, replaced whole: each named
19931
+ * direction is drawn, and each one's flip comes free as a mirror.
19932
+ */
19933
+ loopDirections: z.ZodOptional<z.ZodArray<z.ZodEnum<["south", "south-east", "east", "north-east", "north", "north-west", "west", "south-west"]>, "many">>;
19914
19934
  }, "strict", z.ZodTypeAny, {
19915
19935
  width?: number | null | undefined;
19916
19936
  height?: number | null | undefined;
@@ -19922,6 +19942,7 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
19922
19942
  prompt: string | null;
19923
19943
  styleId: string;
19924
19944
  } | undefined;
19945
+ loopDirections?: ("south" | "south-east" | "east" | "north-east" | "north" | "north-west" | "west" | "south-west")[] | undefined;
19925
19946
  }, {
19926
19947
  width?: number | null | undefined;
19927
19948
  height?: number | null | undefined;
@@ -19933,6 +19954,7 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
19933
19954
  prompt: string | null;
19934
19955
  styleId: string;
19935
19956
  } | undefined;
19957
+ loopDirections?: ("south" | "south-east" | "east" | "north-east" | "north" | "north-west" | "west" | "south-west")[] | undefined;
19936
19958
  }>;
19937
19959
  }, "strict", z.ZodTypeAny, {
19938
19960
  assetId: string;
@@ -19948,6 +19970,7 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
19948
19970
  prompt: string | null;
19949
19971
  styleId: string;
19950
19972
  } | undefined;
19973
+ loopDirections?: ("south" | "south-east" | "east" | "north-east" | "north" | "north-west" | "west" | "south-west")[] | undefined;
19951
19974
  };
19952
19975
  }, {
19953
19976
  assetId: string;
@@ -19963,6 +19986,7 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
19963
19986
  prompt: string | null;
19964
19987
  styleId: string;
19965
19988
  } | undefined;
19989
+ loopDirections?: ("south" | "south-east" | "east" | "north-east" | "north" | "north-west" | "west" | "south-west")[] | undefined;
19966
19990
  };
19967
19991
  }>, z.ZodObject<{
19968
19992
  action: z.ZodLiteral<"add-asset">;
@@ -20878,6 +20902,7 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
20878
20902
  prompt: string | null;
20879
20903
  styleId: string;
20880
20904
  } | undefined;
20905
+ loopDirections?: ("south" | "south-east" | "east" | "north-east" | "north" | "north-west" | "west" | "south-west")[] | undefined;
20881
20906
  };
20882
20907
  } | {
20883
20908
  assetId: string;
@@ -21007,6 +21032,7 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
21007
21032
  prompt: string | null;
21008
21033
  styleId: string;
21009
21034
  } | undefined;
21035
+ loopDirections?: ("south" | "south-east" | "east" | "north-east" | "north" | "north-west" | "west" | "south-west")[] | undefined;
21010
21036
  };
21011
21037
  } | {
21012
21038
  assetId: string;
package/dist/index.js CHANGED
@@ -15084,7 +15084,12 @@ var AssetPatchSchema = z8.object({
15084
15084
  width: z8.number().int().nullable().optional(),
15085
15085
  height: z8.number().int().nullable().optional(),
15086
15086
  size: z8.number().int().nullable().optional(),
15087
- tags: z8.array(z8.string()).optional()
15087
+ tags: z8.array(z8.string()).optional(),
15088
+ /**
15089
+ * A loop shorthand's `animation.directions`, replaced whole: each named
15090
+ * direction is drawn, and each one's flip comes free as a mirror.
15091
+ */
15092
+ loopDirections: z8.array(CharacterDirectionSchema).min(1).optional()
15088
15093
  }).strict();
15089
15094
  var NewStateSchema = z8.object({
15090
15095
  /** Asset id of the parent this states; must already exist. */
@@ -15433,6 +15438,13 @@ function applyEdit(raw, edit) {
15433
15438
  if (patch.tags.length) asset.tags = patch.tags;
15434
15439
  else delete asset.tags;
15435
15440
  }
15441
+ if (patch.loopDirections) {
15442
+ const animation = asset.animation;
15443
+ if (!animation || !Array.isArray(animation.directions)) {
15444
+ throw new ManifestEditError(`asset "${edit.assetId}" is not a loop declared with animation.directions`);
15445
+ }
15446
+ asset.animation = { ...animation, directions: patch.loopDirections };
15447
+ }
15436
15448
  }
15437
15449
  async function withCandidate(manifestPath, edit, use, unchanged) {
15438
15450
  const absolute = path26.resolve(manifestPath);
@@ -16335,6 +16347,7 @@ async function buildGallerySnapshot(opts) {
16335
16347
  styleId: spec.styleId,
16336
16348
  assetId: spec.assetId,
16337
16349
  declared: true,
16350
+ declaredAs: loopShorthandOf(spec.assetId, loaded.loopFamilies) ?? spec.assetId,
16338
16351
  state: planItem.state,
16339
16352
  reason: planItem.reason,
16340
16353
  status: entry?.status ?? null,
@@ -16404,6 +16417,7 @@ async function buildGallerySnapshot(opts) {
16404
16417
  styleId: entry.styleId,
16405
16418
  assetId: entry.assetId,
16406
16419
  declared: false,
16420
+ declaredAs: null,
16407
16421
  state: "undeclared",
16408
16422
  reason: "not declared by the current manifest; `pixelkiln prune` removes the entry",
16409
16423
  status: entry.status,
@@ -16733,9 +16747,11 @@ ${css}</style>
16733
16747
  </select>
16734
16748
  <select id="group" aria-label="Group">
16735
16749
  <option value="style">Group: by style</option>
16750
+ <option value="family">Group: by family</option>
16736
16751
  <option value="none">Group: none</option>
16737
16752
  </select>
16738
16753
  <span id="editing" class="editing" hidden title="This gallery can write the manifest. It never contacts a provider.">editing</span>
16754
+ <button id="select" type="button" title="Pick several records to generate, regenerate, compare, or tag together (or ctrl/\u2318-click a card)">Select</button>
16739
16755
  <button id="studio" type="button" hidden title="Draft a new character: its style, base, loops, and portrait, priced as you go">+ New character</button>
16740
16756
  <button id="refresh" type="button" title="Re-read the manifest, lockfile, and disk">Refresh</button>
16741
16757
  <label class="chip" title="Refresh every 5 seconds while this tab is visible"><input id="auto" type="checkbox"> auto</label>
@@ -16749,6 +16765,7 @@ ${css}</style>
16749
16765
  <div id="tools"></div>
16750
16766
  </header>
16751
16767
  <main id="root"></main>
16768
+ <div id="selbar" class="selbar" hidden></div>
16752
16769
  <footer>
16753
16770
  Click a sprite for its full record; <kbd>shift</kbd>-click adds it to a side-by-side comparison. <kbd>\u2190</kbd>/<kbd>\u2192</kbd> step through the visible set while a record
16754
16771
  is open, <kbd>,</kbd>/<kbd>.</kbd> step a loop's frames and <kbd>space</kbd> plays it, <kbd>Esc</kbd> closes it, and <kbd>/</kbd> jumps to search. This page reads the manifest, lockfile,