@elliemae/ds-read-more 3.53.0-alpha.1 → 3.53.0-beta.10
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/cjs/useReadMoreTruncate.js +12 -9
- package/dist/cjs/useReadMoreTruncate.js.map +2 -2
- package/dist/esm/useReadMoreTruncate.js +12 -9
- package/dist/esm/useReadMoreTruncate.js.map +2 -2
- package/dist/types/styled.d.ts +1 -2
- package/dist/types/useOnElementResize.d.ts +1 -1
- package/dist/types/useReadMoreTruncate.d.ts +1 -1
- package/package.json +8 -7
|
@@ -36,19 +36,20 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
36
36
|
var import_react = require("react");
|
|
37
37
|
var import_useOnElementResize = require("./useOnElementResize.js");
|
|
38
38
|
var import_styled = require("./styled.js");
|
|
39
|
-
const overflows = ({ offsetHeight, scrollHeight }) => offsetHeight +
|
|
39
|
+
const overflows = ({ offsetHeight, scrollHeight }) => offsetHeight + 4 < scrollHeight;
|
|
40
40
|
const binSearchTextOverflow = (element, parent, content) => {
|
|
41
|
-
|
|
42
|
-
let
|
|
43
|
-
let right = text.length;
|
|
41
|
+
let left = 0;
|
|
42
|
+
let right = content.length;
|
|
44
43
|
let textEnd = 0;
|
|
44
|
+
element.innerText = content;
|
|
45
45
|
while (left <= right) {
|
|
46
|
-
const middle = (left + right) / 2;
|
|
46
|
+
const middle = Math.floor((left + right) / 2);
|
|
47
47
|
element.innerText = content.slice(0, middle);
|
|
48
|
-
if (overflows(parent))
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
if (overflows(parent)) {
|
|
49
|
+
right = middle - 1;
|
|
50
|
+
} else {
|
|
51
51
|
textEnd = middle;
|
|
52
|
+
left = middle + 1;
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
element.innerText = content.slice(0, textEnd);
|
|
@@ -81,7 +82,9 @@ const useReadMoreTruncate = ({ lines, content }) => {
|
|
|
81
82
|
const isOverflowing = overflows(parentElement);
|
|
82
83
|
setShowButton(expanded || isOverflowing);
|
|
83
84
|
if (!expanded && isOverflowing) {
|
|
84
|
-
|
|
85
|
+
setTimeout(() => {
|
|
86
|
+
binSearchTextOverflow(textElement, parentElement, content);
|
|
87
|
+
}, 0);
|
|
85
88
|
}
|
|
86
89
|
}
|
|
87
90
|
}, [lines, content, expanded, width, height]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useReadMoreTruncate.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { useOnElementResize } from './useOnElementResize.js';\nimport type { DSReadMoreT } from './react-desc-prop-types.js';\nimport { ScreenReaderOnly } from './styled.js';\n\n// offsetHeight +
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React, { useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { useOnElementResize } from './useOnElementResize.js';\nimport type { DSReadMoreT } from './react-desc-prop-types.js';\nimport { ScreenReaderOnly } from './styled.js';\n\n// offsetHeight + margin helps account for subpixel differences and the button size\nconst overflows = ({ offsetHeight, scrollHeight }: { offsetHeight: number; scrollHeight: number }) =>\n offsetHeight + 4 < scrollHeight;\n\nconst binSearchTextOverflow = (element: HTMLElement, parent: HTMLElement, content: string) => {\n let left = 0;\n let right = content.length;\n let textEnd = 0;\n\n // Reset text to full before starting\n element.innerText = content;\n\n while (left <= right) {\n const middle = Math.floor((left + right) / 2);\n element.innerText = content.slice(0, middle);\n\n if (overflows(parent)) {\n right = middle - 1;\n } else {\n textEnd = middle;\n left = middle + 1;\n }\n }\n\n element.innerText = content.slice(0, textEnd);\n};\n\nexport const useReadMoreTruncate = ({ lines, content }: Pick<DSReadMoreT.InternalProps, 'lines' | 'content'>) => {\n const textWrapperRef = useRef<HTMLSpanElement>(null);\n const textRef = useRef<HTMLSpanElement>(null);\n\n const [expanded, setExpanded] = useState(false);\n\n const [showButton, setShowButton] = useState(false);\n\n // We need to re-run the effect when the size of the container changes\n const { width, height } = useOnElementResize(textWrapperRef);\n\n useLayoutEffect(() => {\n const textElement = textRef.current;\n const parentElement = textWrapperRef.current;\n if (parentElement && textElement) {\n textElement.innerText = content;\n /**\n * PUI-16110 - [ReadMore] Autotriggered-Visually broken in safari + Sequoia\n * -----------------------------------\n * In Safari 17.4+ (macOS Sequoia), using `scrollHeight` or `offsetHeight` with line-clamp\n * can break the layout and, potentially, trigger infinite loops through ResizeObserver.\n *\n * Instead of relying on overflow-based measurements, we calculate the actual pixel width\n * of the text using a canvas and compare it with the visible width of the wrapper.\n *\n * This method is layout-safe, does not force reflow, and works reliably across browsers.\n */\n if (lines === 1) {\n const computed = getComputedStyle(textElement);\n const font = `${computed.fontWeight} ${computed.fontSize} ${computed.fontFamily}`;\n const canvas = document.createElement('canvas');\n const ctx = canvas.getContext('2d');\n let isTruncated = false;\n if (ctx) {\n ctx.font = font;\n const measuredWidth = ctx.measureText(content).width;\n isTruncated = measuredWidth > parentElement.clientWidth;\n }\n setShowButton(expanded || isTruncated);\n return;\n }\n\n const isOverflowing = overflows(parentElement);\n setShowButton(expanded || isOverflowing);\n if (!expanded && isOverflowing) {\n // we have a strange edge case where when removing the browser cache the text is not\n // truncated correctly, so we need to wait for the next frame\n // to make sure the text is truncated correctly\n // my supposition is that the text is not rendered yet becuase of the font loading\n setTimeout(() => {\n binSearchTextOverflow(textElement, parentElement, content);\n }, 0);\n }\n }\n }, [lines, content, expanded, width, height]);\n\n const srOnlyText = useMemo(() => <ScreenReaderOnly>{content}</ScreenReaderOnly>, [content]);\n\n const textProps = useMemo(\n () => ({\n 'aria-hidden': true,\n }),\n [],\n );\n\n return {\n textWrapperRef,\n textRef,\n showButton,\n expanded,\n setExpanded,\n textProps,\n srOnly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QAAQ;AAC9C,cAAM,MAAM,OAAO,WAAW,IAAI;AAClC,YAAI,cAAc;AAClB,YAAI,KAAK;AACP,cAAI,OAAO;AACX,gBAAM,gBAAgB,IAAI,YAAY,OAAO,EAAE;AAC/C,wBAAc,gBAAgB,cAAc;AAAA,QAC9C;AACA,sBAAc,YAAY,WAAW;AACrC;AAAA,MACF;AAEA,YAAM,gBAAgB,UAAU,aAAa;AAC7C,oBAAc,YAAY,aAAa;AACvC,UAAI,CAAC,YAAY,eAAe;AAK9B,mBAAW,MAAM;AACf,gCAAsB,aAAa,eAAe,OAAO;AAAA,QAC3D,GAAG,CAAC;AAAA,MACN;AAAA,IACF;AAAA,EACF,GAAG,CAAC,OAAO,SAAS,UAAU,OAAO,MAAM,CAAC;AAE5C,QAAM,iBAAa,sBAAQ,MAAM,4CAAC,kCAAkB,mBAAQ,GAAqB,CAAC,OAAO,CAAC;AAE1F,QAAM,gBAAY;AAAA,IAChB,OAAO;AAAA,MACL,eAAe;AAAA,IACjB;AAAA,IACA,CAAC;AAAA,EACH;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -3,19 +3,20 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { useOnElementResize } from "./useOnElementResize.js";
|
|
5
5
|
import { ScreenReaderOnly } from "./styled.js";
|
|
6
|
-
const overflows = ({ offsetHeight, scrollHeight }) => offsetHeight +
|
|
6
|
+
const overflows = ({ offsetHeight, scrollHeight }) => offsetHeight + 4 < scrollHeight;
|
|
7
7
|
const binSearchTextOverflow = (element, parent, content) => {
|
|
8
|
-
|
|
9
|
-
let
|
|
10
|
-
let right = text.length;
|
|
8
|
+
let left = 0;
|
|
9
|
+
let right = content.length;
|
|
11
10
|
let textEnd = 0;
|
|
11
|
+
element.innerText = content;
|
|
12
12
|
while (left <= right) {
|
|
13
|
-
const middle = (left + right) / 2;
|
|
13
|
+
const middle = Math.floor((left + right) / 2);
|
|
14
14
|
element.innerText = content.slice(0, middle);
|
|
15
|
-
if (overflows(parent))
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
if (overflows(parent)) {
|
|
16
|
+
right = middle - 1;
|
|
17
|
+
} else {
|
|
18
18
|
textEnd = middle;
|
|
19
|
+
left = middle + 1;
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
element.innerText = content.slice(0, textEnd);
|
|
@@ -48,7 +49,9 @@ const useReadMoreTruncate = ({ lines, content }) => {
|
|
|
48
49
|
const isOverflowing = overflows(parentElement);
|
|
49
50
|
setShowButton(expanded || isOverflowing);
|
|
50
51
|
if (!expanded && isOverflowing) {
|
|
51
|
-
|
|
52
|
+
setTimeout(() => {
|
|
53
|
+
binSearchTextOverflow(textElement, parentElement, content);
|
|
54
|
+
}, 0);
|
|
52
55
|
}
|
|
53
56
|
}
|
|
54
57
|
}, [lines, content, expanded, width, height]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/useReadMoreTruncate.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { useOnElementResize } from './useOnElementResize.js';\nimport type { DSReadMoreT } from './react-desc-prop-types.js';\nimport { ScreenReaderOnly } from './styled.js';\n\n// offsetHeight +
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { useOnElementResize } from './useOnElementResize.js';\nimport type { DSReadMoreT } from './react-desc-prop-types.js';\nimport { ScreenReaderOnly } from './styled.js';\n\n// offsetHeight + margin helps account for subpixel differences and the button size\nconst overflows = ({ offsetHeight, scrollHeight }: { offsetHeight: number; scrollHeight: number }) =>\n offsetHeight + 4 < scrollHeight;\n\nconst binSearchTextOverflow = (element: HTMLElement, parent: HTMLElement, content: string) => {\n let left = 0;\n let right = content.length;\n let textEnd = 0;\n\n // Reset text to full before starting\n element.innerText = content;\n\n while (left <= right) {\n const middle = Math.floor((left + right) / 2);\n element.innerText = content.slice(0, middle);\n\n if (overflows(parent)) {\n right = middle - 1;\n } else {\n textEnd = middle;\n left = middle + 1;\n }\n }\n\n element.innerText = content.slice(0, textEnd);\n};\n\nexport const useReadMoreTruncate = ({ lines, content }: Pick<DSReadMoreT.InternalProps, 'lines' | 'content'>) => {\n const textWrapperRef = useRef<HTMLSpanElement>(null);\n const textRef = useRef<HTMLSpanElement>(null);\n\n const [expanded, setExpanded] = useState(false);\n\n const [showButton, setShowButton] = useState(false);\n\n // We need to re-run the effect when the size of the container changes\n const { width, height } = useOnElementResize(textWrapperRef);\n\n useLayoutEffect(() => {\n const textElement = textRef.current;\n const parentElement = textWrapperRef.current;\n if (parentElement && textElement) {\n textElement.innerText = content;\n /**\n * PUI-16110 - [ReadMore] Autotriggered-Visually broken in safari + Sequoia\n * -----------------------------------\n * In Safari 17.4+ (macOS Sequoia), using `scrollHeight` or `offsetHeight` with line-clamp\n * can break the layout and, potentially, trigger infinite loops through ResizeObserver.\n *\n * Instead of relying on overflow-based measurements, we calculate the actual pixel width\n * of the text using a canvas and compare it with the visible width of the wrapper.\n *\n * This method is layout-safe, does not force reflow, and works reliably across browsers.\n */\n if (lines === 1) {\n const computed = getComputedStyle(textElement);\n const font = `${computed.fontWeight} ${computed.fontSize} ${computed.fontFamily}`;\n const canvas = document.createElement('canvas');\n const ctx = canvas.getContext('2d');\n let isTruncated = false;\n if (ctx) {\n ctx.font = font;\n const measuredWidth = ctx.measureText(content).width;\n isTruncated = measuredWidth > parentElement.clientWidth;\n }\n setShowButton(expanded || isTruncated);\n return;\n }\n\n const isOverflowing = overflows(parentElement);\n setShowButton(expanded || isOverflowing);\n if (!expanded && isOverflowing) {\n // we have a strange edge case where when removing the browser cache the text is not\n // truncated correctly, so we need to wait for the next frame\n // to make sure the text is truncated correctly\n // my supposition is that the text is not rendered yet becuase of the font loading\n setTimeout(() => {\n binSearchTextOverflow(textElement, parentElement, content);\n }, 0);\n }\n }\n }, [lines, content, expanded, width, height]);\n\n const srOnlyText = useMemo(() => <ScreenReaderOnly>{content}</ScreenReaderOnly>, [content]);\n\n const textProps = useMemo(\n () => ({\n 'aria-hidden': true,\n }),\n [],\n );\n\n return {\n textWrapperRef,\n textRef,\n showButton,\n expanded,\n setExpanded,\n textProps,\n srOnlyText,\n };\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACwFY;AAxFnC,SAAgB,iBAAiB,SAAS,QAAQ,gBAAgB;AAClE,SAAS,0BAA0B;AAEnC,SAAS,wBAAwB;AAGjC,MAAM,YAAY,CAAC,EAAE,cAAc,aAAa,MAC9C,eAAe,IAAI;AAErB,MAAM,wBAAwB,CAAC,SAAsB,QAAqB,YAAoB;AAC5F,MAAI,OAAO;AACX,MAAI,QAAQ,QAAQ;AACpB,MAAI,UAAU;AAGd,UAAQ,YAAY;AAEpB,SAAO,QAAQ,OAAO;AACpB,UAAM,SAAS,KAAK,OAAO,OAAO,SAAS,CAAC;AAC5C,YAAQ,YAAY,QAAQ,MAAM,GAAG,MAAM;AAE3C,QAAI,UAAU,MAAM,GAAG;AACrB,cAAQ,SAAS;AAAA,IACnB,OAAO;AACL,gBAAU;AACV,aAAO,SAAS;AAAA,IAClB;AAAA,EACF;AAEA,UAAQ,YAAY,QAAQ,MAAM,GAAG,OAAO;AAC9C;AAEO,MAAM,sBAAsB,CAAC,EAAE,OAAO,QAAQ,MAA4D;AAC/G,QAAM,iBAAiB,OAAwB,IAAI;AACnD,QAAM,UAAU,OAAwB,IAAI;AAE5C,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK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-
/// <reference types="react" />
|
|
2
1
|
export declare const StyledTextWrapper: import("styled-components").StyledComponent<"span", import("@elliemae/ds-system").Theme, {
|
|
3
2
|
lines: number;
|
|
4
3
|
expanded: boolean;
|
|
@@ -10,6 +9,6 @@ export declare const StyledTextContent: import("styled-components").StyledCompon
|
|
|
10
9
|
export declare const StyledTooltipWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
11
10
|
export declare const StyledButtonWrapper: import("styled-components").StyledComponent<"span", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"span">, never>;
|
|
12
11
|
export declare const StyledButton: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-button-v2").DSButtonV2T.Props>, import("@elliemae/ds-system").Theme, {
|
|
13
|
-
withTooltip?: boolean
|
|
12
|
+
withTooltip?: boolean;
|
|
14
13
|
} & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ComponentType<import("@elliemae/ds-button-v2").DSButtonV2T.Props>>, never>;
|
|
15
14
|
export declare const ScreenReaderOnly: import("styled-components").StyledComponent<"span", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"span">, never>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
export declare const useOnElementResize: <T extends HTMLElement>(targetRef: React.RefObject<T>) => Record<
|
|
2
|
+
export declare const useOnElementResize: <T extends HTMLElement>(targetRef: React.RefObject<T>) => Record<"width" | "height", number>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { DSReadMoreT } from './react-desc-prop-types.js';
|
|
3
|
-
export declare const useReadMoreTruncate: ({ lines, content }: Pick<DSReadMoreT.InternalProps,
|
|
3
|
+
export declare const useReadMoreTruncate: ({ lines, content }: Pick<DSReadMoreT.InternalProps, "lines" | "content">) => {
|
|
4
4
|
textWrapperRef: React.RefObject<HTMLSpanElement>;
|
|
5
5
|
textRef: React.RefObject<HTMLSpanElement>;
|
|
6
6
|
showButton: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-read-more",
|
|
3
|
-
"version": "3.53.0-
|
|
3
|
+
"version": "3.53.0-beta.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Read More",
|
|
6
6
|
"files": [
|
|
@@ -36,16 +36,17 @@
|
|
|
36
36
|
"indent": 4
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@elliemae/ds-
|
|
40
|
-
"@elliemae/ds-
|
|
41
|
-
"@elliemae/ds-system": "3.53.0-
|
|
42
|
-
"@elliemae/ds-tooltip-v3": "3.53.0-
|
|
39
|
+
"@elliemae/ds-props-helpers": "3.53.0-beta.10",
|
|
40
|
+
"@elliemae/ds-button-v2": "3.53.0-beta.10",
|
|
41
|
+
"@elliemae/ds-system": "3.53.0-beta.10",
|
|
42
|
+
"@elliemae/ds-tooltip-v3": "3.53.0-beta.10"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@elliemae/pui-cli": "9.0.0-next.
|
|
45
|
+
"@elliemae/pui-cli": "9.0.0-next.65",
|
|
46
46
|
"jest": "~29.7.0",
|
|
47
47
|
"styled-components": "~5.3.9",
|
|
48
|
-
"@elliemae/ds-monorepo-devops": "3.53.0-
|
|
48
|
+
"@elliemae/ds-monorepo-devops": "3.53.0-beta.10",
|
|
49
|
+
"@elliemae/ds-test-utils": "3.53.0-beta.10"
|
|
49
50
|
},
|
|
50
51
|
"peerDependencies": {
|
|
51
52
|
"lodash-es": "^4.17.21",
|