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/cli.js CHANGED
@@ -13905,7 +13905,12 @@ var AssetPatchSchema = z6.object({
13905
13905
  width: z6.number().int().nullable().optional(),
13906
13906
  height: z6.number().int().nullable().optional(),
13907
13907
  size: z6.number().int().nullable().optional(),
13908
- tags: z6.array(z6.string()).optional()
13908
+ tags: z6.array(z6.string()).optional(),
13909
+ /**
13910
+ * A loop shorthand's `animation.directions`, replaced whole: each named
13911
+ * direction is drawn, and each one's flip comes free as a mirror.
13912
+ */
13913
+ loopDirections: z6.array(CharacterDirectionSchema).min(1).optional()
13909
13914
  }).strict();
13910
13915
  var NewStateSchema = z6.object({
13911
13916
  /** Asset id of the parent this states; must already exist. */
@@ -14254,6 +14259,13 @@ function applyEdit(raw, edit) {
14254
14259
  if (patch.tags.length) asset.tags = patch.tags;
14255
14260
  else delete asset.tags;
14256
14261
  }
14262
+ if (patch.loopDirections) {
14263
+ const animation = asset.animation;
14264
+ if (!animation || !Array.isArray(animation.directions)) {
14265
+ throw new ManifestEditError(`asset "${edit.assetId}" is not a loop declared with animation.directions`);
14266
+ }
14267
+ asset.animation = { ...animation, directions: patch.loopDirections };
14268
+ }
14257
14269
  }
14258
14270
  async function withCandidate(manifestPath, edit, use, unchanged) {
14259
14271
  const absolute = path23.resolve(manifestPath);
@@ -15455,6 +15467,7 @@ async function buildGallerySnapshot(opts) {
15455
15467
  styleId: spec.styleId,
15456
15468
  assetId: spec.assetId,
15457
15469
  declared: true,
15470
+ declaredAs: loopShorthandOf(spec.assetId, loaded.loopFamilies) ?? spec.assetId,
15458
15471
  state: planItem.state,
15459
15472
  reason: planItem.reason,
15460
15473
  status: entry?.status ?? null,
@@ -15524,6 +15537,7 @@ async function buildGallerySnapshot(opts) {
15524
15537
  styleId: entry.styleId,
15525
15538
  assetId: entry.assetId,
15526
15539
  declared: false,
15540
+ declaredAs: null,
15527
15541
  state: "undeclared",
15528
15542
  reason: "not declared by the current manifest; `pixelkiln prune` removes the entry",
15529
15543
  status: entry.status,
@@ -15858,9 +15872,11 @@ ${css}</style>
15858
15872
  </select>
15859
15873
  <select id="group" aria-label="Group">
15860
15874
  <option value="style">Group: by style</option>
15875
+ <option value="family">Group: by family</option>
15861
15876
  <option value="none">Group: none</option>
15862
15877
  </select>
15863
15878
  <span id="editing" class="editing" hidden title="This gallery can write the manifest. It never contacts a provider.">editing</span>
15879
+ <button id="select" type="button" title="Pick several records to generate, regenerate, compare, or tag together (or ctrl/\u2318-click a card)">Select</button>
15864
15880
  <button id="studio" type="button" hidden title="Draft a new character: its style, base, loops, and portrait, priced as you go">+ New character</button>
15865
15881
  <button id="refresh" type="button" title="Re-read the manifest, lockfile, and disk">Refresh</button>
15866
15882
  <label class="chip" title="Refresh every 5 seconds while this tab is visible"><input id="auto" type="checkbox"> auto</label>
@@ -15874,6 +15890,7 @@ ${css}</style>
15874
15890
  <div id="tools"></div>
15875
15891
  </header>
15876
15892
  <main id="root"></main>
15893
+ <div id="selbar" class="selbar" hidden></div>
15877
15894
  <footer>
15878
15895
  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
15879
15896
  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,