@azure/communication-react 1.24.0-alpha-202502120016 → 1.24.0-alpha-202502130016
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/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BZs8iE3u.js → ChatMessageComponentAsRichTextEditBox-3FncQcWU.js} +2 -2
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BZs8iE3u.js.map → ChatMessageComponentAsRichTextEditBox-3FncQcWU.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-CRirTV7b.js → RichTextSendBoxWrapper-CoSiTjhn.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-CRirTV7b.js.map → RichTextSendBoxWrapper-CoSiTjhn.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-zKk0Z_yG.js → index-B0uj_dTf.js} +7 -7
- package/dist/dist-cjs/communication-react/{index-zKk0Z_yG.js.map → index-B0uj_dTf.js.map} +1 -1
- package/dist/dist-cjs/communication-react/index.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SvgWithWordWrapping.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SvgWithWordWrapping.js.map +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.24.0-alpha-
|
1
|
+
{"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.24.0-alpha-202502130016';\n"]}
|
@@ -22,7 +22,7 @@ export const SvgWithWordWrapping = (props) => {
|
|
22
22
|
setHeight(numLines * lineHeightPx);
|
23
23
|
}
|
24
24
|
}, [width, lineHeightPx, text]);
|
25
|
-
return (React.createElement("svg", { role: role, width: width, height: height + bufferHeightPx, ref: svgRef, xmlns: "http://www.w3.org/2000/svg" },
|
25
|
+
return (React.createElement("svg", { "aria-level": 1, role: role, width: width, height: height + bufferHeightPx, ref: svgRef, xmlns: "http://www.w3.org/2000/svg" },
|
26
26
|
React.createElement("text", { height: 0, ref: calculationTextElement, style: { visibility: 'hidden' } }, text),
|
27
27
|
React.createElement("text", { ref: visibleTextElement, x: "0", y: bufferHeightPx / 4, role: "heading", "aria-level": 1 })));
|
28
28
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SvgWithWordWrapping.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/SvgWithWordWrapping.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjE;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAMnC,EAAe,EAAE;IAChB,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAClE,MAAM,MAAM,GAAG,MAAM,CAAgB,IAAI,CAAC,CAAC;IAC3C,MAAM,sBAAsB,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC5D,MAAM,kBAAkB,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC,CAAC;IAEhD,0GAA0G;IAC1G,oHAAoH;IACpH,wGAAwG;IACxG,8GAA8G;IAC9G,oBAAoB;IACpB,eAAe,CAAC,GAAG,EAAE;QACnB,IAAI,IAAI,IAAI,sBAAsB,CAAC,OAAO,IAAI,kBAAkB,CAAC,OAAO,EAAE,CAAC;YACzE,MAAM,QAAQ,GAAG,wBAAwB,CACvC,sBAAsB,CAAC,OAAO,EAC9B,kBAAkB,CAAC,OAAO,EAC1B,KAAK,EACL,YAAY,CACb,CAAC;YACF,SAAS,CAAC,QAAQ,GAAG,YAAY,CAAC,CAAC;QACrC,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC;IAEhC,OAAO,CACL,
|
1
|
+
{"version":3,"file":"SvgWithWordWrapping.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/SvgWithWordWrapping.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjE;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAMnC,EAAe,EAAE;IAChB,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAClE,MAAM,MAAM,GAAG,MAAM,CAAgB,IAAI,CAAC,CAAC;IAC3C,MAAM,sBAAsB,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC5D,MAAM,kBAAkB,GAAG,MAAM,CAAiB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oB,EAAmB,EAAE;IACjF,MAAM,KAAK,GAAG,QAAQ,CAAC,eAAe,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;IAC9E,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;IACzB,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC/B,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,YAAY,IAAI,CAAC,CAAC;IAC9C,KAAK,CAAC,YAAY,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;IAC5C,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { _pxToRem } from '@internal/acs-ui-common';\nimport React, { useLayoutEffect, useRef, useState } from 'react';\n\n/**\n * An SVG element component that wraps inner text to fit the width of the SVG.\n * @private\n */\nexport const SvgWithWordWrapping = (props: {\n width: number;\n text: string;\n lineHeightPx: number;\n bufferHeightPx: number;\n role?: string;\n}): JSX.Element => {\n const { width, text, lineHeightPx, bufferHeightPx, role } = props;\n const svgRef = useRef<SVGSVGElement>(null);\n const calculationTextElement = useRef<SVGTextElement>(null);\n const visibleTextElement = useRef<SVGTextElement>(null);\n const [height, setHeight] = useState<number>(0);\n\n // useLayoutEffect ensures that the calculationTextElement is rendered before being used for calculations.\n // Using useLayoutEffect over useEffect ensures we do not get a layout shift when the visibleTextElement is rendered\n // and the height is updated. This is because useLayoutEffect runs synchronously after DOM mutations but\n // before the browser has a chance to paint. See https://reactjs.org/docs/hooks-reference.html#uselayouteffect\n // for more details.\n useLayoutEffect(() => {\n if (text && calculationTextElement.current && visibleTextElement.current) {\n const numLines = convertTextToWrappedText(\n calculationTextElement.current,\n visibleTextElement.current,\n width,\n lineHeightPx\n );\n setHeight(numLines * lineHeightPx);\n }\n }, [width, lineHeightPx, text]);\n\n return (\n <svg\n aria-level={1}\n role={role}\n width={width}\n height={height + bufferHeightPx}\n ref={svgRef}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <text height={0} ref={calculationTextElement} style={{ visibility: 'hidden' }}>\n {text}\n </text>\n <text ref={visibleTextElement} x=\"0\" y={bufferHeightPx / 4} role=\"heading\" aria-level={1} />\n </svg>\n );\n};\n\n/**\n * Wrap text in tspan elements to fit the width of the SVG\n * @param baseTextElement The text element to create the wrapped text from.\n * @param outputTextElement The text element to insert the wrapped text into.\n * @param maxWidth The maximum width of the text element.\n * @param lineHeightPx The height of each line in pixels.\n * @returns The number of lines of text.\n */\nconst convertTextToWrappedText = (\n inputTextElement: SVGTextElement,\n outputTextElement: SVGTextElement,\n maxWidth: number,\n lineHeightPx: number\n): number => {\n const words = inputTextElement.textContent?.split(' ') ?? [];\n if (words.length === 0 || words[0] === '') {\n throw new Error('Text element must contain text');\n }\n\n // The current line being built.\n let line = '';\n\n // Running total of the number of lines.\n let numLines = 0;\n\n // First, clear the output text element.\n outputTextElement.textContent = '';\n\n // Iterate through each word and create a tspan element for each line.\n for (let i = 0; i < words.length; i++) {\n const testLine = line + words[i] + ' ';\n const testWidth = inputTextElement.getSubStringLength(0, testLine.length);\n\n if (testWidth > maxWidth && i > 0) {\n const newLine = constructTSpanLine(line, lineHeightPx);\n outputTextElement.appendChild(newLine);\n line = words[i] + ' ';\n numLines++;\n } else {\n line = testLine;\n }\n }\n\n // Add the last line.\n const newLine = constructTSpanLine(line, lineHeightPx);\n outputTextElement.appendChild(newLine);\n numLines++;\n\n // Return the number of lines to calculate the height of the SVG.\n return numLines;\n};\n\n/**\n * Create a tspan element for a line of text, with text set to be centered.\n * @param line The line of text.\n * @param lineHeightPx The height of each line in pixels.\n * @returns The tspan element.\n */\nconst constructTSpanLine = (line: string, lineHeightPx: number): SVGTSpanElement => {\n const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.textContent = line;\n tspan.setAttribute('x', '50%');\n tspan.setAttribute('dy', `${lineHeightPx}px`);\n tspan.setAttribute('text-anchor', 'middle');\n return tspan;\n};\n"]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@azure/communication-react",
|
3
|
-
"version": "1.24.0-alpha-
|
3
|
+
"version": "1.24.0-alpha-202502130016",
|
4
4
|
"sideEffects": false,
|
5
5
|
"description": "React library for building modern communication user experiences utilizing Azure Communication Services",
|
6
6
|
"keywords": [
|