pixelkiln 0.91.1 → 0.91.2

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.js CHANGED
@@ -10364,11 +10364,18 @@ function assetInStyle(asset, styleId, style) {
10364
10364
  function parentAssetId(asset) {
10365
10365
  return asset?.revision?.from ?? asset?.state?.of ?? asset?.animation?.of ?? asset?.portrait?.of ?? asset?.outfit?.of;
10366
10366
  }
10367
- function dependencyAssetIds(asset) {
10367
+ function dependencyAssetIds(asset, styleAnchors = []) {
10368
10368
  const parent = parentAssetId(asset);
10369
10369
  return [
10370
10370
  ...parent ? [parent] : [],
10371
- ...[asset?.connect?.lower?.of, asset?.connect?.upper?.of].filter((id) => Boolean(id))
10371
+ ...[
10372
+ asset?.connect?.lower?.of,
10373
+ asset?.connect?.upper?.of,
10374
+ asset?.animation?.motionFrom,
10375
+ asset?.mirror,
10376
+ asset?.styleCharacter,
10377
+ ...asset?.styleCharacter ? [] : styleAnchors
10378
+ ].filter((id) => Boolean(id))
10372
10379
  ];
10373
10380
  }
10374
10381
  function formatManifestIssues(issues) {
@@ -10458,9 +10465,10 @@ async function resolveSpecs(loaded, filter) {
10458
10465
  }
10459
10466
  const requestedAssetIds = new Set(assetFilter.length ? assetFilter : Object.keys(manifest.assets));
10460
10467
  const resolutionAssetIds = new Set(requestedAssetIds);
10468
+ const styleAnchors = Object.values(manifest.styles).map((style) => style.styleCharacter).filter((id) => Boolean(id));
10461
10469
  const pending = [...requestedAssetIds];
10462
10470
  while (pending.length) {
10463
- for (const dependency of dependencyAssetIds(manifest.assets[pending.pop()])) {
10471
+ for (const dependency of dependencyAssetIds(manifest.assets[pending.pop()], styleAnchors)) {
10464
10472
  if (resolutionAssetIds.has(dependency) || !manifest.assets[dependency]) continue;
10465
10473
  resolutionAssetIds.add(dependency);
10466
10474
  pending.push(dependency);