@willwade/aac-processors 0.0.14 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -56,7 +56,7 @@ npm run build
56
56
 
57
57
  ### Requirements
58
58
 
59
- - **Node.js** 16.0.0 or higher
59
+ - **Node.js** 20.0.0 or higher
60
60
  - **TypeScript** 5.5+ (for development)
61
61
 
62
62
  ---
@@ -194,6 +194,45 @@ const translatedBuffer = processor.processTexts(
194
194
  console.log("Translation complete!");
195
195
  ```
196
196
 
197
+ ### 🤖 LLM-Based Translation with Symbol Preservation
198
+
199
+ For advanced AI-powered translation that preserves symbol-to-word associations across languages, see the **[Translation Utilities Guide](./src/utilities/translation/README.md)**.
200
+
201
+ **Features:**
202
+ - 🧠 **Intelligent symbol mapping**: LLMs understand grammar, not just word position
203
+ - 🎯 **Cross-format support**: Works with Gridset, OBF/OBZ, TouchChat, and Snap
204
+ - 🔗 **Symbol preservation**: Symbols stay attached to correct translated words
205
+ - ✅ **Validated output**: Built-in validation catches translation errors
206
+
207
+ **Quick Demo:**
208
+ ```bash
209
+ # Translate a Grid 3 file to Spanish using Gemini 2.0 Flash
210
+ export GEMINI_API_KEY="your-key-here"
211
+ node scripts/translation/gemini-translate-gridset.js "./tmp/Voco Chat.gridset" Spanish
212
+ ```
213
+
214
+ **Complete Example:**
215
+ ```typescript
216
+ import { GridsetProcessor } from "@willwade/aac-processors";
217
+
218
+ const processor = new GridsetProcessor();
219
+
220
+ // 1. Extract buttons with symbol information
221
+ const buttons = processor.extractSymbolsForLLM("board.gridset");
222
+
223
+ // 2. Create LLM prompt (or call your LLM API directly)
224
+ // See: src/utilities/translation/README.md
225
+
226
+ // 3. Apply translations with preserved symbols
227
+ processor.processLLMTranslations(
228
+ "board.gridset",
229
+ llmTranslations,
230
+ "board-spanish.gridset"
231
+ );
232
+ ```
233
+
234
+ See **[scripts/translation/](./scripts/translation/)** for complete working examples with Gemini, GPT-4, and other LLMs.
235
+
197
236
  ### 📊 AAC Analytics & Clinical Metrics
198
237
 
199
238
  The library includes an optional high-performance analytics engine for evaluating AAC board sets based on the **AAC Effort Algorithm (v0.2)**.
@@ -205,7 +244,7 @@ The library includes an optional high-performance analytics engine for evaluatin
205
244
  - **Sentence Analysis**: Measure the effort required to construct common test sentences.
206
245
  - **Comparative Analysis**: Identify gaps and improvements between two pageset versions.
207
246
 
208
- For detailed documentation, see the **[AAC Metrics Guide](./src/optional/analytics/docs/AAC_METRICS_GUIDE.md)** and **[Vocabulary Analysis Guide](./src/optional/analytics/docs/VOCABULARY_ANALYSIS_GUIDE.md)**.
247
+ For detailed documentation, see the **[AAC Metrics Guide](./src/utilities/analytics/docs/AAC_METRICS_GUIDE.md)** and **[Vocabulary Analysis Guide](./src/utilities/analytics/docs/VOCABULARY_ANALYSIS_GUIDE.md)**.
209
248
 
210
249
  ```typescript
211
250
  import { ObfsetProcessor, Analytics } from "@willwade/aac-processors";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Apple Panels (macOS) Namespace
3
+ *
4
+ * Apple Panels format processing for macOS AAC solutions.
5
+ */
6
+ export { ApplePanelsProcessor } from './processors/applePanelsProcessor';
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ /**
3
+ * Apple Panels (macOS) Namespace
4
+ *
5
+ * Apple Panels format processing for macOS AAC solutions.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ApplePanelsProcessor = void 0;
9
+ // Processor class
10
+ var applePanelsProcessor_1 = require("./processors/applePanelsProcessor");
11
+ Object.defineProperty(exports, "ApplePanelsProcessor", { enumerable: true, get: function () { return applePanelsProcessor_1.ApplePanelsProcessor; } });
12
+ // Note: Apple Panels doesn't currently have platform-specific helpers
13
+ // Future helper functions can be added here
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Asterics Grid Namespace
3
+ *
4
+ * Asterics Grid format processing for Asterics AAC solutions.
5
+ */
6
+ export { AstericsGridProcessor } from './processors/astericsGridProcessor';
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ /**
3
+ * Asterics Grid Namespace
4
+ *
5
+ * Asterics Grid format processing for Asterics AAC solutions.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.AstericsGridProcessor = void 0;
9
+ // Processor class
10
+ var astericsGridProcessor_1 = require("./processors/astericsGridProcessor");
11
+ Object.defineProperty(exports, "AstericsGridProcessor", { enumerable: true, get: function () { return astericsGridProcessor_1.AstericsGridProcessor; } });
12
+ // Note: Asterics Grid doesn't currently have platform-specific helpers
13
+ // Future helper functions can be added here
package/dist/dot.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Dot (Graphviz) Namespace
3
+ *
4
+ * DOT format processing for graph-based communication boards.
5
+ */
6
+ export { DotProcessor } from './processors/dotProcessor';
package/dist/dot.js ADDED
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ /**
3
+ * Dot (Graphviz) Namespace
4
+ *
5
+ * DOT format processing for graph-based communication boards.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.DotProcessor = void 0;
9
+ // Processor class
10
+ var dotProcessor_1 = require("./processors/dotProcessor");
11
+ Object.defineProperty(exports, "DotProcessor", { enumerable: true, get: function () { return dotProcessor_1.DotProcessor; } });
12
+ // Note: DOT doesn't currently have platform-specific helpers
13
+ // Future helper functions can be added here
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Excel Namespace
3
+ *
4
+ * Excel export format for vocabulary analysis and reporting.
5
+ */
6
+ export { ExcelProcessor } from './processors/excelProcessor';
package/dist/excel.js ADDED
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ /**
3
+ * Excel Namespace
4
+ *
5
+ * Excel export format for vocabulary analysis and reporting.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ExcelProcessor = void 0;
9
+ // Processor class
10
+ var excelProcessor_1 = require("./processors/excelProcessor");
11
+ Object.defineProperty(exports, "ExcelProcessor", { enumerable: true, get: function () { return excelProcessor_1.ExcelProcessor; } });
12
+ // Note: Excel doesn't currently have platform-specific helpers
13
+ // Future helper functions can be added here
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Gridset (Grid 3) Namespace
3
+ *
4
+ * All Grid 3 / Gridset-specific utilities, helpers, and types.
5
+ * Organized by category for cleaner imports.
6
+ */
7
+ export { GridsetProcessor } from './processors/gridsetProcessor';
8
+ export { getPageTokenImageMap, getAllowedImageEntries, openImage, getCommonDocumentsPath, findGrid3UserPaths, findGrid3HistoryDatabases, findGrid3Users, findGrid3Vocabularies, findGrid3UserHistory, isGrid3Installed, readGrid3History, readGrid3HistoryForUser, readAllGrid3History, generateGrid3Guid, createSettingsXml, createFileMapXml, type Grid3UserPath, type Grid3VocabularyPath, type Grid3HistoryEntry, } from './processors/gridset/helpers';
9
+ export { createWordlist, extractWordlists, updateWordlist, wordlistToXml, type WordList, type WordListItem, } from './processors/gridset/wordlistHelpers';
10
+ export { getNamedColor, rgbaToHex, channelToHex, clampColorChannel, clampAlpha, toHexColor, darkenColor, normalizeColor, ensureAlphaChannel, } from './processors/gridset/colorUtils';
11
+ export { DEFAULT_GRID3_STYLES, CATEGORY_STYLES, createDefaultStylesXml, createCategoryStyle, CellBackgroundShape, SHAPE_NAMES, ensureAlphaChannel as ensureAlphaChannelFromStyles, } from './processors/gridset/styleHelpers';
12
+ export { detectPluginCellType, getCellTypeDisplayName, isWorkspaceCell, isLiveCell, isAutoContentCell, isRegularCell, type Grid3PluginMetadata, Grid3CellType, WORKSPACE_TYPES, LIVECELL_TYPES, AUTOCONTENT_TYPES, } from './processors/gridset/pluginTypes';
13
+ export { detectCommand, getCommandDefinition, getCommandsByPlugin, getCommandsByCategory, getAllCommandIds, getAllPluginIds, extractCommandParameters, GRID3_COMMANDS, type Grid3CommandDefinition, type CommandParameter, type ExtractedParameters, Grid3CommandCategory, } from './processors/gridset/commands';
14
+ export { parseSymbolReference, isSymbolReference, resolveSymbolReference, getAvailableSymbolLibraries, getSymbolLibraryInfo, extractSymbolReferences, analyzeSymbolUsage, createSymbolReference, getSymbolLibraryName, getSymbolPath, isKnownSymbolLibrary, getSymbolLibraryDisplayName, getDefaultGrid3Path, getSymbolLibrariesDir, getSymbolSearchIndexesDir, symbolReferenceToFilename, SYMBOL_LIBRARIES, isSymbolLibraryReference, parseImageSymbolReference, resolveGrid3CellImage, getSymbolsDir, getSymbolSearchDir, } from './processors/gridset/index';
15
+ export { extractButtonImage, extractSymbolLibraryImage, convertToAstericsImage, analyzeSymbolExtraction, suggestExtractionStrategy, exportSymbolReferencesToCsv, createSymbolManifest, } from './processors/gridset/symbolExtractor';
16
+ export { parsePixFile, loadSearchIndexes, searchSymbols, searchSymbolsWithReferences, getSymbolFilename, getSymbolDisplayName, getAllSearchTerms, getSearchSuggestions, countLibrarySymbols, getSymbolSearchStats, } from './processors/gridset/symbolSearch';
17
+ export { resolveGridsetPassword, resolveGridsetPasswordFromEnv, } from './processors/gridset/password';
@@ -0,0 +1,130 @@
1
+ "use strict";
2
+ /**
3
+ * Gridset (Grid 3) Namespace
4
+ *
5
+ * All Grid 3 / Gridset-specific utilities, helpers, and types.
6
+ * Organized by category for cleaner imports.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.getCommandsByPlugin = exports.getCommandDefinition = exports.detectCommand = exports.AUTOCONTENT_TYPES = exports.LIVECELL_TYPES = exports.WORKSPACE_TYPES = exports.Grid3CellType = exports.isRegularCell = exports.isAutoContentCell = exports.isLiveCell = exports.isWorkspaceCell = exports.getCellTypeDisplayName = exports.detectPluginCellType = exports.ensureAlphaChannelFromStyles = exports.SHAPE_NAMES = exports.CellBackgroundShape = exports.createCategoryStyle = exports.createDefaultStylesXml = exports.CATEGORY_STYLES = exports.DEFAULT_GRID3_STYLES = exports.ensureAlphaChannel = exports.normalizeColor = exports.darkenColor = exports.toHexColor = exports.clampAlpha = exports.clampColorChannel = exports.channelToHex = exports.rgbaToHex = exports.getNamedColor = exports.wordlistToXml = exports.updateWordlist = exports.extractWordlists = exports.createWordlist = exports.createFileMapXml = exports.createSettingsXml = exports.generateGrid3Guid = exports.readAllGrid3History = exports.readGrid3HistoryForUser = exports.readGrid3History = exports.isGrid3Installed = exports.findGrid3UserHistory = exports.findGrid3Vocabularies = exports.findGrid3Users = exports.findGrid3HistoryDatabases = exports.findGrid3UserPaths = exports.getCommonDocumentsPath = exports.openImage = exports.getAllowedImageEntries = exports.getPageTokenImageMap = exports.GridsetProcessor = void 0;
10
+ exports.resolveGridsetPasswordFromEnv = exports.resolveGridsetPassword = exports.getSymbolSearchStats = exports.countLibrarySymbols = exports.getSearchSuggestions = exports.getAllSearchTerms = exports.getSymbolDisplayName = exports.getSymbolFilename = exports.searchSymbolsWithReferences = exports.searchSymbols = exports.loadSearchIndexes = exports.parsePixFile = exports.createSymbolManifest = exports.exportSymbolReferencesToCsv = exports.suggestExtractionStrategy = exports.analyzeSymbolExtraction = exports.convertToAstericsImage = exports.extractSymbolLibraryImage = exports.extractButtonImage = exports.getSymbolSearchDir = exports.getSymbolsDir = exports.resolveGrid3CellImage = exports.parseImageSymbolReference = exports.isSymbolLibraryReference = exports.SYMBOL_LIBRARIES = exports.symbolReferenceToFilename = exports.getSymbolSearchIndexesDir = exports.getSymbolLibrariesDir = exports.getDefaultGrid3Path = exports.getSymbolLibraryDisplayName = exports.isKnownSymbolLibrary = exports.getSymbolPath = exports.getSymbolLibraryName = exports.createSymbolReference = exports.analyzeSymbolUsage = exports.extractSymbolReferences = exports.getSymbolLibraryInfo = exports.getAvailableSymbolLibraries = exports.resolveSymbolReference = exports.isSymbolReference = exports.parseSymbolReference = exports.Grid3CommandCategory = exports.GRID3_COMMANDS = exports.extractCommandParameters = exports.getAllPluginIds = exports.getAllCommandIds = exports.getCommandsByCategory = void 0;
11
+ // Processor class
12
+ var gridsetProcessor_1 = require("./processors/gridsetProcessor");
13
+ Object.defineProperty(exports, "GridsetProcessor", { enumerable: true, get: function () { return gridsetProcessor_1.GridsetProcessor; } });
14
+ // === User & File System Helpers ===
15
+ var helpers_1 = require("./processors/gridset/helpers");
16
+ Object.defineProperty(exports, "getPageTokenImageMap", { enumerable: true, get: function () { return helpers_1.getPageTokenImageMap; } });
17
+ Object.defineProperty(exports, "getAllowedImageEntries", { enumerable: true, get: function () { return helpers_1.getAllowedImageEntries; } });
18
+ Object.defineProperty(exports, "openImage", { enumerable: true, get: function () { return helpers_1.openImage; } });
19
+ Object.defineProperty(exports, "getCommonDocumentsPath", { enumerable: true, get: function () { return helpers_1.getCommonDocumentsPath; } });
20
+ Object.defineProperty(exports, "findGrid3UserPaths", { enumerable: true, get: function () { return helpers_1.findGrid3UserPaths; } });
21
+ Object.defineProperty(exports, "findGrid3HistoryDatabases", { enumerable: true, get: function () { return helpers_1.findGrid3HistoryDatabases; } });
22
+ Object.defineProperty(exports, "findGrid3Users", { enumerable: true, get: function () { return helpers_1.findGrid3Users; } });
23
+ Object.defineProperty(exports, "findGrid3Vocabularies", { enumerable: true, get: function () { return helpers_1.findGrid3Vocabularies; } });
24
+ Object.defineProperty(exports, "findGrid3UserHistory", { enumerable: true, get: function () { return helpers_1.findGrid3UserHistory; } });
25
+ Object.defineProperty(exports, "isGrid3Installed", { enumerable: true, get: function () { return helpers_1.isGrid3Installed; } });
26
+ Object.defineProperty(exports, "readGrid3History", { enumerable: true, get: function () { return helpers_1.readGrid3History; } });
27
+ Object.defineProperty(exports, "readGrid3HistoryForUser", { enumerable: true, get: function () { return helpers_1.readGrid3HistoryForUser; } });
28
+ Object.defineProperty(exports, "readAllGrid3History", { enumerable: true, get: function () { return helpers_1.readAllGrid3History; } });
29
+ Object.defineProperty(exports, "generateGrid3Guid", { enumerable: true, get: function () { return helpers_1.generateGrid3Guid; } });
30
+ Object.defineProperty(exports, "createSettingsXml", { enumerable: true, get: function () { return helpers_1.createSettingsXml; } });
31
+ Object.defineProperty(exports, "createFileMapXml", { enumerable: true, get: function () { return helpers_1.createFileMapXml; } });
32
+ // === Wordlist Management ===
33
+ var wordlistHelpers_1 = require("./processors/gridset/wordlistHelpers");
34
+ Object.defineProperty(exports, "createWordlist", { enumerable: true, get: function () { return wordlistHelpers_1.createWordlist; } });
35
+ Object.defineProperty(exports, "extractWordlists", { enumerable: true, get: function () { return wordlistHelpers_1.extractWordlists; } });
36
+ Object.defineProperty(exports, "updateWordlist", { enumerable: true, get: function () { return wordlistHelpers_1.updateWordlist; } });
37
+ Object.defineProperty(exports, "wordlistToXml", { enumerable: true, get: function () { return wordlistHelpers_1.wordlistToXml; } });
38
+ // === Color Utilities ===
39
+ var colorUtils_1 = require("./processors/gridset/colorUtils");
40
+ Object.defineProperty(exports, "getNamedColor", { enumerable: true, get: function () { return colorUtils_1.getNamedColor; } });
41
+ Object.defineProperty(exports, "rgbaToHex", { enumerable: true, get: function () { return colorUtils_1.rgbaToHex; } });
42
+ Object.defineProperty(exports, "channelToHex", { enumerable: true, get: function () { return colorUtils_1.channelToHex; } });
43
+ Object.defineProperty(exports, "clampColorChannel", { enumerable: true, get: function () { return colorUtils_1.clampColorChannel; } });
44
+ Object.defineProperty(exports, "clampAlpha", { enumerable: true, get: function () { return colorUtils_1.clampAlpha; } });
45
+ Object.defineProperty(exports, "toHexColor", { enumerable: true, get: function () { return colorUtils_1.toHexColor; } });
46
+ Object.defineProperty(exports, "darkenColor", { enumerable: true, get: function () { return colorUtils_1.darkenColor; } });
47
+ Object.defineProperty(exports, "normalizeColor", { enumerable: true, get: function () { return colorUtils_1.normalizeColor; } });
48
+ Object.defineProperty(exports, "ensureAlphaChannel", { enumerable: true, get: function () { return colorUtils_1.ensureAlphaChannel; } });
49
+ // === Style Helpers ===
50
+ var styleHelpers_1 = require("./processors/gridset/styleHelpers");
51
+ Object.defineProperty(exports, "DEFAULT_GRID3_STYLES", { enumerable: true, get: function () { return styleHelpers_1.DEFAULT_GRID3_STYLES; } });
52
+ Object.defineProperty(exports, "CATEGORY_STYLES", { enumerable: true, get: function () { return styleHelpers_1.CATEGORY_STYLES; } });
53
+ Object.defineProperty(exports, "createDefaultStylesXml", { enumerable: true, get: function () { return styleHelpers_1.createDefaultStylesXml; } });
54
+ Object.defineProperty(exports, "createCategoryStyle", { enumerable: true, get: function () { return styleHelpers_1.createCategoryStyle; } });
55
+ Object.defineProperty(exports, "CellBackgroundShape", { enumerable: true, get: function () { return styleHelpers_1.CellBackgroundShape; } });
56
+ Object.defineProperty(exports, "SHAPE_NAMES", { enumerable: true, get: function () { return styleHelpers_1.SHAPE_NAMES; } });
57
+ Object.defineProperty(exports, "ensureAlphaChannelFromStyles", { enumerable: true, get: function () { return styleHelpers_1.ensureAlphaChannel; } });
58
+ // === Plugin & Workspace Detection ===
59
+ var pluginTypes_1 = require("./processors/gridset/pluginTypes");
60
+ Object.defineProperty(exports, "detectPluginCellType", { enumerable: true, get: function () { return pluginTypes_1.detectPluginCellType; } });
61
+ Object.defineProperty(exports, "getCellTypeDisplayName", { enumerable: true, get: function () { return pluginTypes_1.getCellTypeDisplayName; } });
62
+ Object.defineProperty(exports, "isWorkspaceCell", { enumerable: true, get: function () { return pluginTypes_1.isWorkspaceCell; } });
63
+ Object.defineProperty(exports, "isLiveCell", { enumerable: true, get: function () { return pluginTypes_1.isLiveCell; } });
64
+ Object.defineProperty(exports, "isAutoContentCell", { enumerable: true, get: function () { return pluginTypes_1.isAutoContentCell; } });
65
+ Object.defineProperty(exports, "isRegularCell", { enumerable: true, get: function () { return pluginTypes_1.isRegularCell; } });
66
+ Object.defineProperty(exports, "Grid3CellType", { enumerable: true, get: function () { return pluginTypes_1.Grid3CellType; } });
67
+ Object.defineProperty(exports, "WORKSPACE_TYPES", { enumerable: true, get: function () { return pluginTypes_1.WORKSPACE_TYPES; } });
68
+ Object.defineProperty(exports, "LIVECELL_TYPES", { enumerable: true, get: function () { return pluginTypes_1.LIVECELL_TYPES; } });
69
+ Object.defineProperty(exports, "AUTOCONTENT_TYPES", { enumerable: true, get: function () { return pluginTypes_1.AUTOCONTENT_TYPES; } });
70
+ // === Command Detection ===
71
+ var commands_1 = require("./processors/gridset/commands");
72
+ Object.defineProperty(exports, "detectCommand", { enumerable: true, get: function () { return commands_1.detectCommand; } });
73
+ Object.defineProperty(exports, "getCommandDefinition", { enumerable: true, get: function () { return commands_1.getCommandDefinition; } });
74
+ Object.defineProperty(exports, "getCommandsByPlugin", { enumerable: true, get: function () { return commands_1.getCommandsByPlugin; } });
75
+ Object.defineProperty(exports, "getCommandsByCategory", { enumerable: true, get: function () { return commands_1.getCommandsByCategory; } });
76
+ Object.defineProperty(exports, "getAllCommandIds", { enumerable: true, get: function () { return commands_1.getAllCommandIds; } });
77
+ Object.defineProperty(exports, "getAllPluginIds", { enumerable: true, get: function () { return commands_1.getAllPluginIds; } });
78
+ Object.defineProperty(exports, "extractCommandParameters", { enumerable: true, get: function () { return commands_1.extractCommandParameters; } });
79
+ Object.defineProperty(exports, "GRID3_COMMANDS", { enumerable: true, get: function () { return commands_1.GRID3_COMMANDS; } });
80
+ Object.defineProperty(exports, "Grid3CommandCategory", { enumerable: true, get: function () { return commands_1.Grid3CommandCategory; } });
81
+ // === Symbol Libraries ===
82
+ var index_1 = require("./processors/gridset/index");
83
+ Object.defineProperty(exports, "parseSymbolReference", { enumerable: true, get: function () { return index_1.parseSymbolReference; } });
84
+ Object.defineProperty(exports, "isSymbolReference", { enumerable: true, get: function () { return index_1.isSymbolReference; } });
85
+ Object.defineProperty(exports, "resolveSymbolReference", { enumerable: true, get: function () { return index_1.resolveSymbolReference; } });
86
+ Object.defineProperty(exports, "getAvailableSymbolLibraries", { enumerable: true, get: function () { return index_1.getAvailableSymbolLibraries; } });
87
+ Object.defineProperty(exports, "getSymbolLibraryInfo", { enumerable: true, get: function () { return index_1.getSymbolLibraryInfo; } });
88
+ Object.defineProperty(exports, "extractSymbolReferences", { enumerable: true, get: function () { return index_1.extractSymbolReferences; } });
89
+ Object.defineProperty(exports, "analyzeSymbolUsage", { enumerable: true, get: function () { return index_1.analyzeSymbolUsage; } });
90
+ Object.defineProperty(exports, "createSymbolReference", { enumerable: true, get: function () { return index_1.createSymbolReference; } });
91
+ Object.defineProperty(exports, "getSymbolLibraryName", { enumerable: true, get: function () { return index_1.getSymbolLibraryName; } });
92
+ Object.defineProperty(exports, "getSymbolPath", { enumerable: true, get: function () { return index_1.getSymbolPath; } });
93
+ Object.defineProperty(exports, "isKnownSymbolLibrary", { enumerable: true, get: function () { return index_1.isKnownSymbolLibrary; } });
94
+ Object.defineProperty(exports, "getSymbolLibraryDisplayName", { enumerable: true, get: function () { return index_1.getSymbolLibraryDisplayName; } });
95
+ Object.defineProperty(exports, "getDefaultGrid3Path", { enumerable: true, get: function () { return index_1.getDefaultGrid3Path; } });
96
+ Object.defineProperty(exports, "getSymbolLibrariesDir", { enumerable: true, get: function () { return index_1.getSymbolLibrariesDir; } });
97
+ Object.defineProperty(exports, "getSymbolSearchIndexesDir", { enumerable: true, get: function () { return index_1.getSymbolSearchIndexesDir; } });
98
+ Object.defineProperty(exports, "symbolReferenceToFilename", { enumerable: true, get: function () { return index_1.symbolReferenceToFilename; } });
99
+ Object.defineProperty(exports, "SYMBOL_LIBRARIES", { enumerable: true, get: function () { return index_1.SYMBOL_LIBRARIES; } });
100
+ Object.defineProperty(exports, "isSymbolLibraryReference", { enumerable: true, get: function () { return index_1.isSymbolLibraryReference; } });
101
+ Object.defineProperty(exports, "parseImageSymbolReference", { enumerable: true, get: function () { return index_1.parseImageSymbolReference; } });
102
+ Object.defineProperty(exports, "resolveGrid3CellImage", { enumerable: true, get: function () { return index_1.resolveGrid3CellImage; } });
103
+ // Backward compatibility
104
+ Object.defineProperty(exports, "getSymbolsDir", { enumerable: true, get: function () { return index_1.getSymbolsDir; } });
105
+ Object.defineProperty(exports, "getSymbolSearchDir", { enumerable: true, get: function () { return index_1.getSymbolSearchDir; } });
106
+ // === Symbol Extraction ===
107
+ var symbolExtractor_1 = require("./processors/gridset/symbolExtractor");
108
+ Object.defineProperty(exports, "extractButtonImage", { enumerable: true, get: function () { return symbolExtractor_1.extractButtonImage; } });
109
+ Object.defineProperty(exports, "extractSymbolLibraryImage", { enumerable: true, get: function () { return symbolExtractor_1.extractSymbolLibraryImage; } });
110
+ Object.defineProperty(exports, "convertToAstericsImage", { enumerable: true, get: function () { return symbolExtractor_1.convertToAstericsImage; } });
111
+ Object.defineProperty(exports, "analyzeSymbolExtraction", { enumerable: true, get: function () { return symbolExtractor_1.analyzeSymbolExtraction; } });
112
+ Object.defineProperty(exports, "suggestExtractionStrategy", { enumerable: true, get: function () { return symbolExtractor_1.suggestExtractionStrategy; } });
113
+ Object.defineProperty(exports, "exportSymbolReferencesToCsv", { enumerable: true, get: function () { return symbolExtractor_1.exportSymbolReferencesToCsv; } });
114
+ Object.defineProperty(exports, "createSymbolManifest", { enumerable: true, get: function () { return symbolExtractor_1.createSymbolManifest; } });
115
+ // === Symbol Search ===
116
+ var symbolSearch_1 = require("./processors/gridset/symbolSearch");
117
+ Object.defineProperty(exports, "parsePixFile", { enumerable: true, get: function () { return symbolSearch_1.parsePixFile; } });
118
+ Object.defineProperty(exports, "loadSearchIndexes", { enumerable: true, get: function () { return symbolSearch_1.loadSearchIndexes; } });
119
+ Object.defineProperty(exports, "searchSymbols", { enumerable: true, get: function () { return symbolSearch_1.searchSymbols; } });
120
+ Object.defineProperty(exports, "searchSymbolsWithReferences", { enumerable: true, get: function () { return symbolSearch_1.searchSymbolsWithReferences; } });
121
+ Object.defineProperty(exports, "getSymbolFilename", { enumerable: true, get: function () { return symbolSearch_1.getSymbolFilename; } });
122
+ Object.defineProperty(exports, "getSymbolDisplayName", { enumerable: true, get: function () { return symbolSearch_1.getSymbolDisplayName; } });
123
+ Object.defineProperty(exports, "getAllSearchTerms", { enumerable: true, get: function () { return symbolSearch_1.getAllSearchTerms; } });
124
+ Object.defineProperty(exports, "getSearchSuggestions", { enumerable: true, get: function () { return symbolSearch_1.getSearchSuggestions; } });
125
+ Object.defineProperty(exports, "countLibrarySymbols", { enumerable: true, get: function () { return symbolSearch_1.countLibrarySymbols; } });
126
+ Object.defineProperty(exports, "getSymbolSearchStats", { enumerable: true, get: function () { return symbolSearch_1.getSymbolSearchStats; } });
127
+ // === Password Management ===
128
+ var password_1 = require("./processors/gridset/password");
129
+ Object.defineProperty(exports, "resolveGridsetPassword", { enumerable: true, get: function () { return password_1.resolveGridsetPassword; } });
130
+ Object.defineProperty(exports, "resolveGridsetPasswordFromEnv", { enumerable: true, get: function () { return password_1.resolveGridsetPasswordFromEnv; } });
package/dist/index.d.ts CHANGED
@@ -1,16 +1,37 @@
1
+ /**
2
+ * AACProcessors Library
3
+ *
4
+ * A comprehensive TypeScript library for processing AAC file formats.
5
+ *
6
+ * @module aac-processors
7
+ */
1
8
  export * from './core/treeStructure';
2
9
  export * from './core/baseProcessor';
3
10
  export * from './core/stringCasing';
4
11
  export * from './processors';
5
- export * from './validation';
6
12
  export * as Analytics from './utilities/analytics';
7
- export { collectUnifiedHistory, listGrid3Users as listHistoryGrid3Users, listSnapUsers as listHistorySnapUsers, } from './utilities/analytics/history';
13
+ export * as Validation from './validation';
14
+ export * as Gridset from './gridset';
15
+ export * as Snap from './snap';
16
+ export * as OBF from './obf';
17
+ export * as Obfset from './obfset';
18
+ export * as TouchChat from './touchchat';
19
+ export * as Dot from './dot';
20
+ export * as Excel from './excel';
21
+ export * as Opml from './opml';
22
+ export * as ApplePanels from './applePanels';
23
+ export * as AstericsGrid from './astericsGrid';
24
+ export * as Translation from './translation';
8
25
  import { BaseProcessor } from './core/baseProcessor';
9
26
  /**
10
27
  * Factory function to get the appropriate processor for a file extension
11
28
  * @param filePathOrExtension - File path or extension (e.g., '.dot', '/path/to/file.obf')
12
29
  * @returns The appropriate processor instance
13
30
  * @throws Error if the file extension is not supported
31
+ *
32
+ * @example
33
+ * const processor = getProcessor('/path/to/file.gridset');
34
+ * const tree = processor.loadIntoTree('/path/to/file.gridset');
14
35
  */
15
36
  export declare function getProcessor(filePathOrExtension: string): BaseProcessor;
16
37
  /**
package/dist/index.js CHANGED
@@ -1,4 +1,11 @@
1
1
  "use strict";
2
+ /**
3
+ * AACProcessors Library
4
+ *
5
+ * A comprehensive TypeScript library for processing AAC file formats.
6
+ *
7
+ * @module aac-processors
8
+ */
2
9
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
10
  if (k2 === undefined) k2 = k;
4
11
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -26,21 +33,39 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
33
  return result;
27
34
  };
28
35
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.listHistorySnapUsers = exports.listHistoryGrid3Users = exports.collectUnifiedHistory = exports.Analytics = void 0;
36
+ exports.Translation = exports.AstericsGrid = exports.ApplePanels = exports.Opml = exports.Excel = exports.Dot = exports.TouchChat = exports.Obfset = exports.OBF = exports.Snap = exports.Gridset = exports.Validation = exports.Analytics = void 0;
30
37
  exports.getProcessor = getProcessor;
31
38
  exports.getSupportedExtensions = getSupportedExtensions;
32
39
  exports.isExtensionSupported = isExtensionSupported;
33
- // Main entry point for AACProcessors library
40
+ // ===================================================================
41
+ // CORE TYPES (always needed)
42
+ // ===================================================================
34
43
  __exportStar(require("./core/treeStructure"), exports);
35
44
  __exportStar(require("./core/baseProcessor"), exports);
36
45
  __exportStar(require("./core/stringCasing"), exports);
46
+ // ===================================================================
47
+ // PROCESSORS (main functionality)
48
+ // ===================================================================
37
49
  __exportStar(require("./processors"), exports);
38
- __exportStar(require("./validation"), exports);
50
+ // ===================================================================
51
+ // NAMESPACES
52
+ // ===================================================================
53
+ // Analytics namespace
39
54
  exports.Analytics = __importStar(require("./utilities/analytics"));
40
- var history_1 = require("./utilities/analytics/history");
41
- Object.defineProperty(exports, "collectUnifiedHistory", { enumerable: true, get: function () { return history_1.collectUnifiedHistory; } });
42
- Object.defineProperty(exports, "listHistoryGrid3Users", { enumerable: true, get: function () { return history_1.listGrid3Users; } });
43
- Object.defineProperty(exports, "listHistorySnapUsers", { enumerable: true, get: function () { return history_1.listSnapUsers; } });
55
+ // Validation namespace
56
+ exports.Validation = __importStar(require("./validation"));
57
+ // Processor namespaces (platform-specific utilities)
58
+ exports.Gridset = __importStar(require("./gridset"));
59
+ exports.Snap = __importStar(require("./snap"));
60
+ exports.OBF = __importStar(require("./obf"));
61
+ exports.Obfset = __importStar(require("./obfset"));
62
+ exports.TouchChat = __importStar(require("./touchchat"));
63
+ exports.Dot = __importStar(require("./dot"));
64
+ exports.Excel = __importStar(require("./excel"));
65
+ exports.Opml = __importStar(require("./opml"));
66
+ exports.ApplePanels = __importStar(require("./applePanels"));
67
+ exports.AstericsGrid = __importStar(require("./astericsGrid"));
68
+ exports.Translation = __importStar(require("./translation"));
44
69
  const dotProcessor_1 = require("./processors/dotProcessor");
45
70
  const excelProcessor_1 = require("./processors/excelProcessor");
46
71
  const opmlProcessor_1 = require("./processors/opmlProcessor");
@@ -56,6 +81,10 @@ const obfsetProcessor_1 = require("./processors/obfsetProcessor");
56
81
  * @param filePathOrExtension - File path or extension (e.g., '.dot', '/path/to/file.obf')
57
82
  * @returns The appropriate processor instance
58
83
  * @throws Error if the file extension is not supported
84
+ *
85
+ * @example
86
+ * const processor = getProcessor('/path/to/file.gridset');
87
+ * const tree = processor.loadIntoTree('/path/to/file.gridset');
59
88
  */
60
89
  function getProcessor(filePathOrExtension) {
61
90
  // Extract extension from file path
package/dist/obf.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ /**
2
+ * OBF (Open Board Format) Namespace
3
+ *
4
+ * All OBF/OBZ-specific utilities, helpers, and types.
5
+ */
6
+ export { ObfProcessor } from './processors/obfProcessor';
7
+ export { ObfsetProcessor } from './processors/obfsetProcessor';
package/dist/obf.js ADDED
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /**
3
+ * OBF (Open Board Format) Namespace
4
+ *
5
+ * All OBF/OBZ-specific utilities, helpers, and types.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ObfsetProcessor = exports.ObfProcessor = void 0;
9
+ // Processor class
10
+ var obfProcessor_1 = require("./processors/obfProcessor");
11
+ Object.defineProperty(exports, "ObfProcessor", { enumerable: true, get: function () { return obfProcessor_1.ObfProcessor; } });
12
+ var obfsetProcessor_1 = require("./processors/obfsetProcessor");
13
+ Object.defineProperty(exports, "ObfsetProcessor", { enumerable: true, get: function () { return obfsetProcessor_1.ObfsetProcessor; } });
14
+ // Note: OBF doesn't currently have platform-specific helpers like Gridset/Snap
15
+ // Future helper functions can be added here
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Obfset Namespace
3
+ *
4
+ * OBF Set (multiple OBF files) processing.
5
+ */
6
+ export { ObfsetProcessor } from './processors/obfsetProcessor';
package/dist/obfset.js ADDED
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ /**
3
+ * Obfset Namespace
4
+ *
5
+ * OBF Set (multiple OBF files) processing.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ObfsetProcessor = void 0;
9
+ // Processor class
10
+ var obfsetProcessor_1 = require("./processors/obfsetProcessor");
11
+ Object.defineProperty(exports, "ObfsetProcessor", { enumerable: true, get: function () { return obfsetProcessor_1.ObfsetProcessor; } });
12
+ // Note: Obfset doesn't currently have platform-specific helpers
13
+ // Future helper functions can be added here
package/dist/opml.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ /**
2
+ * OPML (Outline Processor Markup Language) Namespace
3
+ *
4
+ * OPML format processing for hierarchical communication boards.
5
+ */
6
+ export { OpmlProcessor } from './processors/opmlProcessor';
package/dist/opml.js ADDED
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ /**
3
+ * OPML (Outline Processor Markup Language) Namespace
4
+ *
5
+ * OPML format processing for hierarchical communication boards.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.OpmlProcessor = void 0;
9
+ // Processor class
10
+ var opmlProcessor_1 = require("./processors/opmlProcessor");
11
+ Object.defineProperty(exports, "OpmlProcessor", { enumerable: true, get: function () { return opmlProcessor_1.OpmlProcessor; } });
12
+ // Note: OPML doesn't currently have platform-specific helpers
13
+ // Future helper functions can be added here
@@ -1,3 +1,11 @@
1
+ /**
2
+ * AAC Processor Classes
3
+ *
4
+ * All processor classes for different AAC file formats.
5
+ * For platform-specific utilities (Gridset, Snap, etc.), use the namespace imports:
6
+ * - import { Gridset } from 'aac-processors/gridset';
7
+ * - import { Snap } from 'aac-processors/snap';
8
+ */
1
9
  export { ApplePanelsProcessor } from './applePanelsProcessor';
2
10
  export { DotProcessor } from './dotProcessor';
3
11
  export { ExcelProcessor } from './excelProcessor';
@@ -8,21 +16,3 @@ export { SnapProcessor } from './snapProcessor';
8
16
  export { TouchChatProcessor } from './touchchatProcessor';
9
17
  export { AstericsGridProcessor } from './astericsGridProcessor';
10
18
  export { ObfsetProcessor } from './obfsetProcessor';
11
- export { getPageTokenImageMap, getAllowedImageEntries, openImage, generateGrid3Guid, createSettingsXml, createFileMapXml, getCommonDocumentsPath, findGrid3UserPaths, findGrid3HistoryDatabases, findGrid3Users, findGrid3Vocabularies, findGrid3UserHistory, isGrid3Installed, readGrid3History, readGrid3HistoryForUser, readAllGrid3History, type Grid3UserPath, type Grid3VocabularyPath, type Grid3HistoryEntry, } from './gridset/helpers';
12
- export { getPageTokenImageMap as getGridsetPageTokenImageMap, getAllowedImageEntries as getGridsetAllowedImageEntries, openImage as openGridsetImage, generateGrid3Guid as generateGridsetGuid, createSettingsXml as createGridsetSettingsXml, createFileMapXml as createGridsetFileMapXml, getCommonDocumentsPath as getGridsetCommonDocumentsPath, findGrid3UserPaths as findGridsetUserPaths, findGrid3HistoryDatabases as findGridsetHistoryDatabases, findGrid3Users as findGridsetUsers, findGrid3Vocabularies as findGridsetVocabularies, findGrid3UserHistory as findGridsetUserHistory, isGrid3Installed as isGridsetInstalled, readGrid3History as readGridsetHistory, readGrid3HistoryForUser as readGridsetHistoryForUser, readAllGrid3History as readAllGridsetHistory, } from './gridset/helpers';
13
- export { resolveGrid3CellImage } from './gridset/resolver';
14
- export { createWordlist, extractWordlists, updateWordlist, wordlistToXml, type WordList, type WordListItem, } from './gridset/wordlistHelpers';
15
- export { resolveGridsetPassword, resolveGridsetPasswordFromEnv } from './gridset/password';
16
- export { getNamedColor, rgbaToHex, channelToHex, clampColorChannel, clampAlpha, toHexColor, darkenColor, normalizeColor, ensureAlphaChannel, } from './gridset/colorUtils';
17
- export { DEFAULT_GRID3_STYLES, CATEGORY_STYLES, createDefaultStylesXml, createCategoryStyle, CellBackgroundShape, SHAPE_NAMES, } from './gridset/styleHelpers';
18
- export { ensureAlphaChannel as ensureAlphaChannelFromStyles } from './gridset/styleHelpers';
19
- export { detectPluginCellType, type Grid3PluginMetadata, Grid3CellType, WORKSPACE_TYPES, LIVECELL_TYPES, AUTOCONTENT_TYPES, getCellTypeDisplayName, isWorkspaceCell, isLiveCell, isAutoContentCell, isRegularCell, } from './gridset/pluginTypes';
20
- export { detectCommand, getCommandDefinition, getCommandsByPlugin, getCommandsByCategory, getAllCommandIds, getAllPluginIds, extractCommandParameters, GRID3_COMMANDS, type Grid3CommandDefinition, type CommandParameter, type ExtractedParameters, Grid3CommandCategory, } from './gridset/commands';
21
- export * from './gridset/index';
22
- export { parseSymbolReference, isSymbolReference, resolveSymbolReference, getAvailableSymbolLibraries, getSymbolLibraryInfo, extractSymbolReferences, analyzeSymbolUsage, createSymbolReference, getSymbolLibraryName, getSymbolPath, isKnownSymbolLibrary, getSymbolLibraryDisplayName, getDefaultGrid3Path, getSymbolLibrariesDir, getSymbolSearchIndexesDir, symbolReferenceToFilename, SYMBOL_LIBRARIES, } from './gridset/symbols';
23
- export { isSymbolLibraryReference, parseImageSymbolReference } from './gridset/resolver';
24
- export { getSymbolsDir, getSymbolSearchDir } from './gridset/symbols';
25
- export { extractButtonImage, extractSymbolLibraryImage, convertToAstericsImage, analyzeSymbolExtraction, suggestExtractionStrategy, exportSymbolReferencesToCsv, createSymbolManifest, } from './gridset/symbolExtractor';
26
- export { parsePixFile, loadSearchIndexes, searchSymbols, searchSymbolsWithReferences, getSymbolFilename, getSymbolDisplayName, getAllSearchTerms, getSearchSuggestions, countLibrarySymbols, getSymbolSearchStats, } from './gridset/symbolSearch';
27
- 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';
28
- export { getPageTokenImageMap as getTouchChatPageTokenImageMap, getAllowedImageEntries as getTouchChatAllowedImageEntries, openImage as openTouchChatImage, } from './touchchat/helpers';