@nodetool-ai/base-nodes 0.7.0-rc.23 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. package/README.md +21 -0
  2. package/dist/.nodetool-build-stamp +1 -0
  3. package/dist/index.d.ts +61 -67
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +179 -173
  6. package/dist/index.js.map +1 -1
  7. package/dist/platforms/browser.d.ts +19 -0
  8. package/dist/platforms/browser.d.ts.map +1 -0
  9. package/dist/platforms/browser.js +29 -0
  10. package/dist/platforms/browser.js.map +1 -0
  11. package/package.json +53 -65
  12. package/dist/lib/audio-wav.d.ts +0 -66
  13. package/dist/lib/audio-wav.d.ts.map +0 -1
  14. package/dist/lib/audio-wav.js +0 -215
  15. package/dist/lib/audio-wav.js.map +0 -1
  16. package/dist/nodes/agent-tool-hydration.d.ts +0 -10
  17. package/dist/nodes/agent-tool-hydration.d.ts.map +0 -1
  18. package/dist/nodes/agent-tool-hydration.js +0 -43
  19. package/dist/nodes/agent-tool-hydration.js.map +0 -1
  20. package/dist/nodes/agents.d.ts +0 -262
  21. package/dist/nodes/agents.d.ts.map +0 -1
  22. package/dist/nodes/agents.js +0 -2856
  23. package/dist/nodes/agents.js.map +0 -1
  24. package/dist/nodes/anthropic.d.ts +0 -26
  25. package/dist/nodes/anthropic.d.ts.map +0 -1
  26. package/dist/nodes/anthropic.js +0 -133
  27. package/dist/nodes/anthropic.js.map +0 -1
  28. package/dist/nodes/apify.d.ts +0 -120
  29. package/dist/nodes/apify.d.ts.map +0 -1
  30. package/dist/nodes/apify.js +0 -618
  31. package/dist/nodes/apify.js.map +0 -1
  32. package/dist/nodes/audio.d.ts +0 -301
  33. package/dist/nodes/audio.d.ts.map +0 -1
  34. package/dist/nodes/audio.js +0 -1274
  35. package/dist/nodes/audio.js.map +0 -1
  36. package/dist/nodes/code-node.d.ts +0 -34
  37. package/dist/nodes/code-node.d.ts.map +0 -1
  38. package/dist/nodes/code-node.js +0 -343
  39. package/dist/nodes/code-node.js.map +0 -1
  40. package/dist/nodes/code.d.ts +0 -301
  41. package/dist/nodes/code.d.ts.map +0 -1
  42. package/dist/nodes/code.js +0 -850
  43. package/dist/nodes/code.js.map +0 -1
  44. package/dist/nodes/compare.d.ts +0 -18
  45. package/dist/nodes/compare.d.ts.map +0 -1
  46. package/dist/nodes/compare.js +0 -122
  47. package/dist/nodes/compare.js.map +0 -1
  48. package/dist/nodes/constant.d.ts +0 -315
  49. package/dist/nodes/constant.d.ts.map +0 -1
  50. package/dist/nodes/constant.js +0 -715
  51. package/dist/nodes/constant.js.map +0 -1
  52. package/dist/nodes/control.d.ts +0 -83
  53. package/dist/nodes/control.d.ts.map +0 -1
  54. package/dist/nodes/control.js +0 -212
  55. package/dist/nodes/control.js.map +0 -1
  56. package/dist/nodes/data.d.ts +0 -369
  57. package/dist/nodes/data.d.ts.map +0 -1
  58. package/dist/nodes/data.js +0 -1590
  59. package/dist/nodes/data.js.map +0 -1
  60. package/dist/nodes/document.d.ts +0 -134
  61. package/dist/nodes/document.d.ts.map +0 -1
  62. package/dist/nodes/document.js +0 -984
  63. package/dist/nodes/document.js.map +0 -1
  64. package/dist/nodes/extended-placeholders.d.ts +0 -6
  65. package/dist/nodes/extended-placeholders.d.ts.map +0 -1
  66. package/dist/nodes/extended-placeholders.js +0 -19
  67. package/dist/nodes/extended-placeholders.js.map +0 -1
  68. package/dist/nodes/gemini.d.ts +0 -110
  69. package/dist/nodes/gemini.d.ts.map +0 -1
  70. package/dist/nodes/gemini.js +0 -871
  71. package/dist/nodes/gemini.js.map +0 -1
  72. package/dist/nodes/generators.d.ts +0 -84
  73. package/dist/nodes/generators.d.ts.map +0 -1
  74. package/dist/nodes/generators.js +0 -968
  75. package/dist/nodes/generators.js.map +0 -1
  76. package/dist/nodes/image.d.ts +0 -232
  77. package/dist/nodes/image.d.ts.map +0 -1
  78. package/dist/nodes/image.js +0 -1395
  79. package/dist/nodes/image.js.map +0 -1
  80. package/dist/nodes/input.d.ts +0 -445
  81. package/dist/nodes/input.d.ts.map +0 -1
  82. package/dist/nodes/input.js +0 -1459
  83. package/dist/nodes/input.js.map +0 -1
  84. package/dist/nodes/kie-dynamic.d.ts +0 -31
  85. package/dist/nodes/kie-dynamic.d.ts.map +0 -1
  86. package/dist/nodes/kie-dynamic.js +0 -270
  87. package/dist/nodes/kie-dynamic.js.map +0 -1
  88. package/dist/nodes/lib-audio-dsp.d.ts +0 -85
  89. package/dist/nodes/lib-audio-dsp.d.ts.map +0 -1
  90. package/dist/nodes/lib-audio-dsp.js +0 -450
  91. package/dist/nodes/lib-audio-dsp.js.map +0 -1
  92. package/dist/nodes/lib-audio-effects.d.ts +0 -116
  93. package/dist/nodes/lib-audio-effects.d.ts.map +0 -1
  94. package/dist/nodes/lib-audio-effects.js +0 -905
  95. package/dist/nodes/lib-audio-effects.js.map +0 -1
  96. package/dist/nodes/lib-browser.d.ts +0 -99
  97. package/dist/nodes/lib-browser.d.ts.map +0 -1
  98. package/dist/nodes/lib-browser.js +0 -692
  99. package/dist/nodes/lib-browser.js.map +0 -1
  100. package/dist/nodes/lib-charts.d.ts +0 -20
  101. package/dist/nodes/lib-charts.d.ts.map +0 -1
  102. package/dist/nodes/lib-charts.js +0 -245
  103. package/dist/nodes/lib-charts.js.map +0 -1
  104. package/dist/nodes/lib-datetime.d.ts +0 -108
  105. package/dist/nodes/lib-datetime.d.ts.map +0 -1
  106. package/dist/nodes/lib-datetime.js +0 -421
  107. package/dist/nodes/lib-datetime.js.map +0 -1
  108. package/dist/nodes/lib-doc-convert.d.ts +0 -19
  109. package/dist/nodes/lib-doc-convert.d.ts.map +0 -1
  110. package/dist/nodes/lib-doc-convert.js +0 -257
  111. package/dist/nodes/lib-doc-convert.js.map +0 -1
  112. package/dist/nodes/lib-doc-transform.d.ts +0 -39
  113. package/dist/nodes/lib-doc-transform.d.ts.map +0 -1
  114. package/dist/nodes/lib-doc-transform.js +0 -335
  115. package/dist/nodes/lib-doc-transform.js.map +0 -1
  116. package/dist/nodes/lib-docx.d.ts +0 -106
  117. package/dist/nodes/lib-docx.d.ts.map +0 -1
  118. package/dist/nodes/lib-docx.js +0 -595
  119. package/dist/nodes/lib-docx.js.map +0 -1
  120. package/dist/nodes/lib-epub.d.ts +0 -55
  121. package/dist/nodes/lib-epub.d.ts.map +0 -1
  122. package/dist/nodes/lib-epub.js +0 -220
  123. package/dist/nodes/lib-epub.js.map +0 -1
  124. package/dist/nodes/lib-excel.d.ts +0 -74
  125. package/dist/nodes/lib-excel.d.ts.map +0 -1
  126. package/dist/nodes/lib-excel.js +0 -448
  127. package/dist/nodes/lib-excel.js.map +0 -1
  128. package/dist/nodes/lib-graphql.d.ts +0 -66
  129. package/dist/nodes/lib-graphql.d.ts.map +0 -1
  130. package/dist/nodes/lib-graphql.js +0 -333
  131. package/dist/nodes/lib-graphql.js.map +0 -1
  132. package/dist/nodes/lib-grid.d.ts +0 -27
  133. package/dist/nodes/lib-grid.d.ts.map +0 -1
  134. package/dist/nodes/lib-grid.js +0 -172
  135. package/dist/nodes/lib-grid.js.map +0 -1
  136. package/dist/nodes/lib-html-parse.d.ts +0 -108
  137. package/dist/nodes/lib-html-parse.d.ts.map +0 -1
  138. package/dist/nodes/lib-html-parse.js +0 -365
  139. package/dist/nodes/lib-html-parse.js.map +0 -1
  140. package/dist/nodes/lib-http.d.ts +0 -98
  141. package/dist/nodes/lib-http.d.ts.map +0 -1
  142. package/dist/nodes/lib-http.js +0 -267
  143. package/dist/nodes/lib-http.js.map +0 -1
  144. package/dist/nodes/lib-image-color-grading.d.ts +0 -3
  145. package/dist/nodes/lib-image-color-grading.d.ts.map +0 -1
  146. package/dist/nodes/lib-image-color-grading.js +0 -1386
  147. package/dist/nodes/lib-image-color-grading.js.map +0 -1
  148. package/dist/nodes/lib-image-draw.d.ts +0 -3
  149. package/dist/nodes/lib-image-draw.d.ts.map +0 -1
  150. package/dist/nodes/lib-image-draw.js +0 -470
  151. package/dist/nodes/lib-image-draw.js.map +0 -1
  152. package/dist/nodes/lib-image-enhance.d.ts +0 -3
  153. package/dist/nodes/lib-image-enhance.d.ts.map +0 -1
  154. package/dist/nodes/lib-image-enhance.js +0 -731
  155. package/dist/nodes/lib-image-enhance.js.map +0 -1
  156. package/dist/nodes/lib-image-filter.d.ts +0 -3
  157. package/dist/nodes/lib-image-filter.d.ts.map +0 -1
  158. package/dist/nodes/lib-image-filter.js +0 -684
  159. package/dist/nodes/lib-image-filter.js.map +0 -1
  160. package/dist/nodes/lib-image-utils.d.ts +0 -24
  161. package/dist/nodes/lib-image-utils.d.ts.map +0 -1
  162. package/dist/nodes/lib-image-utils.js +0 -150
  163. package/dist/nodes/lib-image-utils.js.map +0 -1
  164. package/dist/nodes/lib-mail.d.ts +0 -74
  165. package/dist/nodes/lib-mail.d.ts.map +0 -1
  166. package/dist/nodes/lib-mail.js +0 -452
  167. package/dist/nodes/lib-mail.js.map +0 -1
  168. package/dist/nodes/lib-markdown.d.ts +0 -70
  169. package/dist/nodes/lib-markdown.d.ts.map +0 -1
  170. package/dist/nodes/lib-markdown.js +0 -236
  171. package/dist/nodes/lib-markdown.js.map +0 -1
  172. package/dist/nodes/lib-nlp.d.ts +0 -98
  173. package/dist/nodes/lib-nlp.d.ts.map +0 -1
  174. package/dist/nodes/lib-nlp.js +0 -374
  175. package/dist/nodes/lib-nlp.js.map +0 -1
  176. package/dist/nodes/lib-notion.d.ts +0 -99
  177. package/dist/nodes/lib-notion.d.ts.map +0 -1
  178. package/dist/nodes/lib-notion.js +0 -601
  179. package/dist/nodes/lib-notion.js.map +0 -1
  180. package/dist/nodes/lib-ocr.d.ts +0 -31
  181. package/dist/nodes/lib-ocr.d.ts.map +0 -1
  182. package/dist/nodes/lib-ocr.js +0 -143
  183. package/dist/nodes/lib-ocr.js.map +0 -1
  184. package/dist/nodes/lib-os.d.ts +0 -312
  185. package/dist/nodes/lib-os.d.ts.map +0 -1
  186. package/dist/nodes/lib-os.js +0 -909
  187. package/dist/nodes/lib-os.js.map +0 -1
  188. package/dist/nodes/lib-pdf.d.ts +0 -142
  189. package/dist/nodes/lib-pdf.d.ts.map +0 -1
  190. package/dist/nodes/lib-pdf.js +0 -871
  191. package/dist/nodes/lib-pdf.js.map +0 -1
  192. package/dist/nodes/lib-pptx.d.ts +0 -29
  193. package/dist/nodes/lib-pptx.d.ts.map +0 -1
  194. package/dist/nodes/lib-pptx.js +0 -122
  195. package/dist/nodes/lib-pptx.js.map +0 -1
  196. package/dist/nodes/lib-rss.d.ts +0 -31
  197. package/dist/nodes/lib-rss.d.ts.map +0 -1
  198. package/dist/nodes/lib-rss.js +0 -163
  199. package/dist/nodes/lib-rss.js.map +0 -1
  200. package/dist/nodes/lib-s3.d.ts +0 -112
  201. package/dist/nodes/lib-s3.d.ts.map +0 -1
  202. package/dist/nodes/lib-s3.js +0 -521
  203. package/dist/nodes/lib-s3.js.map +0 -1
  204. package/dist/nodes/lib-secret.d.ts +0 -15
  205. package/dist/nodes/lib-secret.d.ts.map +0 -1
  206. package/dist/nodes/lib-secret.js +0 -42
  207. package/dist/nodes/lib-secret.js.map +0 -1
  208. package/dist/nodes/lib-sqlite.d.ts +0 -102
  209. package/dist/nodes/lib-sqlite.d.ts.map +0 -1
  210. package/dist/nodes/lib-sqlite.js +0 -532
  211. package/dist/nodes/lib-sqlite.js.map +0 -1
  212. package/dist/nodes/lib-supabase.d.ts +0 -86
  213. package/dist/nodes/lib-supabase.d.ts.map +0 -1
  214. package/dist/nodes/lib-supabase.js +0 -425
  215. package/dist/nodes/lib-supabase.js.map +0 -1
  216. package/dist/nodes/lib-svg.d.ts +0 -199
  217. package/dist/nodes/lib-svg.d.ts.map +0 -1
  218. package/dist/nodes/lib-svg.js +0 -1027
  219. package/dist/nodes/lib-svg.js.map +0 -1
  220. package/dist/nodes/lib-tensorflow.d.ts +0 -71
  221. package/dist/nodes/lib-tensorflow.d.ts.map +0 -1
  222. package/dist/nodes/lib-tensorflow.js +0 -351
  223. package/dist/nodes/lib-tensorflow.js.map +0 -1
  224. package/dist/nodes/lib-twilio.d.ts +0 -71
  225. package/dist/nodes/lib-twilio.d.ts.map +0 -1
  226. package/dist/nodes/lib-twilio.js +0 -469
  227. package/dist/nodes/lib-twilio.js.map +0 -1
  228. package/dist/nodes/lib-validate.d.ts +0 -84
  229. package/dist/nodes/lib-validate.d.ts.map +0 -1
  230. package/dist/nodes/lib-validate.js +0 -215
  231. package/dist/nodes/lib-validate.js.map +0 -1
  232. package/dist/nodes/lib-video-download.d.ts +0 -26
  233. package/dist/nodes/lib-video-download.d.ts.map +0 -1
  234. package/dist/nodes/lib-video-download.js +0 -299
  235. package/dist/nodes/lib-video-download.js.map +0 -1
  236. package/dist/nodes/messaging.d.ts +0 -88
  237. package/dist/nodes/messaging.d.ts.map +0 -1
  238. package/dist/nodes/messaging.js +0 -418
  239. package/dist/nodes/messaging.js.map +0 -1
  240. package/dist/nodes/mistral.d.ts +0 -83
  241. package/dist/nodes/mistral.d.ts.map +0 -1
  242. package/dist/nodes/mistral.js +0 -450
  243. package/dist/nodes/mistral.js.map +0 -1
  244. package/dist/nodes/model3d/analysis.d.ts +0 -13
  245. package/dist/nodes/model3d/analysis.d.ts.map +0 -1
  246. package/dist/nodes/model3d/analysis.js +0 -36
  247. package/dist/nodes/model3d/analysis.js.map +0 -1
  248. package/dist/nodes/model3d/base.d.ts +0 -11
  249. package/dist/nodes/model3d/base.d.ts.map +0 -1
  250. package/dist/nodes/model3d/base.js +0 -20
  251. package/dist/nodes/model3d/base.js.map +0 -1
  252. package/dist/nodes/model3d/boolean-ops.d.ts +0 -2
  253. package/dist/nodes/model3d/boolean-ops.d.ts.map +0 -1
  254. package/dist/nodes/model3d/boolean-ops.js +0 -172
  255. package/dist/nodes/model3d/boolean-ops.js.map +0 -1
  256. package/dist/nodes/model3d/cleanup.d.ts +0 -47
  257. package/dist/nodes/model3d/cleanup.d.ts.map +0 -1
  258. package/dist/nodes/model3d/cleanup.js +0 -136
  259. package/dist/nodes/model3d/cleanup.js.map +0 -1
  260. package/dist/nodes/model3d/convert.d.ts +0 -14
  261. package/dist/nodes/model3d/convert.d.ts.map +0 -1
  262. package/dist/nodes/model3d/convert.js +0 -64
  263. package/dist/nodes/model3d/convert.js.map +0 -1
  264. package/dist/nodes/model3d/defaults.d.ts +0 -34
  265. package/dist/nodes/model3d/defaults.d.ts.map +0 -1
  266. package/dist/nodes/model3d/defaults.js +0 -28
  267. package/dist/nodes/model3d/defaults.js.map +0 -1
  268. package/dist/nodes/model3d/document-ops.d.ts +0 -4
  269. package/dist/nodes/model3d/document-ops.d.ts.map +0 -1
  270. package/dist/nodes/model3d/document-ops.js +0 -40
  271. package/dist/nodes/model3d/document-ops.js.map +0 -1
  272. package/dist/nodes/model3d/generation.d.ts +0 -39
  273. package/dist/nodes/model3d/generation.d.ts.map +0 -1
  274. package/dist/nodes/model3d/generation.js +0 -179
  275. package/dist/nodes/model3d/generation.js.map +0 -1
  276. package/dist/nodes/model3d/glb.d.ts +0 -29
  277. package/dist/nodes/model3d/glb.d.ts.map +0 -1
  278. package/dist/nodes/model3d/glb.js +0 -255
  279. package/dist/nodes/model3d/glb.js.map +0 -1
  280. package/dist/nodes/model3d/index.d.ts +0 -20
  281. package/dist/nodes/model3d/index.d.ts.map +0 -1
  282. package/dist/nodes/model3d/index.js +0 -38
  283. package/dist/nodes/model3d/index.js.map +0 -1
  284. package/dist/nodes/model3d/io.d.ts +0 -38
  285. package/dist/nodes/model3d/io.d.ts.map +0 -1
  286. package/dist/nodes/model3d/io.js +0 -162
  287. package/dist/nodes/model3d/io.js.map +0 -1
  288. package/dist/nodes/model3d/mesh-ops.d.ts +0 -40
  289. package/dist/nodes/model3d/mesh-ops.d.ts.map +0 -1
  290. package/dist/nodes/model3d/mesh-ops.js +0 -775
  291. package/dist/nodes/model3d/mesh-ops.js.map +0 -1
  292. package/dist/nodes/model3d/nodes.d.ts +0 -2
  293. package/dist/nodes/model3d/nodes.d.ts.map +0 -1
  294. package/dist/nodes/model3d/nodes.js +0 -2
  295. package/dist/nodes/model3d/nodes.js.map +0 -1
  296. package/dist/nodes/model3d/ops.d.ts +0 -37
  297. package/dist/nodes/model3d/ops.d.ts.map +0 -1
  298. package/dist/nodes/model3d/ops.js +0 -137
  299. package/dist/nodes/model3d/ops.js.map +0 -1
  300. package/dist/nodes/model3d/transforms.d.ts +0 -49
  301. package/dist/nodes/model3d/transforms.d.ts.map +0 -1
  302. package/dist/nodes/model3d/transforms.js +0 -142
  303. package/dist/nodes/model3d/transforms.js.map +0 -1
  304. package/dist/nodes/model3d/types.d.ts +0 -81
  305. package/dist/nodes/model3d/types.d.ts.map +0 -1
  306. package/dist/nodes/model3d/types.js +0 -2
  307. package/dist/nodes/model3d/types.js.map +0 -1
  308. package/dist/nodes/model3d/utils.d.ts +0 -34
  309. package/dist/nodes/model3d/utils.d.ts.map +0 -1
  310. package/dist/nodes/model3d/utils.js +0 -185
  311. package/dist/nodes/model3d/utils.js.map +0 -1
  312. package/dist/nodes/model3d.d.ts +0 -2
  313. package/dist/nodes/model3d.d.ts.map +0 -1
  314. package/dist/nodes/model3d.js +0 -2
  315. package/dist/nodes/model3d.js.map +0 -1
  316. package/dist/nodes/openai.d.ts +0 -172
  317. package/dist/nodes/openai.d.ts.map +0 -1
  318. package/dist/nodes/openai.js +0 -1294
  319. package/dist/nodes/openai.js.map +0 -1
  320. package/dist/nodes/output.d.ts +0 -29
  321. package/dist/nodes/output.d.ts.map +0 -1
  322. package/dist/nodes/output.js +0 -87
  323. package/dist/nodes/output.js.map +0 -1
  324. package/dist/nodes/sandbox.d.ts +0 -63
  325. package/dist/nodes/sandbox.d.ts.map +0 -1
  326. package/dist/nodes/sandbox.js +0 -633
  327. package/dist/nodes/sandbox.js.map +0 -1
  328. package/dist/nodes/search.d.ts +0 -117
  329. package/dist/nodes/search.d.ts.map +0 -1
  330. package/dist/nodes/search.js +0 -607
  331. package/dist/nodes/search.js.map +0 -1
  332. package/dist/nodes/team.d.ts +0 -74
  333. package/dist/nodes/team.d.ts.map +0 -1
  334. package/dist/nodes/team.js +0 -309
  335. package/dist/nodes/team.js.map +0 -1
  336. package/dist/nodes/text-extra.d.ts +0 -633
  337. package/dist/nodes/text-extra.d.ts.map +0 -1
  338. package/dist/nodes/text-extra.js +0 -2226
  339. package/dist/nodes/text-extra.js.map +0 -1
  340. package/dist/nodes/tool-agents.d.ts +0 -334
  341. package/dist/nodes/tool-agents.d.ts.map +0 -1
  342. package/dist/nodes/tool-agents.js +0 -1861
  343. package/dist/nodes/tool-agents.js.map +0 -1
  344. package/dist/nodes/triggers.d.ts +0 -107
  345. package/dist/nodes/triggers.d.ts.map +0 -1
  346. package/dist/nodes/triggers.js +0 -706
  347. package/dist/nodes/triggers.js.map +0 -1
  348. package/dist/nodes/vector.d.ts +0 -168
  349. package/dist/nodes/vector.d.ts.map +0 -1
  350. package/dist/nodes/vector.js +0 -1121
  351. package/dist/nodes/vector.js.map +0 -1
  352. package/dist/nodes/video.d.ts +0 -387
  353. package/dist/nodes/video.d.ts.map +0 -1
  354. package/dist/nodes/video.js +0 -2383
  355. package/dist/nodes/video.js.map +0 -1
  356. package/dist/nodes/workflow.d.ts +0 -24
  357. package/dist/nodes/workflow.d.ts.map +0 -1
  358. package/dist/nodes/workflow.js +0 -146
  359. package/dist/nodes/workflow.js.map +0 -1
  360. package/dist/nodes/workspace.d.ts +0 -203
  361. package/dist/nodes/workspace.d.ts.map +0 -1
  362. package/dist/nodes/workspace.js +0 -795
  363. package/dist/nodes/workspace.js.map +0 -1
@@ -1,1386 +0,0 @@
1
- import { BaseNode, registerDeclaredProperty } from "@nodetool-ai/node-sdk";
2
- import sharp from "sharp";
3
- import { decodeImage, toRef, pickImage, toFloatRGB, fromFloatRGB, clamp, getLuminance, rgbToHsv, hsvToRgb } from "./lib-image-utils.js";
4
- function createColorGradingNode(desc) {
5
- const C = class extends BaseNode {
6
- static nodeType = desc.nodeType;
7
- static title = desc.title;
8
- static description = desc.description;
9
- static basicFields = desc.basicFields;
10
- static metadataOutputTypes = desc.outputs;
11
- async process(context) {
12
- const t = desc.nodeType;
13
- const self = this;
14
- const baseObj = pickImage(this.serialize(), this.serialize());
15
- const baseBytes = await decodeImage(baseObj, context);
16
- if (!baseBytes) {
17
- return { output: baseObj ?? {} };
18
- }
19
- // ColorBalance
20
- if (t.endsWith(".ColorBalance")) {
21
- const temperature = Number(this.temperature ?? self.temperature ?? 0);
22
- const tint = Number(this.tint ?? self.tint ?? 0);
23
- const { data, width, height, alpha } = await toFloatRGB(baseBytes);
24
- const tempShift = temperature * 0.3;
25
- const tintShift = tint * 0.3;
26
- for (let i = 0; i < data.length; i += 3) {
27
- data[i] += tempShift + tintShift * 0.5;
28
- data[i + 1] -= tintShift;
29
- data[i + 2] = data[i + 2] - tempShift + tintShift * 0.5;
30
- }
31
- const out = await fromFloatRGB(data, width, height, alpha);
32
- return { output: toRef(out, baseObj) };
33
- }
34
- // Exposure
35
- if (t.endsWith(".Exposure")) {
36
- const exposure = Number(this.exposure ?? self.exposure ?? 0);
37
- const contrast = Number(this.contrast ?? self.contrast ?? 0);
38
- const highlights = Number(this.highlights ?? self.highlights ?? 0);
39
- const shadows = Number(this.shadows ?? self.shadows ?? 0);
40
- const whites = Number(this.whites ?? self.whites ?? 0);
41
- const blacks = Number(this.blacks ?? self.blacks ?? 0);
42
- const { data, width, height, alpha } = await toFloatRGB(baseBytes);
43
- const expMul = Math.pow(2, exposure);
44
- for (let i = 0; i < data.length; i += 3) {
45
- let r = data[i] * expMul, g = data[i + 1] * expMul, b = data[i + 2] * expMul;
46
- const lum = getLuminance(r, g, b);
47
- const hlMask = clamp((lum - 0.5) * 2, 0, 1);
48
- const shMask = clamp((0.5 - lum) * 2, 0, 1);
49
- r -= hlMask * highlights * 0.5;
50
- r += shMask * shadows * 0.5;
51
- g -= hlMask * highlights * 0.5;
52
- g += shMask * shadows * 0.5;
53
- b -= hlMask * highlights * 0.5;
54
- b += shMask * shadows * 0.5;
55
- r += whites * 0.2 * r;
56
- r += blacks * 0.2 * (1 - r);
57
- g += whites * 0.2 * g;
58
- g += blacks * 0.2 * (1 - g);
59
- b += whites * 0.2 * b;
60
- b += blacks * 0.2 * (1 - b);
61
- data[i] = 0.5 + (r - 0.5) * (1 + contrast);
62
- data[i + 1] = 0.5 + (g - 0.5) * (1 + contrast);
63
- data[i + 2] = 0.5 + (b - 0.5) * (1 + contrast);
64
- }
65
- const out = await fromFloatRGB(data, width, height, alpha);
66
- return { output: toRef(out, baseObj) };
67
- }
68
- // SaturationVibrance
69
- if (t.endsWith(".SaturationVibrance")) {
70
- const saturation = Number(this.saturation ?? self.saturation ?? 0);
71
- const vibrance = Number(this.vibrance ?? self.vibrance ?? 0);
72
- const { data, width, height, alpha } = await toFloatRGB(baseBytes);
73
- for (let i = 0; i < data.length; i += 3) {
74
- let r = data[i], g = data[i + 1], b = data[i + 2];
75
- const lum = getLuminance(r, g, b);
76
- // Saturation
77
- r = lum + (r - lum) * (1 + saturation);
78
- g = lum + (g - lum) * (1 + saturation);
79
- b = lum + (b - lum) * (1 + saturation);
80
- // Vibrance
81
- if (vibrance !== 0) {
82
- const maxC = Math.max(r, g, b);
83
- const minC = Math.min(r, g, b);
84
- const curSat = (maxC - minC) / (maxC + 0.001);
85
- const mask = 1 - curSat;
86
- const vFactor = 1 + vibrance * mask;
87
- const lum2 = getLuminance(r, g, b);
88
- r = lum2 + (r - lum2) * vFactor;
89
- g = lum2 + (g - lum2) * vFactor;
90
- b = lum2 + (b - lum2) * vFactor;
91
- }
92
- data[i] = r;
93
- data[i + 1] = g;
94
- data[i + 2] = b;
95
- }
96
- const out = await fromFloatRGB(data, width, height, alpha);
97
- return { output: toRef(out, baseObj) };
98
- }
99
- // LiftGammaGain
100
- if (t.endsWith(".LiftGammaGain")) {
101
- const liftR = Number(this.lift_r ?? self.lift_r ?? 0);
102
- const liftG = Number(this.lift_g ?? self.lift_g ?? 0);
103
- const liftB = Number(this.lift_b ?? self.lift_b ?? 0);
104
- const liftM = Number(this.lift_master ?? self.lift_master ?? 0);
105
- const gammaR = Number(this.gamma_r ?? self.gamma_r ?? 1);
106
- const gammaG = Number(this.gamma_g ?? self.gamma_g ?? 1);
107
- const gammaB = Number(this.gamma_b ?? self.gamma_b ?? 1);
108
- const gammaM = Number(this.gamma_master ?? self.gamma_master ?? 1);
109
- const gainR = Number(this.gain_r ?? self.gain_r ?? 1);
110
- const gainG = Number(this.gain_g ?? self.gain_g ?? 1);
111
- const gainB = Number(this.gain_b ?? self.gain_b ?? 1);
112
- const gainM = Number(this.gain_master ?? self.gain_master ?? 1);
113
- const { data, width, height, alpha } = await toFloatRGB(baseBytes);
114
- for (let i = 0; i < data.length; i += 3) {
115
- // Apply: (input + lift) * gain, then gamma
116
- const r = (data[i] + liftR + liftM) * gainR * gainM;
117
- const g = (data[i + 1] + liftG + liftM) * gainG * gainM;
118
- const b = (data[i + 2] + liftB + liftM) * gainB * gainM;
119
- const gr = 1 / Math.max(0.01, gammaR * gammaM);
120
- const gg = 1 / Math.max(0.01, gammaG * gammaM);
121
- const gb = 1 / Math.max(0.01, gammaB * gammaM);
122
- data[i] = r > 0 ? Math.pow(r, gr) : 0;
123
- data[i + 1] = g > 0 ? Math.pow(g, gg) : 0;
124
- data[i + 2] = b > 0 ? Math.pow(b, gb) : 0;
125
- }
126
- const out = await fromFloatRGB(data, width, height, alpha);
127
- return { output: toRef(out, baseObj) };
128
- }
129
- // CDL
130
- if (t.endsWith(".CDL")) {
131
- const slopeR = Number(this.slope_r ?? self.slope_r ?? 1);
132
- const slopeG = Number(this.slope_g ?? self.slope_g ?? 1);
133
- const slopeB = Number(this.slope_b ?? self.slope_b ?? 1);
134
- const offsetR = Number(this.offset_r ?? self.offset_r ?? 0);
135
- const offsetG = Number(this.offset_g ?? self.offset_g ?? 0);
136
- const offsetB = Number(this.offset_b ?? self.offset_b ?? 0);
137
- const powerR = Number(this.power_r ?? self.power_r ?? 1);
138
- const powerG = Number(this.power_g ?? self.power_g ?? 1);
139
- const powerB = Number(this.power_b ?? self.power_b ?? 1);
140
- const sat = Number(this.saturation ?? self.saturation ?? 1);
141
- const { data, width, height, alpha } = await toFloatRGB(baseBytes);
142
- for (let i = 0; i < data.length; i += 3) {
143
- let r = clamp(data[i] * slopeR + offsetR, 0, 1);
144
- let g = clamp(data[i + 1] * slopeG + offsetG, 0, 1);
145
- let b = clamp(data[i + 2] * slopeB + offsetB, 0, 1);
146
- r = Math.pow(r, powerR);
147
- g = Math.pow(g, powerG);
148
- b = Math.pow(b, powerB);
149
- const lum = getLuminance(r, g, b);
150
- data[i] = lum + (r - lum) * sat;
151
- data[i + 1] = lum + (g - lum) * sat;
152
- data[i + 2] = lum + (b - lum) * sat;
153
- }
154
- const out = await fromFloatRGB(data, width, height, alpha);
155
- return { output: toRef(out, baseObj) };
156
- }
157
- // Curves
158
- if (t.endsWith(".Curves")) {
159
- const blackPoint = Number(this.black_point ?? self.black_point ?? 0);
160
- const whitePoint = Number(this.white_point ?? self.white_point ?? 1);
161
- const shadowsV = Number(this.shadows ?? self.shadows ?? 0);
162
- const midtones = Number(this.midtones ?? self.midtones ?? 0);
163
- const highlightsV = Number(this.highlights ?? self.highlights ?? 0);
164
- const redMid = Number(this.red_midtones ?? self.red_midtones ?? 0);
165
- const greenMid = Number(this.green_midtones ?? self.green_midtones ?? 0);
166
- const blueMid = Number(this.blue_midtones ?? self.blue_midtones ?? 0);
167
- const { data, width, height, alpha } = await toFloatRGB(baseBytes);
168
- const range = Math.max(0.001, whitePoint - blackPoint);
169
- const gammaAll = 1 / Math.max(0.01, 1 + midtones);
170
- const gammaRed = 1 / Math.max(0.01, 1 + redMid);
171
- const gammaGreen = 1 / Math.max(0.01, 1 + greenMid);
172
- const gammaBlue = 1 / Math.max(0.01, 1 + blueMid);
173
- for (let i = 0; i < data.length; i += 3) {
174
- let r = clamp((data[i] - blackPoint) / range, 0, 1);
175
- let g = clamp((data[i + 1] - blackPoint) / range, 0, 1);
176
- let b = clamp((data[i + 2] - blackPoint) / range, 0, 1);
177
- // Shadows
178
- r += shadowsV * (1 - r) * r;
179
- g += shadowsV * (1 - g) * g;
180
- b += shadowsV * (1 - b) * b;
181
- // Midtones (global gamma)
182
- r = Math.pow(Math.max(0, r), gammaAll);
183
- g = Math.pow(Math.max(0, g), gammaAll);
184
- b = Math.pow(Math.max(0, b), gammaAll);
185
- // Highlights
186
- r += highlightsV * r * (1 - r);
187
- g += highlightsV * g * (1 - g);
188
- b += highlightsV * b * (1 - b);
189
- // Per-channel gamma
190
- data[i] = Math.pow(Math.max(0, r), gammaRed);
191
- data[i + 1] = Math.pow(Math.max(0, g), gammaGreen);
192
- data[i + 2] = Math.pow(Math.max(0, b), gammaBlue);
193
- }
194
- const out = await fromFloatRGB(data, width, height, alpha);
195
- return { output: toRef(out, baseObj) };
196
- }
197
- // HSLAdjust
198
- if (t.endsWith(".HSLAdjust")) {
199
- const colorRange = String(this.color_range ?? self.color_range ?? "ALL").toUpperCase();
200
- const hueShift = Number(this.hue_shift ?? self.hue_shift ?? 0);
201
- const satAdj = Number(this.saturation ?? self.saturation ?? 0);
202
- const lumAdj = Number(this.luminance ?? self.luminance ?? 0);
203
- const HUE_RANGES = {
204
- ALL: [0, 1],
205
- REDS: [0.95, 0.05],
206
- ORANGES: [0.02, 0.1],
207
- YELLOWS: [0.1, 0.18],
208
- GREENS: [0.18, 0.45],
209
- CYANS: [0.45, 0.55],
210
- BLUES: [0.55, 0.72],
211
- PURPLES: [0.72, 0.83],
212
- MAGENTAS: [0.83, 0.95]
213
- };
214
- const { data, width, height, alpha } = await toFloatRGB(baseBytes);
215
- const hueRange = HUE_RANGES[colorRange] ?? HUE_RANGES.ALL;
216
- for (let i = 0; i < data.length; i += 3) {
217
- let [h, s, v] = rgbToHsv(data[i], data[i + 1], data[i + 2]);
218
- let blend = 1;
219
- if (colorRange !== "ALL") {
220
- if (s < 0.1) {
221
- blend = 0;
222
- }
223
- else {
224
- const [lo, hi] = hueRange;
225
- if (lo > hi) {
226
- // wraps around (REDS)
227
- blend = h >= lo || h <= hi ? 1 : 0;
228
- if (blend === 1) {
229
- const center = (lo + (1 - lo + hi) / 2) % 1;
230
- let dist = Math.abs(h - center);
231
- if (dist > 0.5)
232
- dist = 1 - dist;
233
- const halfWidth = (1 - lo + hi) / 2;
234
- blend = clamp(1 - dist / halfWidth, 0, 1);
235
- }
236
- }
237
- else {
238
- const center = (lo + hi) / 2;
239
- const halfWidth = (hi - lo) / 2;
240
- const dist = Math.abs(h - center);
241
- blend = clamp(1 - dist / halfWidth, 0, 1);
242
- }
243
- }
244
- }
245
- if (blend > 0) {
246
- h = (h + hueShift * 0.5 * blend + 1) % 1;
247
- s = clamp(s * (1 + satAdj * blend), 0, 1);
248
- v = clamp(v * (1 + lumAdj * blend), 0, 1);
249
- }
250
- const [r, g, b] = hsvToRgb(h, s, v);
251
- data[i] = r;
252
- data[i + 1] = g;
253
- data[i + 2] = b;
254
- }
255
- const out = await fromFloatRGB(data, width, height, alpha);
256
- return { output: toRef(out, baseObj) };
257
- }
258
- // SplitToning
259
- if (t.endsWith(".SplitToning")) {
260
- const shadowHue = Number(this.shadow_hue ?? self.shadow_hue ?? 30);
261
- const shadowSat = Number(this.shadow_saturation ?? self.shadow_saturation ?? 0.5);
262
- const highlightHue = Number(this.highlight_hue ?? self.highlight_hue ?? 200);
263
- const highlightSat = Number(this.highlight_saturation ?? self.highlight_saturation ?? 0.5);
264
- const balance = Number(this.balance ?? self.balance ?? 0);
265
- const { data, width, height, alpha } = await toFloatRGB(baseBytes);
266
- const [sr, sg, sb] = hsvToRgb(shadowHue / 360, 1, 1);
267
- const [hr, hg, hb] = hsvToRgb(highlightHue / 360, 1, 1);
268
- const balOff = balance * 0.25;
269
- for (let i = 0; i < data.length; i += 3) {
270
- const lum = getLuminance(data[i], data[i + 1], data[i + 2]);
271
- const shMask = clamp((0.5 + balOff - lum) * 2, 0, 1);
272
- const hlMask = clamp((lum - 0.5 + balOff) * 2, 0, 1);
273
- data[i] +=
274
- shMask * (sr - 0.5) * shadowSat +
275
- hlMask * (hr - 0.5) * highlightSat;
276
- data[i + 1] +=
277
- shMask * (sg - 0.5) * shadowSat +
278
- hlMask * (hg - 0.5) * highlightSat;
279
- data[i + 2] +=
280
- shMask * (sb - 0.5) * shadowSat +
281
- hlMask * (hb - 0.5) * highlightSat;
282
- }
283
- const out = await fromFloatRGB(data, width, height, alpha);
284
- return { output: toRef(out, baseObj) };
285
- }
286
- // FilmLook
287
- if (t.endsWith(".FilmLook")) {
288
- const FILM_PRESETS = {
289
- TEAL_ORANGE: {
290
- shadow: [0.0, 0.5, 0.55],
291
- highlight: [1.0, 0.78, 0.6],
292
- contrast: 1.1,
293
- saturation: 1.1,
294
- fade: 0
295
- },
296
- BLOCKBUSTER: {
297
- shadow: [0.12, 0.24, 0.35],
298
- highlight: [1.0, 0.9, 0.78],
299
- contrast: 1.2,
300
- saturation: 1.0,
301
- fade: 0
302
- },
303
- NOIR: {
304
- shadow: [0.2, 0.2, 0.24],
305
- highlight: [0.86, 0.86, 0.9],
306
- contrast: 1.4,
307
- saturation: 0.3,
308
- fade: 0
309
- },
310
- VINTAGE: {
311
- shadow: [0.4, 0.32, 0.24],
312
- highlight: [1.0, 0.94, 0.78],
313
- contrast: 0.9,
314
- saturation: 0.8,
315
- fade: 0.15
316
- },
317
- COLD_BLUE: {
318
- shadow: [0.16, 0.24, 0.4],
319
- highlight: [0.78, 0.86, 1.0],
320
- contrast: 1.1,
321
- saturation: 0.9,
322
- fade: 0
323
- },
324
- WARM_SUNSET: {
325
- shadow: [0.47, 0.24, 0.16],
326
- highlight: [1.0, 0.86, 0.7],
327
- contrast: 1.0,
328
- saturation: 1.3,
329
- fade: 0
330
- },
331
- MATRIX: {
332
- shadow: [0.0, 0.16, 0.0],
333
- highlight: [0.6, 1.0, 0.6],
334
- contrast: 1.3,
335
- saturation: 0.7,
336
- fade: 0
337
- },
338
- BLEACH_BYPASS: {
339
- shadow: [0.24, 0.24, 0.27],
340
- highlight: [0.94, 0.94, 0.98],
341
- contrast: 1.5,
342
- saturation: 0.5,
343
- fade: 0.05
344
- },
345
- CROSS_PROCESS: {
346
- shadow: [0.0, 0.2, 0.3],
347
- highlight: [1.0, 0.9, 0.5],
348
- contrast: 1.2,
349
- saturation: 1.2,
350
- fade: 0
351
- },
352
- FADED_FILM: {
353
- shadow: [0.3, 0.28, 0.26],
354
- highlight: [0.95, 0.92, 0.88],
355
- contrast: 0.85,
356
- saturation: 0.7,
357
- fade: 0.2
358
- }
359
- };
360
- const preset = String(this.preset ?? self.preset ?? "TEAL_ORANGE").toUpperCase();
361
- const intensity = Number(this.intensity ?? self.intensity ?? 1);
362
- const p = FILM_PRESETS[preset] ?? FILM_PRESETS.TEAL_ORANGE;
363
- const { data, width, height, alpha } = await toFloatRGB(baseBytes);
364
- for (let i = 0; i < data.length; i += 3) {
365
- const origR = data[i], origG = data[i + 1], origB = data[i + 2];
366
- let r = origR, g = origG, b = origB;
367
- const lum = getLuminance(r, g, b);
368
- const shMask = clamp(1 - lum * 2, 0, 1);
369
- const hlMask = clamp(lum * 2 - 1, 0, 1);
370
- r +=
371
- shMask * (p.shadow[0] - 0.5) * 0.3 +
372
- hlMask * (p.highlight[0] - 0.5) * 0.3;
373
- g +=
374
- shMask * (p.shadow[1] - 0.5) * 0.3 +
375
- hlMask * (p.highlight[1] - 0.5) * 0.3;
376
- b +=
377
- shMask * (p.shadow[2] - 0.5) * 0.3 +
378
- hlMask * (p.highlight[2] - 0.5) * 0.3;
379
- r = (r - 0.5) * p.contrast + 0.5;
380
- g = (g - 0.5) * p.contrast + 0.5;
381
- b = (b - 0.5) * p.contrast + 0.5;
382
- const lum2 = getLuminance(r, g, b);
383
- r = lum2 + (r - lum2) * p.saturation;
384
- g = lum2 + (g - lum2) * p.saturation;
385
- b = lum2 + (b - lum2) * p.saturation;
386
- if (p.fade > 0) {
387
- r = r * (1 - p.fade) + p.fade * 0.15;
388
- g = g * (1 - p.fade) + p.fade * 0.15;
389
- b = b * (1 - p.fade) + p.fade * 0.15;
390
- }
391
- data[i] = origR + (r - origR) * intensity;
392
- data[i + 1] = origG + (g - origG) * intensity;
393
- data[i + 2] = origB + (b - origB) * intensity;
394
- }
395
- const out = await fromFloatRGB(data, width, height, alpha);
396
- return { output: toRef(out, baseObj) };
397
- }
398
- // Vignette
399
- if (t.endsWith(".Vignette")) {
400
- const amount = Number(this.amount ?? self.amount ?? 0.5);
401
- const midpoint = Number(this.midpoint ?? self.midpoint ?? 0.5);
402
- const roundness = Number(this.roundness ?? self.roundness ?? 0);
403
- const feather = Math.max(0.01, Number(this.feather ?? self.feather ?? 0.4));
404
- const { data, width, height, alpha } = await toFloatRGB(baseBytes);
405
- const cx = width / 2, cy = height / 2;
406
- const halfW = width / 2, halfH = height / 2;
407
- for (let y = 0; y < height; y++) {
408
- for (let x = 0; x < width; x++) {
409
- const normX = (x - cx) / halfW;
410
- const normY = (y - cy) / halfH;
411
- let dist;
412
- if (roundness < 0) {
413
- const rect = Math.max(Math.abs(normX), Math.abs(normY));
414
- const eucl = Math.sqrt(normX * normX + normY * normY);
415
- dist =
416
- eucl * (1 - Math.abs(roundness)) + rect * Math.abs(roundness);
417
- }
418
- else {
419
- dist = Math.sqrt(normX * normX + normY * normY);
420
- }
421
- const vig = clamp((dist - midpoint) / feather, 0, 1);
422
- const factor = amount > 0 ? 1 - vig * amount : 1 + vig * -amount;
423
- const idx = (y * width + x) * 3;
424
- data[idx] *= factor;
425
- data[idx + 1] *= factor;
426
- data[idx + 2] *= factor;
427
- }
428
- }
429
- const out = await fromFloatRGB(data, width, height, alpha);
430
- return { output: toRef(out, baseObj) };
431
- }
432
- // Fallback: return image unchanged
433
- const out = await sharp(baseBytes, { failOn: "none" }).png().toBuffer();
434
- return { output: toRef(out, baseObj) };
435
- }
436
- };
437
- for (const property of desc.properties) {
438
- registerDeclaredProperty(C, property.name, property.options);
439
- }
440
- return C;
441
- }
442
- const DESCRIPTORS = [
443
- {
444
- nodeType: "lib.image.color_grading.CDL",
445
- title: "CDL",
446
- description: "ASC CDL (Color Decision List) color correction.\n cdl, slope, offset, power, saturation, asc, color decision list\n\n Use cases:\n - Apply industry-standard CDL color correction\n - Exchange color grades between different software\n - Apply precise mathematical color transformations\n - Create consistent looks across multiple shots\n\n Formula: output = (input * slope + offset) ^ power\n Followed by saturation adjustment.",
447
- basicFields: [
448
- "image",
449
- "slope_r",
450
- "slope_g",
451
- "slope_b",
452
- "offset_r",
453
- "offset_g",
454
- "offset_b",
455
- "power_r",
456
- "power_g",
457
- "power_b",
458
- "saturation"
459
- ],
460
- outputs: {
461
- output: "image"
462
- },
463
- properties: [
464
- {
465
- name: "image",
466
- options: {
467
- type: "image",
468
- default: {
469
- type: "image",
470
- uri: "",
471
- asset_id: null,
472
- data: null,
473
- metadata: null
474
- },
475
- title: "Image",
476
- description: "The image to color correct."
477
- }
478
- },
479
- {
480
- name: "slope_r",
481
- options: {
482
- type: "float",
483
- default: 1,
484
- title: "Slope R",
485
- description: "Red slope (multiplier).",
486
- min: 0,
487
- max: 4
488
- }
489
- },
490
- {
491
- name: "slope_g",
492
- options: {
493
- type: "float",
494
- default: 1,
495
- title: "Slope G",
496
- description: "Green slope (multiplier).",
497
- min: 0,
498
- max: 4
499
- }
500
- },
501
- {
502
- name: "slope_b",
503
- options: {
504
- type: "float",
505
- default: 1,
506
- title: "Slope B",
507
- description: "Blue slope (multiplier).",
508
- min: 0,
509
- max: 4
510
- }
511
- },
512
- {
513
- name: "offset_r",
514
- options: {
515
- type: "float",
516
- default: 0,
517
- title: "Offset R",
518
- description: "Red offset (addition).",
519
- min: -1,
520
- max: 1
521
- }
522
- },
523
- {
524
- name: "offset_g",
525
- options: {
526
- type: "float",
527
- default: 0,
528
- title: "Offset G",
529
- description: "Green offset (addition).",
530
- min: -1,
531
- max: 1
532
- }
533
- },
534
- {
535
- name: "offset_b",
536
- options: {
537
- type: "float",
538
- default: 0,
539
- title: "Offset B",
540
- description: "Blue offset (addition).",
541
- min: -1,
542
- max: 1
543
- }
544
- },
545
- {
546
- name: "power_r",
547
- options: {
548
- type: "float",
549
- default: 1,
550
- title: "Power R",
551
- description: "Red power (gamma).",
552
- min: 0.1,
553
- max: 4
554
- }
555
- },
556
- {
557
- name: "power_g",
558
- options: {
559
- type: "float",
560
- default: 1,
561
- title: "Power G",
562
- description: "Green power (gamma).",
563
- min: 0.1,
564
- max: 4
565
- }
566
- },
567
- {
568
- name: "power_b",
569
- options: {
570
- type: "float",
571
- default: 1,
572
- title: "Power B",
573
- description: "Blue power (gamma).",
574
- min: 0.1,
575
- max: 4
576
- }
577
- },
578
- {
579
- name: "saturation",
580
- options: {
581
- type: "float",
582
- default: 1,
583
- title: "Saturation",
584
- description: "Saturation adjustment.",
585
- min: 0,
586
- max: 4
587
- }
588
- }
589
- ]
590
- },
591
- {
592
- nodeType: "lib.image.color_grading.ColorBalance",
593
- title: "Color Balance",
594
- description: "Adjust color temperature and tint for white balance correction.\n white balance, temperature, tint, color balance, warm, cool\n\n Use cases:\n - Correct white balance in photos and video\n - Warm up or cool down the overall image\n - Fix color casts from mixed lighting\n - Create mood through color temperature shifts",
595
- basicFields: ["image", "temperature", "tint"],
596
- outputs: {
597
- output: "image"
598
- },
599
- properties: [
600
- {
601
- name: "image",
602
- options: {
603
- type: "image",
604
- default: {
605
- type: "image",
606
- uri: "",
607
- asset_id: null,
608
- data: null,
609
- metadata: null
610
- },
611
- title: "Image",
612
- description: "The image to adjust."
613
- }
614
- },
615
- {
616
- name: "temperature",
617
- options: {
618
- type: "float",
619
- default: 0,
620
- title: "Temperature",
621
- description: "Color temperature. Positive = warmer (orange), negative = cooler (blue).",
622
- min: -1,
623
- max: 1
624
- }
625
- },
626
- {
627
- name: "tint",
628
- options: {
629
- type: "float",
630
- default: 0,
631
- title: "Tint",
632
- description: "Color tint. Positive = magenta, negative = green.",
633
- min: -1,
634
- max: 1
635
- }
636
- }
637
- ]
638
- },
639
- {
640
- nodeType: "lib.image.color_grading.Curves",
641
- title: "Curves",
642
- description: "RGB curves adjustment with control points for precise tonal control.\n curves, rgb, tonal, contrast, levels\n\n Use cases:\n - Create custom contrast curves\n - Adjust specific tonal ranges precisely\n - Create cross-processed or stylized looks\n - Match the tonal characteristics of film stocks",
643
- basicFields: [
644
- "image",
645
- "black_point",
646
- "white_point",
647
- "shadows",
648
- "midtones",
649
- "highlights",
650
- "red_midtones",
651
- "green_midtones",
652
- "blue_midtones"
653
- ],
654
- outputs: {
655
- output: "image"
656
- },
657
- properties: [
658
- {
659
- name: "image",
660
- options: {
661
- type: "image",
662
- default: {
663
- type: "image",
664
- uri: "",
665
- asset_id: null,
666
- data: null,
667
- metadata: null
668
- },
669
- title: "Image",
670
- description: "The image to adjust."
671
- }
672
- },
673
- {
674
- name: "black_point",
675
- options: {
676
- type: "float",
677
- default: 0,
678
- title: "Black Point",
679
- description: "Black point (input level that maps to 0).",
680
- min: 0,
681
- max: 0.5
682
- }
683
- },
684
- {
685
- name: "white_point",
686
- options: {
687
- type: "float",
688
- default: 1,
689
- title: "White Point",
690
- description: "White point (input level that maps to 1).",
691
- min: 0.5,
692
- max: 1
693
- }
694
- },
695
- {
696
- name: "shadows",
697
- options: {
698
- type: "float",
699
- default: 0,
700
- title: "Shadows",
701
- description: "Shadow curve adjustment.",
702
- min: -0.5,
703
- max: 0.5
704
- }
705
- },
706
- {
707
- name: "midtones",
708
- options: {
709
- type: "float",
710
- default: 0,
711
- title: "Midtones",
712
- description: "Midtone gamma adjustment.",
713
- min: -0.5,
714
- max: 0.5
715
- }
716
- },
717
- {
718
- name: "highlights",
719
- options: {
720
- type: "float",
721
- default: 0,
722
- title: "Highlights",
723
- description: "Highlight curve adjustment.",
724
- min: -0.5,
725
- max: 0.5
726
- }
727
- },
728
- {
729
- name: "red_midtones",
730
- options: {
731
- type: "float",
732
- default: 0,
733
- title: "Red Midtones",
734
- description: "Red channel midtone adjustment.",
735
- min: -0.5,
736
- max: 0.5
737
- }
738
- },
739
- {
740
- name: "green_midtones",
741
- options: {
742
- type: "float",
743
- default: 0,
744
- title: "Green Midtones",
745
- description: "Green channel midtone adjustment.",
746
- min: -0.5,
747
- max: 0.5
748
- }
749
- },
750
- {
751
- name: "blue_midtones",
752
- options: {
753
- type: "float",
754
- default: 0,
755
- title: "Blue Midtones",
756
- description: "Blue channel midtone adjustment.",
757
- min: -0.5,
758
- max: 0.5
759
- }
760
- }
761
- ]
762
- },
763
- {
764
- nodeType: "lib.image.color_grading.Exposure",
765
- title: "Exposure",
766
- description: "Comprehensive tonal exposure controls similar to Lightroom/Camera Raw.\n exposure, contrast, highlights, shadows, whites, blacks, tonal\n\n Use cases:\n - Correct over/underexposed images\n - Recover highlight and shadow detail\n - Adjust overall contrast and tonal range\n - Fine-tune the brightness of specific tonal regions",
767
- basicFields: [
768
- "image",
769
- "exposure",
770
- "contrast",
771
- "highlights",
772
- "shadows",
773
- "whites",
774
- "blacks"
775
- ],
776
- outputs: {
777
- output: "image"
778
- },
779
- properties: [
780
- {
781
- name: "image",
782
- options: {
783
- type: "image",
784
- default: {
785
- type: "image",
786
- uri: "",
787
- asset_id: null,
788
- data: null,
789
- metadata: null
790
- },
791
- title: "Image",
792
- description: "The image to adjust."
793
- }
794
- },
795
- {
796
- name: "exposure",
797
- options: {
798
- type: "float",
799
- default: 0,
800
- title: "Exposure",
801
- description: "Exposure in stops. 1 = double brightness, -1 = half brightness.",
802
- min: -5,
803
- max: 5
804
- }
805
- },
806
- {
807
- name: "contrast",
808
- options: {
809
- type: "float",
810
- default: 0,
811
- title: "Contrast",
812
- description: "Contrast adjustment. Positive = more contrast, negative = less.",
813
- min: -1,
814
- max: 1
815
- }
816
- },
817
- {
818
- name: "highlights",
819
- options: {
820
- type: "float",
821
- default: 0,
822
- title: "Highlights",
823
- description: "Highlight recovery/boost. Affects brightest areas.",
824
- min: -1,
825
- max: 1
826
- }
827
- },
828
- {
829
- name: "shadows",
830
- options: {
831
- type: "float",
832
- default: 0,
833
- title: "Shadows",
834
- description: "Shadow recovery/darken. Affects darkest areas.",
835
- min: -1,
836
- max: 1
837
- }
838
- },
839
- {
840
- name: "whites",
841
- options: {
842
- type: "float",
843
- default: 0,
844
- title: "Whites",
845
- description: "White point adjustment. Sets the brightest white.",
846
- min: -1,
847
- max: 1
848
- }
849
- },
850
- {
851
- name: "blacks",
852
- options: {
853
- type: "float",
854
- default: 0,
855
- title: "Blacks",
856
- description: "Black point adjustment. Sets the darkest black.",
857
- min: -1,
858
- max: 1
859
- }
860
- }
861
- ]
862
- },
863
- {
864
- nodeType: "lib.image.color_grading.FilmLook",
865
- title: "Film Look",
866
- description: "Apply preset cinematic film looks with adjustable intensity.\n film look, cinematic, preset, movie, lut, color grade\n\n Use cases:\n - Quickly apply popular cinematic color grades\n - Create consistent looks across multiple images\n - Emulate classic film stock characteristics\n - Starting point for custom color grading",
867
- basicFields: ["image", "preset", "intensity"],
868
- outputs: {
869
- output: "image"
870
- },
871
- properties: [
872
- {
873
- name: "image",
874
- options: {
875
- type: "image",
876
- default: {
877
- type: "image",
878
- uri: "",
879
- asset_id: null,
880
- data: null,
881
- metadata: null
882
- },
883
- title: "Image",
884
- description: "The image to apply the film look to."
885
- }
886
- },
887
- {
888
- name: "preset",
889
- options: {
890
- type: "enum",
891
- default: "teal_orange",
892
- title: "Preset",
893
- description: "The cinematic look to apply.",
894
- values: [
895
- "teal_orange",
896
- "blockbuster",
897
- "noir",
898
- "vintage",
899
- "cold_blue",
900
- "warm_sunset",
901
- "matrix",
902
- "bleach_bypass",
903
- "cross_process",
904
- "faded_film"
905
- ]
906
- }
907
- },
908
- {
909
- name: "intensity",
910
- options: {
911
- type: "float",
912
- default: 1,
913
- title: "Intensity",
914
- description: "Intensity of the effect. 0=none, 1=full, 2=exaggerated.",
915
- min: 0,
916
- max: 2
917
- }
918
- }
919
- ]
920
- },
921
- {
922
- nodeType: "lib.image.color_grading.HSLAdjust",
923
- title: "HSLAdjust",
924
- description: "Adjust hue, saturation, and luminance for specific color ranges.\n hsl, hue, saturation, luminance, selective color, color range\n\n Use cases:\n - Shift specific colors (e.g., make blues more cyan)\n - Desaturate or boost individual color ranges\n - Brighten or darken specific colors\n - Create color-specific looks (teal skies, orange skin)",
925
- basicFields: [
926
- "image",
927
- "color_range",
928
- "hue_shift",
929
- "saturation",
930
- "luminance"
931
- ],
932
- outputs: {
933
- output: "image"
934
- },
935
- properties: [
936
- {
937
- name: "image",
938
- options: {
939
- type: "image",
940
- default: {
941
- type: "image",
942
- uri: "",
943
- asset_id: null,
944
- data: null,
945
- metadata: null
946
- },
947
- title: "Image",
948
- description: "The image to adjust."
949
- }
950
- },
951
- {
952
- name: "color_range",
953
- options: {
954
- type: "enum",
955
- default: "all",
956
- title: "Color Range",
957
- description: "The color range to adjust.",
958
- values: [
959
- "all",
960
- "reds",
961
- "oranges",
962
- "yellows",
963
- "greens",
964
- "cyans",
965
- "blues",
966
- "purples",
967
- "magentas"
968
- ]
969
- }
970
- },
971
- {
972
- name: "hue_shift",
973
- options: {
974
- type: "float",
975
- default: 0,
976
- title: "Hue Shift",
977
- description: "Hue shift for the selected color range. -1 to 1 = -180 to +180 degrees.",
978
- min: -1,
979
- max: 1
980
- }
981
- },
982
- {
983
- name: "saturation",
984
- options: {
985
- type: "float",
986
- default: 0,
987
- title: "Saturation",
988
- description: "Saturation adjustment for the selected color range.",
989
- min: -1,
990
- max: 1
991
- }
992
- },
993
- {
994
- name: "luminance",
995
- options: {
996
- type: "float",
997
- default: 0,
998
- title: "Luminance",
999
- description: "Luminance adjustment for the selected color range.",
1000
- min: -1,
1001
- max: 1
1002
- }
1003
- }
1004
- ]
1005
- },
1006
- {
1007
- nodeType: "lib.image.color_grading.LiftGammaGain",
1008
- title: "Lift Gamma Gain",
1009
- description: "Three-way color corrector for shadows, midtones, and highlights.\n lift, gamma, gain, color wheels, primary correction, shadows, midtones, highlights\n\n Use cases:\n - Apply the industry-standard three-way color correction\n - Balance colors across different tonal ranges\n - Create color contrast between shadows and highlights\n - Match footage from different sources\n\n Lift affects shadows, Gamma affects midtones, Gain affects highlights.\n Each control adjusts both luminance and color for its tonal range.",
1010
- basicFields: [
1011
- "image",
1012
- "lift_r",
1013
- "lift_g",
1014
- "lift_b",
1015
- "lift_master",
1016
- "gamma_r",
1017
- "gamma_g",
1018
- "gamma_b",
1019
- "gamma_master",
1020
- "gain_r",
1021
- "gain_g",
1022
- "gain_b",
1023
- "gain_master"
1024
- ],
1025
- outputs: {
1026
- output: "image"
1027
- },
1028
- properties: [
1029
- {
1030
- name: "image",
1031
- options: {
1032
- type: "image",
1033
- default: {
1034
- type: "image",
1035
- uri: "",
1036
- asset_id: null,
1037
- data: null,
1038
- metadata: null
1039
- },
1040
- title: "Image",
1041
- description: "The image to color correct."
1042
- }
1043
- },
1044
- {
1045
- name: "lift_r",
1046
- options: {
1047
- type: "float",
1048
- default: 0,
1049
- title: "Lift R",
1050
- description: "Red lift (shadow color shift).",
1051
- min: -1,
1052
- max: 1
1053
- }
1054
- },
1055
- {
1056
- name: "lift_g",
1057
- options: {
1058
- type: "float",
1059
- default: 0,
1060
- title: "Lift G",
1061
- description: "Green lift (shadow color shift).",
1062
- min: -1,
1063
- max: 1
1064
- }
1065
- },
1066
- {
1067
- name: "lift_b",
1068
- options: {
1069
- type: "float",
1070
- default: 0,
1071
- title: "Lift B",
1072
- description: "Blue lift (shadow color shift).",
1073
- min: -1,
1074
- max: 1
1075
- }
1076
- },
1077
- {
1078
- name: "lift_master",
1079
- options: {
1080
- type: "float",
1081
- default: 0,
1082
- title: "Lift Master",
1083
- description: "Master lift (shadow brightness).",
1084
- min: -1,
1085
- max: 1
1086
- }
1087
- },
1088
- {
1089
- name: "gamma_r",
1090
- options: {
1091
- type: "float",
1092
- default: 1,
1093
- title: "Gamma R",
1094
- description: "Red gamma (midtone adjustment).",
1095
- min: 0.1,
1096
- max: 4
1097
- }
1098
- },
1099
- {
1100
- name: "gamma_g",
1101
- options: {
1102
- type: "float",
1103
- default: 1,
1104
- title: "Gamma G",
1105
- description: "Green gamma (midtone adjustment).",
1106
- min: 0.1,
1107
- max: 4
1108
- }
1109
- },
1110
- {
1111
- name: "gamma_b",
1112
- options: {
1113
- type: "float",
1114
- default: 1,
1115
- title: "Gamma B",
1116
- description: "Blue gamma (midtone adjustment).",
1117
- min: 0.1,
1118
- max: 4
1119
- }
1120
- },
1121
- {
1122
- name: "gamma_master",
1123
- options: {
1124
- type: "float",
1125
- default: 1,
1126
- title: "Gamma Master",
1127
- description: "Master gamma (overall midtones).",
1128
- min: 0.1,
1129
- max: 4
1130
- }
1131
- },
1132
- {
1133
- name: "gain_r",
1134
- options: {
1135
- type: "float",
1136
- default: 1,
1137
- title: "Gain R",
1138
- description: "Red gain (highlight multiplier).",
1139
- min: 0,
1140
- max: 4
1141
- }
1142
- },
1143
- {
1144
- name: "gain_g",
1145
- options: {
1146
- type: "float",
1147
- default: 1,
1148
- title: "Gain G",
1149
- description: "Green gain (highlight multiplier).",
1150
- min: 0,
1151
- max: 4
1152
- }
1153
- },
1154
- {
1155
- name: "gain_b",
1156
- options: {
1157
- type: "float",
1158
- default: 1,
1159
- title: "Gain B",
1160
- description: "Blue gain (highlight multiplier).",
1161
- min: 0,
1162
- max: 4
1163
- }
1164
- },
1165
- {
1166
- name: "gain_master",
1167
- options: {
1168
- type: "float",
1169
- default: 1,
1170
- title: "Gain Master",
1171
- description: "Master gain (overall brightness).",
1172
- min: 0,
1173
- max: 4
1174
- }
1175
- }
1176
- ]
1177
- },
1178
- {
1179
- nodeType: "lib.image.color_grading.SaturationVibrance",
1180
- title: "Saturation Vibrance",
1181
- description: "Adjust color saturation with vibrance protection for skin tones.\n saturation, vibrance, color intensity, skin tones\n\n Use cases:\n - Boost color intensity without clipping\n - Protect skin tones while increasing saturation\n - Create desaturated or oversaturated looks\n - Fine-tune color intensity independently",
1182
- basicFields: ["image", "saturation", "vibrance"],
1183
- outputs: {
1184
- output: "image"
1185
- },
1186
- properties: [
1187
- {
1188
- name: "image",
1189
- options: {
1190
- type: "image",
1191
- default: {
1192
- type: "image",
1193
- uri: "",
1194
- asset_id: null,
1195
- data: null,
1196
- metadata: null
1197
- },
1198
- title: "Image",
1199
- description: "The image to adjust."
1200
- }
1201
- },
1202
- {
1203
- name: "saturation",
1204
- options: {
1205
- type: "float",
1206
- default: 0,
1207
- title: "Saturation",
1208
- description: "Global saturation. 0 = no change, -1 = grayscale, 1 = 2x saturation.",
1209
- min: -1,
1210
- max: 1
1211
- }
1212
- },
1213
- {
1214
- name: "vibrance",
1215
- options: {
1216
- type: "float",
1217
- default: 0,
1218
- title: "Vibrance",
1219
- description: "Smart saturation that protects already-saturated colors and skin tones.",
1220
- min: -1,
1221
- max: 1
1222
- }
1223
- }
1224
- ]
1225
- },
1226
- {
1227
- nodeType: "lib.image.color_grading.SplitToning",
1228
- title: "Split Toning",
1229
- description: "Apply different color tints to shadows and highlights.\n split toning, shadows, highlights, tint, duotone\n\n Use cases:\n - Create classic teal and orange looks\n - Add color contrast between shadows and highlights\n - Emulate film processing techniques\n - Create stylized color-graded images",
1230
- basicFields: [
1231
- "image",
1232
- "shadow_hue",
1233
- "shadow_saturation",
1234
- "highlight_hue",
1235
- "highlight_saturation",
1236
- "balance"
1237
- ],
1238
- outputs: {
1239
- output: "image"
1240
- },
1241
- properties: [
1242
- {
1243
- name: "image",
1244
- options: {
1245
- type: "image",
1246
- default: {
1247
- type: "image",
1248
- uri: "",
1249
- asset_id: null,
1250
- data: null,
1251
- metadata: null
1252
- },
1253
- title: "Image",
1254
- description: "The image to apply split toning to."
1255
- }
1256
- },
1257
- {
1258
- name: "shadow_hue",
1259
- options: {
1260
- type: "float",
1261
- default: 200,
1262
- title: "Shadow Hue",
1263
- description: "Hue of shadow tint in degrees (0=red, 120=green, 240=blue).",
1264
- min: 0,
1265
- max: 360
1266
- }
1267
- },
1268
- {
1269
- name: "shadow_saturation",
1270
- options: {
1271
- type: "float",
1272
- default: 0.3,
1273
- title: "Shadow Saturation",
1274
- description: "Saturation of shadow tint.",
1275
- min: 0,
1276
- max: 1
1277
- }
1278
- },
1279
- {
1280
- name: "highlight_hue",
1281
- options: {
1282
- type: "float",
1283
- default: 40,
1284
- title: "Highlight Hue",
1285
- description: "Hue of highlight tint in degrees.",
1286
- min: 0,
1287
- max: 360
1288
- }
1289
- },
1290
- {
1291
- name: "highlight_saturation",
1292
- options: {
1293
- type: "float",
1294
- default: 0.3,
1295
- title: "Highlight Saturation",
1296
- description: "Saturation of highlight tint.",
1297
- min: 0,
1298
- max: 1
1299
- }
1300
- },
1301
- {
1302
- name: "balance",
1303
- options: {
1304
- type: "float",
1305
- default: 0,
1306
- title: "Balance",
1307
- description: "Balance between shadows (-1) and highlights (+1).",
1308
- min: -1,
1309
- max: 1
1310
- }
1311
- }
1312
- ]
1313
- },
1314
- {
1315
- nodeType: "lib.image.color_grading.Vignette",
1316
- title: "Vignette",
1317
- description: "Apply cinematic vignette effect to darken or lighten image edges.\n vignette, edge, darken, focus, cinematic\n\n Use cases:\n - Draw attention to the center of the image\n - Create a classic cinematic look\n - Simulate lens light falloff\n - Add subtle framing to photos",
1318
- basicFields: ["image", "amount", "midpoint", "roundness", "feather"],
1319
- outputs: {
1320
- output: "image"
1321
- },
1322
- properties: [
1323
- {
1324
- name: "image",
1325
- options: {
1326
- type: "image",
1327
- default: {
1328
- type: "image",
1329
- uri: "",
1330
- asset_id: null,
1331
- data: null,
1332
- metadata: null
1333
- },
1334
- title: "Image",
1335
- description: "The image to apply vignette to."
1336
- }
1337
- },
1338
- {
1339
- name: "amount",
1340
- options: {
1341
- type: "float",
1342
- default: 0.5,
1343
- title: "Amount",
1344
- description: "Vignette amount. Positive darkens edges, negative lightens.",
1345
- min: -1,
1346
- max: 1
1347
- }
1348
- },
1349
- {
1350
- name: "midpoint",
1351
- options: {
1352
- type: "float",
1353
- default: 0.5,
1354
- title: "Midpoint",
1355
- description: "Distance from center where vignette begins (0=center, 1=edges).",
1356
- min: 0,
1357
- max: 1
1358
- }
1359
- },
1360
- {
1361
- name: "roundness",
1362
- options: {
1363
- type: "float",
1364
- default: 0,
1365
- title: "Roundness",
1366
- description: "Shape of vignette. 0=oval matching image aspect, 1=circular, -1=rectangular.",
1367
- min: -1,
1368
- max: 1
1369
- }
1370
- },
1371
- {
1372
- name: "feather",
1373
- options: {
1374
- type: "float",
1375
- default: 0.5,
1376
- title: "Feather",
1377
- description: "Softness of the vignette edge.",
1378
- min: 0,
1379
- max: 1
1380
- }
1381
- }
1382
- ]
1383
- }
1384
- ];
1385
- export const LIB_IMAGE_COLOR_GRADING_NODES = DESCRIPTORS.map(createColorGradingNode);
1386
- //# sourceMappingURL=lib-image-color-grading.js.map