@supermousejs/zoetrope 2.1.0 → 2.2.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.
package/CHANGELOG.md CHANGED
@@ -1,49 +1,68 @@
1
- # @supermousejs/zoetrope
2
-
3
- ## 2.1.0
4
-
5
- ### Minor Changes
6
-
7
- - 0a1652d: fixed build architecture and updated plugin metadata
8
-
9
- ## 2.0.4
10
-
11
- ### Patch Changes
12
-
13
- - 993dc67: Updated supemousejs packages with proper author, license and url descriptors to repo
14
- - Updated dependencies [993dc67]
15
- - @supermousejs/core@2.0.4
16
-
17
- ## 2.0.3
18
-
19
- ### Patch Changes
20
-
21
- - Updated dependencies
22
- - @supermousejs/core@2.0.3
23
-
24
- ## 2.0.2
25
-
26
- ### Patch Changes
27
-
28
- - ae219a0: Update READMEs with correct link to documentation
29
- - Updated dependencies [ae219a0]
30
- - @supermousejs/core@2.0.2
31
-
32
- ## 2.0.1
33
-
34
- ### Patch Changes
35
-
36
- - Add minimal README.md files to packages
37
- - Updated dependencies
38
- - @supermousejs/core@2.0.1
39
-
40
- ## 2.0.0
41
-
42
- ### Major Changes
43
-
44
- - Initial v2.0.0 release
45
-
46
- ### Patch Changes
47
-
48
- - Updated dependencies
49
- - @supermousejs/core@2.0.0
1
+ # @supermousejs/zoetrope
2
+
3
+ ## 2.2.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 6d70c18: remove legacy package and update supermouse domain in readme
8
+ - 14fb5b6: Updated tsconfig to be reference-compliant with core, utils and zoetrope when required
9
+ - Updated dependencies [6d70c18]
10
+ - Updated dependencies [2590af3]
11
+ - Updated dependencies [14fb5b6]
12
+ - @supermousejs/core@2.1.0
13
+
14
+ ## 2.1.1
15
+
16
+ ### Patch Changes
17
+
18
+ - 67f771b: Add relevant npm metadata to package.json file
19
+ - Updated dependencies [67f771b]
20
+ - @supermousejs/core@2.0.5
21
+
22
+ ## 2.1.0
23
+
24
+ ### Minor Changes
25
+
26
+ - 0a1652d: fixed build architecture and updated plugin metadata
27
+
28
+ ## 2.0.4
29
+
30
+ ### Patch Changes
31
+
32
+ - 993dc67: Updated supemousejs packages with proper author, license and url descriptors to repo
33
+ - Updated dependencies [993dc67]
34
+ - @supermousejs/core@2.0.4
35
+
36
+ ## 2.0.3
37
+
38
+ ### Patch Changes
39
+
40
+ - Updated dependencies
41
+ - @supermousejs/core@2.0.3
42
+
43
+ ## 2.0.2
44
+
45
+ ### Patch Changes
46
+
47
+ - ae219a0: Update READMEs with correct link to documentation
48
+ - Updated dependencies [ae219a0]
49
+ - @supermousejs/core@2.0.2
50
+
51
+ ## 2.0.1
52
+
53
+ ### Patch Changes
54
+
55
+ - Add minimal README.md files to packages
56
+ - Updated dependencies
57
+ - @supermousejs/core@2.0.1
58
+
59
+ ## 2.0.0
60
+
61
+ ### Major Changes
62
+
63
+ - Initial v2.0.0 release
64
+
65
+ ### Patch Changes
66
+
67
+ - Updated dependencies
68
+ - @supermousejs/core@2.0.0
package/LICENSE.md CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Sijibomi Olusunmbola
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Sijibomi Olusunmbola
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # @supermousejs/zoetrope
2
-
3
- Internal SVG path math library used by `@supermousejs/labs` (TextRing).
4
- Calculates circular paths and circumferences.
5
-
6
- ## Documentation
7
-
8
- Full documentation and interactive playground available at [supermouse](https://supermouse.vercel.app) or [check out the repo](https://github.com/Whitestar14/supermouse-js).
1
+ # @supermousejs/zoetrope
2
+
3
+ Internal SVG path math library used by `@supermousejs/labs` (TextRing).
4
+ Calculates circular paths and circumferences.
5
+
6
+ ## Documentation
7
+
8
+ Full documentation and interactive playground available at [supermouse](https://supermouse.js.org) or [check out the repo](https://github.com/Whitestar14/supermouse-js).
package/dist/index.d.ts CHANGED
@@ -1,24 +1,21 @@
1
- /**
2
- * Prepares text for a seamless loop by optionally appending a non-breaking space.
3
- * This prevents the last character from touching the first character when spread is active.
4
- *
5
- * @param text The source text
6
- * @param spread Whether auto-fit spreading is enabled
7
- */
8
- export declare function formatLoopText(text: string, spread: boolean): string;
9
-
10
- /**
11
- * Calculates the SVG Path data for a perfect circle starting at the top center (12 o'clock).
12
- *
13
- * Path moves to (0, -r), then draws two semi-circles.
14
- * @param r Radius in pixels
15
- */
16
- export declare function getCirclePath(r: number): string;
17
-
18
- /**
19
- * Calculates the circumference of a circle.
20
- * @param r Radius in pixels
21
- */
22
- export declare function getCircumference(r: number): number;
23
-
24
- export { }
1
+ /**
2
+ * Calculates the SVG Path data for a perfect circle starting at the top center (12 o'clock).
3
+ *
4
+ * Path moves to (0, -r), then draws two semi-circles.
5
+ * @param r Radius in pixels
6
+ */
7
+ export declare function getCirclePath(r: number): string;
8
+ /**
9
+ * Calculates the circumference of a circle.
10
+ * @param r Radius in pixels
11
+ */
12
+ export declare function getCircumference(r: number): number;
13
+ /**
14
+ * Prepares text for a seamless loop by optionally appending a non-breaking space.
15
+ * This prevents the last character from touching the first character when spread is active.
16
+ *
17
+ * @param text The source text
18
+ * @param spread Whether auto-fit spreading is enabled
19
+ */
20
+ export declare function formatLoopText(text: string, spread: boolean): string;
21
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAW/C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,MAAM,CAIpE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supermousejs/zoetrope",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "main": "dist/index.umd.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -8,8 +8,17 @@
8
8
  "url": "https://github.com/Whitestar14/supermouse-js",
9
9
  "license": "MIT",
10
10
  "devDependencies": {
11
- "@supermousejs/core": "2.0.4"
11
+ "@supermousejs/core": "2.1.0"
12
12
  },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/Whitestar14/supermouse-js.git",
16
+ "directory": "packages/core"
17
+ },
18
+ "bugs": {
19
+ "url": "https://github.com/Whitestar14/supermouse-js/issues"
20
+ },
21
+ "homepage": "https://github.com/Whitestar14/supermouse-js/tree/main/packages/zoetrope#readme",
13
22
  "exports": {
14
23
  ".": {
15
24
  "types": "./dist/index.d.ts",
@@ -21,7 +30,7 @@
21
30
  "access": "public"
22
31
  },
23
32
  "peerDependencies": {
24
- "@supermousejs/core": "2.0.4"
33
+ "@supermousejs/core": "2.1.0"
25
34
  },
26
35
  "scripts": {
27
36
  "build": "vite build"
package/src/index.ts CHANGED
@@ -1,37 +1,39 @@
1
- /**
2
- * Calculates the SVG Path data for a perfect circle starting at the top center (12 o'clock).
3
- *
4
- * Path moves to (0, -r), then draws two semi-circles.
5
- * @param r Radius in pixels
6
- */
7
- export function getCirclePath(r: number): string {
8
- // Fix floating point precision slightly to avoid rendering artifacts
9
- const rClean = Math.round(r * 100) / 100;
10
-
11
- return `
12
- M 0, -${rClean}
13
- A ${rClean},${rClean} 0 1,1 0,${rClean}
14
- A ${rClean},${rClean} 0 1,1 0,-${rClean}
15
- `.replace(/\s+/g, ' ').trim();
16
- }
17
-
18
- /**
19
- * Calculates the circumference of a circle.
20
- * @param r Radius in pixels
21
- */
22
- export function getCircumference(r: number): number {
23
- return 2 * Math.PI * r;
24
- }
25
-
26
- /**
27
- * Prepares text for a seamless loop by optionally appending a non-breaking space.
28
- * This prevents the last character from touching the first character when spread is active.
29
- *
30
- * @param text The source text
31
- * @param spread Whether auto-fit spreading is enabled
32
- */
33
- export function formatLoopText(text: string, spread: boolean): string {
34
- if (!spread) return text;
35
- // \u00A0 is  
36
- return text + '\u00A0';
37
- }
1
+ /**
2
+ * Calculates the SVG Path data for a perfect circle starting at the top center (12 o'clock).
3
+ *
4
+ * Path moves to (0, -r), then draws two semi-circles.
5
+ * @param r Radius in pixels
6
+ */
7
+ export function getCirclePath(r: number): string {
8
+ // Fix floating point precision slightly to avoid rendering artifacts
9
+ const rClean = Math.round(r * 100) / 100;
10
+
11
+ return `
12
+ M 0, -${rClean}
13
+ A ${rClean},${rClean} 0 1,1 0,${rClean}
14
+ A ${rClean},${rClean} 0 1,1 0,-${rClean}
15
+ `
16
+ .replace(/\s+/g, " ")
17
+ .trim();
18
+ }
19
+
20
+ /**
21
+ * Calculates the circumference of a circle.
22
+ * @param r Radius in pixels
23
+ */
24
+ export function getCircumference(r: number): number {
25
+ return 2 * Math.PI * r;
26
+ }
27
+
28
+ /**
29
+ * Prepares text for a seamless loop by optionally appending a non-breaking space.
30
+ * This prevents the last character from touching the first character when spread is active.
31
+ *
32
+ * @param text The source text
33
+ * @param spread Whether auto-fit spreading is enabled
34
+ */
35
+ export function formatLoopText(text: string, spread: boolean): string {
36
+ if (!spread) return text;
37
+ // \u00A0 is  
38
+ return text + "\u00A0";
39
+ }
package/tsconfig.json CHANGED
@@ -1,15 +1,11 @@
1
1
  {
2
- "extends": "../../tsconfig.base.json",
3
- "include": [
4
- "src"
5
- ],
2
+ "extends": "../../tsconfig.composite-lib.json",
6
3
  "compilerOptions": {
7
- "outDir": "dist",
8
- "baseUrl": ".",
9
- "paths": {
10
- "@supermousejs/core": [
11
- "../core/src/index.ts"
12
- ]
13
- }
14
- }
15
- }
4
+ "rootDir": "src",
5
+ "outDir": "dist"
6
+ },
7
+ "include": ["src"],
8
+ "references": [
9
+ { "path": "../core" }
10
+ ]
11
+ }
package/vite.config.ts CHANGED
@@ -1,22 +1,22 @@
1
- import { defineConfig } from 'vite';
2
- import dts from 'vite-plugin-dts';
3
- import path from 'path';
4
-
5
- export default defineConfig({
6
- build: {
7
- lib: {
8
- entry: path.resolve(__dirname, 'src/index.ts'),
9
- name: 'SupermouseZoetrope',
10
- fileName: (format) => format === 'es' ? 'index.mjs' : 'index.umd.js',
11
- },
12
- rollupOptions: {
13
- external: ['@supermousejs/core'],
14
- output: {
15
- globals: {
16
- '@supermousejs/core': 'SupermouseCore'
17
- }
18
- }
19
- }
20
- },
21
- plugins: [dts({ rollupTypes: true })]
22
- });
1
+ import { defineConfig } from "vite";
2
+ import dts from "vite-plugin-dts";
3
+ import path from "path";
4
+
5
+ export default defineConfig({
6
+ build: {
7
+ lib: {
8
+ entry: path.resolve(__dirname, "src/index.ts"),
9
+ name: "SupermouseZoetrope",
10
+ fileName: (format) => (format === "es" ? "index.mjs" : "index.umd.js")
11
+ },
12
+ rollupOptions: {
13
+ external: ["@supermousejs/core"],
14
+ output: {
15
+ globals: {
16
+ "@supermousejs/core": "SupermouseCore"
17
+ }
18
+ }
19
+ }
20
+ },
21
+ plugins: [dts({ rollupTypes: false })]
22
+ });