@willwade/aac-processors 0.0.3

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.
Files changed (89) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +787 -0
  3. package/dist/cli/index.d.ts +2 -0
  4. package/dist/cli/index.js +189 -0
  5. package/dist/cli/prettyPrint.d.ts +2 -0
  6. package/dist/cli/prettyPrint.js +28 -0
  7. package/dist/core/analyze.d.ts +6 -0
  8. package/dist/core/analyze.js +49 -0
  9. package/dist/core/baseProcessor.d.ts +94 -0
  10. package/dist/core/baseProcessor.js +208 -0
  11. package/dist/core/fileProcessor.d.ts +7 -0
  12. package/dist/core/fileProcessor.js +51 -0
  13. package/dist/core/stringCasing.d.ts +37 -0
  14. package/dist/core/stringCasing.js +174 -0
  15. package/dist/core/treeStructure.d.ts +190 -0
  16. package/dist/core/treeStructure.js +223 -0
  17. package/dist/index.d.ts +23 -0
  18. package/dist/index.js +96 -0
  19. package/dist/optional/symbolTools.d.ts +28 -0
  20. package/dist/optional/symbolTools.js +126 -0
  21. package/dist/processors/applePanelsProcessor.d.ts +23 -0
  22. package/dist/processors/applePanelsProcessor.js +521 -0
  23. package/dist/processors/astericsGridProcessor.d.ts +49 -0
  24. package/dist/processors/astericsGridProcessor.js +1427 -0
  25. package/dist/processors/dotProcessor.d.ts +21 -0
  26. package/dist/processors/dotProcessor.js +191 -0
  27. package/dist/processors/excelProcessor.d.ts +145 -0
  28. package/dist/processors/excelProcessor.js +556 -0
  29. package/dist/processors/gridset/helpers.d.ts +4 -0
  30. package/dist/processors/gridset/helpers.js +48 -0
  31. package/dist/processors/gridset/resolver.d.ts +8 -0
  32. package/dist/processors/gridset/resolver.js +100 -0
  33. package/dist/processors/gridsetProcessor.d.ts +28 -0
  34. package/dist/processors/gridsetProcessor.js +1339 -0
  35. package/dist/processors/index.d.ts +14 -0
  36. package/dist/processors/index.js +42 -0
  37. package/dist/processors/obfProcessor.d.ts +21 -0
  38. package/dist/processors/obfProcessor.js +278 -0
  39. package/dist/processors/opmlProcessor.d.ts +21 -0
  40. package/dist/processors/opmlProcessor.js +235 -0
  41. package/dist/processors/snap/helpers.d.ts +4 -0
  42. package/dist/processors/snap/helpers.js +27 -0
  43. package/dist/processors/snapProcessor.d.ts +44 -0
  44. package/dist/processors/snapProcessor.js +586 -0
  45. package/dist/processors/touchchat/helpers.d.ts +4 -0
  46. package/dist/processors/touchchat/helpers.js +27 -0
  47. package/dist/processors/touchchatProcessor.d.ts +27 -0
  48. package/dist/processors/touchchatProcessor.js +768 -0
  49. package/dist/types/aac.d.ts +47 -0
  50. package/dist/types/aac.js +2 -0
  51. package/docs/.keep +1 -0
  52. package/docs/ApplePanels.md +309 -0
  53. package/docs/Grid3-XML-Format.md +1788 -0
  54. package/docs/TobiiDynavox-Snap-Details.md +394 -0
  55. package/docs/asterics-Grid-fileformat-details.md +443 -0
  56. package/docs/obf_.obz Open Board File Formats.md +432 -0
  57. package/docs/touchchat.md +520 -0
  58. package/examples/.coverage +0 -0
  59. package/examples/.keep +1 -0
  60. package/examples/README.md +31 -0
  61. package/examples/communikate.dot +2637 -0
  62. package/examples/demo.js +143 -0
  63. package/examples/example-images.gridset +0 -0
  64. package/examples/example.ce +0 -0
  65. package/examples/example.dot +14 -0
  66. package/examples/example.grd +1 -0
  67. package/examples/example.gridset +0 -0
  68. package/examples/example.obf +27 -0
  69. package/examples/example.obz +0 -0
  70. package/examples/example.opml +18 -0
  71. package/examples/example.spb +0 -0
  72. package/examples/example.sps +0 -0
  73. package/examples/example2.grd +1 -0
  74. package/examples/gemini_response.txt +845 -0
  75. package/examples/image-map.js +45 -0
  76. package/examples/package-lock.json +1326 -0
  77. package/examples/package.json +10 -0
  78. package/examples/styled-output/converted-snap-to-touchchat.ce +0 -0
  79. package/examples/styled-output/styled-example.ce +0 -0
  80. package/examples/styled-output/styled-example.gridset +0 -0
  81. package/examples/styled-output/styled-example.obf +37 -0
  82. package/examples/styled-output/styled-example.spb +0 -0
  83. package/examples/styling-example.ts +316 -0
  84. package/examples/translate.js +39 -0
  85. package/examples/translate_demo.js +254 -0
  86. package/examples/translation_cache.json +44894 -0
  87. package/examples/typescript-demo.ts +251 -0
  88. package/examples/unified-interface-demo.ts +183 -0
  89. package/package.json +106 -0
@@ -0,0 +1,47 @@
1
+ import { AACSemanticAction } from '../core/treeStructure';
2
+ export interface AACStyle {
3
+ backgroundColor?: string;
4
+ fontColor?: string;
5
+ borderColor?: string;
6
+ borderWidth?: number;
7
+ fontSize?: number;
8
+ fontFamily?: string;
9
+ fontWeight?: string;
10
+ fontStyle?: string;
11
+ textUnderline?: boolean;
12
+ labelOnTop?: boolean;
13
+ transparent?: boolean;
14
+ }
15
+ export interface AACButton {
16
+ id: string;
17
+ label: string;
18
+ message: string;
19
+ semanticAction?: AACSemanticAction;
20
+ targetPageId?: string;
21
+ style?: AACStyle;
22
+ audioRecording?: {
23
+ id?: number;
24
+ data?: Buffer;
25
+ identifier?: string;
26
+ metadata?: string;
27
+ };
28
+ }
29
+ export interface AACPage {
30
+ id: string;
31
+ name: string;
32
+ grid: Array<Array<AACButton | null>>;
33
+ buttons: AACButton[];
34
+ parentId: string | null;
35
+ style?: AACStyle;
36
+ }
37
+ export interface AACTree {
38
+ pages: {
39
+ [key: string]: AACPage;
40
+ };
41
+ addPage(page: AACPage): void;
42
+ getPage(id: string): AACPage | undefined;
43
+ }
44
+ export interface AACProcessor {
45
+ extractTexts(filePath: string): string[];
46
+ loadIntoTree(filePath: string): AACTree;
47
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/docs/.keep ADDED
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,309 @@
1
+ ## Apple Panels
2
+
3
+ This is not exactly a aac tool. but can be used as open
4
+
5
+ File format:
6
+
7
+ in a folder called '*.ascconfig'
8
+
9
+ we have Contents/
10
+
11
+ in this folder we have a file called 'Info.plist'
12
+
13
+ ```xml
14
+ <?xml version="1.0" encoding="UTF-8"?>
15
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
16
+ <plist version="1.0">
17
+ <dict>
18
+ <key>ASCConfigurationDisplayName</key>
19
+ <string>Default Panels</string>
20
+ <key>ASCConfigurationIdentifier</key>
21
+ <string>49F8121E-736B-4FC2-BEA8-209C3EF54ED9</string>
22
+ <key>ASCConfigurationProductSupportType</key>
23
+ <string>VirtualKeyboard</string>
24
+ <key>ASCConfigurationVersion</key>
25
+ <string>7.1</string>
26
+ <key>CFBundleDevelopmentRegion</key>
27
+ <string>en</string>
28
+ <key>CFBundleIdentifier</key>
29
+ <string>com.apple.AssistiveControl.panel.newDoc.defs</string>
30
+ <key>CFBundleName</key>
31
+ <string>Assistive Control Panels</string>
32
+ <key>CFBundleShortVersionString</key>
33
+ <string>2.0</string>
34
+ <key>CFBundleVersion</key>
35
+ <string>383</string>
36
+ <key>NSHumanReadableCopyright</key>
37
+ <string>Copyright © 2016-2024 Apple Inc. All Rights Reserved.</string>
38
+ </dict>
39
+ </plist>
40
+ ```
41
+
42
+ then Resources/ (so Contents/Resources/)
43
+ We have 'AssetIndex.plist'
44
+
45
+ ```xml
46
+ <?xml version="1.0" encoding="UTF-8"?>
47
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
48
+ <plist version="1.0">
49
+ <dict/>
50
+ </plist>
51
+ ```
52
+
53
+ and then PanelDefinitions.plist
54
+
55
+ ``xml
56
+ <?xml version="1.0" encoding="UTF-8"?>
57
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
58
+ <plist version="1.0">
59
+ <dict>
60
+ <key>Panels</key>
61
+ <dict>
62
+ <key>USER.82FC8D2C-6991-41E9-B534-78E52F101AC7</key>
63
+ <dict>
64
+ <key>DisplayOrder</key>
65
+ <integer>1</integer>
66
+ <key>GlidingLensSize</key>
67
+ <integer>5</integer>
68
+ <key>HasTransientPosition</key>
69
+ <false/>
70
+ <key>HideHome</key>
71
+ <false/>
72
+ <key>HideMinimize</key>
73
+ <false/>
74
+ <key>HidePanelAdjustments</key>
75
+ <false/>
76
+ <key>HideSwitchDock</key>
77
+ <false/>
78
+ <key>HideSwitchDockContextualButtons</key>
79
+ <false/>
80
+ <key>HideTitlebar</key>
81
+ <false/>
82
+ <key>ID</key>
83
+ <string>USER.82FC8D2C-6991-41E9-B534-78E52F101AC7</string>
84
+ <key>Name</key>
85
+ <string>New Panel</string>
86
+ <key>PanelObjects</key>
87
+ <array>
88
+ <dict>
89
+ <key>Actions</key>
90
+ <array>
91
+ <dict>
92
+ <key>ActionParam</key>
93
+ <dict>
94
+ <key>CharString</key>
95
+ <string>Enter this Text</string>
96
+ <key>isStickyKey</key>
97
+ <false/>
98
+ </dict>
99
+ <key>ActionRecordedOffset</key>
100
+ <real>0.0</real>
101
+ <key>ActionType</key>
102
+ <string>ActionPressKeyCharSequence</string>
103
+ <key>ID</key>
104
+ <string>Action.A502D835-D3B7-4253-80A3-97FE4B433EBE</string>
105
+ </dict>
106
+ </array>
107
+ <key>ButtonType</key>
108
+ <integer>0</integer>
109
+ <key>DisplayColor</key>
110
+ <string>0.041 0.375 0.998 1.000</string>
111
+ <key>DisplayImageResourceIsTemplate</key>
112
+ <false/>
113
+ <key>DisplayImageWeight</key>
114
+ <string>FontWeightRegular</string>
115
+ <key>DisplayText</key>
116
+ <string>enter text button</string>
117
+ <key>FontSize</key>
118
+ <real>12</real>
119
+ <key>ID</key>
120
+ <string>Button.186CD086-698B-496F-8496-1326D141833C</string>
121
+ <key>PanelObjectType</key>
122
+ <string>Button</string>
123
+ <key>Rect</key>
124
+ <string>{{0, 0}, {100, 25}}</string>
125
+ </dict>
126
+ <dict>
127
+ <key>Actions</key>
128
+ <array>
129
+ <dict>
130
+ <key>ActionParam</key>
131
+ <dict>
132
+ <key>PanelID</key>
133
+ <string>ACSH.homePanel.primary.dwell</string>
134
+ </dict>
135
+ <key>ActionRecordedOffset</key>
136
+ <real>0.0</real>
137
+ <key>ActionType</key>
138
+ <string>ActionOpenPanel</string>
139
+ <key>ID</key>
140
+ <string>Action.6C2E1080-B39F-491A-8F8A-F60460A35732</string>
141
+ </dict>
142
+ </array>
143
+ <key>ButtonType</key>
144
+ <integer>0</integer>
145
+ <key>DisplayColor</key>
146
+ <string>0.161 0.781 0.197 1.000</string>
147
+ <key>DisplayImageResourceIsTemplate</key>
148
+ <false/>
149
+ <key>DisplayImageWeight</key>
150
+ <string>FontWeightRegular</string>
151
+ <key>DisplayText</key>
152
+ <string>nav button</string>
153
+ <key>FontSize</key>
154
+ <real>12</real>
155
+ <key>ID</key>
156
+ <string>Button.8CD3879D-A328-47FB-BB7E-BB0E1973AFE8</string>
157
+ <key>PanelObjectType</key>
158
+ <string>Button</string>
159
+ <key>Rect</key>
160
+ <string>{{105, 0}, {100, 25}}</string>
161
+ </dict>
162
+ <dict>
163
+ <key>ButtonType</key>
164
+ <integer>0</integer>
165
+ <key>DisplayImageResource</key>
166
+ <string>DoubleClick</string>
167
+ <key>DisplayImageResourceIsTemplate</key>
168
+ <false/>
169
+ <key>DisplayImageWeight</key>
170
+ <string>FontWeightRegular</string>
171
+ <key>DisplayText</key>
172
+ <string>button with image</string>
173
+ <key>FontSize</key>
174
+ <real>12</real>
175
+ <key>ID</key>
176
+ <string>Button.36BCE679-1DF3-422F-80BB-F37F2E8527F2</string>
177
+ <key>PanelObjectType</key>
178
+ <string>Button</string>
179
+ <key>Rect</key>
180
+ <string>{{215, 0}, {100, 25}}</string>
181
+ </dict>
182
+ <dict>
183
+ <key>Actions</key>
184
+ <array>
185
+ <dict>
186
+ <key>ActionRecordedOffset</key>
187
+ <real>0.0</real>
188
+ </dict>
189
+ </array>
190
+ <key>ButtonType</key>
191
+ <integer>0</integer>
192
+ <key>DisplayImageResourceIsTemplate</key>
193
+ <false/>
194
+ <key>DisplayImageWeight</key>
195
+ <string>FontWeightRegular</string>
196
+ <key>DisplayText</key>
197
+ <string>Current Text</string>
198
+ <key>FontSize</key>
199
+ <real>12</real>
200
+ <key>ID</key>
201
+ <string>Button.39446632-CBCB-4D6D-945A-8F413DB611FA</string>
202
+ <key>LocalizedDisplayText</key>
203
+ <string>defaultButton.hoverText</string>
204
+ <key>PanelObjectType</key>
205
+ <string>Button</string>
206
+ <key>Rect</key>
207
+ <string>{{325, 0}, {100, 25}}</string>
208
+ </dict>
209
+ <dict>
210
+ <key>ButtonType</key>
211
+ <integer>0</integer>
212
+ <key>DisplayImageResourceIsTemplate</key>
213
+ <false/>
214
+ <key>DisplayImageWeight</key>
215
+ <string>FontWeightRegular</string>
216
+ <key>DisplayText</key>
217
+ <string>untitled</string>
218
+ <key>FontSize</key>
219
+ <real>12</real>
220
+ <key>ID</key>
221
+ <string>Button.711EC127-B802-49DD-AC6A-2996D8DBCADF</string>
222
+ <key>PanelObjectType</key>
223
+ <string>Button</string>
224
+ <key>Rect</key>
225
+ <string>{{0, 30}, {100, 25}}</string>
226
+ </dict>
227
+ <dict>
228
+ <key>ButtonType</key>
229
+ <integer>0</integer>
230
+ <key>DisplayImageResourceIsTemplate</key>
231
+ <false/>
232
+ <key>DisplayImageWeight</key>
233
+ <string>FontWeightRegular</string>
234
+ <key>DisplayText</key>
235
+ <string>untitled</string>
236
+ <key>FontSize</key>
237
+ <real>12</real>
238
+ <key>ID</key>
239
+ <string>Button.52D329DC-F607-4C62-9598-2C5B9F14D9B7</string>
240
+ <key>PanelObjectType</key>
241
+ <string>Button</string>
242
+ <key>Rect</key>
243
+ <string>{{105, 30}, {100, 25}}</string>
244
+ </dict>
245
+ <dict>
246
+ <key>ButtonType</key>
247
+ <integer>0</integer>
248
+ <key>DisplayImageResourceIsTemplate</key>
249
+ <false/>
250
+ <key>DisplayImageWeight</key>
251
+ <string>FontWeightRegular</string>
252
+ <key>DisplayText</key>
253
+ <string>untitled</string>
254
+ <key>FontSize</key>
255
+ <real>12</real>
256
+ <key>ID</key>
257
+ <string>Button.E48FC5B5-D13C-4776-A7FB-9E8BDBAF1988</string>
258
+ <key>PanelObjectType</key>
259
+ <string>Button</string>
260
+ <key>Rect</key>
261
+ <string>{{215, 30}, {100, 25}}</string>
262
+ </dict>
263
+ <dict>
264
+ <key>ButtonType</key>
265
+ <integer>0</integer>
266
+ <key>DisplayImageResourceIsTemplate</key>
267
+ <false/>
268
+ <key>DisplayImageWeight</key>
269
+ <string>FontWeightRegular</string>
270
+ <key>DisplayText</key>
271
+ <string>untitled</string>
272
+ <key>FontSize</key>
273
+ <real>12</real>
274
+ <key>ID</key>
275
+ <string>Button.DD4A146E-35FA-4CFE-81F7-C01AB245C955</string>
276
+ <key>PanelObjectType</key>
277
+ <string>Button</string>
278
+ <key>Rect</key>
279
+ <string>{{325, 30}, {100, 25}}</string>
280
+ </dict>
281
+ </array>
282
+ <key>ProductSupportType</key>
283
+ <string>All</string>
284
+ <key>Rect</key>
285
+ <string>{{15, 75}, {425, 55}}</string>
286
+ <key>ScanStyle</key>
287
+ <integer>0</integer>
288
+ <key>ShowPanelLocationString</key>
289
+ <string>CustomPanelList</string>
290
+ <key>UsesPinnedResizing</key>
291
+ <false/>
292
+ </dict>
293
+ </dict>
294
+ <key>ToolbarOrdering</key>
295
+ <dict>
296
+ <key>ToolbarIdentifiersAfterBasePanel</key>
297
+ <array/>
298
+ <key>ToolbarIdentifiersPriorToBasePanel</key>
299
+ <array>
300
+ <string>ACSH.systemPanel.dynamic.bestDwellActions</string>
301
+ <string>ACSH.systemPanel.dynamic.hoverText</string>
302
+ <string>ACSH.systemPanel.dynamic.bestSuggestions</string>
303
+ <string>ACSH.systemPanel.dynamic.bestFunctionKeys</string>
304
+ </array>
305
+ </dict>
306
+ </dict>
307
+ </plist>
308
+
309
+ ```