@nodaro/shared 3.30.0 → 3.32.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/README.md +17 -0
- package/dist/chunk-2NIQO2J3.cjs +54 -0
- package/dist/chunk-2NIQO2J3.cjs.map +1 -0
- package/dist/chunk-2OJIVO7R.cjs +32 -0
- package/dist/chunk-2OJIVO7R.cjs.map +1 -0
- package/dist/chunk-2RF4Z7KG.cjs +803 -0
- package/dist/chunk-2RF4Z7KG.cjs.map +1 -0
- package/dist/chunk-3CUFITU7.js +1905 -0
- package/dist/chunk-3CUFITU7.js.map +1 -0
- package/dist/chunk-3RYKIUAE.js +86 -0
- package/dist/chunk-3RYKIUAE.js.map +1 -0
- package/dist/chunk-44I73CQS.cjs +194 -0
- package/dist/chunk-44I73CQS.cjs.map +1 -0
- package/dist/chunk-5AUSSJIM.cjs +3372 -0
- package/dist/chunk-5AUSSJIM.cjs.map +1 -0
- package/dist/chunk-5PC6JBGJ.cjs +1419 -0
- package/dist/chunk-5PC6JBGJ.cjs.map +1 -0
- package/dist/chunk-5RU2HCW2.js +30 -0
- package/dist/chunk-5RU2HCW2.js.map +1 -0
- package/dist/chunk-5THUHJ3E.js +46 -0
- package/dist/chunk-5THUHJ3E.js.map +1 -0
- package/dist/chunk-5U7VLG43.js +141 -0
- package/dist/chunk-5U7VLG43.js.map +1 -0
- package/dist/chunk-6DAWSVX2.cjs +103 -0
- package/dist/chunk-6DAWSVX2.cjs.map +1 -0
- package/dist/chunk-6DKDOWBL.js +1567 -0
- package/dist/chunk-6DKDOWBL.js.map +1 -0
- package/dist/chunk-6IJOPRZP.cjs +197 -0
- package/dist/chunk-6IJOPRZP.cjs.map +1 -0
- package/dist/chunk-7G7G42KS.js +86 -0
- package/dist/chunk-7G7G42KS.js.map +1 -0
- package/dist/chunk-AINCI23X.js +2171 -0
- package/dist/chunk-AINCI23X.js.map +1 -0
- package/dist/chunk-AROWPFO2.js +773 -0
- package/dist/chunk-AROWPFO2.js.map +1 -0
- package/dist/chunk-AVQK77G6.cjs +2000 -0
- package/dist/chunk-AVQK77G6.cjs.map +1 -0
- package/dist/chunk-C57NEO3X.js +3327 -0
- package/dist/chunk-C57NEO3X.js.map +1 -0
- package/dist/chunk-CK3GK34R.js +1381 -0
- package/dist/chunk-CK3GK34R.js.map +1 -0
- package/dist/chunk-E2TGXG6X.cjs +1770 -0
- package/dist/chunk-E2TGXG6X.cjs.map +1 -0
- package/dist/chunk-EK362Q45.cjs +38 -0
- package/dist/chunk-EK362Q45.cjs.map +1 -0
- package/dist/chunk-FBV5DF6D.js +95 -0
- package/dist/chunk-FBV5DF6D.js.map +1 -0
- package/dist/chunk-FG4E7MTG.cjs +4 -0
- package/dist/chunk-FG4E7MTG.cjs.map +1 -0
- package/dist/chunk-G6IIVKMO.js +26 -0
- package/dist/chunk-G6IIVKMO.js.map +1 -0
- package/dist/chunk-HGC5JNVA.cjs +1503 -0
- package/dist/chunk-HGC5JNVA.cjs.map +1 -0
- package/dist/chunk-HSHCCBIV.js +255 -0
- package/dist/chunk-HSHCCBIV.js.map +1 -0
- package/dist/chunk-IEBZHTPE.js +254 -0
- package/dist/chunk-IEBZHTPE.js.map +1 -0
- package/dist/chunk-ISJDAFKS.js +1604 -0
- package/dist/chunk-ISJDAFKS.js.map +1 -0
- package/dist/chunk-J6KHW2E5.cjs +1963 -0
- package/dist/chunk-J6KHW2E5.cjs.map +1 -0
- package/dist/chunk-J7BMO73N.cjs +114 -0
- package/dist/chunk-J7BMO73N.cjs.map +1 -0
- package/dist/chunk-JL4C5VJ7.cjs +488 -0
- package/dist/chunk-JL4C5VJ7.cjs.map +1 -0
- package/dist/chunk-JSGIEF6Z.cjs +1087 -0
- package/dist/chunk-JSGIEF6Z.cjs.map +1 -0
- package/dist/chunk-JSNV5O2F.cjs +34 -0
- package/dist/chunk-JSNV5O2F.cjs.map +1 -0
- package/dist/chunk-JWA5SGCS.js +203 -0
- package/dist/chunk-JWA5SGCS.js.map +1 -0
- package/dist/chunk-JX5YZ4DH.cjs +430 -0
- package/dist/chunk-JX5YZ4DH.cjs.map +1 -0
- package/dist/chunk-KHCBJ7KD.js +42 -0
- package/dist/chunk-KHCBJ7KD.js.map +1 -0
- package/dist/chunk-KU6S7IYV.cjs +210 -0
- package/dist/chunk-KU6S7IYV.cjs.map +1 -0
- package/dist/chunk-LKAIXWK3.js +181 -0
- package/dist/chunk-LKAIXWK3.js.map +1 -0
- package/dist/chunk-LPW3XNC2.js +471 -0
- package/dist/chunk-LPW3XNC2.js.map +1 -0
- package/dist/chunk-M36G6SRP.js +447 -0
- package/dist/chunk-M36G6SRP.js.map +1 -0
- package/dist/chunk-MRXGWL42.cjs +4 -0
- package/dist/chunk-MRXGWL42.cjs.map +1 -0
- package/dist/chunk-NB72XWXQ.cjs +54 -0
- package/dist/chunk-NB72XWXQ.cjs.map +1 -0
- package/dist/chunk-NEJ2PV4C.cjs +211 -0
- package/dist/chunk-NEJ2PV4C.cjs.map +1 -0
- package/dist/chunk-NT6IJH4L.cjs +273 -0
- package/dist/chunk-NT6IJH4L.cjs.map +1 -0
- package/dist/chunk-O5MP52U2.cjs +526 -0
- package/dist/chunk-O5MP52U2.cjs.map +1 -0
- package/dist/chunk-O7PUQLJ3.cjs +818 -0
- package/dist/chunk-O7PUQLJ3.cjs.map +1 -0
- package/dist/chunk-PQHS255G.js +1369 -0
- package/dist/chunk-PQHS255G.js.map +1 -0
- package/dist/chunk-PRYE7AZQ.cjs +1227 -0
- package/dist/chunk-PRYE7AZQ.cjs.map +1 -0
- package/dist/chunk-Q4CDQ2KO.js +21 -0
- package/dist/chunk-Q4CDQ2KO.js.map +1 -0
- package/dist/chunk-QELDJGDK.cjs +1714 -0
- package/dist/chunk-QELDJGDK.cjs.map +1 -0
- package/dist/chunk-QJRP44ZO.js +769 -0
- package/dist/chunk-QJRP44ZO.js.map +1 -0
- package/dist/chunk-QNGNOU4Z.js +29 -0
- package/dist/chunk-QNGNOU4Z.js.map +1 -0
- package/dist/chunk-RJL7RCEM.cjs +159 -0
- package/dist/chunk-RJL7RCEM.cjs.map +1 -0
- package/dist/chunk-RN3RMBJZ.js +1164 -0
- package/dist/chunk-RN3RMBJZ.js.map +1 -0
- package/dist/chunk-S5DMKUWK.cjs +1273 -0
- package/dist/chunk-S5DMKUWK.cjs.map +1 -0
- package/dist/chunk-SES6GDBQ.cjs +624 -0
- package/dist/chunk-SES6GDBQ.cjs.map +1 -0
- package/dist/chunk-TNPDV7I4.cjs +2346 -0
- package/dist/chunk-TNPDV7I4.cjs.map +1 -0
- package/dist/chunk-TZBIY5C3.js +187 -0
- package/dist/chunk-TZBIY5C3.js.map +1 -0
- package/dist/chunk-TZE673G6.js +3 -0
- package/dist/chunk-TZE673G6.js.map +1 -0
- package/dist/chunk-ULXI7A6Q.cjs +1047 -0
- package/dist/chunk-ULXI7A6Q.cjs.map +1 -0
- package/dist/chunk-VIWSWVAW.js +1782 -0
- package/dist/chunk-VIWSWVAW.js.map +1 -0
- package/dist/chunk-VWGNPMJZ.cjs +19 -0
- package/dist/chunk-VWGNPMJZ.cjs.map +1 -0
- package/dist/chunk-WDIBOWAA.js +1054 -0
- package/dist/chunk-WDIBOWAA.js.map +1 -0
- package/dist/chunk-WNG7HRVA.cjs +25 -0
- package/dist/chunk-WNG7HRVA.cjs.map +1 -0
- package/dist/chunk-WNVQ3SMB.cjs +96 -0
- package/dist/chunk-WNVQ3SMB.cjs.map +1 -0
- package/dist/chunk-WRSWH7US.cjs +285 -0
- package/dist/chunk-WRSWH7US.cjs.map +1 -0
- package/dist/chunk-XAMC4S53.js +17 -0
- package/dist/chunk-XAMC4S53.js.map +1 -0
- package/dist/chunk-XNISPHTZ.js +1039 -0
- package/dist/chunk-XNISPHTZ.js.map +1 -0
- package/dist/chunk-Y2PM3FFL.js +3 -0
- package/dist/chunk-Y2PM3FFL.js.map +1 -0
- package/dist/chunk-YBPBK5KI.js +1030 -0
- package/dist/chunk-YBPBK5KI.js.map +1 -0
- package/dist/chunk-YHRG7UOC.js +31 -0
- package/dist/chunk-YHRG7UOC.js.map +1 -0
- package/dist/chunk-YWNYGYI7.cjs +31 -0
- package/dist/chunk-YWNYGYI7.cjs.map +1 -0
- package/dist/chunk-YYV35XOS.js +122 -0
- package/dist/chunk-YYV35XOS.js.map +1 -0
- package/dist/chunk-Z2OL5AJD.cjs +133 -0
- package/dist/chunk-Z2OL5AJD.cjs.map +1 -0
- package/dist/chunk-Z4AZW6FY.js +920 -0
- package/dist/chunk-Z4AZW6FY.js.map +1 -0
- package/dist/chunk-ZDFHA2EC.js +572 -0
- package/dist/chunk-ZDFHA2EC.js.map +1 -0
- package/dist/chunk-ZNZDQAXN.js +175 -0
- package/dist/chunk-ZNZDQAXN.js.map +1 -0
- package/dist/chunk-ZRL2UFTH.cjs +1073 -0
- package/dist/chunk-ZRL2UFTH.cjs.map +1 -0
- package/dist/chunk-ZT77RY6R.js +404 -0
- package/dist/chunk-ZT77RY6R.js.map +1 -0
- package/dist/entries/apps.cjs +155 -0
- package/dist/entries/apps.cjs.map +1 -0
- package/dist/entries/apps.d.cts +283 -0
- package/dist/entries/apps.d.ts +283 -0
- package/dist/entries/apps.js +10 -0
- package/dist/entries/apps.js.map +1 -0
- package/dist/entries/captions.cjs +124 -0
- package/dist/entries/captions.cjs.map +1 -0
- package/dist/entries/captions.d.cts +354 -0
- package/dist/entries/captions.d.ts +354 -0
- package/dist/entries/captions.js +3 -0
- package/dist/entries/captions.js.map +1 -0
- package/dist/entries/catalogs.cjs +165 -0
- package/dist/entries/catalogs.cjs.map +1 -0
- package/dist/entries/catalogs.d.cts +385 -0
- package/dist/entries/catalogs.d.ts +385 -0
- package/dist/entries/catalogs.js +4 -0
- package/dist/entries/catalogs.js.map +1 -0
- package/dist/entries/credits.cjs +592 -0
- package/dist/entries/credits.cjs.map +1 -0
- package/dist/entries/credits.d.cts +1429 -0
- package/dist/entries/credits.d.ts +1429 -0
- package/dist/entries/credits.js +11 -0
- package/dist/entries/credits.js.map +1 -0
- package/dist/entries/edl.cjs +409 -0
- package/dist/entries/edl.cjs.map +1 -0
- package/dist/entries/edl.d.cts +1199 -0
- package/dist/entries/edl.d.ts +1199 -0
- package/dist/entries/edl.js +4 -0
- package/dist/entries/edl.js.map +1 -0
- package/dist/entries/entities.cjs +530 -0
- package/dist/entries/entities.cjs.map +1 -0
- package/dist/entries/entities.d.cts +1371 -0
- package/dist/entries/entities.d.ts +1371 -0
- package/dist/entries/entities.js +5 -0
- package/dist/entries/entities.js.map +1 -0
- package/dist/entries/i18n.cjs +48 -0
- package/dist/entries/i18n.cjs.map +1 -0
- package/dist/entries/i18n.d.cts +69 -0
- package/dist/entries/i18n.d.ts +69 -0
- package/dist/entries/i18n.js +3 -0
- package/dist/entries/i18n.js.map +1 -0
- package/dist/entries/llm-models.cjs +177 -0
- package/dist/entries/llm-models.cjs.map +1 -0
- package/dist/entries/llm-models.d.cts +435 -0
- package/dist/entries/llm-models.d.ts +435 -0
- package/dist/entries/llm-models.js +4 -0
- package/dist/entries/llm-models.js.map +1 -0
- package/dist/entries/media.cjs +335 -0
- package/dist/entries/media.cjs.map +1 -0
- package/dist/entries/media.d.cts +518 -0
- package/dist/entries/media.d.ts +518 -0
- package/dist/entries/media.js +6 -0
- package/dist/entries/media.js.map +1 -0
- package/dist/entries/model-catalog.cjs +247 -0
- package/dist/entries/model-catalog.cjs.map +1 -0
- package/dist/entries/model-catalog.d.cts +202 -0
- package/dist/entries/model-catalog.d.ts +202 -0
- package/dist/entries/model-catalog.js +6 -0
- package/dist/entries/model-catalog.js.map +1 -0
- package/dist/entries/models.cjs +833 -0
- package/dist/entries/models.cjs.map +1 -0
- package/dist/entries/models.d.cts +287 -0
- package/dist/entries/models.d.ts +287 -0
- package/dist/entries/models.js +8 -0
- package/dist/entries/models.js.map +1 -0
- package/dist/entries/nodes.cjs +789 -0
- package/dist/entries/nodes.cjs.map +1 -0
- package/dist/entries/nodes.d.cts +1600 -0
- package/dist/entries/nodes.d.ts +1600 -0
- package/dist/entries/nodes.js +16 -0
- package/dist/entries/nodes.js.map +1 -0
- package/dist/entries/organizations.cjs +80 -0
- package/dist/entries/organizations.cjs.map +1 -0
- package/dist/entries/organizations.d.cts +466 -0
- package/dist/entries/organizations.d.ts +466 -0
- package/dist/entries/organizations.js +3 -0
- package/dist/entries/organizations.js.map +1 -0
- package/dist/entries/pipeline.cjs +594 -0
- package/dist/entries/pipeline.cjs.map +1 -0
- package/dist/entries/pipeline.d.cts +2617 -0
- package/dist/entries/pipeline.d.ts +2617 -0
- package/dist/entries/pipeline.js +5 -0
- package/dist/entries/pipeline.js.map +1 -0
- package/dist/entries/scene3d.cjs +704 -0
- package/dist/entries/scene3d.cjs.map +1 -0
- package/dist/entries/scene3d.d.cts +4284 -0
- package/dist/entries/scene3d.d.ts +4284 -0
- package/dist/entries/scene3d.js +3 -0
- package/dist/entries/scene3d.js.map +1 -0
- package/dist/entries/social.cjs +714 -0
- package/dist/entries/social.cjs.map +1 -0
- package/dist/entries/social.d.cts +1366 -0
- package/dist/entries/social.d.ts +1366 -0
- package/dist/entries/social.js +5 -0
- package/dist/entries/social.js.map +1 -0
- package/dist/entries/types.cjs +13 -0
- package/dist/entries/types.cjs.map +1 -0
- package/dist/entries/types.d.cts +162 -0
- package/dist/entries/types.d.ts +162 -0
- package/dist/entries/types.js +4 -0
- package/dist/entries/types.js.map +1 -0
- package/dist/entries/ugc.cjs +279 -0
- package/dist/entries/ugc.cjs.map +1 -0
- package/dist/entries/ugc.d.cts +575 -0
- package/dist/entries/ugc.d.ts +575 -0
- package/dist/entries/ugc.js +6 -0
- package/dist/entries/ugc.js.map +1 -0
- package/dist/entries/video.cjs +549 -0
- package/dist/entries/video.cjs.map +1 -0
- package/dist/entries/video.d.cts +1791 -0
- package/dist/entries/video.d.ts +1791 -0
- package/dist/entries/video.js +8 -0
- package/dist/entries/video.js.map +1 -0
- package/dist/entries/workflow.cjs +574 -0
- package/dist/entries/workflow.cjs.map +1 -0
- package/dist/entries/workflow.d.cts +1733 -0
- package/dist/entries/workflow.d.ts +1733 -0
- package/dist/entries/workflow.js +5 -0
- package/dist/entries/workflow.js.map +1 -0
- package/dist/fan-out-meta-Bu6VyXcZ.d.cts +19 -0
- package/dist/fan-out-meta-Bu6VyXcZ.d.ts +19 -0
- package/dist/gemini-omni-voices-zeRXxSbZ.d.cts +174 -0
- package/dist/gemini-omni-voices-zeRXxSbZ.d.ts +174 -0
- package/dist/image-overlay-layers-CyBfRhxJ.d.cts +208 -0
- package/dist/image-overlay-layers-CyBfRhxJ.d.ts +208 -0
- package/dist/index.cjs +7731 -26444
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -23733
- package/dist/index.d.ts +32 -23733
- package/dist/index.js +40 -24641
- package/dist/index.js.map +1 -1
- package/dist/model-catalog-flJYaa-g.d.cts +561 -0
- package/dist/model-catalog-flJYaa-g.d.ts +561 -0
- package/dist/presentation-types-0ENOCjoj.d.cts +61 -0
- package/dist/presentation-types-0ENOCjoj.d.ts +61 -0
- package/dist/presentation-utils-BIqiCzSA.d.cts +90 -0
- package/dist/presentation-utils-BdiObtwq.d.ts +90 -0
- package/dist/scene-node-types-DjenYFLO.d.cts +1949 -0
- package/dist/scene-node-types-DjenYFLO.d.ts +1949 -0
- package/dist/supported-fonts-CRoF1gOy.d.cts +16 -0
- package/dist/supported-fonts-CRoF1gOy.d.ts +16 -0
- package/dist/types-BRlFPEru.d.cts +511 -0
- package/dist/types-BRlFPEru.d.ts +511 -0
- package/dist/types-DffyGSy5.d.cts +67 -0
- package/dist/types-DffyGSy5.d.ts +67 -0
- package/package.json +102 -1
- package/src/__tests__/add-captions-plan.test.ts +6 -2
- package/src/__tests__/caption-edge-dash.test.ts +23 -0
- package/src/__tests__/entity-image-handle.test.ts +61 -1
- package/src/__tests__/fixtures/root-exports.baseline.json +4625 -0
- package/src/__tests__/input-field-extra-keys.test.ts +1 -0
- package/src/__tests__/json-kinds.test.ts +10 -0
- package/src/__tests__/model-seed-capability.test.ts +34 -0
- package/src/__tests__/no-internal-imports.test.ts +1 -1
- package/src/__tests__/node-aspect-ratio.test.ts +25 -0
- package/src/__tests__/node-preset-extract.test.ts +8 -0
- package/src/__tests__/node-run-routes.test.ts +63 -0
- package/src/__tests__/node-runtime-keys.test.ts +70 -0
- package/src/__tests__/package-entries.test.ts +50 -0
- package/src/__tests__/pitch-tempo-pricing.test.ts +21 -0
- package/src/__tests__/presentation-utils.test.ts +14 -0
- package/src/__tests__/preview-gate-use-case.test.ts +151 -0
- package/src/__tests__/producer-types.test.ts +15 -0
- package/src/__tests__/run-continuation.test.ts +7 -1
- package/src/__tests__/seedance-draft.test.ts +74 -0
- package/src/__tests__/site-capture-node.test.ts +58 -0
- package/src/__tests__/ugc-clip-saved-list.test.ts +19 -0
- package/src/__tests__/ugc-lane-wires.test.ts +228 -0
- package/src/__tests__/ugc-node-wires.test.ts +606 -0
- package/src/__tests__/ugc-run-state.test.ts +85 -7
- package/src/__tests__/video-analysis-catalog-sync.test.ts +1 -1
- package/src/__tests__/video-analysis-pricing.test.ts +6 -6
- package/src/__tests__/voice-changer-pro-quote.test.ts +79 -0
- package/src/__tests__/workflow-export-strip.test.ts +14 -0
- package/src/add-captions-plan.ts +9 -3
- package/src/caption-edge-dash.ts +33 -0
- package/src/credit-estimators/index.ts +22 -1
- package/src/credit-estimators/pitch-tempo.ts +15 -1
- package/src/credit-estimators/speech.ts +72 -4
- package/src/credit-estimators/unit-quote.ts +52 -0
- package/src/credit-estimators/video-sfx.ts +15 -0
- package/src/credit-estimators/voice-changer-pro-quote.ts +138 -0
- package/src/entity-image-handle.ts +50 -1
- package/src/entries/apps.ts +63 -0
- package/src/entries/captions.ts +34 -0
- package/src/entries/catalogs.ts +65 -0
- package/src/entries/credits.ts +104 -0
- package/src/entries/edl.ts +42 -0
- package/src/entries/entities.ts +144 -0
- package/src/entries/i18n.ts +31 -0
- package/src/entries/llm-models.ts +63 -0
- package/src/entries/media.ts +36 -0
- package/src/entries/model-catalog.ts +89 -0
- package/src/entries/models.ts +266 -0
- package/src/entries/nodes.ts +245 -0
- package/src/entries/organizations.ts +9 -0
- package/src/entries/pipeline.ts +43 -0
- package/src/entries/scene3d.ts +27 -0
- package/src/entries/social.ts +297 -0
- package/src/entries/types.ts +26 -0
- package/src/entries/ugc.ts +14 -0
- package/src/entries/video.ts +59 -0
- package/src/entries/workflow.ts +172 -0
- package/src/fan-out-rows.ts +2 -0
- package/src/index.ts +25 -1838
- package/src/json-kinds.ts +13 -0
- package/src/model-catalog.ts +97 -36
- package/src/model-constants.ts +3 -0
- package/src/node-mappable-fields.ts +1 -0
- package/src/node-preset-export.ts +2 -2
- package/src/node-preset-extract.ts +6 -4
- package/src/node-run-routes.ts +78 -0
- package/src/node-runtime-keys.ts +50 -1
- package/src/normalize-node-params.ts +30 -0
- package/src/presentation-utils.ts +8 -0
- package/src/preview-gate.ts +92 -14
- package/src/producer-types.ts +26 -2
- package/src/run-continuation.ts +21 -0
- package/src/seedance-draft.ts +64 -0
- package/src/site-capture-node.ts +82 -0
- package/src/social-post.ts +13 -0
- package/src/ugc-lane-wires.ts +246 -0
- package/src/ugc-node-wires.ts +653 -0
- package/src/ugc-run-state.ts +65 -8
- package/src/video-analysis-pricing.ts +31 -29
- package/src/workflow-export.ts +3 -1
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Character-mention usage modes — describe HOW the AI should consume a
|
|
3
|
+
* referenced character image. The mode shapes the per-image directive in the
|
|
4
|
+
* assembled prompt (see `usageModeDirective`) so the same character reference
|
|
5
|
+
* can act as a full likeness replacement, a face-only crop, a style donor,
|
|
6
|
+
* etc., without needing different upstream images.
|
|
7
|
+
*
|
|
8
|
+
* The mode source-of-truth lives in two places:
|
|
9
|
+
*
|
|
10
|
+
* 1. **Character node default** — `CharacterNodeData.defaultUsageMode`.
|
|
11
|
+
* Set via the small dropdown in the character node's title row.
|
|
12
|
+
* Propagates into every `ConnectedReference` derived from that node.
|
|
13
|
+
*
|
|
14
|
+
* 2. **Per-mention override** — optional 4th segment in the slug,
|
|
15
|
+
* e.g. `@kira:1:smile:face` overrides the character's default for that
|
|
16
|
+
* specific mention. Parsed by `parseCharacterMentionToken` in
|
|
17
|
+
* `character-mention-slug.ts`.
|
|
18
|
+
*
|
|
19
|
+
* Mode resolution at prompt-build time (in `resolveCharacterMentions`):
|
|
20
|
+
* token.usageMode ?? ref.defaultUsageMode ?? "identical"
|
|
21
|
+
*/
|
|
22
|
+
declare const USAGE_MODES: readonly ["identical", "face", "face-pose", "pose", "emotion", "style", "name", "none"];
|
|
23
|
+
type UsageMode = (typeof USAGE_MODES)[number];
|
|
24
|
+
/** Default mode when neither the slug nor the character node specifies one. */
|
|
25
|
+
declare const DEFAULT_USAGE_MODE: UsageMode;
|
|
26
|
+
/** Type guard — narrows an arbitrary string to `UsageMode` when valid. */
|
|
27
|
+
declare function isUsageMode(s: string): s is UsageMode;
|
|
28
|
+
/**
|
|
29
|
+
* Return the natural-language directive appended to a per-image bullet for the
|
|
30
|
+
* given mode. The text is intentionally explicit so the model knows exactly
|
|
31
|
+
* which aspects of the reference to take and which to derive from the rest of
|
|
32
|
+
* the prompt.
|
|
33
|
+
*
|
|
34
|
+
* `name` and `none` are minimal-intervention modes that return `null` — the
|
|
35
|
+
* caller emits NO trailing directive for them. `name` still includes the
|
|
36
|
+
* character name in the labeled subject (`Image A (shira)`); `none` suppresses
|
|
37
|
+
* the name as well (bare `Image A`) and excludes the character entirely from
|
|
38
|
+
* the top-level "Use these characters:" header when ALL of its mentions are
|
|
39
|
+
* `none`. Use these when the user wants the visual reference to speak for
|
|
40
|
+
* itself without textual bias.
|
|
41
|
+
*
|
|
42
|
+
* Calling sites: `resolveCharacterMentions` (shared/prompt-builder.ts) and the
|
|
43
|
+
* per-character canonical fallback (also in prompt-builder.ts), plus the video
|
|
44
|
+
* mention resolvers on frontend (execute-node.ts) and backend (payload-builder.ts)
|
|
45
|
+
* which mirror the same directive shape.
|
|
46
|
+
*/
|
|
47
|
+
declare function usageModeDirective(mode: UsageMode): string | null;
|
|
48
|
+
/** Human-readable label for the dropdown / badge UI. */
|
|
49
|
+
declare function usageModeLabel(mode: UsageMode): string;
|
|
50
|
+
/**
|
|
51
|
+
* Whether the labeled subject for this mode should include the character name
|
|
52
|
+
* in parens (e.g. `Image A (shira)`) or stay bare (`Image A`). Only `none`
|
|
53
|
+
* returns false — every other mode (including `name`) keeps the name so the
|
|
54
|
+
* model can correlate the bullet with a named entity in the rest of the
|
|
55
|
+
* prompt. Used by `resolveCharacterMentions` to decide the subject form AND to
|
|
56
|
+
* filter the top-level "Use these characters:" header (a character whose
|
|
57
|
+
* mentions are ALL `none` is invisible textually — only the image is
|
|
58
|
+
* attached).
|
|
59
|
+
*/
|
|
60
|
+
declare function usageModeIncludesName(mode: UsageMode): boolean;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Structural entity vocabulary — asset-type/attach-column tuples, reference
|
|
64
|
+
* photo kinds, styles, labels. Product data visible in the UI and required
|
|
65
|
+
* by SDK consumers; deliberately part of the public Apache surface.
|
|
66
|
+
* (The prompt-BUILDING craft lives in @nodaro/prompts.)
|
|
67
|
+
*/
|
|
68
|
+
/**
|
|
69
|
+
* Prompt builders for entity nodes (character, face, object, location).
|
|
70
|
+
*
|
|
71
|
+
* Single source of truth shared between:
|
|
72
|
+
* - Route handlers: `backend/src/routes/generate-{character,face,object,location}.ts`
|
|
73
|
+
* - Backend orchestrator: `backend/src/services/workflow-engine/payload-builder.ts`
|
|
74
|
+
*
|
|
75
|
+
* The route handlers call these when no client-supplied prompt is provided.
|
|
76
|
+
* The orchestrator calls these to build the same prompt that a single-node
|
|
77
|
+
* HTTP call would produce.
|
|
78
|
+
*/
|
|
79
|
+
/**
|
|
80
|
+
* Allowed style values for character / face / object / location entities.
|
|
81
|
+
* Single source of truth: derive Zod enums + TS types from this tuple so the
|
|
82
|
+
* Zod schema, the TS union, the SDK input types, and the CLI flag validator
|
|
83
|
+
* never drift apart.
|
|
84
|
+
*/
|
|
85
|
+
declare const CHARACTER_STYLES: readonly ["realistic", "anime", "3d-pixar", "illustration"];
|
|
86
|
+
type EntityStyle = (typeof CHARACTER_STYLES)[number];
|
|
87
|
+
/**
|
|
88
|
+
* Character asset-type enum — the kinds of variant a user can generate off a
|
|
89
|
+
* character's anchor portrait. Mirrors the literal accepted by
|
|
90
|
+
* `POST /v1/generate-character-asset` (`backend/src/routes/generate-character-asset.ts`)
|
|
91
|
+
* and consumed by the MCP `generate_character` verb (kind="asset") in
|
|
92
|
+
* `backend/src/lib/mcp/tools/verbs-clo.ts`.
|
|
93
|
+
*
|
|
94
|
+
* `angles` is the legacy single-surface alias for `headAngles` — both produce
|
|
95
|
+
* head-and-shoulders portrait framing. `bodyAngles` is the full-body variant.
|
|
96
|
+
* `lighting` is the bucket key (the DB column is `lighting_variations`).
|
|
97
|
+
*/
|
|
98
|
+
declare const CHARACTER_ASSET_TYPES: readonly ["expressions", "poses", "lighting", "angles", "headAngles", "bodyAngles", "custom"];
|
|
99
|
+
type CharacterAssetType = (typeof CHARACTER_ASSET_TYPES)[number];
|
|
100
|
+
/**
|
|
101
|
+
* DB columns the character-asset worker may auto-attach to. Required when
|
|
102
|
+
* `assetType === "custom"` (the worker can't infer the bucket from the asset
|
|
103
|
+
* type); for canonical asset types the column is derived automatically.
|
|
104
|
+
*
|
|
105
|
+
* Mirrors the literal accepted by the route's `attachToColumn` Zod field.
|
|
106
|
+
*/
|
|
107
|
+
declare const CHARACTER_ATTACH_COLUMNS: readonly ["expressions", "poses", "angles", "body_angles", "lighting_variations", "sheets", "detail_closeups", "outfit_variations", "boards"];
|
|
108
|
+
type CharacterAttachColumn = (typeof CHARACTER_ATTACH_COLUMNS)[number];
|
|
109
|
+
/**
|
|
110
|
+
* Canonical variant presets per character asset type — the SINGLE source of
|
|
111
|
+
* truth shared by the `generate-character-asset` route (Zod validation rejects a
|
|
112
|
+
* non-`custom` variant outside this list) and any client building the asset-set
|
|
113
|
+
* UI (e.g. the Studio character creator), so the two can't drift. `custom` has no
|
|
114
|
+
* preset list (free-form variant).
|
|
115
|
+
*/
|
|
116
|
+
declare const CHARACTER_ASSET_VARIANTS: {
|
|
117
|
+
readonly expressions: readonly ["neutral", "smile", "angry", "surprised", "sad", "talking", "laughing", "disgusted", "fearful", "smirk", "crying"];
|
|
118
|
+
readonly poses: readonly ["standing", "walking", "sitting", "running", "crouching", "pointing", "fighting stance", "jumping", "turning"];
|
|
119
|
+
readonly lighting: readonly ["daylight", "night", "dramatic"];
|
|
120
|
+
readonly angles: readonly ["front", "3/4 left", "left profile", "right profile", "3/4 right", "back", "above", "below"];
|
|
121
|
+
readonly headAngles: readonly ["front", "3/4 left", "left profile", "right profile", "3/4 right", "above", "below", "back"];
|
|
122
|
+
readonly bodyAngles: readonly ["front", "3/4 left", "left profile", "right profile", "3/4 right", "back", "above", "below"];
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Location asset-type enum — the kinds of variant a user can generate off a
|
|
126
|
+
* location's anchor establishing shot. Mirrors the literal accepted by
|
|
127
|
+
* `POST /v1/generate-location-asset` (`backend/src/routes/generate-location-asset.ts`)
|
|
128
|
+
* and consumed by the MCP `generate_location` verb (kind="asset").
|
|
129
|
+
*
|
|
130
|
+
* `lighting` is the bucket key (the DB column is `lighting`). `custom` is the
|
|
131
|
+
* free-form bucket where callers must supply `attachToColumn` explicitly since
|
|
132
|
+
* the worker can't infer the destination from the asset type.
|
|
133
|
+
*/
|
|
134
|
+
declare const LOCATION_ASSET_TYPES: readonly ["timeOfDay", "weather", "seasons", "angles", "lighting", "custom"];
|
|
135
|
+
type LocationAssetType = (typeof LOCATION_ASSET_TYPES)[number];
|
|
136
|
+
/**
|
|
137
|
+
* DB columns the location-asset worker may auto-attach to. Required when
|
|
138
|
+
* `assetType === "custom"` (the worker can't infer the bucket from the asset
|
|
139
|
+
* type); for canonical asset types the column is derived automatically.
|
|
140
|
+
*
|
|
141
|
+
* Mirrors the literal accepted by the route's `attachToColumn` Zod field.
|
|
142
|
+
*/
|
|
143
|
+
declare const LOCATION_ATTACH_COLUMNS: readonly ["time_of_day", "weather", "seasons", "angles", "lighting", "atmosphere_motions", "sheets", "detail_closeups"];
|
|
144
|
+
type LocationAttachColumn = (typeof LOCATION_ATTACH_COLUMNS)[number];
|
|
145
|
+
/**
|
|
146
|
+
* Canonical variant presets per LOCATION asset type — hoisted from
|
|
147
|
+
* `backend/src/routes/generate-location-asset.ts` (single source of truth shared
|
|
148
|
+
* with the reference-sheet catalog; Plan 04 switches the route to import this).
|
|
149
|
+
*/
|
|
150
|
+
declare const LOCATION_ASSET_VARIANTS: {
|
|
151
|
+
readonly timeOfDay: readonly ["dawn", "morning", "noon", "afternoon", "golden hour", "dusk", "blue hour", "night", "midnight"];
|
|
152
|
+
readonly weather: readonly ["clear", "cloudy", "light rain", "heavy rain", "storm", "snow", "blizzard", "fog", "mist"];
|
|
153
|
+
readonly seasons: readonly ["spring", "summer", "autumn", "winter"];
|
|
154
|
+
readonly angles: readonly ["wide", "medium", "closeup", "aerial", "low-angle", "eye-level", "bird's-eye", "dutch tilt"];
|
|
155
|
+
readonly lighting: readonly ["soft natural", "harsh sunlight", "golden", "blue hour", "neon", "candlelit", "cinematic", "dramatic chiaroscuro"];
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* Reference-photo kind discriminator — the mood-board roles a user can attach
|
|
159
|
+
* to a location row. Single source of truth shared between:
|
|
160
|
+
* - Backend route Zod enum (`backend/src/routes/locations.ts`)
|
|
161
|
+
* - Backend export/import bundle schema (`backend/src/lib/workflow-assets.ts`)
|
|
162
|
+
* - Frontend Studio picker (`reference-photos-section.tsx`)
|
|
163
|
+
* - Frontend `LocationNodeData.referencePhotos.kind` union (`frontend/src/types/nodes.ts`)
|
|
164
|
+
*
|
|
165
|
+
* `other` is the free-form bucket; the rest are user-curated mood-board roles.
|
|
166
|
+
*/
|
|
167
|
+
declare const LOCATION_REFERENCE_PHOTO_KINDS: readonly ["wide", "interior", "exterior", "detail", "moodBoard", "other"];
|
|
168
|
+
type LocationReferencePhotoKind = (typeof LOCATION_REFERENCE_PHOTO_KINDS)[number];
|
|
169
|
+
/**
|
|
170
|
+
* Human-friendly label for each photo kind, used in prompt subject lines
|
|
171
|
+
* (`Image N (Old Library — wide-angle reference)`) so the model knows the
|
|
172
|
+
* role of each reference photo at generate time. Kept as a separate map
|
|
173
|
+
* from `LOCATION_REFERENCE_PHOTO_KINDS` so labels can be edited without
|
|
174
|
+
* disturbing the kind enum (which is the schema-of-record).
|
|
175
|
+
*/
|
|
176
|
+
declare const LOCATION_REFERENCE_PHOTO_KIND_LABELS: Record<LocationReferencePhotoKind, string>;
|
|
177
|
+
declare function locationReferencePhotoKindLabel(kind: LocationReferencePhotoKind): string;
|
|
178
|
+
/**
|
|
179
|
+
* Reference-photo kinds captured in the Character Studio identity foundation —
|
|
180
|
+
* the SINGLE schema-of-record for the 7 kinds. Previously duplicated across the
|
|
181
|
+
* `generate-character` + `characters` route Zod enums, `character-reference-set.ts`
|
|
182
|
+
* (backend ranking), and `frontend/src/lib/reference-photo-routing.ts` (UI
|
|
183
|
+
* filtering). All of those now derive from this const (build a Zod enum via
|
|
184
|
+
* `z.enum(CHARACTER_REFERENCE_PHOTO_KINDS)` at the backend edge — this package
|
|
185
|
+
* stays zod-free). Also the shape of the DB `characters.reference_photos[].kind`.
|
|
186
|
+
*
|
|
187
|
+
* `other` is the free-form bucket; the rest are curated identity-foundation roles
|
|
188
|
+
* (frontFace + the four rotation views + a full-body shot).
|
|
189
|
+
*/
|
|
190
|
+
declare const CHARACTER_REFERENCE_PHOTO_KINDS: readonly ["frontFace", "sideLeft", "sideRight", "threeQuarterLeft", "threeQuarterRight", "frontBody", "other"];
|
|
191
|
+
type CharacterReferencePhotoKind = (typeof CHARACTER_REFERENCE_PHOTO_KINDS)[number];
|
|
192
|
+
/** A single character reference photo: a URL plus its identity-foundation role. */
|
|
193
|
+
interface CharacterReferencePhoto {
|
|
194
|
+
url: string;
|
|
195
|
+
kind: CharacterReferencePhotoKind;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Reserved name the Character Studio auto-assigns when a user clicks Generate
|
|
199
|
+
* before naming the character. Treated as "no name" by prompt builders so the
|
|
200
|
+
* literal string "Untitled character" never leaks into a generation prompt.
|
|
201
|
+
* Frontend stays in sync via `@nodaro/shared`.
|
|
202
|
+
*/
|
|
203
|
+
declare const PLACEHOLDER_CHARACTER_NAME = "Untitled character";
|
|
204
|
+
declare const OBJECT_ASSET_TYPES: readonly ["angles", "materials", "variations", "motion", "custom"];
|
|
205
|
+
type ObjectAssetType = (typeof OBJECT_ASSET_TYPES)[number];
|
|
206
|
+
/**
|
|
207
|
+
* DB columns the object-asset worker may auto-attach to. Aligns with the
|
|
208
|
+
* `append_object_asset` RPC's CASE/WHEN whitelist (migration 147). Required
|
|
209
|
+
* when `assetType === "custom"`; for canonical asset types the column is
|
|
210
|
+
* derived automatically.
|
|
211
|
+
*/
|
|
212
|
+
declare const OBJECT_ATTACH_COLUMNS: readonly ["angles", "materials", "variations", "motion_clips", "sheets", "detail_closeups"];
|
|
213
|
+
type ObjectAttachColumn = (typeof OBJECT_ATTACH_COLUMNS)[number];
|
|
214
|
+
/** Worker-attachable JSONB asset columns on `creatures` (mirrors OBJECT_ATTACH_COLUMNS;
|
|
215
|
+
* `materials`→`poses`). The append_creature_asset RPC (migration 206) whitelists these. */
|
|
216
|
+
declare const CREATURE_ATTACH_COLUMNS: readonly ["angles", "poses", "variations", "motion_clips", "sheets", "detail_closeups"];
|
|
217
|
+
type CreatureAttachColumn = (typeof CREATURE_ATTACH_COLUMNS)[number];
|
|
218
|
+
/**
|
|
219
|
+
* Canonical variant presets per OBJECT asset type — hoisted from
|
|
220
|
+
* `backend/src/routes/generate-object-asset.ts` so the route, the reference-sheet
|
|
221
|
+
* catalog, and any client share one list and can't drift. (Plan 04 switches the
|
|
222
|
+
* route to import this.) `custom`/`motion` have no preset list.
|
|
223
|
+
*/
|
|
224
|
+
declare const OBJECT_ASSET_VARIANTS: {
|
|
225
|
+
readonly angles: readonly ["front", "side", "top", "back", "three-quarter"];
|
|
226
|
+
readonly materials: readonly ["wood", "metal", "glass", "plastic", "fabric", "stone"];
|
|
227
|
+
readonly variations: readonly ["clean", "weathered", "damaged", "ornate", "minimal"];
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Generic node/edge interfaces for structural subtyping.
|
|
232
|
+
* Both frontend WorkflowNode and backend SimpleNode satisfy these.
|
|
233
|
+
*/
|
|
234
|
+
|
|
235
|
+
interface GenericNode {
|
|
236
|
+
id: string;
|
|
237
|
+
type: string;
|
|
238
|
+
/**
|
|
239
|
+
* Canvas (React-Flow) position. The editor needs it to lay the node out —
|
|
240
|
+
* without it React-Flow stacks every node at (0,0). Optional so non-canvas
|
|
241
|
+
* callers (pure graph data) need not supply it.
|
|
242
|
+
*/
|
|
243
|
+
position?: {
|
|
244
|
+
x: number;
|
|
245
|
+
y: number;
|
|
246
|
+
};
|
|
247
|
+
/** Fixed canvas width the editor applies (e.g. 220 for generate-image/-video). */
|
|
248
|
+
width?: number;
|
|
249
|
+
data: Record<string, unknown>;
|
|
250
|
+
hidden?: boolean;
|
|
251
|
+
}
|
|
252
|
+
interface GenericEdge {
|
|
253
|
+
/** Stable edge id — React-Flow requires one to render the connection. */
|
|
254
|
+
id?: string;
|
|
255
|
+
source: string;
|
|
256
|
+
target: string;
|
|
257
|
+
sourceHandle?: string | null;
|
|
258
|
+
targetHandle?: string | null;
|
|
259
|
+
}
|
|
260
|
+
interface CharacterDef {
|
|
261
|
+
id: string;
|
|
262
|
+
name: string;
|
|
263
|
+
type: "reference" | "description";
|
|
264
|
+
category?: string;
|
|
265
|
+
referenceImageUrl?: string;
|
|
266
|
+
description?: string;
|
|
267
|
+
}
|
|
268
|
+
type IdentityFidelity = "strict" | "balanced" | "loose" | "custom";
|
|
269
|
+
type ReferenceSource = "manual" | "wired-image" | "wired-character" | "wired-face" | "wired-object" | "wired-creature" | "wired-location";
|
|
270
|
+
/** Per-identity user override stored on the consumer node. */
|
|
271
|
+
interface IdentityMeta {
|
|
272
|
+
/** 1-based position of the source image. */
|
|
273
|
+
imageIndex: number;
|
|
274
|
+
/** Role label this entry covers (e.g. "object", "background", "person"). */
|
|
275
|
+
label: string;
|
|
276
|
+
fidelity?: IdentityFidelity;
|
|
277
|
+
/** Free-text directive used when fidelity === "custom" (replaces the preset). */
|
|
278
|
+
customText?: string;
|
|
279
|
+
}
|
|
280
|
+
/** Computed view of a single connected reference, ready for the prompt builder. */
|
|
281
|
+
interface ConnectedReference {
|
|
282
|
+
id: string;
|
|
283
|
+
defaultName: string;
|
|
284
|
+
source: ReferenceSource;
|
|
285
|
+
/** Optional rich text from upstream char/face/object/location node. */
|
|
286
|
+
description?: string;
|
|
287
|
+
url: string;
|
|
288
|
+
/** Slug of the source character (e.g. "kira") when this entry came from a character node. */
|
|
289
|
+
readonly characterSlug?: string;
|
|
290
|
+
/** Variant slug (e.g. "smile"). undefined = canonical/default. */
|
|
291
|
+
readonly variantSlug?: string;
|
|
292
|
+
/**
|
|
293
|
+
* Which character asset bucket this entry came from ("boards", "sheets",
|
|
294
|
+
* "expressions", …); undefined = the canonical portrait entry. DISPLAY
|
|
295
|
+
* metadata only — menus use it to rank rows (boards first) via
|
|
296
|
+
* `sortCharacterEntriesForDisplay`; it never affects payload numbering.
|
|
297
|
+
*/
|
|
298
|
+
readonly bucket?: string;
|
|
299
|
+
/** Character's canonical_description. Set on every entry from the same character (used for dedup). */
|
|
300
|
+
readonly characterCanonicalDescription?: string | null;
|
|
301
|
+
/**
|
|
302
|
+
* Resolved prompt-fragment for the elements (held-prop / styling / text /
|
|
303
|
+
* pickers) wired into the SOURCE character node's Assets/Prompt handle. A
|
|
304
|
+
* mode-INDEPENDENT sibling of `characterCanonicalDescription`: where the
|
|
305
|
+
* canonical description is only emitted for identity-locking modes, this is
|
|
306
|
+
* scene composition ("holding a smartphone…") and rides the character's
|
|
307
|
+
* identity bullet in EVERY mode that emits one (only `none` — which emits no
|
|
308
|
+
* bullet — drops it). Resolved at assembly time from the wiring (never stored
|
|
309
|
+
* on the character record). Stamped onto every entry of the same character so
|
|
310
|
+
* whichever entry produces the primary bullet carries it. Absent/empty →
|
|
311
|
+
* byte-identical to the pre-elementInjection output.
|
|
312
|
+
*/
|
|
313
|
+
readonly elementInjection?: string | null;
|
|
314
|
+
/**
|
|
315
|
+
* Location's canonical_description. Set on every entry derived from a wired
|
|
316
|
+
* Location node (canonical image + future per-variant entries from Phase 2 #2
|
|
317
|
+
* @location:1:variant mention syntax). Mirrors `characterCanonicalDescription`
|
|
318
|
+
* — the directive builder appends this to the `wired-location` ref's subject
|
|
319
|
+
* line when the location's slug isn't in `suppressedCanonicalLocationIds`.
|
|
320
|
+
*/
|
|
321
|
+
readonly locationCanonicalDescription?: string | null;
|
|
322
|
+
/** Slug of the source location (e.g. "old-library") when this entry came from a location node. Used by `suppressedCanonicalLocationIds` filtering. */
|
|
323
|
+
readonly locationSlug?: string;
|
|
324
|
+
/**
|
|
325
|
+
* Variant bucket for per-variant location entries (Phase 2 #2). One of the
|
|
326
|
+
* 6 location asset buckets — "timeOfDay" / "weather" / "seasons" / "angles"
|
|
327
|
+
* / "lighting" / "atmosphereMotions". `undefined` for the canonical
|
|
328
|
+
* main-image entry.
|
|
329
|
+
*
|
|
330
|
+
* Used by `resolveLocationMentions` to find the entry matching a
|
|
331
|
+
* `@oldlibrary:1:weather/rain` mention token (lookup key is
|
|
332
|
+
* `${locationSlug}:${locationVariantBucket}/${locationVariantSlug}`).
|
|
333
|
+
*/
|
|
334
|
+
readonly locationVariantBucket?: string;
|
|
335
|
+
/**
|
|
336
|
+
* Variant slug for per-variant location entries (e.g. "rain", "neon"). The
|
|
337
|
+
* raw variant `name` from the location node's bucket array, slugified via
|
|
338
|
+
* `locationMentionSlug` so the resolver match is case-insensitive and
|
|
339
|
+
* whitespace-tolerant (`"light rain"` ↔ `"light-rain"`). `undefined` for
|
|
340
|
+
* the canonical main-image entry.
|
|
341
|
+
*/
|
|
342
|
+
readonly locationVariantSlug?: string;
|
|
343
|
+
/** Display name for the variant in autocomplete UI (e.g. "rain", "canonical"). */
|
|
344
|
+
readonly locationVariantDisplayName?: string;
|
|
345
|
+
/**
|
|
346
|
+
* For user-uploaded reference photos on wired locations, the photo's
|
|
347
|
+
* `kind` — one of the 6 `LocationReferencePhotoKind` values. Drives the
|
|
348
|
+
* prompt-builder's subject-line annotation so the model knows the role
|
|
349
|
+
* (wide-angle establishing shot vs. interior detail vs. mood-board
|
|
350
|
+
* context). Mirrors `locationVariantBucket` but for user-uploaded refs
|
|
351
|
+
* instead of generated per-variant assets.
|
|
352
|
+
*
|
|
353
|
+
* Reference-photo entries have THIS field set but `locationVariantBucket`
|
|
354
|
+
* unset — that's how the connectedReferences filter at
|
|
355
|
+
* `prompt-builder.ts` lines ~1011-1016 distinguishes them from
|
|
356
|
+
* mention-only variant entries. Reference photos AUTO-ATTACH (they're
|
|
357
|
+
* not gated by `@-mention`), so the filter must NOT drop them.
|
|
358
|
+
*/
|
|
359
|
+
readonly locationReferencePhotoKind?: LocationReferencePhotoKind;
|
|
360
|
+
/** The asset's own description (per-variant). null for canonical entries. */
|
|
361
|
+
readonly variantDescription?: string | null;
|
|
362
|
+
/** Display name for the variant in autocomplete UI (e.g. "smile", "canonical"). */
|
|
363
|
+
readonly variantDisplayName?: string;
|
|
364
|
+
/**
|
|
365
|
+
* Character node's `defaultUsageMode` propagated into every entry derived
|
|
366
|
+
* from that node. Used by `resolveCharacterMentions` as the fallback when
|
|
367
|
+
* the per-mention slug doesn't carry an explicit mode override. Absent for
|
|
368
|
+
* non-character refs and for character entries built without a node context
|
|
369
|
+
* (e.g. character-definition-only entries in legacy paths).
|
|
370
|
+
*/
|
|
371
|
+
readonly defaultUsageMode?: UsageMode;
|
|
372
|
+
/**
|
|
373
|
+
* The reference's HYBRID `defaultRole` (the role-dropdown pick: a
|
|
374
|
+
* `REFERENCE_ROLE_PRESETS[source]` value or a sanitized Custom slug)
|
|
375
|
+
* propagated into every entry derived from that node. Read via
|
|
376
|
+
* `resolveDefaultRole(defaultRole, defaultUsageMode, source)` at the hybrid
|
|
377
|
+
* resolver sites — it takes precedence over `defaultUsageMode`. Absent for
|
|
378
|
+
* nodes that never set a role (fall back to the `defaultUsageMode`-derived
|
|
379
|
+
* role, then the source default).
|
|
380
|
+
*
|
|
381
|
+
* Written by the character node's role dropdown, and accepted from any source
|
|
382
|
+
* on the wire (`connectedReferenceSchema`). The LOCATION paths read it through
|
|
383
|
+
* their own `resolveLocationRole` chain rather than `resolveDefaultRole` — the
|
|
384
|
+
* location role vocabulary is mode-derived and slug-normalized — so it is NOT
|
|
385
|
+
* a character-only field: do not re-narrow this doc to characters.
|
|
386
|
+
*/
|
|
387
|
+
readonly defaultRole?: string;
|
|
388
|
+
/**
|
|
389
|
+
* Marks an entry as a user-attached "extra reference image" (see the
|
|
390
|
+
* `extraRefs` field on Generate/Modify/Image-to-Video/Text-to-Video/Video-to-Video
|
|
391
|
+
* node data types in the frontend). Extras are auto-attached to the worker
|
|
392
|
+
* `referenceImageUrls` AND get a dedicated directive line in the assembled
|
|
393
|
+
* prompt:
|
|
394
|
+
* - character-sourced extras of an already-emitted character →
|
|
395
|
+
* "Image N is the same subject as Image M, <description>."
|
|
396
|
+
* - character-sourced extras of a previously-unseen character →
|
|
397
|
+
* a canonical-style directive using the description as the descriptor
|
|
398
|
+
* - manual-sourced extras →
|
|
399
|
+
* "Image N (reference): <description>."
|
|
400
|
+
*
|
|
401
|
+
* The `description` field carries the per-ref free-text the user typed.
|
|
402
|
+
* Without this marker, character refs with a variantSlug are treated as
|
|
403
|
+
* autocomplete-only (the legacy behavior — unmentioned variants don't
|
|
404
|
+
* auto-attach), which is exactly what we DON'T want for explicit extras.
|
|
405
|
+
*/
|
|
406
|
+
readonly isExtraRef?: boolean;
|
|
407
|
+
readonly loraReplicateVersion?: string | null;
|
|
408
|
+
readonly loraTriggerWord?: string | null;
|
|
409
|
+
readonly loraTrainingStatus?: string | null;
|
|
410
|
+
/**
|
|
411
|
+
* Optional, opt-in identity-lock for this reference. When `enabled === true`,
|
|
412
|
+
* a short fidelity line is prepended so the model preserves the subject's
|
|
413
|
+
* exact identity. `text` overrides the built-in default (use `{ref}` as the
|
|
414
|
+
* placeholder for the reference's binding, e.g. "reference image A"). Default
|
|
415
|
+
* is OFF for EVERY source: absent or `enabled === false` emits no lock line.
|
|
416
|
+
* The single new structured-shape field for external (API/MCP/SDK) parity.
|
|
417
|
+
*/
|
|
418
|
+
readonly identityLock?: {
|
|
419
|
+
enabled: boolean;
|
|
420
|
+
text?: string;
|
|
421
|
+
};
|
|
422
|
+
/**
|
|
423
|
+
* PER-USE identity description for this reference — what the caller wants the
|
|
424
|
+
* model told about this subject THIS TIME, overriding whatever the entity's
|
|
425
|
+
* library record says. Wherever a reference's identity description already
|
|
426
|
+
* renders (the legacy identity bullet's `— <desc>` part, a `{image:N:label}`
|
|
427
|
+
* directive's descriptor) it WINS over `characterCanonicalDescription` /
|
|
428
|
+
* `locationCanonicalDescription` / `description`; where the HYBRID format
|
|
429
|
+
* renders no description at all, it adds one trailing `<binding> — <override>.`
|
|
430
|
+
* line instead.
|
|
431
|
+
*
|
|
432
|
+
* The two formats are deliberately ASYMMETRIC where a reference renders no
|
|
433
|
+
* directive at all — a plain upload (`manual` / `wired-image`, non-extra) that
|
|
434
|
+
* is neither `@`-mentioned nor `{image:N}`-covered: the LEGACY format stays
|
|
435
|
+
* silent, and the override is not surfaced there (a bullet would force a
|
|
436
|
+
* fidelity verb onto an opaque image); the HYBRID format — the production
|
|
437
|
+
* default — adds the trailing line above for it.
|
|
438
|
+
*
|
|
439
|
+
* DISTINCT from `description`, which stays the reference's own label slot (the
|
|
440
|
+
* free text an extra-ref row / an upstream node carries) — a caller that edits
|
|
441
|
+
* the wording for ONE use writes it here, so the label is untouched and
|
|
442
|
+
* dropping the override falls back to the library wording. Absent →
|
|
443
|
+
* byte-identical to a caller that never sent it.
|
|
444
|
+
*/
|
|
445
|
+
readonly descriptionOverride?: string;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* A reference the caller can NAME and DESCRIBE but has no media for — a cast
|
|
449
|
+
* role no entity has been bound to yet, an analysis slot, a character the author
|
|
450
|
+
* has only written down. It carries no `url`, so it attaches no reference image
|
|
451
|
+
* and claims no `@image_N` seat; it reaches the model purely as prose
|
|
452
|
+
* (`<Name> — <description>.`), rendered in ONE place per lane by
|
|
453
|
+
* `@nodaro/prompts`' `renderDescribedReferenceLines`.
|
|
454
|
+
*
|
|
455
|
+
* Correlation with the prompt body is BY NAME: the caller leaves the name in the
|
|
456
|
+
* prose (never an indexed `@slug:N` mention — that grammar is url-gated) and the
|
|
457
|
+
* described line tells the model who that name is.
|
|
458
|
+
*/
|
|
459
|
+
interface DescribedReference {
|
|
460
|
+
/** Display name exactly as it appears in the prompt prose (e.g. "Natalie"). */
|
|
461
|
+
readonly name: string;
|
|
462
|
+
/** What the model should picture when it reads that name. */
|
|
463
|
+
readonly description: string;
|
|
464
|
+
}
|
|
465
|
+
/** Default label per source — used by `@` autocomplete and inventory fallback. */
|
|
466
|
+
declare const DEFAULT_LABEL_BY_SOURCE: Record<ReferenceSource, string>;
|
|
467
|
+
interface SceneCharacterEntry {
|
|
468
|
+
readonly assetId: string;
|
|
469
|
+
readonly mood: string;
|
|
470
|
+
readonly action: string;
|
|
471
|
+
readonly positionInFrame?: "left" | "center" | "right" | "foreground" | "background";
|
|
472
|
+
}
|
|
473
|
+
interface SceneLocationEntry {
|
|
474
|
+
readonly assetId: string;
|
|
475
|
+
readonly name?: string;
|
|
476
|
+
readonly isPrimary?: boolean;
|
|
477
|
+
readonly timeOfDay?: string;
|
|
478
|
+
readonly weather?: string;
|
|
479
|
+
readonly lighting?: string;
|
|
480
|
+
}
|
|
481
|
+
interface SceneObjectEntry {
|
|
482
|
+
readonly assetId: string;
|
|
483
|
+
readonly description?: string;
|
|
484
|
+
}
|
|
485
|
+
interface SceneDialogueEntry {
|
|
486
|
+
readonly characterName: string;
|
|
487
|
+
readonly text: string;
|
|
488
|
+
readonly emotion?: string;
|
|
489
|
+
}
|
|
490
|
+
interface SceneData {
|
|
491
|
+
readonly shotType: string;
|
|
492
|
+
readonly cameraAngle: string;
|
|
493
|
+
readonly aspectRatio: string;
|
|
494
|
+
readonly characters: readonly SceneCharacterEntry[];
|
|
495
|
+
readonly locations?: readonly SceneLocationEntry[];
|
|
496
|
+
readonly objects: readonly SceneObjectEntry[];
|
|
497
|
+
readonly mood: readonly string[];
|
|
498
|
+
readonly visualStyle: string;
|
|
499
|
+
readonly depthOfField: string;
|
|
500
|
+
readonly lensType: string;
|
|
501
|
+
readonly cameraMovement: string;
|
|
502
|
+
readonly colorPalette: readonly string[];
|
|
503
|
+
readonly summary: string;
|
|
504
|
+
readonly dialogue?: readonly SceneDialogueEntry[];
|
|
505
|
+
readonly directorNotes?: string;
|
|
506
|
+
readonly timeOfDay: string;
|
|
507
|
+
readonly weather: string;
|
|
508
|
+
readonly lighting: string;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
export { type ObjectAttachColumn as A, type UsageMode as B, CHARACTER_ASSET_TYPES as C, DEFAULT_LABEL_BY_SOURCE as D, type EntityStyle as E, isUsageMode as F, type GenericEdge as G, locationReferencePhotoKindLabel as H, type IdentityFidelity as I, usageModeDirective as J, usageModeIncludesName as K, LOCATION_ASSET_TYPES as L, usageModeLabel as M, OBJECT_ASSET_TYPES as O, PLACEHOLDER_CHARACTER_NAME as P, type ReferenceSource as R, type SceneData as S, USAGE_MODES as U, CHARACTER_ASSET_VARIANTS as a, CHARACTER_ATTACH_COLUMNS as b, CHARACTER_REFERENCE_PHOTO_KINDS as c, CHARACTER_STYLES as d, CREATURE_ATTACH_COLUMNS as e, type CharacterAssetType as f, type CharacterAttachColumn as g, type CharacterDef as h, type CharacterReferencePhoto as i, type CharacterReferencePhotoKind as j, type ConnectedReference as k, type CreatureAttachColumn as l, DEFAULT_USAGE_MODE as m, type DescribedReference as n, type GenericNode as o, type IdentityMeta as p, LOCATION_ASSET_VARIANTS as q, LOCATION_ATTACH_COLUMNS as r, LOCATION_REFERENCE_PHOTO_KINDS as s, LOCATION_REFERENCE_PHOTO_KIND_LABELS as t, type LocationAssetType as u, type LocationAttachColumn as v, type LocationReferencePhotoKind as w, OBJECT_ASSET_VARIANTS as x, OBJECT_ATTACH_COLUMNS as y, type ObjectAssetType as z };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* i18n types and language registry for parameter-node pickers.
|
|
3
|
+
*
|
|
4
|
+
* Architecture:
|
|
5
|
+
* - English is the canonical source — every catalog entry has its `label` and
|
|
6
|
+
* `description` in English in the catalog file itself.
|
|
7
|
+
* - Non-English translations live in sidecar files under
|
|
8
|
+
* `packages/shared/src/i18n/<catalog>.<locale>.ts`.
|
|
9
|
+
* - Each sidecar exports a `Record<id, LocalizedEntry>` keyed by entry id.
|
|
10
|
+
* - Lazy-loaded per locale via dynamic import so users only download languages
|
|
11
|
+
* they actually use.
|
|
12
|
+
*
|
|
13
|
+
* Translation rules (see picker-i18n design doc):
|
|
14
|
+
* - `id` and `promptHint` are NEVER translated.
|
|
15
|
+
* - `label` is translated when it's a common noun/adjective (e.g. "Smoky Eye"
|
|
16
|
+
* → "Ojo Ahumado"). Proper names, brand names, model numbers, technical
|
|
17
|
+
* units, and Latin/Italian/Japanese cinematography jargon stay in their
|
|
18
|
+
* canonical form (e.g. Tim Walker, Sony A7III, chiaroscuro, anamorphic,
|
|
19
|
+
* Y2K, ukiyo-e).
|
|
20
|
+
* - `description` is translated freely, with proper nouns preserved inside.
|
|
21
|
+
*
|
|
22
|
+
* Search rule: pickers filter on the union of current-locale + English text,
|
|
23
|
+
* so a French user typing "soie" finds "Silk" AND a French user typing "silk"
|
|
24
|
+
* still finds it.
|
|
25
|
+
*/
|
|
26
|
+
/** Canonical language code (BCP-47 or simplified two-letter). */
|
|
27
|
+
type LocaleId = "en" | "es" | "fr" | "de" | "pt-BR" | "ru" | "hi" | "ja" | "ko" | "zh-CN" | "he" | "ar";
|
|
28
|
+
/** Reading direction. RTL languages need `dir="rtl"` on the picker container. */
|
|
29
|
+
type LocaleDirection = "ltr" | "rtl";
|
|
30
|
+
interface LanguageDefinition {
|
|
31
|
+
readonly id: LocaleId;
|
|
32
|
+
/** English name shown in language pickers when current locale is English. */
|
|
33
|
+
readonly englishName: string;
|
|
34
|
+
/** Native name shown to native speakers (in their own script). */
|
|
35
|
+
readonly nativeName: string;
|
|
36
|
+
/** Two-letter or short code displayed inside the small locale chip. */
|
|
37
|
+
readonly shortCode: string;
|
|
38
|
+
/** Reading direction. */
|
|
39
|
+
readonly dir: LocaleDirection;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Master language registry. Order = display order in the language picker
|
|
43
|
+
* dropdown. English first as canonical default, then mainstream LTR
|
|
44
|
+
* languages, then RTL languages last.
|
|
45
|
+
*/
|
|
46
|
+
declare const LANGUAGES: ReadonlyArray<LanguageDefinition>;
|
|
47
|
+
declare const NON_EN_LOCALE_IDS: ReadonlyArray<Exclude<LocaleId, "en">>;
|
|
48
|
+
declare function getLocaleDirection(id: string | undefined | null): LocaleDirection;
|
|
49
|
+
/**
|
|
50
|
+
* A single localized entry. Either or both fields may be missing — the
|
|
51
|
+
* resolver falls back to the canonical English `label` / `description` from
|
|
52
|
+
* the catalog when a field is absent.
|
|
53
|
+
*/
|
|
54
|
+
interface LocalizedEntry {
|
|
55
|
+
readonly label?: string;
|
|
56
|
+
readonly description?: string;
|
|
57
|
+
}
|
|
58
|
+
/** Map shape exported by every sidecar file (`<catalog>.<locale>.ts`). */
|
|
59
|
+
type LocaleCatalogMap = Readonly<Record<string, LocalizedEntry>>;
|
|
60
|
+
/**
|
|
61
|
+
* The catalogs that have i18n sidecar files. Each name corresponds to a
|
|
62
|
+
* shared catalog file (e.g. "mood" → `packages/shared/src/mood.ts`).
|
|
63
|
+
*/
|
|
64
|
+
declare const I18N_CATALOGS: readonly ["action-fx", "aesthetic", "animals", "atmosphere", "backdrop", "camera-format", "camera-motions", "character-fx", "character-motion", "color-look", "composition-effects", "era", "exposure-settings", "framing", "furniture", "held-prop", "instrumentation", "lens", "lighting", "loop-subject", "materials", "mood", "music-genre", "music-mood", "person", "photo-genre", "photographer", "pose", "post-process-effects", "render-quality", "seasons", "setting", "style", "styling", "temporal", "transitions", "vehicles", "voice-character", "voice-delivery", "weapons"];
|
|
65
|
+
type I18nCatalogId = (typeof I18N_CATALOGS)[number];
|
|
66
|
+
|
|
67
|
+
export { type I18nCatalogId as I, LANGUAGES as L, NON_EN_LOCALE_IDS as N, type LocaleCatalogMap as a, type LocaleDirection as b, type LocaleId as c, getLocaleDirection as g };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* i18n types and language registry for parameter-node pickers.
|
|
3
|
+
*
|
|
4
|
+
* Architecture:
|
|
5
|
+
* - English is the canonical source — every catalog entry has its `label` and
|
|
6
|
+
* `description` in English in the catalog file itself.
|
|
7
|
+
* - Non-English translations live in sidecar files under
|
|
8
|
+
* `packages/shared/src/i18n/<catalog>.<locale>.ts`.
|
|
9
|
+
* - Each sidecar exports a `Record<id, LocalizedEntry>` keyed by entry id.
|
|
10
|
+
* - Lazy-loaded per locale via dynamic import so users only download languages
|
|
11
|
+
* they actually use.
|
|
12
|
+
*
|
|
13
|
+
* Translation rules (see picker-i18n design doc):
|
|
14
|
+
* - `id` and `promptHint` are NEVER translated.
|
|
15
|
+
* - `label` is translated when it's a common noun/adjective (e.g. "Smoky Eye"
|
|
16
|
+
* → "Ojo Ahumado"). Proper names, brand names, model numbers, technical
|
|
17
|
+
* units, and Latin/Italian/Japanese cinematography jargon stay in their
|
|
18
|
+
* canonical form (e.g. Tim Walker, Sony A7III, chiaroscuro, anamorphic,
|
|
19
|
+
* Y2K, ukiyo-e).
|
|
20
|
+
* - `description` is translated freely, with proper nouns preserved inside.
|
|
21
|
+
*
|
|
22
|
+
* Search rule: pickers filter on the union of current-locale + English text,
|
|
23
|
+
* so a French user typing "soie" finds "Silk" AND a French user typing "silk"
|
|
24
|
+
* still finds it.
|
|
25
|
+
*/
|
|
26
|
+
/** Canonical language code (BCP-47 or simplified two-letter). */
|
|
27
|
+
type LocaleId = "en" | "es" | "fr" | "de" | "pt-BR" | "ru" | "hi" | "ja" | "ko" | "zh-CN" | "he" | "ar";
|
|
28
|
+
/** Reading direction. RTL languages need `dir="rtl"` on the picker container. */
|
|
29
|
+
type LocaleDirection = "ltr" | "rtl";
|
|
30
|
+
interface LanguageDefinition {
|
|
31
|
+
readonly id: LocaleId;
|
|
32
|
+
/** English name shown in language pickers when current locale is English. */
|
|
33
|
+
readonly englishName: string;
|
|
34
|
+
/** Native name shown to native speakers (in their own script). */
|
|
35
|
+
readonly nativeName: string;
|
|
36
|
+
/** Two-letter or short code displayed inside the small locale chip. */
|
|
37
|
+
readonly shortCode: string;
|
|
38
|
+
/** Reading direction. */
|
|
39
|
+
readonly dir: LocaleDirection;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Master language registry. Order = display order in the language picker
|
|
43
|
+
* dropdown. English first as canonical default, then mainstream LTR
|
|
44
|
+
* languages, then RTL languages last.
|
|
45
|
+
*/
|
|
46
|
+
declare const LANGUAGES: ReadonlyArray<LanguageDefinition>;
|
|
47
|
+
declare const NON_EN_LOCALE_IDS: ReadonlyArray<Exclude<LocaleId, "en">>;
|
|
48
|
+
declare function getLocaleDirection(id: string | undefined | null): LocaleDirection;
|
|
49
|
+
/**
|
|
50
|
+
* A single localized entry. Either or both fields may be missing — the
|
|
51
|
+
* resolver falls back to the canonical English `label` / `description` from
|
|
52
|
+
* the catalog when a field is absent.
|
|
53
|
+
*/
|
|
54
|
+
interface LocalizedEntry {
|
|
55
|
+
readonly label?: string;
|
|
56
|
+
readonly description?: string;
|
|
57
|
+
}
|
|
58
|
+
/** Map shape exported by every sidecar file (`<catalog>.<locale>.ts`). */
|
|
59
|
+
type LocaleCatalogMap = Readonly<Record<string, LocalizedEntry>>;
|
|
60
|
+
/**
|
|
61
|
+
* The catalogs that have i18n sidecar files. Each name corresponds to a
|
|
62
|
+
* shared catalog file (e.g. "mood" → `packages/shared/src/mood.ts`).
|
|
63
|
+
*/
|
|
64
|
+
declare const I18N_CATALOGS: readonly ["action-fx", "aesthetic", "animals", "atmosphere", "backdrop", "camera-format", "camera-motions", "character-fx", "character-motion", "color-look", "composition-effects", "era", "exposure-settings", "framing", "furniture", "held-prop", "instrumentation", "lens", "lighting", "loop-subject", "materials", "mood", "music-genre", "music-mood", "person", "photo-genre", "photographer", "pose", "post-process-effects", "render-quality", "seasons", "setting", "style", "styling", "temporal", "transitions", "vehicles", "voice-character", "voice-delivery", "weapons"];
|
|
65
|
+
type I18nCatalogId = (typeof I18N_CATALOGS)[number];
|
|
66
|
+
|
|
67
|
+
export { type I18nCatalogId as I, LANGUAGES as L, NON_EN_LOCALE_IDS as N, type LocaleCatalogMap as a, type LocaleDirection as b, type LocaleId as c, getLocaleDirection as g };
|