@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
package/README.md
CHANGED
|
@@ -23,6 +23,23 @@ npm install @nodaro/shared
|
|
|
23
23
|
- **Cinematography descriptors** — camera motions, framings, lenses, lightings, aesthetics, atmospheres
|
|
24
24
|
- **Credit / monetization helpers** — `buildCreditModelIdentifier`, `calculateMonetizationMarkup`
|
|
25
25
|
|
|
26
|
+
## Subpath entries
|
|
27
|
+
|
|
28
|
+
The root `@nodaro/shared` exports everything. Each domain is also published as
|
|
29
|
+
its own entry point, which loads only that domain's modules:
|
|
30
|
+
|
|
31
|
+
`@nodaro/shared/apps`, `/captions`, `/catalogs`, `/credits`, `/edl`,
|
|
32
|
+
`/entities`, `/i18n`, `/llm-models`, `/media`, `/model-catalog`, `/models`,
|
|
33
|
+
`/nodes`, `/organizations`, `/pipeline`, `/scene3d`, `/social`, `/types`,
|
|
34
|
+
`/ugc`, `/video`, `/workflow`
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
import { LLM_MODELS } from "@nodaro/shared/llm-models"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The root is the union of the entries, and a value imported from an entry is
|
|
41
|
+
the same instance as the one imported from the root.
|
|
42
|
+
|
|
26
43
|
## Stability
|
|
27
44
|
|
|
28
45
|
The exports are re-used by `@nodaro/sdk` and the official Nodaro frontend. Most consumers should depend on `@nodaro/sdk` and use its re-exports rather than importing from `@nodaro/shared` directly.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/image-overlay-platforms.ts
|
|
4
|
+
var YT_BANNER_ALL = { x: (2560 - 1546) / 2 / 2560, y: (1440 - 423) / 2 / 1440, w: 1546 / 2560, h: 423 / 1440 };
|
|
5
|
+
var OVERLAY_PLATFORMS = [
|
|
6
|
+
{ id: "youtube-thumbnail", label: "YouTube thumbnail", width: 1280, height: 720, safe: { x: 0, y: 0, w: 1, h: 0.86 }, note: "The bottom-right corner carries the duration badge." },
|
|
7
|
+
{
|
|
8
|
+
id: "youtube-banner",
|
|
9
|
+
label: "YouTube channel banner",
|
|
10
|
+
width: 2560,
|
|
11
|
+
height: 1440,
|
|
12
|
+
safe: YT_BANNER_ALL,
|
|
13
|
+
zones: [
|
|
14
|
+
{ id: "tv", x: 0, y: 0, w: 1, h: 1 },
|
|
15
|
+
{ id: "desktop", x: 0, y: (1440 - 423) / 2 / 1440, w: 1, h: 423 / 1440 },
|
|
16
|
+
{ id: "all", ...YT_BANNER_ALL }
|
|
17
|
+
],
|
|
18
|
+
note: "TV shows the whole banner, desktop a 2560\xD7423 strip, phones only the centre 1546\xD7423."
|
|
19
|
+
},
|
|
20
|
+
{ id: "linkedin-company", label: "LinkedIn company cover", width: 1128, height: 191, safe: { x: 0.18, y: 0, w: 0.82, h: 1 }, note: "The company logo sits over the left ~200px." },
|
|
21
|
+
{ id: "linkedin-personal", label: "LinkedIn personal cover", width: 1584, height: 396, safe: { x: 0.24, y: 0, w: 0.76, h: 0.9 }, note: "The profile photo covers the bottom-left." },
|
|
22
|
+
{ id: "x-header", label: "X / Twitter header", width: 1500, height: 500, safe: { x: 0.2, y: 0.05, w: 0.78, h: 0.9 }, note: "The profile photo covers the bottom-left." },
|
|
23
|
+
{ id: "facebook-cover", label: "Facebook page cover", width: 820, height: 312, safe: { x: 0.05, y: 0.08, w: 0.9, h: 0.84 } },
|
|
24
|
+
{ id: "instagram-post", label: "Instagram post (1:1)", width: 1080, height: 1080 },
|
|
25
|
+
{ id: "instagram-portrait", label: "Instagram post (4:5)", width: 1080, height: 1350 },
|
|
26
|
+
{ id: "instagram-story", label: "Instagram / TikTok story (9:16)", width: 1080, height: 1920, safe: { x: 0, y: 250 / 1920, w: 1, h: (1920 - 500) / 1920 }, note: "The top and bottom 250px sit under the story UI." },
|
|
27
|
+
{ id: "open-graph", label: "Link preview (Open Graph)", width: 1200, height: 630 },
|
|
28
|
+
{ id: "presentation", label: "Presentation slide (16:9)", width: 1920, height: 1080 },
|
|
29
|
+
{ id: "a4-print", label: "Print A4 @300dpi", width: 2480, height: 3508, safe: { x: 0.05, y: 0.05, w: 0.9, h: 0.9 }, note: "5% bleed margin." }
|
|
30
|
+
];
|
|
31
|
+
var OVERLAY_PLATFORM_IDS = OVERLAY_PLATFORMS.map((p) => p.id);
|
|
32
|
+
function overlayPlatformById(id) {
|
|
33
|
+
return id ? OVERLAY_PLATFORMS.find((p) => p.id === id) : void 0;
|
|
34
|
+
}
|
|
35
|
+
var OVERLAY_MAX_VARIANTS = OVERLAY_PLATFORMS.length;
|
|
36
|
+
var OVERLAY_VARIANT_HANDLE_PREFIX = "variant:";
|
|
37
|
+
function overlayVariantHandle(platformId) {
|
|
38
|
+
return `${OVERLAY_VARIANT_HANDLE_PREFIX}${platformId}`;
|
|
39
|
+
}
|
|
40
|
+
function overlayVariantIdFromHandle(handle) {
|
|
41
|
+
if (!handle || !handle.startsWith(OVERLAY_VARIANT_HANDLE_PREFIX)) return null;
|
|
42
|
+
const id = handle.slice(OVERLAY_VARIANT_HANDLE_PREFIX.length);
|
|
43
|
+
return overlayPlatformById(id) ? id : null;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
exports.OVERLAY_MAX_VARIANTS = OVERLAY_MAX_VARIANTS;
|
|
47
|
+
exports.OVERLAY_PLATFORMS = OVERLAY_PLATFORMS;
|
|
48
|
+
exports.OVERLAY_PLATFORM_IDS = OVERLAY_PLATFORM_IDS;
|
|
49
|
+
exports.OVERLAY_VARIANT_HANDLE_PREFIX = OVERLAY_VARIANT_HANDLE_PREFIX;
|
|
50
|
+
exports.overlayPlatformById = overlayPlatformById;
|
|
51
|
+
exports.overlayVariantHandle = overlayVariantHandle;
|
|
52
|
+
exports.overlayVariantIdFromHandle = overlayVariantIdFromHandle;
|
|
53
|
+
//# sourceMappingURL=chunk-2NIQO2J3.cjs.map
|
|
54
|
+
//# sourceMappingURL=chunk-2NIQO2J3.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/image-overlay-platforms.ts"],"names":[],"mappings":"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","file":"chunk-2NIQO2J3.cjs","sourcesContent":["/**\n * Image Overlay — platform canvas presets. Picking one sets the output canvas\n * to the platform's pixel size and draws its SAFE AREA in the preview (the\n * part of the image every surface actually shows — a YouTube banner is\n * cropped to a 1546×423 strip on phones, a LinkedIn personal cover has the\n * profile photo over its bottom-left, an Instagram story hides the top and\n * bottom under the UI). The same ids drive \"export also for\" — one\n * composition rendered into several platform sizes in one run.\n *\n * Safe areas are FRACTIONS of the canvas (x, y, w, h in 0..1). Sizes are the\n * platforms' documented recommendations as of 2026-09.\n */\nexport interface OverlayPlatformPreset {\n readonly id: string\n readonly label: string\n readonly width: number\n readonly height: number\n /** The always-visible region, as fractions of the canvas. Absent = whole canvas. */\n readonly safe?: { readonly x: number; readonly y: number; readonly w: number; readonly h: number }\n /** Per-device viewports drawn as nested boxes (the YouTube banner shows TV /\n * desktop / every device). `safe` is the innermost one. Ids are stable\n * keys the UI localises; absent = only `safe` is drawn. */\n readonly zones?: readonly OverlayPlatformZone[]\n readonly note?: string\n}\n\nexport interface OverlayPlatformZone {\n readonly id: \"tv\" | \"desktop\" | \"all\"\n readonly x: number\n readonly y: number\n readonly w: number\n readonly h: number\n}\n\nconst YT_BANNER_ALL = { x: (2560 - 1546) / 2 / 2560, y: (1440 - 423) / 2 / 1440, w: 1546 / 2560, h: 423 / 1440 }\n\nexport const OVERLAY_PLATFORMS: readonly OverlayPlatformPreset[] = [\n { id: \"youtube-thumbnail\", label: \"YouTube thumbnail\", width: 1280, height: 720, safe: { x: 0, y: 0, w: 1, h: 0.86 }, note: \"The bottom-right corner carries the duration badge.\" },\n {\n id: \"youtube-banner\", label: \"YouTube channel banner\", width: 2560, height: 1440,\n safe: YT_BANNER_ALL,\n zones: [\n { id: \"tv\", x: 0, y: 0, w: 1, h: 1 },\n { id: \"desktop\", x: 0, y: (1440 - 423) / 2 / 1440, w: 1, h: 423 / 1440 },\n { id: \"all\", ...YT_BANNER_ALL },\n ],\n note: \"TV shows the whole banner, desktop a 2560×423 strip, phones only the centre 1546×423.\",\n },\n { id: \"linkedin-company\", label: \"LinkedIn company cover\", width: 1128, height: 191, safe: { x: 0.18, y: 0, w: 0.82, h: 1 }, note: \"The company logo sits over the left ~200px.\" },\n { id: \"linkedin-personal\", label: \"LinkedIn personal cover\", width: 1584, height: 396, safe: { x: 0.24, y: 0, w: 0.76, h: 0.9 }, note: \"The profile photo covers the bottom-left.\" },\n { id: \"x-header\", label: \"X / Twitter header\", width: 1500, height: 500, safe: { x: 0.2, y: 0.05, w: 0.78, h: 0.9 }, note: \"The profile photo covers the bottom-left.\" },\n { id: \"facebook-cover\", label: \"Facebook page cover\", width: 820, height: 312, safe: { x: 0.05, y: 0.08, w: 0.9, h: 0.84 } },\n { id: \"instagram-post\", label: \"Instagram post (1:1)\", width: 1080, height: 1080 },\n { id: \"instagram-portrait\", label: \"Instagram post (4:5)\", width: 1080, height: 1350 },\n { id: \"instagram-story\", label: \"Instagram / TikTok story (9:16)\", width: 1080, height: 1920, safe: { x: 0, y: 250 / 1920, w: 1, h: (1920 - 500) / 1920 }, note: \"The top and bottom 250px sit under the story UI.\" },\n { id: \"open-graph\", label: \"Link preview (Open Graph)\", width: 1200, height: 630 },\n { id: \"presentation\", label: \"Presentation slide (16:9)\", width: 1920, height: 1080 },\n { id: \"a4-print\", label: \"Print A4 @300dpi\", width: 2480, height: 3508, safe: { x: 0.05, y: 0.05, w: 0.9, h: 0.9 }, note: \"5% bleed margin.\" },\n] as const\n\nexport type OverlayPlatformId = (typeof OVERLAY_PLATFORMS)[number][\"id\"]\nexport const OVERLAY_PLATFORM_IDS = OVERLAY_PLATFORMS.map((p) => p.id) as unknown as readonly [OverlayPlatformId, ...OverlayPlatformId[]]\n\nexport function overlayPlatformById(id: string | undefined | null): OverlayPlatformPreset | undefined {\n return id ? OVERLAY_PLATFORMS.find((p) => p.id === id) : undefined\n}\n\n/** How many extra platform renders one run may produce — every platform in\n * the registry, so \"all of them\" is one run. The node's handle column is\n * sized for this (image-overlay-handles.test.ts pins it). */\nexport const OVERLAY_MAX_VARIANTS = OVERLAY_PLATFORMS.length\n\n/**\n * Every platform ticked under \"export also for\" is ALSO a source handle on\n * the node — `variant:<platformId>` — so the X header can feed an X publisher\n * while the YouTube thumbnail feeds YouTube, in one run. The main `image`\n * handle stays the primary composite.\n */\nexport const OVERLAY_VARIANT_HANDLE_PREFIX = \"variant:\"\nexport function overlayVariantHandle(platformId: string): string {\n return `${OVERLAY_VARIANT_HANDLE_PREFIX}${platformId}`\n}\n/** The platform id a variant handle names, or null for any other handle. */\nexport function overlayVariantIdFromHandle(handle: string | null | undefined): string | null {\n if (!handle || !handle.startsWith(OVERLAY_VARIANT_HANDLE_PREFIX)) return null\n const id = handle.slice(OVERLAY_VARIANT_HANDLE_PREFIX.length)\n return overlayPlatformById(id) ? id : null\n}\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/types.ts
|
|
4
|
+
var DEFAULT_LABEL_BY_SOURCE = {
|
|
5
|
+
// Media references default to "ref-only" — the empty label, i.e. a bare
|
|
6
|
+
// {image:N} token that injects only "reference image A" (image) / "@image_N"
|
|
7
|
+
// (video) with no descriptive role phrase. Pick a role on the pill to change.
|
|
8
|
+
"manual": "",
|
|
9
|
+
"wired-image": "",
|
|
10
|
+
"wired-character": "person",
|
|
11
|
+
"wired-face": "face",
|
|
12
|
+
"wired-object": "object",
|
|
13
|
+
// A bound Creature (animal/beast/monster) — its directive reads as a living
|
|
14
|
+
// subject ("match anatomy, markings…"), not a prop. See CREATURE_LABELS in
|
|
15
|
+
// prompt-builder.ts.
|
|
16
|
+
"wired-creature": "creature",
|
|
17
|
+
// A PLACE, NOT A BACKDROP (2026-08-05). This defaulted to "background", which
|
|
18
|
+
// `roleToPhrase` renders as "the background from reference image B" — and the
|
|
19
|
+
// image models read that as "paste this behind the subject". Measured on
|
|
20
|
+
// gpt-image-2 (character + location, 4 draws per arm): with "background" every
|
|
21
|
+
// draw was a cut-out composite — an indoor-lit subject over a stock beach, no
|
|
22
|
+
// cast shadow, ignoring the asked-for action. Changing ONLY this word put the
|
|
23
|
+
// subject inside the scene with ground contact and a matching sun. "background"
|
|
24
|
+
// remains a curated pick in REFERENCE_ROLE_PRESETS for the genuine backdrop
|
|
25
|
+
// case; it is no longer what every location silently gets. Nodes that stored a
|
|
26
|
+
// role explicitly are untouched — `resolveDefaultRole` prefers the explicit value.
|
|
27
|
+
"wired-location": "location"
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
exports.DEFAULT_LABEL_BY_SOURCE = DEFAULT_LABEL_BY_SOURCE;
|
|
31
|
+
//# sourceMappingURL=chunk-2OJIVO7R.cjs.map
|
|
32
|
+
//# sourceMappingURL=chunk-2OJIVO7R.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/types.ts"],"names":[],"mappings":";;;AAsQO,IAAM,uBAAA,GAA2D;AAAA;AAAA;AAAA;AAAA,EAItE,QAAA,EAAU,EAAA;AAAA,EACV,aAAA,EAAe,EAAA;AAAA,EACf,iBAAA,EAAmB,QAAA;AAAA,EACnB,YAAA,EAAc,MAAA;AAAA,EACd,cAAA,EAAgB,QAAA;AAAA;AAAA;AAAA;AAAA,EAIhB,gBAAA,EAAkB,UAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWlB,gBAAA,EAAkB;AACpB","file":"chunk-2OJIVO7R.cjs","sourcesContent":["/**\n * Generic node/edge interfaces for structural subtyping.\n * Both frontend WorkflowNode and backend SimpleNode satisfy these.\n */\n\nimport type { UsageMode } from \"./character-usage-mode.js\"\nimport type { LocationReferencePhotoKind } from \"./entity-asset-types.js\"\n\nexport interface GenericNode {\n id: string\n type: string\n /**\n * Canvas (React-Flow) position. The editor needs it to lay the node out —\n * without it React-Flow stacks every node at (0,0). Optional so non-canvas\n * callers (pure graph data) need not supply it.\n */\n position?: { x: number; y: number }\n /** Fixed canvas width the editor applies (e.g. 220 for generate-image/-video). */\n width?: number\n data: Record<string, unknown>\n hidden?: boolean\n}\n\nexport interface GenericEdge {\n /** Stable edge id — React-Flow requires one to render the connection. */\n id?: string\n source: string\n target: string\n sourceHandle?: string | null\n targetHandle?: string | null\n}\n\nexport interface CharacterDef {\n id: string\n name: string\n type: \"reference\" | \"description\"\n category?: string\n referenceImageUrl?: string\n description?: string\n}\n\n// ---------------------------------------------------------------------------\n// Reference image metadata.\n//\n// An \"identity\" = (imageIndex, label) — what role this image plays at a given\n// mention. The same image can appear under multiple identities (e.g. image 1\n// used both as `:dragon` and as `:background`). Tokens in the prompt are\n// `{image:N:label}`, with `{image:N}` as a backward-compat positional ref.\n// ---------------------------------------------------------------------------\n\nexport type IdentityFidelity = \"strict\" | \"balanced\" | \"loose\" | \"custom\"\n\nexport type ReferenceSource =\n | \"manual\"\n | \"wired-image\"\n | \"wired-character\"\n | \"wired-face\"\n | \"wired-object\"\n | \"wired-creature\"\n | \"wired-location\"\n\n/** Per-identity user override stored on the consumer node. */\nexport interface IdentityMeta {\n /** 1-based position of the source image. */\n imageIndex: number\n /** Role label this entry covers (e.g. \"object\", \"background\", \"person\"). */\n label: string\n fidelity?: IdentityFidelity\n /** Free-text directive used when fidelity === \"custom\" (replaces the preset). */\n customText?: string\n}\n\n/** Computed view of a single connected reference, ready for the prompt builder. */\nexport interface ConnectedReference {\n id: string\n defaultName: string\n source: ReferenceSource\n /** Optional rich text from upstream char/face/object/location node. */\n description?: string\n url: string\n /** Slug of the source character (e.g. \"kira\") when this entry came from a character node. */\n readonly characterSlug?: string\n /** Variant slug (e.g. \"smile\"). undefined = canonical/default. */\n readonly variantSlug?: string\n /**\n * Which character asset bucket this entry came from (\"boards\", \"sheets\",\n * \"expressions\", …); undefined = the canonical portrait entry. DISPLAY\n * metadata only — menus use it to rank rows (boards first) via\n * `sortCharacterEntriesForDisplay`; it never affects payload numbering.\n */\n readonly bucket?: string\n /** Character's canonical_description. Set on every entry from the same character (used for dedup). */\n readonly characterCanonicalDescription?: string | null\n /**\n * Resolved prompt-fragment for the elements (held-prop / styling / text /\n * pickers) wired into the SOURCE character node's Assets/Prompt handle. A\n * mode-INDEPENDENT sibling of `characterCanonicalDescription`: where the\n * canonical description is only emitted for identity-locking modes, this is\n * scene composition (\"holding a smartphone…\") and rides the character's\n * identity bullet in EVERY mode that emits one (only `none` — which emits no\n * bullet — drops it). Resolved at assembly time from the wiring (never stored\n * on the character record). Stamped onto every entry of the same character so\n * whichever entry produces the primary bullet carries it. Absent/empty →\n * byte-identical to the pre-elementInjection output.\n */\n readonly elementInjection?: string | null\n /**\n * Location's canonical_description. Set on every entry derived from a wired\n * Location node (canonical image + future per-variant entries from Phase 2 #2\n * @location:1:variant mention syntax). Mirrors `characterCanonicalDescription`\n * — the directive builder appends this to the `wired-location` ref's subject\n * line when the location's slug isn't in `suppressedCanonicalLocationIds`.\n */\n readonly locationCanonicalDescription?: string | null\n /** Slug of the source location (e.g. \"old-library\") when this entry came from a location node. Used by `suppressedCanonicalLocationIds` filtering. */\n readonly locationSlug?: string\n /**\n * Variant bucket for per-variant location entries (Phase 2 #2). One of the\n * 6 location asset buckets — \"timeOfDay\" / \"weather\" / \"seasons\" / \"angles\"\n * / \"lighting\" / \"atmosphereMotions\". `undefined` for the canonical\n * main-image entry.\n *\n * Used by `resolveLocationMentions` to find the entry matching a\n * `@oldlibrary:1:weather/rain` mention token (lookup key is\n * `${locationSlug}:${locationVariantBucket}/${locationVariantSlug}`).\n */\n readonly locationVariantBucket?: string\n /**\n * Variant slug for per-variant location entries (e.g. \"rain\", \"neon\"). The\n * raw variant `name` from the location node's bucket array, slugified via\n * `locationMentionSlug` so the resolver match is case-insensitive and\n * whitespace-tolerant (`\"light rain\"` ↔ `\"light-rain\"`). `undefined` for\n * the canonical main-image entry.\n */\n readonly locationVariantSlug?: string\n /** Display name for the variant in autocomplete UI (e.g. \"rain\", \"canonical\"). */\n readonly locationVariantDisplayName?: string\n /**\n * For user-uploaded reference photos on wired locations, the photo's\n * `kind` — one of the 6 `LocationReferencePhotoKind` values. Drives the\n * prompt-builder's subject-line annotation so the model knows the role\n * (wide-angle establishing shot vs. interior detail vs. mood-board\n * context). Mirrors `locationVariantBucket` but for user-uploaded refs\n * instead of generated per-variant assets.\n *\n * Reference-photo entries have THIS field set but `locationVariantBucket`\n * unset — that's how the connectedReferences filter at\n * `prompt-builder.ts` lines ~1011-1016 distinguishes them from\n * mention-only variant entries. Reference photos AUTO-ATTACH (they're\n * not gated by `@-mention`), so the filter must NOT drop them.\n */\n readonly locationReferencePhotoKind?: LocationReferencePhotoKind\n /** The asset's own description (per-variant). null for canonical entries. */\n readonly variantDescription?: string | null\n /** Display name for the variant in autocomplete UI (e.g. \"smile\", \"canonical\"). */\n readonly variantDisplayName?: string\n /**\n * Character node's `defaultUsageMode` propagated into every entry derived\n * from that node. Used by `resolveCharacterMentions` as the fallback when\n * the per-mention slug doesn't carry an explicit mode override. Absent for\n * non-character refs and for character entries built without a node context\n * (e.g. character-definition-only entries in legacy paths).\n */\n readonly defaultUsageMode?: UsageMode\n /**\n * The reference's HYBRID `defaultRole` (the role-dropdown pick: a\n * `REFERENCE_ROLE_PRESETS[source]` value or a sanitized Custom slug)\n * propagated into every entry derived from that node. Read via\n * `resolveDefaultRole(defaultRole, defaultUsageMode, source)` at the hybrid\n * resolver sites — it takes precedence over `defaultUsageMode`. Absent for\n * nodes that never set a role (fall back to the `defaultUsageMode`-derived\n * role, then the source default).\n *\n * Written by the character node's role dropdown, and accepted from any source\n * on the wire (`connectedReferenceSchema`). The LOCATION paths read it through\n * their own `resolveLocationRole` chain rather than `resolveDefaultRole` — the\n * location role vocabulary is mode-derived and slug-normalized — so it is NOT\n * a character-only field: do not re-narrow this doc to characters.\n */\n readonly defaultRole?: string\n /**\n * Marks an entry as a user-attached \"extra reference image\" (see the\n * `extraRefs` field on Generate/Modify/Image-to-Video/Text-to-Video/Video-to-Video\n * node data types in the frontend). Extras are auto-attached to the worker\n * `referenceImageUrls` AND get a dedicated directive line in the assembled\n * prompt:\n * - character-sourced extras of an already-emitted character →\n * \"Image N is the same subject as Image M, <description>.\"\n * - character-sourced extras of a previously-unseen character →\n * a canonical-style directive using the description as the descriptor\n * - manual-sourced extras →\n * \"Image N (reference): <description>.\"\n *\n * The `description` field carries the per-ref free-text the user typed.\n * Without this marker, character refs with a variantSlug are treated as\n * autocomplete-only (the legacy behavior — unmentioned variants don't\n * auto-attach), which is exactly what we DON'T want for explicit extras.\n */\n readonly isExtraRef?: boolean\n // ─── Character LoRA training (Cloud edition) ──────────────────────────────\n // Propagated from CharacterNodeData on the upstream character node. Used\n // by selectLoraRoutingForMentions (`@nodaro/shared` + backend mirror) to\n // decide whether to route generate-image through `flux-lora-character`\n // instead of reference-image injection.\n readonly loraReplicateVersion?: string | null\n readonly loraTriggerWord?: string | null\n readonly loraTrainingStatus?: string | null\n /**\n * Optional, opt-in identity-lock for this reference. When `enabled === true`,\n * a short fidelity line is prepended so the model preserves the subject's\n * exact identity. `text` overrides the built-in default (use `{ref}` as the\n * placeholder for the reference's binding, e.g. \"reference image A\"). Default\n * is OFF for EVERY source: absent or `enabled === false` emits no lock line.\n * The single new structured-shape field for external (API/MCP/SDK) parity.\n */\n readonly identityLock?: { enabled: boolean; text?: string }\n /**\n * PER-USE identity description for this reference — what the caller wants the\n * model told about this subject THIS TIME, overriding whatever the entity's\n * library record says. Wherever a reference's identity description already\n * renders (the legacy identity bullet's `— <desc>` part, a `{image:N:label}`\n * directive's descriptor) it WINS over `characterCanonicalDescription` /\n * `locationCanonicalDescription` / `description`; where the HYBRID format\n * renders no description at all, it adds one trailing `<binding> — <override>.`\n * line instead.\n *\n * The two formats are deliberately ASYMMETRIC where a reference renders no\n * directive at all — a plain upload (`manual` / `wired-image`, non-extra) that\n * is neither `@`-mentioned nor `{image:N}`-covered: the LEGACY format stays\n * silent, and the override is not surfaced there (a bullet would force a\n * fidelity verb onto an opaque image); the HYBRID format — the production\n * default — adds the trailing line above for it.\n *\n * DISTINCT from `description`, which stays the reference's own label slot (the\n * free text an extra-ref row / an upstream node carries) — a caller that edits\n * the wording for ONE use writes it here, so the label is untouched and\n * dropping the override falls back to the library wording. Absent →\n * byte-identical to a caller that never sent it.\n */\n readonly descriptionOverride?: string\n}\n\n/**\n * A reference the caller can NAME and DESCRIBE but has no media for — a cast\n * role no entity has been bound to yet, an analysis slot, a character the author\n * has only written down. It carries no `url`, so it attaches no reference image\n * and claims no `@image_N` seat; it reaches the model purely as prose\n * (`<Name> — <description>.`), rendered in ONE place per lane by\n * `@nodaro/prompts`' `renderDescribedReferenceLines`.\n *\n * Correlation with the prompt body is BY NAME: the caller leaves the name in the\n * prose (never an indexed `@slug:N` mention — that grammar is url-gated) and the\n * described line tells the model who that name is.\n */\nexport interface DescribedReference {\n /** Display name exactly as it appears in the prompt prose (e.g. \"Natalie\"). */\n readonly name: string\n /** What the model should picture when it reads that name. */\n readonly description: string\n}\n\n/** Default label per source — used by `@` autocomplete and inventory fallback. */\nexport const DEFAULT_LABEL_BY_SOURCE: Record<ReferenceSource, string> = {\n // Media references default to \"ref-only\" — the empty label, i.e. a bare\n // {image:N} token that injects only \"reference image A\" (image) / \"@image_N\"\n // (video) with no descriptive role phrase. Pick a role on the pill to change.\n \"manual\": \"\",\n \"wired-image\": \"\",\n \"wired-character\": \"person\",\n \"wired-face\": \"face\",\n \"wired-object\": \"object\",\n // A bound Creature (animal/beast/monster) — its directive reads as a living\n // subject (\"match anatomy, markings…\"), not a prop. See CREATURE_LABELS in\n // prompt-builder.ts.\n \"wired-creature\": \"creature\",\n // A PLACE, NOT A BACKDROP (2026-08-05). This defaulted to \"background\", which\n // `roleToPhrase` renders as \"the background from reference image B\" — and the\n // image models read that as \"paste this behind the subject\". Measured on\n // gpt-image-2 (character + location, 4 draws per arm): with \"background\" every\n // draw was a cut-out composite — an indoor-lit subject over a stock beach, no\n // cast shadow, ignoring the asked-for action. Changing ONLY this word put the\n // subject inside the scene with ground contact and a matching sun. \"background\"\n // remains a curated pick in REFERENCE_ROLE_PRESETS for the genuine backdrop\n // case; it is no longer what every location silently gets. Nodes that stored a\n // role explicitly are untouched — `resolveDefaultRole` prefers the explicit value.\n \"wired-location\": \"location\",\n}\n\n// ---------------------------------------------------------------------------\n// Scene node data — minimal interface for buildScenePrompt.\n// Frontend SceneNodeDataType satisfies this via structural subtyping.\n// Backend casts Record<string, unknown> node data to this.\n// ---------------------------------------------------------------------------\n\nexport interface SceneCharacterEntry {\n readonly assetId: string\n readonly mood: string\n readonly action: string\n readonly positionInFrame?: \"left\" | \"center\" | \"right\" | \"foreground\" | \"background\"\n}\n\nexport interface SceneLocationEntry {\n readonly assetId: string\n readonly name?: string\n readonly isPrimary?: boolean\n readonly timeOfDay?: string\n readonly weather?: string\n readonly lighting?: string\n}\n\nexport interface SceneObjectEntry {\n readonly assetId: string\n readonly description?: string\n}\n\nexport interface SceneDialogueEntry {\n readonly characterName: string\n readonly text: string\n readonly emotion?: string\n}\n\nexport interface SceneData {\n readonly shotType: string\n readonly cameraAngle: string\n readonly aspectRatio: string\n readonly characters: readonly SceneCharacterEntry[]\n readonly locations?: readonly SceneLocationEntry[]\n readonly objects: readonly SceneObjectEntry[]\n readonly mood: readonly string[]\n readonly visualStyle: string\n readonly depthOfField: string\n readonly lensType: string\n readonly cameraMovement: string\n readonly colorPalette: readonly string[]\n readonly summary: string\n readonly dialogue?: readonly SceneDialogueEntry[]\n readonly directorNotes?: string\n readonly timeOfDay: string\n readonly weather: string\n readonly lighting: string\n}\n"]}
|