@nodaro/shared 2.10.0 → 2.11.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
@@ -7016,6 +7016,10 @@ var HINT_EXEMPT_PARAMETER_TYPES = /* @__PURE__ */ new Set([
7016
7016
  "duration",
7017
7017
  "aspect-ratio"
7018
7018
  ]);
7019
+ var registeredPersonPackFields = [];
7020
+ function setRegisteredPersonPackFields(fields) {
7021
+ registeredPersonPackFields = [...fields];
7022
+ }
7019
7023
  function getParameterValue(data, nodeType) {
7020
7024
  switch (nodeType) {
7021
7025
  case "text-prompt":
@@ -7078,8 +7082,15 @@ function getParameterValue(data, nodeType) {
7078
7082
  return trim(data.backdrop);
7079
7083
  case "held-prop":
7080
7084
  return trim(data.heldProp);
7081
- case "person":
7082
- return trim(data.type) ?? trim(data.age) ?? trim(data.ethnicity) ?? trim(data.regionalAesthetic) ?? trim(data.frame) ?? trim(data.bodyMass) ?? trim(data.bust) ?? trim(data.waist) ?? trim(data.hips) ?? trim(data.silhouette) ?? trim(data.faceShape) ?? trim(data.jawline) ?? trim(data.cheekbones) ?? trim(data.facialFullness) ?? trim(data.eyeShape) ?? trim(data.eyelidType) ?? trim(data.canthalTilt) ?? trim(data.eyeSpacing) ?? trim(data.eyeSetBrow) ?? trim(data.nose) ?? trim(data.noseTip) ?? trim(data.lipFullness) ?? trim(data.lipShape) ?? trim(data.lips) ?? trim(data.hairColor) ?? trim(data.hairBase) ?? trim(data.eyebrows) ?? trim(data.skinTone) ?? trim(data.skinTexture) ?? trim(data.eyeColor) ?? trim(data.facialHair) ?? trim(data.distinctiveFeature) ?? trim(data.lipState) ?? trim(data.eyeState);
7085
+ case "person": {
7086
+ const base = trim(data.type) ?? trim(data.age) ?? trim(data.ethnicity) ?? trim(data.regionalAesthetic) ?? trim(data.frame) ?? trim(data.bodyMass) ?? trim(data.bust) ?? trim(data.waist) ?? trim(data.hips) ?? trim(data.silhouette) ?? trim(data.faceShape) ?? trim(data.jawline) ?? trim(data.cheekbones) ?? trim(data.facialFullness) ?? trim(data.eyeShape) ?? trim(data.eyelidType) ?? trim(data.canthalTilt) ?? trim(data.eyeSpacing) ?? trim(data.eyeSetBrow) ?? trim(data.nose) ?? trim(data.noseTip) ?? trim(data.lipFullness) ?? trim(data.lipShape) ?? trim(data.lips) ?? trim(data.hairColor) ?? trim(data.hairBase) ?? trim(data.eyebrows) ?? trim(data.skinTone) ?? trim(data.skinTexture) ?? trim(data.eyeColor) ?? trim(data.facialHair) ?? trim(data.distinctiveFeature) ?? trim(data.lipState) ?? trim(data.eyeState);
7087
+ if (base !== void 0) return base;
7088
+ for (const field of registeredPersonPackFields) {
7089
+ const v = trim(data[field]);
7090
+ if (v !== void 0) return v;
7091
+ }
7092
+ return void 0;
7093
+ }
7083
7094
  case "mood":
7084
7095
  return trim(data.mood);
7085
7096
  case "photographer":
@@ -9096,7 +9107,7 @@ var VEHICLES = [
9096
9107
  { id: "seaplane", label: "Seaplane", subcategory: "aircraft", description: "Seaplane with twin pontoon floats instead of wheels, high wings and a propeller, resting on calm water" },
9097
9108
  { id: "hot-air-balloon", label: "Hot Air Balloon", subcategory: "aircraft", description: "Giant hot-air balloon with a colorful rainbow-striped fabric envelope, a roaring flame burner flaring upward into the mouth and a wicker passenger basket suspended below by braided cables" },
9098
9109
  { id: "blimp", label: "Blimp", subcategory: "aircraft", description: "Sausage-shaped blimp airship with a sleek silver envelope, small rear fins and a slung gondola beneath" },
9099
- { id: "airship", label: "Airship / Dirigible", subcategory: "aircraft", description: "Massive rigid lighter-than-air dirigible with a long cigar-shaped fabric-covered metal frame, large rear stabilizer fins, multiple slung engine gondolas and a long passenger cabin running underneath the hull" },
9110
+ { id: "airship", label: "Airship / Dirigible", subcategory: "aircraft", description: "Massive rigid lighter-than-air dirigible with a long cigar-shaped fabric-covered metal frame, large rear stabilizer fins, multiple slung engine gondolas and a long passenger cabin running underneath the hull", term: "airship" },
9100
9111
  { id: "glider", label: "Glider", subcategory: "aircraft", description: "Elegant sailplane glider with ultra-long narrow wings, no engine and a teardrop cockpit pod" },
9101
9112
  { id: "paraglider", label: "Paraglider", subcategory: "aircraft", description: "Foot-launched paraglider with a wide elliptical soft-fabric ram-air wing arched overhead, dozens of slender suspension lines converging into a tandem harness with a seated pilot" },
9102
9113
  { id: "microlight", label: "Microlight Aircraft", subcategory: "aircraft", description: "Lightweight single-pilot microlight aircraft with an exposed tubular metal frame, fabric-covered high wings, a small pusher propeller engine behind the open seat and tricycle landing gear" },
@@ -9271,7 +9282,7 @@ var WEAPONS = [
9271
9282
  { id: "phaser", label: "Phaser", subcategory: "sci-fi", description: "Sleek sci-fi phaser with a minimalist curved grip, glowing emitter tip and a smooth panel controlling intensity" },
9272
9283
  { id: "rail-gun", label: "Rail Gun", subcategory: "sci-fi", description: "Heavy electromagnetic rail gun with parallel metal rails, massive capacitors along the body and a glowing projectile chamber" },
9273
9284
  { id: "emp-grenade", label: "EMP Grenade", subcategory: "sci-fi", description: "Spherical electromagnetic pulse grenade with exposed coils, glowing blue indicator lights and a holographic arming dial" },
9274
- { id: "plasma-sword", label: "Plasma Sword / Lightsaber", subcategory: "sci-fi", description: "Sci-fi energy blade with a metallic ridged hilt projecting a tall column of saturated plasma energy, surrounded by a bright halo of glowing light, casting colored reflections on the wielder and humming softly with contained power" },
9285
+ { id: "plasma-sword", label: "Plasma Sword / Lightsaber", subcategory: "sci-fi", description: "Sci-fi energy blade with a metallic ridged hilt projecting a tall column of saturated plasma energy, surrounded by a bright halo of glowing light, casting colored reflections on the wielder and humming softly with contained power", term: "plasma sword" },
9275
9286
  { id: "gravity-gun", label: "Gravity Gun", subcategory: "sci-fi", description: "Sci-fi physics-manipulating ranged weapon with a chunky metallic body, three articulated prongs at the muzzle that crackle with blue gravitational energy, exposed power conduits along the barrel and a heavy two-handed grip with a glowing trigger assembly" },
9276
9287
  // -------------------- Fantasy / Magical --------------------
9277
9288
  { id: "enchanted-sword", label: "Enchanted Sword", subcategory: "fantasy", description: "Enchanted sword with a glowing rune-etched blade, gold-inlaid crossguard and a gemstone embedded in the pommel" },
@@ -9388,6 +9399,19 @@ var inflight = /* @__PURE__ */ new Map();
9388
9399
  function cacheKey(catalog, locale) {
9389
9400
  return `${catalog}:${locale}`;
9390
9401
  }
9402
+ var packSidecars = /* @__PURE__ */ new Map();
9403
+ function registerCatalogSidecars(catalog, sidecars) {
9404
+ if (!sidecars) return;
9405
+ for (const locale of Object.keys(sidecars)) {
9406
+ const map = sidecars[locale];
9407
+ if (!map) continue;
9408
+ const key = `${catalog}:${locale}`;
9409
+ packSidecars.set(key, { ...packSidecars.get(key) ?? {}, ...map });
9410
+ }
9411
+ }
9412
+ function resetCatalogSidecars() {
9413
+ packSidecars.clear();
9414
+ }
9391
9415
  async function ensureLocaleCatalogLoaded(catalog, locale) {
9392
9416
  if (locale === "en") return null;
9393
9417
  const key = cacheKey(catalog, locale);
@@ -9413,9 +9437,10 @@ async function ensureLocaleCatalogLoaded(catalog, locale) {
9413
9437
  }
9414
9438
  function getLocalizedEntry(catalog, id, locale) {
9415
9439
  if (locale === "en") return void 0;
9416
- const map = cache.get(cacheKey(catalog, locale));
9417
- if (!map) return void 0;
9418
- return map[id];
9440
+ const key = cacheKey(catalog, locale);
9441
+ const fromFile = cache.get(key)?.[id];
9442
+ if (fromFile) return fromFile;
9443
+ return packSidecars.get(key)?.[id];
9419
9444
  }
9420
9445
  function resolveLabel(catalog, id, englishLabel, locale) {
9421
9446
  if (locale === "en") return englishLabel;
@@ -12021,7 +12046,11 @@ var VIDEO_PRODUCER_TYPES = /* @__PURE__ */ new Set([
12021
12046
  "still-to-video",
12022
12047
  // Slideshow: 2-100 stills + one optional audio track → MP4 (local FFmpeg,
12023
12048
  // no provider). Same contract; images arrive via the image-collage lane.
12024
- "slideshow"
12049
+ "slideshow",
12050
+ // GIF to Video: animated GIF → H.264 MP4 (local FFmpeg, no provider).
12051
+ // Emits generatedVideoUrl so it connects to any downstream video consumer
12052
+ // (e.g. a Seedance video-reference input) by an ordinary edge.
12053
+ "gif-to-video"
12025
12054
  ]);
12026
12055
  var DYNAMIC_PRODUCER_TYPES = /* @__PURE__ */ new Set([
12027
12056
  "list",
@@ -13498,6 +13527,89 @@ var OrgSettingsSchema = PresetSettingsSchema.partial().extend({
13498
13527
  vocabulary_overrides: zod.z.record(zod.z.string(), zod.z.string()).optional()
13499
13528
  });
13500
13529
 
13530
+ // src/entity-node-fields.ts
13531
+ var ENTITY_NODE_KINDS = ["character", "object", "creature", "location"];
13532
+ var ENTITY_DB_ID_FIELD = {
13533
+ character: "characterDbId",
13534
+ object: "objectDbId",
13535
+ creature: "creatureDbId",
13536
+ location: "locationDbId"
13537
+ };
13538
+ var ENTITY_NAME_FIELD = {
13539
+ character: "characterName",
13540
+ object: "objectName",
13541
+ creature: "creatureName",
13542
+ location: "locationName"
13543
+ };
13544
+ var ENTITY_TABLE = {
13545
+ character: "characters",
13546
+ object: "objects",
13547
+ creature: "creatures",
13548
+ location: "locations"
13549
+ };
13550
+ var ENTITY_BUCKET_FIELDS = {
13551
+ character: [
13552
+ ["expressions", "expressions"],
13553
+ ["poses", "poses"],
13554
+ ["motions", "motions"],
13555
+ ["angles", "angles"],
13556
+ ["body_angles", "bodyAngles"],
13557
+ ["lighting_variations", "lightingVariations"],
13558
+ ["outfit_variations", "outfitVariations"],
13559
+ ["detail_closeups", "detailCloseups"],
13560
+ ["sheets", "sheets"]
13561
+ ],
13562
+ object: [
13563
+ ["angles", "angles"],
13564
+ ["materials", "materials"],
13565
+ ["variations", "variations"],
13566
+ ["motion_clips", "motionClips"],
13567
+ ["detail_closeups", "detailCloseups"],
13568
+ ["sheets", "sheets"]
13569
+ ],
13570
+ creature: [
13571
+ ["angles", "angles"],
13572
+ ["poses", "poses"],
13573
+ ["variations", "variations"],
13574
+ ["motion_clips", "motionClips"],
13575
+ ["detail_closeups", "detailCloseups"],
13576
+ ["sheets", "sheets"]
13577
+ ],
13578
+ location: [
13579
+ ["time_of_day", "timeOfDay"],
13580
+ ["weather", "weather"],
13581
+ ["angles", "angles"],
13582
+ ["lighting", "lighting"],
13583
+ ["seasons", "seasons"],
13584
+ ["atmosphere_motions", "atmosphereMotions"],
13585
+ ["detail_closeups", "detailCloseups"],
13586
+ ["sheets", "sheets"]
13587
+ ]
13588
+ };
13589
+ var ENTITY_SCALAR_FIELDS = [
13590
+ ["name", "__name"],
13591
+ // routed to the kind's own name field by the caller
13592
+ ["description", "description"],
13593
+ ["canonical_description", "canonicalDescription"],
13594
+ ["source_image_url", "sourceImageUrl"]
13595
+ ];
13596
+ var ENTITY_KIND_SCALAR_FIELDS = {
13597
+ character: [],
13598
+ object: [["style_lock", "styleLock"]],
13599
+ creature: [["style_lock", "styleLock"]],
13600
+ location: [["style_lock", "styleLock"]]
13601
+ };
13602
+ function entityHydrationColumns(kind) {
13603
+ return [
13604
+ "id",
13605
+ ...entityScalarFields(kind).map(([column]) => column),
13606
+ ...ENTITY_BUCKET_FIELDS[kind].map(([column]) => column)
13607
+ ];
13608
+ }
13609
+ function entityScalarFields(kind) {
13610
+ return [...ENTITY_SCALAR_FIELDS, ...ENTITY_KIND_SCALAR_FIELDS[kind]];
13611
+ }
13612
+
13501
13613
  exports.ACCESS_LEVELS = ACCESS_LEVELS;
13502
13614
  exports.ACTIVE_SCENE_HELPERS = ACTIVE_SCENE_HELPERS;
13503
13615
  exports.ADVANCED_MODE_UNAVAILABLE_REASON = ADVANCED_MODE_UNAVAILABLE_REASON;
@@ -13605,9 +13717,16 @@ exports.DetectionResultSchema = DetectionResultSchema;
13605
13717
  exports.EFFORT_TIER_BUMP = EFFORT_TIER_BUMP;
13606
13718
  exports.EMOTIONAL_BEAT = EMOTIONAL_BEAT;
13607
13719
  exports.ENTITY_ASPECT_DEFAULTS = ENTITY_ASPECT_DEFAULTS;
13720
+ exports.ENTITY_BUCKET_FIELDS = ENTITY_BUCKET_FIELDS;
13721
+ exports.ENTITY_DB_ID_FIELD = ENTITY_DB_ID_FIELD;
13608
13722
  exports.ENTITY_IMAGE_HANDLE_TYPES = ENTITY_IMAGE_HANDLE_TYPES;
13723
+ exports.ENTITY_KIND_SCALAR_FIELDS = ENTITY_KIND_SCALAR_FIELDS;
13724
+ exports.ENTITY_NAME_FIELD = ENTITY_NAME_FIELD;
13725
+ exports.ENTITY_NODE_KINDS = ENTITY_NODE_KINDS;
13726
+ exports.ENTITY_SCALAR_FIELDS = ENTITY_SCALAR_FIELDS;
13609
13727
  exports.ENTITY_SECTIONS = ENTITY_SECTIONS;
13610
13728
  exports.ENTITY_STATUSES = ENTITY_STATUSES;
13729
+ exports.ENTITY_TABLE = ENTITY_TABLE;
13611
13730
  exports.ENTITY_TOOL_RETRY_CAP = ENTITY_TOOL_RETRY_CAP;
13612
13731
  exports.ENTITY_TYPES = ENTITY_TYPES;
13613
13732
  exports.EXECUTION_DATA_KEYS = EXECUTION_DATA_KEYS;
@@ -14032,6 +14151,8 @@ exports.durationsByMode = durationsByMode;
14032
14151
  exports.effectiveReasoningEffort = effectiveReasoningEffort;
14033
14152
  exports.encodeProviderItem = encodeProviderItem;
14034
14153
  exports.ensureLocaleCatalogLoaded = ensureLocaleCatalogLoaded;
14154
+ exports.entityHydrationColumns = entityHydrationColumns;
14155
+ exports.entityScalarFields = entityScalarFields;
14035
14156
  exports.entitySlotSchema = entitySlotSchema;
14036
14157
  exports.entryMatchesQuery = entryMatchesQuery;
14037
14158
  exports.estimateCombineVideosCredits = estimateCombineVideosCredits;
@@ -14188,8 +14309,10 @@ exports.qualityOptionsByKind = qualityOptionsByKind;
14188
14309
  exports.refHandleCategory = refHandleCategory;
14189
14310
  exports.referenceModalityForHandle = referenceModalityForHandle;
14190
14311
  exports.referenceSheetCreditId = referenceSheetCreditId;
14312
+ exports.registerCatalogSidecars = registerCatalogSidecars;
14191
14313
  exports.registerSidecarLoaders = registerSidecarLoaders;
14192
14314
  exports.renderAnalyzedScene = renderAnalyzedScene;
14315
+ exports.resetCatalogSidecars = resetCatalogSidecars;
14193
14316
  exports.resolutionOptionsByKind = resolutionOptionsByKind;
14194
14317
  exports.resolveAiAvatarCreditId = resolveAiAvatarCreditId;
14195
14318
  exports.resolveAudioCrossfadeCurve = resolveAudioCrossfadeCurve;
@@ -14244,6 +14367,7 @@ exports.selectByPredicate = selectByPredicate;
14244
14367
  exports.selectListItems = selectListItems;
14245
14368
  exports.selectLoraRoutingForMentions = selectLoraRoutingForMentions;
14246
14369
  exports.selectRandom = selectRandom;
14370
+ exports.setRegisteredPersonPackFields = setRegisteredPersonPackFields;
14247
14371
  exports.settledWithLimit = settledWithLimit;
14248
14372
  exports.slotVariationSchema = slotVariationSchema;
14249
14373
  exports.sortCharacterEntriesForDisplay = sortCharacterEntriesForDisplay;