@promptbook/pdf 0.74.0-6 → 0.74.0-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/esm/index.es.js +7 -5
- package/esm/index.es.js.map +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +7 -5
- package/umd/index.umd.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/pdf",
|
|
3
|
-
"version": "0.74.0-
|
|
3
|
+
"version": "0.74.0-8",
|
|
4
4
|
"description": "Supercharge your use of large language models",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"module": "./esm/index.es.js",
|
|
54
54
|
"typings": "./esm/typings/src/_packages/pdf.index.d.ts",
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@promptbook/core": "0.74.0-
|
|
56
|
+
"@promptbook/core": "0.74.0-8"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"crypto-js": "4.2.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*
|
|
23
23
|
* @see https://github.com/webgptorg/promptbook
|
|
24
24
|
*/
|
|
25
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.74.0-
|
|
25
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.74.0-7';
|
|
26
26
|
/**
|
|
27
27
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
28
28
|
*/
|
|
@@ -4244,10 +4244,12 @@
|
|
|
4244
4244
|
* @public exported from `@promptbook/utils`
|
|
4245
4245
|
*/
|
|
4246
4246
|
function countPages(text) {
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4247
|
+
if (text === '') {
|
|
4248
|
+
return 0;
|
|
4249
|
+
}
|
|
4250
|
+
var pagesByLinesCount = Math.ceil(countLines(text) / 44);
|
|
4251
|
+
var pagesByCharactersCount = Math.ceil(countCharacters(text) / 2772);
|
|
4252
|
+
return Math.max(pagesByLinesCount, pagesByCharactersCount);
|
|
4251
4253
|
}
|
|
4252
4254
|
|
|
4253
4255
|
/**
|