@shop-os/modelkit 0.2.25 → 0.2.26

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/catalog.js CHANGED
@@ -2094,6 +2094,14 @@ var VIDEO_INPUT_SPEC_KEYS = [
2094
2094
  "promptExpansion",
2095
2095
  "referenceImages"
2096
2096
  ];
2097
+ var IMAGE_INPUT_SPEC_KEYS = [
2098
+ "prompt",
2099
+ "references",
2100
+ "aspectRatio",
2101
+ "size",
2102
+ "outputFormat",
2103
+ "seed"
2104
+ ];
2097
2105
  var AUDIO_INPUT_SPEC_KEYS = [
2098
2106
  "prompt",
2099
2107
  "durationSeconds",
@@ -2110,14 +2118,22 @@ var INPUT_SPEC_SUPPORTS_KEYS = [
2110
2118
  "generateAudio",
2111
2119
  "cfgScale",
2112
2120
  "promptExpansion",
2121
+ "outputFormat",
2113
2122
  "instrumental"
2114
2123
  ];
2115
2124
  var VIDEO_KEY_SET = new Set(VIDEO_INPUT_SPEC_KEYS);
2125
+ var IMAGE_KEY_SET = new Set(IMAGE_INPUT_SPEC_KEYS);
2116
2126
  var AUDIO_KEY_SET = new Set(AUDIO_INPUT_SPEC_KEYS);
2117
2127
  var ALL_KEY_SET = /* @__PURE__ */ new Set([
2118
2128
  ...VIDEO_INPUT_SPEC_KEYS,
2129
+ ...IMAGE_INPUT_SPEC_KEYS,
2119
2130
  ...AUDIO_INPUT_SPEC_KEYS
2120
2131
  ]);
2132
+ var ALLOWED_KEYS_BY_TYPE = /* @__PURE__ */ new Map([
2133
+ ["video", VIDEO_KEY_SET],
2134
+ ["image", IMAGE_KEY_SET],
2135
+ ["audio", AUDIO_KEY_SET]
2136
+ ]);
2121
2137
  var ProviderScalarSchema = z2.union([z2.string(), z2.number(), z2.boolean()]);
2122
2138
  var FieldsSchema = z2.record(z2.string(), z2.string().min(1)).superRefine((fields, ctx) => {
2123
2139
  const keys = Object.keys(fields);
@@ -2183,13 +2199,13 @@ function validateInputSpec(raw, row) {
2183
2199
  };
2184
2200
  }
2185
2201
  const issues = [];
2186
- if (row.type !== "video" && row.type !== "audio") {
2202
+ const allowed = ALLOWED_KEYS_BY_TYPE.get(row.type);
2203
+ if (allowed === void 0) {
2187
2204
  issues.push({
2188
2205
  path: [],
2189
2206
  message: `inputSpec is not supported for "${row.type}" rows`
2190
2207
  });
2191
2208
  } else {
2192
- const allowed = row.type === "video" ? VIDEO_KEY_SET : AUDIO_KEY_SET;
2193
2209
  for (const key of Object.keys(spec.fields)) {
2194
2210
  if (!allowed.has(key)) {
2195
2211
  issues.push({