@willwade/aac-processors 0.0.14 → 0.0.16
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 +58 -10
- package/dist/applePanels.d.ts +6 -0
- package/dist/applePanels.js +13 -0
- package/dist/astericsGrid.d.ts +6 -0
- package/dist/astericsGrid.js +13 -0
- package/dist/core/treeStructure.d.ts +1 -0
- package/dist/dot.d.ts +6 -0
- package/dist/dot.js +13 -0
- package/dist/excel.d.ts +6 -0
- package/dist/excel.js +13 -0
- package/dist/gridset.d.ts +17 -0
- package/dist/gridset.js +130 -0
- package/dist/index.d.ts +23 -2
- package/dist/index.js +36 -7
- package/dist/obf.d.ts +7 -0
- package/dist/obf.js +15 -0
- package/dist/obfset.d.ts +6 -0
- package/dist/obfset.js +13 -0
- package/dist/opml.d.ts +6 -0
- package/dist/opml.js +13 -0
- package/dist/processors/gridset/commands.js +15 -0
- package/dist/processors/gridset/pluginTypes.js +4 -4
- package/dist/processors/gridsetProcessor.d.ts +4 -0
- package/dist/processors/gridsetProcessor.js +315 -47
- package/dist/processors/index.d.ts +8 -18
- package/dist/processors/index.js +9 -175
- package/dist/processors/snapProcessor.js +105 -9
- package/dist/processors/touchchatProcessor.js +33 -13
- package/dist/snap.d.ts +7 -0
- package/dist/snap.js +24 -0
- package/dist/touchchat.d.ts +7 -0
- package/dist/touchchat.js +16 -0
- package/dist/translation.d.ts +13 -0
- package/dist/translation.js +21 -0
- package/dist/types/aac.d.ts +13 -3
- package/dist/types/aac.js +6 -2
- package/dist/utilities/analytics/metrics/comparison.d.ts +1 -0
- package/dist/utilities/analytics/metrics/comparison.js +52 -24
- package/dist/utilities/analytics/metrics/core.d.ts +7 -2
- package/dist/utilities/analytics/metrics/core.js +327 -197
- package/dist/utilities/analytics/metrics/effort.d.ts +8 -3
- package/dist/utilities/analytics/metrics/effort.js +10 -5
- package/dist/utilities/analytics/metrics/sentence.js +17 -4
- package/dist/utilities/analytics/metrics/types.d.ts +39 -0
- package/dist/utilities/analytics/metrics/vocabulary.js +1 -1
- package/dist/utilities/analytics/reference/index.js +12 -1
- package/dist/utilities/translation/translationProcessor.d.ts +2 -1
- package/dist/utilities/translation/translationProcessor.js +5 -2
- package/dist/validation.d.ts +13 -0
- package/dist/validation.js +28 -0
- package/package.json +58 -4
- package/dist/utilities/screenshotConverter.d.ts +0 -69
- package/dist/utilities/screenshotConverter.js +0 -453
package/dist/processors/index.js
CHANGED
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
2
|
+
/**
|
|
3
|
+
* AAC Processor Classes
|
|
4
|
+
*
|
|
5
|
+
* All processor classes for different AAC file formats.
|
|
6
|
+
* For platform-specific utilities (Gridset, Snap, etc.), use the namespace imports:
|
|
7
|
+
* - import { Gridset } from 'aac-processors/gridset';
|
|
8
|
+
* - import { Snap } from 'aac-processors/snap';
|
|
9
|
+
*/
|
|
16
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
18
|
-
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 = exports.getCommandsByPlugin = exports.getCommandDefinition = exports.detectCommand = exports.isRegularCell = exports.isAutoContentCell = exports.isLiveCell = exports.isWorkspaceCell = exports.getCellTypeDisplayName = exports.AUTOCONTENT_TYPES = exports.LIVECELL_TYPES = exports.WORKSPACE_TYPES = exports.Grid3CellType = 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 = void 0;
|
|
19
|
-
exports.openTouchChatImage = exports.getTouchChatAllowedImageEntries = exports.getTouchChatPageTokenImageMap = exports.readSnapUsageForUser = exports.readSnapUsage = exports.isSnapInstalled = exports.findSnapUserHistory = exports.findSnapUserVocabularies = exports.findSnapUsers = exports.findSnapPackagePath = exports.findSnapPackages = exports.openSnapImage = exports.getSnapAllowedImageEntries = exports.getSnapPageTokenImageMap = 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.parseImageSymbolReference = exports.isSymbolLibraryReference = exports.SYMBOL_LIBRARIES = void 0;
|
|
11
|
+
exports.ObfsetProcessor = exports.AstericsGridProcessor = exports.TouchChatProcessor = exports.SnapProcessor = exports.OpmlProcessor = exports.ObfProcessor = exports.GridsetProcessor = exports.ExcelProcessor = exports.DotProcessor = exports.ApplePanelsProcessor = void 0;
|
|
20
12
|
var applePanelsProcessor_1 = require("./applePanelsProcessor");
|
|
21
13
|
Object.defineProperty(exports, "ApplePanelsProcessor", { enumerable: true, get: function () { return applePanelsProcessor_1.ApplePanelsProcessor; } });
|
|
22
14
|
var dotProcessor_1 = require("./dotProcessor");
|
|
@@ -37,161 +29,3 @@ var astericsGridProcessor_1 = require("./astericsGridProcessor");
|
|
|
37
29
|
Object.defineProperty(exports, "AstericsGridProcessor", { enumerable: true, get: function () { return astericsGridProcessor_1.AstericsGridProcessor; } });
|
|
38
30
|
var obfsetProcessor_1 = require("./obfsetProcessor");
|
|
39
31
|
Object.defineProperty(exports, "ObfsetProcessor", { enumerable: true, get: function () { return obfsetProcessor_1.ObfsetProcessor; } });
|
|
40
|
-
// Gridset (Grid 3) helpers
|
|
41
|
-
var helpers_1 = require("./gridset/helpers");
|
|
42
|
-
Object.defineProperty(exports, "getPageTokenImageMap", { enumerable: true, get: function () { return helpers_1.getPageTokenImageMap; } });
|
|
43
|
-
Object.defineProperty(exports, "getAllowedImageEntries", { enumerable: true, get: function () { return helpers_1.getAllowedImageEntries; } });
|
|
44
|
-
Object.defineProperty(exports, "openImage", { enumerable: true, get: function () { return helpers_1.openImage; } });
|
|
45
|
-
Object.defineProperty(exports, "generateGrid3Guid", { enumerable: true, get: function () { return helpers_1.generateGrid3Guid; } });
|
|
46
|
-
Object.defineProperty(exports, "createSettingsXml", { enumerable: true, get: function () { return helpers_1.createSettingsXml; } });
|
|
47
|
-
Object.defineProperty(exports, "createFileMapXml", { enumerable: true, get: function () { return helpers_1.createFileMapXml; } });
|
|
48
|
-
Object.defineProperty(exports, "getCommonDocumentsPath", { enumerable: true, get: function () { return helpers_1.getCommonDocumentsPath; } });
|
|
49
|
-
Object.defineProperty(exports, "findGrid3UserPaths", { enumerable: true, get: function () { return helpers_1.findGrid3UserPaths; } });
|
|
50
|
-
Object.defineProperty(exports, "findGrid3HistoryDatabases", { enumerable: true, get: function () { return helpers_1.findGrid3HistoryDatabases; } });
|
|
51
|
-
Object.defineProperty(exports, "findGrid3Users", { enumerable: true, get: function () { return helpers_1.findGrid3Users; } });
|
|
52
|
-
Object.defineProperty(exports, "findGrid3Vocabularies", { enumerable: true, get: function () { return helpers_1.findGrid3Vocabularies; } });
|
|
53
|
-
Object.defineProperty(exports, "findGrid3UserHistory", { enumerable: true, get: function () { return helpers_1.findGrid3UserHistory; } });
|
|
54
|
-
Object.defineProperty(exports, "isGrid3Installed", { enumerable: true, get: function () { return helpers_1.isGrid3Installed; } });
|
|
55
|
-
Object.defineProperty(exports, "readGrid3History", { enumerable: true, get: function () { return helpers_1.readGrid3History; } });
|
|
56
|
-
Object.defineProperty(exports, "readGrid3HistoryForUser", { enumerable: true, get: function () { return helpers_1.readGrid3HistoryForUser; } });
|
|
57
|
-
Object.defineProperty(exports, "readAllGrid3History", { enumerable: true, get: function () { return helpers_1.readAllGrid3History; } });
|
|
58
|
-
var helpers_2 = require("./gridset/helpers");
|
|
59
|
-
Object.defineProperty(exports, "getGridsetPageTokenImageMap", { enumerable: true, get: function () { return helpers_2.getPageTokenImageMap; } });
|
|
60
|
-
Object.defineProperty(exports, "getGridsetAllowedImageEntries", { enumerable: true, get: function () { return helpers_2.getAllowedImageEntries; } });
|
|
61
|
-
Object.defineProperty(exports, "openGridsetImage", { enumerable: true, get: function () { return helpers_2.openImage; } });
|
|
62
|
-
Object.defineProperty(exports, "generateGridsetGuid", { enumerable: true, get: function () { return helpers_2.generateGrid3Guid; } });
|
|
63
|
-
Object.defineProperty(exports, "createGridsetSettingsXml", { enumerable: true, get: function () { return helpers_2.createSettingsXml; } });
|
|
64
|
-
Object.defineProperty(exports, "createGridsetFileMapXml", { enumerable: true, get: function () { return helpers_2.createFileMapXml; } });
|
|
65
|
-
Object.defineProperty(exports, "getGridsetCommonDocumentsPath", { enumerable: true, get: function () { return helpers_2.getCommonDocumentsPath; } });
|
|
66
|
-
Object.defineProperty(exports, "findGridsetUserPaths", { enumerable: true, get: function () { return helpers_2.findGrid3UserPaths; } });
|
|
67
|
-
Object.defineProperty(exports, "findGridsetHistoryDatabases", { enumerable: true, get: function () { return helpers_2.findGrid3HistoryDatabases; } });
|
|
68
|
-
Object.defineProperty(exports, "findGridsetUsers", { enumerable: true, get: function () { return helpers_2.findGrid3Users; } });
|
|
69
|
-
Object.defineProperty(exports, "findGridsetVocabularies", { enumerable: true, get: function () { return helpers_2.findGrid3Vocabularies; } });
|
|
70
|
-
Object.defineProperty(exports, "findGridsetUserHistory", { enumerable: true, get: function () { return helpers_2.findGrid3UserHistory; } });
|
|
71
|
-
Object.defineProperty(exports, "isGridsetInstalled", { enumerable: true, get: function () { return helpers_2.isGrid3Installed; } });
|
|
72
|
-
Object.defineProperty(exports, "readGridsetHistory", { enumerable: true, get: function () { return helpers_2.readGrid3History; } });
|
|
73
|
-
Object.defineProperty(exports, "readGridsetHistoryForUser", { enumerable: true, get: function () { return helpers_2.readGrid3HistoryForUser; } });
|
|
74
|
-
Object.defineProperty(exports, "readAllGridsetHistory", { enumerable: true, get: function () { return helpers_2.readAllGrid3History; } });
|
|
75
|
-
var resolver_1 = require("./gridset/resolver");
|
|
76
|
-
Object.defineProperty(exports, "resolveGrid3CellImage", { enumerable: true, get: function () { return resolver_1.resolveGrid3CellImage; } });
|
|
77
|
-
// Gridset (Grid 3) wordlist helpers
|
|
78
|
-
var wordlistHelpers_1 = require("./gridset/wordlistHelpers");
|
|
79
|
-
Object.defineProperty(exports, "createWordlist", { enumerable: true, get: function () { return wordlistHelpers_1.createWordlist; } });
|
|
80
|
-
Object.defineProperty(exports, "extractWordlists", { enumerable: true, get: function () { return wordlistHelpers_1.extractWordlists; } });
|
|
81
|
-
Object.defineProperty(exports, "updateWordlist", { enumerable: true, get: function () { return wordlistHelpers_1.updateWordlist; } });
|
|
82
|
-
Object.defineProperty(exports, "wordlistToXml", { enumerable: true, get: function () { return wordlistHelpers_1.wordlistToXml; } });
|
|
83
|
-
var password_1 = require("./gridset/password");
|
|
84
|
-
Object.defineProperty(exports, "resolveGridsetPassword", { enumerable: true, get: function () { return password_1.resolveGridsetPassword; } });
|
|
85
|
-
Object.defineProperty(exports, "resolveGridsetPasswordFromEnv", { enumerable: true, get: function () { return password_1.resolveGridsetPasswordFromEnv; } });
|
|
86
|
-
// Gridset (Grid 3) color utilities
|
|
87
|
-
var colorUtils_1 = require("./gridset/colorUtils");
|
|
88
|
-
Object.defineProperty(exports, "getNamedColor", { enumerable: true, get: function () { return colorUtils_1.getNamedColor; } });
|
|
89
|
-
Object.defineProperty(exports, "rgbaToHex", { enumerable: true, get: function () { return colorUtils_1.rgbaToHex; } });
|
|
90
|
-
Object.defineProperty(exports, "channelToHex", { enumerable: true, get: function () { return colorUtils_1.channelToHex; } });
|
|
91
|
-
Object.defineProperty(exports, "clampColorChannel", { enumerable: true, get: function () { return colorUtils_1.clampColorChannel; } });
|
|
92
|
-
Object.defineProperty(exports, "clampAlpha", { enumerable: true, get: function () { return colorUtils_1.clampAlpha; } });
|
|
93
|
-
Object.defineProperty(exports, "toHexColor", { enumerable: true, get: function () { return colorUtils_1.toHexColor; } });
|
|
94
|
-
Object.defineProperty(exports, "darkenColor", { enumerable: true, get: function () { return colorUtils_1.darkenColor; } });
|
|
95
|
-
Object.defineProperty(exports, "normalizeColor", { enumerable: true, get: function () { return colorUtils_1.normalizeColor; } });
|
|
96
|
-
Object.defineProperty(exports, "ensureAlphaChannel", { enumerable: true, get: function () { return colorUtils_1.ensureAlphaChannel; } });
|
|
97
|
-
// Gridset (Grid 3) style helpers
|
|
98
|
-
var styleHelpers_1 = require("./gridset/styleHelpers");
|
|
99
|
-
Object.defineProperty(exports, "DEFAULT_GRID3_STYLES", { enumerable: true, get: function () { return styleHelpers_1.DEFAULT_GRID3_STYLES; } });
|
|
100
|
-
Object.defineProperty(exports, "CATEGORY_STYLES", { enumerable: true, get: function () { return styleHelpers_1.CATEGORY_STYLES; } });
|
|
101
|
-
Object.defineProperty(exports, "createDefaultStylesXml", { enumerable: true, get: function () { return styleHelpers_1.createDefaultStylesXml; } });
|
|
102
|
-
Object.defineProperty(exports, "createCategoryStyle", { enumerable: true, get: function () { return styleHelpers_1.createCategoryStyle; } });
|
|
103
|
-
Object.defineProperty(exports, "CellBackgroundShape", { enumerable: true, get: function () { return styleHelpers_1.CellBackgroundShape; } });
|
|
104
|
-
Object.defineProperty(exports, "SHAPE_NAMES", { enumerable: true, get: function () { return styleHelpers_1.SHAPE_NAMES; } });
|
|
105
|
-
// Re-export ensureAlphaChannel from styleHelpers for backward compatibility
|
|
106
|
-
var styleHelpers_2 = require("./gridset/styleHelpers");
|
|
107
|
-
Object.defineProperty(exports, "ensureAlphaChannelFromStyles", { enumerable: true, get: function () { return styleHelpers_2.ensureAlphaChannel; } });
|
|
108
|
-
// Gridset (Grid 3) plugin cell type detection
|
|
109
|
-
var pluginTypes_1 = require("./gridset/pluginTypes");
|
|
110
|
-
Object.defineProperty(exports, "detectPluginCellType", { enumerable: true, get: function () { return pluginTypes_1.detectPluginCellType; } });
|
|
111
|
-
Object.defineProperty(exports, "Grid3CellType", { enumerable: true, get: function () { return pluginTypes_1.Grid3CellType; } });
|
|
112
|
-
Object.defineProperty(exports, "WORKSPACE_TYPES", { enumerable: true, get: function () { return pluginTypes_1.WORKSPACE_TYPES; } });
|
|
113
|
-
Object.defineProperty(exports, "LIVECELL_TYPES", { enumerable: true, get: function () { return pluginTypes_1.LIVECELL_TYPES; } });
|
|
114
|
-
Object.defineProperty(exports, "AUTOCONTENT_TYPES", { enumerable: true, get: function () { return pluginTypes_1.AUTOCONTENT_TYPES; } });
|
|
115
|
-
Object.defineProperty(exports, "getCellTypeDisplayName", { enumerable: true, get: function () { return pluginTypes_1.getCellTypeDisplayName; } });
|
|
116
|
-
Object.defineProperty(exports, "isWorkspaceCell", { enumerable: true, get: function () { return pluginTypes_1.isWorkspaceCell; } });
|
|
117
|
-
Object.defineProperty(exports, "isLiveCell", { enumerable: true, get: function () { return pluginTypes_1.isLiveCell; } });
|
|
118
|
-
Object.defineProperty(exports, "isAutoContentCell", { enumerable: true, get: function () { return pluginTypes_1.isAutoContentCell; } });
|
|
119
|
-
Object.defineProperty(exports, "isRegularCell", { enumerable: true, get: function () { return pluginTypes_1.isRegularCell; } });
|
|
120
|
-
// Gridset (Grid 3) command definitions and detection
|
|
121
|
-
var commands_1 = require("./gridset/commands");
|
|
122
|
-
Object.defineProperty(exports, "detectCommand", { enumerable: true, get: function () { return commands_1.detectCommand; } });
|
|
123
|
-
Object.defineProperty(exports, "getCommandDefinition", { enumerable: true, get: function () { return commands_1.getCommandDefinition; } });
|
|
124
|
-
Object.defineProperty(exports, "getCommandsByPlugin", { enumerable: true, get: function () { return commands_1.getCommandsByPlugin; } });
|
|
125
|
-
Object.defineProperty(exports, "getCommandsByCategory", { enumerable: true, get: function () { return commands_1.getCommandsByCategory; } });
|
|
126
|
-
Object.defineProperty(exports, "getAllCommandIds", { enumerable: true, get: function () { return commands_1.getAllCommandIds; } });
|
|
127
|
-
Object.defineProperty(exports, "getAllPluginIds", { enumerable: true, get: function () { return commands_1.getAllPluginIds; } });
|
|
128
|
-
Object.defineProperty(exports, "extractCommandParameters", { enumerable: true, get: function () { return commands_1.extractCommandParameters; } });
|
|
129
|
-
Object.defineProperty(exports, "GRID3_COMMANDS", { enumerable: true, get: function () { return commands_1.GRID3_COMMANDS; } });
|
|
130
|
-
Object.defineProperty(exports, "Grid3CommandCategory", { enumerable: true, get: function () { return commands_1.Grid3CommandCategory; } });
|
|
131
|
-
// Gridset (Grid 3) enhanced index - re-export everything
|
|
132
|
-
__exportStar(require("./gridset/index"), exports);
|
|
133
|
-
// Gridset (Grid 3) symbol library handling
|
|
134
|
-
var symbols_1 = require("./gridset/symbols");
|
|
135
|
-
Object.defineProperty(exports, "parseSymbolReference", { enumerable: true, get: function () { return symbols_1.parseSymbolReference; } });
|
|
136
|
-
Object.defineProperty(exports, "isSymbolReference", { enumerable: true, get: function () { return symbols_1.isSymbolReference; } });
|
|
137
|
-
Object.defineProperty(exports, "resolveSymbolReference", { enumerable: true, get: function () { return symbols_1.resolveSymbolReference; } });
|
|
138
|
-
Object.defineProperty(exports, "getAvailableSymbolLibraries", { enumerable: true, get: function () { return symbols_1.getAvailableSymbolLibraries; } });
|
|
139
|
-
Object.defineProperty(exports, "getSymbolLibraryInfo", { enumerable: true, get: function () { return symbols_1.getSymbolLibraryInfo; } });
|
|
140
|
-
Object.defineProperty(exports, "extractSymbolReferences", { enumerable: true, get: function () { return symbols_1.extractSymbolReferences; } });
|
|
141
|
-
Object.defineProperty(exports, "analyzeSymbolUsage", { enumerable: true, get: function () { return symbols_1.analyzeSymbolUsage; } });
|
|
142
|
-
Object.defineProperty(exports, "createSymbolReference", { enumerable: true, get: function () { return symbols_1.createSymbolReference; } });
|
|
143
|
-
Object.defineProperty(exports, "getSymbolLibraryName", { enumerable: true, get: function () { return symbols_1.getSymbolLibraryName; } });
|
|
144
|
-
Object.defineProperty(exports, "getSymbolPath", { enumerable: true, get: function () { return symbols_1.getSymbolPath; } });
|
|
145
|
-
Object.defineProperty(exports, "isKnownSymbolLibrary", { enumerable: true, get: function () { return symbols_1.isKnownSymbolLibrary; } });
|
|
146
|
-
Object.defineProperty(exports, "getSymbolLibraryDisplayName", { enumerable: true, get: function () { return symbols_1.getSymbolLibraryDisplayName; } });
|
|
147
|
-
Object.defineProperty(exports, "getDefaultGrid3Path", { enumerable: true, get: function () { return symbols_1.getDefaultGrid3Path; } });
|
|
148
|
-
Object.defineProperty(exports, "getSymbolLibrariesDir", { enumerable: true, get: function () { return symbols_1.getSymbolLibrariesDir; } });
|
|
149
|
-
Object.defineProperty(exports, "getSymbolSearchIndexesDir", { enumerable: true, get: function () { return symbols_1.getSymbolSearchIndexesDir; } });
|
|
150
|
-
Object.defineProperty(exports, "symbolReferenceToFilename", { enumerable: true, get: function () { return symbols_1.symbolReferenceToFilename; } });
|
|
151
|
-
Object.defineProperty(exports, "SYMBOL_LIBRARIES", { enumerable: true, get: function () { return symbols_1.SYMBOL_LIBRARIES; } });
|
|
152
|
-
var resolver_2 = require("./gridset/resolver");
|
|
153
|
-
Object.defineProperty(exports, "isSymbolLibraryReference", { enumerable: true, get: function () { return resolver_2.isSymbolLibraryReference; } });
|
|
154
|
-
Object.defineProperty(exports, "parseImageSymbolReference", { enumerable: true, get: function () { return resolver_2.parseImageSymbolReference; } });
|
|
155
|
-
// Backward compatibility
|
|
156
|
-
var symbols_2 = require("./gridset/symbols");
|
|
157
|
-
Object.defineProperty(exports, "getSymbolsDir", { enumerable: true, get: function () { return symbols_2.getSymbolsDir; } });
|
|
158
|
-
Object.defineProperty(exports, "getSymbolSearchDir", { enumerable: true, get: function () { return symbols_2.getSymbolSearchDir; } });
|
|
159
|
-
// Gridset (Grid 3) symbol extraction for conversion
|
|
160
|
-
var symbolExtractor_1 = require("./gridset/symbolExtractor");
|
|
161
|
-
Object.defineProperty(exports, "extractButtonImage", { enumerable: true, get: function () { return symbolExtractor_1.extractButtonImage; } });
|
|
162
|
-
Object.defineProperty(exports, "extractSymbolLibraryImage", { enumerable: true, get: function () { return symbolExtractor_1.extractSymbolLibraryImage; } });
|
|
163
|
-
Object.defineProperty(exports, "convertToAstericsImage", { enumerable: true, get: function () { return symbolExtractor_1.convertToAstericsImage; } });
|
|
164
|
-
Object.defineProperty(exports, "analyzeSymbolExtraction", { enumerable: true, get: function () { return symbolExtractor_1.analyzeSymbolExtraction; } });
|
|
165
|
-
Object.defineProperty(exports, "suggestExtractionStrategy", { enumerable: true, get: function () { return symbolExtractor_1.suggestExtractionStrategy; } });
|
|
166
|
-
Object.defineProperty(exports, "exportSymbolReferencesToCsv", { enumerable: true, get: function () { return symbolExtractor_1.exportSymbolReferencesToCsv; } });
|
|
167
|
-
Object.defineProperty(exports, "createSymbolManifest", { enumerable: true, get: function () { return symbolExtractor_1.createSymbolManifest; } });
|
|
168
|
-
// Gridset (Grid 3) symbol search
|
|
169
|
-
var symbolSearch_1 = require("./gridset/symbolSearch");
|
|
170
|
-
Object.defineProperty(exports, "parsePixFile", { enumerable: true, get: function () { return symbolSearch_1.parsePixFile; } });
|
|
171
|
-
Object.defineProperty(exports, "loadSearchIndexes", { enumerable: true, get: function () { return symbolSearch_1.loadSearchIndexes; } });
|
|
172
|
-
Object.defineProperty(exports, "searchSymbols", { enumerable: true, get: function () { return symbolSearch_1.searchSymbols; } });
|
|
173
|
-
Object.defineProperty(exports, "searchSymbolsWithReferences", { enumerable: true, get: function () { return symbolSearch_1.searchSymbolsWithReferences; } });
|
|
174
|
-
Object.defineProperty(exports, "getSymbolFilename", { enumerable: true, get: function () { return symbolSearch_1.getSymbolFilename; } });
|
|
175
|
-
Object.defineProperty(exports, "getSymbolDisplayName", { enumerable: true, get: function () { return symbolSearch_1.getSymbolDisplayName; } });
|
|
176
|
-
Object.defineProperty(exports, "getAllSearchTerms", { enumerable: true, get: function () { return symbolSearch_1.getAllSearchTerms; } });
|
|
177
|
-
Object.defineProperty(exports, "getSearchSuggestions", { enumerable: true, get: function () { return symbolSearch_1.getSearchSuggestions; } });
|
|
178
|
-
Object.defineProperty(exports, "countLibrarySymbols", { enumerable: true, get: function () { return symbolSearch_1.countLibrarySymbols; } });
|
|
179
|
-
Object.defineProperty(exports, "getSymbolSearchStats", { enumerable: true, get: function () { return symbolSearch_1.getSymbolSearchStats; } });
|
|
180
|
-
// Snap helpers
|
|
181
|
-
var helpers_3 = require("./snap/helpers");
|
|
182
|
-
Object.defineProperty(exports, "getSnapPageTokenImageMap", { enumerable: true, get: function () { return helpers_3.getPageTokenImageMap; } });
|
|
183
|
-
Object.defineProperty(exports, "getSnapAllowedImageEntries", { enumerable: true, get: function () { return helpers_3.getAllowedImageEntries; } });
|
|
184
|
-
Object.defineProperty(exports, "openSnapImage", { enumerable: true, get: function () { return helpers_3.openImage; } });
|
|
185
|
-
Object.defineProperty(exports, "findSnapPackages", { enumerable: true, get: function () { return helpers_3.findSnapPackages; } });
|
|
186
|
-
Object.defineProperty(exports, "findSnapPackagePath", { enumerable: true, get: function () { return helpers_3.findSnapPackagePath; } });
|
|
187
|
-
Object.defineProperty(exports, "findSnapUsers", { enumerable: true, get: function () { return helpers_3.findSnapUsers; } });
|
|
188
|
-
Object.defineProperty(exports, "findSnapUserVocabularies", { enumerable: true, get: function () { return helpers_3.findSnapUserVocabularies; } });
|
|
189
|
-
Object.defineProperty(exports, "findSnapUserHistory", { enumerable: true, get: function () { return helpers_3.findSnapUserHistory; } });
|
|
190
|
-
Object.defineProperty(exports, "isSnapInstalled", { enumerable: true, get: function () { return helpers_3.isSnapInstalled; } });
|
|
191
|
-
Object.defineProperty(exports, "readSnapUsage", { enumerable: true, get: function () { return helpers_3.readSnapUsage; } });
|
|
192
|
-
Object.defineProperty(exports, "readSnapUsageForUser", { enumerable: true, get: function () { return helpers_3.readSnapUsageForUser; } });
|
|
193
|
-
// TouchChat helpers (stubs)
|
|
194
|
-
var helpers_4 = require("./touchchat/helpers");
|
|
195
|
-
Object.defineProperty(exports, "getTouchChatPageTokenImageMap", { enumerable: true, get: function () { return helpers_4.getPageTokenImageMap; } });
|
|
196
|
-
Object.defineProperty(exports, "getTouchChatAllowedImageEntries", { enumerable: true, get: function () { return helpers_4.getAllowedImageEntries; } });
|
|
197
|
-
Object.defineProperty(exports, "openTouchChatImage", { enumerable: true, get: function () { return helpers_4.openImage; } });
|
|
@@ -12,6 +12,17 @@ const path_1 = __importDefault(require("path"));
|
|
|
12
12
|
const fs_1 = __importDefault(require("fs"));
|
|
13
13
|
const crypto_1 = __importDefault(require("crypto"));
|
|
14
14
|
const snapValidator_1 = require("../validation/snapValidator");
|
|
15
|
+
/**
|
|
16
|
+
* Map Snap Visible value to AAC standard visibility
|
|
17
|
+
* Snap: 0 = hidden, 1 (or non-zero) = visible
|
|
18
|
+
* Maps to: 'Hidden' | 'Visible' | undefined
|
|
19
|
+
*/
|
|
20
|
+
function mapSnapVisibility(visible) {
|
|
21
|
+
if (visible === null || visible === undefined) {
|
|
22
|
+
return undefined; // Default to visible
|
|
23
|
+
}
|
|
24
|
+
return visible === 0 ? 'Hidden' : 'Visible';
|
|
25
|
+
}
|
|
15
26
|
class SnapProcessor extends baseProcessor_1.BaseProcessor {
|
|
16
27
|
constructor(symbolResolver = null, options = {}) {
|
|
17
28
|
super(options);
|
|
@@ -63,6 +74,40 @@ class SnapProcessor extends baseProcessor_1.BaseProcessor {
|
|
|
63
74
|
};
|
|
64
75
|
// Load pages first, using UniqueId as canonical id
|
|
65
76
|
const pages = db.prepare('SELECT * FROM Page').all();
|
|
77
|
+
// Load PageSetProperties to find default Keyboard and Home pages
|
|
78
|
+
let defaultKeyboardPageId;
|
|
79
|
+
let defaultHomePageId;
|
|
80
|
+
let dashboardPageId;
|
|
81
|
+
try {
|
|
82
|
+
const properties = db.prepare('SELECT * FROM PageSetProperties').get();
|
|
83
|
+
if (properties) {
|
|
84
|
+
defaultKeyboardPageId = properties.DefaultKeyboardPageUniqueId;
|
|
85
|
+
defaultHomePageId = properties.DefaultHomePageUniqueId;
|
|
86
|
+
dashboardPageId = properties.DashboardUniqueId;
|
|
87
|
+
const toolbarId = properties.ToolBarUniqueId;
|
|
88
|
+
const hasGlobalToolbar = toolbarId && toolbarId !== '00000000-0000-0000-0000-000000000000';
|
|
89
|
+
if (hasGlobalToolbar) {
|
|
90
|
+
tree.rootId = toolbarId;
|
|
91
|
+
}
|
|
92
|
+
else if (defaultHomePageId) {
|
|
93
|
+
tree.rootId = defaultHomePageId;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
catch (e) {
|
|
98
|
+
console.warn('[SnapProcessor] Failed to load PageSetProperties:', e);
|
|
99
|
+
}
|
|
100
|
+
// If still no root, look for a page titled "Tool Bar" or similar
|
|
101
|
+
if (!tree.rootId || tree.rootId === defaultHomePageId) {
|
|
102
|
+
const toolbarPage = pages.find((p) => p.Title === 'Tool Bar' || p.Name === 'Tool Bar');
|
|
103
|
+
if (toolbarPage) {
|
|
104
|
+
tree.rootId = String(toolbarPage.UniqueId || toolbarPage.Id);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
// If still no root, fallback to first page
|
|
108
|
+
if (!tree.rootId && pages.length > 0) {
|
|
109
|
+
tree.rootId = String(pages[0].UniqueId || pages[0].Id);
|
|
110
|
+
}
|
|
66
111
|
// Map from numeric Id -> UniqueId for later lookup
|
|
67
112
|
const idToUniqueId = {};
|
|
68
113
|
pages.forEach((pageRow) => {
|
|
@@ -219,6 +264,7 @@ class SnapProcessor extends baseProcessor_1.BaseProcessor {
|
|
|
219
264
|
buttonColumns.has('LabelColor') ? 'b.LabelColor' : 'NULL AS LabelColor',
|
|
220
265
|
buttonColumns.has('BackgroundColor') ? 'b.BackgroundColor' : 'NULL AS BackgroundColor',
|
|
221
266
|
buttonColumns.has('NavigatePageId') ? 'b.NavigatePageId' : 'NULL AS NavigatePageId',
|
|
267
|
+
buttonColumns.has('ContentType') ? 'b.ContentType' : 'NULL AS ContentType',
|
|
222
268
|
];
|
|
223
269
|
if (this.loadAudio) {
|
|
224
270
|
selectFields.push(buttonColumns.has('MessageRecordingId')
|
|
@@ -232,14 +278,30 @@ class SnapProcessor extends baseProcessor_1.BaseProcessor {
|
|
|
232
278
|
: 'NULL AS SerializedMessageSoundMetadata');
|
|
233
279
|
}
|
|
234
280
|
const placementColumns = getTableColumns('ElementPlacement');
|
|
235
|
-
|
|
281
|
+
const hasButtonPageLink = getTableColumns('ButtonPageLink').size > 0;
|
|
282
|
+
selectFields.push(placementColumns.has('GridPosition') ? 'ep.GridPosition' : 'NULL AS GridPosition', placementColumns.has('PageLayoutId') ? 'ep.PageLayoutId' : 'NULL AS PageLayoutId', placementColumns.has('Visible') ? 'ep.Visible' : 'NULL AS Visible', 'er.PageId as ButtonPageId');
|
|
283
|
+
if (hasButtonPageLink) {
|
|
284
|
+
selectFields.push('bpl.PageUniqueId AS LinkedPageUniqueId');
|
|
285
|
+
}
|
|
286
|
+
else {
|
|
287
|
+
selectFields.push('NULL AS LinkedPageUniqueId');
|
|
288
|
+
}
|
|
289
|
+
const hasCommandSequence = getTableColumns('CommandSequence').size > 0;
|
|
290
|
+
if (hasCommandSequence) {
|
|
291
|
+
selectFields.push('cs.SerializedCommands');
|
|
292
|
+
}
|
|
293
|
+
else {
|
|
294
|
+
selectFields.push('NULL AS SerializedCommands');
|
|
295
|
+
}
|
|
236
296
|
const buttonQuery = `
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
297
|
+
SELECT ${selectFields.join(', ')}
|
|
298
|
+
FROM Button b
|
|
299
|
+
INNER JOIN ElementReference er ON b.ElementReferenceId = er.Id
|
|
300
|
+
LEFT JOIN ElementPlacement ep ON ep.ElementReferenceId = er.Id
|
|
301
|
+
${hasButtonPageLink ? 'LEFT JOIN ButtonPageLink bpl ON b.Id = bpl.ButtonId' : ''}
|
|
302
|
+
${hasCommandSequence ? 'LEFT JOIN CommandSequence cs ON b.Id = cs.ButtonId' : ''}
|
|
303
|
+
WHERE er.PageId = ? ${selectedPageLayoutId ? 'AND ep.PageLayoutId = ?' : ''}
|
|
304
|
+
`;
|
|
243
305
|
const queryParams = selectedPageLayoutId
|
|
244
306
|
? [pageRow.Id, selectedPageLayoutId]
|
|
245
307
|
: [pageRow.Id];
|
|
@@ -279,9 +341,40 @@ class SnapProcessor extends baseProcessor_1.BaseProcessor {
|
|
|
279
341
|
if (btnRow.NavigatePageId && idToUniqueId[String(btnRow.NavigatePageId)]) {
|
|
280
342
|
targetPageUniqueId = idToUniqueId[String(btnRow.NavigatePageId)];
|
|
281
343
|
}
|
|
344
|
+
else if (btnRow.LinkedPageUniqueId) {
|
|
345
|
+
targetPageUniqueId = String(btnRow.LinkedPageUniqueId);
|
|
346
|
+
}
|
|
282
347
|
else if (btnRow.PageUniqueId) {
|
|
283
348
|
targetPageUniqueId = String(btnRow.PageUniqueId);
|
|
284
349
|
}
|
|
350
|
+
// Parse CommandSequence for navigation targets if not found yet
|
|
351
|
+
if (btnRow.SerializedCommands) {
|
|
352
|
+
try {
|
|
353
|
+
const commands = JSON.parse(btnRow.SerializedCommands);
|
|
354
|
+
const values = commands.$values || [];
|
|
355
|
+
for (const cmd of values) {
|
|
356
|
+
if (cmd.$type === '2' && cmd.LinkedPageId) {
|
|
357
|
+
// Normal Navigation
|
|
358
|
+
targetPageUniqueId = String(cmd.LinkedPageId);
|
|
359
|
+
}
|
|
360
|
+
else if (cmd.$type === '16') {
|
|
361
|
+
// Go to Home
|
|
362
|
+
targetPageUniqueId = defaultHomePageId;
|
|
363
|
+
}
|
|
364
|
+
else if (cmd.$type === '17') {
|
|
365
|
+
// Go to Keyboard
|
|
366
|
+
targetPageUniqueId = defaultKeyboardPageId;
|
|
367
|
+
}
|
|
368
|
+
else if (cmd.$type === '18') {
|
|
369
|
+
// Go to Dashboard
|
|
370
|
+
targetPageUniqueId = dashboardPageId;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
catch (e) {
|
|
375
|
+
// Ignore JSON parse errors in commands
|
|
376
|
+
}
|
|
377
|
+
}
|
|
285
378
|
// Determine parent page association for this button
|
|
286
379
|
const parentPageId = btnRow.ButtonPageId ? String(btnRow.ButtonPageId) : undefined;
|
|
287
380
|
const parentUniqueId = parentPageId && idToUniqueId[parentPageId] ? idToUniqueId[parentPageId] : uniqueId;
|
|
@@ -344,11 +437,14 @@ class SnapProcessor extends baseProcessor_1.BaseProcessor {
|
|
|
344
437
|
}
|
|
345
438
|
const button = new treeStructure_1.AACButton({
|
|
346
439
|
id: String(btnRow.Id),
|
|
347
|
-
label: btnRow.Label || '',
|
|
348
|
-
message: btnRow.Message || btnRow.Label || '',
|
|
440
|
+
label: btnRow.Label || (btnRow.ContentType === 1 ? '[Prediction]' : ''),
|
|
441
|
+
message: btnRow.Message || (btnRow.ContentType === 1 ? '[Prediction]' : btnRow.Label || ''),
|
|
349
442
|
targetPageId: targetPageUniqueId,
|
|
350
443
|
semanticAction: semanticAction,
|
|
444
|
+
contentType: btnRow.ContentType === 1 ? 'AutoContent' : undefined,
|
|
445
|
+
contentSubType: btnRow.ContentType === 1 ? 'Prediction' : undefined,
|
|
351
446
|
audioRecording: audioRecording,
|
|
447
|
+
visibility: mapSnapVisibility(btnRow.Visible),
|
|
352
448
|
semantic_id: btnRow.LibrarySymbolId
|
|
353
449
|
? `snap_symbol_${btnRow.LibrarySymbolId}`
|
|
354
450
|
: undefined, // Extract semantic_id from LibrarySymbolId
|
|
@@ -85,8 +85,20 @@ class TouchChatProcessor extends baseProcessor_1.BaseProcessor {
|
|
|
85
85
|
const tree = new treeStructure_1.AACTree();
|
|
86
86
|
// Set root ID to the first page ID (will be updated if we find a better root)
|
|
87
87
|
let rootPageId = null;
|
|
88
|
+
const getTableColumns = (tableName) => {
|
|
89
|
+
if (!db)
|
|
90
|
+
return new Set();
|
|
91
|
+
try {
|
|
92
|
+
const rows = db.prepare(`PRAGMA table_info(${tableName})`).all();
|
|
93
|
+
return new Set(rows.map((row) => row.name));
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
return new Set();
|
|
97
|
+
}
|
|
98
|
+
};
|
|
88
99
|
// Load ID mappings first
|
|
89
100
|
const idMappings = new Map();
|
|
101
|
+
const numericToRid = new Map();
|
|
90
102
|
try {
|
|
91
103
|
const mappingQuery = 'SELECT numeric_id, string_id FROM page_id_mapping';
|
|
92
104
|
const mappings = db.prepare(mappingQuery).all();
|
|
@@ -116,15 +128,18 @@ class TouchChatProcessor extends baseProcessor_1.BaseProcessor {
|
|
|
116
128
|
// console.log('No styles found:', e);
|
|
117
129
|
}
|
|
118
130
|
// First, load all pages and get their names from resources
|
|
131
|
+
const resourceColumns = getTableColumns('resources');
|
|
132
|
+
const hasRid = resourceColumns.has('rid');
|
|
119
133
|
const pageQuery = `
|
|
120
|
-
SELECT p.*, r.name
|
|
134
|
+
SELECT p.*, r.name${hasRid ? ', r.rid' : ''}
|
|
121
135
|
FROM pages p
|
|
122
136
|
JOIN resources r ON r.id = p.resource_id
|
|
123
137
|
`;
|
|
124
138
|
const pages = db.prepare(pageQuery).all();
|
|
125
139
|
pages.forEach((pageRow) => {
|
|
126
|
-
// Use
|
|
127
|
-
const pageId = idMappings.get(pageRow.id) || String(pageRow.id);
|
|
140
|
+
// Use resource RID (UUID) if available, otherwise mapped string ID, then numeric ID
|
|
141
|
+
const pageId = (hasRid ? pageRow.rid : null) || idMappings.get(pageRow.id) || String(pageRow.id);
|
|
142
|
+
numericToRid.set(pageRow.id, pageId);
|
|
128
143
|
const style = pageStyles.get(pageRow.page_style_id);
|
|
129
144
|
const page = new treeStructure_1.AACPage({
|
|
130
145
|
id: pageId,
|
|
@@ -166,6 +181,7 @@ class TouchChatProcessor extends baseProcessor_1.BaseProcessor {
|
|
|
166
181
|
touchChat: {
|
|
167
182
|
actionCode: 0, // Default speak action
|
|
168
183
|
actionData: cell.message || cell.label || '',
|
|
184
|
+
resourceId: cell.resource_id,
|
|
169
185
|
},
|
|
170
186
|
},
|
|
171
187
|
fallback: {
|
|
@@ -210,7 +226,7 @@ class TouchChatProcessor extends baseProcessor_1.BaseProcessor {
|
|
|
210
226
|
const pageGrids = new Map();
|
|
211
227
|
boxInstances.forEach((instance) => {
|
|
212
228
|
// Use mapped string ID if available, otherwise use numeric ID as string
|
|
213
|
-
const pageId =
|
|
229
|
+
const pageId = numericToRid.get(instance.page_id) || String(instance.page_id);
|
|
214
230
|
const page = tree.getPage(pageId);
|
|
215
231
|
const buttons = buttonBoxes.get(instance.button_box_id);
|
|
216
232
|
if (page && buttons) {
|
|
@@ -341,7 +357,7 @@ class TouchChatProcessor extends baseProcessor_1.BaseProcessor {
|
|
|
341
357
|
},
|
|
342
358
|
});
|
|
343
359
|
// Find the page that references this resource
|
|
344
|
-
const page = Object.values(tree.pages).find((p) => p.id === String(btnRow.id));
|
|
360
|
+
const page = Object.values(tree.pages).find((p) => p.id === (numericToRid.get(btnRow.id) || String(btnRow.id)));
|
|
345
361
|
if (page)
|
|
346
362
|
page.addButton(button);
|
|
347
363
|
});
|
|
@@ -351,23 +367,27 @@ class TouchChatProcessor extends baseProcessor_1.BaseProcessor {
|
|
|
351
367
|
}
|
|
352
368
|
// Load navigation actions
|
|
353
369
|
const navActionsQuery = `
|
|
354
|
-
SELECT
|
|
355
|
-
FROM
|
|
356
|
-
JOIN actions a ON a.resource_id = b.resource_id
|
|
370
|
+
SELECT a.resource_id, COALESCE(${hasRid ? 'r_rid.rid, r_id.rid, ' : ''}r_id.id, ad.value) as target_page_id
|
|
371
|
+
FROM actions a
|
|
357
372
|
JOIN action_data ad ON ad.action_id = a.id
|
|
358
|
-
|
|
373
|
+
${hasRid ? 'LEFT JOIN resources r_rid ON r_rid.rid = ad.value AND r_rid.type = 7' : ''}
|
|
374
|
+
LEFT JOIN resources r_id ON (CASE WHEN ad.value GLOB '[0-9]*' THEN CAST(ad.value AS INTEGER) ELSE -1 END) = r_id.id AND r_id.type = 7
|
|
375
|
+
WHERE a.code IN (1, 8, 9)
|
|
359
376
|
`;
|
|
360
377
|
try {
|
|
361
378
|
const navActions = db.prepare(navActionsQuery).all();
|
|
362
379
|
navActions.forEach((nav) => {
|
|
363
|
-
// Find button in any page
|
|
380
|
+
// Find button in any page by its resourceId
|
|
364
381
|
for (const pageId in tree.pages) {
|
|
365
382
|
const page = tree.pages[pageId];
|
|
366
|
-
const button = page.buttons.find((b) => b.
|
|
383
|
+
const button = page.buttons.find((b) => b.semanticAction?.platformData?.touchChat?.resourceId === nav.resource_id);
|
|
367
384
|
if (button) {
|
|
368
385
|
// Use mapped string ID for target page if available
|
|
369
|
-
const
|
|
370
|
-
|
|
386
|
+
const numericTargetId = parseInt(String(nav.target_page_id));
|
|
387
|
+
const targetPageId = !isNaN(numericTargetId)
|
|
388
|
+
? numericToRid.get(numericTargetId) || String(numericTargetId)
|
|
389
|
+
: String(nav.target_page_id);
|
|
390
|
+
button.targetPageId = targetPageId;
|
|
371
391
|
// Create semantic action for navigation
|
|
372
392
|
button.semanticAction = {
|
|
373
393
|
category: treeStructure_1.AACSemanticCategory.NAVIGATION,
|
package/dist/snap.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Snap (Tobii Dynavox) Namespace
|
|
3
|
+
*
|
|
4
|
+
* All Snap-specific utilities, helpers, and types.
|
|
5
|
+
*/
|
|
6
|
+
export { SnapProcessor } from './processors/snapProcessor';
|
|
7
|
+
export { getPageTokenImageMap, getAllowedImageEntries, openImage, findSnapPackages, findSnapPackagePath, findSnapUsers, findSnapUserVocabularies, findSnapUserHistory, isSnapInstalled, readSnapUsage, readSnapUsageForUser, type SnapPackagePath, type SnapUserInfo, type SnapUsageEntry, } from './processors/snap/helpers';
|
package/dist/snap.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Snap (Tobii Dynavox) Namespace
|
|
4
|
+
*
|
|
5
|
+
* All Snap-specific utilities, helpers, and types.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.readSnapUsageForUser = exports.readSnapUsage = exports.isSnapInstalled = exports.findSnapUserHistory = exports.findSnapUserVocabularies = exports.findSnapUsers = exports.findSnapPackagePath = exports.findSnapPackages = exports.openImage = exports.getAllowedImageEntries = exports.getPageTokenImageMap = exports.SnapProcessor = void 0;
|
|
9
|
+
// Processor class
|
|
10
|
+
var snapProcessor_1 = require("./processors/snapProcessor");
|
|
11
|
+
Object.defineProperty(exports, "SnapProcessor", { enumerable: true, get: function () { return snapProcessor_1.SnapProcessor; } });
|
|
12
|
+
// === Snap Helpers ===
|
|
13
|
+
var helpers_1 = require("./processors/snap/helpers");
|
|
14
|
+
Object.defineProperty(exports, "getPageTokenImageMap", { enumerable: true, get: function () { return helpers_1.getPageTokenImageMap; } });
|
|
15
|
+
Object.defineProperty(exports, "getAllowedImageEntries", { enumerable: true, get: function () { return helpers_1.getAllowedImageEntries; } });
|
|
16
|
+
Object.defineProperty(exports, "openImage", { enumerable: true, get: function () { return helpers_1.openImage; } });
|
|
17
|
+
Object.defineProperty(exports, "findSnapPackages", { enumerable: true, get: function () { return helpers_1.findSnapPackages; } });
|
|
18
|
+
Object.defineProperty(exports, "findSnapPackagePath", { enumerable: true, get: function () { return helpers_1.findSnapPackagePath; } });
|
|
19
|
+
Object.defineProperty(exports, "findSnapUsers", { enumerable: true, get: function () { return helpers_1.findSnapUsers; } });
|
|
20
|
+
Object.defineProperty(exports, "findSnapUserVocabularies", { enumerable: true, get: function () { return helpers_1.findSnapUserVocabularies; } });
|
|
21
|
+
Object.defineProperty(exports, "findSnapUserHistory", { enumerable: true, get: function () { return helpers_1.findSnapUserHistory; } });
|
|
22
|
+
Object.defineProperty(exports, "isSnapInstalled", { enumerable: true, get: function () { return helpers_1.isSnapInstalled; } });
|
|
23
|
+
Object.defineProperty(exports, "readSnapUsage", { enumerable: true, get: function () { return helpers_1.readSnapUsage; } });
|
|
24
|
+
Object.defineProperty(exports, "readSnapUsageForUser", { enumerable: true, get: function () { return helpers_1.readSnapUsageForUser; } });
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TouchChat (PRC-Saltillo) Namespace
|
|
3
|
+
*
|
|
4
|
+
* All TouchChat-specific utilities, helpers, and types.
|
|
5
|
+
*/
|
|
6
|
+
export { TouchChatProcessor } from './processors/touchchatProcessor';
|
|
7
|
+
export { getPageTokenImageMap, getAllowedImageEntries, openImage, } from './processors/touchchat/helpers';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* TouchChat (PRC-Saltillo) Namespace
|
|
4
|
+
*
|
|
5
|
+
* All TouchChat-specific utilities, helpers, and types.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.openImage = exports.getAllowedImageEntries = exports.getPageTokenImageMap = exports.TouchChatProcessor = void 0;
|
|
9
|
+
// Processor class
|
|
10
|
+
var touchchatProcessor_1 = require("./processors/touchchatProcessor");
|
|
11
|
+
Object.defineProperty(exports, "TouchChatProcessor", { enumerable: true, get: function () { return touchchatProcessor_1.TouchChatProcessor; } });
|
|
12
|
+
// === TouchChat Helpers ===
|
|
13
|
+
var helpers_1 = require("./processors/touchchat/helpers");
|
|
14
|
+
Object.defineProperty(exports, "getPageTokenImageMap", { enumerable: true, get: function () { return helpers_1.getPageTokenImageMap; } });
|
|
15
|
+
Object.defineProperty(exports, "getAllowedImageEntries", { enumerable: true, get: function () { return helpers_1.getAllowedImageEntries; } });
|
|
16
|
+
Object.defineProperty(exports, "openImage", { enumerable: true, get: function () { return helpers_1.openImage; } });
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Translation Namespace
|
|
3
|
+
*
|
|
4
|
+
* LLM-based translation utilities for AAC files with symbol preservation.
|
|
5
|
+
*
|
|
6
|
+
* These utilities are used by processor classes. See individual processors for:
|
|
7
|
+
* - extractSymbolsForLLM() - method on GridsetProcessor, ObfProcessor, TouchChatProcessor, SnapProcessor
|
|
8
|
+
* - processLLMTranslations() - method on GridsetProcessor, ObfProcessor, TouchChatProcessor, SnapProcessor
|
|
9
|
+
*
|
|
10
|
+
* Or use the lower-level utilities directly:
|
|
11
|
+
*/
|
|
12
|
+
export { normalizeButtonForTranslation, extractSymbolsFromButton, extractAllButtonsForTranslation, createTranslationPrompt, validateTranslationResults, type SymbolInfo, type ButtonForTranslation, type LLMLTranslationResult, } from './utilities/translation/translationProcessor';
|
|
13
|
+
export { type TranslatedString, type SourceString } from './core/baseProcessor';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Translation Namespace
|
|
4
|
+
*
|
|
5
|
+
* LLM-based translation utilities for AAC files with symbol preservation.
|
|
6
|
+
*
|
|
7
|
+
* These utilities are used by processor classes. See individual processors for:
|
|
8
|
+
* - extractSymbolsForLLM() - method on GridsetProcessor, ObfProcessor, TouchChatProcessor, SnapProcessor
|
|
9
|
+
* - processLLMTranslations() - method on GridsetProcessor, ObfProcessor, TouchChatProcessor, SnapProcessor
|
|
10
|
+
*
|
|
11
|
+
* Or use the lower-level utilities directly:
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.validateTranslationResults = exports.createTranslationPrompt = exports.extractAllButtonsForTranslation = exports.extractSymbolsFromButton = exports.normalizeButtonForTranslation = void 0;
|
|
15
|
+
// LLM translation utilities
|
|
16
|
+
var translationProcessor_1 = require("./utilities/translation/translationProcessor");
|
|
17
|
+
Object.defineProperty(exports, "normalizeButtonForTranslation", { enumerable: true, get: function () { return translationProcessor_1.normalizeButtonForTranslation; } });
|
|
18
|
+
Object.defineProperty(exports, "extractSymbolsFromButton", { enumerable: true, get: function () { return translationProcessor_1.extractSymbolsFromButton; } });
|
|
19
|
+
Object.defineProperty(exports, "extractAllButtonsForTranslation", { enumerable: true, get: function () { return translationProcessor_1.extractAllButtonsForTranslation; } });
|
|
20
|
+
Object.defineProperty(exports, "createTranslationPrompt", { enumerable: true, get: function () { return translationProcessor_1.createTranslationPrompt; } });
|
|
21
|
+
Object.defineProperty(exports, "validateTranslationResults", { enumerable: true, get: function () { return translationProcessor_1.validateTranslationResults; } });
|
package/dist/types/aac.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { AACSemanticAction } from '../core/treeStructure';
|
|
|
4
4
|
* Determines how the scanning advances through items
|
|
5
5
|
*/
|
|
6
6
|
export declare enum ScanningSelectionMethod {
|
|
7
|
-
/** Automatically advance through items at timed intervals */
|
|
7
|
+
/** Automatically advance through items at timed intervals (1 Switch) */
|
|
8
8
|
AutoScan = "AutoScan",
|
|
9
9
|
/** Automatic scanning with overscan (two-stage scanning) */
|
|
10
10
|
AutoScanWithOverscan = "AutoScanWithOverscan",
|
|
@@ -12,8 +12,12 @@ export declare enum ScanningSelectionMethod {
|
|
|
12
12
|
HoldToAdvance = "HoldToAdvance",
|
|
13
13
|
/** Hold to advance with overscan */
|
|
14
14
|
HoldToAdvanceWithOverscan = "HoldToAdvanceWithOverscan",
|
|
15
|
-
/** Tap switch to advance, tap again to select */
|
|
16
|
-
TapToAdvance = "TapToAdvance"
|
|
15
|
+
/** Tap switch to advance, tap again to select (Automatic) */
|
|
16
|
+
TapToAdvance = "TapToAdvance",
|
|
17
|
+
/** Tap switch to advance, another switch to select (2 Switch Step Scan) */
|
|
18
|
+
StepScan2Switch = "StepScan2Switch",
|
|
19
|
+
/** Tap switch 1 to advance, tap switch 1 again to select (1 Switch Step Scan) */
|
|
20
|
+
StepScan1Switch = "StepScan1Switch"
|
|
17
21
|
}
|
|
18
22
|
/**
|
|
19
23
|
* Cell scanning order patterns
|
|
@@ -48,6 +52,12 @@ export interface ScanningConfig {
|
|
|
48
52
|
dwellTime?: number;
|
|
49
53
|
/** How the selection is accepted */
|
|
50
54
|
acceptScanMethod?: 'Switch' | 'Timeout' | 'Hold';
|
|
55
|
+
/** Whether to factor in error correction effort (e.g., missed hits) */
|
|
56
|
+
errorCorrectionEnabled?: boolean;
|
|
57
|
+
/** Maximum number of loops before the scan times out */
|
|
58
|
+
maxLoops?: number;
|
|
59
|
+
/** Estimated probability of missing a target (0.0 to 1.0) */
|
|
60
|
+
errorRate?: number;
|
|
51
61
|
}
|
|
52
62
|
export interface AACStyle {
|
|
53
63
|
backgroundColor?: string;
|