@@ -23,28 +23,10 @@ import crypto from 'crypto';
2323import zlib from 'zlib' ;
2424import { GridsetValidator } from '../validation/gridsetValidator' ;
2525import { ValidationResult } from '../validation/validationTypes' ;
26- // New imports for enhanced Grid 3 support
27- import { CellBackgroundShape } from './gridset/styleHelpers' ;
28- import { detectPluginCellType , Grid3PluginMetadata , Grid3CellType } from './gridset/pluginTypes' ;
29- import {
30- detectCommand ,
31- getCommandDefinition ,
32- Grid3CommandCategory ,
33- GRID3_COMMANDS ,
34- getAllCommandIds ,
35- getAllPluginIds ,
36- } from './gridset/commands' ;
37- import {
38- isSymbolReference ,
39- parseSymbolReference ,
40- resolveSymbolReference ,
41- getSymbolLibraryDisplayName ,
42- type SymbolReference ,
43- } from './gridset/symbols' ;
44- import {
45- isSymbolLibraryReference ,
46- parseImageSymbolReference ,
47- } from './gridset/resolver' ;
26+ import { detectCommand } from './gridset/commands' ;
27+ import { parseSymbolReference , type SymbolReference } from './gridset/symbols' ;
28+ import { isSymbolLibraryReference } from './gridset/resolver' ;
29+ import { detectPluginCellType , Grid3CellType } from './gridset/pluginTypes' ;
4830
4931class GridsetProcessor extends BaseProcessor {
5032 constructor ( options ?: ProcessorOptions ) {
@@ -299,9 +281,10 @@ class GridsetProcessor extends BaseProcessor {
299281 fontColor : grid3Style . FontColour ,
300282 fontFamily : grid3Style . FontName ,
301283 fontSize : grid3Style . FontSize ? parseInt ( String ( grid3Style . FontSize ) ) : undefined ,
302- backgroundShape : grid3Style . BackgroundShape !== undefined
303- ? parseInt ( String ( grid3Style . BackgroundShape ) )
304- : undefined ,
284+ backgroundShape :
285+ grid3Style . BackgroundShape !== undefined
286+ ? parseInt ( String ( grid3Style . BackgroundShape ) )
287+ : undefined ,
305288 } ;
306289 }
307290
@@ -599,7 +582,7 @@ class GridsetProcessor extends BaseProcessor {
599582
600583 if ( commands ) {
601584 const commandArr = Array . isArray ( commands ) ? commands : [ commands ] ;
602- detectedCommands = commandArr . map ( cmd => detectCommand ( cmd ) ) ;
585+ detectedCommands = commandArr . map ( ( cmd ) => detectCommand ( cmd ) ) ;
603586
604587 for ( const command of commandArr ) {
605588 const commandId = command [ '@_ID' ] || command . ID || command . id ;
@@ -1009,14 +992,18 @@ class GridsetProcessor extends BaseProcessor {
1009992 y : cellY ,
1010993 columnSpan : colSpan ,
1011994 rowSpan : rowSpan ,
1012- contentType : pluginMetadata . cellType === Grid3CellType . Regular
1013- ? 'Normal'
1014- : pluginMetadata . cellType === Grid3CellType . Workspace
1015- ? 'Workspace'
1016- : pluginMetadata . cellType === Grid3CellType . LiveCell
1017- ? 'LiveCell'
1018- : 'AutoContent' ,
1019- contentSubType : pluginMetadata . subType || pluginMetadata . liveCellType || pluginMetadata . autoContentType ,
995+ contentType :
996+ pluginMetadata . cellType === Grid3CellType . Regular
997+ ? 'Normal'
998+ : pluginMetadata . cellType === Grid3CellType . Workspace
999+ ? 'Workspace'
1000+ : pluginMetadata . cellType === Grid3CellType . LiveCell
1001+ ? 'LiveCell'
1002+ : 'AutoContent' ,
1003+ contentSubType :
1004+ pluginMetadata . subType ||
1005+ pluginMetadata . liveCellType ||
1006+ pluginMetadata . autoContentType ,
10201007 symbolLibrary : symbolLibraryRef ?. library || undefined ,
10211008 symbolPath : symbolLibraryRef ?. path || undefined ,
10221009 style : {
0 commit comments