@willwade/aac-processors 0.2.12 → 0.2.13
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/dist/browser/core/treeStructure.js +45 -0
- package/dist/browser/processors/applePanelsProcessor.js +5 -0
- package/dist/browser/processors/astericsGridProcessor.js +5 -0
- package/dist/browser/processors/dotProcessor.js +5 -0
- package/dist/browser/processors/gridset/saveMutations.js +212 -0
- package/dist/browser/processors/gridsetProcessor.js +35 -37
- package/dist/browser/processors/obfProcessor.js +51 -1
- package/dist/browser/processors/opmlProcessor.js +5 -0
- package/dist/browser/processors/snapProcessor.js +5 -0
- package/dist/browser/processors/touchchatProcessor.js +5 -0
- package/dist/core/baseProcessor.d.ts +2 -0
- package/dist/core/treeStructure.d.ts +32 -2
- package/dist/core/treeStructure.js +45 -0
- package/dist/processors/applePanelsProcessor.d.ts +5 -0
- package/dist/processors/applePanelsProcessor.js +5 -0
- package/dist/processors/astericsGridProcessor.d.ts +5 -0
- package/dist/processors/astericsGridProcessor.js +5 -0
- package/dist/processors/dotProcessor.d.ts +5 -0
- package/dist/processors/dotProcessor.js +5 -0
- package/dist/processors/excelProcessor.d.ts +5 -0
- package/dist/processors/excelProcessor.js +8 -0
- package/dist/processors/gridset/saveMutations.d.ts +39 -0
- package/dist/processors/gridset/saveMutations.js +216 -0
- package/dist/processors/gridsetProcessor.d.ts +5 -0
- package/dist/processors/gridsetProcessor.js +35 -37
- package/dist/processors/obfProcessor.d.ts +14 -0
- package/dist/processors/obfProcessor.js +51 -1
- package/dist/processors/obfsetProcessor.d.ts +5 -0
- package/dist/processors/obfsetProcessor.js +5 -0
- package/dist/processors/opmlProcessor.d.ts +5 -0
- package/dist/processors/opmlProcessor.js +5 -0
- package/dist/processors/snapProcessor.d.ts +5 -0
- package/dist/processors/snapProcessor.js +5 -0
- package/dist/processors/touchchatProcessor.d.ts +5 -0
- package/dist/processors/touchchatProcessor.js +5 -0
- package/dist/types/aac.d.ts +54 -0
- package/package.json +1 -1
|
@@ -34,6 +34,11 @@ function mapTouchChatVisibility(visible) {
|
|
|
34
34
|
class TouchChatProcessor extends baseProcessor_1.BaseProcessor {
|
|
35
35
|
constructor(options) {
|
|
36
36
|
super(options);
|
|
37
|
+
this.capabilities = {
|
|
38
|
+
wordList: 'none',
|
|
39
|
+
preservesAssetsOnSave: false,
|
|
40
|
+
newCellCreation: 'allowed',
|
|
41
|
+
};
|
|
37
42
|
this.tree = null;
|
|
38
43
|
this.sourceFile = null;
|
|
39
44
|
}
|
package/dist/types/aac.d.ts
CHANGED
|
@@ -206,3 +206,57 @@ export interface AACProcessor {
|
|
|
206
206
|
extractTexts(filePath: string | Buffer): Promise<string[]>;
|
|
207
207
|
loadIntoTree(filePath: string | Buffer): Promise<AACTree>;
|
|
208
208
|
}
|
|
209
|
+
/**
|
|
210
|
+
* Word List Item for dynamic content cells (e.g., Grid 3 WordLists)
|
|
211
|
+
*/
|
|
212
|
+
export interface AACWordListItem {
|
|
213
|
+
text: string;
|
|
214
|
+
image?: string;
|
|
215
|
+
partOfSpeech?: string;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Mutation types for page modifications
|
|
219
|
+
*/
|
|
220
|
+
export type AACPageMutation = {
|
|
221
|
+
type: 'addButton';
|
|
222
|
+
button: AACButton;
|
|
223
|
+
} | {
|
|
224
|
+
type: 'removeButton';
|
|
225
|
+
buttonId: string;
|
|
226
|
+
} | {
|
|
227
|
+
type: 'updateButton';
|
|
228
|
+
buttonId: string;
|
|
229
|
+
patch: Partial<AACButton>;
|
|
230
|
+
} | {
|
|
231
|
+
type: 'addWordListItem';
|
|
232
|
+
item: AACWordListItem;
|
|
233
|
+
} | {
|
|
234
|
+
type: 'removeWordListItem';
|
|
235
|
+
match: string | ((item: AACWordListItem) => boolean);
|
|
236
|
+
} | {
|
|
237
|
+
type: 'clearWordList';
|
|
238
|
+
};
|
|
239
|
+
/**
|
|
240
|
+
* Processor capabilities declaration
|
|
241
|
+
*/
|
|
242
|
+
export interface ProcessorCapabilities {
|
|
243
|
+
/**
|
|
244
|
+
* WordList support level
|
|
245
|
+
* - 'native': addWordListItem writes a real WordList structure on disk
|
|
246
|
+
* - 'fallback': addWordListItem becomes addButton (still useful, just not dynamic)
|
|
247
|
+
* - 'none': addWordListItem throws CapabilityError
|
|
248
|
+
*/
|
|
249
|
+
wordList: 'native' | 'fallback' | 'none';
|
|
250
|
+
/**
|
|
251
|
+
* Whether the processor has a real saveModifiedTree that keeps original images/settings
|
|
252
|
+
* If false, saveModifiedTree falls back to saveFromTree with a warning
|
|
253
|
+
*/
|
|
254
|
+
preservesAssetsOnSave: boolean;
|
|
255
|
+
/**
|
|
256
|
+
* Rules for creating new cells
|
|
257
|
+
* - 'allowed': addButton at any (x,y) creates a cell on save
|
|
258
|
+
* - 'restricted': addButton routes to a WordList if (x,y) is a WordList cell, else dropped with warning
|
|
259
|
+
* - 'forbidden': addButton requires explicit (x,y) of an existing cell; otherwise CapabilityError
|
|
260
|
+
*/
|
|
261
|
+
newCellCreation: 'allowed' | 'restricted' | 'forbidden';
|
|
262
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@willwade/aac-processors",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.13",
|
|
4
4
|
"description": "A comprehensive TypeScript library for processing AAC (Augmentative and Alternative Communication) file formats with translation support",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"browser": "dist/browser/index.browser.js",
|