visual-song 1.0.7 → 1.0.9

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/dist/index.js CHANGED
@@ -2,13 +2,6 @@ import { jsx } from 'react/jsx-runtime';
2
2
  import { forwardRef, useState, useRef, useEffect, createContext, useContext, useCallback, useImperativeHandle } from 'react';
3
3
  import VSModule from './wasm_src/visualsong-core.js';
4
4
 
5
- const WASM_CDN_BASE_URL = "https://unpkg.com/visual-song@1.0.7/dist/wasm_src";
6
- const locateRuntimeFile = (path, scriptDirectory)=>{
7
- if (path === "visualsong-core.wasm" || path === "visualsong-core.js") {
8
- return `${WASM_CDN_BASE_URL}/${path}`;
9
- }
10
- return `${scriptDirectory}${path}`;
11
- };
12
5
  const _generateUID = ()=>{
13
6
  return Date.now().toString(36) + Math.random().toString(36).substring(2);
14
7
  };
@@ -54,9 +47,7 @@ function VisualSongProvider({ children }) {
54
47
  const VSEngineRef = useRef(null);
55
48
  useEffect(()=>{
56
49
  let mounted = true;
57
- VSModule({
58
- locateFile: locateRuntimeFile
59
- }).then((m)=>{
50
+ VSModule().then((m)=>{
60
51
  if (!mounted) return;
61
52
  VSEngineRef.current = m;
62
53
  setVSEngine(m);
Binary file
package/package.json CHANGED
@@ -1,12 +1,17 @@
1
1
  {
2
2
  "name": "visual-song",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "visual-song core library",
5
5
  "author": "kunyoungparkk (rjsdud3263@gmail.com)",
6
6
  "license": "MIT",
7
7
 
8
8
  "type": "module",
9
- "files": ["dist/"],
9
+ "files": [
10
+ "dist/index.js",
11
+ "dist/index.d.ts",
12
+ "dist/wasm_src/visualsong-core.js",
13
+ "dist/wasm_src/visualsong-core.d.ts"
14
+ ],
10
15
  "exports": {
11
16
  ".": {
12
17
  "import": "./dist/index.js",
Binary file