retiam 1.0.3 → 2.0.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 (35) 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-Ds1s3mlY.js → UTIF-2Ear_0Uo.js} +2 -1
  15. package/dist/{decompress-D5RzmD-2.js → decompress-CuY1lEpT.js} +1 -0
  16. package/dist/{index-B0d0AebJ.js → index-B2sJBy4c.js} +6968 -7907
  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-D6re07P2.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 +334 -335
  27. package/dist/src/engine/entities/composites/text/MarkupText.d.ts +0 -1
  28. package/dist/src/engine/entities/composites/text/Tex.d.ts +2 -3
  29. package/dist/src/engine/entities/composites/text/TexFontPatcher.d.ts +1 -5
  30. package/dist/src/engine/font/types.d.ts +1 -1
  31. package/dist/src/index.d.ts +0 -1
  32. package/package.json +21 -5
  33. package/readme.md +30 -1
  34. package/dist/assets/Virgil.woff2 +0 -0
  35. package/dist/src/engine/entities/composites/text/virgilMathJaxData.d.ts +0 -3
@@ -29,7 +29,6 @@ export interface MarkupTextOptions extends EntityOptions, ShaderConfigOptions {
29
29
  * Typographic font style for LaTeX mathematical formulas:
30
30
  * - 'default': Standard Computer Modern TeX font.
31
31
  * - 'excalifont': Handwritten Excalidraw math font.
32
- * - 'virgil': Handwritten Virgil math font.
33
32
  * @default 'default'
34
33
  */
35
34
  texStyle?: TexStyle;
@@ -4,13 +4,12 @@ import { TextOptions } from './Text';
4
4
  import { VectorEntity } from '../../../_core/VectorEntity';
5
5
  import { PathEffect } from '../../../material/PathEffect';
6
6
  import { FillEffect } from '../../../material/FillEffect';
7
- export type TexStyle = 'default' | 'excalifont' | 'virgil';
7
+ export type TexStyle = 'default' | 'excalifont';
8
8
  export interface TexOptions extends TextOptions {
9
9
  /**
10
10
  * Typographic font style for LaTeX formulas:
11
11
  * - 'default': Standard Computer Modern TeX font.
12
12
  * - 'excalifont': Handwritten Excalidraw font for numbers, letters, Greek symbols, and operators.
13
- * - 'virgil': Handwritten Virgil font for numbers, letters, Greek symbols, and operators.
14
13
  * @default 'default'
15
14
  */
16
15
  fontStyle?: TexStyle;
@@ -52,7 +51,7 @@ export declare class Tex extends VectorEntity {
52
51
  private _cachedPaths;
53
52
  constructor(cmd?: string, options?: TexOptions);
54
53
  /**
55
- * Switches the font style ('default', 'excalifont', or 'virgil') and rebuilds the formula geometry.
54
+ * Switches the font style ('default' or 'excalifont') and rebuilds the formula geometry.
56
55
  */
57
56
  setFontStyle(fontStyle: TexStyle): this;
58
57
  /**
@@ -1,15 +1,11 @@
1
1
  /**
2
2
  * Utility for patching MathJax SVG font definitions with custom vector fonts
3
- * such as Excalifont and Virgil (Excalidraw handwritten fonts).
3
+ * such as Excalifont (an Excalidraw handwritten font).
4
4
  */
5
5
  export declare class TexFontPatcher {
6
6
  /**
7
7
  * Injects Excalifont vector outlines and glyph metrics into a MathJax SVG output instance.
8
8
  */
9
9
  static patchExcalifont(svg: any): void;
10
- /**
11
- * Injects Virgil vector outlines and glyph metrics into a MathJax SVG output instance.
12
- */
13
- static patchVirgil(svg: any): void;
14
10
  private static applyGlyphs;
15
11
  }
@@ -1,6 +1,6 @@
1
1
  import { Font as OpentypeFont } from 'opentype.js';
2
2
  export type VectorFont = OpentypeFont;
3
- export type BuiltinFont = 'roboto' | 'excalifont' | 'virgil' | 'Fredericka the Great' | 'fredericka the great' | 'fredericka' | 'firacode' | 'Fira Code';
3
+ export type BuiltinFont = 'roboto' | 'excalifont' | 'Fredericka the Great' | 'fredericka the great' | 'fredericka' | 'firacode' | 'Fira Code';
4
4
  export type FontStyle = BuiltinFont | (string & {});
5
5
  export type FontSource = string | ArrayBuffer | Uint8Array | Blob;
6
6
  export interface MSDFOptions {
@@ -205,7 +205,6 @@ export * from './engine/entities/composites/text/TexFontPatcher';
205
205
  export * from './engine/entities/composites/text/Text';
206
206
  export * from './engine/entities/composites/text/TextSplitter';
207
207
  export * from './engine/entities/composites/text/excalifontMathJaxData';
208
- export * from './engine/entities/composites/text/virgilMathJaxData';
209
208
  export * from './engine/entities/composites/trackers/ValueTrackers';
210
209
  export * from './engine/entities/composites/trackers/alwaysRedraw';
211
210
  export * from './engine/entities/layout/Arrange';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "retiam",
3
- "version": "1.0.3",
3
+ "version": "2.0.1",
4
4
  "description": "WebGPU powered animation engine",
5
5
  "type": "module",
6
6
  "main": "./dist/retiam.es.js",
@@ -12,6 +12,10 @@
12
12
  "import": "./dist/retiam.es.js"
13
13
  },
14
14
  "./dist/assets/*": "./dist/assets/*",
15
+ "./license-notices": {
16
+ "types": "./bin/third-party.d.ts",
17
+ "import": "./bin/third-party.js"
18
+ },
15
19
  "./*": {
16
20
  "types": "./dist/libs/*/index.d.ts",
17
21
  "import": "./dist/libs/*/index.js"
@@ -26,11 +30,20 @@
26
30
  "dist/libs/**/*.js",
27
31
  "dist/libs/**/*.d.ts",
28
32
  "dist/src/**/*.d.ts",
29
- "bin"
33
+ "bin",
34
+ "LICENSE",
35
+ "COMMERCIAL_LICENSE.md",
36
+ "THIRD_PARTY_NOTICES.md",
37
+ "THIRD_PARTY_LICENSES.txt",
38
+ "dist/LICENSE",
39
+ "dist/COMMERCIAL_LICENSE.md",
40
+ "dist/THIRD_PARTY_NOTICES.md",
41
+ "dist/THIRD_PARTY_LICENSES.txt"
30
42
  ],
31
43
  "scripts": {
32
44
  "dev": "vite",
33
- "build": "tsc && vite build",
45
+ "prebuild": "node tools/prepare-release.mjs",
46
+ "build": "npm run licenses:check && tsc && vite build",
34
47
  "prepack": "npm run build",
35
48
  "build:watch": "vite build --watch",
36
49
  "export": "node ./bin/cli.js export",
@@ -47,12 +60,15 @@
47
60
  "test:create": "node --test test/create_retiam_test.mjs",
48
61
  "test:shading": "npm run build && node --test test/shading_test.mjs test/shading_browser.test.mjs",
49
62
  "test:studio-layout": "node --test test/studio_layout.test.mjs",
63
+ "licenses:generate": "node tools/generate-third-party-notices.mjs",
64
+ "licenses:check": "node tools/generate-third-party-notices.mjs --check",
65
+ "test:licenses": "node --test test/third_party_notices_test.mjs test/release_metadata_test.mjs",
50
66
  "unit-test": "ts-node-esm test/test.ts",
51
67
  "gen-context": "ts-node tools/context_gen/context_generator.ts ./src",
52
68
  "gen-index": "node ./tools/index_generator/generate-index.cjs"
53
69
  },
54
70
  "author": "Abhilas Biswas",
55
- "license": "ISC",
71
+ "license": "SEE LICENSE IN LICENSE",
56
72
  "devDependencies": {
57
73
  "@lightningjs/msdf-generator": "^1.1.1",
58
74
  "@types/earcut": "^3.0.0",
@@ -105,4 +121,4 @@
105
121
  "woff2-encoder": "^2.0.0",
106
122
  "ws": "^8.16.0"
107
123
  }
108
- }
124
+ }
package/readme.md CHANGED
@@ -4,6 +4,28 @@ Retiam is a TypeScript animation engine built on WebGPU. Write scenes for mathem
4
4
 
5
5
  **[Documentation](https://abhilasbiswas.github.io/retiam-docs/)** · [Getting started](https://abhilasbiswas.github.io/retiam-docs/getting-started/) · [Examples](https://abhilasbiswas.github.io/retiam-docs/examples-catalog/) · [API reference](https://abhilasbiswas.github.io/retiam-docs/api-core/)
6
6
 
7
+ Retiam is **free for noncommercial use** under the [Retiam Noncommercial
8
+ License](https://unpkg.com/retiam@2.0.1/LICENSE). Commercial development,
9
+ internal business use, paid client work, and products, services or content that earn revenue directly or
10
+ indirectly require a separate paid written commercial license before use.
11
+ This includes advertising, sponsorships, subscriptions, and monetized videos
12
+ or courses, even when Retiam is only one part of a larger project.
13
+ Contact [abhilasbiswas@gmail.com](mailto:abhilasbiswas@gmail.com) for
14
+ [commercial licensing](https://unpkg.com/retiam@2.0.1/COMMERCIAL_LICENSE.md).
15
+
16
+ The full terms are included in the npm package. After installation, read
17
+ `node_modules/retiam/LICENSE` and `node_modules/retiam/COMMERCIAL_LICENSE.md`.
18
+ The public links above show the terms for this release without requiring
19
+ access to the private engine repository.
20
+
21
+ Your independently authored code and original outputs remain your own.
22
+ Earlier ISC permissions and third-party licenses remain unaffected. Keep the
23
+ [third-party notices](https://unpkg.com/retiam@2.0.1/THIRD_PARTY_NOTICES.md) and
24
+ [license texts](https://unpkg.com/retiam@2.0.1/THIRD_PARTY_LICENSES.txt) with
25
+ redistributed Retiam code. These files are also installed in
26
+ `node_modules/retiam/`. Source maintainers can find provenance review limits
27
+ and notice-generation commands in `docs/LICENSING.md` in the engine checkout.
28
+
7
29
  ## Features
8
30
 
9
31
  - **Scene authoring:** compose entities, groups, layouts, cameras, and interaction with TypeScript.
@@ -78,12 +100,16 @@ npm install --save-dev typescript "vite@^6.1.1" @webgpu/types
78
100
 
79
101
  Follow the [installation guide](https://abhilasbiswas.github.io/retiam-docs/installation/) for the complete project structure, TypeScript configuration, and browser entry point. To use an unpublished checkout, run `npm pack` in this repository and install the generated `.tgz` file in your application.
80
102
 
81
- For Vite applications, preserve Retiam's packaged module and asset URLs by excluding it from dependency prebundling in `vite.config.ts`:
103
+ For Vite applications, preserve Retiam's packaged asset URLs and include its
104
+ license and third-party notices in production output with `vite.config.ts`:
82
105
 
83
106
  ```typescript
84
107
  import { defineConfig } from "vite";
108
+ import { retiamNoticesPlugin } from "retiam/license-notices";
85
109
 
86
110
  export default defineConfig({
111
+ plugins: [retiamNoticesPlugin()],
112
+ esbuild: { legalComments: "inline" },
87
113
  optimizeDeps: { exclude: ["retiam"] },
88
114
  });
89
115
  ```
@@ -273,9 +299,12 @@ Save this as `vite.embed.config.ts`:
273
299
 
274
300
  ```typescript
275
301
  import { defineConfig } from 'vite';
302
+ import { retiamNoticesPlugin } from 'retiam/license-notices';
276
303
 
277
304
  export default defineConfig({
278
305
  base: './',
306
+ plugins: [retiamNoticesPlugin()],
307
+ esbuild: { legalComments: 'inline' },
279
308
  build: {
280
309
  target: 'es2022',
281
310
  outDir: 'outputs/embed',
Binary file
@@ -1,3 +0,0 @@
1
- import { GlyphMetricData } from './excalifontMathJaxData';
2
- export declare const VIRGIL_NORMAL_GLYPHS: Record<number, GlyphMetricData>;
3
- export declare const VIRGIL_ITALIC_GLYPHS: Record<number, GlyphMetricData>;