chore(deps): upgrade @chenglou/pretext to 0.0.8

Update pretext height estimation to use layoutNextLineRange from the new release.
This commit is contained in:
Tommaso Casaburi
2026-07-22 12:37:03 +07:00
parent 715acb4c9a
commit 01e5bdf19a
3 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -15,7 +15,7 @@
"@capacitor/browser": "7.0.5",
"@capacitor/status-bar": "7.0.1",
"@capawesome/capacitor-android-edge-to-edge-support": "7.2.2",
"@chenglou/pretext": "0.0.5",
"@chenglou/pretext": "0.0.8",
"@floating-ui/react": "0.26.1",
"@pkcprotocol/pkc-js": "0.0.71",
"@react-spring/web": "10.0.3",
+2 -2
View File
@@ -1,5 +1,5 @@
import type { Comment } from '@bitsocial/bitsocial-react-hooks';
import { layout, layoutNextLine, prepare, prepareWithSegments } from '@chenglou/pretext';
import { layout, layoutNextLineRange, prepare, prepareWithSegments } from '@chenglou/pretext';
import { getCommentMediaInfo, getHasThumbnail } from './media-utils';
import { EXPANDED_MEDIA_DATA_ATTRIBUTE } from './measurement-attributes';
import { CATALOG_PREVIEW_MARKDOWN_OPTIONS, removeMarkdown, type RemoveMarkdownOptions } from './post-utils';
@@ -514,7 +514,7 @@ const measureParagraphWithFloatHeight = (text: string, font: string, width: numb
while (true) {
const currentLineWidth = currentHeight < safeFloatHeight ? Math.max(MIN_TEXT_WIDTH, safeWidth - safeFloatWidth) : safeWidth;
const line = layoutNextLine(preparedText, cursor, currentLineWidth);
const line = layoutNextLineRange(preparedText, cursor, currentLineWidth);
if (line === null) {
break;
}
+5 -5
View File
@@ -19,7 +19,7 @@ __metadata:
"@capacitor/core": "npm:7.4.5"
"@capacitor/status-bar": "npm:7.0.1"
"@capawesome/capacitor-android-edge-to-edge-support": "npm:7.2.2"
"@chenglou/pretext": "npm:0.0.5"
"@chenglou/pretext": "npm:0.0.8"
"@electron-forge/cli": "npm:7.8.0"
"@electron-forge/maker-dmg": "npm:7.8.0"
"@electron-forge/maker-squirrel": "npm:7.8.0"
@@ -1779,10 +1779,10 @@ __metadata:
languageName: node
linkType: hard
"@chenglou/pretext@npm:0.0.5":
version: 0.0.5
resolution: "@chenglou/pretext@npm:0.0.5"
checksum: 10c0/5139b39a166fbe7d1e0cf31c95f83125cc0658d8951b19dff3ac14b94d08c2bb53e954801c0325dac79c5b2b21157fa7763e0c561d46773baa37253f1a526242
"@chenglou/pretext@npm:0.0.8":
version: 0.0.8
resolution: "@chenglou/pretext@npm:0.0.8"
checksum: 10c0/530342538cd751c7868e8d038372533ee8c39bd13c2ae8726d008e633d6b165b96aebebab82c67df42ee2a15e776147e94fbc32db2e34dcd4f6212ff5fc21eae
languageName: node
linkType: hard