@willwade/aac-processors 0.0.10 → 0.0.11

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.
@@ -0,0 +1,468 @@
1
+ "use strict";
2
+ /**
3
+ * Grid 3 Symbol Library Resolution
4
+ *
5
+ * Grid 3 uses symbol libraries stored as .pix files in the installation directory.
6
+ * Symbol references in Grid files use the format: [library]/path/to/symbol.png
7
+ *
8
+ * Examples:
9
+ * - [widgit]/food/apple.png
10
+ * - [tawasl]/above bw.png
11
+ * - [ssnaps]963.jpg
12
+ * - [grid3x]/folder/document.png
13
+ *
14
+ * This module provides symbol resolution and metadata extraction.
15
+ */
16
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ var desc = Object.getOwnPropertyDescriptor(m, k);
19
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
20
+ desc = { enumerable: true, get: function() { return m[k]; } };
21
+ }
22
+ Object.defineProperty(o, k2, desc);
23
+ }) : (function(o, m, k, k2) {
24
+ if (k2 === undefined) k2 = k;
25
+ o[k2] = m[k];
26
+ }));
27
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
28
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
29
+ }) : function(o, v) {
30
+ o["default"] = v;
31
+ });
32
+ var __importStar = (this && this.__importStar) || function (mod) {
33
+ if (mod && mod.__esModule) return mod;
34
+ var result = {};
35
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
36
+ __setModuleDefault(result, mod);
37
+ return result;
38
+ };
39
+ var __importDefault = (this && this.__importDefault) || function (mod) {
40
+ return (mod && mod.__esModule) ? mod : { "default": mod };
41
+ };
42
+ Object.defineProperty(exports, "__esModule", { value: true });
43
+ exports.DEFAULT_LOCALE = exports.SYMBOL_LIBRARIES = void 0;
44
+ exports.parseSymbolReference = parseSymbolReference;
45
+ exports.isSymbolReference = isSymbolReference;
46
+ exports.getDefaultGrid3Path = getDefaultGrid3Path;
47
+ exports.getSymbolLibrariesDir = getSymbolLibrariesDir;
48
+ exports.getSymbolSearchIndexesDir = getSymbolSearchIndexesDir;
49
+ exports.getAvailableSymbolLibraries = getAvailableSymbolLibraries;
50
+ exports.getSymbolLibraryInfo = getSymbolLibraryInfo;
51
+ exports.resolveSymbolReference = resolveSymbolReference;
52
+ exports.extractSymbolReferences = extractSymbolReferences;
53
+ exports.createSymbolReference = createSymbolReference;
54
+ exports.getSymbolLibraryName = getSymbolLibraryName;
55
+ exports.getSymbolPath = getSymbolPath;
56
+ exports.isKnownSymbolLibrary = isKnownSymbolLibrary;
57
+ exports.getSymbolLibraryDisplayName = getSymbolLibraryDisplayName;
58
+ exports.analyzeSymbolUsage = analyzeSymbolUsage;
59
+ exports.symbolReferenceToFilename = symbolReferenceToFilename;
60
+ exports.getSymbolsDir = getSymbolsDir;
61
+ exports.getSymbolSearchDir = getSymbolSearchDir;
62
+ const fs = __importStar(require("fs"));
63
+ const path = __importStar(require("path"));
64
+ const adm_zip_1 = __importDefault(require("adm-zip"));
65
+ /**
66
+ * Default Grid 3 installation paths by platform
67
+ */
68
+ const DEFAULT_GRID3_PATHS = {
69
+ win32: 'C:\\Program Files (x86)\\Smartbox\\Grid 3',
70
+ darwin: '/Applications/Grid 3.app/Contents/Resources',
71
+ linux: '/opt/smartbox/grid3',
72
+ };
73
+ /**
74
+ * Path to Symbols directory within Grid 3 installation
75
+ * Contains .symbols ZIP archives with actual images
76
+ */
77
+ const SYMBOLS_SUBDIR = 'Resources\\Symbols';
78
+ /**
79
+ * Path to symbol search indexes within Grid 3 installation
80
+ * Contains .pix index files for searching
81
+ */
82
+ const SYMBOLSEARCH_SUBDIR = 'Locale';
83
+ /**
84
+ * Known symbol libraries in Grid 3
85
+ */
86
+ exports.SYMBOL_LIBRARIES = {
87
+ WIDGIT: 'widgit',
88
+ TAWASL: 'tawasl',
89
+ SSNAPS: 'ssnaps',
90
+ GRID3X: 'grid3x',
91
+ GRID2X: 'grid2x',
92
+ BLISSX: 'blissx',
93
+ EYEGAZ: 'eyegaz',
94
+ INTERL: 'interl',
95
+ METACM: 'metacm',
96
+ MJPCS: 'mjpcs#',
97
+ PCSHC: 'pcshc#',
98
+ PCSTL: 'pcstl#',
99
+ SESENS: 'sesens',
100
+ SSTIX: 'sstix#',
101
+ SYMOJI: 'symoji',
102
+ };
103
+ /**
104
+ * Default locale to use
105
+ */
106
+ exports.DEFAULT_LOCALE = 'en-GB';
107
+ /**
108
+ * Parse a symbol reference string
109
+ * @param reference - Symbol reference like "[widgit]/food/apple.png"
110
+ * @returns Parsed symbol reference
111
+ */
112
+ function parseSymbolReference(reference) {
113
+ const trimmed = reference.trim();
114
+ // Match pattern: [library]/path or [library]path
115
+ const match = trimmed.match(/^\[([^\]]+)\](.+)$/);
116
+ if (!match) {
117
+ return {
118
+ library: '',
119
+ path: trimmed,
120
+ fullReference: trimmed,
121
+ isValid: false,
122
+ };
123
+ }
124
+ const [, library, symbolPath] = match;
125
+ return {
126
+ library: library.toLowerCase(),
127
+ path: symbolPath.replace(/^\\+/, '').trim(), // Remove leading slashes
128
+ fullReference: trimmed,
129
+ isValid: true,
130
+ };
131
+ }
132
+ /**
133
+ * Check if a string is a symbol library reference
134
+ * @param reference - String to check
135
+ * @returns True if it's a symbol reference like [widgit]/...
136
+ */
137
+ function isSymbolReference(reference) {
138
+ return reference.trim().startsWith('[');
139
+ }
140
+ /**
141
+ * Get the default Grid 3 installation path for the current platform
142
+ * @returns Default Grid 3 path or empty string if not found
143
+ */
144
+ function getDefaultGrid3Path() {
145
+ const platform = process.platform;
146
+ const defaultPath = DEFAULT_GRID3_PATHS[platform] || '';
147
+ if (defaultPath && fs.existsSync(defaultPath)) {
148
+ return defaultPath;
149
+ }
150
+ // Try to find Grid 3 in common locations
151
+ const commonPaths = [
152
+ 'C:\\Program Files (x86)\\Smartbox\\Grid 3',
153
+ 'C:\\Program Files\\Smartbox\\Grid 3',
154
+ 'C:\\Program Files\\Smartbox\\Grid 3',
155
+ '/Applications/Grid 3.app',
156
+ '/opt/smartbox/grid3',
157
+ ];
158
+ for (const testPath of commonPaths) {
159
+ if (fs.existsSync(testPath)) {
160
+ return testPath;
161
+ }
162
+ }
163
+ return '';
164
+ }
165
+ /**
166
+ * Get the Symbol Libraries directory path
167
+ * Contains .symbols ZIP archives with actual image files
168
+ * @param grid3Path - Grid 3 installation path
169
+ * @returns Path to Symbol Libraries directory (e.g., "C:\...\Grid 3\Resources\Symbols")
170
+ */
171
+ function getSymbolLibrariesDir(grid3Path) {
172
+ return path.join(grid3Path, SYMBOLS_SUBDIR);
173
+ }
174
+ /**
175
+ * Get the symbol search indexes directory path for a given locale
176
+ * Contains .pix index files for searching symbols
177
+ * @param grid3Path - Grid 3 installation path
178
+ * @param locale - Locale code (e.g., 'en-GB')
179
+ * @returns Path to symbol search indexes directory (e.g., "C:\...\Grid 3\Locale\en-GB\symbolsearch")
180
+ */
181
+ function getSymbolSearchIndexesDir(grid3Path, locale = exports.DEFAULT_LOCALE) {
182
+ return path.join(grid3Path, SYMBOLSEARCH_SUBDIR, locale, 'symbolsearch');
183
+ }
184
+ /**
185
+ * Get all available symbol libraries in the Grid 3 installation
186
+ * @param options - Resolution options
187
+ * @returns Array of symbol library information
188
+ */
189
+ function getAvailableSymbolLibraries(options = {}) {
190
+ const grid3Path = options.grid3Path || options.symbolDir || getDefaultGrid3Path();
191
+ if (!grid3Path) {
192
+ return [];
193
+ }
194
+ const symbolsDir = getSymbolLibrariesDir(grid3Path);
195
+ if (!fs.existsSync(symbolsDir)) {
196
+ return [];
197
+ }
198
+ const libraries = [];
199
+ const files = fs.readdirSync(symbolsDir);
200
+ for (const file of files) {
201
+ if (file.endsWith('.symbols')) {
202
+ const fullPath = path.join(symbolsDir, file);
203
+ const stats = fs.statSync(fullPath);
204
+ const libraryName = path.basename(file, '.symbols');
205
+ libraries.push({
206
+ name: libraryName,
207
+ pixFile: fullPath, // Reuse this field for the .symbols file path
208
+ exists: true,
209
+ size: stats.size,
210
+ locale: 'global', // .symbols files are not locale-specific
211
+ });
212
+ }
213
+ }
214
+ return libraries.sort((a, b) => a.name.localeCompare(b.name));
215
+ }
216
+ /**
217
+ * Check if a symbol library exists
218
+ * @param libraryName - Name of the library (e.g., 'widgit', 'tawasl')
219
+ * @param options - Resolution options
220
+ * @returns Symbol library info or undefined if not found
221
+ */
222
+ function getSymbolLibraryInfo(libraryName, options = {}) {
223
+ const grid3Path = options.grid3Path || options.symbolDir || getDefaultGrid3Path();
224
+ if (!grid3Path) {
225
+ return undefined;
226
+ }
227
+ const symbolsDir = getSymbolLibrariesDir(grid3Path);
228
+ const normalizedLibName = libraryName.toLowerCase();
229
+ // Try different case variations
230
+ const variations = [
231
+ normalizedLibName + '.symbols',
232
+ normalizedLibName.toUpperCase() + '.symbols',
233
+ libraryName + '.symbols',
234
+ ];
235
+ for (const file of variations) {
236
+ const fullPath = path.join(symbolsDir, file);
237
+ if (fs.existsSync(fullPath)) {
238
+ const stats = fs.statSync(fullPath);
239
+ return {
240
+ name: libraryName,
241
+ pixFile: fullPath,
242
+ exists: true,
243
+ size: stats.size,
244
+ locale: 'global',
245
+ };
246
+ }
247
+ }
248
+ return undefined;
249
+ }
250
+ /**
251
+ * Resolve a symbol reference to extract the actual image data
252
+ * @param reference - Symbol reference like "[tawasl]/above bw.png"
253
+ * @param options - Resolution options
254
+ * @returns Resolution result with image data if found
255
+ */
256
+ function resolveSymbolReference(reference, options = {}) {
257
+ const parsed = parseSymbolReference(reference);
258
+ if (!parsed.isValid) {
259
+ return {
260
+ reference: parsed,
261
+ found: false,
262
+ error: 'Invalid symbol reference format',
263
+ };
264
+ }
265
+ const grid3Path = options.grid3Path || getDefaultGrid3Path();
266
+ if (!grid3Path) {
267
+ return {
268
+ reference: parsed,
269
+ found: false,
270
+ error: 'Grid 3 installation not found. Please specify grid3Path.',
271
+ };
272
+ }
273
+ const libraryInfo = getSymbolLibraryInfo(parsed.library, { grid3Path });
274
+ if (!libraryInfo || !libraryInfo.exists) {
275
+ return {
276
+ reference: parsed,
277
+ found: false,
278
+ error: `Symbol library '${parsed.library}' not found at ${libraryInfo?.pixFile || 'unknown'}`,
279
+ };
280
+ }
281
+ try {
282
+ // .symbols files are ZIP archives
283
+ const zip = new adm_zip_1.default(libraryInfo.pixFile);
284
+ // The path in the symbol reference becomes the path within the symbols/ folder
285
+ // e.g., [tawasl]/above bw.png becomes symbols/above bw.png
286
+ const symbolPath = `symbols/${parsed.path}`;
287
+ const entry = zip.getEntry(symbolPath);
288
+ if (!entry) {
289
+ // Try without the symbols/ prefix (in case reference already includes it)
290
+ const altPath = parsed.path.startsWith('symbols/') ? parsed.path : `symbols/${parsed.path}`;
291
+ const altEntry = zip.getEntry(altPath);
292
+ if (!altEntry) {
293
+ return {
294
+ reference: parsed,
295
+ found: false,
296
+ error: `Symbol '${parsed.path}' not found in library '${parsed.library}'`,
297
+ path: libraryInfo.pixFile,
298
+ libraryInfo,
299
+ };
300
+ }
301
+ // Found with alternate path
302
+ const data = altEntry.getData();
303
+ return {
304
+ reference: parsed,
305
+ found: true,
306
+ path: libraryInfo.pixFile,
307
+ data,
308
+ libraryInfo,
309
+ };
310
+ }
311
+ // Found the symbol!
312
+ const data = entry.getData();
313
+ return {
314
+ reference: parsed,
315
+ found: true,
316
+ path: libraryInfo.pixFile,
317
+ data,
318
+ libraryInfo,
319
+ };
320
+ }
321
+ catch (error) {
322
+ return {
323
+ reference: parsed,
324
+ found: false,
325
+ error: `Failed to extract symbol: ${error.message}`,
326
+ path: libraryInfo.pixFile,
327
+ libraryInfo,
328
+ };
329
+ }
330
+ }
331
+ /**
332
+ * Get all symbol references from a gridset
333
+ * This scans button images for symbol references
334
+ * @param tree - AAC tree from loaded gridset
335
+ * @returns Array of unique symbol references
336
+ */
337
+ function extractSymbolReferences(tree) {
338
+ const references = new Set();
339
+ for (const pageId in tree.pages) {
340
+ const page = tree.pages[pageId];
341
+ if (page.buttons) {
342
+ for (const button of page.buttons) {
343
+ if (button.image && isSymbolReference(String(button.image))) {
344
+ references.add(String(button.image));
345
+ }
346
+ // Check for symbol library metadata
347
+ if (button.symbolLibrary) {
348
+ const ref = `[${button.symbolLibrary}]${button.symbolPath || ''}`;
349
+ references.add(ref);
350
+ }
351
+ }
352
+ }
353
+ }
354
+ return Array.from(references).sort();
355
+ }
356
+ /**
357
+ * Create a symbol reference from library and path
358
+ * @param library - Library name
359
+ * @param symbolPath - Path within the library
360
+ * @returns Formatted symbol reference
361
+ */
362
+ function createSymbolReference(library, symbolPath) {
363
+ const normalizedLib = library.toLowerCase().replace(/\[|\]/g, '');
364
+ const normalizedPath = symbolPath.replace(/^\\+/, '');
365
+ return `[${normalizedLib}]${normalizedPath}`;
366
+ }
367
+ /**
368
+ * Get the library name from a symbol reference
369
+ * @param reference - Symbol reference
370
+ * @returns Library name or empty string
371
+ */
372
+ function getSymbolLibraryName(reference) {
373
+ const parsed = parseSymbolReference(reference);
374
+ return parsed.library;
375
+ }
376
+ /**
377
+ * Get the symbol path from a symbol reference
378
+ * @param reference - Symbol reference
379
+ * @returns Symbol path or empty string
380
+ */
381
+ function getSymbolPath(reference) {
382
+ const parsed = parseSymbolReference(reference);
383
+ return parsed.path;
384
+ }
385
+ /**
386
+ * Check if a symbol library is one of the known Grid 3 libraries
387
+ * @param libraryName - Library name to check
388
+ * @returns True if it's a known library
389
+ */
390
+ function isKnownSymbolLibrary(libraryName) {
391
+ const normalized = libraryName.toLowerCase().replace(/\[|\]/g, '');
392
+ return Object.values(exports.SYMBOL_LIBRARIES).includes(normalized);
393
+ }
394
+ /**
395
+ * Get display name for a symbol library
396
+ * @param libraryName - Library name
397
+ * @returns Human-readable display name
398
+ */
399
+ function getSymbolLibraryDisplayName(libraryName) {
400
+ const normalized = libraryName.toLowerCase().replace(/\[|\]/g, '');
401
+ const displayNames = {
402
+ widgit: 'Widgit Symbols',
403
+ tawasl: 'Tawasol (Arabic)',
404
+ ssnaps: 'Smartbox Symbol Snapshots',
405
+ grid3x: 'Grid 3 Extended',
406
+ grid2x: 'Grid 2 Extended',
407
+ blissx: 'Blissymbols',
408
+ eyegaz: 'Eye Gaze Symbols',
409
+ interl: 'International Symbols',
410
+ metacm: 'MetaComm',
411
+ mjpcs: 'Mayer-Johnson PCS',
412
+ pcshc: 'PCS High Contrast',
413
+ pcstl: 'PCS Thin Line',
414
+ sesens: 'Sensory Software',
415
+ sstix: 'Smartbox TIX',
416
+ symoji: 'Symbol Emoji',
417
+ };
418
+ return displayNames[normalized] || normalized.charAt(0).toUpperCase() + normalized.slice(1);
419
+ }
420
+ function analyzeSymbolUsage(tree) {
421
+ const references = extractSymbolReferences(tree);
422
+ const byLibrary = {};
423
+ const libraries = new Set();
424
+ for (const ref of references) {
425
+ const lib = getSymbolLibraryName(ref);
426
+ byLibrary[lib] = (byLibrary[lib] || 0) + 1;
427
+ if (lib) {
428
+ libraries.add(lib);
429
+ }
430
+ }
431
+ return {
432
+ totalSymbols: references.length,
433
+ byLibrary,
434
+ uniqueReferences: references,
435
+ librariesUsed: Array.from(libraries).sort(),
436
+ };
437
+ }
438
+ /**
439
+ * Convert symbol reference to filename for embedded images
440
+ * Grid 3 sometimes embeds symbols with special naming
441
+ * @param reference - Symbol reference
442
+ * @param cellX - Cell X coordinate
443
+ * @param cellY - Cell Y coordinate
444
+ * @returns Generated filename
445
+ */
446
+ function symbolReferenceToFilename(reference, cellX, cellY) {
447
+ const parsed = parseSymbolReference(reference);
448
+ const ext = path.extname(parsed.path) || '.png';
449
+ // Grid 3 format: {x}-{y}-0-text-0.{ext}
450
+ return `${cellX}-${cellY}-0-text-0${ext}`;
451
+ }
452
+ // ============================================================================
453
+ // BACKWARD COMPATIBILITY ALIASES
454
+ // ============================================================================
455
+ /**
456
+ * @deprecated Use getSymbolLibrariesDir() instead - more descriptive name
457
+ * Get the Symbols directory path (where .symbols ZIP archives are)
458
+ */
459
+ function getSymbolsDir(grid3Path) {
460
+ return getSymbolLibrariesDir(grid3Path);
461
+ }
462
+ /**
463
+ * @deprecated Use getSymbolSearchIndexesDir() instead - more descriptive name
464
+ * Get the symbol search directory for a given locale (where .pix index files are)
465
+ */
466
+ function getSymbolSearchDir(grid3Path, locale = exports.DEFAULT_LOCALE) {
467
+ return getSymbolSearchIndexesDir(grid3Path, locale);
468
+ }
@@ -14,6 +14,11 @@ const password_1 = require("./gridset/password");
14
14
  const crypto_1 = __importDefault(require("crypto"));
15
15
  const zlib_1 = __importDefault(require("zlib"));
16
16
  const gridsetValidator_1 = require("../validation/gridsetValidator");
17
+ // New imports for enhanced Grid 3 support
18
+ const pluginTypes_1 = require("./gridset/pluginTypes");
19
+ const commands_1 = require("./gridset/commands");
20
+ const symbols_1 = require("./gridset/symbols");
21
+ const resolver_2 = require("./gridset/resolver");
17
22
  class GridsetProcessor extends baseProcessor_1.BaseProcessor {
18
23
  constructor(options) {
19
24
  super(options);
@@ -254,6 +259,9 @@ class GridsetProcessor extends baseProcessor_1.BaseProcessor {
254
259
  fontColor: grid3Style.FontColour,
255
260
  fontFamily: grid3Style.FontName,
256
261
  fontSize: grid3Style.FontSize ? parseInt(String(grid3Style.FontSize)) : undefined,
262
+ backgroundShape: grid3Style.BackgroundShape !== undefined
263
+ ? parseInt(String(grid3Style.BackgroundShape))
264
+ : undefined,
257
265
  };
258
266
  }
259
267
  // Helper function to get style by ID or return default
@@ -496,11 +504,14 @@ class GridsetProcessor extends baseProcessor_1.BaseProcessor {
496
504
  }
497
505
  }
498
506
  const message = label; // Use caption as message
507
+ // Detect plugin cell type (Workspace, LiveCell, AutoContent)
508
+ const pluginMetadata = (0, pluginTypes_1.detectPluginCellType)(content);
499
509
  // Parse all command types from Grid3 and create semantic actions
500
510
  let semanticAction;
501
511
  let legacyAction = null;
502
512
  // infer action type implicitly from commands; no explicit enum needed
503
513
  let navigationTarget;
514
+ let detectedCommands = []; // Store detected command metadata
504
515
  const commands = content.Commands?.Command || content.commands?.command;
505
516
  // Resolve image for this cell using FileMap and coordinate heuristics
506
517
  const imageCandidate = captionAndImage?.Image ||
@@ -520,8 +531,14 @@ class GridsetProcessor extends baseProcessor_1.BaseProcessor {
520
531
  y: cellY + 1,
521
532
  dynamicFiles,
522
533
  }, entries) || undefined;
534
+ // Check if image is a symbol library reference
535
+ let symbolLibraryRef = null;
536
+ if (declaredImageName && (0, resolver_2.isSymbolLibraryReference)(declaredImageName)) {
537
+ symbolLibraryRef = (0, symbols_1.parseSymbolReference)(declaredImageName);
538
+ }
523
539
  if (commands) {
524
540
  const commandArr = Array.isArray(commands) ? commands : [commands];
541
+ detectedCommands = commandArr.map((cmd) => (0, commands_1.detectCommand)(cmd));
525
542
  for (const command of commandArr) {
526
543
  const commandId = command['@_ID'] || command.ID || command.id;
527
544
  const parameters = command.Parameter || command.parameter;
@@ -911,10 +928,27 @@ class GridsetProcessor extends baseProcessor_1.BaseProcessor {
911
928
  y: cellY,
912
929
  columnSpan: colSpan,
913
930
  rowSpan: rowSpan,
931
+ contentType: pluginMetadata.cellType === pluginTypes_1.Grid3CellType.Regular
932
+ ? 'Normal'
933
+ : pluginMetadata.cellType === pluginTypes_1.Grid3CellType.Workspace
934
+ ? 'Workspace'
935
+ : pluginMetadata.cellType === pluginTypes_1.Grid3CellType.LiveCell
936
+ ? 'LiveCell'
937
+ : 'AutoContent',
938
+ contentSubType: pluginMetadata.subType ||
939
+ pluginMetadata.liveCellType ||
940
+ pluginMetadata.autoContentType,
941
+ symbolLibrary: symbolLibraryRef?.library || undefined,
942
+ symbolPath: symbolLibraryRef?.path || undefined,
914
943
  style: {
915
944
  ...cellStyle,
916
945
  ...inlineStyle, // Inline styles override referenced styles
917
946
  },
947
+ parameters: {
948
+ pluginMetadata: pluginMetadata, // Store full plugin metadata for future use
949
+ grid3Commands: detectedCommands, // Store detected command metadata
950
+ symbolLibraryRef: symbolLibraryRef, // Store full symbol reference
951
+ },
918
952
  });
919
953
  // Add button to page
920
954
  page.addButton(button);
@@ -13,7 +13,15 @@ export { resolveGrid3CellImage } from './gridset/resolver';
13
13
  export { createWordlist, extractWordlists, updateWordlist, wordlistToXml, type WordList, type WordListItem, } from './gridset/wordlistHelpers';
14
14
  export { resolveGridsetPassword, resolveGridsetPasswordFromEnv } from './gridset/password';
15
15
  export { getNamedColor, rgbaToHex, channelToHex, clampColorChannel, clampAlpha, toHexColor, darkenColor, normalizeColor, ensureAlphaChannel, } from './gridset/colorUtils';
16
- export { DEFAULT_GRID3_STYLES, CATEGORY_STYLES, createDefaultStylesXml, createCategoryStyle, } from './gridset/styleHelpers';
16
+ export { DEFAULT_GRID3_STYLES, CATEGORY_STYLES, createDefaultStylesXml, createCategoryStyle, CellBackgroundShape, SHAPE_NAMES, } from './gridset/styleHelpers';
17
17
  export { ensureAlphaChannel as ensureAlphaChannelFromStyles } from './gridset/styleHelpers';
18
+ export { detectPluginCellType, type Grid3PluginMetadata, Grid3CellType, WORKSPACE_TYPES, LIVECELL_TYPES, AUTOCONTENT_TYPES, getCellTypeDisplayName, isWorkspaceCell, isLiveCell, isAutoContentCell, isRegularCell, } from './gridset/pluginTypes';
19
+ export { detectCommand, getCommandDefinition, getCommandsByPlugin, getCommandsByCategory, getAllCommandIds, getAllPluginIds, extractCommandParameters, GRID3_COMMANDS, type Grid3CommandDefinition, type CommandParameter, type ExtractedParameters, Grid3CommandCategory, } from './gridset/commands';
20
+ export * from './gridset/index';
21
+ export { parseSymbolReference, isSymbolReference, resolveSymbolReference, getAvailableSymbolLibraries, getSymbolLibraryInfo, extractSymbolReferences, analyzeSymbolUsage, createSymbolReference, getSymbolLibraryName, getSymbolPath, isKnownSymbolLibrary, getSymbolLibraryDisplayName, getDefaultGrid3Path, getSymbolLibrariesDir, getSymbolSearchIndexesDir, symbolReferenceToFilename, SYMBOL_LIBRARIES, } from './gridset/symbols';
22
+ export { isSymbolLibraryReference, parseImageSymbolReference } from './gridset/resolver';
23
+ export { getSymbolsDir, getSymbolSearchDir } from './gridset/symbols';
24
+ export { extractButtonImage, extractSymbolLibraryImage, convertToAstericsImage, analyzeSymbolExtraction, suggestExtractionStrategy, exportSymbolReferencesToCsv, createSymbolManifest, } from './gridset/symbolExtractor';
25
+ export { parsePixFile, loadSearchIndexes, searchSymbols, searchSymbolsWithReferences, getSymbolFilename, getSymbolDisplayName, getAllSearchTerms, getSearchSuggestions, countLibrarySymbols, getSymbolSearchStats, } from './gridset/symbolSearch';
18
26
  export { getPageTokenImageMap as getSnapPageTokenImageMap, getAllowedImageEntries as getSnapAllowedImageEntries, openImage as openSnapImage, findSnapPackages, findSnapPackagePath, findSnapUsers, findSnapUserVocabularies, findSnapUserHistory, isSnapInstalled, readSnapUsage, readSnapUsageForUser, type SnapPackagePath, type SnapUserInfo, type SnapUsageEntry, } from './snap/helpers';
19
27
  export { getPageTokenImageMap as getTouchChatPageTokenImageMap, getAllowedImageEntries as getTouchChatAllowedImageEntries, openImage as openTouchChatImage, } from './touchchat/helpers';