@@ -89,7 +89,9 @@ function intToHex(colorInt: number | null | undefined): string | undefined {
8989 * TouchChat: 0 = Hidden, 1 = Visible
9090 * Maps to: 'Hidden' | 'Visible' | undefined
9191 */
92- function mapTouchChatVisibility ( visible : number | null | undefined ) : 'Visible' | 'Hidden' | undefined {
92+ function mapTouchChatVisibility (
93+ visible : number | null | undefined
94+ ) : 'Visible' | 'Hidden' | undefined {
9395 if ( visible === null || visible === undefined ) {
9496 return undefined ; // Default to visible
9597 }
@@ -268,8 +270,13 @@ class TouchChatProcessor extends BaseProcessor {
268270 label : cell . label || '' ,
269271 message : cell . message || '' ,
270272 semanticAction : semanticAction ,
271- semantic_id : ( cell as any ) . symbol_link_id || ( cell as any ) . symbolLinkId || undefined , // Extract semantic_id from symbol_link_id
272- visibility : mapTouchChatVisibility ( ( cell as any ) . visible ) ,
273+ semantic_id :
274+ ( ( ( cell as any ) . symbol_link_id || ( cell as any ) . symbolLinkId ) as
275+ | string
276+ | undefined ) || undefined , // Extract semantic_id from symbol_link_id
277+ visibility : mapTouchChatVisibility (
278+ ( ( cell as any ) . visible as number | null | undefined ) || undefined
279+ ) ,
273280 // Note: TouchChat does not use scan blocks in the file
274281 // Scanning is a runtime feature (linear/row-column patterns)
275282 // scanBlock defaults to 1 (no grouping)
@@ -289,9 +296,9 @@ class TouchChatProcessor extends BaseProcessor {
289296 } ) ;
290297 buttonBoxes . get ( cell . box_id ) ?. push ( {
291298 button,
292- location : ( cell as any ) . location ,
293- spanX : ( cell as any ) . span_x ,
294- spanY : ( cell as any ) . span_y ,
299+ location : ( ( cell as any ) . location as number ) || 0 ,
300+ spanX : ( ( cell as any ) . span_x as number ) || 1 ,
301+ spanY : ( ( cell as any ) . span_y as number ) || 1 ,
295302 } ) ;
296303 } ) ;
297304
0 commit comments