polotno-node 2.9.6 → 2.9.8

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.html CHANGED
@@ -8,7 +8,7 @@
8
8
  }
9
9
  </style>
10
10
  <meta name="viewport" content="width=device-width, initial-scale=1" />
11
- <script type="module" crossorigin src="./assets/index-30-BPj2-.js"></script>
11
+ <script type="module" crossorigin src="./assets/index-DsJ35GHi.js"></script>
12
12
  </head>
13
13
  <body>
14
14
  <div id="root"></div>
package/instance.js CHANGED
@@ -104,6 +104,21 @@ module.exports.createInstance = async ({
104
104
  await page.evaluate((timeout) => {
105
105
  if (window.config && window.config.setAssetLoadTimeout) {
106
106
  window.config.setAssetLoadTimeout(timeout);
107
+ } else {
108
+ console.error(
109
+ 'setAssetLoadTimeout function is not defined in the client.'
110
+ );
111
+ }
112
+ }, args[1].assetLoadTimeout);
113
+ }
114
+ if (args[1]?.fontLoadTimeout) {
115
+ await page.evaluate((timeout) => {
116
+ if (window.config && window.config.setFontLoadTimeout) {
117
+ window.config.setFontLoadTimeout(timeout);
118
+ } else {
119
+ console.error(
120
+ 'setFontLoadTimeout function is not defined in the client.'
121
+ );
107
122
  }
108
123
  }, args[1].assetLoadTimeout);
109
124
  }
@@ -111,6 +126,10 @@ module.exports.createInstance = async ({
111
126
  await page.evaluate(() => {
112
127
  if (window.config && window.config.unstable_useHtmlTextRender) {
113
128
  window.config.unstable_useHtmlTextRender(true);
129
+ } else {
130
+ console.error(
131
+ 'unstable_useHtmlTextRender function is not defined in the client.'
132
+ );
114
133
  }
115
134
  });
116
135
  }
@@ -121,6 +140,10 @@ module.exports.createInstance = async ({
121
140
  window.config.unstable_setTextVerticalResizeEnabled
122
141
  ) {
123
142
  window.config.unstable_setTextVerticalResizeEnabled(true);
143
+ } else {
144
+ console.error(
145
+ 'unstable_setTextVerticalResizeEnabled function is not defined in the client.'
146
+ );
124
147
  }
125
148
  });
126
149
  }
@@ -128,6 +151,10 @@ module.exports.createInstance = async ({
128
151
  await page.evaluate((overflow) => {
129
152
  if (window.config && window.config.unstable_setTextOverflow) {
130
153
  window.config.unstable_setTextOverflow(overflow);
154
+ } else {
155
+ console.error(
156
+ 'unstable_setTextOverflow function is not defined in the client.'
157
+ );
131
158
  }
132
159
  }, args[1].textOverflow);
133
160
  }
@@ -136,6 +163,10 @@ module.exports.createInstance = async ({
136
163
  window.config.onLoadError((error) => {
137
164
  window._polotnoError = error;
138
165
  });
166
+ } else {
167
+ console.error(
168
+ 'onLoadError function is not defined in the client. Error handling will not work.'
169
+ );
139
170
  }
140
171
  });
141
172
  const result = await page.evaluate(func, ...args);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polotno-node",
3
- "version": "2.9.6",
3
+ "version": "2.9.8",
4
4
  "description": "Polotno workflow from NodeJS",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -26,7 +26,7 @@
26
26
  "gifencoder": "^2.0.1",
27
27
  "pixelmatch": "^5.3.0",
28
28
  "pngjs": "^7.0.0",
29
- "polotno": "^2.4.26",
29
+ "polotno": "^2.4.31",
30
30
  "react": "^18.2.0",
31
31
  "react-dom": "^18.2.0",
32
32
  "vite": "^5.2.9"
@@ -35,8 +35,8 @@
35
35
  "license": "MIT",
36
36
  "dependencies": {
37
37
  "@sparticuz/chromium": "123.0.1",
38
- "puppeteer": "22.6.5",
39
- "puppeteer-core": "22.6.5",
38
+ "puppeteer": "22.7.0",
39
+ "puppeteer-core": "22.7.0",
40
40
  "tmp": "^0.2.3"
41
41
  },
42
42
  "bugs": {