pixelkiln 0.52.0 → 0.53.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
@@ -15023,6 +15023,26 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
15023
15023
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
15024
15024
  /** Restrict to these styles; empty or omitted means every style. */
15025
15025
  styles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
15026
+ /**
15027
+ * A controlled regeneration of another asset in the same manifest,
15028
+ * instead of a fresh generation. `inpaint` needs a mask upload the
15029
+ * gallery does not offer yet, so only `image-to-image` can be created
15030
+ * here; hand-edit the manifest for the other modes.
15031
+ */
15032
+ revision: z.ZodOptional<z.ZodObject<{
15033
+ mode: z.ZodLiteral<"image-to-image">;
15034
+ /** Asset id of the parent this revises; must already exist. */
15035
+ from: z.ZodString;
15036
+ strength: z.ZodOptional<z.ZodNumber>;
15037
+ }, "strict", z.ZodTypeAny, {
15038
+ mode: "image-to-image";
15039
+ from: string;
15040
+ strength?: number | undefined;
15041
+ }, {
15042
+ mode: "image-to-image";
15043
+ from: string;
15044
+ strength?: number | undefined;
15045
+ }>>;
15026
15046
  }, "strict", z.ZodTypeAny, {
15027
15047
  prompt: string;
15028
15048
  width?: number | undefined;
@@ -15030,6 +15050,11 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
15030
15050
  size?: number | undefined;
15031
15051
  tags?: string[] | undefined;
15032
15052
  category?: string | undefined;
15053
+ revision?: {
15054
+ mode: "image-to-image";
15055
+ from: string;
15056
+ strength?: number | undefined;
15057
+ } | undefined;
15033
15058
  styles?: string[] | undefined;
15034
15059
  }, {
15035
15060
  prompt: string;
@@ -15038,6 +15063,11 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
15038
15063
  size?: number | undefined;
15039
15064
  tags?: string[] | undefined;
15040
15065
  category?: string | undefined;
15066
+ revision?: {
15067
+ mode: "image-to-image";
15068
+ from: string;
15069
+ strength?: number | undefined;
15070
+ } | undefined;
15041
15071
  styles?: string[] | undefined;
15042
15072
  }>;
15043
15073
  }, "strict", z.ZodTypeAny, {
@@ -15049,6 +15079,11 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
15049
15079
  size?: number | undefined;
15050
15080
  tags?: string[] | undefined;
15051
15081
  category?: string | undefined;
15082
+ revision?: {
15083
+ mode: "image-to-image";
15084
+ from: string;
15085
+ strength?: number | undefined;
15086
+ } | undefined;
15052
15087
  styles?: string[] | undefined;
15053
15088
  };
15054
15089
  expectedSha256: string;
@@ -15063,6 +15098,11 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
15063
15098
  size?: number | undefined;
15064
15099
  tags?: string[] | undefined;
15065
15100
  category?: string | undefined;
15101
+ revision?: {
15102
+ mode: "image-to-image";
15103
+ from: string;
15104
+ strength?: number | undefined;
15105
+ } | undefined;
15066
15106
  styles?: string[] | undefined;
15067
15107
  };
15068
15108
  expectedSha256: string;
package/dist/index.d.ts CHANGED
@@ -15023,6 +15023,26 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
15023
15023
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
15024
15024
  /** Restrict to these styles; empty or omitted means every style. */
15025
15025
  styles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
15026
+ /**
15027
+ * A controlled regeneration of another asset in the same manifest,
15028
+ * instead of a fresh generation. `inpaint` needs a mask upload the
15029
+ * gallery does not offer yet, so only `image-to-image` can be created
15030
+ * here; hand-edit the manifest for the other modes.
15031
+ */
15032
+ revision: z.ZodOptional<z.ZodObject<{
15033
+ mode: z.ZodLiteral<"image-to-image">;
15034
+ /** Asset id of the parent this revises; must already exist. */
15035
+ from: z.ZodString;
15036
+ strength: z.ZodOptional<z.ZodNumber>;
15037
+ }, "strict", z.ZodTypeAny, {
15038
+ mode: "image-to-image";
15039
+ from: string;
15040
+ strength?: number | undefined;
15041
+ }, {
15042
+ mode: "image-to-image";
15043
+ from: string;
15044
+ strength?: number | undefined;
15045
+ }>>;
15026
15046
  }, "strict", z.ZodTypeAny, {
15027
15047
  prompt: string;
15028
15048
  width?: number | undefined;
@@ -15030,6 +15050,11 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
15030
15050
  size?: number | undefined;
15031
15051
  tags?: string[] | undefined;
15032
15052
  category?: string | undefined;
15053
+ revision?: {
15054
+ mode: "image-to-image";
15055
+ from: string;
15056
+ strength?: number | undefined;
15057
+ } | undefined;
15033
15058
  styles?: string[] | undefined;
15034
15059
  }, {
15035
15060
  prompt: string;
@@ -15038,6 +15063,11 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
15038
15063
  size?: number | undefined;
15039
15064
  tags?: string[] | undefined;
15040
15065
  category?: string | undefined;
15066
+ revision?: {
15067
+ mode: "image-to-image";
15068
+ from: string;
15069
+ strength?: number | undefined;
15070
+ } | undefined;
15041
15071
  styles?: string[] | undefined;
15042
15072
  }>;
15043
15073
  }, "strict", z.ZodTypeAny, {
@@ -15049,6 +15079,11 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
15049
15079
  size?: number | undefined;
15050
15080
  tags?: string[] | undefined;
15051
15081
  category?: string | undefined;
15082
+ revision?: {
15083
+ mode: "image-to-image";
15084
+ from: string;
15085
+ strength?: number | undefined;
15086
+ } | undefined;
15052
15087
  styles?: string[] | undefined;
15053
15088
  };
15054
15089
  expectedSha256: string;
@@ -15063,6 +15098,11 @@ declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject
15063
15098
  size?: number | undefined;
15064
15099
  tags?: string[] | undefined;
15065
15100
  category?: string | undefined;
15101
+ revision?: {
15102
+ mode: "image-to-image";
15103
+ from: string;
15104
+ strength?: number | undefined;
15105
+ } | undefined;
15066
15106
  styles?: string[] | undefined;
15067
15107
  };
15068
15108
  expectedSha256: string;
package/dist/index.js CHANGED
@@ -12040,7 +12040,19 @@ var NewAssetSchema = z7.object({
12040
12040
  size: z7.number().int().optional(),
12041
12041
  tags: z7.array(z7.string()).optional(),
12042
12042
  /** Restrict to these styles; empty or omitted means every style. */
12043
- styles: z7.array(z7.string().min(1)).optional()
12043
+ styles: z7.array(z7.string().min(1)).optional(),
12044
+ /**
12045
+ * A controlled regeneration of another asset in the same manifest,
12046
+ * instead of a fresh generation. `inpaint` needs a mask upload the
12047
+ * gallery does not offer yet, so only `image-to-image` can be created
12048
+ * here; hand-edit the manifest for the other modes.
12049
+ */
12050
+ revision: z7.object({
12051
+ mode: z7.literal("image-to-image"),
12052
+ /** Asset id of the parent this revises; must already exist. */
12053
+ from: z7.string().min(1),
12054
+ strength: z7.number().min(0).max(1).optional()
12055
+ }).strict().optional()
12044
12056
  }).strict();
12045
12057
  var CANDIDATE_OPTION = {
12046
12058
  retrodiffusion: "numImages",
@@ -12206,6 +12218,9 @@ function applyEdit(raw, edit) {
12206
12218
  }
12207
12219
  asset2.styles = styles;
12208
12220
  }
12221
+ if (edit.asset.revision && !Object.hasOwn(raw.assets, edit.asset.revision.from)) {
12222
+ throw new ManifestEditError(`revision parent "${edit.asset.revision.from}" is not declared by the manifest`);
12223
+ }
12209
12224
  raw.assets[edit.assetId] = asset2;
12210
12225
  return;
12211
12226
  }