retiam 1.0.3 → 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 (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 +20 -5
  33. package/readme.md +24 -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.0",
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,19 @@
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
+ "build": "npm run licenses:check && tsc && vite build",
34
46
  "prepack": "npm run build",
35
47
  "build:watch": "vite build --watch",
36
48
  "export": "node ./bin/cli.js export",
@@ -47,12 +59,15 @@
47
59
  "test:create": "node --test test/create_retiam_test.mjs",
48
60
  "test:shading": "npm run build && node --test test/shading_test.mjs test/shading_browser.test.mjs",
49
61
  "test:studio-layout": "node --test test/studio_layout.test.mjs",
62
+ "licenses:generate": "node tools/generate-third-party-notices.mjs",
63
+ "licenses:check": "node tools/generate-third-party-notices.mjs --check",
64
+ "test:licenses": "node --test test/third_party_notices_test.mjs",
50
65
  "unit-test": "ts-node-esm test/test.ts",
51
66
  "gen-context": "ts-node tools/context_gen/context_generator.ts ./src",
52
67
  "gen-index": "node ./tools/index_generator/generate-index.cjs"
53
68
  },
54
69
  "author": "Abhilas Biswas",
55
- "license": "ISC",
70
+ "license": "SEE LICENSE IN LICENSE",
56
71
  "devDependencies": {
57
72
  "@lightningjs/msdf-generator": "^1.1.1",
58
73
  "@types/earcut": "^3.0.0",
@@ -105,4 +120,4 @@
105
120
  "woff2-encoder": "^2.0.0",
106
121
  "ws": "^8.16.0"
107
122
  }
108
- }
123
+ }
package/readme.md CHANGED
@@ -4,6 +4,22 @@ 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](LICENSE). Commercial development, internal business use, paid client
9
+ 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](COMMERCIAL_LICENSE.md).
15
+
16
+ Your independently authored code and original outputs remain your own.
17
+ Earlier ISC permissions and third-party licenses remain unaffected. Keep the
18
+ [third-party notices](THIRD_PARTY_NOTICES.md) and
19
+ [license texts](THIRD_PARTY_LICENSES.txt) with redistributed Retiam code.
20
+ See [licensing and distribution](docs/LICENSING.md) for details, provenance
21
+ review limits, and notice-generation commands.
22
+
7
23
  ## Features
8
24
 
9
25
  - **Scene authoring:** compose entities, groups, layouts, cameras, and interaction with TypeScript.
@@ -78,12 +94,16 @@ npm install --save-dev typescript "vite@^6.1.1" @webgpu/types
78
94
 
79
95
  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
96
 
81
- For Vite applications, preserve Retiam's packaged module and asset URLs by excluding it from dependency prebundling in `vite.config.ts`:
97
+ For Vite applications, preserve Retiam's packaged asset URLs and include its
98
+ license and third-party notices in production output with `vite.config.ts`:
82
99
 
83
100
  ```typescript
84
101
  import { defineConfig } from "vite";
102
+ import { retiamNoticesPlugin } from "retiam/license-notices";
85
103
 
86
104
  export default defineConfig({
105
+ plugins: [retiamNoticesPlugin()],
106
+ esbuild: { legalComments: "inline" },
87
107
  optimizeDeps: { exclude: ["retiam"] },
88
108
  });
89
109
  ```
@@ -273,9 +293,12 @@ Save this as `vite.embed.config.ts`:
273
293
 
274
294
  ```typescript
275
295
  import { defineConfig } from 'vite';
296
+ import { retiamNoticesPlugin } from 'retiam/license-notices';
276
297
 
277
298
  export default defineConfig({
278
299
  base: './',
300
+ plugins: [retiamNoticesPlugin()],
301
+ esbuild: { legalComments: 'inline' },
279
302
  build: {
280
303
  target: 'es2022',
281
304
  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>;