retiam 1.0.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/COMMERCIAL_LICENSE.md +61 -0
  2. package/LICENSE +116 -0
  3. package/THIRD_PARTY_LICENSES.txt +17771 -0
  4. package/THIRD_PARTY_NOTICES.md +318 -0
  5. package/bin/export.js +4 -3
  6. package/bin/init.js +28 -4
  7. package/bin/prepare-notices.js +11 -0
  8. package/bin/third-party.d.ts +6 -0
  9. package/bin/third-party.js +92 -0
  10. package/dist/COMMERCIAL_LICENSE.md +61 -0
  11. package/dist/LICENSE +116 -0
  12. package/dist/THIRD_PARTY_LICENSES.txt +17771 -0
  13. package/dist/THIRD_PARTY_NOTICES.md +318 -0
  14. package/dist/{UTIF-X7q9996p.js → UTIF-2Ear_0Uo.js} +2 -1
  15. package/dist/{decompress-D5RzmD-2.js → decompress-CuY1lEpT.js} +1 -0
  16. package/dist/{index-Be4c9A99.js → index-B2sJBy4c.js} +15736 -16052
  17. package/dist/libs/charts/index.js +1 -0
  18. package/dist/libs/graphs/index.js +1 -0
  19. package/dist/libs/highlights/index.js +1 -0
  20. package/dist/libs/physics/index.js +1 -0
  21. package/dist/libs/rough/index.js +1 -0
  22. package/dist/libs/shapes/index.js +1 -0
  23. package/dist/libs/tts/index.js +1 -0
  24. package/dist/{main-IC5HXR90.js → main-D_G4uIju.js} +2 -1
  25. package/dist/{opentype.module-D6jx0UDN.js → opentype.module-DA3p9H4x.js} +1 -0
  26. package/dist/retiam.es.js +808 -802
  27. package/dist/src/engine/_core/VectorEntity.d.ts +14 -0
  28. package/dist/src/engine/animation/transform/TransformMatchingShapes.d.ts +14 -0
  29. package/dist/src/engine/animation/transform/TransformMatchingTex.d.ts +15 -0
  30. package/dist/src/engine/animation/transform/TransformMatchingText.d.ts +14 -0
  31. package/dist/src/engine/entities/composites/coordinates/Axes.d.ts +20 -0
  32. package/dist/src/engine/entities/composites/geometry/Arrow.d.ts +35 -0
  33. package/dist/src/engine/entities/composites/geometry/Arrow3D.d.ts +31 -0
  34. package/dist/src/engine/entities/composites/text/MarkupText.d.ts +0 -1
  35. package/dist/src/engine/entities/composites/text/Tex.d.ts +2 -3
  36. package/dist/src/engine/entities/composites/text/TexFontPatcher.d.ts +1 -5
  37. package/dist/src/engine/font/types.d.ts +1 -1
  38. package/dist/src/engine/utils/IndexInspector.d.ts +44 -0
  39. package/dist/src/engine/utils/PathEqualizer.d.ts +15 -0
  40. package/dist/src/index.d.ts +1 -1
  41. package/package.json +20 -5
  42. package/readme.md +24 -1
  43. package/dist/assets/Virgil.woff2 +0 -0
  44. package/dist/src/engine/entities/composites/text/virgilMathJaxData.d.ts +0 -3
@@ -0,0 +1,318 @@
1
+ # Retiam third-party notices
2
+
3
+ These notices describe third-party code, fonts, generated font data, and weights
4
+ used by Retiam. Each component retains its own license; Retiam's own license
5
+ does not replace or restrict the rights those licenses grant. Original license
6
+ and notice texts are reproduced in [`THIRD_PARTY_LICENSES.txt`](THIRD_PARTY_LICENSES.txt).
7
+ Identical texts are stored once; the section references below identify the
8
+ applicable texts for each component. Distinct copyright notices are preserved.
9
+ For upstream READMEs, only reviewed licensing and attribution passages are
10
+ included. Those excerpts are reproduced unchanged and marked in the text file.
11
+
12
+ This inventory conservatively includes non-optional production packages from
13
+ the root lockfile, explicitly bundled packages and their dependencies even when
14
+ marked development-only, WebGPU declaration types, and the pinned Monaco editor
15
+ used by Studio. Some packages are CLI/server dependencies rather
16
+ than browser bundle contents. Optional platform binaries, development-only
17
+ tools, downloaded browsers, and externally served CDN resources are not claimed
18
+ to be included in every Retiam distribution. Their distributors provide their
19
+ own terms. Applications that add dependencies or media need their own inventory.
20
+
21
+ Keep this file and `THIRD_PARTY_LICENSES.txt` together when redistributing Retiam bundles,
22
+ alongside Retiam's own `LICENSE` and `COMMERCIAL_LICENSE.md`. Retiam's own code
23
+ is free for noncommercial use; commercial use requires the separate paid
24
+ agreement described in those files. These restrictions do not replace or limit
25
+ the rights granted by the third-party licenses reproduced here.
26
+ Do not remove embedded upstream license notices. Generated projects additionally
27
+ copy the installed engine's notices to `public/vendor/retiam/` and copy the actual
28
+ installed TypeScript and Monaco notices beside their vendor files before builds.
29
+
30
+ ## Fonts, generated font data, weights, and vendored components
31
+
32
+ | Component | License | Text sections |
33
+ | --- | --- | --- |
34
+ | Roboto | Apache-2.0 | [L001, L002](THIRD_PARTY_LICENSES.txt) |
35
+ | Fira Code | OFL-1.1 | [L003, L004](THIRD_PARTY_LICENSES.txt) |
36
+ | Fredericka the Great | OFL-1.1 | [L005, L006](THIRD_PARTY_LICENSES.txt) |
37
+ | Excalifont | OFL-1.1 | [L007, L008](THIRD_PARTY_LICENSES.txt) |
38
+ | Intel Open Image Denoise weights | Apache-2.0 | [L009, L010](THIRD_PARTY_LICENSES.txt) |
39
+ | WOFF2/Brotli implementations used by woff2-encoder | MIT | [L011, L012, L013](THIRD_PARTY_LICENSES.txt) |
40
+ | Emscripten, musl and LLVM WebAssembly runtime notices | MIT AND (Apache-2.0 WITH LLVM-exception) | [L014, L015, L016, L017, L018, L019](THIRD_PARTY_LICENSES.txt) |
41
+ | Inigo Quilez SDF technical snippets (WGSL adaptations) | MIT | [L020, L021](THIRD_PARTY_LICENSES.txt) |
42
+
43
+ Font coverage includes the corresponding MSDF PNG/JSON atlases and generated
44
+ glyph outlines in `excalifontMathJaxData.ts`. These remain font-derived data
45
+ under the respective font license. Reserved Font Name
46
+ conditions apply to modified font distributions. See the individual source notes
47
+ for provenance, copyright information, and the verified OIDN checksum.
48
+
49
+ ## npm dependencies and Studio
50
+
51
+ Versions refer to this repository's inventory snapshot. Installed dependencies
52
+ also supply their own terms. MIT is the selected alternative for `xmldom-sre`,
53
+ which offers MIT or LGPL; both upstream options are preserved in its notice.
54
+
55
+ | Package | Version | Declared license | Text sections |
56
+ | --- | --- | --- | --- |
57
+ | @babel/code-frame | 7.27.1 | MIT | [L022](THIRD_PARTY_LICENSES.txt) |
58
+ | @babel/helper-validator-identifier | 7.28.5 | MIT | [L022](THIRD_PARTY_LICENSES.txt) |
59
+ | @dimforge/rapier2d-compat | 0.20.0 | Apache-2.0 | [L023](THIRD_PARTY_LICENSES.txt) |
60
+ | @dimforge/rapier3d-compat | 0.20.0 | Apache-2.0 | [L023](THIRD_PARTY_LICENSES.txt) |
61
+ | @petamoriken/float16 | 3.9.3 | MIT | [L024](THIRD_PARTY_LICENSES.txt) |
62
+ | @puppeteer/browsers | 1.9.1 | Apache-2.0 | [L025, L026, L027](THIRD_PARTY_LICENSES.txt) |
63
+ | @tensorflow/tfjs-backend-cpu | 4.20.0 | Apache-2.0 | [L030, L031, L009](THIRD_PARTY_LICENSES.txt) |
64
+ | @tensorflow/tfjs-backend-webgl | 4.20.0 | Apache-2.0 | [L032, L033, L009](THIRD_PARTY_LICENSES.txt) |
65
+ | @tensorflow/tfjs-backend-webgpu | 4.20.0 | Apache-2.0 | [L034, L035, L009](THIRD_PARTY_LICENSES.txt) |
66
+ | @tensorflow/tfjs-converter | 4.20.0 | Apache-2.0 | [L036, L037, L009](THIRD_PARTY_LICENSES.txt) |
67
+ | @tensorflow/tfjs-core | 4.20.0 | Apache-2.0 | [L038, L039, L009](THIRD_PARTY_LICENSES.txt) |
68
+ | @tensorflow/tfjs-data | 4.20.0 | Apache-2.0 | [L043, L044, L009](THIRD_PARTY_LICENSES.txt) |
69
+ | @tensorflow/tfjs-layers | 4.20.0 | Apache-2.0 AND MIT | [L045, L046, L047](THIRD_PARTY_LICENSES.txt) |
70
+ | @tensorflow/tfjs | 4.20.0 | Apache-2.0 | [L028, L029, L009](THIRD_PARTY_LICENSES.txt) |
71
+ | @tootallnate/quickjs-emscripten | 0.23.0 | MIT | [L052](THIRD_PARTY_LICENSES.txt) |
72
+ | @types/dom-webcodecs | 0.1.18 | MIT | [L040](THIRD_PARTY_LICENSES.txt) |
73
+ | @types/estree | 1.0.7 | MIT | [L040](THIRD_PARTY_LICENSES.txt) |
74
+ | @types/libtess | 1.2.0 | MIT | [L040](THIRD_PARTY_LICENSES.txt) |
75
+ | @types/long | 4.0.2 | MIT | [L040](THIRD_PARTY_LICENSES.txt) |
76
+ | @types/node-fetch | 2.6.13 | MIT | [L040](THIRD_PARTY_LICENSES.txt) |
77
+ | @types/node | 22.7.4 | MIT | [L040](THIRD_PARTY_LICENSES.txt) |
78
+ | @types/offscreencanvas | 2019.3.0 | MIT | [L053](THIRD_PARTY_LICENSES.txt) |
79
+ | @types/offscreencanvas | 2019.7.3 | MIT | [L040](THIRD_PARTY_LICENSES.txt) |
80
+ | @types/prismjs | 1.26.6 | MIT | [L040](THIRD_PARTY_LICENSES.txt) |
81
+ | @types/seedrandom | 2.4.34 | MIT | [L040](THIRD_PARTY_LICENSES.txt) |
82
+ | @types/wicg-file-system-access | 2020.9.8 | MIT | [L040](THIRD_PARTY_LICENSES.txt) |
83
+ | @webgpu/types | 0.1.38 | BSD-3-Clause | [L041](THIRD_PARTY_LICENSES.txt) |
84
+ | @webgpu/types | 0.1.40 | BSD-3-Clause | [L041](THIRD_PARTY_LICENSES.txt) |
85
+ | @zappar/msdf-generator | 1.2.4 | MIT AND BSD-3-Clause | [L054](THIRD_PARTY_LICENSES.txt) |
86
+ | agent-base | 6.0.2 | MIT | [L062, L063](THIRD_PARTY_LICENSES.txt) |
87
+ | agent-base | 7.1.3 | MIT | [L055](THIRD_PARTY_LICENSES.txt) |
88
+ | ansi-regex | 5.0.1 | MIT | [L056](THIRD_PARTY_LICENSES.txt) |
89
+ | ansi-styles | 4.3.0 | MIT | [L056](THIRD_PARTY_LICENSES.txt) |
90
+ | argparse | 1.0.10 | MIT | [L057](THIRD_PARTY_LICENSES.txt) |
91
+ | argparse | 2.0.1 | Python-2.0 | [L079](THIRD_PARTY_LICENSES.txt) |
92
+ | as-number | 1.0.0 | MIT | [L058](THIRD_PARTY_LICENSES.txt) |
93
+ | ast-types | 0.13.4 | MIT | [L059](THIRD_PARTY_LICENSES.txt) |
94
+ | asynckit | 0.4.0 | MIT | [L060](THIRD_PARTY_LICENSES.txt) |
95
+ | axios | 1.20.0 | MIT | [L061](THIRD_PARTY_LICENSES.txt) |
96
+ | b4a | 1.6.7 | Apache-2.0 | [L001](THIRD_PARTY_LICENSES.txt) |
97
+ | base64-js | 1.5.1 | MIT | [L066](THIRD_PARTY_LICENSES.txt) |
98
+ | basic-ftp | 5.0.5 | MIT | [L067](THIRD_PARTY_LICENSES.txt) |
99
+ | box3d-wasm | 0.2.0 | MIT | [L068, L069](THIRD_PARTY_LICENSES.txt) |
100
+ | buffer-crc32 | 0.2.13 | MIT | [L071](THIRD_PARTY_LICENSES.txt) |
101
+ | buffer | 5.7.1 | MIT | [L070](THIRD_PARTY_LICENSES.txt) |
102
+ | buffer | 6.0.3 | MIT | [L070](THIRD_PARTY_LICENSES.txt) |
103
+ | call-bind-apply-helpers | 1.0.2 | MIT | [L072](THIRD_PARTY_LICENSES.txt) |
104
+ | callsites | 3.1.0 | MIT | [L056](THIRD_PARTY_LICENSES.txt) |
105
+ | chalk | 4.1.2 | MIT | [L056](THIRD_PARTY_LICENSES.txt) |
106
+ | chromium-bidi | 0.5.8 | Apache-2.0 | [L001](THIRD_PARTY_LICENSES.txt) |
107
+ | cli-progress | 3.12.0 | MIT | [L073](THIRD_PARTY_LICENSES.txt) |
108
+ | cliui | 7.0.4 | ISC | [L048](THIRD_PARTY_LICENSES.txt) |
109
+ | cliui | 8.0.1 | ISC | [L048](THIRD_PARTY_LICENSES.txt) |
110
+ | color-convert | 2.0.1 | MIT | [L074](THIRD_PARTY_LICENSES.txt) |
111
+ | color-name | 1.1.4 | MIT | [L075](THIRD_PARTY_LICENSES.txt) |
112
+ | combined-stream | 1.0.8 | MIT | [L076](THIRD_PARTY_LICENSES.txt) |
113
+ | comlink | 4.4.2 | Apache-2.0 | [L077](THIRD_PARTY_LICENSES.txt) |
114
+ | commander | 9.2.0 | MIT | [L180](THIRD_PARTY_LICENSES.txt) |
115
+ | core-js | 3.29.1 | MIT | [L049](THIRD_PARTY_LICENSES.txt) |
116
+ | cosmiconfig | 9.0.0 | MIT | [L078](THIRD_PARTY_LICENSES.txt) |
117
+ | cross-fetch | 4.0.0 | MIT | [L081](THIRD_PARTY_LICENSES.txt) |
118
+ | data-uri-to-buffer | 6.0.2 | MIT | [L082](THIRD_PARTY_LICENSES.txt) |
119
+ | debug | 4.3.4 | MIT | [L083](THIRD_PARTY_LICENSES.txt) |
120
+ | degenerator | 5.0.1 | MIT | [L084, L063](THIRD_PARTY_LICENSES.txt) |
121
+ | delayed-stream | 1.0.0 | MIT | [L076](THIRD_PARTY_LICENSES.txt) |
122
+ | devtools-protocol | 0.0.1232444 | BSD-3-Clause | [L085](THIRD_PARTY_LICENSES.txt) |
123
+ | dunder-proto | 1.0.1 | MIT | [L086](THIRD_PARTY_LICENSES.txt) |
124
+ | earcut | 3.0.2 | ISC | [L087](THIRD_PARTY_LICENSES.txt) |
125
+ | emoji-regex | 8.0.0 | MIT | [L088](THIRD_PARTY_LICENSES.txt) |
126
+ | end-of-stream | 1.4.4 | MIT | [L089](THIRD_PARTY_LICENSES.txt) |
127
+ | env-paths | 2.2.1 | MIT | [L056](THIRD_PARTY_LICENSES.txt) |
128
+ | error-ex | 1.3.2 | MIT | [L090](THIRD_PARTY_LICENSES.txt) |
129
+ | es-define-property | 1.0.1 | MIT | [L072](THIRD_PARTY_LICENSES.txt) |
130
+ | es-errors | 1.3.0 | MIT | [L072](THIRD_PARTY_LICENSES.txt) |
131
+ | es-object-atoms | 1.1.2 | MIT | [L072](THIRD_PARTY_LICENSES.txt) |
132
+ | es-set-tostringtag | 2.1.0 | MIT | [L091](THIRD_PARTY_LICENSES.txt) |
133
+ | esbuild | 0.25.5 | MIT | [L092](THIRD_PARTY_LICENSES.txt) |
134
+ | esbuild | 0.28.1 | MIT | [L092](THIRD_PARTY_LICENSES.txt) |
135
+ | escalade | 3.2.0 | MIT | [L093](THIRD_PARTY_LICENSES.txt) |
136
+ | escodegen | 2.1.0 | BSD-2-Clause | [L094](THIRD_PARTY_LICENSES.txt) |
137
+ | esm | 3.2.25 | MIT | [L095](THIRD_PARTY_LICENSES.txt) |
138
+ | esprima | 4.0.1 | BSD-2-Clause | [L096](THIRD_PARTY_LICENSES.txt) |
139
+ | estraverse | 5.3.0 | BSD-2-Clause | [L097](THIRD_PARTY_LICENSES.txt) |
140
+ | esutils | 2.0.3 | BSD-2-Clause | [L097](THIRD_PARTY_LICENSES.txt) |
141
+ | events | 3.3.0 | MIT | [L098](THIRD_PARTY_LICENSES.txt) |
142
+ | extract-zip | 2.0.1 | BSD-2-Clause | [L099](THIRD_PARTY_LICENSES.txt) |
143
+ | extrude-polyline | 1.0.6 | MIT | [L058](THIRD_PARTY_LICENSES.txt) |
144
+ | fast-fifo | 1.3.2 | MIT | [L101](THIRD_PARTY_LICENSES.txt) |
145
+ | fd-slicer | 1.1.0 | MIT | [L102](THIRD_PARTY_LICENSES.txt) |
146
+ | fdir | 6.4.5 | MIT | [L196](THIRD_PARTY_LICENSES.txt) |
147
+ | fdir | 6.5.0 | MIT | [L196](THIRD_PARTY_LICENSES.txt) |
148
+ | follow-redirects | 1.16.0 | MIT | [L103](THIRD_PARTY_LICENSES.txt) |
149
+ | form-data | 4.0.6 | MIT | [L104](THIRD_PARTY_LICENSES.txt) |
150
+ | function-bind | 1.1.2 | MIT | [L105](THIRD_PARTY_LICENSES.txt) |
151
+ | get-caller-file | 2.0.5 | ISC | [L106](THIRD_PARTY_LICENSES.txt) |
152
+ | get-intrinsic | 1.3.0 | MIT | [L107](THIRD_PARTY_LICENSES.txt) |
153
+ | get-proto | 1.0.1 | MIT | [L108](THIRD_PARTY_LICENSES.txt) |
154
+ | get-stream | 5.2.0 | MIT | [L100](THIRD_PARTY_LICENSES.txt) |
155
+ | get-uri | 6.0.4 | MIT | [L082](THIRD_PARTY_LICENSES.txt) |
156
+ | gl-vec2 | 1.3.0 | zlib | [L109](THIRD_PARTY_LICENSES.txt) |
157
+ | gopd | 1.2.0 | MIT | [L110](THIRD_PARTY_LICENSES.txt) |
158
+ | hachure-fill | 0.5.2 | MIT | [L111](THIRD_PARTY_LICENSES.txt) |
159
+ | has-flag | 4.0.0 | MIT | [L056](THIRD_PARTY_LICENSES.txt) |
160
+ | has-symbols | 1.1.0 | MIT | [L112](THIRD_PARTY_LICENSES.txt) |
161
+ | has-tostringtag | 1.0.2 | MIT | [L113](THIRD_PARTY_LICENSES.txt) |
162
+ | hasown | 2.0.4 | MIT | [L114](THIRD_PARTY_LICENSES.txt) |
163
+ | http-proxy-agent | 7.0.2 | MIT | [L115](THIRD_PARTY_LICENSES.txt) |
164
+ | https-proxy-agent | 5.0.1 | MIT | [L064, L063](THIRD_PARTY_LICENSES.txt) |
165
+ | https-proxy-agent | 7.0.6 | MIT | [L055](THIRD_PARTY_LICENSES.txt) |
166
+ | ieee754 | 1.2.1 | BSD-3-Clause | [L116](THIRD_PARTY_LICENSES.txt) |
167
+ | import-fresh | 3.3.1 | MIT | [L100](THIRD_PARTY_LICENSES.txt) |
168
+ | inherits | 2.0.4 | ISC | [L117](THIRD_PARTY_LICENSES.txt) |
169
+ | ip-address | 9.0.5 | MIT | [L118](THIRD_PARTY_LICENSES.txt) |
170
+ | is-arrayish | 0.2.1 | MIT | [L090](THIRD_PARTY_LICENSES.txt) |
171
+ | is-fullwidth-code-point | 3.0.0 | MIT | [L056](THIRD_PARTY_LICENSES.txt) |
172
+ | isomorphic-ws | 5.0.0 | MIT | [L120](THIRD_PARTY_LICENSES.txt) |
173
+ | jolt-physics | 1.1.0 | MIT | [L121](THIRD_PARTY_LICENSES.txt) |
174
+ | js-tokens | 4.0.0 | MIT | [L122](THIRD_PARTY_LICENSES.txt) |
175
+ | js-yaml | 4.1.0 | MIT | [L080](THIRD_PARTY_LICENSES.txt) |
176
+ | jsbn | 1.1.0 | MIT | [L123](THIRD_PARTY_LICENSES.txt) |
177
+ | json-parse-even-better-errors | 2.3.1 | MIT | [L124](THIRD_PARTY_LICENSES.txt) |
178
+ | libtess | 1.2.2 | SGI-B-2.0 | [L125](THIRD_PARTY_LICENSES.txt) |
179
+ | lines-and-columns | 1.2.4 | MIT | [L126](THIRD_PARTY_LICENSES.txt) |
180
+ | long | 4.0.0 | Apache-2.0 | [L127](THIRD_PARTY_LICENSES.txt) |
181
+ | lru-cache | 7.18.3 | ISC | [L160](THIRD_PARTY_LICENSES.txt) |
182
+ | math-intrinsics | 1.1.0 | MIT | [L086](THIRD_PARTY_LICENSES.txt) |
183
+ | mathjax-full | 3.2.2 | Apache-2.0 | [L009](THIRD_PARTY_LICENSES.txt) |
184
+ | matter-js | 0.20.0 | MIT | [L128, L129](THIRD_PARTY_LICENSES.txt) |
185
+ | mhchemparser | 4.2.1 | Apache-2.0 | [L130](THIRD_PARTY_LICENSES.txt) |
186
+ | mime-db | 1.52.0 | MIT | [L131](THIRD_PARTY_LICENSES.txt) |
187
+ | mime-types | 2.1.35 | MIT | [L132](THIRD_PARTY_LICENSES.txt) |
188
+ | mitt | 3.0.1 | MIT | [L133](THIRD_PARTY_LICENSES.txt) |
189
+ | mj-context-menu | 0.6.1 | Apache-2.0 | [L134, L001, L135](THIRD_PARTY_LICENSES.txt) |
190
+ | mkdirp-classic | 0.5.3 | MIT | [L136](THIRD_PARTY_LICENSES.txt) |
191
+ | monaco-editor | 0.45.0 | MIT | [L223, L224](THIRD_PARTY_LICENSES.txt) |
192
+ | mp4-muxer | 5.2.2 | MIT | [L137](THIRD_PARTY_LICENSES.txt) |
193
+ | ms | 2.1.2 | MIT | [L138](THIRD_PARTY_LICENSES.txt) |
194
+ | msedge-tts | 2.0.8 | MIT | [L139](THIRD_PARTY_LICENSES.txt) |
195
+ | nanoid | 3.3.11 | MIT | [L141](THIRD_PARTY_LICENSES.txt) |
196
+ | netmask | 2.0.2 | MIT | [L142, L143, L144](THIRD_PARTY_LICENSES.txt) |
197
+ | node-fetch | 2.6.13 | MIT | [L042](THIRD_PARTY_LICENSES.txt) |
198
+ | node-fetch | 2.6.13 | MIT | [L042](THIRD_PARTY_LICENSES.txt) |
199
+ | node-fetch | 2.7.0 | MIT | [L042](THIRD_PARTY_LICENSES.txt) |
200
+ | oidn-web | 0.3.5 | MIT | [L145](THIRD_PARTY_LICENSES.txt) |
201
+ | once | 1.4.0 | ISC | [L146](THIRD_PARTY_LICENSES.txt) |
202
+ | opentype.js | 1.3.4 | MIT | [L147](THIRD_PARTY_LICENSES.txt) |
203
+ | pac-proxy-agent | 7.2.0 | MIT | [L148](THIRD_PARTY_LICENSES.txt) |
204
+ | pac-resolver | 7.0.1 | MIT | [L055](THIRD_PARTY_LICENSES.txt) |
205
+ | pako | 1.0.11 | (MIT AND Zlib) | [L149](THIRD_PARTY_LICENSES.txt) |
206
+ | parent-module | 1.0.1 | MIT | [L056](THIRD_PARTY_LICENSES.txt) |
207
+ | parse-json | 5.2.0 | MIT | [L100](THIRD_PARTY_LICENSES.txt) |
208
+ | path-data-parser | 0.1.0 | MIT | [L150](THIRD_PARTY_LICENSES.txt) |
209
+ | pend | 1.2.0 | MIT | [L151](THIRD_PARTY_LICENSES.txt) |
210
+ | picocolors | 1.1.1 | ISC | [L152](THIRD_PARTY_LICENSES.txt) |
211
+ | picomatch | 4.0.2 | MIT | [L197](THIRD_PARTY_LICENSES.txt) |
212
+ | picomatch | 4.0.3 | MIT | [L197](THIRD_PARTY_LICENSES.txt) |
213
+ | planck | 1.5.0 | MIT | [L153](THIRD_PARTY_LICENSES.txt) |
214
+ | points-on-curve | 0.2.0 | MIT | [L150](THIRD_PARTY_LICENSES.txt) |
215
+ | points-on-path | 0.2.1 | MIT | [L154](THIRD_PARTY_LICENSES.txt) |
216
+ | polygon-clipping | 0.15.7 | MIT | [L155](THIRD_PARTY_LICENSES.txt) |
217
+ | polyline-miter-util | 1.0.1 | MIT | [L058](THIRD_PARTY_LICENSES.txt) |
218
+ | postcss | 8.5.6 | MIT | [L156](THIRD_PARTY_LICENSES.txt) |
219
+ | prismjs | 1.30.0 | MIT | [L157](THIRD_PARTY_LICENSES.txt) |
220
+ | progress | 2.0.3 | MIT | [L158](THIRD_PARTY_LICENSES.txt) |
221
+ | proxy-agent | 6.3.1 | MIT | [L159, L063](THIRD_PARTY_LICENSES.txt) |
222
+ | proxy-from-env | 1.1.0 | MIT | [L065](THIRD_PARTY_LICENSES.txt) |
223
+ | proxy-from-env | 2.1.0 | MIT | [L065](THIRD_PARTY_LICENSES.txt) |
224
+ | pump | 3.0.2 | MIT | [L089](THIRD_PARTY_LICENSES.txt) |
225
+ | puppeteer-core | 21.11.0 | Apache-2.0 | [L163, L164, L027](THIRD_PARTY_LICENSES.txt) |
226
+ | puppeteer | 21.11.0 | Apache-2.0 | [L161, L162, L027](THIRD_PARTY_LICENSES.txt) |
227
+ | readable-stream | 3.6.2 | MIT | [L165](THIRD_PARTY_LICENSES.txt) |
228
+ | regenerator-runtime | 0.13.11 | MIT | [L166](THIRD_PARTY_LICENSES.txt) |
229
+ | require-directory | 2.1.1 | MIT | [L167](THIRD_PARTY_LICENSES.txt) |
230
+ | resolve-from | 4.0.0 | MIT | [L056](THIRD_PARTY_LICENSES.txt) |
231
+ | robust-predicates | 3.0.3 | Unlicense | [L168](THIRD_PARTY_LICENSES.txt) |
232
+ | rollup | 4.41.1 | MIT | [L169](THIRD_PARTY_LICENSES.txt) |
233
+ | roughjs | 4.6.6 | MIT | [L170](THIRD_PARTY_LICENSES.txt) |
234
+ | safe-buffer | 5.2.1 | MIT | [L171](THIRD_PARTY_LICENSES.txt) |
235
+ | seedrandom | 3.0.5 | MIT | [L172, L173, L174, L175](THIRD_PARTY_LICENSES.txt) |
236
+ | smart-buffer | 4.2.0 | MIT | [L176](THIRD_PARTY_LICENSES.txt) |
237
+ | socks-proxy-agent | 8.0.5 | MIT | [L055](THIRD_PARTY_LICENSES.txt) |
238
+ | socks | 2.8.5 | MIT | [L177](THIRD_PARTY_LICENSES.txt) |
239
+ | source-map-js | 1.2.1 | BSD-3-Clause | [L178](THIRD_PARTY_LICENSES.txt) |
240
+ | source-map | 0.6.1 | BSD-3-Clause | [L178](THIRD_PARTY_LICENSES.txt) |
241
+ | speech-rule-engine | 4.0.7 | Apache-2.0 | [L179](THIRD_PARTY_LICENSES.txt) |
242
+ | splaytree | 3.2.3 | MIT | [L181, L182, L183, L184](THIRD_PARTY_LICENSES.txt) |
243
+ | sprintf-js | 1.0.3 | BSD-3-Clause | [L185](THIRD_PARTY_LICENSES.txt) |
244
+ | sprintf-js | 1.1.3 | BSD-3-Clause | [L119](THIRD_PARTY_LICENSES.txt) |
245
+ | stage-js | 1.0.2 | MIT | [L186](THIRD_PARTY_LICENSES.txt) |
246
+ | stream-browserify | 3.0.0 | MIT | [L187](THIRD_PARTY_LICENSES.txt) |
247
+ | streamx | 2.22.1 | MIT | [L101](THIRD_PARTY_LICENSES.txt) |
248
+ | string_decoder | 1.3.0 | MIT | [L188](THIRD_PARTY_LICENSES.txt) |
249
+ | string-width | 4.2.3 | MIT | [L056](THIRD_PARTY_LICENSES.txt) |
250
+ | string.prototype.codepointat | 0.2.1 | MIT | [L088](THIRD_PARTY_LICENSES.txt) |
251
+ | strip-ansi | 6.0.1 | MIT | [L056](THIRD_PARTY_LICENSES.txt) |
252
+ | supports-color | 7.2.0 | MIT | [L056](THIRD_PARTY_LICENSES.txt) |
253
+ | svg-parser | 2.0.4 | MIT | [L189, L190](THIRD_PARTY_LICENSES.txt) |
254
+ | svg-pathdata | 7.1.0 | MIT | [L191](THIRD_PARTY_LICENSES.txt) |
255
+ | tar-fs | 3.0.4 | MIT | [L089](THIRD_PARTY_LICENSES.txt) |
256
+ | tar-stream | 3.1.7 | MIT | [L089](THIRD_PARTY_LICENSES.txt) |
257
+ | text-decoder | 1.2.3 | Apache-2.0 | [L001](THIRD_PARTY_LICENSES.txt) |
258
+ | through | 2.3.8 | MIT | [L192, L193](THIRD_PARTY_LICENSES.txt) |
259
+ | tiny-inflate | 1.0.3 | MIT | [L194](THIRD_PARTY_LICENSES.txt) |
260
+ | tinyglobby | 0.2.15 | MIT | [L195](THIRD_PARTY_LICENSES.txt) |
261
+ | tr46 | 0.0.3 | MIT | [L198, L199](THIRD_PARTY_LICENSES.txt) |
262
+ | tslib | 2.8.1 | 0BSD | [L200](THIRD_PARTY_LICENSES.txt) |
263
+ | tsx | 4.22.4 | MIT | [L201](THIRD_PARTY_LICENSES.txt) |
264
+ | typescript | 5.4.5 | Apache-2.0 | [L202, L203](THIRD_PARTY_LICENSES.txt) |
265
+ | unbzip2-stream | 1.4.3 | MIT | [L204](THIRD_PARTY_LICENSES.txt) |
266
+ | undici-types | 6.19.8 | MIT | [L205](THIRD_PARTY_LICENSES.txt) |
267
+ | urlpattern-polyfill | 10.0.0 | MIT | [L206](THIRD_PARTY_LICENSES.txt) |
268
+ | utif | 2.0.1 | MIT | [L207](THIRD_PARTY_LICENSES.txt) |
269
+ | util-deprecate | 1.0.2 | MIT | [L208](THIRD_PARTY_LICENSES.txt) |
270
+ | vite | 6.3.6 | MIT | [L209](THIRD_PARTY_LICENSES.txt) |
271
+ | webidl-conversions | 3.0.1 | BSD-2-Clause | [L210](THIRD_PARTY_LICENSES.txt) |
272
+ | webm-muxer | 5.1.4 | MIT | [L211](THIRD_PARTY_LICENSES.txt) |
273
+ | wgsl_reflect | 1.2.3 | MIT | [L212](THIRD_PARTY_LICENSES.txt) |
274
+ | whatwg-url | 5.0.0 | MIT | [L213](THIRD_PARTY_LICENSES.txt) |
275
+ | wicked-good-xpath | 1.3.0 | MIT | [L214](THIRD_PARTY_LICENSES.txt) |
276
+ | woff2-encoder | 2.0.0 | MIT | [L215](THIRD_PARTY_LICENSES.txt) |
277
+ | wrap-ansi | 7.0.0 | MIT | [L100](THIRD_PARTY_LICENSES.txt) |
278
+ | wrappy | 1.0.2 | ISC | [L146](THIRD_PARTY_LICENSES.txt) |
279
+ | ws | 8.16.0 | MIT | [L140](THIRD_PARTY_LICENSES.txt) |
280
+ | ws | 8.22.0 | MIT | [L140](THIRD_PARTY_LICENSES.txt) |
281
+ | xmldom-sre | 0.1.31 | MIT | [L216, L217, L218, L219](THIRD_PARTY_LICENSES.txt) |
282
+ | y18n | 5.0.8 | ISC | [L220](THIRD_PARTY_LICENSES.txt) |
283
+ | yargs-parser | 20.2.9 | ISC | [L051](THIRD_PARTY_LICENSES.txt) |
284
+ | yargs-parser | 21.1.1 | ISC | [L051](THIRD_PARTY_LICENSES.txt) |
285
+ | yargs | 16.2.0 | MIT | [L050](THIRD_PARTY_LICENSES.txt) |
286
+ | yargs | 17.7.2 | MIT | [L050](THIRD_PARTY_LICENSES.txt) |
287
+ | yauzl | 2.10.0 | MIT | [L221](THIRD_PARTY_LICENSES.txt) |
288
+ | yerror | 8.0.0 | MIT | [L222](THIRD_PARTY_LICENSES.txt) |
289
+
290
+ ## Review boundaries
291
+
292
+ This inventory does not grant rights to demo photos, videos, models, SVGs, or
293
+ research PDFs. Their provenance remains recorded as unresolved in
294
+ `docs/THIRD_PARTY_ASSET_REVIEW.md` in the source repository. Do not treat them
295
+ as covered by the code or font licenses listed here. They are excluded from
296
+ the engine npm package by its existing package file allowlist.
297
+ The SDF helper block adapts Inigo Quilez's technical snippets under the MIT
298
+ permission stated on his article index. Its attribution and MIT terms are
299
+ included in the component table and license texts above. That permission does
300
+ not cover the author's separately protected mathematical/shader artwork.
301
+ The review also records a verified match between the installed WOFF2 decoder's embedded
302
+ WASM and upstream's version-tagged artifact, with documented toolchain/runtime
303
+ notices. The exact historical Brotli revision and full build reproducibility
304
+ are not asserted. An absent build hash alone does not add a permission
305
+ requirement to the MIT license.
306
+
307
+ ## Maintaining this inventory
308
+
309
+ After dependency or asset changes, run `npm ci`, then
310
+ `npm run licenses:generate` and review the result. Upstream text supplements
311
+ for packages that omit license files, reviewed README excerpts, and asset provenance are recorded in
312
+ `tools/third-party-sources.json` in the source repository. These internal maintenance records
313
+ are not needed in distributions. Generation uses local files and checked-in originals;
314
+ it does not execute package scripts or fetch new legal terms. Run
315
+ `npm run licenses:check` to verify the committed input and file fingerprints.
316
+ This command also runs before the library build.
317
+
318
+ <!-- retiam-third-party-packages: ["@babel/code-frame@7.27.1","@babel/helper-validator-identifier@7.28.5","@dimforge/rapier2d-compat@0.20.0","@dimforge/rapier3d-compat@0.20.0","@petamoriken/float16@3.9.3","@puppeteer/browsers@1.9.1","@tensorflow/tfjs-backend-cpu@4.20.0","@tensorflow/tfjs-backend-webgl@4.20.0","@tensorflow/tfjs-backend-webgpu@4.20.0","@tensorflow/tfjs-converter@4.20.0","@tensorflow/tfjs-core@4.20.0","@tensorflow/tfjs-data@4.20.0","@tensorflow/tfjs-layers@4.20.0","@tensorflow/tfjs@4.20.0","@tootallnate/quickjs-emscripten@0.23.0","@types/dom-webcodecs@0.1.18","@types/estree@1.0.7","@types/libtess@1.2.0","@types/long@4.0.2","@types/node-fetch@2.6.13","@types/node@22.7.4","@types/offscreencanvas@2019.3.0","@types/offscreencanvas@2019.7.3","@types/prismjs@1.26.6","@types/seedrandom@2.4.34","@types/wicg-file-system-access@2020.9.8","@webgpu/types@0.1.38","@webgpu/types@0.1.40","@zappar/msdf-generator@1.2.4","agent-base@6.0.2","agent-base@7.1.3","ansi-regex@5.0.1","ansi-styles@4.3.0","argparse@1.0.10","argparse@2.0.1","as-number@1.0.0","ast-types@0.13.4","asynckit@0.4.0","axios@1.20.0","b4a@1.6.7","base64-js@1.5.1","basic-ftp@5.0.5","box3d-wasm@0.2.0","buffer-crc32@0.2.13","buffer@5.7.1","buffer@6.0.3","call-bind-apply-helpers@1.0.2","callsites@3.1.0","chalk@4.1.2","chromium-bidi@0.5.8","cli-progress@3.12.0","cliui@7.0.4","cliui@8.0.1","color-convert@2.0.1","color-name@1.1.4","combined-stream@1.0.8","comlink@4.4.2","commander@9.2.0","core-js@3.29.1","cosmiconfig@9.0.0","cross-fetch@4.0.0","data-uri-to-buffer@6.0.2","debug@4.3.4","degenerator@5.0.1","delayed-stream@1.0.0","devtools-protocol@0.0.1232444","dunder-proto@1.0.1","earcut@3.0.2","emoji-regex@8.0.0","end-of-stream@1.4.4","env-paths@2.2.1","error-ex@1.3.2","es-define-property@1.0.1","es-errors@1.3.0","es-object-atoms@1.1.2","es-set-tostringtag@2.1.0","esbuild@0.25.5","esbuild@0.28.1","escalade@3.2.0","escodegen@2.1.0","esm@3.2.25","esprima@4.0.1","estraverse@5.3.0","esutils@2.0.3","events@3.3.0","extract-zip@2.0.1","extrude-polyline@1.0.6","fast-fifo@1.3.2","fd-slicer@1.1.0","fdir@6.4.5","fdir@6.5.0","follow-redirects@1.16.0","form-data@4.0.6","function-bind@1.1.2","get-caller-file@2.0.5","get-intrinsic@1.3.0","get-proto@1.0.1","get-stream@5.2.0","get-uri@6.0.4","gl-vec2@1.3.0","gopd@1.2.0","hachure-fill@0.5.2","has-flag@4.0.0","has-symbols@1.1.0","has-tostringtag@1.0.2","hasown@2.0.4","http-proxy-agent@7.0.2","https-proxy-agent@5.0.1","https-proxy-agent@7.0.6","ieee754@1.2.1","import-fresh@3.3.1","inherits@2.0.4","ip-address@9.0.5","is-arrayish@0.2.1","is-fullwidth-code-point@3.0.0","isomorphic-ws@5.0.0","jolt-physics@1.1.0","js-tokens@4.0.0","js-yaml@4.1.0","jsbn@1.1.0","json-parse-even-better-errors@2.3.1","libtess@1.2.2","lines-and-columns@1.2.4","long@4.0.0","lru-cache@7.18.3","math-intrinsics@1.1.0","mathjax-full@3.2.2","matter-js@0.20.0","mhchemparser@4.2.1","mime-db@1.52.0","mime-types@2.1.35","mitt@3.0.1","mj-context-menu@0.6.1","mkdirp-classic@0.5.3","monaco-editor@0.45.0","mp4-muxer@5.2.2","ms@2.1.2","msedge-tts@2.0.8","nanoid@3.3.11","netmask@2.0.2","node-fetch@2.6.13","node-fetch@2.7.0","oidn-web@0.3.5","once@1.4.0","opentype.js@1.3.4","pac-proxy-agent@7.2.0","pac-resolver@7.0.1","pako@1.0.11","parent-module@1.0.1","parse-json@5.2.0","path-data-parser@0.1.0","pend@1.2.0","picocolors@1.1.1","picomatch@4.0.2","picomatch@4.0.3","planck@1.5.0","points-on-curve@0.2.0","points-on-path@0.2.1","polygon-clipping@0.15.7","polyline-miter-util@1.0.1","postcss@8.5.6","prismjs@1.30.0","progress@2.0.3","proxy-agent@6.3.1","proxy-from-env@1.1.0","proxy-from-env@2.1.0","pump@3.0.2","puppeteer-core@21.11.0","puppeteer@21.11.0","readable-stream@3.6.2","regenerator-runtime@0.13.11","require-directory@2.1.1","resolve-from@4.0.0","robust-predicates@3.0.3","rollup@4.41.1","roughjs@4.6.6","safe-buffer@5.2.1","seedrandom@3.0.5","smart-buffer@4.2.0","socks-proxy-agent@8.0.5","socks@2.8.5","source-map-js@1.2.1","source-map@0.6.1","speech-rule-engine@4.0.7","splaytree@3.2.3","sprintf-js@1.0.3","sprintf-js@1.1.3","stage-js@1.0.2","stream-browserify@3.0.0","streamx@2.22.1","string-width@4.2.3","string.prototype.codepointat@0.2.1","string_decoder@1.3.0","strip-ansi@6.0.1","supports-color@7.2.0","svg-parser@2.0.4","svg-pathdata@7.1.0","tar-fs@3.0.4","tar-stream@3.1.7","text-decoder@1.2.3","through@2.3.8","tiny-inflate@1.0.3","tinyglobby@0.2.15","tr46@0.0.3","tslib@2.8.1","tsx@4.22.4","typescript@5.4.5","unbzip2-stream@1.4.3","undici-types@6.19.8","urlpattern-polyfill@10.0.0","utif@2.0.1","util-deprecate@1.0.2","vite@6.3.6","webidl-conversions@3.0.1","webm-muxer@5.1.4","wgsl_reflect@1.2.3","whatwg-url@5.0.0","wicked-good-xpath@1.3.0","woff2-encoder@2.0.0","wrap-ansi@7.0.0","wrappy@1.0.2","ws@8.16.0","ws@8.22.0","xmldom-sre@0.1.31","y18n@5.0.8","yargs-parser@20.2.9","yargs-parser@21.1.1","yargs@16.2.0","yargs@17.7.2","yauzl@2.10.0","yerror@8.0.0"] -->
package/bin/export.js CHANGED
@@ -4,6 +4,7 @@
4
4
  import { build } from 'vite';
5
5
  import path from 'path';
6
6
  import fs from 'fs';
7
+ import { retiamNoticesPlugin } from './third-party.js';
7
8
 
8
9
  const rootDir = process.cwd();
9
10
 
@@ -285,7 +286,7 @@ try {
285
286
  configFile: false,
286
287
  publicDir: false,
287
288
  assetsInclude: ['**/*.tza', '**/*.ttf', '**/*.png'],
288
- plugins: [tzaPlugin(), wgslPlugin()],
289
+ plugins: [tzaPlugin(), wgslPlugin(), retiamNoticesPlugin()],
289
290
  resolve: {
290
291
  alias: [
291
292
  { find: '../../index', replacement: path.resolve(rootDir, 'src/engine/_core/Constants.ts') },
@@ -308,7 +309,7 @@ try {
308
309
  },
309
310
  esbuild: {
310
311
  drop: ['debugger'],
311
- legalComments: 'none',
312
+ legalComments: 'inline',
312
313
  treeShaking: true
313
314
  }
314
315
  });
@@ -320,4 +321,4 @@ try {
320
321
  if (fs.existsSync(tempEntryPath)) {
321
322
  fs.unlinkSync(tempEntryPath);
322
323
  }
323
- }
324
+ }
package/bin/init.js CHANGED
@@ -8,6 +8,7 @@ import fs from 'fs';
8
8
  import path from 'path';
9
9
  import readline from 'readline/promises';
10
10
  import { spawnSync } from 'child_process';
11
+ import { copyThirdPartyNotices } from './third-party.js';
11
12
 
12
13
  const args = process.argv.slice(2);
13
14
 
@@ -173,8 +174,8 @@ async function main() {
173
174
  private: true,
174
175
  type: 'module',
175
176
  scripts: {
176
- dev: 'vite',
177
- build: 'tsc && vite build',
177
+ dev: 'node tools/prepare-notices.mjs && vite',
178
+ build: 'tsc && node tools/prepare-notices.mjs && vite build',
178
179
  preview: 'vite preview',
179
180
  render: 'retiam render src/scenes/HelloWorld.ts'
180
181
  },
@@ -217,7 +218,8 @@ export default defineConfig({
217
218
  }
218
219
  },
219
220
  esbuild: {
220
- target: 'es2022'
221
+ target: 'es2022',
222
+ legalComments: 'inline'
221
223
  },
222
224
  server: {
223
225
  port: 3000,
@@ -349,6 +351,20 @@ A cinematic WebGPU mathematical animation built with [Retiam](https://github.com
349
351
  - \`src/main.ts\`: Entrypoint mounting the WebGPU canvas.
350
352
  - \`src/scenes/HelloWorld.ts\`: Starter scene with hero typography and \`Write\` animation.
351
353
  - \`vite.config.ts\`: Real-time WebGPU bundler configuration with hot module reload.
354
+
355
+ ## Licensing
356
+
357
+ Retiam and its supplied starter code are free for noncommercial use under
358
+ \`LICENSE\`. Commercial development, client work, products, services, and
359
+ monetized content require a paid written license; see \`COMMERCIAL_LICENSE.md\`.
360
+ Your independently authored code and original outputs remain your own.
361
+ For commercial licensing and quotes, contact
362
+ [abhilasbiswas@gmail.com](mailto:abhilasbiswas@gmail.com).
363
+ Retain both files plus \`THIRD_PARTY_NOTICES.md\` and \`THIRD_PARTY_LICENSES.txt\`
364
+ with redistributed Retiam code.
365
+ Development and production builds copy the installed Retiam version's notices
366
+ to \`public/vendor/retiam/\`, which Vite includes in the built application.
367
+ Your own media and dependencies need their own notices and permissions.
352
368
  `;
353
369
 
354
370
  // Write all template files
@@ -360,6 +376,9 @@ A cinematic WebGPU mathematical animation built with [Retiam](https://github.com
360
376
  fs.writeFileSync(path.join(resolvedDir, 'README.md'), readme, 'utf8');
361
377
  fs.writeFileSync(path.join(srcDir, 'main.ts'), mainTs, 'utf8');
362
378
  fs.writeFileSync(path.join(scenesDir, 'HelloWorld.ts'), helloWorldTs, 'utf8');
379
+ copyThirdPartyNotices(resolvedDir);
380
+ fs.mkdirSync(path.join(resolvedDir, 'tools'), { recursive: true });
381
+ fs.copyFileSync(new URL('./prepare-notices.js', import.meta.url), path.join(resolvedDir, 'tools/prepare-notices.mjs'));
363
382
 
364
383
  const createdFiles = [
365
384
  'package.json',
@@ -369,7 +388,12 @@ A cinematic WebGPU mathematical animation built with [Retiam](https://github.com
369
388
  '.gitignore',
370
389
  'README.md',
371
390
  'src/main.ts',
372
- 'src/scenes/HelloWorld.ts'
391
+ 'src/scenes/HelloWorld.ts',
392
+ 'LICENSE',
393
+ 'COMMERCIAL_LICENSE.md',
394
+ 'THIRD_PARTY_NOTICES.md',
395
+ 'THIRD_PARTY_LICENSES.txt',
396
+ 'tools/prepare-notices.mjs'
373
397
  ];
374
398
 
375
399
  // Optional git init
@@ -0,0 +1,11 @@
1
+ // Copied into projects created by `retiam init`; run before Vite copies public/.
2
+ import fs from 'node:fs';
3
+ import path from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
5
+
6
+ const engine = path.resolve(path.dirname(fileURLToPath(import.meta.resolve('retiam'))), '..');
7
+ const output = path.resolve('public/vendor/retiam');
8
+ fs.mkdirSync(output, { recursive: true });
9
+ for (const file of ['LICENSE', 'COMMERCIAL_LICENSE.md', 'THIRD_PARTY_NOTICES.md', 'THIRD_PARTY_LICENSES.txt']) {
10
+ fs.copyFileSync(path.join(engine, file), path.join(output, file));
11
+ }
@@ -0,0 +1,6 @@
1
+ import type { Plugin } from 'vite';
2
+
3
+ export declare function copyThirdPartyNotices(destination: string, root?: string): void;
4
+ export declare function thirdPartyNoticesPlugin(root?: string, options?: { verifyDependencies?: boolean }): Plugin;
5
+ /** Include installed Retiam terms in application builds; add your application's own notices separately. */
6
+ export declare function retiamNoticesPlugin(): Plugin;
@@ -0,0 +1,92 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+
5
+ const packageRoot = fileURLToPath(new URL('../', import.meta.url));
6
+ const noticeName = 'THIRD_PARTY_NOTICES.md';
7
+ const textsName = 'THIRD_PARTY_LICENSES.txt';
8
+ const licenseName = 'LICENSE';
9
+ const commercialName = 'COMMERCIAL_LICENSE.md';
10
+
11
+ function noticeFiles(root) {
12
+ const files = [licenseName, commercialName, noticeName, textsName];
13
+ // Fail a build rather than silently distribute assets without their notices.
14
+ for (const file of files) fs.accessSync(path.join(root, file));
15
+ return files;
16
+ }
17
+
18
+ export function copyThirdPartyNotices(destination, root = packageRoot) {
19
+ const files = noticeFiles(root);
20
+ if (path.resolve(destination) === path.resolve(root)) {
21
+ throw new Error('Third-party notices must be copied to a different directory.');
22
+ }
23
+ for (const file of files) {
24
+ const target = path.join(destination, file);
25
+ fs.mkdirSync(path.dirname(target), { recursive: true });
26
+ fs.copyFileSync(path.join(root, file), target);
27
+ }
28
+ }
29
+
30
+ /** @returns {import('vite').Plugin} */
31
+ export function thirdPartyNoticesPlugin(root = packageRoot, { verifyDependencies = true } = {}) {
32
+ return {
33
+ name: 'retiam-third-party-notices',
34
+ apply: 'build',
35
+ outputOptions(options) {
36
+ const previous = options.banner;
37
+ return {
38
+ ...options,
39
+ banner: async chunk => {
40
+ const original = typeof previous === 'function' ? await previous(chunk) : previous || '';
41
+ const notice = path.posix.relative(path.posix.dirname(chunk.fileName), noticeName);
42
+ const texts = path.posix.relative(path.posix.dirname(chunk.fileName), textsName);
43
+ const license = path.posix.relative(path.posix.dirname(chunk.fileName), licenseName);
44
+ const commercial = path.posix.relative(path.posix.dirname(chunk.fileName), commercialName);
45
+ return `${original}\n/*! Retiam: noncommercial use only unless separately licensed. See ${license} and ${commercial}. Third-party notices: ${notice} and ${texts}. */`;
46
+ },
47
+ };
48
+ },
49
+ generateBundle() {
50
+ const files = noticeFiles(root);
51
+ // Coverage travels with the public index; maintenance records stay in the source repo.
52
+ const marker = fs.readFileSync(path.join(root, noticeName), 'utf8').match(/^<!-- retiam-third-party-packages: (.+) -->$/m);
53
+ if (!marker) this.error(`Missing package coverage in ${noticeName}. Regenerate notices.`);
54
+ const packages = JSON.parse(marker[1]);
55
+ if (!Array.isArray(packages) || packages.some(pkg => typeof pkg !== 'string')) this.error('Invalid third-party package coverage.');
56
+ const covered = new Set(packages);
57
+ const inspected = new Set();
58
+ for (const id of verifyDependencies ? this.getModuleIds() : []) {
59
+ if (!id.includes('/node_modules/') || this.getModuleInfo(id)?.isExternal) continue;
60
+ const file = id.replace(/^\0/, '').split('?')[0];
61
+ if (!fs.existsSync(file)) continue;
62
+ let directory = path.dirname(file);
63
+ while (directory !== path.dirname(directory)) {
64
+ const manifest = path.join(directory, 'package.json');
65
+ if (fs.existsSync(manifest)) {
66
+ const pkg = JSON.parse(fs.readFileSync(manifest, 'utf8'));
67
+ if (pkg.name && pkg.version) {
68
+ const key = `${pkg.name}@${pkg.version}`;
69
+ if (!inspected.has(key) && !covered.has(key)) {
70
+ this.error(`No third-party license inventory entry for bundled package ${key}. Update tools/third-party-sources.json and regenerate notices.`);
71
+ }
72
+ inspected.add(key);
73
+ break;
74
+ }
75
+ }
76
+ directory = path.dirname(directory);
77
+ }
78
+ }
79
+ for (const file of files) {
80
+ this.emitFile({ type: 'asset', fileName: file, source: fs.readFileSync(path.join(root, file)) });
81
+ }
82
+ },
83
+ };
84
+ }
85
+
86
+ /** Copy installed Retiam terms into an application's Vite output.
87
+ * Application dependencies have their own notice requirements.
88
+ * @returns {import('vite').Plugin}
89
+ */
90
+ export function retiamNoticesPlugin() {
91
+ return thirdPartyNoticesPlugin(packageRoot, { verifyDependencies: false });
92
+ }
@@ -0,0 +1,61 @@
1
+ # Retiam commercial licensing
2
+
3
+ Commercial use of Retiam requires a paid license.
4
+
5
+ Contact Abhilas Biswas at
6
+ [abhilasbiswas@gmail.com](mailto:abhilasbiswas@gmail.com) to request a written
7
+ commercial license before commercial use begins. Describe your organization,
8
+ intended products, services or content, developers, client work, deployments,
9
+ and redistribution needs.
10
+
11
+ Commercial use has the meaning given in the accompanying [LICENSE](LICENSE).
12
+ It includes direct or indirect commercial revenue, commercial advantage,
13
+ internal business use, paid professional work, advertising, sponsorship,
14
+ subscriptions, and monetized videos, animations, courses, products or services.
15
+ The requirement applies when Retiam is one component of a larger project,
16
+ when an offering is free to download, and before an intended commercial
17
+ offering has earned revenue.
18
+
19
+ ## Written agreement required
20
+
21
+ This file explains how to obtain a license; it does not itself grant commercial
22
+ permission or establish a price, payment obligation, subscription, or renewal.
23
+ Downloading Retiam, receiving this file, or requesting a quote does not grant
24
+ commercial rights. Commercial permission exists only under a separate written
25
+ agreement issued or expressly accepted by Abhilas Biswas, after any conditions
26
+ and payments required by that agreement have been satisfied.
27
+
28
+ The agreement should identify:
29
+
30
+ - The licensed person or legal entity, covered developers, contractors,
31
+ affiliates, and client projects.
32
+ - Covered Retiam versions, products, services, content, and permitted uses.
33
+ - Hosting, deployment, redistribution, and end-user rights, including whether
34
+ embedded Retiam code may be delivered to clients or customers.
35
+ - Fees, currency, payment dates, license duration, renewal, and rights after
36
+ expiry or termination.
37
+ - Any support, maintenance, updates, warranties, liability terms, governing
38
+ law, or dispute provisions agreed by the parties.
39
+
40
+ Pricing, duration, and other commercial terms are negotiated separately.
41
+ No perpetual license, annual plan, automatic renewal, updates, or support is
42
+ promised by this notice.
43
+
44
+ ## Ownership and third-party materials
45
+
46
+ Retiam's licensor retains rights in Retiam-authored software. Users retain
47
+ rights in their independently authored application code and original rendered
48
+ outputs. A commercial license authorizes the agreed uses of Retiam; it does
49
+ not transfer ownership of either party's independent work.
50
+
51
+ Third-party code, fonts, font-derived data, weights, and other materials remain
52
+ under their respective licenses. See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)
53
+ and [THIRD_PARTY_LICENSES.txt](THIRD_PARTY_LICENSES.txt). A Retiam commercial
54
+ agreement cannot override third-party rights or grant rights the licensor does
55
+ not control. External services and application-supplied media may require
56
+ separate permissions.
57
+
58
+ Retain Retiam's license, this file, and applicable third-party notices with
59
+ redistributed Retiam code, subject to the applicable written agreement and
60
+ third-party terms. Permissions already granted under ISC or another earlier
61
+ license remain unaffected.