@willwade/aac-processors 0.0.9 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +85 -11
- package/dist/cli/index.js +87 -0
- package/dist/core/analyze.js +1 -0
- package/dist/core/baseProcessor.d.ts +6 -0
- package/dist/core/fileProcessor.js +1 -0
- package/dist/core/treeStructure.d.ts +3 -1
- package/dist/core/treeStructure.js +3 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -0
- package/dist/optional/symbolTools.js +4 -2
- package/dist/processors/gridset/colorUtils.d.ts +18 -0
- package/dist/processors/gridset/colorUtils.js +36 -0
- package/dist/processors/gridset/commands.d.ts +103 -0
- package/dist/processors/gridset/commands.js +958 -0
- package/dist/processors/gridset/helpers.d.ts +1 -1
- package/dist/processors/gridset/helpers.js +5 -3
- package/dist/processors/gridset/index.d.ts +45 -0
- package/dist/processors/gridset/index.js +153 -0
- package/dist/processors/gridset/password.d.ts +11 -0
- package/dist/processors/gridset/password.js +37 -0
- package/dist/processors/gridset/pluginTypes.d.ts +109 -0
- package/dist/processors/gridset/pluginTypes.js +285 -0
- package/dist/processors/gridset/resolver.d.ts +14 -1
- package/dist/processors/gridset/resolver.js +47 -5
- package/dist/processors/gridset/styleHelpers.d.ts +22 -0
- package/dist/processors/gridset/styleHelpers.js +35 -1
- package/dist/processors/gridset/symbolExtractor.d.ts +121 -0
- package/dist/processors/gridset/symbolExtractor.js +362 -0
- package/dist/processors/gridset/symbolSearch.d.ts +117 -0
- package/dist/processors/gridset/symbolSearch.js +280 -0
- package/dist/processors/gridset/symbols.d.ts +199 -0
- package/dist/processors/gridset/symbols.js +468 -0
- package/dist/processors/gridset/wordlistHelpers.d.ts +2 -2
- package/dist/processors/gridset/wordlistHelpers.js +7 -4
- package/dist/processors/gridsetProcessor.d.ts +15 -1
- package/dist/processors/gridsetProcessor.js +98 -22
- package/dist/processors/index.d.ts +10 -1
- package/dist/processors/index.js +94 -2
- package/dist/processors/obfProcessor.d.ts +7 -0
- package/dist/processors/obfProcessor.js +9 -0
- package/dist/processors/snapProcessor.d.ts +7 -0
- package/dist/processors/snapProcessor.js +9 -0
- package/dist/processors/touchchatProcessor.d.ts +7 -0
- package/dist/processors/touchchatProcessor.js +9 -0
- package/dist/types/aac.d.ts +17 -0
- package/dist/utilities/screenshotConverter.d.ts +69 -0
- package/dist/utilities/screenshotConverter.js +453 -0
- package/dist/validation/baseValidator.d.ts +80 -0
- package/dist/validation/baseValidator.js +160 -0
- package/dist/validation/gridsetValidator.d.ts +36 -0
- package/dist/validation/gridsetValidator.js +288 -0
- package/dist/validation/index.d.ts +13 -0
- package/dist/validation/index.js +69 -0
- package/dist/validation/obfValidator.d.ts +44 -0
- package/dist/validation/obfValidator.js +530 -0
- package/dist/validation/snapValidator.d.ts +33 -0
- package/dist/validation/snapValidator.js +237 -0
- package/dist/validation/touchChatValidator.d.ts +33 -0
- package/dist/validation/touchChatValidator.js +229 -0
- package/dist/validation/validationTypes.d.ts +64 -0
- package/dist/validation/validationTypes.js +15 -0
- package/examples/README.md +7 -0
- package/examples/demo.js +143 -0
- package/examples/obf/aboutme.json +376 -0
- package/examples/obf/array.json +6 -0
- package/examples/obf/hash.json +4 -0
- package/examples/obf/links.obz +0 -0
- package/examples/obf/simple.obf +53 -0
- package/examples/package-lock.json +1326 -0
- package/examples/package.json +10 -0
- package/examples/styling-example.ts +316 -0
- package/examples/translate.js +39 -0
- package/examples/translate_demo.js +254 -0
- package/examples/typescript-demo.ts +251 -0
- package/package.json +3 -1
|
@@ -15,7 +15,7 @@ export declare function getAllowedImageEntries(tree: AACTree): Set<string>;
|
|
|
15
15
|
* @param entryPath Entry name inside the zip
|
|
16
16
|
* @returns Image data buffer or null if not found
|
|
17
17
|
*/
|
|
18
|
-
export declare function openImage(gridsetBuffer: Buffer, entryPath: string): Buffer | null;
|
|
18
|
+
export declare function openImage(gridsetBuffer: Buffer, entryPath: string, password?: string | undefined): Buffer | null;
|
|
19
19
|
/**
|
|
20
20
|
* Generate a random GUID for Grid3 elements
|
|
21
21
|
* Grid3 uses GUIDs for grid identification
|
|
@@ -49,6 +49,7 @@ const path = __importStar(require("path"));
|
|
|
49
49
|
const child_process_1 = require("child_process");
|
|
50
50
|
const better_sqlite3_1 = __importDefault(require("better-sqlite3"));
|
|
51
51
|
const dotnetTicks_1 = require("../../utils/dotnetTicks");
|
|
52
|
+
const password_1 = require("./password");
|
|
52
53
|
function normalizeZipPath(p) {
|
|
53
54
|
const unified = p.replace(/\\/g, '/');
|
|
54
55
|
try {
|
|
@@ -94,10 +95,11 @@ function getAllowedImageEntries(tree) {
|
|
|
94
95
|
* @param entryPath Entry name inside the zip
|
|
95
96
|
* @returns Image data buffer or null if not found
|
|
96
97
|
*/
|
|
97
|
-
function openImage(gridsetBuffer, entryPath) {
|
|
98
|
+
function openImage(gridsetBuffer, entryPath, password = (0, password_1.resolveGridsetPasswordFromEnv)()) {
|
|
98
99
|
const zip = new adm_zip_1.default(gridsetBuffer);
|
|
100
|
+
const entries = (0, password_1.getZipEntriesWithPassword)(zip, password);
|
|
99
101
|
const want = normalizeZipPath(entryPath);
|
|
100
|
-
const entry =
|
|
102
|
+
const entry = entries.find((e) => normalizeZipPath(e.entryName) === want);
|
|
101
103
|
if (!entry)
|
|
102
104
|
return null;
|
|
103
105
|
return entry.getData();
|
|
@@ -292,7 +294,7 @@ function findGrid3Vocabularies(userName) {
|
|
|
292
294
|
if (!entry.isFile())
|
|
293
295
|
continue;
|
|
294
296
|
const ext = path.extname(entry.name).toLowerCase();
|
|
295
|
-
if (ext === '.gridset' || ext === '.grd' || ext === '.grdl') {
|
|
297
|
+
if (ext === '.gridset' || ext === '.gridsetx' || ext === '.grd' || ext === '.grdl') {
|
|
296
298
|
results.push({
|
|
297
299
|
userName: userDir.name,
|
|
298
300
|
gridsetPath: path.win32.join(gridSetsDir, entry.name),
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Grid 3 Enhanced Support Module
|
|
3
|
+
*
|
|
4
|
+
* This module exports all enhanced Grid 3 functionality including:
|
|
5
|
+
* - Cell shape detection and support
|
|
6
|
+
* - Plugin cell type detection (Workspace, LiveCell, AutoContent)
|
|
7
|
+
* - Comprehensive command definitions and detection
|
|
8
|
+
* - Color utilities and style helpers
|
|
9
|
+
* - Image resolution helpers
|
|
10
|
+
*/
|
|
11
|
+
export { CellBackgroundShape, SHAPE_NAMES, type Grid3Style, DEFAULT_GRID3_STYLES, CATEGORY_STYLES, createDefaultStylesXml, createCategoryStyle, } from './styleHelpers';
|
|
12
|
+
export { detectPluginCellType, type Grid3PluginMetadata, Grid3CellType, WORKSPACE_TYPES, LIVECELL_TYPES, AUTOCONTENT_TYPES, getCellTypeDisplayName, isWorkspaceCell, isLiveCell, isAutoContentCell, isRegularCell, } from './pluginTypes';
|
|
13
|
+
export { detectCommand, getCommandDefinition, getCommandsByPlugin, getCommandsByCategory, getAllCommandIds, getAllPluginIds, extractCommandParameters, GRID3_COMMANDS, type Grid3CommandDefinition, type CommandParameter, type ExtractedParameters, Grid3CommandCategory, } from './commands';
|
|
14
|
+
import { CellBackgroundShape } from './styleHelpers';
|
|
15
|
+
import { Grid3CellType } from './pluginTypes';
|
|
16
|
+
import { Grid3CommandCategory } from './commands';
|
|
17
|
+
export { ensureAlphaChannel, darkenColor, lightenColor, hexToRgba, rgbaToHex } from './colorUtils';
|
|
18
|
+
export { resolveGridsetPassword, getZipEntriesWithPassword, resolveGridsetPasswordFromEnv, } from './password';
|
|
19
|
+
export { getPageTokenImageMap, getAllowedImageEntries, openImage, generateGrid3Guid, createSettingsXml, createFileMapXml, getCommonDocumentsPath, findGrid3UserPaths, findGrid3HistoryDatabases, findGrid3Vocabularies, findGrid3UserHistory, findGrid3Users, isGrid3Installed, readGrid3History, readGrid3HistoryForUser, readAllGrid3History, type Grid3UserPath, type Grid3VocabularyPath, type Grid3HistoryEntry, } from './helpers';
|
|
20
|
+
export { parseSymbolReference, isSymbolReference, resolveSymbolReference, getAvailableSymbolLibraries, getSymbolLibraryInfo, extractSymbolReferences, analyzeSymbolUsage, createSymbolReference, getSymbolLibraryName, getSymbolPath, isKnownSymbolLibrary, getSymbolLibraryDisplayName, getDefaultGrid3Path, getSymbolLibrariesDir, getSymbolSearchIndexesDir, symbolReferenceToFilename, SYMBOL_LIBRARIES, type SymbolReference, type SymbolLibraryInfo, type SymbolResolutionOptions, type SymbolResolutionResult, type SymbolUsageStats, type SymbolLibraryName, } from './symbols';
|
|
21
|
+
export { getSymbolsDir, getSymbolSearchDir } from './symbols';
|
|
22
|
+
export { resolveGrid3CellImage, isSymbolLibraryReference, parseImageSymbolReference, } from './resolver';
|
|
23
|
+
export { extractButtonImage, extractSymbolLibraryImage, convertToAstericsImage, analyzeSymbolExtraction, suggestExtractionStrategy, exportSymbolReferencesToCsv, createSymbolManifest, type ExtractedImage, type SymbolExtractionOptions, type SymbolReport, type SymbolManifest, } from './symbolExtractor';
|
|
24
|
+
export { parsePixFile, loadSearchIndexes, searchSymbols, searchSymbolsWithReferences, getSymbolFilename, getSymbolDisplayName, getAllSearchTerms, getSearchSuggestions, countLibrarySymbols, getSymbolSearchStats, type SymbolSearchResult, type SymbolSearchOptions, type LibrarySearchIndex, type SymbolSearchStats, } from './symbolSearch';
|
|
25
|
+
/**
|
|
26
|
+
* Get all Grid 3 command IDs as a readonly array
|
|
27
|
+
* Useful for validation and autocomplete
|
|
28
|
+
*/
|
|
29
|
+
export declare const GRID3_COMMAND_IDS: readonly string[];
|
|
30
|
+
/**
|
|
31
|
+
* Get all Grid 3 plugin IDs as a readonly array
|
|
32
|
+
*/
|
|
33
|
+
export declare const GRID3_PLUGIN_IDS: readonly string[];
|
|
34
|
+
/**
|
|
35
|
+
* Grid 3 cell shapes enum values
|
|
36
|
+
*/
|
|
37
|
+
export declare const GRID3_CELL_SHAPES: readonly (string | CellBackgroundShape)[];
|
|
38
|
+
/**
|
|
39
|
+
* Grid 3 cell types enum values
|
|
40
|
+
*/
|
|
41
|
+
export declare const GRID3_CELL_TYPES: readonly Grid3CellType[];
|
|
42
|
+
/**
|
|
43
|
+
* Grid 3 command categories enum values
|
|
44
|
+
*/
|
|
45
|
+
export declare const GRID3_COMMAND_CATEGORIES: readonly Grid3CommandCategory[];
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Grid 3 Enhanced Support Module
|
|
4
|
+
*
|
|
5
|
+
* This module exports all enhanced Grid 3 functionality including:
|
|
6
|
+
* - Cell shape detection and support
|
|
7
|
+
* - Plugin cell type detection (Workspace, LiveCell, AutoContent)
|
|
8
|
+
* - Comprehensive command definitions and detection
|
|
9
|
+
* - Color utilities and style helpers
|
|
10
|
+
* - Image resolution helpers
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.parseSymbolReference = exports.readAllGrid3History = exports.readGrid3HistoryForUser = exports.readGrid3History = exports.isGrid3Installed = exports.findGrid3Users = exports.findGrid3UserHistory = exports.findGrid3Vocabularies = exports.findGrid3HistoryDatabases = exports.findGrid3UserPaths = exports.getCommonDocumentsPath = exports.createFileMapXml = exports.createSettingsXml = exports.generateGrid3Guid = exports.openImage = exports.getAllowedImageEntries = exports.getPageTokenImageMap = exports.resolveGridsetPasswordFromEnv = exports.getZipEntriesWithPassword = exports.resolveGridsetPassword = exports.rgbaToHex = exports.hexToRgba = exports.lightenColor = exports.darkenColor = exports.ensureAlphaChannel = 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.createCategoryStyle = exports.createDefaultStylesXml = exports.CATEGORY_STYLES = exports.DEFAULT_GRID3_STYLES = exports.SHAPE_NAMES = exports.CellBackgroundShape = void 0;
|
|
14
|
+
exports.GRID3_COMMAND_CATEGORIES = exports.GRID3_CELL_TYPES = exports.GRID3_CELL_SHAPES = exports.GRID3_PLUGIN_IDS = exports.GRID3_COMMAND_IDS = 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.parseImageSymbolReference = exports.isSymbolLibraryReference = exports.resolveGrid3CellImage = exports.getSymbolSearchDir = exports.getSymbolsDir = 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 = void 0;
|
|
15
|
+
// Style helpers
|
|
16
|
+
var styleHelpers_1 = require("./styleHelpers");
|
|
17
|
+
Object.defineProperty(exports, "CellBackgroundShape", { enumerable: true, get: function () { return styleHelpers_1.CellBackgroundShape; } });
|
|
18
|
+
Object.defineProperty(exports, "SHAPE_NAMES", { enumerable: true, get: function () { return styleHelpers_1.SHAPE_NAMES; } });
|
|
19
|
+
Object.defineProperty(exports, "DEFAULT_GRID3_STYLES", { enumerable: true, get: function () { return styleHelpers_1.DEFAULT_GRID3_STYLES; } });
|
|
20
|
+
Object.defineProperty(exports, "CATEGORY_STYLES", { enumerable: true, get: function () { return styleHelpers_1.CATEGORY_STYLES; } });
|
|
21
|
+
Object.defineProperty(exports, "createDefaultStylesXml", { enumerable: true, get: function () { return styleHelpers_1.createDefaultStylesXml; } });
|
|
22
|
+
Object.defineProperty(exports, "createCategoryStyle", { enumerable: true, get: function () { return styleHelpers_1.createCategoryStyle; } });
|
|
23
|
+
// Plugin cell type detection
|
|
24
|
+
var pluginTypes_1 = require("./pluginTypes");
|
|
25
|
+
Object.defineProperty(exports, "detectPluginCellType", { enumerable: true, get: function () { return pluginTypes_1.detectPluginCellType; } });
|
|
26
|
+
Object.defineProperty(exports, "Grid3CellType", { enumerable: true, get: function () { return pluginTypes_1.Grid3CellType; } });
|
|
27
|
+
Object.defineProperty(exports, "WORKSPACE_TYPES", { enumerable: true, get: function () { return pluginTypes_1.WORKSPACE_TYPES; } });
|
|
28
|
+
Object.defineProperty(exports, "LIVECELL_TYPES", { enumerable: true, get: function () { return pluginTypes_1.LIVECELL_TYPES; } });
|
|
29
|
+
Object.defineProperty(exports, "AUTOCONTENT_TYPES", { enumerable: true, get: function () { return pluginTypes_1.AUTOCONTENT_TYPES; } });
|
|
30
|
+
Object.defineProperty(exports, "getCellTypeDisplayName", { enumerable: true, get: function () { return pluginTypes_1.getCellTypeDisplayName; } });
|
|
31
|
+
Object.defineProperty(exports, "isWorkspaceCell", { enumerable: true, get: function () { return pluginTypes_1.isWorkspaceCell; } });
|
|
32
|
+
Object.defineProperty(exports, "isLiveCell", { enumerable: true, get: function () { return pluginTypes_1.isLiveCell; } });
|
|
33
|
+
Object.defineProperty(exports, "isAutoContentCell", { enumerable: true, get: function () { return pluginTypes_1.isAutoContentCell; } });
|
|
34
|
+
Object.defineProperty(exports, "isRegularCell", { enumerable: true, get: function () { return pluginTypes_1.isRegularCell; } });
|
|
35
|
+
// Command definitions and detection
|
|
36
|
+
var commands_1 = require("./commands");
|
|
37
|
+
Object.defineProperty(exports, "detectCommand", { enumerable: true, get: function () { return commands_1.detectCommand; } });
|
|
38
|
+
Object.defineProperty(exports, "getCommandDefinition", { enumerable: true, get: function () { return commands_1.getCommandDefinition; } });
|
|
39
|
+
Object.defineProperty(exports, "getCommandsByPlugin", { enumerable: true, get: function () { return commands_1.getCommandsByPlugin; } });
|
|
40
|
+
Object.defineProperty(exports, "getCommandsByCategory", { enumerable: true, get: function () { return commands_1.getCommandsByCategory; } });
|
|
41
|
+
Object.defineProperty(exports, "getAllCommandIds", { enumerable: true, get: function () { return commands_1.getAllCommandIds; } });
|
|
42
|
+
Object.defineProperty(exports, "getAllPluginIds", { enumerable: true, get: function () { return commands_1.getAllPluginIds; } });
|
|
43
|
+
Object.defineProperty(exports, "extractCommandParameters", { enumerable: true, get: function () { return commands_1.extractCommandParameters; } });
|
|
44
|
+
Object.defineProperty(exports, "GRID3_COMMANDS", { enumerable: true, get: function () { return commands_1.GRID3_COMMANDS; } });
|
|
45
|
+
Object.defineProperty(exports, "Grid3CommandCategory", { enumerable: true, get: function () { return commands_1.Grid3CommandCategory; } });
|
|
46
|
+
// Import for local use in constant definitions
|
|
47
|
+
const commands_2 = require("./commands");
|
|
48
|
+
const styleHelpers_2 = require("./styleHelpers");
|
|
49
|
+
const pluginTypes_2 = require("./pluginTypes");
|
|
50
|
+
const commands_3 = require("./commands");
|
|
51
|
+
// Color utilities
|
|
52
|
+
var colorUtils_1 = require("./colorUtils");
|
|
53
|
+
Object.defineProperty(exports, "ensureAlphaChannel", { enumerable: true, get: function () { return colorUtils_1.ensureAlphaChannel; } });
|
|
54
|
+
Object.defineProperty(exports, "darkenColor", { enumerable: true, get: function () { return colorUtils_1.darkenColor; } });
|
|
55
|
+
Object.defineProperty(exports, "lightenColor", { enumerable: true, get: function () { return colorUtils_1.lightenColor; } });
|
|
56
|
+
Object.defineProperty(exports, "hexToRgba", { enumerable: true, get: function () { return colorUtils_1.hexToRgba; } });
|
|
57
|
+
Object.defineProperty(exports, "rgbaToHex", { enumerable: true, get: function () { return colorUtils_1.rgbaToHex; } });
|
|
58
|
+
// Password handling
|
|
59
|
+
var password_1 = require("./password");
|
|
60
|
+
Object.defineProperty(exports, "resolveGridsetPassword", { enumerable: true, get: function () { return password_1.resolveGridsetPassword; } });
|
|
61
|
+
Object.defineProperty(exports, "getZipEntriesWithPassword", { enumerable: true, get: function () { return password_1.getZipEntriesWithPassword; } });
|
|
62
|
+
Object.defineProperty(exports, "resolveGridsetPasswordFromEnv", { enumerable: true, get: function () { return password_1.resolveGridsetPasswordFromEnv; } });
|
|
63
|
+
// Helper functions
|
|
64
|
+
var helpers_1 = require("./helpers");
|
|
65
|
+
Object.defineProperty(exports, "getPageTokenImageMap", { enumerable: true, get: function () { return helpers_1.getPageTokenImageMap; } });
|
|
66
|
+
Object.defineProperty(exports, "getAllowedImageEntries", { enumerable: true, get: function () { return helpers_1.getAllowedImageEntries; } });
|
|
67
|
+
Object.defineProperty(exports, "openImage", { enumerable: true, get: function () { return helpers_1.openImage; } });
|
|
68
|
+
Object.defineProperty(exports, "generateGrid3Guid", { enumerable: true, get: function () { return helpers_1.generateGrid3Guid; } });
|
|
69
|
+
Object.defineProperty(exports, "createSettingsXml", { enumerable: true, get: function () { return helpers_1.createSettingsXml; } });
|
|
70
|
+
Object.defineProperty(exports, "createFileMapXml", { enumerable: true, get: function () { return helpers_1.createFileMapXml; } });
|
|
71
|
+
Object.defineProperty(exports, "getCommonDocumentsPath", { enumerable: true, get: function () { return helpers_1.getCommonDocumentsPath; } });
|
|
72
|
+
Object.defineProperty(exports, "findGrid3UserPaths", { enumerable: true, get: function () { return helpers_1.findGrid3UserPaths; } });
|
|
73
|
+
Object.defineProperty(exports, "findGrid3HistoryDatabases", { enumerable: true, get: function () { return helpers_1.findGrid3HistoryDatabases; } });
|
|
74
|
+
Object.defineProperty(exports, "findGrid3Vocabularies", { enumerable: true, get: function () { return helpers_1.findGrid3Vocabularies; } });
|
|
75
|
+
Object.defineProperty(exports, "findGrid3UserHistory", { enumerable: true, get: function () { return helpers_1.findGrid3UserHistory; } });
|
|
76
|
+
Object.defineProperty(exports, "findGrid3Users", { enumerable: true, get: function () { return helpers_1.findGrid3Users; } });
|
|
77
|
+
Object.defineProperty(exports, "isGrid3Installed", { enumerable: true, get: function () { return helpers_1.isGrid3Installed; } });
|
|
78
|
+
Object.defineProperty(exports, "readGrid3History", { enumerable: true, get: function () { return helpers_1.readGrid3History; } });
|
|
79
|
+
Object.defineProperty(exports, "readGrid3HistoryForUser", { enumerable: true, get: function () { return helpers_1.readGrid3HistoryForUser; } });
|
|
80
|
+
Object.defineProperty(exports, "readAllGrid3History", { enumerable: true, get: function () { return helpers_1.readAllGrid3History; } });
|
|
81
|
+
// Symbol library handling
|
|
82
|
+
var symbols_1 = require("./symbols");
|
|
83
|
+
Object.defineProperty(exports, "parseSymbolReference", { enumerable: true, get: function () { return symbols_1.parseSymbolReference; } });
|
|
84
|
+
Object.defineProperty(exports, "isSymbolReference", { enumerable: true, get: function () { return symbols_1.isSymbolReference; } });
|
|
85
|
+
Object.defineProperty(exports, "resolveSymbolReference", { enumerable: true, get: function () { return symbols_1.resolveSymbolReference; } });
|
|
86
|
+
Object.defineProperty(exports, "getAvailableSymbolLibraries", { enumerable: true, get: function () { return symbols_1.getAvailableSymbolLibraries; } });
|
|
87
|
+
Object.defineProperty(exports, "getSymbolLibraryInfo", { enumerable: true, get: function () { return symbols_1.getSymbolLibraryInfo; } });
|
|
88
|
+
Object.defineProperty(exports, "extractSymbolReferences", { enumerable: true, get: function () { return symbols_1.extractSymbolReferences; } });
|
|
89
|
+
Object.defineProperty(exports, "analyzeSymbolUsage", { enumerable: true, get: function () { return symbols_1.analyzeSymbolUsage; } });
|
|
90
|
+
Object.defineProperty(exports, "createSymbolReference", { enumerable: true, get: function () { return symbols_1.createSymbolReference; } });
|
|
91
|
+
Object.defineProperty(exports, "getSymbolLibraryName", { enumerable: true, get: function () { return symbols_1.getSymbolLibraryName; } });
|
|
92
|
+
Object.defineProperty(exports, "getSymbolPath", { enumerable: true, get: function () { return symbols_1.getSymbolPath; } });
|
|
93
|
+
Object.defineProperty(exports, "isKnownSymbolLibrary", { enumerable: true, get: function () { return symbols_1.isKnownSymbolLibrary; } });
|
|
94
|
+
Object.defineProperty(exports, "getSymbolLibraryDisplayName", { enumerable: true, get: function () { return symbols_1.getSymbolLibraryDisplayName; } });
|
|
95
|
+
Object.defineProperty(exports, "getDefaultGrid3Path", { enumerable: true, get: function () { return symbols_1.getDefaultGrid3Path; } });
|
|
96
|
+
Object.defineProperty(exports, "getSymbolLibrariesDir", { enumerable: true, get: function () { return symbols_1.getSymbolLibrariesDir; } });
|
|
97
|
+
Object.defineProperty(exports, "getSymbolSearchIndexesDir", { enumerable: true, get: function () { return symbols_1.getSymbolSearchIndexesDir; } });
|
|
98
|
+
Object.defineProperty(exports, "symbolReferenceToFilename", { enumerable: true, get: function () { return symbols_1.symbolReferenceToFilename; } });
|
|
99
|
+
Object.defineProperty(exports, "SYMBOL_LIBRARIES", { enumerable: true, get: function () { return symbols_1.SYMBOL_LIBRARIES; } });
|
|
100
|
+
// Backward compatibility aliases for old function names
|
|
101
|
+
var symbols_2 = require("./symbols");
|
|
102
|
+
Object.defineProperty(exports, "getSymbolsDir", { enumerable: true, get: function () { return symbols_2.getSymbolsDir; } });
|
|
103
|
+
Object.defineProperty(exports, "getSymbolSearchDir", { enumerable: true, get: function () { return symbols_2.getSymbolSearchDir; } });
|
|
104
|
+
// Image resolution
|
|
105
|
+
var resolver_1 = require("./resolver");
|
|
106
|
+
Object.defineProperty(exports, "resolveGrid3CellImage", { enumerable: true, get: function () { return resolver_1.resolveGrid3CellImage; } });
|
|
107
|
+
Object.defineProperty(exports, "isSymbolLibraryReference", { enumerable: true, get: function () { return resolver_1.isSymbolLibraryReference; } });
|
|
108
|
+
Object.defineProperty(exports, "parseImageSymbolReference", { enumerable: true, get: function () { return resolver_1.parseImageSymbolReference; } });
|
|
109
|
+
// Symbol extraction and conversion
|
|
110
|
+
var symbolExtractor_1 = require("./symbolExtractor");
|
|
111
|
+
Object.defineProperty(exports, "extractButtonImage", { enumerable: true, get: function () { return symbolExtractor_1.extractButtonImage; } });
|
|
112
|
+
Object.defineProperty(exports, "extractSymbolLibraryImage", { enumerable: true, get: function () { return symbolExtractor_1.extractSymbolLibraryImage; } });
|
|
113
|
+
Object.defineProperty(exports, "convertToAstericsImage", { enumerable: true, get: function () { return symbolExtractor_1.convertToAstericsImage; } });
|
|
114
|
+
Object.defineProperty(exports, "analyzeSymbolExtraction", { enumerable: true, get: function () { return symbolExtractor_1.analyzeSymbolExtraction; } });
|
|
115
|
+
Object.defineProperty(exports, "suggestExtractionStrategy", { enumerable: true, get: function () { return symbolExtractor_1.suggestExtractionStrategy; } });
|
|
116
|
+
Object.defineProperty(exports, "exportSymbolReferencesToCsv", { enumerable: true, get: function () { return symbolExtractor_1.exportSymbolReferencesToCsv; } });
|
|
117
|
+
Object.defineProperty(exports, "createSymbolManifest", { enumerable: true, get: function () { return symbolExtractor_1.createSymbolManifest; } });
|
|
118
|
+
// Symbol search functionality
|
|
119
|
+
var symbolSearch_1 = require("./symbolSearch");
|
|
120
|
+
Object.defineProperty(exports, "parsePixFile", { enumerable: true, get: function () { return symbolSearch_1.parsePixFile; } });
|
|
121
|
+
Object.defineProperty(exports, "loadSearchIndexes", { enumerable: true, get: function () { return symbolSearch_1.loadSearchIndexes; } });
|
|
122
|
+
Object.defineProperty(exports, "searchSymbols", { enumerable: true, get: function () { return symbolSearch_1.searchSymbols; } });
|
|
123
|
+
Object.defineProperty(exports, "searchSymbolsWithReferences", { enumerable: true, get: function () { return symbolSearch_1.searchSymbolsWithReferences; } });
|
|
124
|
+
Object.defineProperty(exports, "getSymbolFilename", { enumerable: true, get: function () { return symbolSearch_1.getSymbolFilename; } });
|
|
125
|
+
Object.defineProperty(exports, "getSymbolDisplayName", { enumerable: true, get: function () { return symbolSearch_1.getSymbolDisplayName; } });
|
|
126
|
+
Object.defineProperty(exports, "getAllSearchTerms", { enumerable: true, get: function () { return symbolSearch_1.getAllSearchTerms; } });
|
|
127
|
+
Object.defineProperty(exports, "getSearchSuggestions", { enumerable: true, get: function () { return symbolSearch_1.getSearchSuggestions; } });
|
|
128
|
+
Object.defineProperty(exports, "countLibrarySymbols", { enumerable: true, get: function () { return symbolSearch_1.countLibrarySymbols; } });
|
|
129
|
+
Object.defineProperty(exports, "getSymbolSearchStats", { enumerable: true, get: function () { return symbolSearch_1.getSymbolSearchStats; } });
|
|
130
|
+
/**
|
|
131
|
+
* Get all Grid 3 command IDs as a readonly array
|
|
132
|
+
* Useful for validation and autocomplete
|
|
133
|
+
*/
|
|
134
|
+
exports.GRID3_COMMAND_IDS = Object.freeze((0, commands_2.getAllCommandIds)());
|
|
135
|
+
/**
|
|
136
|
+
* Get all Grid 3 plugin IDs as a readonly array
|
|
137
|
+
*/
|
|
138
|
+
exports.GRID3_PLUGIN_IDS = Object.freeze((0, commands_2.getAllPluginIds)());
|
|
139
|
+
/**
|
|
140
|
+
* Grid 3 cell shapes enum values
|
|
141
|
+
*/
|
|
142
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
143
|
+
exports.GRID3_CELL_SHAPES = Object.freeze(Object.values(styleHelpers_2.CellBackgroundShape));
|
|
144
|
+
/**
|
|
145
|
+
* Grid 3 cell types enum values
|
|
146
|
+
*/
|
|
147
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
148
|
+
exports.GRID3_CELL_TYPES = Object.freeze(Object.values(pluginTypes_2.Grid3CellType));
|
|
149
|
+
/**
|
|
150
|
+
* Grid 3 command categories enum values
|
|
151
|
+
*/
|
|
152
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
153
|
+
exports.GRID3_COMMAND_CATEGORIES = Object.freeze(Object.values(commands_3.Grid3CommandCategory));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ProcessorOptions } from '../../core/baseProcessor';
|
|
2
|
+
import AdmZip from 'adm-zip';
|
|
3
|
+
/**
|
|
4
|
+
* Resolve the password to use for Grid3 archives.
|
|
5
|
+
* Preference order:
|
|
6
|
+
* 1. Explicit processor option
|
|
7
|
+
* 2. GRIDSET_PASSWORD env var
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolveGridsetPassword(options?: ProcessorOptions, source?: string | Buffer): string | undefined;
|
|
10
|
+
export declare function resolveGridsetPasswordFromEnv(): string | undefined;
|
|
11
|
+
export declare function getZipEntriesWithPassword(zip: AdmZip, password?: string): AdmZip.IZipEntry[];
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.resolveGridsetPassword = resolveGridsetPassword;
|
|
7
|
+
exports.resolveGridsetPasswordFromEnv = resolveGridsetPasswordFromEnv;
|
|
8
|
+
exports.getZipEntriesWithPassword = getZipEntriesWithPassword;
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
10
|
+
/**
|
|
11
|
+
* Resolve the password to use for Grid3 archives.
|
|
12
|
+
* Preference order:
|
|
13
|
+
* 1. Explicit processor option
|
|
14
|
+
* 2. GRIDSET_PASSWORD env var
|
|
15
|
+
*/
|
|
16
|
+
function resolveGridsetPassword(options, source) {
|
|
17
|
+
if (options?.gridsetPassword)
|
|
18
|
+
return options.gridsetPassword;
|
|
19
|
+
if (process.env.GRIDSET_PASSWORD)
|
|
20
|
+
return process.env.GRIDSET_PASSWORD;
|
|
21
|
+
if (typeof source === 'string') {
|
|
22
|
+
const ext = path_1.default.extname(source).toLowerCase();
|
|
23
|
+
if (ext === '.gridsetx')
|
|
24
|
+
return process.env.GRIDSET_PASSWORD;
|
|
25
|
+
}
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
function resolveGridsetPasswordFromEnv() {
|
|
29
|
+
return process.env.GRIDSET_PASSWORD;
|
|
30
|
+
}
|
|
31
|
+
// Wrapper to set the password before reading entries (typed getEntries lacks the optional arg)
|
|
32
|
+
function getZipEntriesWithPassword(zip, password) {
|
|
33
|
+
if (password) {
|
|
34
|
+
return zip.getEntries(password);
|
|
35
|
+
}
|
|
36
|
+
return zip.getEntries();
|
|
37
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Grid 3 Plugin Cell Type Detection
|
|
3
|
+
*
|
|
4
|
+
* Grid 3 uses three special cell types for different plugin functionalities:
|
|
5
|
+
* - Workspace: Full editing workspaces (Email, Chat, WordProcessor, etc.)
|
|
6
|
+
* - LiveCell: Dynamic content displays (Clock, Volume indicators, etc.)
|
|
7
|
+
* - AutoContent: Dynamic word/content suggestions
|
|
8
|
+
*
|
|
9
|
+
* This module provides detection and metadata extraction for these cell types.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Cell types in Grid 3
|
|
13
|
+
*/
|
|
14
|
+
export declare enum Grid3CellType {
|
|
15
|
+
Regular = "regular",
|
|
16
|
+
Workspace = "workspace",
|
|
17
|
+
LiveCell = "livecell",
|
|
18
|
+
AutoContent = "autocontent"
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Plugin metadata extracted from Grid 3 cells
|
|
22
|
+
*/
|
|
23
|
+
export interface Grid3PluginMetadata {
|
|
24
|
+
cellType: Grid3CellType;
|
|
25
|
+
pluginId?: string;
|
|
26
|
+
subType?: string;
|
|
27
|
+
autoContentType?: string;
|
|
28
|
+
liveCellType?: string;
|
|
29
|
+
displayName?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Known workspace types in Grid 3
|
|
33
|
+
*/
|
|
34
|
+
export declare const WORKSPACE_TYPES: {
|
|
35
|
+
readonly CHAT: "Chat";
|
|
36
|
+
readonly EMAIL: "Email";
|
|
37
|
+
readonly WORD_PROCESSOR: "WordProcessor";
|
|
38
|
+
readonly PHONE: "Phone";
|
|
39
|
+
readonly SMS: "Sms";
|
|
40
|
+
readonly WEB_BROWSER: "WebBrowser";
|
|
41
|
+
readonly COMPUTER_CONTROL: "ComputerControl";
|
|
42
|
+
readonly CALCULATOR: "Calculator";
|
|
43
|
+
readonly TIMER: "Timer";
|
|
44
|
+
readonly MUSIC_VIDEO: "MusicVideo";
|
|
45
|
+
readonly PHOTOS: "Photos";
|
|
46
|
+
readonly CONTACTS: "Contacts";
|
|
47
|
+
readonly INTERACTIVE_LEARNING: "InteractiveLearning";
|
|
48
|
+
readonly MESSAGE_BANKING: "MessageBanking";
|
|
49
|
+
readonly ENVIRONMENT_CONTROL: "EnvironmentControl";
|
|
50
|
+
readonly SETTINGS: "Settings";
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Known live cell types in Grid 3
|
|
54
|
+
*/
|
|
55
|
+
export declare const LIVECELL_TYPES: {
|
|
56
|
+
readonly DIGITAL_CLOCK: "DigitalClock";
|
|
57
|
+
readonly ANALOG_CLOCK: "AnalogClock";
|
|
58
|
+
readonly DATE_DISPLAY: "DateDisplay";
|
|
59
|
+
readonly PUBLIC_VOLUME: "PublicVolume";
|
|
60
|
+
readonly PUBLIC_SPEED: "PublicSpeed";
|
|
61
|
+
readonly PUBLIC_VOICE: "PublicVoice";
|
|
62
|
+
readonly MESSAGES: "Messages";
|
|
63
|
+
readonly BATTERY: "Battery";
|
|
64
|
+
readonly WIFI_STRENGTH: "WifiStrength";
|
|
65
|
+
readonly BLUETOOTH_STATUS: "BluetoothStatus";
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Known auto content types in Grid 3
|
|
69
|
+
*/
|
|
70
|
+
export declare const AUTOCONTENT_TYPES: {
|
|
71
|
+
readonly CHANGE_PUBLIC_VOICE: "ChangePublicVoice";
|
|
72
|
+
readonly CHANGE_PUBLIC_SPEED: "ChangePublicSpeed";
|
|
73
|
+
readonly EMAIL_CONTACTS: "EmailContacts";
|
|
74
|
+
readonly EMAIL_RECIPIENTS: "EmailRecipients";
|
|
75
|
+
readonly PHONE_CONTACTS: "PhoneContacts";
|
|
76
|
+
readonly SMS_CONTACTS: "SmsContacts";
|
|
77
|
+
readonly WEB_FAVORITES: "WebFavorites";
|
|
78
|
+
readonly WEB_HISTORY: "WebHistory";
|
|
79
|
+
readonly PREDICTION: "Prediction";
|
|
80
|
+
readonly GRAMMAR: "Grammar";
|
|
81
|
+
readonly CONTEXTUAL: "Contextual";
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Human-readable names for cell types
|
|
85
|
+
*/
|
|
86
|
+
export declare function getCellTypeDisplayName(cellType: Grid3CellType): string;
|
|
87
|
+
/**
|
|
88
|
+
* Detect plugin cell type from Grid 3 cell content
|
|
89
|
+
*
|
|
90
|
+
* @param content - Grid 3 cell content object
|
|
91
|
+
* @returns Plugin metadata with detected type
|
|
92
|
+
*/
|
|
93
|
+
export declare function detectPluginCellType(content: any): Grid3PluginMetadata;
|
|
94
|
+
/**
|
|
95
|
+
* Check if a cell is a workspace cell
|
|
96
|
+
*/
|
|
97
|
+
export declare function isWorkspaceCell(metadata: Grid3PluginMetadata): boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Check if a cell is a live cell
|
|
100
|
+
*/
|
|
101
|
+
export declare function isLiveCell(metadata: Grid3PluginMetadata): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Check if a cell is an auto content cell
|
|
104
|
+
*/
|
|
105
|
+
export declare function isAutoContentCell(metadata: Grid3PluginMetadata): boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Check if a cell is a regular (non-plugin) cell
|
|
108
|
+
*/
|
|
109
|
+
export declare function isRegularCell(metadata: Grid3PluginMetadata): boolean;
|