@supermousejs/zoetrope 2.0.1 → 2.0.2

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,5 +1,13 @@
1
1
  # @supermousejs/zoetrope
2
2
 
3
+ ## 2.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - ae219a0: Update READMEs with correct link to documentation
8
+ - Updated dependencies [ae219a0]
9
+ - @supermousejs/core@2.0.2
10
+
3
11
  ## 2.0.1
4
12
 
5
13
  ### Patch Changes
package/README.md CHANGED
@@ -1,5 +1,8 @@
1
-
2
1
  # @supermousejs/zoetrope
3
2
 
4
3
  Internal SVG path math library used by `@supermousejs/labs` (TextRing).
5
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).
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@supermousejs/zoetrope",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "main": "dist/index.umd.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
7
7
  "dependencies": {
8
- "@supermousejs/core": "2.0.1"
8
+ "@supermousejs/core": "2.0.2"
9
9
  },
10
10
  "devDependencies": {},
11
11
  "exports": {
package/src/index.ts CHANGED
@@ -1,37 +1,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
- `.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
+ `.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
+ }
package/tsconfig.json CHANGED
@@ -1,15 +1,15 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "include": [
4
- "src"
5
- ],
6
- "compilerOptions": {
7
- "outDir": "dist",
8
- "baseUrl": ".",
9
- "paths": {
10
- "@supermousejs/core": [
11
- "../core/src/index.ts"
12
- ]
13
- }
14
- }
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "include": [
4
+ "src"
5
+ ],
6
+ "compilerOptions": {
7
+ "outDir": "dist",
8
+ "baseUrl": ".",
9
+ "paths": {
10
+ "@supermousejs/core": [
11
+ "../core/src/index.ts"
12
+ ]
13
+ }
14
+ }
15
15
  }
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 })]
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
22
  });