@nodaro/shared 3.31.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 -27084
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -24198
- package/dist/index.d.ts +32 -24198
- package/dist/index.js +40 -25220
- 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__/fixtures/root-exports.baseline.json +4625 -0
- package/src/__tests__/input-field-extra-keys.test.ts +1 -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-runtime-keys.test.ts +9 -0
- package/src/__tests__/package-entries.test.ts +50 -0
- package/src/__tests__/pitch-tempo-pricing.test.ts +21 -0
- package/src/__tests__/preview-gate-use-case.test.ts +151 -0
- package/src/__tests__/run-continuation.test.ts +7 -1
- package/src/__tests__/site-capture-node.test.ts +58 -0
- package/src/__tests__/ugc-lane-wires.test.ts +228 -0
- package/src/__tests__/ugc-node-wires.test.ts +9 -3
- package/src/__tests__/ugc-run-state.test.ts +5 -4
- 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/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 +2 -0
- 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 -1845
- package/src/json-kinds.ts +4 -0
- package/src/model-catalog.ts +36 -34
- package/src/node-mappable-fields.ts +1 -0
- package/src/node-run-routes.ts +2 -0
- package/src/node-runtime-keys.ts +8 -0
- package/src/normalize-node-params.ts +30 -0
- package/src/presentation-utils.ts +5 -0
- package/src/preview-gate.ts +92 -14
- package/src/producer-types.ts +16 -2
- package/src/run-continuation.ts +21 -0
- package/src/site-capture-node.ts +82 -0
- package/src/ugc-lane-wires.ts +246 -0
- package/src/ugc-node-wires.ts +37 -7
- package/src/ugc-run-state.ts +5 -3
- package/src/video-analysis-pricing.ts +31 -29
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { o as GenericNode, G as GenericEdge } from './types-BRlFPEru.cjs';
|
|
2
|
+
import { P as PresentationItem } from './presentation-types-0ENOCjoj.cjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Presentation / API utilities — pure logic, no React deps.
|
|
6
|
+
* Shared between frontend (presentation mode) and backend (API schema generation).
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
declare const INPUT_NODE_TYPES: Set<string>;
|
|
10
|
+
type OutputType = "image" | "video" | "audio" | "text" | "data";
|
|
11
|
+
/** Get nodes that act as user inputs (text prompts, uploads, parameters). */
|
|
12
|
+
declare function getInputNodes<T extends GenericNode>(nodes: T[], curatedOnly?: boolean): T[];
|
|
13
|
+
/** Get leaf/media-producing nodes that represent workflow outputs. */
|
|
14
|
+
declare function getOutputNodes<T extends GenericNode>(nodes: T[], edges: GenericEdge[], curatedOnly?: boolean): T[];
|
|
15
|
+
/**
|
|
16
|
+
* Map node type to its output media type.
|
|
17
|
+
*
|
|
18
|
+
* The four literal sets above are read FIRST and win: they are the presentation
|
|
19
|
+
* classifier's own opinion, including for dual-mode nodes whose default medium
|
|
20
|
+
* is not their handle set (voice-changer and dubbing are audio here even though
|
|
21
|
+
* they can emit video).
|
|
22
|
+
*
|
|
23
|
+
* Anything they do not name falls through to the producer vocabularies the
|
|
24
|
+
* canvas validators and the orchestrator already maintain
|
|
25
|
+
* (`packages/shared/src/producer-types.ts`). Those sets are what a new media
|
|
26
|
+
* node MUST join for its outputs to connect at all, so deriving the tail from
|
|
27
|
+
* them is what stops this map from silently drifting behind the node catalogue
|
|
28
|
+
* — which it had (3D Render Pro, Generate Video, Generate Video Pro and a dozen
|
|
29
|
+
* ffmpeg nodes all read as `"data"`, so a published app rendered them as a JSON
|
|
30
|
+
* blob and `/v1` app schemas declared the wrong output type).
|
|
31
|
+
*
|
|
32
|
+
* `DYNAMIC_PRODUCER_TYPES` is deliberately NOT consulted: a node whose medium
|
|
33
|
+
* is decided at run time has no static answer, and `"data"` is the honest one.
|
|
34
|
+
*/
|
|
35
|
+
declare function getOutputType(nodeType: string | undefined): OutputType;
|
|
36
|
+
/** Extract the result URL or text from a node's data. */
|
|
37
|
+
declare function getNodeResult(nodeData: Record<string, unknown>): {
|
|
38
|
+
url?: string;
|
|
39
|
+
text?: string;
|
|
40
|
+
};
|
|
41
|
+
/** Human-readable label for a node. */
|
|
42
|
+
declare function getNodeLabel(node: GenericNode): string;
|
|
43
|
+
interface InputFieldSchema {
|
|
44
|
+
key: string;
|
|
45
|
+
type: "text" | "image-url" | "video-url" | "audio-url" | "select" | "number";
|
|
46
|
+
options?: string[];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Extra API-settable keys for node types whose card writes more than one field
|
|
50
|
+
* (INPUT_FIELD_MAP is one key per node type). Read by extract-app-inputs and the
|
|
51
|
+
* app runner; every key here must be in UGC_OVERRIDABLE_FIELDS for a UGC type.
|
|
52
|
+
*/
|
|
53
|
+
declare const INPUT_FIELD_EXTRA_KEYS: Readonly<Record<string, readonly InputFieldSchema[]>>;
|
|
54
|
+
/** The extra override fields of a node type (none for most types). */
|
|
55
|
+
declare function getInputFieldExtraKeys(nodeType: string): readonly InputFieldSchema[];
|
|
56
|
+
/** Get the overridable field schema for an input node type. */
|
|
57
|
+
declare function getInputFieldSchema(nodeType: string): InputFieldSchema | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Shallow-merge run-time input overrides (a published app's inputs, an API-token
|
|
60
|
+
* run, MCP `run_app` / `run_workflow` inputs, a wired component handle) over a
|
|
61
|
+
* node's SAVED data — the one merge every such lane must use.
|
|
62
|
+
*
|
|
63
|
+
* `metadata` holds facts measured FROM the node's media (its length, its
|
|
64
|
+
* dimensions). When an override swaps that media — the node's primary input
|
|
65
|
+
* field is a media url (`INPUT_FIELD_MAP`) and the override changes it — the
|
|
66
|
+
* snapshot's facts describe a file that is no longer there, so they are dropped
|
|
67
|
+
* unless the override supplies its own. Left behind, a publisher's
|
|
68
|
+
* `metadata.durationSeconds` outranks the run's own transcript as Edit Plan's
|
|
69
|
+
* duration basis and under-buckets a caller's longer episode: an estimate that
|
|
70
|
+
* passes the balance precheck for a run the reserve then refuses.
|
|
71
|
+
*
|
|
72
|
+
* Schema-driven on purpose: a new media input node is covered by its
|
|
73
|
+
* `INPUT_FIELD_MAP` row, with no list to remember here.
|
|
74
|
+
*
|
|
75
|
+
* An override sent under a renamed exposed-field key (an app published before
|
|
76
|
+
* the rename) lands on the node's current field — `canonicalizeOverrideKeys`.
|
|
77
|
+
*/
|
|
78
|
+
declare function mergeNodeInputOverrides(nodeType: string | undefined, data: Record<string, unknown>, overrides: Record<string, unknown>): Record<string, unknown>;
|
|
79
|
+
/** Migrate a legacy string[] order to PresentationItem[]. */
|
|
80
|
+
declare function migrateToItems(order: string[] | undefined): PresentationItem[] | undefined;
|
|
81
|
+
/** Strip nested groups — groups may only contain non-group items. */
|
|
82
|
+
declare function validateNoNestedGroups(items: PresentationItem[]): PresentationItem[];
|
|
83
|
+
/** Recursively flatten all items, unwrapping groups. */
|
|
84
|
+
declare function flattenItems(items: PresentationItem[]): PresentationItem[];
|
|
85
|
+
/** Get the sortable/unique ID for a PresentationItem. */
|
|
86
|
+
declare function getItemSortId(item: PresentationItem): string;
|
|
87
|
+
/** Remove items whose nodeId no longer exists in the workflow. */
|
|
88
|
+
declare function cleanOrphanedItems(items: PresentationItem[], nodeIds: Set<string>): PresentationItem[];
|
|
89
|
+
|
|
90
|
+
export { INPUT_FIELD_EXTRA_KEYS as I, type OutputType as O, INPUT_NODE_TYPES as a, type InputFieldSchema as b, cleanOrphanedItems as c, getInputFieldSchema as d, getInputNodes as e, flattenItems as f, getInputFieldExtraKeys as g, getItemSortId as h, getNodeLabel as i, getNodeResult as j, getOutputNodes as k, getOutputType as l, mergeNodeInputOverrides as m, migrateToItems as n, validateNoNestedGroups as v };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { o as GenericNode, G as GenericEdge } from './types-BRlFPEru.js';
|
|
2
|
+
import { P as PresentationItem } from './presentation-types-0ENOCjoj.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Presentation / API utilities — pure logic, no React deps.
|
|
6
|
+
* Shared between frontend (presentation mode) and backend (API schema generation).
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
declare const INPUT_NODE_TYPES: Set<string>;
|
|
10
|
+
type OutputType = "image" | "video" | "audio" | "text" | "data";
|
|
11
|
+
/** Get nodes that act as user inputs (text prompts, uploads, parameters). */
|
|
12
|
+
declare function getInputNodes<T extends GenericNode>(nodes: T[], curatedOnly?: boolean): T[];
|
|
13
|
+
/** Get leaf/media-producing nodes that represent workflow outputs. */
|
|
14
|
+
declare function getOutputNodes<T extends GenericNode>(nodes: T[], edges: GenericEdge[], curatedOnly?: boolean): T[];
|
|
15
|
+
/**
|
|
16
|
+
* Map node type to its output media type.
|
|
17
|
+
*
|
|
18
|
+
* The four literal sets above are read FIRST and win: they are the presentation
|
|
19
|
+
* classifier's own opinion, including for dual-mode nodes whose default medium
|
|
20
|
+
* is not their handle set (voice-changer and dubbing are audio here even though
|
|
21
|
+
* they can emit video).
|
|
22
|
+
*
|
|
23
|
+
* Anything they do not name falls through to the producer vocabularies the
|
|
24
|
+
* canvas validators and the orchestrator already maintain
|
|
25
|
+
* (`packages/shared/src/producer-types.ts`). Those sets are what a new media
|
|
26
|
+
* node MUST join for its outputs to connect at all, so deriving the tail from
|
|
27
|
+
* them is what stops this map from silently drifting behind the node catalogue
|
|
28
|
+
* — which it had (3D Render Pro, Generate Video, Generate Video Pro and a dozen
|
|
29
|
+
* ffmpeg nodes all read as `"data"`, so a published app rendered them as a JSON
|
|
30
|
+
* blob and `/v1` app schemas declared the wrong output type).
|
|
31
|
+
*
|
|
32
|
+
* `DYNAMIC_PRODUCER_TYPES` is deliberately NOT consulted: a node whose medium
|
|
33
|
+
* is decided at run time has no static answer, and `"data"` is the honest one.
|
|
34
|
+
*/
|
|
35
|
+
declare function getOutputType(nodeType: string | undefined): OutputType;
|
|
36
|
+
/** Extract the result URL or text from a node's data. */
|
|
37
|
+
declare function getNodeResult(nodeData: Record<string, unknown>): {
|
|
38
|
+
url?: string;
|
|
39
|
+
text?: string;
|
|
40
|
+
};
|
|
41
|
+
/** Human-readable label for a node. */
|
|
42
|
+
declare function getNodeLabel(node: GenericNode): string;
|
|
43
|
+
interface InputFieldSchema {
|
|
44
|
+
key: string;
|
|
45
|
+
type: "text" | "image-url" | "video-url" | "audio-url" | "select" | "number";
|
|
46
|
+
options?: string[];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Extra API-settable keys for node types whose card writes more than one field
|
|
50
|
+
* (INPUT_FIELD_MAP is one key per node type). Read by extract-app-inputs and the
|
|
51
|
+
* app runner; every key here must be in UGC_OVERRIDABLE_FIELDS for a UGC type.
|
|
52
|
+
*/
|
|
53
|
+
declare const INPUT_FIELD_EXTRA_KEYS: Readonly<Record<string, readonly InputFieldSchema[]>>;
|
|
54
|
+
/** The extra override fields of a node type (none for most types). */
|
|
55
|
+
declare function getInputFieldExtraKeys(nodeType: string): readonly InputFieldSchema[];
|
|
56
|
+
/** Get the overridable field schema for an input node type. */
|
|
57
|
+
declare function getInputFieldSchema(nodeType: string): InputFieldSchema | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Shallow-merge run-time input overrides (a published app's inputs, an API-token
|
|
60
|
+
* run, MCP `run_app` / `run_workflow` inputs, a wired component handle) over a
|
|
61
|
+
* node's SAVED data — the one merge every such lane must use.
|
|
62
|
+
*
|
|
63
|
+
* `metadata` holds facts measured FROM the node's media (its length, its
|
|
64
|
+
* dimensions). When an override swaps that media — the node's primary input
|
|
65
|
+
* field is a media url (`INPUT_FIELD_MAP`) and the override changes it — the
|
|
66
|
+
* snapshot's facts describe a file that is no longer there, so they are dropped
|
|
67
|
+
* unless the override supplies its own. Left behind, a publisher's
|
|
68
|
+
* `metadata.durationSeconds` outranks the run's own transcript as Edit Plan's
|
|
69
|
+
* duration basis and under-buckets a caller's longer episode: an estimate that
|
|
70
|
+
* passes the balance precheck for a run the reserve then refuses.
|
|
71
|
+
*
|
|
72
|
+
* Schema-driven on purpose: a new media input node is covered by its
|
|
73
|
+
* `INPUT_FIELD_MAP` row, with no list to remember here.
|
|
74
|
+
*
|
|
75
|
+
* An override sent under a renamed exposed-field key (an app published before
|
|
76
|
+
* the rename) lands on the node's current field — `canonicalizeOverrideKeys`.
|
|
77
|
+
*/
|
|
78
|
+
declare function mergeNodeInputOverrides(nodeType: string | undefined, data: Record<string, unknown>, overrides: Record<string, unknown>): Record<string, unknown>;
|
|
79
|
+
/** Migrate a legacy string[] order to PresentationItem[]. */
|
|
80
|
+
declare function migrateToItems(order: string[] | undefined): PresentationItem[] | undefined;
|
|
81
|
+
/** Strip nested groups — groups may only contain non-group items. */
|
|
82
|
+
declare function validateNoNestedGroups(items: PresentationItem[]): PresentationItem[];
|
|
83
|
+
/** Recursively flatten all items, unwrapping groups. */
|
|
84
|
+
declare function flattenItems(items: PresentationItem[]): PresentationItem[];
|
|
85
|
+
/** Get the sortable/unique ID for a PresentationItem. */
|
|
86
|
+
declare function getItemSortId(item: PresentationItem): string;
|
|
87
|
+
/** Remove items whose nodeId no longer exists in the workflow. */
|
|
88
|
+
declare function cleanOrphanedItems(items: PresentationItem[], nodeIds: Set<string>): PresentationItem[];
|
|
89
|
+
|
|
90
|
+
export { INPUT_FIELD_EXTRA_KEYS as I, type OutputType as O, INPUT_NODE_TYPES as a, type InputFieldSchema as b, cleanOrphanedItems as c, getInputFieldSchema as d, getInputNodes as e, flattenItems as f, getInputFieldExtraKeys as g, getItemSortId as h, getNodeLabel as i, getNodeResult as j, getOutputNodes as k, getOutputType as l, mergeNodeInputOverrides as m, migrateToItems as n, validateNoNestedGroups as v };
|