@nodaro/prompts 1.26.1 → 1.28.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.
Files changed (40) hide show
  1. package/dist/index.cjs +3127 -92
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +1776 -10
  4. package/dist/index.d.ts +1776 -10
  5. package/dist/index.js +3094 -93
  6. package/dist/index.js.map +1 -1
  7. package/package.json +2 -2
  8. package/src/__tests__/fixtures/parameter-hint-golden.json +33 -1
  9. package/src/__tests__/hint-join.test.ts +64 -1
  10. package/src/__tests__/motion-hint.test.ts +20 -0
  11. package/src/__tests__/parameter-registry-sync.test.ts +1 -0
  12. package/src/__tests__/person-mixed-heritage.test.ts +43 -0
  13. package/src/__tests__/picker-art-images.test.ts +191 -0
  14. package/src/__tests__/resolve-prompt.test.ts +13 -1
  15. package/src/__tests__/transition-options.test.ts +223 -0
  16. package/src/__tests__/transition-styles.test.ts +202 -0
  17. package/src/__tests__/transitions-instant.test.ts +9 -5
  18. package/src/__tests__/transitions-scope.test.ts +593 -8
  19. package/src/__tests__/video-own-motion.test.ts +26 -0
  20. package/src/catalog-sections.ts +24 -0
  21. package/src/hint-join.ts +33 -1
  22. package/src/index.ts +4 -0
  23. package/src/parameter-prompt-hint.ts +20 -3
  24. package/src/person.ts +24 -8
  25. package/src/picker-art/character-art-files.generated.ts +1118 -0
  26. package/src/picker-art/images.ts +83 -0
  27. package/src/picker-art/index.ts +13 -0
  28. package/src/picker-art/look-preview-sets.ts +489 -0
  29. package/src/picker-art/paths.ts +53 -0
  30. package/src/picker-art/sound-art-files.generated.ts +319 -0
  31. package/src/picker-art/sound-art-map.ts +722 -0
  32. package/src/picker-art/sound-art-types.ts +19 -0
  33. package/src/picker-catalogs.ts +125 -24
  34. package/src/prompt-builder.ts +2 -1
  35. package/src/prompt-hint-join.ts +8 -2
  36. package/src/prompt-style-section.ts +3 -5
  37. package/src/resolve-prompt.ts +22 -4
  38. package/src/styling.ts +18 -0
  39. package/src/transitions.ts +320 -51
  40. package/src/video-own-motion.ts +29 -0
@@ -0,0 +1,29 @@
1
+ /**
2
+ * A video node's OWN Motion setting (`motionEnabled` + `motion`) as the clause
3
+ * its prompt carries, e.g. "dynamic motion".
4
+ *
5
+ * Only the node types that offer the setting add it: the legacy Image to Video
6
+ * node, and Generate Video in either mode (with or without a start frame). A
7
+ * legacy Text to Video node has no such setting. `nodeType` is the node's REAL
8
+ * type: the editor re-types Generate Video to image-to-video / text-to-video
9
+ * before composing, so a re-typed node must still pass "generate-video". The
10
+ * editor applied it only with a start frame while workflow runs applied it
11
+ * always; one rule for both is what keeps them in step.
12
+ *
13
+ * Separate from the Motion node wired into a Settings input, whose clause comes
14
+ * from `getParameterPromptHint` through the cinematography collectors.
15
+ */
16
+ export const OWN_MOTION_NODE_TYPES: ReadonlySet<string> = new Set(["image-to-video", "generate-video"])
17
+
18
+ /**
19
+ * The step the Motion control shows before one is picked, and so the step an
20
+ * enabled setting runs with when none is stored. Ticking the checkbox stores
21
+ * no step, so the prompt used to get nothing while the panel showed Moderate.
22
+ */
23
+ export const DEFAULT_OWN_MOTION = "moderate"
24
+
25
+ export function ownMotionHint(nodeType: string, data: Readonly<Record<string, unknown>>): string | undefined {
26
+ if (!OWN_MOTION_NODE_TYPES.has(nodeType) || !data.motionEnabled) return undefined
27
+ const step = typeof data.motion === "string" && data.motion ? data.motion : DEFAULT_OWN_MOTION
28
+ return `${step} motion`
29
+ }