captions.js 0.5.1 → 0.6.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.
package/dist/index.js CHANGED
@@ -887,11 +887,8 @@ async function loadGoogleFont2(fontFamily) {
887
887
  } catch (err) {
888
888
  console.warn(`[loadGoogleFont] failed to load font "${fontFamily}":`, err);
889
889
  }
890
- await new Promise((resolve) => setTimeout(resolve, 100));
890
+ await new Promise((resolve) => setTimeout(resolve, 1e3));
891
891
  import_konva.default.stages?.forEach((stage) => stage.batchDraw());
892
- console.log(
893
- `[loadGoogleFont] Font "${fontFamily}" loaded and ready for Konva.`
894
- );
895
892
  }
896
893
 
897
894
  // src/render/renderString.ts
package/dist/index.mjs CHANGED
@@ -843,11 +843,8 @@ async function loadGoogleFont2(fontFamily) {
843
843
  } catch (err) {
844
844
  console.warn(`[loadGoogleFont] failed to load font "${fontFamily}":`, err);
845
845
  }
846
- await new Promise((resolve) => setTimeout(resolve, 100));
846
+ await new Promise((resolve) => setTimeout(resolve, 1e3));
847
847
  Konva.stages?.forEach((stage) => stage.batchDraw());
848
- console.log(
849
- `[loadGoogleFont] Font "${fontFamily}" loaded and ready for Konva.`
850
- );
851
848
  }
852
849
 
853
850
  // src/render/renderString.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "captions.js",
3
- "version": "0.5.1",
3
+ "version": "0.6.1",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -30,12 +30,6 @@
30
30
  "require": "./dist/index.js"
31
31
  }
32
32
  },
33
- "scripts": {
34
- "build": "tsup src/index.ts --format esm,cjs --dts",
35
- "dev": "tsup src/index.ts --format esm,cjs --dts --watch",
36
- "prepublishOnly": "cp ../../README.md ./README.md && pnpm run build",
37
- "postpublish": "rm -f README.md"
38
- },
39
33
  "devDependencies": {
40
34
  "@types/object-hash": "^3.0.6",
41
35
  "tsup": "^8.0.0",
@@ -44,5 +38,9 @@
44
38
  "dependencies": {
45
39
  "konva": "^10.0.2",
46
40
  "object-hash": "^3.0.0"
41
+ },
42
+ "scripts": {
43
+ "build": "tsup src/index.ts --format esm,cjs --dts",
44
+ "dev": "tsup src/index.ts --format esm,cjs --dts --watch"
47
45
  }
48
- }
46
+ }