pixelkiln 0.145.0 → 0.147.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.cjs CHANGED
@@ -17788,7 +17788,12 @@ var RecipeSchema = import_zod5.z.object({
17788
17788
  sourceImage: RecipeBindingSchema.optional(),
17789
17789
  maskImage: RecipeBindingSchema.optional(),
17790
17790
  strength: RecipeBindingSchema.optional()
17791
- }).strict()
17791
+ }).catchall(RecipeBindingSchema),
17792
+ /** Frame-set options; required when the style's generator is `frames`. */
17793
+ frames: import_zod5.z.object({
17794
+ vary: import_zod5.z.string().min(1),
17795
+ seedStep: import_zod5.z.number().int().optional()
17796
+ }).strict().optional()
17792
17797
  }).strict().optional(),
17793
17798
  quality: import_zod5.z.object({
17794
17799
  stage: import_zod5.z.enum(["composition-source", "production-candidate"]),
@@ -17882,11 +17887,27 @@ var RecipeSchema = import_zod5.z.object({
17882
17887
  });
17883
17888
  return;
17884
17889
  }
17890
+ const frames = recipe.workflow.frames;
17891
+ if (recipe.style.generator === "frames" !== (frames !== void 0)) {
17892
+ context.addIssue({
17893
+ code: import_zod5.z.ZodIssueCode.custom,
17894
+ path: ["workflow", "frames"],
17895
+ message: "is required for a frames style and only allowed there"
17896
+ });
17897
+ }
17898
+ if (frames && !Object.hasOwn(recipe.workflow.bindings, frames.vary)) {
17899
+ context.addIssue({
17900
+ code: import_zod5.z.ZodIssueCode.custom,
17901
+ path: ["workflow", "frames", "vary"],
17902
+ message: "must name a workflow binding"
17903
+ });
17904
+ }
17885
17905
  const expected = {
17886
17906
  workflowFile: `${RECIPE_DIR_TOKEN}/${recipe.workflow.path}`,
17887
17907
  outputNodeId: recipe.workflow.outputNodeId,
17888
17908
  numImages: recipe.workflow.numImages,
17889
- bindings: recipe.workflow.bindings
17909
+ bindings: recipe.workflow.bindings,
17910
+ frames
17890
17911
  };
17891
17912
  if (JSON.stringify(canonical3(options)) !== JSON.stringify(canonical3(expected))) {
17892
17913
  context.addIssue({
@@ -24941,12 +24962,12 @@ async function runPicker(provider, lock, lockPath, opts = {}) {
24941
24962
  });
24942
24963
  if (!session) return { selected: 0, skipped: 0 };
24943
24964
  let autoSelected = 0;
24944
- if (opts.autoAcceptSingle) {
24945
- const singles = session.groups.filter((g) => g.mode === "frame-set" || g.frameUrls.length === 1);
24965
+ if (opts.acceptFirst || opts.autoAcceptSingle) {
24966
+ const singles = opts.acceptFirst ? session.groups : session.groups.filter((g) => g.mode === "frame-set" || g.frameUrls.length === 1);
24946
24967
  if (singles.length) {
24947
24968
  const res = await session.apply({ selections: singles.map((g) => ({ key: g.key, index: 0 })) }, lockPath);
24948
24969
  autoSelected = res.selected;
24949
- log(` --yes: accepted ${res.selected} single-candidate asset(s)`);
24970
+ log(opts.acceptFirst ? ` --accept-first: accepted the first candidate of ${res.selected} asset(s)` : ` --yes: accepted ${res.selected} single-candidate asset(s)`);
24950
24971
  const rest = session.groups.filter((g) => !singles.includes(g)).map((g) => g.key);
24951
24972
  session = rest.length ? await prepareReview(provider, lock, { onProgress: log, keys: rest, specs: opts.specs, lockPath }) : null;
24952
24973
  if (!session) return { selected: autoSelected, skipped: 0 };