@meonode/canvas 1.1.0 → 1.3.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"text.canvas.util.js","sources":["../../../../src/canvas/text.canvas.util.ts"],"sourcesContent":["// TODO: Add comprehensive unit tests for this file.\n\nimport type { TextProps, TextSegment } from '@/canvas/canvas.type.js'\nimport { Canvas, type CanvasRenderingContext2D, type FontVariantSetting } from 'skia-canvas'\nimport { BoxNode } from '@/canvas/layout.canvas.util.js'\nimport { Style, MeasureMode } from '@/constant/common.const.js'\n\n/**\n * Node for rendering text content with rich text styling support\n * Supports color and weight variations through HTML-like tags\n */\nexport class TextNode extends BoxNode {\n private readonly segments: TextSegment[] = []\n private lines: TextSegment[][] = []\n private static measurementContext: CanvasRenderingContext2D | null = null\n private readonly metricsString = 'Ag|``'\n private lineHeights: number[] = []\n private lineAscents: number[] = []\n private lineContentHeights: number[] = []\n\n declare props: TextProps & { lineGap: number }\n\n constructor(text: number | string = '', props: TextProps = {}) {\n const initialProps = {\n name: 'TextNode',\n flexShrink: 1,\n lineGap: 0,\n ...props,\n children: undefined,\n }\n super(initialProps)\n this.props = initialProps\n // Process escape sequences before parsing rich text\n const processedText = this.processEscapeSequences(String(text ?? ''))\n this.segments = this.parseRichText(processedText, {\n color: this.props.color,\n weight: this.props.fontWeight,\n size: this.props.fontSize,\n b: this.props.fontWeight === 'bold',\n i: this.props.fontStyle === 'italic',\n })\n this.node.setMeasureFunc(this.measureText.bind(this))\n this.applyDefaults()\n }\n\n /**\n * Renders a simple, single-line text string without complex layout calculations.\n * A lightweight, static utility for drawing text where layout is handled externally.\n * @param ctx The canvas rendering context.\n * @param text The string to render.\n * @param x The x-coordinate for rendering.\n * @param y The y-coordinate for rendering.\n * @param props Basic text styling properties.\n */\n public static renderSimpleText(\n ctx: CanvasRenderingContext2D,\n text: string,\n x: number,\n y: number,\n props: {\n fontFamily?: string\n fontSize?: number\n fontWeight?: TextProps['fontWeight']\n fontStyle?: TextProps['fontStyle']\n color?: string\n textAlign?: CanvasRenderingContext2D['textAlign']\n textBaseline?: CanvasRenderingContext2D['textBaseline']\n } = {},\n ) {\n ctx.save()\n\n const {\n fontFamily = 'sans-serif',\n fontSize = 12,\n fontWeight = 'normal',\n fontStyle = 'normal',\n color = '#333',\n textAlign = 'left',\n textBaseline = 'alphabetic',\n } = props\n\n ctx.font = `${fontStyle} ${fontWeight} ${fontSize}px ${fontFamily}`\n ctx.fillStyle = color\n ctx.textAlign = textAlign\n ctx.textBaseline = textBaseline\n\n ctx.fillText(text, x, y)\n\n ctx.restore()\n }\n\n protected override applyDefaults(): void {\n const textDefaults: Required<\n Pick<TextProps, 'fontSize' | 'fontFamily' | 'fontWeight' | 'fontStyle' | 'color' | 'textAlign' | 'verticalAlign' | 'ellipsis' | 'lineGap'>\n > & {\n lineHeight: undefined | number\n maxLines: undefined | number\n letterSpacing: undefined | number\n wordSpacing: undefined | number\n fontVariant: undefined | FontVariantSetting\n } = {\n fontSize: 16,\n fontFamily: 'sans-serif',\n fontWeight: 'normal',\n fontStyle: 'normal',\n color: 'black',\n textAlign: 'left',\n verticalAlign: 'top',\n fontVariant: undefined,\n lineHeight: undefined,\n lineGap: 0,\n maxLines: undefined,\n ellipsis: false,\n letterSpacing: undefined,\n wordSpacing: undefined,\n }\n\n let defaultsApplied = false\n for (const key of Object.keys(textDefaults) as (keyof typeof textDefaults)[]) {\n if (this.props[key] === undefined && textDefaults[key] !== undefined) {\n this.props[key as string] = textDefaults[key]\n defaultsApplied = true\n }\n }\n\n if (defaultsApplied && !this.node.isDirty()) {\n const affectsMeasurement = [\n 'fontSize',\n 'fontFamily',\n 'fontWeight',\n 'fontStyle',\n 'lineHeight',\n 'maxLines',\n 'lineGap',\n 'letterSpacing',\n 'wordSpacing',\n ].some(measureKey => this.props[measureKey] === textDefaults[measureKey])\n if (affectsMeasurement) {\n this.node.markDirty()\n }\n }\n }\n\n /**\n * Processes Unix-like escape sequences in text strings.\n * Converts escaped characters into their actual representations.\n *\n * Supported escape sequences:\n * - \\n - Newline (line feed)\n * - \\t - Tab (converted to 4 spaces)\n * - \\r - Carriage return (treated as newline)\n * - \\\\ - Literal backslash\n * - \\' - Single quote\n * - \\\" - Double quote\n * - \\0 - Null character (removed)\n * - \\b - Backspace (removed)\n * - \\f - Form feed (treated as newline)\n * - \\v - Vertical tab (treated as newline)\n * @param input Raw text string potentially containing escape sequences\n * @returns Processed string with escape sequences converted\n */\n private processEscapeSequences(input: string): string {\n return input.replace(/\\\\(.)/g, (match, char) => {\n switch (char) {\n case 'n':\n return '\\n' // Newline\n case 't':\n return ' ' // Tab as 4 spaces\n case 'r':\n return '\\n' // Carriage return treated as newline\n case '\\\\':\n return '\\\\' // Literal backslash\n case \"'\":\n return \"'\" // Single quote\n case '\"':\n return '\"' // Double quote\n case '0':\n return '' // Null character (remove)\n case 'b':\n return '' // Backspace (remove)\n case 'f':\n return '\\n' // Form feed as newline\n case 'v':\n return '\\n' // Vertical tab as newline\n default:\n // Unknown escape sequence - keep original\n return match\n }\n })\n }\n\n /**\n * Parses input text with HTML-style markup into styled text segments.\n *\n * Supported tags:\n * - <color=\"value\"> - Sets text color (hex code or CSS color name)\n * - <weight=\"value\"> - Sets font weight (100-900 or keywords like \"bold\")\n * - <size=\"value\"> - Sets font size in pixels\n * - <b> - Makes text bold (shorthand for weight=\"bold\")\n * - <i> - Makes text italic\n *\n * Tag values can use double quotes, single quotes, or no quotes:\n * <color=\"red\">, <color='red'>, <color=red>\n *\n * Tags can be nested and must be properly closed with </tag>\n * @param input Text string containing markup tags\n * @param baseStyle Default style properties to apply to all segments\n * @returns Array of styled text segments with consistent style properties\n */\n private parseRichText(input: string, baseStyle: Partial<TextSegment>): TextSegment[] {\n // Match opening/closing tags with optional quoted/unquoted values\n // Capture groups: (1) closing slash, (2) tag name, (3) double quoted value, (4) single quoted value, (5) unquoted value\n const tagRegex = /<(\\/?)(\\w+)(?:=(?:\"([^\"]*)\"|'([^']*)'|([^\\s>]+)))?>/g\n const stack: Partial<TextSegment>[] = []\n const segments: TextSegment[] = []\n let lastIndex = 0\n let currentStyle: Partial<TextSegment> = { ...baseStyle }\n\n // Helper to create a styled segment ensuring all style properties are included\n const applyStyle = (text: string) => {\n if (!text) return\n segments.push({\n text,\n color: currentStyle.color,\n weight: currentStyle.weight,\n size: currentStyle.size,\n b: currentStyle.b,\n i: currentStyle.i,\n })\n }\n\n let match: RegExpExecArray | null\n while ((match = tagRegex.exec(input))) {\n const [, closingSlash, tagNameStr, quotedVal1, quotedVal2, unquotedVal] = match\n const tagName = tagNameStr.toLowerCase()\n const value = quotedVal1 || quotedVal2 || unquotedVal\n\n // Process text content before the current tag\n applyStyle(input.slice(lastIndex, match.index))\n lastIndex = tagRegex.lastIndex\n\n if (!closingSlash) {\n // Opening tag: Save current style state and apply new style\n stack.push({ ...currentStyle })\n\n switch (tagName) {\n case 'color':\n // Support any valid CSS color value\n currentStyle.color = value as TextSegment['color']\n break\n\n case 'weight':\n // Support numeric weights (100-900) or keywords\n currentStyle.weight = value as TextSegment['weight']\n break\n\n case 'size':\n // Parse pixel size as number, revert to default if invalid\n currentStyle.size = value ? Number(value) : undefined\n if (isNaN(currentStyle.size as number)) {\n console.warn(`[TextNode ${this.key || ''}] Invalid numeric value for size tag: ${value}`)\n currentStyle.size = undefined\n }\n break\n\n case 'b':\n // Simple bold flag\n currentStyle.b = true\n break\n\n case 'i':\n // Simple italic flag\n currentStyle.i = true\n break\n }\n } else {\n // Closing tag: Restore previous style state\n currentStyle = stack.pop() || { ...baseStyle }\n }\n }\n\n // Process remaining text after last tag\n applyStyle(input.slice(lastIndex))\n\n // Don't filter out empty segments - they might represent empty lines\n return segments\n }\n\n private formatSpacing(value: TextProps['letterSpacing'] | TextProps['wordSpacing']) {\n if (typeof value === 'number') return `${value}px`\n return value || 'normal'\n }\n\n private parseSpacingToPx(spacingValue: number | string | undefined, fontSize: number): number {\n if (spacingValue === undefined || spacingValue === 'normal') {\n return 0\n }\n if (typeof spacingValue === 'number') {\n return spacingValue // Treat raw number as px\n }\n if (typeof spacingValue === 'string') {\n const trimmed = spacingValue.trim()\n if (trimmed.endsWith('px')) {\n return parseFloat(trimmed) || 0\n }\n if (trimmed.endsWith('em')) {\n // Convert em based on the current font size\n return (parseFloat(trimmed) || 0) * fontSize\n }\n // Attempt to parse as a raw number (pixels) if no unit\n const parsed = parseFloat(trimmed)\n if (!isNaN(parsed)) {\n return parsed\n }\n }\n return 0 // Default fallback\n }\n\n /**\n * Generates a CSS font string by combining base TextProps with optional TextSegment styling.\n * Follows browser font string format: \"font-style font-weight font-size font-family\"\n *\n * Priority for style properties:\n * - Weight: segment <weight> tag > segment <b> tag > base fontWeight prop\n * - Style: segment <i> > base fontStyle\n * - Size: segment size > base fontSize\n * - Family: base fontFamily\n * @param segmentStyle Optional TextSegment styling to override base props\n * @returns Formatted CSS font string for canvas context\n */\n private getFontString(segmentStyle?: Partial<TextSegment>): string {\n const baseStyle = this.props\n let effectiveWeight: TextSegment['weight'] | number | undefined\n\n // Determine italic style - segment <i> tag overrides base style\n const effectiveStyle = segmentStyle?.i ? 'italic' : baseStyle.fontStyle || 'normal'\n\n // Determine font weight with priority:\n // 1. Segment explicit weight (<weight> tag)\n // 2. Segment bold flag (<b> tag)\n // 3. Base font weight prop\n if (segmentStyle?.weight) {\n effectiveWeight = segmentStyle.weight\n } else if (segmentStyle?.b) {\n effectiveWeight = 'bold'\n } else {\n effectiveWeight = baseStyle.fontWeight || 'normal'\n }\n\n // Use segment size if specified, otherwise base size with 16px default\n const effectiveSize = segmentStyle?.size ? segmentStyle.size : baseStyle.fontSize || 16\n\n // Combine properties into CSS font string format\n const style = {\n fontStyle: effectiveStyle,\n fontWeight: effectiveWeight,\n fontSize: effectiveSize,\n fontFamily: baseStyle.fontFamily || 'sans-serif',\n }\n\n return `${style.fontStyle} ${style.fontWeight} ${style.fontSize}px ${style.fontFamily}`\n }\n\n /**\n * Gets lines to process respecting maxLines constraint\n */\n private getLinesToMeasureOrRender(): TextSegment[][] {\n const maxLines = this.props.maxLines\n if (maxLines !== undefined && maxLines > 0 && this.lines.length > maxLines) {\n return this.lines.slice(0, maxLines)\n }\n return this.lines\n }\n\n /**\n * Measures text dimensions and calculates layout metrics for the YogaLayout engine.\n * Handles text wrapping, line height calculations, and dynamic leading.\n *\n * Line heights are determined by:\n * 1. Using props.lineHeight as fixed pixel value if provided\n * 2. Otherwise calculating dynamic height based on largest font size per line\n * 3. Adding leading space above/below text content\n * 4. Including specified line gaps between lines\n * @param widthConstraint Maximum allowed width in pixels for text layout\n * @param widthMode YogaLayout mode determining how width constraint is applied\n * @returns Calculated minimum dimensions required to render text content\n * - width: Total width needed for text layout\n * - height: Total height including line heights and gaps\n */\n private measureText(widthConstraint: number, widthMode: MeasureMode): { width: number; height: number } {\n // Create measurement canvas if not exists\n if (!TextNode.measurementContext) {\n TextNode.measurementContext = new Canvas(1, 1).getContext('2d')\n }\n const baseFontSize = this.props.fontSize || 16\n const ctx = TextNode.measurementContext!\n ctx.save()\n\n // Setup text measurement context\n ctx.letterSpacing = this.formatSpacing(this.props.letterSpacing)\n ctx.wordSpacing = 'normal' // Handled manually via parsedWordSpacingPx\n const parsedWordSpacingPx = this.parseSpacingToPx(this.props.wordSpacing, baseFontSize)\n\n // Pre-measure each text segment width with its specific styling\n for (const segment of this.segments) {\n ctx.font = this.getFontString(segment)\n if (typeof this.props.fontVariant === 'string') {\n ctx.fontVariant = this.props.fontVariant\n } else if (this.props.fontVariant !== undefined) {\n console.warn(`[TextNode ${this.key || ''}] Invalid fontVariant prop type in measureText (segment width):`, this.props.fontVariant)\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n } else {\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n }\n segment.width = ctx.measureText(segment.text).width\n }\n\n // Calculate available layout width\n const availableWidthForContent = widthMode === Style.MeasureMode.Undefined ? Infinity : Math.max(0, widthConstraint)\n const epsilon = 0.001 // Float precision compensation\n\n // Wrap text into lines based on available width\n this.lines = this.wrapTextRich(ctx, this.segments, availableWidthForContent + epsilon, parsedWordSpacingPx)\n\n // Initialize line metrics arrays\n this.lineHeights = [] // Final heights including leading\n this.lineAscents = [] // Text ascent heights\n this.lineContentHeights = [] // Raw content heights (ascent + descent)\n\n let totalTextHeight = 0\n const linesToMeasure = this.getLinesToMeasureOrRender()\n const numLines = linesToMeasure.length\n const defaultLineHeightMultiplier = 1.2 // Base leading multiplier\n\n // Calculate metrics for each line\n for (const line of linesToMeasure) {\n let maxAscent = 0\n let maxDescent = 0\n let maxFontSizeOnLine = 0\n\n // Handle empty line metrics\n if (line.length === 0) {\n ctx.font = this.getFontString()\n if (typeof this.props.fontVariant === 'string') {\n ctx.fontVariant = this.props.fontVariant\n } else if (this.props.fontVariant !== undefined) {\n console.warn(`[TextNode ${this.key || ''}] Invalid fontVariant prop type in measureText (empty line):`, this.props.fontVariant)\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n } else {\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n }\n const metrics = ctx.measureText(this.metricsString)\n maxAscent = metrics.actualBoundingBoxAscent ?? baseFontSize * 0.8\n maxDescent = metrics.actualBoundingBoxDescent ?? baseFontSize * 0.2\n maxFontSizeOnLine = baseFontSize\n } else {\n // Calculate max metrics across all segments in line\n for (const segment of line) {\n if (/^\\s+$/.test(segment.text)) continue\n\n const segmentSize = segment.size || baseFontSize\n maxFontSizeOnLine = Math.max(maxFontSizeOnLine, segmentSize)\n\n ctx.font = this.getFontString(segment)\n if (typeof this.props.fontVariant === 'string') {\n ctx.fontVariant = this.props.fontVariant\n } else if (this.props.fontVariant !== undefined) {\n console.warn(`[TextNode ${this.key || ''}] Invalid fontVariant prop type in measureText (segment height):`, this.props.fontVariant)\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n } else {\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n }\n\n const metrics = ctx.measureText(this.metricsString)\n const ascent = metrics.actualBoundingBoxAscent ?? segmentSize * 0.8\n const descent = metrics.actualBoundingBoxDescent ?? segmentSize * 0.2\n\n maxAscent = Math.max(maxAscent, ascent)\n maxDescent = Math.max(maxDescent, descent)\n }\n }\n\n // Fallback metrics for lines with only whitespace\n if (maxAscent === 0 && maxDescent === 0 && line.length > 0) {\n ctx.font = this.getFontString()\n if (typeof this.props.fontVariant === 'string') {\n ctx.fontVariant = this.props.fontVariant\n } else if (this.props.fontVariant !== undefined) {\n console.warn(`[TextNode ${this.key || ''}] Invalid fontVariant prop type in measureText (fallback):`, this.props.fontVariant)\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n } else {\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n }\n const metrics = ctx.measureText(this.metricsString)\n maxAscent = metrics.actualBoundingBoxAscent ?? baseFontSize * 0.8\n maxDescent = metrics.actualBoundingBoxDescent ?? baseFontSize * 0.2\n maxFontSizeOnLine = maxFontSizeOnLine || baseFontSize\n }\n\n maxFontSizeOnLine = maxFontSizeOnLine || baseFontSize\n\n // Calculate total content height for line\n const actualContentHeight = maxAscent + maxDescent\n\n // Determine final line box height with leading\n const targetLineBoxHeight =\n typeof this.props.lineHeight === 'number' && this.props.lineHeight > 0 ? this.props.lineHeight : maxFontSizeOnLine * defaultLineHeightMultiplier\n\n // Use larger of target height or content height to prevent clipping\n const finalLineHeight = Math.max(actualContentHeight, targetLineBoxHeight)\n\n // Store line metrics for rendering\n this.lineHeights.push(finalLineHeight)\n this.lineAscents.push(maxAscent)\n this.lineContentHeights.push(actualContentHeight)\n\n totalTextHeight += finalLineHeight\n }\n\n // Add line gap spacing to total height\n const lineGapValue = this.props.lineGap\n const totalGapHeight = Math.max(0, (numLines - 1) * lineGapValue)\n const calculatedContentHeight = totalTextHeight + totalGapHeight\n\n // Calculate width required for text content\n const spaceWidth = this.measureSpaceWidth(ctx)\n let singleLineWidth = 0\n let firstWordInSingleLine = true\n for (const segment of this.segments) {\n const words = segment.text.split(/(\\s+)/).filter(Boolean)\n for (const word of words) {\n if (/^\\s+$/.test(word)) continue\n ctx.font = this.getFontString(segment)\n if (typeof this.props.fontVariant === 'string') {\n ctx.fontVariant = this.props.fontVariant\n } else if (this.props.fontVariant !== undefined) {\n console.warn(`[TextNode ${this.key || ''}] Invalid fontVariant prop type in measureText (single line width):`, this.props.fontVariant)\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n } else {\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n }\n const wordWidth = ctx.measureText(word).width\n if (!firstWordInSingleLine) {\n singleLineWidth += spaceWidth + parsedWordSpacingPx\n }\n singleLineWidth += wordWidth\n firstWordInSingleLine = false\n }\n }\n\n // Determine final content width based on wrapping\n let requiredContentWidth: number\n if (singleLineWidth <= availableWidthForContent) {\n requiredContentWidth = singleLineWidth\n if (linesToMeasure.length > 1 && this.props.maxLines !== 1 && !this.segments.some(s => s.text.includes('\\n'))) {\n console.warn(\n `[TextNode ${this.key || ''}] Rich text should fit (${singleLineWidth.toFixed(2)} <= ${availableWidthForContent.toFixed(2)}) but wrapTextRich produced ${linesToMeasure.length} lines. Width calculation might be slightly off due to complex spacing/kerning.`,\n )\n let maxWrappedLineWidth = 0\n for (const line of linesToMeasure) {\n let currentLineWidth = 0\n let firstWordOnWrappedLine = true\n for (const segment of line) {\n const segmentWidth = segment.width ?? 0\n const isSpaceSegment = /^\\s+$/.test(segment.text)\n if (!isSpaceSegment) {\n if (!firstWordOnWrappedLine) {\n currentLineWidth += spaceWidth + parsedWordSpacingPx\n }\n currentLineWidth += segmentWidth\n firstWordOnWrappedLine = false\n }\n }\n maxWrappedLineWidth = Math.max(maxWrappedLineWidth, currentLineWidth)\n }\n requiredContentWidth = Math.max(singleLineWidth, maxWrappedLineWidth)\n }\n } else {\n let maxWrappedLineWidth = 0\n for (const line of linesToMeasure) {\n let currentLineWidth = 0\n let firstWordOnWrappedLine = true\n for (const segment of line) {\n const segmentWidth = segment.width ?? 0\n const isSpaceSegment = /^\\s+$/.test(segment.text)\n if (!isSpaceSegment) {\n if (!firstWordOnWrappedLine) {\n currentLineWidth += spaceWidth + parsedWordSpacingPx\n }\n currentLineWidth += segmentWidth\n firstWordOnWrappedLine = false\n }\n }\n maxWrappedLineWidth = Math.max(maxWrappedLineWidth, currentLineWidth)\n }\n requiredContentWidth = maxWrappedLineWidth\n }\n\n // Constrain width if needed\n let finalContentWidth = requiredContentWidth\n if (availableWidthForContent !== Infinity) {\n finalContentWidth = Math.min(requiredContentWidth, availableWidthForContent)\n }\n\n ctx.restore()\n return {\n width: Math.max(0, finalContentWidth),\n height: Math.max(0, calculatedContentHeight),\n }\n }\n\n /**\n * Wraps text segments into multiple lines while respecting width constraints and preserving styling.\n * Handles rich text attributes (color, weight, size, bold, italic) and proper word wrapping.\n * Also respects explicit newline characters (\\n) for forced line breaks.\n * @param ctx Canvas rendering context used for text measurements\n * @param segments Array of text segments with styling information\n * @param maxWidth Maximum allowed width for each line in pixels\n * @param parsedWordSpacingPx Additional spacing to add between words in pixels\n * @returns Array of lines, where each line contains styled text segments\n */\n private wrapTextRich(ctx: CanvasRenderingContext2D, segments: TextSegment[], maxWidth: number, parsedWordSpacingPx: number): TextSegment[][] {\n const lines: TextSegment[][] = []\n\n if (segments.length === 0 || maxWidth <= 0) return lines\n\n let currentLineSegments: TextSegment[] = []\n let currentLineWidth = 0\n const spaceWidth = this.measureSpaceWidth(ctx)\n\n // Helper to finalize current line and start new one\n const finalizeLine = (forceEmpty = false) => {\n // Remove trailing whitespace segments unless we're forcing an empty line\n if (!forceEmpty) {\n while (currentLineSegments.length > 0 && /^\\s+$/.test(currentLineSegments[currentLineSegments.length - 1].text)) {\n currentLineSegments.pop()\n }\n }\n // Always push the line, even if empty (for \\n\\n cases)\n lines.push(currentLineSegments)\n currentLineSegments = []\n currentLineWidth = 0\n }\n\n for (const segment of segments) {\n // Preserve all style attributes for consistency\n const segmentStyle = {\n color: segment.color,\n weight: segment.weight,\n size: segment.size,\n b: segment.b,\n i: segment.i,\n }\n\n // Check if segment contains newline characters\n if (segment.text.includes('\\n')) {\n // Split by newlines and process each part\n const parts = segment.text.split('\\n')\n\n for (let i = 0; i < parts.length; i++) {\n const part = parts[i]\n const isLastPart = i === parts.length - 1\n\n if (part.length > 0) {\n // Process this part normally\n const wordsAndSpaces = part.split(/(\\s+)/).filter(Boolean)\n\n for (const wordOrSpace of wordsAndSpaces) {\n const isSpace = /^\\s+$/.test(wordOrSpace)\n let wordSegment: TextSegment\n let wordWidth: number\n\n if (isSpace) {\n wordSegment = { text: wordOrSpace, ...segmentStyle, width: 0 }\n wordWidth = 0\n } else {\n ctx.font = this.getFontString(segmentStyle)\n if (this.props.fontVariant) ctx.fontVariant = this.props.fontVariant\n wordWidth = ctx.measureText(wordOrSpace).width\n wordSegment = { text: wordOrSpace, ...segmentStyle, width: wordWidth }\n }\n\n const needsSpace = currentLineSegments.length > 0 && !/^\\s+$/.test(currentLineSegments[currentLineSegments.length - 1].text)\n const spaceToAdd = needsSpace ? spaceWidth + parsedWordSpacingPx : 0\n\n if (currentLineWidth + spaceToAdd + wordWidth <= maxWidth || currentLineSegments.length === 0) {\n if (needsSpace) {\n currentLineSegments.push({ text: ' ', ...segmentStyle, width: 0 })\n currentLineWidth += spaceToAdd\n }\n currentLineSegments.push(wordSegment)\n currentLineWidth += wordWidth\n } else {\n if (currentLineSegments.length > 0) {\n finalizeLine()\n }\n\n if (!isSpace) {\n if (wordWidth > maxWidth && maxWidth > 0) {\n const brokenParts = this.breakWordRich(ctx, wordSegment, maxWidth)\n\n if (brokenParts.length > 0) {\n for (let k = 0; k < brokenParts.length - 1; k++) {\n lines.push([brokenParts[k]])\n }\n currentLineSegments = [brokenParts[brokenParts.length - 1]]\n currentLineWidth = brokenParts[brokenParts.length - 1].width ?? 0\n } else {\n currentLineSegments = [wordSegment]\n currentLineWidth = wordWidth\n }\n } else {\n currentLineSegments = [wordSegment]\n currentLineWidth = wordWidth\n }\n }\n }\n }\n }\n\n // Force line break after each part except the last\n // If part is empty, this creates an empty line (like \\n\\n)\n if (!isLastPart) {\n finalizeLine(part.length === 0)\n }\n }\n } else {\n // No newlines - process normally\n const wordsAndSpaces = segment.text.split(/(\\s+)/).filter(Boolean)\n\n for (const wordOrSpace of wordsAndSpaces) {\n const isSpace = /^\\s+$/.test(wordOrSpace)\n let wordSegment: TextSegment\n let wordWidth: number\n\n if (isSpace) {\n wordSegment = { text: wordOrSpace, ...segmentStyle, width: 0 }\n wordWidth = 0\n } else {\n ctx.font = this.getFontString(segmentStyle)\n if (this.props.fontVariant) ctx.fontVariant = this.props.fontVariant\n wordWidth = ctx.measureText(wordOrSpace).width\n wordSegment = { text: wordOrSpace, ...segmentStyle, width: wordWidth }\n }\n\n const needsSpace = currentLineSegments.length > 0 && !/^\\s+$/.test(currentLineSegments[currentLineSegments.length - 1].text)\n const spaceToAdd = needsSpace ? spaceWidth + parsedWordSpacingPx : 0\n\n if (currentLineWidth + spaceToAdd + wordWidth <= maxWidth || currentLineSegments.length === 0) {\n if (needsSpace) {\n currentLineSegments.push({ text: ' ', ...segmentStyle, width: 0 })\n currentLineWidth += spaceToAdd\n }\n currentLineSegments.push(wordSegment)\n currentLineWidth += wordWidth\n } else {\n if (currentLineSegments.length > 0) {\n finalizeLine()\n }\n\n if (!isSpace) {\n if (wordWidth > maxWidth && maxWidth > 0) {\n const brokenParts = this.breakWordRich(ctx, wordSegment, maxWidth)\n\n if (brokenParts.length > 0) {\n for (let k = 0; k < brokenParts.length - 1; k++) {\n lines.push([brokenParts[k]])\n }\n currentLineSegments = [brokenParts[brokenParts.length - 1]]\n currentLineWidth = brokenParts[brokenParts.length - 1].width ?? 0\n } else {\n currentLineSegments = [wordSegment]\n currentLineWidth = wordWidth\n }\n } else {\n currentLineSegments = [wordSegment]\n currentLineWidth = wordWidth\n }\n }\n }\n }\n }\n }\n\n finalizeLine()\n return lines\n }\n\n /**\n * Breaks a word segment into multiple segments that each fit within the specified width constraint.\n * Maintains all styling properties (color, weight, size, bold, italic) across broken segments.\n * @param ctx Canvas rendering context used for text measurements\n * @param segmentToBreak Original text segment to split\n * @param maxWidth Maximum width allowed for each resulting segment\n * @returns Array of TextSegments, each fitting maxWidth, or original segment if no breaking needed\n */\n private breakWordRich(ctx: CanvasRenderingContext2D, segmentToBreak: TextSegment, maxWidth: number): TextSegment[] {\n const word = segmentToBreak.text\n\n // Copy all style properties to maintain consistent styling across broken segments\n const style = {\n color: segmentToBreak.color,\n weight: segmentToBreak.weight,\n size: segmentToBreak.size,\n b: segmentToBreak.b,\n i: segmentToBreak.i,\n }\n\n if (maxWidth <= 0) return [segmentToBreak]\n\n const brokenSegments: TextSegment[] = []\n let currentPartText = ''\n\n // Configure context with segment style for accurate measurements\n ctx.font = this.getFontString(style)\n if (this.props.fontVariant) ctx.fontVariant = this.props.fontVariant\n\n // Process word character by character to find valid break points\n for (const char of word) {\n const testPartText = currentPartText + char\n const testPartWidth = ctx.measureText(testPartText).width\n\n if (testPartWidth > maxWidth) {\n // Current accumulated text exceeds width - create new segment\n if (currentPartText) {\n brokenSegments.push({\n text: currentPartText,\n ...style,\n width: ctx.measureText(currentPartText).width,\n })\n }\n\n // Handle current character that caused overflow\n currentPartText = char\n const currentCharWidth = ctx.measureText(currentPartText).width\n\n if (currentCharWidth > maxWidth) {\n // Single character is too wide - force break after it\n brokenSegments.push({\n text: currentPartText,\n ...style,\n width: currentCharWidth,\n })\n currentPartText = ''\n }\n } else {\n // Character fits - add to current part\n currentPartText = testPartText\n }\n }\n\n // Handle any remaining text as final segment\n if (currentPartText) {\n brokenSegments.push({\n text: currentPartText,\n ...style,\n width: ctx.measureText(currentPartText).width,\n })\n }\n\n return brokenSegments.length > 0 ? brokenSegments : [segmentToBreak]\n }\n\n /**\n * Measures width of space character using base font\n */\n private measureSpaceWidth(ctx: CanvasRenderingContext2D): number {\n const originalFont = ctx.font\n ctx.font = this.getFontString()\n const width = ctx.measureText(' ').width\n ctx.font = originalFont\n return width > 0 ? width : (this.props.fontSize || 16) * 0.3\n }\n\n /**\n * Renders multi-line text content with rich text styling and layout features\n *\n * Core features:\n * - Dynamic line heights with leading/spacing controls\n * - Vertical text alignment (top/middle/bottom)\n * - Horizontal text alignment (left/center/right/justify)\n * - Text wrapping within bounds\n * - Ellipsis truncation\n * - Rich text styling per segment (color, weight, size, etc)\n * - Performance optimizations (clipping, visibility checks)\n * @param ctx Canvas rendering context\n * @param x Content box left position in pixels\n * @param y Content box top position in pixels\n * @param width Content box total width including padding\n * @param height Content box total height including padding\n */\n protected override _renderContent(ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height: number) {\n super._renderContent(ctx, x, y, width, height)\n\n const linesToRender = this.getLinesToMeasureOrRender()\n const numLinesToRender = linesToRender.length\n\n // Validate required data is available\n if (\n numLinesToRender === 0 ||\n this.segments.length === 0 ||\n this.lineHeights.length !== numLinesToRender ||\n this.lineAscents.length !== numLinesToRender ||\n this.lineContentHeights.length !== numLinesToRender\n ) {\n return\n }\n\n ctx.save()\n ctx.textBaseline = 'alphabetic'\n ctx.letterSpacing = this.formatSpacing(this.props.letterSpacing)\n ctx.wordSpacing = 'normal'\n\n const baseFontSize = this.props.fontSize || 16\n const parsedWordSpacingPx = this.parseSpacingToPx(this.props.wordSpacing, baseFontSize)\n\n // Calculate content box with padding\n const paddingLeft = this.node.getComputedPadding(Style.Edge.Left) ?? 0\n const paddingTop = this.node.getComputedPadding(Style.Edge.Top) ?? 0\n const paddingRight = this.node.getComputedPadding(Style.Edge.Right) ?? 0\n const paddingBottom = this.node.getComputedPadding(Style.Edge.Bottom) ?? 0\n const contentX = x + paddingLeft\n const contentY = y + paddingTop\n const contentWidth = Math.max(0, width - paddingLeft - paddingRight)\n const contentHeight = Math.max(0, height - paddingTop - paddingBottom)\n\n if (contentWidth <= 0 || contentHeight <= 0) {\n ctx.restore()\n return\n }\n\n // Calculate vertical alignment offset\n const lineGapValue = this.props.lineGap\n const totalCalculatedTextHeight = this.lineHeights.reduce((sum, h) => sum + h, 0) + Math.max(0, numLinesToRender - 1) * lineGapValue\n\n let blockStartY: number\n switch (this.props.verticalAlign) {\n case 'middle':\n blockStartY = contentY + (contentHeight - totalCalculatedTextHeight) / 2\n break\n case 'bottom':\n blockStartY = contentY + contentHeight - totalCalculatedTextHeight\n break\n case 'top':\n default:\n blockStartY = contentY\n }\n\n let currentLineTopY = blockStartY\n\n // Setup text content clipping region\n ctx.beginPath()\n ctx.rect(contentX, contentY, contentWidth, contentHeight)\n ctx.clip()\n\n // Configure ellipsis if needed\n const ellipsisChar = typeof this.props.ellipsis === 'string' ? this.props.ellipsis : '...'\n const needsEllipsis = this.props.ellipsis && this.lines.length > numLinesToRender\n let ellipsisWidth = 0\n let ellipsisStyle: Partial<TextSegment> | undefined = undefined\n\n if (needsEllipsis) {\n const lastRenderedLine = linesToRender[numLinesToRender - 1]\n const lastTextStyleSegment = [...lastRenderedLine].reverse().find(seg => !/^\\s+$/.test(seg.text))\n\n // Inherit styles from last non-whitespace segment\n ellipsisStyle = lastTextStyleSegment\n ? {\n color: lastTextStyleSegment.color,\n weight: lastTextStyleSegment.weight,\n size: lastTextStyleSegment.size,\n b: lastTextStyleSegment.b,\n i: lastTextStyleSegment.i,\n }\n : undefined\n\n const originalFont = ctx.font\n const originalVariant = ctx.fontVariant\n ctx.font = this.getFontString(ellipsisStyle)\n\n // Handle font variant setting and validation\n if (typeof this.props.fontVariant === 'string') {\n ctx.fontVariant = this.props.fontVariant\n } else if (this.props.fontVariant !== undefined) {\n console.warn(`[TextNode ${this.key || ''}] Invalid fontVariant prop type in _renderContent (ellipsis measure):`, this.props.fontVariant)\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n } else {\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n }\n\n ellipsisWidth = ctx.measureText(ellipsisChar).width\n ctx.font = originalFont\n\n if (originalVariant !== 'normal') {\n ctx.fontVariant = originalVariant\n } else if (ctx.fontVariant !== 'normal') {\n ctx.fontVariant = 'normal'\n }\n }\n\n const spaceWidth = this.measureSpaceWidth(ctx)\n\n // Render text content line by line\n for (let i = 0; i < numLinesToRender; i++) {\n const lineSegments = linesToRender[i]\n const currentLineFinalHeight = this.lineHeights[i]\n const currentLineMaxAscent = this.lineAscents[i]\n const currentLineContentHeight = this.lineContentHeights[i]\n\n // Calculate line spacing metrics\n const currentLineLeading = currentLineFinalHeight - currentLineContentHeight\n const currentLineSpaceAbove = Math.max(0, currentLineLeading / 2)\n const lineY = currentLineTopY + currentLineSpaceAbove + currentLineMaxAscent\n\n // Visibility culling check\n const lineTop = currentLineTopY\n const lineBottom = currentLineTopY + currentLineFinalHeight\n\n // Don't skip empty lines - they're intentional (from \\n\\n)\n // Only skip if the line is completely outside the visible area\n if (lineBottom <= contentY || lineTop >= contentY + contentHeight) {\n currentLineTopY += currentLineFinalHeight + lineGapValue\n continue\n }\n\n const isLastRenderedLine = i === numLinesToRender - 1\n\n // Calculate line width metrics for alignment\n let totalLineWidth = 0\n let totalWordsWidth = 0\n let numWordGaps = 0\n let firstWordOnLine = true\n const noSpaceBeforePunctuation = /^[.,!?;:)\\]}]/\n\n for (const segment of lineSegments) {\n const segmentWidth = segment.width ?? 0\n const isSpaceSegment = /^\\s+$/.test(segment.text)\n\n if (!isSpaceSegment) {\n if (!firstWordOnLine) {\n totalLineWidth += spaceWidth + parsedWordSpacingPx\n if (!noSpaceBeforePunctuation.test(segment.text)) {\n numWordGaps++\n }\n }\n totalLineWidth += segmentWidth\n totalWordsWidth += segmentWidth\n firstWordOnLine = false\n }\n }\n\n // Calculate horizontal alignment position\n const isJustify = this.props.textAlign === 'justify' && !isLastRenderedLine\n const lineTextAlign = isJustify ? 'left' : this.props.textAlign || 'left'\n let currentX: number\n\n switch (lineTextAlign) {\n case 'center':\n currentX = contentX + (contentWidth - totalLineWidth) / 2\n break\n case 'right':\n case 'end':\n currentX = contentX + contentWidth - totalLineWidth\n break\n case 'left':\n case 'start':\n default:\n currentX = contentX\n }\n currentX = Math.max(contentX, currentX)\n\n // Calculate justification spacing\n let spacePerWordGapPlusSpacing = spaceWidth + parsedWordSpacingPx\n if (isJustify && numWordGaps > 0 && totalLineWidth < contentWidth) {\n const totalBaseSpacingWidth = numWordGaps * (spaceWidth + parsedWordSpacingPx)\n const remainingSpace = contentWidth - totalWordsWidth - totalBaseSpacingWidth\n if (remainingSpace > 0) {\n spacePerWordGapPlusSpacing += remainingSpace / numWordGaps\n }\n }\n\n // Render line segments (skip rendering for truly empty lines)\n if (lineSegments.length > 0 && !lineSegments.every(s => s.text.trim() === '')) {\n let accumulatedWidth = 0\n let ellipsisApplied = false\n let firstWordDrawn = false\n\n for (let j = 0; j < lineSegments.length; j++) {\n const segment = lineSegments[j]\n const segmentWidth = segment.width ?? 0\n const isLastSegmentOnLine = j === lineSegments.length - 1\n const isSpaceSegment = /^\\s+$/.test(segment.text)\n\n // Calculate word spacing\n let spaceToAddBefore = 0\n if (!isSpaceSegment && firstWordDrawn && !noSpaceBeforePunctuation.test(segment.text)) {\n spaceToAddBefore = isJustify ? spacePerWordGapPlusSpacing : spaceWidth + parsedWordSpacingPx\n }\n\n // Apply segment styles\n ctx.font = this.getFontString(segment)\n ctx.fillStyle = segment.color || this.props.color || 'black'\n\n if (typeof this.props.fontVariant === 'string') {\n ctx.fontVariant = this.props.fontVariant\n } else if (this.props.fontVariant !== undefined) {\n console.warn(`[TextNode ${this.key || ''}] Invalid fontVariant prop type in _renderContent (segment render):`, this.props.fontVariant)\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n } else {\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n }\n\n // Handle text truncation and ellipsis\n let textToDraw = segment.text\n let currentSegmentRenderWidth = segmentWidth\n let applyEllipsisAfter = false\n\n if (isLastRenderedLine && needsEllipsis && !isSpaceSegment) {\n const currentTotalWidth = accumulatedWidth + spaceToAddBefore + segmentWidth\n const spaceNeededAfter = isLastSegmentOnLine ? 0 : isJustify ? spacePerWordGapPlusSpacing : spaceWidth + parsedWordSpacingPx\n\n if (currentTotalWidth > contentWidth - spaceNeededAfter) {\n const availableWidthForSegment = contentWidth - accumulatedWidth - spaceToAddBefore - ellipsisWidth\n if (availableWidthForSegment > 0) {\n let truncatedText = ''\n for (const char of segment.text) {\n if (ctx.measureText(truncatedText + char).width <= availableWidthForSegment) {\n truncatedText += char\n } else {\n break\n }\n }\n textToDraw = truncatedText\n currentSegmentRenderWidth = ctx.measureText(textToDraw).width\n } else {\n textToDraw = ''\n currentSegmentRenderWidth = 0\n }\n applyEllipsisAfter = true\n ellipsisApplied = true\n } else if (isLastSegmentOnLine) {\n applyEllipsisAfter = true\n ellipsisApplied = true\n }\n }\n\n // Render text segment\n currentX += spaceToAddBefore\n accumulatedWidth += spaceToAddBefore\n\n const remainingRenderWidth = contentX + contentWidth - currentX\n if (currentSegmentRenderWidth > 0 && remainingRenderWidth > 0 && !isSpaceSegment) {\n ctx.textAlign = 'left'\n\n const shadows = this.props.textShadow ? (Array.isArray(this.props.textShadow) ? this.props.textShadow : [this.props.textShadow]) : []\n\n ctx.save()\n\n // Draw shadows\n for (const shadow of shadows) {\n ctx.shadowColor = shadow.color || 'transparent'\n ctx.shadowBlur = shadow.blur || 0\n ctx.shadowOffsetX = shadow.offsetX || 0\n ctx.shadowOffsetY = shadow.offsetY || 0\n ctx.fillText(textToDraw, currentX, lineY, Math.max(0, remainingRenderWidth + 1))\n }\n\n // Reset shadow to draw the main text\n ctx.shadowColor = 'transparent'\n ctx.shadowBlur = 0\n ctx.shadowOffsetX = 0\n ctx.shadowOffsetY = 0\n\n ctx.fillText(textToDraw, currentX, lineY, Math.max(0, remainingRenderWidth + 1))\n\n ctx.restore()\n\n firstWordDrawn = true\n }\n\n currentX += currentSegmentRenderWidth\n accumulatedWidth += currentSegmentRenderWidth\n\n // Render ellipsis\n if (applyEllipsisAfter) {\n const ellipsisRemainingWidth = contentX + contentWidth - currentX\n if (ellipsisRemainingWidth >= ellipsisWidth) {\n const originalFont = ctx.font\n const originalVariant = ctx.fontVariant\n const originalFill = ctx.fillStyle\n\n ctx.font = this.getFontString(ellipsisStyle)\n\n if (typeof this.props.fontVariant === 'string') {\n ctx.fontVariant = this.props.fontVariant\n } else if (this.props.fontVariant !== undefined) {\n console.warn(`[TextNode ${this.key || ''}] Invalid fontVariant prop type in _renderContent (ellipsis draw):`, this.props.fontVariant)\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n } else {\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n }\n\n ctx.fillStyle = ellipsisStyle?.color || this.props.color || 'black'\n ctx.fillText(ellipsisChar, currentX, lineY, Math.max(0, ellipsisRemainingWidth + 1))\n\n ctx.font = originalFont\n if (originalVariant !== 'normal') {\n ctx.fontVariant = originalVariant\n } else if (ctx.fontVariant !== 'normal') {\n ctx.fontVariant = 'normal'\n }\n ctx.fillStyle = originalFill\n }\n break\n }\n\n if (ellipsisApplied && currentX >= contentX + contentWidth) break\n }\n }\n\n currentLineTopY += currentLineFinalHeight + lineGapValue\n }\n\n ctx.restore()\n }\n}\n\n/**\n * Creates a new TextNode instance with rich text support\n */\nexport const Text = (text: number | string, props?: TextProps) => new TextNode(text, props)\n"],"names":["BoxNode","Canvas","Style"],"mappings":";;;;;;AAAA;AAOA;;;AAGG;AACG,MAAO,QAAS,SAAQA,0BAAO,CAAA;IAClB,QAAQ,GAAkB,EAAE;IACrC,KAAK,GAAoB,EAAE;AAC3B,IAAA,OAAO,kBAAkB,GAAoC,IAAI;IACxD,aAAa,GAAG,OAAO;IAChC,WAAW,GAAa,EAAE;IAC1B,WAAW,GAAa,EAAE;IAC1B,kBAAkB,GAAa,EAAE;AAIzC,IAAA,WAAA,CAAY,IAAA,GAAwB,EAAE,EAAE,KAAA,GAAmB,EAAE,EAAA;AAC3D,QAAA,MAAM,YAAY,GAAG;AACnB,YAAA,IAAI,EAAE,UAAU;AAChB,YAAA,UAAU,EAA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,CAAC,IAAI,GAAG,YAAY;AACvB,4BAAA,IAAI,eAAe,KAAK,QAAQ,EAAE;AAChC,gCAAA,GAAG,CAAC,WAAW,GAAG,eAAe;4BACnC;AAAO,iCAAA,IAAI,GAAG,CAAC,WAAW,KAAK,QAAQ,EAAE;AACvC,gCAAA,GAAG,CAAC,WAAW,GAAG,QAAQ;4BAC5B;AACA,4BAAA,GAAG,CAAC,SAAS,GAAG,YAAY;wBAC9B;wBACA;oBACF;AAEA,oBAAA,IAAI,eAAe,IAAI,QAAQ,IAAI,QAAQ,GAAG,YAAY;wBAAE;gBAC9D;YACF;AAEA,YAAA,eAAe,IAAI,sBAAsB,GAAG,YAAY;QAC1D;QAEA,GAAG,CAAC,OAAO,EAAE;IACf;;AAGF;;AAEG;AACI,MAAM,IAAI,GAAG,CAAC,IAAqB,EAAE,KAAiB,KAAK,IAAI,QAAQ,CAAC,IAAI,EAAE,KAAK;;;;;"}
1
+ {"version":3,"file":"text.canvas.util.js","sources":["../../../../src/canvas/text.canvas.util.ts"],"sourcesContent":["// TODO: Add comprehensive unit tests for this file.\n\nimport type { TextProps, TextSegment } from '@/canvas/canvas.type.js'\nimport { Canvas, type CanvasRenderingContext2D, type FontVariantSetting } from 'skia-canvas'\nimport { BoxNode } from '@/canvas/layout.canvas.util.js'\nimport { Style, MeasureMode } from '@/constant/common.const.js'\n\n/**\n * Node for rendering text content with rich text styling support\n * Supports color and weight variations through HTML-like tags\n */\nexport class TextNode extends BoxNode {\n private readonly segments: TextSegment[] = []\n private lines: TextSegment[][] = []\n private static measurementContext: CanvasRenderingContext2D | null = null\n private readonly metricsString = 'Ag|``'\n private lineHeights: number[] = []\n private lineAscents: number[] = []\n private lineContentHeights: number[] = []\n\n declare props: TextProps & { lineGap: number }\n\n constructor(text: number | string = '', props: TextProps = {}) {\n const initialProps = {\n name: 'TextNode',\n flexShrink: 1,\n lineGap: 0,\n ...props,\n children: undefined,\n }\n super(initialProps)\n this.props = initialProps\n // Process escape sequences before parsing rich text\n const processedText = this.processEscapeSequences(String(text ?? ''))\n this.segments = this.parseRichText(processedText, {\n color: this.props.color,\n weight: this.props.fontWeight,\n size: this.props.fontSize,\n b: this.props.fontWeight === 'bold',\n i: this.props.fontStyle === 'italic',\n })\n this.node.setMeasureFunc(this.measureText.bind(this))\n this.applyDefaults()\n }\n\n /**\n * Renders a simple, single-line text string without complex layout calculations.\n * A lightweight, static utility for drawing text where layout is handled externally.\n * @param ctx The canvas rendering context.\n * @param text The string to render.\n * @param x The x-coordinate for rendering.\n * @param y The y-coordinate for rendering.\n * @param props Basic text styling properties.\n */\n public static renderSimpleText(\n ctx: CanvasRenderingContext2D,\n text: string,\n x: number,\n y: number,\n props: {\n fontFamily?: string\n fontSize?: number\n fontWeight?: TextProps['fontWeight']\n fontStyle?: TextProps['fontStyle']\n color?: string\n textAlign?: CanvasRenderingContext2D['textAlign']\n textBaseline?: CanvasRenderingContext2D['textBaseline']\n } = {},\n ) {\n ctx.save()\n\n const {\n fontFamily = 'sans-serif',\n fontSize = 12,\n fontWeight = 'normal',\n fontStyle = 'normal',\n color = '#333',\n textAlign = 'left',\n textBaseline = 'alphabetic',\n } = props\n\n ctx.font = `${fontStyle} ${fontWeight} ${fontSize}px ${fontFamily}`\n ctx.fillStyle = color\n ctx.textAlign = textAlign\n ctx.textBaseline = textBaseline\n\n ctx.fillText(text, x, y)\n\n ctx.restore()\n }\n\n protected override applyDefaults(): void {\n const textDefaults: Required<\n Pick<TextProps, 'fontSize' | 'fontFamily' | 'fontWeight' | 'fontStyle' | 'color' | 'textAlign' | 'verticalAlign' | 'ellipsis' | 'lineGap'>\n > & {\n lineHeight: undefined | number\n maxLines: undefined | number\n letterSpacing: undefined | number\n wordSpacing: undefined | number\n fontVariant: undefined | FontVariantSetting\n } = {\n fontSize: 16,\n fontFamily: 'sans-serif',\n fontWeight: 'normal',\n fontStyle: 'normal',\n color: 'black',\n textAlign: 'left',\n verticalAlign: 'top',\n fontVariant: undefined,\n lineHeight: undefined,\n lineGap: 0,\n maxLines: undefined,\n ellipsis: false,\n letterSpacing: undefined,\n wordSpacing: undefined,\n }\n\n let defaultsApplied = false\n for (const key of Object.keys(textDefaults) as (keyof typeof textDefaults)[]) {\n if (this.props[key] === undefined && textDefaults[key] !== undefined) {\n this.props[key as string] = textDefaults[key]\n defaultsApplied = true\n }\n }\n\n if (defaultsApplied && !this.node.isDirty()) {\n const affectsMeasurement = [\n 'fontSize',\n 'fontFamily',\n 'fontWeight',\n 'fontStyle',\n 'lineHeight',\n 'maxLines',\n 'lineGap',\n 'letterSpacing',\n 'wordSpacing',\n ].some(measureKey => this.props[measureKey] === textDefaults[measureKey])\n if (affectsMeasurement) {\n this.node.markDirty()\n }\n }\n }\n\n /**\n * Processes Unix-like escape sequences in text strings.\n * Converts escaped characters into their actual representations.\n *\n * Supported escape sequences:\n * - \\n - Newline (line feed)\n * - \\t - Tab (converted to 4 spaces)\n * - \\r - Carriage return (treated as newline)\n * - \\\\ - Literal backslash\n * - \\' - Single quote\n * - \\\" - Double quote\n * - \\0 - Null character (removed)\n * - \\b - Backspace (removed)\n * - \\f - Form feed (treated as newline)\n * - \\v - Vertical tab (treated as newline)\n * @param input Raw text string potentially containing escape sequences\n * @returns Processed string with escape sequences converted\n */\n private processEscapeSequences(input: string): string {\n return input.replace(/\\\\(.)/g, (match, char) => {\n switch (char) {\n case 'n':\n return '\\n' // Newline\n case 't':\n return ' ' // Tab as 4 spaces\n case 'r':\n return '\\n' // Carriage return treated as newline\n case '\\\\':\n return '\\\\' // Literal backslash\n case \"'\":\n return \"'\" // Single quote\n case '\"':\n return '\"' // Double quote\n case '0':\n return '' // Null character (remove)\n case 'b':\n return '' // Backspace (remove)\n case 'f':\n return '\\n' // Form feed as newline\n case 'v':\n return '\\n' // Vertical tab as newline\n default:\n // Unknown escape sequence - keep original\n return match\n }\n })\n }\n\n /**\n * Parses input text with HTML-style markup into styled text segments.\n *\n * Supported tags:\n * - <color=\"value\"> - Sets text color (hex code or CSS color name)\n * - <weight=\"value\"> - Sets font weight (100-900 or keywords like \"bold\")\n * - <size=\"value\"> - Sets font size in pixels\n * - <b> - Makes text bold (shorthand for weight=\"bold\")\n * - <i> - Makes text italic\n *\n * Tag values can use double quotes, single quotes, or no quotes:\n * <color=\"red\">, <color='red'>, <color=red>\n *\n * Tags can be nested and must be properly closed with </tag>\n * @param input Text string containing markup tags\n * @param baseStyle Default style properties to apply to all segments\n * @returns Array of styled text segments with consistent style properties\n */\n private parseRichText(input: string, baseStyle: Partial<TextSegment>): TextSegment[] {\n // Match opening/closing tags with optional quoted/unquoted values\n // Capture groups: (1) closing slash, (2) tag name, (3) double quoted value, (4) single quoted value, (5) unquoted value\n const tagRegex = /<(\\/?)(\\w+)(?:=(?:\"([^\"]*)\"|'([^']*)'|([^\\s>]+)))?>/g\n const stack: Partial<TextSegment>[] = []\n const segments: TextSegment[] = []\n let lastIndex = 0\n let currentStyle: Partial<TextSegment> = { ...baseStyle }\n\n // Helper to create a styled segment ensuring all style properties are included\n const applyStyle = (text: string) => {\n if (!text) return\n segments.push({\n text,\n color: currentStyle.color,\n weight: currentStyle.weight,\n size: currentStyle.size,\n b: currentStyle.b,\n i: currentStyle.i,\n })\n }\n\n let match: RegExpExecArray | null\n while ((match = tagRegex.exec(input))) {\n const [, closingSlash, tagNameStr, quotedVal1, quotedVal2, unquotedVal] = match\n const tagName = tagNameStr.toLowerCase()\n const value = quotedVal1 || quotedVal2 || unquotedVal\n\n // Process text content before the current tag\n applyStyle(input.slice(lastIndex, match.index))\n lastIndex = tagRegex.lastIndex\n\n if (!closingSlash) {\n // Opening tag: Save current style state and apply new style\n stack.push({ ...currentStyle })\n\n switch (tagName) {\n case 'color':\n // Support any valid CSS color value\n currentStyle.color = value as TextSegment['color']\n break\n\n case 'weight':\n // Support numeric weights (100-900) or keywords\n currentStyle.weight = value as TextSegment['weight']\n break\n\n case 'size':\n // Parse pixel size as number, revert to default if invalid\n currentStyle.size = value ? Number(value) : undefined\n if (isNaN(currentStyle.size as number)) {\n console.warn(`[TextNode ${this.key || ''}] Invalid numeric value for size tag: ${value}`)\n currentStyle.size = undefined\n }\n break\n\n case 'b':\n // Simple bold flag\n currentStyle.b = true\n break\n\n case 'i':\n // Simple italic flag\n currentStyle.i = true\n break\n }\n } else {\n // Closing tag: Restore previous style state\n currentStyle = stack.pop() || { ...baseStyle }\n }\n }\n\n // Process remaining text after last tag\n applyStyle(input.slice(lastIndex))\n\n // Don't filter out empty segments - they might represent empty lines\n return segments\n }\n\n private formatSpacing(value: TextProps['letterSpacing'] | TextProps['wordSpacing']) {\n if (typeof value === 'number') return `${value}px`\n return value || 'normal'\n }\n\n private parseSpacingToPx(spacingValue: number | string | undefined, fontSize: number): number {\n if (spacingValue === undefined || spacingValue === 'normal') {\n return 0\n }\n if (typeof spacingValue === 'number') {\n return spacingValue // Treat raw number as px\n }\n if (typeof spacingValue === 'string') {\n const trimmed = spacingValue.trim()\n if (trimmed.endsWith('px')) {\n return parseFloat(trimmed) || 0\n }\n if (trimmed.endsWith('em')) {\n // Convert em based on the current font size\n return (parseFloat(trimmed) || 0) * fontSize\n }\n // Attempt to parse as a raw number (pixels) if no unit\n const parsed = parseFloat(trimmed)\n if (!isNaN(parsed)) {\n return parsed\n }\n }\n return 0 // Default fallback\n }\n\n /**\n * Generates a CSS font string by combining base TextProps with optional TextSegment styling.\n * Follows browser font string format: \"font-style font-weight font-size font-family\"\n *\n * Priority for style properties:\n * - Weight: segment <weight> tag > segment <b> tag > base fontWeight prop\n * - Style: segment <i> > base fontStyle\n * - Size: segment size > base fontSize\n * - Family: base fontFamily\n * @param segmentStyle Optional TextSegment styling to override base props\n * @returns Formatted CSS font string for canvas context\n */\n private getFontString(segmentStyle?: Partial<TextSegment>): string {\n const baseStyle = this.props\n let effectiveWeight: TextSegment['weight'] | number | undefined\n\n // Determine italic style - segment <i> tag overrides base style\n const effectiveStyle = segmentStyle?.i ? 'italic' : baseStyle.fontStyle || 'normal'\n\n // Determine font weight with priority:\n // 1. Segment explicit weight (<weight> tag)\n // 2. Segment bold flag (<b> tag)\n // 3. Base font weight prop\n if (segmentStyle?.weight) {\n effectiveWeight = segmentStyle.weight\n } else if (segmentStyle?.b) {\n effectiveWeight = 'bold'\n } else {\n effectiveWeight = baseStyle.fontWeight || 'normal'\n }\n\n // Use segment size if specified, otherwise base size with 16px default\n const effectiveSize = segmentStyle?.size ? segmentStyle.size : baseStyle.fontSize || 16\n\n // Combine properties into CSS font string format\n const style = {\n fontStyle: effectiveStyle,\n fontWeight: effectiveWeight,\n fontSize: effectiveSize,\n fontFamily: baseStyle.fontFamily || 'sans-serif',\n }\n\n return `${style.fontStyle} ${style.fontWeight} ${style.fontSize}px ${style.fontFamily}`\n }\n\n /**\n * Gets lines to process respecting maxLines constraint\n */\n private getLinesToMeasureOrRender(): TextSegment[][] {\n const maxLines = this.props.maxLines\n if (maxLines !== undefined && maxLines > 0 && this.lines.length > maxLines) {\n return this.lines.slice(0, maxLines)\n }\n return this.lines\n }\n\n /**\n * Measures text dimensions and calculates layout metrics for the YogaLayout engine.\n * Handles text wrapping, line height calculations, and dynamic leading.\n *\n * Line heights are determined by:\n * 1. Using props.lineHeight as fixed pixel value if provided\n * 2. Otherwise calculating dynamic height based on largest font size per line\n * 3. Adding leading space above/below text content\n * 4. Including specified line gaps between lines\n * @param widthConstraint Maximum allowed width in pixels for text layout\n * @param widthMode YogaLayout mode determining how width constraint is applied\n * @returns Calculated minimum dimensions required to render text content\n * - width: Total width needed for text layout\n * - height: Total height including line heights and gaps\n */\n private measureText(widthConstraint: number, widthMode: MeasureMode): { width: number; height: number } {\n // Create measurement canvas if not exists\n if (!TextNode.measurementContext) {\n TextNode.measurementContext = new Canvas(1, 1).getContext('2d')\n }\n const baseFontSize = this.props.fontSize || 16\n const ctx = TextNode.measurementContext!\n ctx.save()\n\n // Setup text measurement context\n ctx.letterSpacing = this.formatSpacing(this.props.letterSpacing)\n ctx.wordSpacing = 'normal' // Handled manually via parsedWordSpacingPx\n const parsedWordSpacingPx = this.parseSpacingToPx(this.props.wordSpacing, baseFontSize)\n\n // Pre-measure each text segment width with its specific styling\n for (const segment of this.segments) {\n ctx.font = this.getFontString(segment)\n if (typeof this.props.fontVariant === 'string') {\n ctx.fontVariant = this.props.fontVariant\n } else if (this.props.fontVariant !== undefined) {\n console.warn(`[TextNode ${this.key || ''}] Invalid fontVariant prop type in measureText (segment width):`, this.props.fontVariant)\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n } else {\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n }\n segment.width = ctx.measureText(segment.text).width\n }\n\n // Calculate available layout width\n const availableWidthForContent = widthMode === Style.MeasureMode.Undefined ? Infinity : Math.max(0, widthConstraint)\n const epsilon = 0.001 // Float precision compensation\n\n // Wrap text into lines based on available width\n this.lines = this.wrapTextRich(ctx, this.segments, availableWidthForContent + epsilon, parsedWordSpacingPx)\n\n // Initialize line metrics arrays\n this.lineHeights = [] // Final heights including leading\n this.lineAscents = [] // Text ascent heights\n this.lineContentHeights = [] // Raw content heights (ascent + descent)\n\n let totalTextHeight = 0\n const linesToMeasure = this.getLinesToMeasureOrRender()\n const numLines = linesToMeasure.length\n const defaultLineHeightMultiplier = 1.2 // Base leading multiplier\n\n // Calculate metrics for each line\n for (const line of linesToMeasure) {\n let maxAscent = 0\n let maxDescent = 0\n let maxFontSizeOnLine = 0\n\n // Handle empty line metrics\n if (line.length === 0) {\n ctx.font = this.getFontString()\n if (typeof this.props.fontVariant === 'string') {\n ctx.fontVariant = this.props.fontVariant\n } else if (this.props.fontVariant !== undefined) {\n console.warn(`[TextNode ${this.key || ''}] Invalid fontVariant prop type in measureText (empty line):`, this.props.fontVariant)\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n } else {\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n }\n const metrics = ctx.measureText(this.metricsString)\n maxAscent = metrics.actualBoundingBoxAscent ?? baseFontSize * 0.8\n maxDescent = metrics.actualBoundingBoxDescent ?? baseFontSize * 0.2\n maxFontSizeOnLine = baseFontSize\n } else {\n // Calculate max metrics across all segments in line\n for (const segment of line) {\n if (/^\\s+$/.test(segment.text)) continue\n\n const segmentSize = segment.size || baseFontSize\n maxFontSizeOnLine = Math.max(maxFontSizeOnLine, segmentSize)\n\n ctx.font = this.getFontString(segment)\n if (typeof this.props.fontVariant === 'string') {\n ctx.fontVariant = this.props.fontVariant\n } else if (this.props.fontVariant !== undefined) {\n console.warn(`[TextNode ${this.key || ''}] Invalid fontVariant prop type in measureText (segment height):`, this.props.fontVariant)\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n } else {\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n }\n\n const metrics = ctx.measureText(this.metricsString)\n const ascent = metrics.actualBoundingBoxAscent ?? segmentSize * 0.8\n const descent = metrics.actualBoundingBoxDescent ?? segmentSize * 0.2\n\n maxAscent = Math.max(maxAscent, ascent)\n maxDescent = Math.max(maxDescent, descent)\n }\n }\n\n // Fallback metrics for lines with only whitespace\n if (maxAscent === 0 && maxDescent === 0 && line.length > 0) {\n ctx.font = this.getFontString()\n if (typeof this.props.fontVariant === 'string') {\n ctx.fontVariant = this.props.fontVariant\n } else if (this.props.fontVariant !== undefined) {\n console.warn(`[TextNode ${this.key || ''}] Invalid fontVariant prop type in measureText (fallback):`, this.props.fontVariant)\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n } else {\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n }\n const metrics = ctx.measureText(this.metricsString)\n maxAscent = metrics.actualBoundingBoxAscent ?? baseFontSize * 0.8\n maxDescent = metrics.actualBoundingBoxDescent ?? baseFontSize * 0.2\n maxFontSizeOnLine = maxFontSizeOnLine || baseFontSize\n }\n\n maxFontSizeOnLine = maxFontSizeOnLine || baseFontSize\n\n // Calculate total content height for line\n const actualContentHeight = maxAscent + maxDescent\n\n // Determine final line box height with leading\n const targetLineBoxHeight =\n typeof this.props.lineHeight === 'number' && this.props.lineHeight > 0 ? this.props.lineHeight : maxFontSizeOnLine * defaultLineHeightMultiplier\n\n // Use larger of target height or content height to prevent clipping\n const finalLineHeight = Math.max(actualContentHeight, targetLineBoxHeight)\n\n // Store line metrics for rendering\n this.lineHeights.push(finalLineHeight)\n this.lineAscents.push(maxAscent)\n this.lineContentHeights.push(actualContentHeight)\n\n totalTextHeight += finalLineHeight\n }\n\n // Add line gap spacing to total height\n const lineGapValue = this.props.lineGap\n const totalGapHeight = Math.max(0, (numLines - 1) * lineGapValue)\n const calculatedContentHeight = totalTextHeight + totalGapHeight\n\n // Calculate width required for text content\n const spaceWidth = this.measureSpaceWidth(ctx)\n let singleLineWidth = 0\n let firstWordInSingleLine = true\n for (const segment of this.segments) {\n const words = segment.text.split(/(\\s+)/).filter(Boolean)\n for (const word of words) {\n if (/^\\s+$/.test(word)) continue\n ctx.font = this.getFontString(segment)\n if (typeof this.props.fontVariant === 'string') {\n ctx.fontVariant = this.props.fontVariant\n } else if (this.props.fontVariant !== undefined) {\n console.warn(`[TextNode ${this.key || ''}] Invalid fontVariant prop type in measureText (single line width):`, this.props.fontVariant)\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n } else {\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n }\n const wordWidth = ctx.measureText(word).width\n if (!firstWordInSingleLine) {\n singleLineWidth += spaceWidth + parsedWordSpacingPx\n }\n singleLineWidth += wordWidth\n firstWordInSingleLine = false\n }\n }\n\n // Determine final content width based on wrapping\n let requiredContentWidth: number\n if (singleLineWidth <= availableWidthForContent) {\n requiredContentWidth = singleLineWidth\n if (linesToMeasure.length > 1 && this.props.maxLines !== 1 && !this.segments.some(s => s.text.includes('\\n'))) {\n console.warn(\n `[TextNode ${this.key || ''}] Rich text should fit (${singleLineWidth.toFixed(2)} <= ${availableWidthForContent.toFixed(2)}) but wrapTextRich produced ${linesToMeasure.length} lines. Width calculation might be slightly off due to complex spacing/kerning.`,\n )\n let maxWrappedLineWidth = 0\n for (const line of linesToMeasure) {\n let currentLineWidth = 0\n let firstWordOnWrappedLine = true\n for (const segment of line) {\n const segmentWidth = segment.width ?? 0\n const isSpaceSegment = /^\\s+$/.test(segment.text)\n if (!isSpaceSegment) {\n if (!firstWordOnWrappedLine) {\n currentLineWidth += spaceWidth + parsedWordSpacingPx\n }\n currentLineWidth += segmentWidth\n firstWordOnWrappedLine = false\n }\n }\n maxWrappedLineWidth = Math.max(maxWrappedLineWidth, currentLineWidth)\n }\n requiredContentWidth = Math.max(singleLineWidth, maxWrappedLineWidth)\n }\n } else {\n let maxWrappedLineWidth = 0\n for (const line of linesToMeasure) {\n let currentLineWidth = 0\n let firstWordOnWrappedLine = true\n for (const segment of line) {\n const segmentWidth = segment.width ?? 0\n const isSpaceSegment = /^\\s+$/.test(segment.text)\n if (!isSpaceSegment) {\n if (!firstWordOnWrappedLine) {\n currentLineWidth += spaceWidth + parsedWordSpacingPx\n }\n currentLineWidth += segmentWidth\n firstWordOnWrappedLine = false\n }\n }\n maxWrappedLineWidth = Math.max(maxWrappedLineWidth, currentLineWidth)\n }\n requiredContentWidth = maxWrappedLineWidth\n }\n\n // Constrain width if needed\n let finalContentWidth = requiredContentWidth\n if (availableWidthForContent !== Infinity) {\n finalContentWidth = Math.min(requiredContentWidth, availableWidthForContent)\n }\n\n ctx.restore()\n return {\n width: Math.max(0, finalContentWidth),\n height: Math.max(0, calculatedContentHeight),\n }\n }\n\n /**\n * Wraps text segments into multiple lines while respecting width constraints and preserving styling.\n * Handles rich text attributes (color, weight, size, bold, italic) and proper word wrapping.\n * Also respects explicit newline characters (\\n) for forced line breaks.\n * @param ctx Canvas rendering context used for text measurements\n * @param segments Array of text segments with styling information\n * @param maxWidth Maximum allowed width for each line in pixels\n * @param parsedWordSpacingPx Additional spacing to add between words in pixels\n * @returns Array of lines, where each line contains styled text segments\n */\n private wrapTextRich(ctx: CanvasRenderingContext2D, segments: TextSegment[], maxWidth: number, parsedWordSpacingPx: number): TextSegment[][] {\n const lines: TextSegment[][] = []\n\n if (segments.length === 0 || maxWidth <= 0) return lines\n\n let currentLineSegments: TextSegment[] = []\n let currentLineWidth = 0\n const spaceWidth = this.measureSpaceWidth(ctx)\n\n // Helper to finalize current line and start new one\n const finalizeLine = (forceEmpty = false) => {\n // Remove trailing whitespace segments unless we're forcing an empty line\n if (!forceEmpty) {\n while (currentLineSegments.length > 0 && /^\\s+$/.test(currentLineSegments[currentLineSegments.length - 1].text)) {\n currentLineSegments.pop()\n }\n }\n // Always push the line, even if empty (for \\n\\n cases)\n lines.push(currentLineSegments)\n currentLineSegments = []\n currentLineWidth = 0\n }\n\n for (const segment of segments) {\n // Preserve all style attributes for consistency\n const segmentStyle = {\n color: segment.color,\n weight: segment.weight,\n size: segment.size,\n b: segment.b,\n i: segment.i,\n }\n\n // Check if segment contains newline characters\n if (segment.text.includes('\\n')) {\n // Split by newlines and process each part\n const parts = segment.text.split('\\n')\n\n for (let i = 0; i < parts.length; i++) {\n const part = parts[i]\n const isLastPart = i === parts.length - 1\n\n if (part.length > 0) {\n // Process this part normally\n const wordsAndSpaces = part.split(/(\\s+)/).filter(Boolean)\n\n for (const wordOrSpace of wordsAndSpaces) {\n const isSpace = /^\\s+$/.test(wordOrSpace)\n let wordSegment: TextSegment\n let wordWidth: number\n\n if (isSpace) {\n wordSegment = { text: wordOrSpace, ...segmentStyle, width: 0 }\n wordWidth = 0\n } else {\n ctx.font = this.getFontString(segmentStyle)\n if (this.props.fontVariant) ctx.fontVariant = this.props.fontVariant\n wordWidth = ctx.measureText(wordOrSpace).width\n wordSegment = { text: wordOrSpace, ...segmentStyle, width: wordWidth }\n }\n\n const needsSpace = currentLineSegments.length > 0 && !/^\\s+$/.test(currentLineSegments[currentLineSegments.length - 1].text)\n const spaceToAdd = needsSpace ? spaceWidth + parsedWordSpacingPx : 0\n\n if (currentLineWidth + spaceToAdd + wordWidth <= maxWidth || currentLineSegments.length === 0) {\n if (needsSpace) {\n currentLineSegments.push({ text: ' ', ...segmentStyle, width: 0 })\n currentLineWidth += spaceToAdd\n }\n currentLineSegments.push(wordSegment)\n currentLineWidth += wordWidth\n } else {\n if (currentLineSegments.length > 0) {\n finalizeLine()\n }\n\n if (!isSpace) {\n if (wordWidth > maxWidth && maxWidth > 0) {\n const brokenParts = this.breakWordRich(ctx, wordSegment, maxWidth)\n\n if (brokenParts.length > 0) {\n for (let k = 0; k < brokenParts.length - 1; k++) {\n lines.push([brokenParts[k]])\n }\n currentLineSegments = [brokenParts[brokenParts.length - 1]]\n currentLineWidth = brokenParts[brokenParts.length - 1].width ?? 0\n } else {\n currentLineSegments = [wordSegment]\n currentLineWidth = wordWidth\n }\n } else {\n currentLineSegments = [wordSegment]\n currentLineWidth = wordWidth\n }\n }\n }\n }\n }\n\n // Force line break after each part except the last\n // If part is empty, this creates an empty line (like \\n\\n)\n if (!isLastPart) {\n finalizeLine(part.length === 0)\n }\n }\n } else {\n // No newlines - process normally\n const wordsAndSpaces = segment.text.split(/(\\s+)/).filter(Boolean)\n\n for (const wordOrSpace of wordsAndSpaces) {\n const isSpace = /^\\s+$/.test(wordOrSpace)\n let wordSegment: TextSegment\n let wordWidth: number\n\n if (isSpace) {\n wordSegment = { text: wordOrSpace, ...segmentStyle, width: 0 }\n wordWidth = 0\n } else {\n ctx.font = this.getFontString(segmentStyle)\n if (this.props.fontVariant) ctx.fontVariant = this.props.fontVariant\n wordWidth = ctx.measureText(wordOrSpace).width\n wordSegment = { text: wordOrSpace, ...segmentStyle, width: wordWidth }\n }\n\n const needsSpace = currentLineSegments.length > 0 && !/^\\s+$/.test(currentLineSegments[currentLineSegments.length - 1].text)\n const spaceToAdd = needsSpace ? spaceWidth + parsedWordSpacingPx : 0\n\n if (currentLineWidth + spaceToAdd + wordWidth <= maxWidth || currentLineSegments.length === 0) {\n if (needsSpace) {\n currentLineSegments.push({ text: ' ', ...segmentStyle, width: 0 })\n currentLineWidth += spaceToAdd\n }\n currentLineSegments.push(wordSegment)\n currentLineWidth += wordWidth\n } else {\n if (currentLineSegments.length > 0) {\n finalizeLine()\n }\n\n if (!isSpace) {\n if (wordWidth > maxWidth && maxWidth > 0) {\n const brokenParts = this.breakWordRich(ctx, wordSegment, maxWidth)\n\n if (brokenParts.length > 0) {\n for (let k = 0; k < brokenParts.length - 1; k++) {\n lines.push([brokenParts[k]])\n }\n currentLineSegments = [brokenParts[brokenParts.length - 1]]\n currentLineWidth = brokenParts[brokenParts.length - 1].width ?? 0\n } else {\n currentLineSegments = [wordSegment]\n currentLineWidth = wordWidth\n }\n } else {\n currentLineSegments = [wordSegment]\n currentLineWidth = wordWidth\n }\n }\n }\n }\n }\n }\n\n finalizeLine()\n return lines\n }\n\n /**\n * Breaks a word segment into multiple segments that each fit within the specified width constraint.\n * Maintains all styling properties (color, weight, size, bold, italic) across broken segments.\n * @param ctx Canvas rendering context used for text measurements\n * @param segmentToBreak Original text segment to split\n * @param maxWidth Maximum width allowed for each resulting segment\n * @returns Array of TextSegments, each fitting maxWidth, or original segment if no breaking needed\n */\n private breakWordRich(ctx: CanvasRenderingContext2D, segmentToBreak: TextSegment, maxWidth: number): TextSegment[] {\n const word = segmentToBreak.text\n\n // Copy all style properties to maintain consistent styling across broken segments\n const style = {\n color: segmentToBreak.color,\n weight: segmentToBreak.weight,\n size: segmentToBreak.size,\n b: segmentToBreak.b,\n i: segmentToBreak.i,\n }\n\n if (maxWidth <= 0) return [segmentToBreak]\n\n const brokenSegments: TextSegment[] = []\n let currentPartText = ''\n\n // Configure context with segment style for accurate measurements\n ctx.font = this.getFontString(style)\n if (this.props.fontVariant) ctx.fontVariant = this.props.fontVariant\n\n // Process word character by character to find valid break points\n for (const char of word) {\n const testPartText = currentPartText + char\n const testPartWidth = ctx.measureText(testPartText).width\n\n if (testPartWidth > maxWidth) {\n // Current accumulated text exceeds width - create new segment\n if (currentPartText) {\n brokenSegments.push({\n text: currentPartText,\n ...style,\n width: ctx.measureText(currentPartText).width,\n })\n }\n\n // Handle current character that caused overflow\n currentPartText = char\n const currentCharWidth = ctx.measureText(currentPartText).width\n\n if (currentCharWidth > maxWidth) {\n // Single character is too wide - force break after it\n brokenSegments.push({\n text: currentPartText,\n ...style,\n width: currentCharWidth,\n })\n currentPartText = ''\n }\n } else {\n // Character fits - add to current part\n currentPartText = testPartText\n }\n }\n\n // Handle any remaining text as final segment\n if (currentPartText) {\n brokenSegments.push({\n text: currentPartText,\n ...style,\n width: ctx.measureText(currentPartText).width,\n })\n }\n\n return brokenSegments.length > 0 ? brokenSegments : [segmentToBreak]\n }\n\n /**\n * Measures width of space character using base font\n */\n private measureSpaceWidth(ctx: CanvasRenderingContext2D): number {\n const originalFont = ctx.font\n ctx.font = this.getFontString()\n const width = ctx.measureText(' ').width\n ctx.font = originalFont\n return width > 0 ? width : (this.props.fontSize || 16) * 0.3\n }\n\n /**\n * Renders multi-line text content with rich text styling and layout features\n *\n * Core features:\n * - Dynamic line heights with leading/spacing controls\n * - Vertical text alignment (top/middle/bottom)\n * - Horizontal text alignment (left/center/right/justify)\n * - Text wrapping within bounds\n * - Ellipsis truncation\n * - Rich text styling per segment (color, weight, size, etc)\n * - Performance optimizations (clipping, visibility checks)\n * @param ctx Canvas rendering context\n * @param x Content box left position in pixels\n * @param y Content box top position in pixels\n * @param width Content box total width including padding\n * @param height Content box total height including padding\n */\n protected override _renderContent(ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height: number) {\n super._renderContent(ctx, x, y, width, height)\n\n ctx.save()\n ctx.textBaseline = 'alphabetic'\n ctx.letterSpacing = this.formatSpacing(this.props.letterSpacing)\n ctx.wordSpacing = 'normal'\n\n const baseFontSize = this.props.fontSize || 16\n const parsedWordSpacingPx = this.parseSpacingToPx(this.props.wordSpacing, baseFontSize)\n\n // Calculate content box with padding\n const paddingLeft = this.node.getComputedPadding(Style.Edge.Left) ?? 0\n const paddingTop = this.node.getComputedPadding(Style.Edge.Top) ?? 0\n const paddingRight = this.node.getComputedPadding(Style.Edge.Right) ?? 0\n const paddingBottom = this.node.getComputedPadding(Style.Edge.Bottom) ?? 0\n const contentX = x + paddingLeft\n const contentY = y + paddingTop\n const contentWidth = Math.max(0, width - paddingLeft - paddingRight)\n const contentHeight = Math.max(0, height - paddingTop - paddingBottom)\n\n if (contentWidth <= 0 || contentHeight <= 0) {\n ctx.restore()\n return\n }\n\n // Re-calculate lines based on the actual render width to ensure consistency\n // This fixes issues where Yoga Layout might use a cached measurement from a different\n // width constraint (e.g., during a flex shrink pass) but final layout is wider.\n const spaceWidth = this.measureSpaceWidth(ctx)\n // Use a small epsilon for float precision issues\n const epsilon = 0.01\n const allLines = this.wrapTextRich(ctx, this.segments, contentWidth + epsilon, parsedWordSpacingPx)\n\n const needsEllipsis = this.props.ellipsis && this.props.maxLines !== undefined && allLines.length > this.props.maxLines\n\n // Apply maxLines constraint to get the visible lines\n const visibleLines = this.props.maxLines !== undefined && this.props.maxLines > 0 ? allLines.slice(0, this.props.maxLines) : allLines\n\n const numLinesToRender = visibleLines.length\n\n // Recalculate line metrics for the rendered lines\n // We cannot rely on this.lineHeights from measureText because it might correspond to different wrapping\n const lineHeights: number[] = []\n const lineAscents: number[] = []\n const lineContentHeights: number[] = []\n const defaultLineHeightMultiplier = 1.2\n let totalTextHeight = 0\n\n for (const line of visibleLines) {\n let maxAscent = 0\n let maxDescent = 0\n let maxFontSizeOnLine = 0\n\n if (line.length === 0) {\n ctx.font = this.getFontString()\n if (this.props.fontVariant) ctx.fontVariant = typeof this.props.fontVariant === 'string' ? this.props.fontVariant : 'normal'\n const metrics = ctx.measureText(this.metricsString)\n maxAscent = metrics.actualBoundingBoxAscent ?? baseFontSize * 0.8\n maxDescent = metrics.actualBoundingBoxDescent ?? baseFontSize * 0.2\n maxFontSizeOnLine = baseFontSize\n } else {\n for (const segment of line) {\n if (/^\\s+$/.test(segment.text)) continue\n const segmentSize = segment.size || baseFontSize\n maxFontSizeOnLine = Math.max(maxFontSizeOnLine, segmentSize)\n\n // Style context for accurate metrics\n ctx.font = this.getFontString(segment)\n if (this.props.fontVariant) ctx.fontVariant = typeof this.props.fontVariant === 'string' ? this.props.fontVariant : 'normal'\n\n const metrics = ctx.measureText(this.metricsString)\n const ascent = metrics.actualBoundingBoxAscent ?? segmentSize * 0.8\n const descent = metrics.actualBoundingBoxDescent ?? segmentSize * 0.2\n maxAscent = Math.max(maxAscent, ascent)\n maxDescent = Math.max(maxDescent, descent)\n }\n }\n if (maxAscent === 0 && maxDescent === 0 && line.length > 0) {\n // Fallback\n ctx.font = this.getFontString()\n if (this.props.fontVariant) ctx.fontVariant = typeof this.props.fontVariant === 'string' ? this.props.fontVariant : 'normal'\n const metrics = ctx.measureText(this.metricsString)\n maxAscent = metrics.actualBoundingBoxAscent ?? baseFontSize * 0.8\n maxDescent = metrics.actualBoundingBoxDescent ?? baseFontSize * 0.2\n maxFontSizeOnLine = maxFontSizeOnLine || baseFontSize\n }\n maxFontSizeOnLine = maxFontSizeOnLine || baseFontSize\n const actualContentHeight = maxAscent + maxDescent\n const targetLineBoxHeight =\n typeof this.props.lineHeight === 'number' && this.props.lineHeight > 0 ? this.props.lineHeight : maxFontSizeOnLine * defaultLineHeightMultiplier\n const finalLineHeight = Math.max(actualContentHeight, targetLineBoxHeight)\n\n lineHeights.push(finalLineHeight)\n lineAscents.push(maxAscent)\n lineContentHeights.push(actualContentHeight)\n totalTextHeight += finalLineHeight\n }\n\n if (numLinesToRender === 0) {\n ctx.restore()\n return\n }\n\n // Calculate vertical alignment offset\n const lineGapValue = this.props.lineGap\n const totalCalculatedTextHeight = totalTextHeight + Math.max(0, numLinesToRender - 1) * lineGapValue\n\n let blockStartY: number\n switch (this.props.verticalAlign) {\n case 'middle':\n blockStartY = contentY + (contentHeight - totalCalculatedTextHeight) / 2\n break\n case 'bottom':\n blockStartY = contentY + contentHeight - totalCalculatedTextHeight\n break\n case 'top':\n default:\n blockStartY = contentY\n }\n\n let currentLineTopY = blockStartY\n\n // Setup text content clipping region\n ctx.beginPath()\n ctx.rect(contentX, contentY, contentWidth, contentHeight)\n ctx.clip()\n\n // Configure ellipsis if needed\n const ellipsisChar = typeof this.props.ellipsis === 'string' ? this.props.ellipsis : '...'\n let ellipsisWidth = 0\n let ellipsisStyle: Partial<TextSegment> | undefined = undefined\n\n if (needsEllipsis) {\n const lastRenderedLine = visibleLines[visibleLines.length - 1]\n // ... ellipsis calculation ...\n const lastTextStyleSegment = [...lastRenderedLine].reverse().find(seg => !/^\\s+$/.test(seg.text))\n ellipsisStyle = lastTextStyleSegment\n ? {\n color: lastTextStyleSegment.color,\n weight: lastTextStyleSegment.weight,\n size: lastTextStyleSegment.size,\n b: lastTextStyleSegment.b,\n i: lastTextStyleSegment.i,\n }\n : undefined\n\n ctx.save()\n ctx.font = this.getFontString(ellipsisStyle)\n if (this.props.fontVariant) {\n ctx.fontVariant = typeof this.props.fontVariant === 'string' ? this.props.fontVariant : 'normal'\n }\n ellipsisWidth = ctx.measureText(ellipsisChar).width\n ctx.restore()\n }\n\n // Render text content line by line\n for (let i = 0; i < numLinesToRender; i++) {\n const lineSegments = visibleLines[i]\n const currentLineFinalHeight = lineHeights[i]\n const currentLineMaxAscent = lineAscents[i]\n const currentLineContentHeight = lineContentHeights[i]\n\n // Calculate line spacing metrics\n const currentLineLeading = currentLineFinalHeight - currentLineContentHeight\n const currentLineSpaceAbove = Math.max(0, currentLineLeading / 2)\n const lineY = currentLineTopY + currentLineSpaceAbove + currentLineMaxAscent\n\n // Visibility culling check\n const lineTop = currentLineTopY\n const lineBottom = currentLineTopY + currentLineFinalHeight\n\n // Don't skip empty lines - they're intentional (from \\n\\n)\n // Only skip if the line is completely outside the visible area\n if (lineBottom <= contentY || lineTop >= contentY + contentHeight) {\n currentLineTopY += currentLineFinalHeight + lineGapValue\n continue\n }\n\n const isLastRenderedLine = i === numLinesToRender - 1\n\n // Calculate line width metrics for alignment\n let totalLineWidth = 0\n let totalWordsWidth = 0\n let numWordGaps = 0\n let firstWordOnLine = true\n const noSpaceBeforePunctuation = /^[.,!?;:)\\]}]/\n\n for (const segment of lineSegments) {\n const segmentWidth = segment.width ?? 0\n const isSpaceSegment = /^\\s+$/.test(segment.text)\n\n if (!isSpaceSegment) {\n if (!firstWordOnLine) {\n totalLineWidth += spaceWidth + parsedWordSpacingPx\n if (!noSpaceBeforePunctuation.test(segment.text)) {\n numWordGaps++\n }\n }\n totalLineWidth += segmentWidth\n totalWordsWidth += segmentWidth\n firstWordOnLine = false\n }\n }\n\n // Calculate horizontal alignment position\n const isJustify = this.props.textAlign === 'justify' && !isLastRenderedLine\n const lineTextAlign = isJustify ? 'left' : this.props.textAlign || 'left'\n let currentX: number\n\n switch (lineTextAlign) {\n case 'center':\n currentX = contentX + (contentWidth - totalLineWidth) / 2\n break\n case 'right':\n case 'end':\n currentX = contentX + contentWidth - totalLineWidth\n break\n case 'left':\n case 'start':\n default:\n currentX = contentX\n }\n currentX = Math.max(contentX, currentX)\n\n // Calculate justification spacing\n let spacePerWordGapPlusSpacing = spaceWidth + parsedWordSpacingPx\n if (isJustify && numWordGaps > 0 && totalLineWidth < contentWidth) {\n const totalBaseSpacingWidth = numWordGaps * (spaceWidth + parsedWordSpacingPx)\n const remainingSpace = contentWidth - totalWordsWidth - totalBaseSpacingWidth\n if (remainingSpace > 0) {\n spacePerWordGapPlusSpacing += remainingSpace / numWordGaps\n }\n }\n\n // Render line segments (skip rendering for truly empty lines)\n if (lineSegments.length > 0 && !lineSegments.every(s => s.text.trim() === '')) {\n let accumulatedWidth = 0\n let ellipsisApplied = false\n let firstWordDrawn = false\n\n for (let j = 0; j < lineSegments.length; j++) {\n const segment = lineSegments[j]\n const segmentWidth = segment.width ?? 0\n const isLastSegmentOnLine = j === lineSegments.length - 1\n const isSpaceSegment = /^\\s+$/.test(segment.text)\n\n // Calculate word spacing\n let spaceToAddBefore = 0\n if (!isSpaceSegment && firstWordDrawn && !noSpaceBeforePunctuation.test(segment.text)) {\n spaceToAddBefore = isJustify ? spacePerWordGapPlusSpacing : spaceWidth + parsedWordSpacingPx\n }\n\n // Apply segment styles\n ctx.font = this.getFontString(segment)\n ctx.fillStyle = segment.color || this.props.color || 'black'\n\n if (typeof this.props.fontVariant === 'string') {\n ctx.fontVariant = this.props.fontVariant\n } else if (this.props.fontVariant !== undefined) {\n console.warn(`[TextNode ${this.key || ''}] Invalid fontVariant prop type in _renderContent (segment render):`, this.props.fontVariant)\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n } else {\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n }\n\n // Handle text truncation and ellipsis\n let textToDraw = segment.text\n let currentSegmentRenderWidth = segmentWidth\n let applyEllipsisAfter = false\n\n if (isLastRenderedLine && needsEllipsis && !isSpaceSegment) {\n const currentTotalWidth = accumulatedWidth + spaceToAddBefore + segmentWidth\n const spaceNeededAfter = isLastSegmentOnLine ? 0 : isJustify ? spacePerWordGapPlusSpacing : spaceWidth + parsedWordSpacingPx\n\n if (currentTotalWidth > contentWidth - spaceNeededAfter) {\n const availableWidthForSegment = contentWidth - accumulatedWidth - spaceToAddBefore - ellipsisWidth\n if (availableWidthForSegment > 0) {\n let truncatedText = ''\n for (const char of segment.text) {\n if (ctx.measureText(truncatedText + char).width <= availableWidthForSegment) {\n truncatedText += char\n } else {\n break\n }\n }\n textToDraw = truncatedText\n currentSegmentRenderWidth = ctx.measureText(textToDraw).width\n } else {\n textToDraw = ''\n currentSegmentRenderWidth = 0\n }\n applyEllipsisAfter = true\n ellipsisApplied = true\n } else if (isLastSegmentOnLine) {\n applyEllipsisAfter = true\n ellipsisApplied = true\n }\n }\n\n // Render text segment\n currentX += spaceToAddBefore\n accumulatedWidth += spaceToAddBefore\n\n const remainingRenderWidth = contentX + contentWidth - currentX\n if (currentSegmentRenderWidth > 0 && remainingRenderWidth > 0 && !isSpaceSegment) {\n ctx.textAlign = 'left'\n\n const shadows = this.props.textShadow ? (Array.isArray(this.props.textShadow) ? this.props.textShadow : [this.props.textShadow]) : []\n\n ctx.save()\n\n // Draw shadows\n for (const shadow of shadows) {\n ctx.shadowColor = shadow.color || 'transparent'\n ctx.shadowBlur = shadow.blur || 0\n ctx.shadowOffsetX = shadow.offsetX || 0\n ctx.shadowOffsetY = shadow.offsetY || 0\n ctx.fillText(textToDraw, currentX, lineY, Math.max(0, remainingRenderWidth + 1))\n }\n\n // Reset shadow to draw the main text\n ctx.shadowColor = 'transparent'\n ctx.shadowBlur = 0\n ctx.shadowOffsetX = 0\n ctx.shadowOffsetY = 0\n\n ctx.fillText(textToDraw, currentX, lineY, Math.max(0, remainingRenderWidth + 1))\n\n ctx.restore()\n\n firstWordDrawn = true\n }\n\n currentX += currentSegmentRenderWidth\n accumulatedWidth += currentSegmentRenderWidth\n\n // Render ellipsis\n if (applyEllipsisAfter) {\n const ellipsisRemainingWidth = contentX + contentWidth - currentX\n if (ellipsisRemainingWidth >= ellipsisWidth) {\n ctx.save()\n ctx.font = this.getFontString(ellipsisStyle)\n\n if (typeof this.props.fontVariant === 'string') {\n ctx.fontVariant = this.props.fontVariant\n } else if (this.props.fontVariant !== undefined) {\n console.warn(`[TextNode ${this.key || ''}] Invalid fontVariant prop type in _renderContent (ellipsis draw):`, this.props.fontVariant)\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n } else {\n if (ctx.fontVariant !== 'normal') ctx.fontVariant = 'normal'\n }\n\n ctx.fillStyle = ellipsisStyle?.color || this.props.color || 'black'\n ctx.fillText(ellipsisChar, currentX, lineY, Math.max(0, ellipsisRemainingWidth + 1))\n ctx.restore()\n }\n break\n }\n\n if (ellipsisApplied && currentX >= contentX + contentWidth) break\n }\n }\n\n currentLineTopY += currentLineFinalHeight + lineGapValue\n }\n\n ctx.restore()\n }\n}\n\n/**\n * Creates a new TextNode instance with rich text support\n */\nexport const Text = (text: number | string, props?: TextProps) => new TextNode(text, props)\n"],"names":["BoxNode","Canvas","Style"],"mappings":";;;;;;AAAA;AAOA;;;AAGG;AACG,MAAO,QAAS,SAAQA,0BAAO,CAAA;IAClB,QAAQ,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AE,sBAAsB,GAAG,CAAC,CAAC,CAAC;4BACpF,GAAG,CAAC,OAAO,EAAE;wBACf;wBACA;oBACF;AAEA,oBAAA,IAAI,eAAe,IAAI,QAAQ,IAAI,QAAQ,GAAG,YAAY;wBAAE;gBAC9D;YACF;AAEA,YAAA,eAAe,IAAI,sBAAsB,GAAG,YAAY;QAC1D;QAEA,GAAG,CAAC,OAAO,EAAE;IACf;;AAGF;;AAEG;AACI,MAAM,IAAI,GAAG,CAAC,IAAqB,EAAE,KAAiB,KAAK,IAAI,QAAQ,CAAC,IAAI,EAAE,KAAK;;;;;"}
@@ -469,6 +469,18 @@ export interface BoxProps extends BaseProps {
469
469
  */
470
470
  children?: Children | Children[];
471
471
  }
472
+ /**
473
+ * Defines the properties for a GridItemNode.
474
+ * Includes all BoxProperties plus Grid placement properties.
475
+ */
476
+ export interface GridItemProps extends BoxProps {
477
+ /**
478
+ * Grid Placement Props
479
+ */
480
+ gridColumn?: string;
481
+ gridRow?: string;
482
+ gridArea?: string;
483
+ }
472
484
  /**
473
485
  * Defines the properties for a RootNode.
474
486
  */
@@ -482,24 +494,43 @@ export interface RootProps extends BoxProps {
482
494
  /** Font files to register for use */
483
495
  fonts?: FontRegistrationInfo[];
484
496
  }
497
+ /**
498
+ * Tracks can be specified as:
499
+ * - `number` (pixels)
500
+ * - `'auto'`
501
+ * - `${number}fr` (fraction of available space)
502
+ * - `${number}%` (percentage of container size)
503
+ */
504
+ export type GridTrackSize = number | 'auto' | `${number}fr` | `${number}%`;
485
505
  /**
486
506
  * Defines the properties for a GridNode.
487
507
  */
488
- export interface GridProps extends Omit<BoxProps, 'direction'> {
508
+ export interface GridProps extends BoxProps {
489
509
  /**
490
510
  * Number of columns in the grid layout.
491
511
  * @default 1
492
512
  */
493
513
  columns?: number;
494
514
  /**
495
- * Direction of the grid layout.
496
- * - 'row': Items are arranged horizontally (default)
497
- * - 'column': Items are arranged vertically
498
- * - 'row-reverse': Items are arranged horizontally in reverse order
499
- * - 'column-reverse': Items are arranged vertically in reverse order
515
+ * Defines the columns of the grid with a space-separated list of track sizes.
516
+ * @example ['100px', '1fr', 'auto']
517
+ */
518
+ templateColumns?: GridTrackSize[];
519
+ /**
520
+ * Defines the rows of the grid with a space-separated list of track sizes.
521
+ * @example ['100px', '1fr', 'auto']
522
+ */
523
+ templateRows?: GridTrackSize[];
524
+ /**
525
+ * Specifies the size of implicitly created rows.
526
+ * @default 'auto'
527
+ */
528
+ autoRows?: GridTrackSize;
529
+ /**
530
+ * Controls how the auto-placement algorithm works.
500
531
  * @default 'row'
501
532
  */
502
- direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
533
+ autoFlow?: 'row' | 'column' | 'row-dense' | 'column-dense';
503
534
  }
504
535
  /**
505
536
  * Represents a text segment with styling information
@@ -712,6 +743,18 @@ interface BaseChartOptions<T extends ChartType> {
712
743
  interface CartesianChartSpecificOptions {
713
744
  grid?: GridOptions;
714
745
  axisColor?: string;
746
+ showValues?: boolean;
747
+ valueFontSize?: number;
748
+ valueColor?: string;
749
+ renderValueItem?: (props: {
750
+ item: number;
751
+ index: number;
752
+ datasetIndex: number;
753
+ }) => BoxNode | null | undefined;
754
+ showYAxis?: boolean;
755
+ yAxisFontSize?: number;
756
+ yAxisColor?: string;
757
+ yAxisLabelFormatter?: (value: number) => string;
715
758
  }
716
759
  interface PieChartSpecificOptions {
717
760
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"canvas.type.d.ts","sourceRoot":"","sources":["../../../src/canvas/canvas.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA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