@field/cascade 0.2.22

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 (319) hide show
  1. package/AGENTS.md +168 -0
  2. package/ARCHITECTURE.md +137 -0
  3. package/DESIGN.md +161 -0
  4. package/LICENSE +21 -0
  5. package/README.md +229 -0
  6. package/dist/assets/CodeEditor-DR7u0q7p.css +1 -0
  7. package/dist/assets/CodeEditor-DoaNEUaM.js +641 -0
  8. package/dist/assets/CodePanel-B0_2XJ-t.js +2 -0
  9. package/dist/assets/CodePanel-IT1secyI.css +1 -0
  10. package/dist/assets/CustomNodeDialog-026lzecD.js +1 -0
  11. package/dist/assets/CustomNodeDialog-JGYnWY6m.css +1 -0
  12. package/dist/assets/ExportDialog-DOq0flMV.css +1 -0
  13. package/dist/assets/ExportDialog-DWN4nhXI.js +358 -0
  14. package/dist/assets/ProjectSettings-BzT164Yx.js +2 -0
  15. package/dist/assets/ProjectSettings-DdO9xoQz.css +1 -0
  16. package/dist/assets/SettingsDialog-CeK7ytpY.css +1 -0
  17. package/dist/assets/SettingsDialog-DmHb1V0r.js +1 -0
  18. package/dist/assets/VersionHistoryDialog-CWNmHQ-P.css +1 -0
  19. package/dist/assets/VersionHistoryDialog-hH6VsXLX.js +3 -0
  20. package/dist/assets/abap-08VXUWAP.js +1 -0
  21. package/dist/assets/apex-BWPQTe0t.js +1 -0
  22. package/dist/assets/azcli-Bc_sGQ0U.js +1 -0
  23. package/dist/assets/bat-i0X4ZdIN.js +1 -0
  24. package/dist/assets/bicep-B5-_aFwp.js +2 -0
  25. package/dist/assets/cameligo-DMUM7wLl.js +1 -0
  26. package/dist/assets/cascade.jpg +0 -0
  27. package/dist/assets/clojure-Cm7r79vr.js +1 -0
  28. package/dist/assets/codicon-Brq4_Ui5.ttf +0 -0
  29. package/dist/assets/coffee-Ba7i2nA0.js +1 -0
  30. package/dist/assets/core-Bji4aZUU.js +965 -0
  31. package/dist/assets/cpp-C7h46wYY.js +1 -0
  32. package/dist/assets/csharp-BKxtCVv1.js +1 -0
  33. package/dist/assets/csp-bTuwJoIa.js +1 -0
  34. package/dist/assets/css-DIMkf-bt.js +3 -0
  35. package/dist/assets/css.worker-B3ciXF_0.js +93 -0
  36. package/dist/assets/cssMode-B6Z_Q1Kh.js +1 -0
  37. package/dist/assets/cypher-CVaqCwHa.js +1 -0
  38. package/dist/assets/dart-onAF5SnQ.js +1 -0
  39. package/dist/assets/dockerfile-DZFCIeNp.js +1 -0
  40. package/dist/assets/ecl-D05T4iGw.js +1 -0
  41. package/dist/assets/editor-1FQrmyyI.css +1 -0
  42. package/dist/assets/editor.api-jMoW_43X.js +847 -0
  43. package/dist/assets/editor.worker-q-txB4vs.js +30 -0
  44. package/dist/assets/elixir-6RTg0lbw.js +1 -0
  45. package/dist/assets/flow9-C5_-GSwl.js +1 -0
  46. package/dist/assets/freemarker2-DvvPV6m5.js +3 -0
  47. package/dist/assets/fsharp-C8Ef5oNN.js +1 -0
  48. package/dist/assets/geo-CXmCtzMM.js +2 -0
  49. package/dist/assets/go-C-y9NEjX.js +1 -0
  50. package/dist/assets/graphql-fmXr3nnJ.js +1 -0
  51. package/dist/assets/handlebars-B8rfuSIa.js +1 -0
  52. package/dist/assets/hcl-CpzslTdj.js +1 -0
  53. package/dist/assets/html-DyHm6JCp.js +1 -0
  54. package/dist/assets/html.worker-C93Ht9o9.js +506 -0
  55. package/dist/assets/htmlMode-E9XLWE5u.js +1 -0
  56. package/dist/assets/image-BUcQC7PG.js +2076 -0
  57. package/dist/assets/index-BXYXSdgh.js +224 -0
  58. package/dist/assets/index-CrNke7SW.css +1 -0
  59. package/dist/assets/index-client-DN_FvjN8.js +1 -0
  60. package/dist/assets/ini-sBoK_t0W.js +1 -0
  61. package/dist/assets/java-BEtHBSE6.js +1 -0
  62. package/dist/assets/javascript-C_bM5PCN.js +1 -0
  63. package/dist/assets/json.worker-B2V3pomh.js +62 -0
  64. package/dist/assets/jsonMode-BdyVS7G4.js +7 -0
  65. package/dist/assets/julia-Bri6UV-V.js +1 -0
  66. package/dist/assets/kotlin-BOotOW0E.js +1 -0
  67. package/dist/assets/legacy-DIu3XRwl.js +2 -0
  68. package/dist/assets/less-B9JPFI3C.js +2 -0
  69. package/dist/assets/lexon-CfSJPG6W.js +1 -0
  70. package/dist/assets/liquid-CDkn3spA.js +1 -0
  71. package/dist/assets/lspLanguageFeatures-AB5DMAsr.js +4 -0
  72. package/dist/assets/lua-CsQS60Ue.js +1 -0
  73. package/dist/assets/m3-D-oSqn_W.js +1 -0
  74. package/dist/assets/markdown-Cimd5fb3.js +1 -0
  75. package/dist/assets/mdx-BvH_NjDN.js +1 -0
  76. package/dist/assets/mips-CIPQ_RoX.js +1 -0
  77. package/dist/assets/msdax-DauUninz.js +1 -0
  78. package/dist/assets/mysql-SOo6toE5.js +1 -0
  79. package/dist/assets/nodeTypeUtils-CweA3NHd.js +1 -0
  80. package/dist/assets/objective-c-FvmIjYaQ.js +1 -0
  81. package/dist/assets/pascal-DrH0SRf2.js +1 -0
  82. package/dist/assets/pascaligo-D-ptJ9y-.js +1 -0
  83. package/dist/assets/perl-oz_6vUea.js +1 -0
  84. package/dist/assets/pgsql-DTj74zXo.js +1 -0
  85. package/dist/assets/php-nr791fC2.js +1 -0
  86. package/dist/assets/pla-CopQ2nXW.js +1 -0
  87. package/dist/assets/postiats-43DmfD33.js +1 -0
  88. package/dist/assets/powerquery-D3hlyOfw.js +1 -0
  89. package/dist/assets/powershell-DmHpPYUd.js +1 -0
  90. package/dist/assets/projectSettingsApi-C1WvIwfP.js +1 -0
  91. package/dist/assets/protobuf-C531GsRP.js +2 -0
  92. package/dist/assets/pug-Z5eAx3Zn.js +1 -0
  93. package/dist/assets/python-B7uii4fi.js +1 -0
  94. package/dist/assets/qsharp-DkqhCAOL.js +1 -0
  95. package/dist/assets/quill-DjZ69wL_.js +121 -0
  96. package/dist/assets/r-BwWrilGY.js +1 -0
  97. package/dist/assets/razor-Z48fWdJc.js +1 -0
  98. package/dist/assets/redis-ClamHrr6.js +1 -0
  99. package/dist/assets/redshift-DT7zqm-g.js +1 -0
  100. package/dist/assets/restructuredtext-BYgofb2h.js +1 -0
  101. package/dist/assets/ruby-DezsRK8O.js +1 -0
  102. package/dist/assets/rust-DdL9SqIa.js +1 -0
  103. package/dist/assets/sb-CcwsVR0C.js +1 -0
  104. package/dist/assets/scala-DHpiXF5c.js +1 -0
  105. package/dist/assets/scheme-BeGwcela.js +1 -0
  106. package/dist/assets/scss-gp-XZpBa.js +3 -0
  107. package/dist/assets/shell-CC2rA5mh.js +1 -0
  108. package/dist/assets/solidity-BEEn4gHE.js +1 -0
  109. package/dist/assets/sophia-CRfGWb83.js +1 -0
  110. package/dist/assets/sparql-D_Lu-MrJ.js +1 -0
  111. package/dist/assets/sql-NEE52Syq.js +1 -0
  112. package/dist/assets/st-DbInun42.js +1 -0
  113. package/dist/assets/swift-Bxkupp3x.js +1 -0
  114. package/dist/assets/systemverilog-Bz4Y3fRF.js +1 -0
  115. package/dist/assets/tcl-DISqw1ZD.js +1 -0
  116. package/dist/assets/ts.worker-D7T1-Ig5.js +67738 -0
  117. package/dist/assets/tsMode-BDgacVG4.js +11 -0
  118. package/dist/assets/twig-De2hgUGE.js +1 -0
  119. package/dist/assets/typescript-Derb6Oqa.js +1 -0
  120. package/dist/assets/typespec-B8J7ngcE.js +1 -0
  121. package/dist/assets/vb-DV3o63ZY.js +1 -0
  122. package/dist/assets/wgsl-DpFanUEy.js +298 -0
  123. package/dist/assets/workers-BtoMX_pm.js +1 -0
  124. package/dist/assets/xml-B1CaFSrG.js +1 -0
  125. package/dist/assets/yaml-HmIeA0KH.js +1 -0
  126. package/dist/cli/index.js +11377 -0
  127. package/dist/cli/index.js.map +7 -0
  128. package/dist/cli/runtime/io.ts +445 -0
  129. package/dist/cli/runtime/net.ts +19 -0
  130. package/dist/cli/runtime/shell.ts +46 -0
  131. package/dist/cli/runtime/stage.ts +132 -0
  132. package/dist/contracts/capabilities.d.ts +109 -0
  133. package/dist/contracts/capabilities.d.ts.map +1 -0
  134. package/dist/contracts/capabilities.js +11 -0
  135. package/dist/contracts/capabilities.js.map +1 -0
  136. package/dist/contracts/color.d.ts +67 -0
  137. package/dist/contracts/color.d.ts.map +1 -0
  138. package/dist/contracts/color.js +83 -0
  139. package/dist/contracts/color.js.map +1 -0
  140. package/dist/contracts/definition.d.ts +118 -0
  141. package/dist/contracts/definition.d.ts.map +1 -0
  142. package/dist/contracts/definition.js +2 -0
  143. package/dist/contracts/definition.js.map +1 -0
  144. package/dist/contracts/document.d.ts +50 -0
  145. package/dist/contracts/document.d.ts.map +1 -0
  146. package/dist/contracts/document.js +2 -0
  147. package/dist/contracts/document.js.map +1 -0
  148. package/dist/contracts/geometry.d.ts +301 -0
  149. package/dist/contracts/geometry.d.ts.map +1 -0
  150. package/dist/contracts/geometry.js +604 -0
  151. package/dist/contracts/geometry.js.map +1 -0
  152. package/dist/contracts/index.d.ts +8 -0
  153. package/dist/contracts/index.d.ts.map +1 -0
  154. package/dist/contracts/index.js +8 -0
  155. package/dist/contracts/index.js.map +1 -0
  156. package/dist/contracts/schema.d.ts +6 -0
  157. package/dist/contracts/schema.d.ts.map +1 -0
  158. package/dist/contracts/schema.js +85 -0
  159. package/dist/contracts/schema.js.map +1 -0
  160. package/dist/contracts/validate.d.ts +13 -0
  161. package/dist/contracts/validate.d.ts.map +1 -0
  162. package/dist/contracts/validate.js +202 -0
  163. package/dist/contracts/validate.js.map +1 -0
  164. package/dist/contracts/values.d.ts +100 -0
  165. package/dist/contracts/values.d.ts.map +1 -0
  166. package/dist/contracts/values.js +59 -0
  167. package/dist/contracts/values.js.map +1 -0
  168. package/dist/graphs/default-orig.cascade +128 -0
  169. package/dist/graphs/default.cascade +21 -0
  170. package/dist/index.html +19 -0
  171. package/dist/runtime/browser.d.ts +3 -0
  172. package/dist/runtime/browser.d.ts.map +1 -0
  173. package/dist/runtime/browser.js +12 -0
  174. package/dist/runtime/browser.js.map +1 -0
  175. package/dist/runtime/builtins/core/index.d.ts +9 -0
  176. package/dist/runtime/builtins/core/index.d.ts.map +1 -0
  177. package/dist/runtime/builtins/core/index.js +21 -0
  178. package/dist/runtime/builtins/core/index.js.map +1 -0
  179. package/dist/runtime/builtins/core/random.d.ts +66 -0
  180. package/dist/runtime/builtins/core/random.d.ts.map +1 -0
  181. package/dist/runtime/builtins/core/random.js +46 -0
  182. package/dist/runtime/builtins/core/random.js.map +1 -0
  183. package/dist/runtime/builtins/core/remap.d.ts +105 -0
  184. package/dist/runtime/builtins/core/remap.d.ts.map +1 -0
  185. package/dist/runtime/builtins/core/remap.js +43 -0
  186. package/dist/runtime/builtins/core/remap.js.map +1 -0
  187. package/dist/runtime/builtins/core/routing.d.ts +117 -0
  188. package/dist/runtime/builtins/core/routing.d.ts.map +1 -0
  189. package/dist/runtime/builtins/core/routing.js +114 -0
  190. package/dist/runtime/builtins/core/routing.js.map +1 -0
  191. package/dist/runtime/builtins/core/structural.d.ts +86 -0
  192. package/dist/runtime/builtins/core/structural.d.ts.map +1 -0
  193. package/dist/runtime/builtins/core/structural.js +63 -0
  194. package/dist/runtime/builtins/core/structural.js.map +1 -0
  195. package/dist/runtime/builtins/geo/copyToPoints.d.ts +58 -0
  196. package/dist/runtime/builtins/geo/copyToPoints.d.ts.map +1 -0
  197. package/dist/runtime/builtins/geo/copyToPoints.js +35 -0
  198. package/dist/runtime/builtins/geo/copyToPoints.js.map +1 -0
  199. package/dist/runtime/builtins/geo/definitions.d.ts +526 -0
  200. package/dist/runtime/builtins/geo/definitions.d.ts.map +1 -0
  201. package/dist/runtime/builtins/geo/definitions.js +182 -0
  202. package/dist/runtime/builtins/geo/definitions.js.map +1 -0
  203. package/dist/runtime/builtins/geo/generators.d.ts +94 -0
  204. package/dist/runtime/builtins/geo/generators.d.ts.map +1 -0
  205. package/dist/runtime/builtins/geo/generators.js +41 -0
  206. package/dist/runtime/builtins/geo/generators.js.map +1 -0
  207. package/dist/runtime/builtins/geo/index.d.ts +23 -0
  208. package/dist/runtime/builtins/geo/index.d.ts.map +1 -0
  209. package/dist/runtime/builtins/geo/index.js +35 -0
  210. package/dist/runtime/builtins/geo/index.js.map +1 -0
  211. package/dist/runtime/builtins/geo/merge.d.ts +40 -0
  212. package/dist/runtime/builtins/geo/merge.d.ts.map +1 -0
  213. package/dist/runtime/builtins/geo/merge.js +24 -0
  214. package/dist/runtime/builtins/geo/merge.js.map +1 -0
  215. package/dist/runtime/builtins/geo/namespace.d.ts +15 -0
  216. package/dist/runtime/builtins/geo/namespace.d.ts.map +1 -0
  217. package/dist/runtime/builtins/geo/namespace.js +17 -0
  218. package/dist/runtime/builtins/geo/namespace.js.map +1 -0
  219. package/dist/runtime/builtins/geo/svgExport.d.ts +130 -0
  220. package/dist/runtime/builtins/geo/svgExport.d.ts.map +1 -0
  221. package/dist/runtime/builtins/geo/svgExport.js +50 -0
  222. package/dist/runtime/builtins/geo/svgExport.js.map +1 -0
  223. package/dist/runtime/builtins/geo/transform.d.ts +60 -0
  224. package/dist/runtime/builtins/geo/transform.d.ts.map +1 -0
  225. package/dist/runtime/builtins/geo/transform.js +32 -0
  226. package/dist/runtime/builtins/geo/transform.js.map +1 -0
  227. package/dist/runtime/builtins/index.d.ts +9 -0
  228. package/dist/runtime/builtins/index.d.ts.map +1 -0
  229. package/dist/runtime/builtins/index.js +16 -0
  230. package/dist/runtime/builtins/index.js.map +1 -0
  231. package/dist/runtime/definition/architecture.d.ts +8 -0
  232. package/dist/runtime/definition/architecture.d.ts.map +1 -0
  233. package/dist/runtime/definition/architecture.js +112 -0
  234. package/dist/runtime/definition/architecture.js.map +1 -0
  235. package/dist/runtime/definition/extract.d.ts +12 -0
  236. package/dist/runtime/definition/extract.d.ts.map +1 -0
  237. package/dist/runtime/definition/extract.js +151 -0
  238. package/dist/runtime/definition/extract.js.map +1 -0
  239. package/dist/runtime/error.d.ts +8 -0
  240. package/dist/runtime/error.d.ts.map +1 -0
  241. package/dist/runtime/error.js +11 -0
  242. package/dist/runtime/error.js.map +1 -0
  243. package/dist/runtime/geometry/attributes.d.ts +65 -0
  244. package/dist/runtime/geometry/attributes.d.ts.map +1 -0
  245. package/dist/runtime/geometry/attributes.js +201 -0
  246. package/dist/runtime/geometry/attributes.js.map +1 -0
  247. package/dist/runtime/geometry/builder.d.ts +57 -0
  248. package/dist/runtime/geometry/builder.d.ts.map +1 -0
  249. package/dist/runtime/geometry/builder.js +153 -0
  250. package/dist/runtime/geometry/builder.js.map +1 -0
  251. package/dist/runtime/geometry/copy.d.ts +36 -0
  252. package/dist/runtime/geometry/copy.d.ts.map +1 -0
  253. package/dist/runtime/geometry/copy.js +68 -0
  254. package/dist/runtime/geometry/copy.js.map +1 -0
  255. package/dist/runtime/geometry/generate.d.ts +43 -0
  256. package/dist/runtime/geometry/generate.d.ts.map +1 -0
  257. package/dist/runtime/geometry/generate.js +76 -0
  258. package/dist/runtime/geometry/generate.js.map +1 -0
  259. package/dist/runtime/geometry/groups.d.ts +18 -0
  260. package/dist/runtime/geometry/groups.d.ts.map +1 -0
  261. package/dist/runtime/geometry/groups.js +69 -0
  262. package/dist/runtime/geometry/groups.js.map +1 -0
  263. package/dist/runtime/geometry/index.d.ts +23 -0
  264. package/dist/runtime/geometry/index.d.ts.map +1 -0
  265. package/dist/runtime/geometry/index.js +23 -0
  266. package/dist/runtime/geometry/index.js.map +1 -0
  267. package/dist/runtime/geometry/matrix.d.ts +26 -0
  268. package/dist/runtime/geometry/matrix.d.ts.map +1 -0
  269. package/dist/runtime/geometry/matrix.js +27 -0
  270. package/dist/runtime/geometry/matrix.js.map +1 -0
  271. package/dist/runtime/geometry/merge.d.ts +33 -0
  272. package/dist/runtime/geometry/merge.d.ts.map +1 -0
  273. package/dist/runtime/geometry/merge.js +185 -0
  274. package/dist/runtime/geometry/merge.js.map +1 -0
  275. package/dist/runtime/geometry/primitives.d.ts +41 -0
  276. package/dist/runtime/geometry/primitives.d.ts.map +1 -0
  277. package/dist/runtime/geometry/primitives.js +131 -0
  278. package/dist/runtime/geometry/primitives.js.map +1 -0
  279. package/dist/runtime/geometry/promote.d.ts +44 -0
  280. package/dist/runtime/geometry/promote.d.ts.map +1 -0
  281. package/dist/runtime/geometry/promote.js +203 -0
  282. package/dist/runtime/geometry/promote.js.map +1 -0
  283. package/dist/runtime/geometry/resample.d.ts +29 -0
  284. package/dist/runtime/geometry/resample.d.ts.map +1 -0
  285. package/dist/runtime/geometry/resample.js +165 -0
  286. package/dist/runtime/geometry/resample.js.map +1 -0
  287. package/dist/runtime/geometry/svg.d.ts +91 -0
  288. package/dist/runtime/geometry/svg.d.ts.map +1 -0
  289. package/dist/runtime/geometry/svg.js +216 -0
  290. package/dist/runtime/geometry/svg.js.map +1 -0
  291. package/dist/runtime/geometry/transform.d.ts +18 -0
  292. package/dist/runtime/geometry/transform.d.ts.map +1 -0
  293. package/dist/runtime/geometry/transform.js +56 -0
  294. package/dist/runtime/geometry/transform.js.map +1 -0
  295. package/dist/runtime/index.d.ts +5 -0
  296. package/dist/runtime/index.d.ts.map +1 -0
  297. package/dist/runtime/index.js +4 -0
  298. package/dist/runtime/index.js.map +1 -0
  299. package/dist/runtime/node.d.ts +4 -0
  300. package/dist/runtime/node.d.ts.map +1 -0
  301. package/dist/runtime/node.js +12 -0
  302. package/dist/runtime/node.js.map +1 -0
  303. package/dist/runtime/runtime.d.ts +3 -0
  304. package/dist/runtime/runtime.d.ts.map +1 -0
  305. package/dist/runtime/runtime.js +1198 -0
  306. package/dist/runtime/runtime.js.map +1 -0
  307. package/dist/runtime/types.d.ts +241 -0
  308. package/dist/runtime/types.d.ts.map +1 -0
  309. package/dist/runtime/types.js +2 -0
  310. package/dist/runtime/types.js.map +1 -0
  311. package/dist/shell.d.ts +8 -0
  312. package/dist/shell.js +54 -0
  313. package/dist/shell.js.map +7 -0
  314. package/dist/stage.d.ts +7 -0
  315. package/dist/stage.js +84 -0
  316. package/dist/stage.js.map +7 -0
  317. package/dist/studio/panel.d.ts +48 -0
  318. package/doc/PROJECT_AUTHORING.md +360 -0
  319. package/package.json +126 -0
@@ -0,0 +1,182 @@
1
+ export const rectangleDefinition = {
2
+ apiVersion: 1,
3
+ label: "Rectangle",
4
+ description: "A closed four-point polygon, counter-clockwise from bottom-left.",
5
+ icon: "Square",
6
+ runsOn: "portable",
7
+ inputs: {
8
+ size: { kind: "data", type: "vec2", default: [1, 1] },
9
+ center: { kind: "data", type: "vec2", default: [0, 0] },
10
+ },
11
+ outputs: { geometry: { kind: "data", type: "geometry" } },
12
+ };
13
+ export const circleDefinition = {
14
+ apiVersion: 1,
15
+ label: "Circle",
16
+ description: "A closed circle, as one cubic Bezier chain or as a polygon of divisions segments.",
17
+ icon: "Circle",
18
+ runsOn: "portable",
19
+ inputs: {
20
+ center: { kind: "data", type: "vec2", default: [0, 0] },
21
+ radius: { kind: "data", type: "vec2", default: [1, 1] },
22
+ divisions: {
23
+ kind: "data",
24
+ type: "int",
25
+ default: 32,
26
+ min: 3,
27
+ step: 1,
28
+ description: "Segments of the polygonal form. Ignored by the Bezier form.",
29
+ },
30
+ },
31
+ outputs: { geometry: { kind: "data", type: "geometry" } },
32
+ props: {
33
+ type: {
34
+ type: "string",
35
+ default: "bezier",
36
+ label: "Primitive Type",
37
+ control: "select",
38
+ options: ["bezier", "poly"],
39
+ description: "A Bezier circle is a circle; a polygon of any division count is visibly a polygon in print.",
40
+ },
41
+ },
42
+ };
43
+ export const transformDefinition = {
44
+ apiVersion: 1,
45
+ label: "Transform",
46
+ description: "Translate, rotate and scale geometry about a pivot.",
47
+ icon: "Move",
48
+ runsOn: "portable",
49
+ inputs: {
50
+ geometry: { kind: "data", type: "geometry" },
51
+ translate: { kind: "data", type: "vec2", default: [0, 0] },
52
+ rotate: {
53
+ kind: "data",
54
+ type: "float",
55
+ default: 0,
56
+ description: "Degrees, counter-clockwise.",
57
+ },
58
+ scale: { kind: "data", type: "vec2", default: [1, 1] },
59
+ pivot: { kind: "data", type: "vec2", default: [0, 0] },
60
+ },
61
+ outputs: { geometry: { kind: "data", type: "geometry" } },
62
+ };
63
+ export const mergeDefinition = {
64
+ apiVersion: 1,
65
+ label: "Merge",
66
+ description: "Concatenate geometries, taking the union of their attributes.",
67
+ icon: "GitMerge",
68
+ runsOn: "portable",
69
+ inputs: { inputs: { kind: "data", type: "geometry", variadic: true } },
70
+ outputs: { geometry: { kind: "data", type: "geometry" } },
71
+ };
72
+ export const copyToPointsDefinition = {
73
+ apiVersion: 1,
74
+ label: "Copy to Points",
75
+ description: "Instance one geometry onto every point of another.",
76
+ icon: "Copy",
77
+ runsOn: "portable",
78
+ inputs: {
79
+ source: { kind: "data", type: "geometry" },
80
+ target: { kind: "data", type: "geometry" },
81
+ },
82
+ outputs: { geometry: { kind: "data", type: "geometry" } },
83
+ props: {
84
+ targetGroup: {
85
+ type: "string",
86
+ default: "",
87
+ label: "Target Group",
88
+ description: "Copy onto this point group only; empty means every point.",
89
+ },
90
+ useTargetOrientations: {
91
+ type: "bool",
92
+ default: true,
93
+ label: "Transform Using Target Point Orientations",
94
+ description: "Read pscale and N from the target points.",
95
+ },
96
+ },
97
+ };
98
+ export const svgExportDefinition = {
99
+ apiVersion: 1,
100
+ label: "SVG Export",
101
+ description: "Write geometry as an SVG document, one group element per group.",
102
+ icon: "FileDown",
103
+ runsOn: "portable",
104
+ capabilities: ["assets"],
105
+ inputs: { geometry: { kind: "data", type: "geometry" } },
106
+ outputs: {
107
+ svg: { kind: "data", type: "string" },
108
+ asset: { kind: "data", type: "asset" },
109
+ },
110
+ props: {
111
+ filename: { type: "string", default: "geometry.svg", label: "Filename" },
112
+ width: {
113
+ type: "float",
114
+ default: 0,
115
+ min: 0,
116
+ label: "Width",
117
+ description: "0 derives the width from the geometry bounds.",
118
+ },
119
+ height: { type: "float", default: 0, min: 0, label: "Height" },
120
+ margin: { type: "float", default: 0, label: "Margin" },
121
+ stroke: {
122
+ type: "color",
123
+ default: [0, 0, 0, 1],
124
+ label: "Stroke",
125
+ description: "Fallback for a primitive with no Cd attribute.",
126
+ },
127
+ strokeWidth: {
128
+ type: "float",
129
+ default: 1,
130
+ min: 0,
131
+ label: "Stroke Width",
132
+ description: "Fallback for a primitive with no width attribute.",
133
+ },
134
+ opacity: {
135
+ type: "float",
136
+ default: 1,
137
+ min: 0,
138
+ max: 1,
139
+ label: "Opacity",
140
+ description: "Fallback for a primitive with no opacity attribute.",
141
+ },
142
+ fillMode: {
143
+ type: "string",
144
+ default: "none",
145
+ label: "Fill Mode",
146
+ control: "select",
147
+ options: ["none", "solid"],
148
+ description: "none leaves primitives unfilled, which is what plotter work wants.",
149
+ },
150
+ fill: {
151
+ type: "color",
152
+ default: [1, 1, 1, 1],
153
+ label: "Fill",
154
+ description: "Fill colour, used only when Fill Mode is solid.",
155
+ },
156
+ pointRadius: {
157
+ type: "float",
158
+ default: 0.5,
159
+ min: 0,
160
+ label: "Point Radius",
161
+ description: "Fallback radius for a loose point with no pscale.",
162
+ },
163
+ precision: {
164
+ type: "int",
165
+ default: 3,
166
+ min: 0,
167
+ max: 15,
168
+ step: 1,
169
+ label: "Precision",
170
+ description: "Decimal places on emitted coordinates.",
171
+ },
172
+ },
173
+ };
174
+ export const geoNodeDefinitions = Object.freeze([
175
+ ["cascade.geo.Rectangle", rectangleDefinition],
176
+ ["cascade.geo.Circle", circleDefinition],
177
+ ["cascade.geo.Transform", transformDefinition],
178
+ ["cascade.geo.Merge", mergeDefinition],
179
+ ["cascade.geo.CopyToPoints", copyToPointsDefinition],
180
+ ["cascade.geo.SvgExport", svgExportDefinition],
181
+ ]);
182
+ //# sourceMappingURL=definitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../../src/builtins/geo/definitions.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,UAAU,EAAE,CAAC;IACb,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,kEAAkE;IAC/E,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE,UAAU;IAClB,MAAM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AAC,EAAE,CAAC,CAAC;YACrB,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,iDAAiD;SAC/D;QACD,WAAW,EAAE;YACX,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,GAAG;YACZ,GAAG,EAAE,CAAC;YACN,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,mDAAmD;SACjE;QACD,SAAS,EAAE;YACT,IAAI,EAAE,KAAK;YACX,OAAO,EAAE,CAAC;YACV,GAAG,EAAE,CAAC;YACN,GAAG,EAAE,EAAE;YACP,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,wCAAwC;SACtD;KACF;CACgC,CAAC;AAEpC,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC9C,CAAC,uBAAuB,EAAE,mBAAmB,CAAC;IAC9C,CAAC,oBAAoB,EAAE,gBAAgB,CAAC;IACxC,CAAC,uBAAuB,EAAE,mBAAmB,CAAC;IAC9C,CAAC,mBAAmB,EAAE,eAAe,CAAC;IACtC,CAAC,0BAA0B,EAAE,sBAAsB,CAAC;IACpD,CAAC,uBAAuB,EAAE,mBAAmB,CAAC;CACtC,CAAC,CAAC"}
@@ -0,0 +1,94 @@
1
+ import type { NodeExecutionContext } from "cascade/contracts";
2
+ import { circleDefinition, rectangleDefinition } from "./definitions.js";
3
+ /**
4
+ * The two generators. Houdini has no Rectangle and its Grid with two rows does
5
+ * the job, so `size` and `center` are Grid's parameter names; `Circle` takes
6
+ * Houdini's Circle parameters, including its "Primitive Type", which is what
7
+ * selects a Bézier circle over a polygonal one.
8
+ *
9
+ * Numeric parameters are data inputs rather than props, so a graph can drive
10
+ * them, which is the Cascade equivalent of a Houdini parameter being animatable.
11
+ * The enumerated choice is a prop, as `Remap`'s `clamp` is.
12
+ */
13
+ export declare function executeRectangle(context: NodeExecutionContext<typeof rectangleDefinition>): void;
14
+ export declare const rectangleRegistration: {
15
+ kind: "definition-v1";
16
+ moduleId: string;
17
+ definition: {
18
+ readonly apiVersion: 1;
19
+ readonly label: "Rectangle";
20
+ readonly description: "A closed four-point polygon, counter-clockwise from bottom-left.";
21
+ readonly icon: "Square";
22
+ readonly runsOn: "portable";
23
+ readonly inputs: {
24
+ readonly size: {
25
+ readonly kind: "data";
26
+ readonly type: "vec2";
27
+ readonly default: readonly [1, 1];
28
+ };
29
+ readonly center: {
30
+ readonly kind: "data";
31
+ readonly type: "vec2";
32
+ readonly default: readonly [0, 0];
33
+ };
34
+ };
35
+ readonly outputs: {
36
+ readonly geometry: {
37
+ readonly kind: "data";
38
+ readonly type: "geometry";
39
+ };
40
+ };
41
+ };
42
+ loadExecute: () => Promise<typeof executeRectangle>;
43
+ };
44
+ export declare function executeCircle(context: NodeExecutionContext<typeof circleDefinition>): void;
45
+ export declare const circleRegistration: {
46
+ kind: "definition-v1";
47
+ moduleId: string;
48
+ definition: {
49
+ readonly apiVersion: 1;
50
+ readonly label: "Circle";
51
+ readonly description: "A closed circle, as one cubic Bezier chain or as a polygon of divisions segments.";
52
+ readonly icon: "Circle";
53
+ readonly runsOn: "portable";
54
+ readonly inputs: {
55
+ readonly center: {
56
+ readonly kind: "data";
57
+ readonly type: "vec2";
58
+ readonly default: readonly [0, 0];
59
+ };
60
+ readonly radius: {
61
+ readonly kind: "data";
62
+ readonly type: "vec2";
63
+ readonly default: readonly [1, 1];
64
+ };
65
+ readonly divisions: {
66
+ readonly kind: "data";
67
+ readonly type: "int";
68
+ readonly default: 32;
69
+ readonly min: 3;
70
+ readonly step: 1;
71
+ readonly description: "Segments of the polygonal form. Ignored by the Bezier form.";
72
+ };
73
+ };
74
+ readonly outputs: {
75
+ readonly geometry: {
76
+ readonly kind: "data";
77
+ readonly type: "geometry";
78
+ };
79
+ };
80
+ readonly props: {
81
+ readonly type: {
82
+ readonly type: "string";
83
+ readonly default: "bezier";
84
+ readonly label: "Primitive Type";
85
+ readonly control: "select";
86
+ readonly options: readonly ["bezier", "poly"];
87
+ readonly description: "A Bezier circle is a circle; a polygon of any division count is visibly a polygon in print.";
88
+ };
89
+ };
90
+ };
91
+ loadExecute: () => Promise<typeof executeCircle>;
92
+ };
93
+ export { circleDefinition, rectangleDefinition } from "./definitions.js";
94
+ //# sourceMappingURL=generators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generators.d.ts","sourceRoot":"","sources":["../../../src/builtins/geo/generators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAI/D,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGzE;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,oBAAoB,CAAC,OAAO,mBAAmB,CAAC,GACxD,IAAI,CAON;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKgC,CAAC;AAEnE,wBAAgB,aAAa,CAC3B,OAAO,EAAE,oBAAoB,CAAC,OAAO,gBAAgB,CAAC,GACrD,IAAI,CASN;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKgC,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { circleGeometry, rectangleGeometry } from "../../geometry/generate.js";
2
+ import { circleDefinition, rectangleDefinition } from "./definitions.js";
3
+ import { geoModuleId } from "./namespace.js";
4
+ /**
5
+ * The two generators. Houdini has no Rectangle and its Grid with two rows does
6
+ * the job, so `size` and `center` are Grid's parameter names; `Circle` takes
7
+ * Houdini's Circle parameters, including its "Primitive Type", which is what
8
+ * selects a Bézier circle over a polygonal one.
9
+ *
10
+ * Numeric parameters are data inputs rather than props, so a graph can drive
11
+ * them, which is the Cascade equivalent of a Houdini parameter being animatable.
12
+ * The enumerated choice is a prop, as `Remap`'s `clamp` is.
13
+ */
14
+ export function executeRectangle(context) {
15
+ context.outputs.geometry.set(rectangleGeometry({
16
+ size: context.inputs.size,
17
+ center: context.inputs.center,
18
+ }));
19
+ }
20
+ export const rectangleRegistration = {
21
+ kind: "definition-v1",
22
+ moduleId: geoModuleId("Rectangle"),
23
+ definition: rectangleDefinition,
24
+ loadExecute: async () => executeRectangle,
25
+ };
26
+ export function executeCircle(context) {
27
+ context.outputs.geometry.set(circleGeometry({
28
+ center: context.inputs.center,
29
+ radius: context.inputs.radius,
30
+ divisions: context.inputs.divisions,
31
+ type: context.props.type === "poly" ? "poly" : "bezier",
32
+ }));
33
+ }
34
+ export const circleRegistration = {
35
+ kind: "definition-v1",
36
+ moduleId: geoModuleId("Circle"),
37
+ definition: circleDefinition,
38
+ loadExecute: async () => executeCircle,
39
+ };
40
+ export { circleDefinition, rectangleDefinition } from "./definitions.js";
41
+ //# sourceMappingURL=generators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generators.js","sourceRoot":"","sources":["../../../src/builtins/geo/generators.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/E,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAC9B,OAAyD;IAEzD,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAC1B,iBAAiB,CAAC;QAChB,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI;QACzB,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM;KAC9B,CAAC,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,WAAW,CAAC,WAAW,CAAC;IAClC,UAAU,EAAE,mBAAmB;IAC/B,WAAW,EAAE,KAAK,IAAI,EAAE,CAAC,gBAAgB;CACuB,CAAC;AAEnE,MAAM,UAAU,aAAa,CAC3B,OAAsD;IAEtD,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAC1B,cAAc,CAAC;QACb,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM;QAC7B,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM;QAC7B,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS;QACnC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ;KACxD,CAAC,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAAC;IAC/B,UAAU,EAAE,gBAAgB;IAC5B,WAAW,EAAE,KAAK,IAAI,EAAE,CAAC,aAAa;CACuB,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { DefinitionNodeRegistration } from "../../types.js";
2
+ import { copyToPointsRegistration } from "./copyToPoints.js";
3
+ import { circleRegistration, rectangleRegistration } from "./generators.js";
4
+ import { mergeRegistration } from "./merge.js";
5
+ import { svgExportRegistration } from "./svgExport.js";
6
+ import { transformRegistration } from "./transform.js";
7
+ /**
8
+ * The six geometry built-ins that prove the format composes: two generators,
9
+ * two operators, the instancer and the export.
10
+ *
11
+ * `Merge` and `CopyToPoints` are here rather than in a later batch because they
12
+ * are the pair that fails loudly if the attribute model does not compose, so a
13
+ * format mistake surfaces now rather than after twenty nodes are written against
14
+ * it. `SvgExport` is here because it makes the result a file rather than an
15
+ * assertion.
16
+ *
17
+ * The namespace lives in `namespace.ts`, once.
18
+ */
19
+ export { circleRegistration, copyToPointsRegistration, mergeRegistration, rectangleRegistration, svgExportRegistration, transformRegistration, };
20
+ export { GEO_NAMESPACE, geoModuleId } from "./namespace.js";
21
+ export declare const geoNodeRegistrations: readonly DefinitionNodeRegistration[];
22
+ export declare function geoNodeRegistration(moduleId: string): DefinitionNodeRegistration | undefined;
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/builtins/geo/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,GACtB,CAAC;AACF,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE5D,eAAO,MAAM,oBAAoB,EAAE,SAAS,0BAA0B,EAQlE,CAAC;AASL,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,GACf,0BAA0B,GAAG,SAAS,CAExC"}
@@ -0,0 +1,35 @@
1
+ import { copyToPointsRegistration } from "./copyToPoints.js";
2
+ import { circleRegistration, rectangleRegistration } from "./generators.js";
3
+ import { mergeRegistration } from "./merge.js";
4
+ import { svgExportRegistration } from "./svgExport.js";
5
+ import { transformRegistration } from "./transform.js";
6
+ /**
7
+ * The six geometry built-ins that prove the format composes: two generators,
8
+ * two operators, the instancer and the export.
9
+ *
10
+ * `Merge` and `CopyToPoints` are here rather than in a later batch because they
11
+ * are the pair that fails loudly if the attribute model does not compose, so a
12
+ * format mistake surfaces now rather than after twenty nodes are written against
13
+ * it. `SvgExport` is here because it makes the result a file rather than an
14
+ * assertion.
15
+ *
16
+ * The namespace lives in `namespace.ts`, once.
17
+ */
18
+ export { circleRegistration, copyToPointsRegistration, mergeRegistration, rectangleRegistration, svgExportRegistration, transformRegistration, };
19
+ export { GEO_NAMESPACE, geoModuleId } from "./namespace.js";
20
+ export const geoNodeRegistrations = Object.freeze([
21
+ rectangleRegistration,
22
+ circleRegistration,
23
+ transformRegistration,
24
+ mergeRegistration,
25
+ copyToPointsRegistration,
26
+ svgExportRegistration,
27
+ ]);
28
+ const registrationsById = new Map(geoNodeRegistrations.map((registration) => [
29
+ registration.moduleId,
30
+ registration,
31
+ ]));
32
+ export function geoNodeRegistration(moduleId) {
33
+ return registrationsById.get(moduleId);
34
+ }
35
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/builtins/geo/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,GACtB,CAAC;AACF,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE5D,MAAM,CAAC,MAAM,oBAAoB,GAC/B,MAAM,CAAC,MAAM,CAAC;IACZ,qBAAqB;IACrB,kBAAkB;IAClB,qBAAqB;IACrB,iBAAiB;IACjB,wBAAwB;IACxB,qBAAqB;CACtB,CAAC,CAAC;AAEL,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAC/B,oBAAoB,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC;IACzC,YAAY,CAAC,QAAQ;IACrB,YAAY;CACb,CAAC,CACH,CAAC;AAEF,MAAM,UAAU,mBAAmB,CACjC,QAAgB;IAEhB,OAAO,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACzC,CAAC"}
@@ -0,0 +1,40 @@
1
+ import type { NodeExecutionContext } from "cascade/contracts";
2
+ import { mergeDefinition } from "./definitions.js";
3
+ /**
4
+ * Merge SOP: N geometries concatenated, with points, vertices and primitives
5
+ * renumbered. The node that proves the format composes, which is why it is in
6
+ * the first six.
7
+ *
8
+ * It is not `cascade.core.Merge` and cannot be: that one collects its variadic
9
+ * inputs into an `array`, which is a different operation with the same name.
10
+ * The widening rules for a colliding attribute name belong to `mergeGeometries`
11
+ * and are not re-decided here.
12
+ */
13
+ export declare function executeMerge(context: NodeExecutionContext<typeof mergeDefinition>): void;
14
+ export declare const mergeRegistration: {
15
+ kind: "definition-v1";
16
+ moduleId: string;
17
+ definition: {
18
+ readonly apiVersion: 1;
19
+ readonly label: "Merge";
20
+ readonly description: "Concatenate geometries, taking the union of their attributes.";
21
+ readonly icon: "GitMerge";
22
+ readonly runsOn: "portable";
23
+ readonly inputs: {
24
+ readonly inputs: {
25
+ readonly kind: "data";
26
+ readonly type: "geometry";
27
+ readonly variadic: true;
28
+ };
29
+ };
30
+ readonly outputs: {
31
+ readonly geometry: {
32
+ readonly kind: "data";
33
+ readonly type: "geometry";
34
+ };
35
+ };
36
+ };
37
+ loadExecute: () => Promise<typeof executeMerge>;
38
+ };
39
+ export { mergeDefinition } from "./definitions.js";
40
+ //# sourceMappingURL=merge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../src/builtins/geo/merge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAI/D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGnD;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,oBAAoB,CAAC,OAAO,eAAe,CAAC,GACpD,IAAI,CAIN;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;CAKgC,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { mergeGeometries } from "../../geometry/merge.js";
2
+ import { mergeDefinition } from "./definitions.js";
3
+ import { geoModuleId } from "./namespace.js";
4
+ /**
5
+ * Merge SOP: N geometries concatenated, with points, vertices and primitives
6
+ * renumbered. The node that proves the format composes, which is why it is in
7
+ * the first six.
8
+ *
9
+ * It is not `cascade.core.Merge` and cannot be: that one collects its variadic
10
+ * inputs into an `array`, which is a different operation with the same name.
11
+ * The widening rules for a colliding attribute name belong to `mergeGeometries`
12
+ * and are not re-decided here.
13
+ */
14
+ export function executeMerge(context) {
15
+ context.outputs.geometry.set(mergeGeometries(context.inputs.inputs.filter((input) => input !== undefined)));
16
+ }
17
+ export const mergeRegistration = {
18
+ kind: "definition-v1",
19
+ moduleId: geoModuleId("Merge"),
20
+ definition: mergeDefinition,
21
+ loadExecute: async () => executeMerge,
22
+ };
23
+ export { mergeDefinition } from "./definitions.js";
24
+ //# sourceMappingURL=merge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge.js","sourceRoot":"","sources":["../../../src/builtins/geo/merge.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;;;;;;GASG;AACH,MAAM,UAAU,YAAY,CAC1B,OAAqD;IAErD,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAC1B,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAC9E,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC;IAC9B,UAAU,EAAE,eAAe;IAC3B,WAAW,EAAE,KAAK,IAAI,EAAE,CAAC,YAAY;CACuB,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The one place the geometry built-in namespace is written down.
3
+ *
4
+ * `cascade.geo.*` is reserved, decided 2026-09-04 by Marcus: *"`.geo` is clear,
5
+ * all good."* So the reserved surface grows from eight structural nodes to
6
+ * those plus the geometry library, and the line that widening draws is worth
7
+ * keeping in mind: `cascade.core.*` is the structure of a graph, while
8
+ * `cascade.geo.*` is a medium.
9
+ *
10
+ * Every module id in this folder goes through `geoModuleId`, so renaming the
11
+ * namespace is this constant and nothing else.
12
+ */
13
+ export declare const GEO_NAMESPACE = "cascade.geo";
14
+ export declare function geoModuleId(name: string): string;
15
+ //# sourceMappingURL=namespace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"namespace.d.ts","sourceRoot":"","sources":["../../../src/builtins/geo/namespace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,gBAAgB,CAAC;AAE3C,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhD"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The one place the geometry built-in namespace is written down.
3
+ *
4
+ * `cascade.geo.*` is reserved, decided 2026-09-04 by Marcus: *"`.geo` is clear,
5
+ * all good."* So the reserved surface grows from eight structural nodes to
6
+ * those plus the geometry library, and the line that widening draws is worth
7
+ * keeping in mind: `cascade.core.*` is the structure of a graph, while
8
+ * `cascade.geo.*` is a medium.
9
+ *
10
+ * Every module id in this folder goes through `geoModuleId`, so renaming the
11
+ * namespace is this constant and nothing else.
12
+ */
13
+ export const GEO_NAMESPACE = "cascade.geo";
14
+ export function geoModuleId(name) {
15
+ return `${GEO_NAMESPACE}.${name}`;
16
+ }
17
+ //# sourceMappingURL=namespace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"namespace.js","sourceRoot":"","sources":["../../../src/builtins/geo/namespace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAC;AAE3C,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,GAAG,aAAa,IAAI,IAAI,EAAE,CAAC;AACpC,CAAC"}
@@ -0,0 +1,130 @@
1
+ import type { NodeExecutionContext } from "cascade/contracts";
2
+ import { svgExportDefinition } from "./definitions.js";
3
+ /**
4
+ * The output end: an SVG document, as a string and as a written asset.
5
+ *
6
+ * It declares `assets` and nothing else. Writing is not optional and there is
7
+ * no `write` prop, because an export node whose file is a choice is a node that
8
+ * silently did nothing. `assets` is available to a `portable` node, so this
9
+ * stays portable and needs no `files` capability: the host decides where an
10
+ * asset lands, which is the whole point of the capability.
11
+ *
12
+ * The props are the fallbacks for `Cd`, `width` and `opacity`. A per-primitive
13
+ * attribute wins where it exists; see `geometryToSvg`, which also owns the one
14
+ * +Y-up-to-+Y-down flip in the system.
15
+ *
16
+ * `stroke` and `fill` are both `color`, which is a four-component vector with a
17
+ * swatch control rather than a second colour representation. `fill` used to be
18
+ * an SVG paint string so that `"none"` was expressible; Marcus ruled colour to
19
+ * be a `vec4` everywhere, so the absence of a fill is now the separate
20
+ * `fillMode` prop and the writer converts to text through `Color.toHex`. The
21
+ * reason "no fill" is a mode rather than a zero alpha is in `SvgExportOptions`.
22
+ */
23
+ export declare function executeSvgExport(context: NodeExecutionContext<typeof svgExportDefinition>): Promise<void>;
24
+ export declare const svgExportRegistration: {
25
+ kind: "definition-v1";
26
+ moduleId: string;
27
+ definition: {
28
+ readonly apiVersion: 1;
29
+ readonly label: "SVG Export";
30
+ readonly description: "Write geometry as an SVG document, one group element per group.";
31
+ readonly icon: "FileDown";
32
+ readonly runsOn: "portable";
33
+ readonly capabilities: readonly ["assets"];
34
+ readonly inputs: {
35
+ readonly geometry: {
36
+ readonly kind: "data";
37
+ readonly type: "geometry";
38
+ };
39
+ };
40
+ readonly outputs: {
41
+ readonly svg: {
42
+ readonly kind: "data";
43
+ readonly type: "string";
44
+ };
45
+ readonly asset: {
46
+ readonly kind: "data";
47
+ readonly type: "asset";
48
+ };
49
+ };
50
+ readonly props: {
51
+ readonly filename: {
52
+ readonly type: "string";
53
+ readonly default: "geometry.svg";
54
+ readonly label: "Filename";
55
+ };
56
+ readonly width: {
57
+ readonly type: "float";
58
+ readonly default: 0;
59
+ readonly min: 0;
60
+ readonly label: "Width";
61
+ readonly description: "0 derives the width from the geometry bounds.";
62
+ };
63
+ readonly height: {
64
+ readonly type: "float";
65
+ readonly default: 0;
66
+ readonly min: 0;
67
+ readonly label: "Height";
68
+ };
69
+ readonly margin: {
70
+ readonly type: "float";
71
+ readonly default: 0;
72
+ readonly label: "Margin";
73
+ };
74
+ readonly stroke: {
75
+ readonly type: "color";
76
+ readonly default: readonly [0, 0, 0, 1];
77
+ readonly label: "Stroke";
78
+ readonly description: "Fallback for a primitive with no Cd attribute.";
79
+ };
80
+ readonly strokeWidth: {
81
+ readonly type: "float";
82
+ readonly default: 1;
83
+ readonly min: 0;
84
+ readonly label: "Stroke Width";
85
+ readonly description: "Fallback for a primitive with no width attribute.";
86
+ };
87
+ readonly opacity: {
88
+ readonly type: "float";
89
+ readonly default: 1;
90
+ readonly min: 0;
91
+ readonly max: 1;
92
+ readonly label: "Opacity";
93
+ readonly description: "Fallback for a primitive with no opacity attribute.";
94
+ };
95
+ readonly fillMode: {
96
+ readonly type: "string";
97
+ readonly default: "none";
98
+ readonly label: "Fill Mode";
99
+ readonly control: "select";
100
+ readonly options: readonly ["none", "solid"];
101
+ readonly description: "none leaves primitives unfilled, which is what plotter work wants.";
102
+ };
103
+ readonly fill: {
104
+ readonly type: "color";
105
+ readonly default: readonly [1, 1, 1, 1];
106
+ readonly label: "Fill";
107
+ readonly description: "Fill colour, used only when Fill Mode is solid.";
108
+ };
109
+ readonly pointRadius: {
110
+ readonly type: "float";
111
+ readonly default: 0.5;
112
+ readonly min: 0;
113
+ readonly label: "Point Radius";
114
+ readonly description: "Fallback radius for a loose point with no pscale.";
115
+ };
116
+ readonly precision: {
117
+ readonly type: "int";
118
+ readonly default: 3;
119
+ readonly min: 0;
120
+ readonly max: 15;
121
+ readonly step: 1;
122
+ readonly label: "Precision";
123
+ readonly description: "Decimal places on emitted coordinates.";
124
+ };
125
+ };
126
+ };
127
+ loadExecute: () => Promise<typeof executeSvgExport>;
128
+ };
129
+ export { svgExportDefinition } from "./definitions.js";
130
+ //# sourceMappingURL=svgExport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"svgExport.d.ts","sourceRoot":"","sources":["../../../src/builtins/geo/svgExport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAK/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGvD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,oBAAoB,CAAC,OAAO,mBAAmB,CAAC,GACxD,OAAO,CAAC,IAAI,CAAC,CAqBf;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKgC,CAAC;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC"}