@willwade/aac-processors 0.0.7 → 0.0.8
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 +2 -3
- package/dist/analytics/history.d.ts +57 -0
- package/dist/analytics/history.js +72 -0
- package/dist/core/analyze.d.ts +10 -0
- package/dist/core/analyze.js +10 -0
- package/dist/core/stringCasing.d.ts +11 -0
- package/dist/core/stringCasing.js +11 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -0
- package/dist/processors/gridset/helpers.d.ts +95 -0
- package/dist/processors/gridset/helpers.js +285 -0
- package/dist/processors/index.d.ts +3 -3
- package/dist/processors/index.js +31 -2
- package/dist/processors/obfProcessor.js +6 -1
- package/dist/processors/snap/helpers.d.ts +85 -0
- package/dist/processors/snap/helpers.js +259 -2
- package/dist/processors/touchchat/helpers.d.ts +12 -0
- package/dist/processors/touchchat/helpers.js +12 -2
- package/dist/utils/dotnetTicks.d.ts +13 -0
- package/dist/utils/dotnetTicks.js +21 -0
- package/package.json +8 -6
- package/docs/.keep +0 -1
- package/docs/ApplePanels.md +0 -309
- package/docs/Grid3-Styling-Guide.md +0 -287
- package/docs/Grid3-XML-Format.md +0 -1788
- package/docs/TobiiDynavox-Snap-Details.md +0 -394
- package/docs/asterics-Grid-fileformat-details.md +0 -443
- package/docs/obf_.obz Open Board File Formats.md +0 -432
- package/docs/touchchat.md +0 -520
|
@@ -1,394 +0,0 @@
|
|
|
1
|
-
Exports are .sps files. these are sqlite files. no encryption.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
here is the structure
|
|
5
|
-
|
|
6
|
-
ERD Diagram here : https://dbdiagram.io/d/TobiiDynavoxSnap-651a8680ffbf5169f0da45d5
|
|
7
|
-
|
|
8
|
-
```sql
|
|
9
|
-
|
|
10
|
-
BEGIN TRANSACTION;
|
|
11
|
-
CREATE TABLE IF NOT EXISTS "CommandSequence" (
|
|
12
|
-
"Id" integer NOT NULL,
|
|
13
|
-
"SerializedCommands" varchar,
|
|
14
|
-
"ButtonId" integer,
|
|
15
|
-
PRIMARY KEY("Id" AUTOINCREMENT)
|
|
16
|
-
);
|
|
17
|
-
CREATE TABLE IF NOT EXISTS "ButtonPlacement" (
|
|
18
|
-
"Id" integer NOT NULL,
|
|
19
|
-
"GridPosition" varchar,
|
|
20
|
-
"Visible" integer,
|
|
21
|
-
"ButtonId" integer,
|
|
22
|
-
"PageLayoutId" integer,
|
|
23
|
-
PRIMARY KEY("Id" AUTOINCREMENT)
|
|
24
|
-
);
|
|
25
|
-
CREATE TABLE IF NOT EXISTS "PageLayout" (
|
|
26
|
-
"Id" integer NOT NULL,
|
|
27
|
-
"PageLayoutSetting" varchar,
|
|
28
|
-
"PageId" integer,
|
|
29
|
-
PRIMARY KEY("Id" AUTOINCREMENT)
|
|
30
|
-
);
|
|
31
|
-
CREATE TABLE IF NOT EXISTS "PageExtra" (
|
|
32
|
-
"Id" integer,
|
|
33
|
-
"AccessedAt" bigint,
|
|
34
|
-
PRIMARY KEY("Id"),
|
|
35
|
-
FOREIGN KEY("Id") REFERENCES "Page"("Id") ON DELETE CASCADE
|
|
36
|
-
);
|
|
37
|
-
CREATE TABLE IF NOT EXISTS "PageSetData" (
|
|
38
|
-
"Id" integer NOT NULL,
|
|
39
|
-
"Identifier" varchar,
|
|
40
|
-
"Data" blob,
|
|
41
|
-
"RefCount" integer DEFAULT 0,
|
|
42
|
-
PRIMARY KEY("Id" AUTOINCREMENT)
|
|
43
|
-
);
|
|
44
|
-
CREATE TABLE IF NOT EXISTS "SyncData" (
|
|
45
|
-
"UniqueId" varchar(36) NOT NULL,
|
|
46
|
-
"Type" integer,
|
|
47
|
-
"Timestamp" bigint,
|
|
48
|
-
"SyncHash" integer,
|
|
49
|
-
"Deleted" integer,
|
|
50
|
-
"Description" VARCHAR,
|
|
51
|
-
PRIMARY KEY("UniqueId")
|
|
52
|
-
);
|
|
53
|
-
CREATE TABLE IF NOT EXISTS "Synchronization" (
|
|
54
|
-
"Id" integer NOT NULL,
|
|
55
|
-
"SyncServerIdentifier" varchar,
|
|
56
|
-
"PageSetTimestamp" bigint,
|
|
57
|
-
"PageSetSyncHash" integer,
|
|
58
|
-
PRIMARY KEY("Id" AUTOINCREMENT)
|
|
59
|
-
);
|
|
60
|
-
CREATE TABLE IF NOT EXISTS "Page" (
|
|
61
|
-
"Id" integer NOT NULL,
|
|
62
|
-
"UniqueId" varchar(36),
|
|
63
|
-
"Title" varchar,
|
|
64
|
-
"PageType" integer,
|
|
65
|
-
"Language" varchar,
|
|
66
|
-
"BackgroundColor" integer,
|
|
67
|
-
"ContentTag" varchar,
|
|
68
|
-
"Timestamp" bigint,
|
|
69
|
-
"SyncHash" integer,
|
|
70
|
-
"LibrarySymbolId" integer,
|
|
71
|
-
"PageSetImageId" integer,
|
|
72
|
-
"GridDimension" varchar,
|
|
73
|
-
"MessageBarVisible" integer,
|
|
74
|
-
PRIMARY KEY("Id" AUTOINCREMENT)
|
|
75
|
-
);
|
|
76
|
-
CREATE TABLE IF NOT EXISTS "PageSetProperties" (
|
|
77
|
-
"Id" integer,
|
|
78
|
-
"ContentIdentifier" VARCHAR,
|
|
79
|
-
"ContentVersion" VARCHAR,
|
|
80
|
-
"SchemaVersion" VARCHAR,
|
|
81
|
-
"UniqueId" VARCHAR(36),
|
|
82
|
-
"Language" VARCHAR,
|
|
83
|
-
"Timestamp" BIGINT,
|
|
84
|
-
"SyncHash" integer,
|
|
85
|
-
"DefaultHomePageUniqueId" VARCHAR(36),
|
|
86
|
-
"SerializedHomePageUniqueIdOverrides" BLOB,
|
|
87
|
-
"DefaultKeyboardPageUniqueId" VARCHAR(36),
|
|
88
|
-
"SerializedKeyboardPageUniqueIdOverrides" BLOB,
|
|
89
|
-
"ToolBarUniqueId" VARCHAR(36),
|
|
90
|
-
"DashboardUniqueId" VARCHAR(36),
|
|
91
|
-
"MessageBarUniqueId" VARCHAR(36),
|
|
92
|
-
"MessageBarVisible" integer,
|
|
93
|
-
"ToolBarVisible" integer,
|
|
94
|
-
"FriendlyName" VARCHAR,
|
|
95
|
-
"Description" VARCHAR,
|
|
96
|
-
"IconImageId" integer,
|
|
97
|
-
"SerializedPreferredGridDimensions" VARCHAR,
|
|
98
|
-
"GridDimension" VARCHAR,
|
|
99
|
-
"SmartSymLayout" int,
|
|
100
|
-
"FontFamily" VARCHAR,
|
|
101
|
-
"FontSize" float,
|
|
102
|
-
"FontStyle" int,
|
|
103
|
-
"PageBackgroundColor" integer,
|
|
104
|
-
"MessageBarBackgroundColor" integer,
|
|
105
|
-
"ToolBarBackgroundColor" integer,
|
|
106
|
-
"MessageWindowTextColor" integer,
|
|
107
|
-
"MessageWindowFontSize" float,
|
|
108
|
-
PRIMARY KEY("Id")
|
|
109
|
-
);
|
|
110
|
-
CREATE TABLE IF NOT EXISTS "ButtonPageLink" (
|
|
111
|
-
"Id" INTEGER NOT NULL,
|
|
112
|
-
"ButtonId" INTEGER NOT NULL,
|
|
113
|
-
"PageUniqueId" varchar(36) NOT NULL,
|
|
114
|
-
PRIMARY KEY("Id" AUTOINCREMENT),
|
|
115
|
-
FOREIGN KEY("ButtonId") REFERENCES "Button"("Id") ON DELETE CASCADE
|
|
116
|
-
);
|
|
117
|
-
CREATE TABLE IF NOT EXISTS "Button" (
|
|
118
|
-
"Id" INTEGER NOT NULL,
|
|
119
|
-
"Language" varchar,
|
|
120
|
-
"Label" varchar,
|
|
121
|
-
"LabelOwnership" integer,
|
|
122
|
-
"Message" varchar,
|
|
123
|
-
"AudioCue" varchar,
|
|
124
|
-
"ImageOwnership" integer,
|
|
125
|
-
"LabelColor" integer,
|
|
126
|
-
"BackgroundColor" integer,
|
|
127
|
-
"BorderColor" integer,
|
|
128
|
-
"BorderThickness" float,
|
|
129
|
-
"FontSize" float,
|
|
130
|
-
"FontFamily" varchar,
|
|
131
|
-
"FontStyle" integer,
|
|
132
|
-
"SmartSymLayout" integer,
|
|
133
|
-
"CommandFlags" integer,
|
|
134
|
-
"ContentType" integer,
|
|
135
|
-
"ContentTag" varchar,
|
|
136
|
-
"LibrarySymbolId" integer,
|
|
137
|
-
"PageSetImageId" integer,
|
|
138
|
-
"SerializedContentTypeHandler" varchar,
|
|
139
|
-
"MessageRecordingId" integer,
|
|
140
|
-
"AudioCueRecordingId" integer,
|
|
141
|
-
"PageId" integer,
|
|
142
|
-
"UseMessageRecording" integer,
|
|
143
|
-
"UseAudioCueRecording" integer,
|
|
144
|
-
"UniqueId" varchar(36),
|
|
145
|
-
PRIMARY KEY("Id" AUTOINCREMENT)
|
|
146
|
-
);
|
|
147
|
-
CREATE INDEX IF NOT EXISTS "CommandSequence_ButtonId" ON "CommandSequence" (
|
|
148
|
-
"ButtonId"
|
|
149
|
-
);
|
|
150
|
-
CREATE INDEX IF NOT EXISTS "ButtonPlacement_PageLayoutId" ON "ButtonPlacement" (
|
|
151
|
-
"PageLayoutId"
|
|
152
|
-
);
|
|
153
|
-
CREATE INDEX IF NOT EXISTS "PageLayout_PageId" ON "PageLayout" (
|
|
154
|
-
"PageId"
|
|
155
|
-
);
|
|
156
|
-
CREATE INDEX IF NOT EXISTS "Button_AudioCueRecordingId" ON "Button" (
|
|
157
|
-
"AudioCueRecordingId"
|
|
158
|
-
);
|
|
159
|
-
CREATE INDEX IF NOT EXISTS "Button_MessageRecordingId" ON "Button" (
|
|
160
|
-
"MessageRecordingId"
|
|
161
|
-
);
|
|
162
|
-
CREATE INDEX IF NOT EXISTS "Button_PageId" ON "Button" (
|
|
163
|
-
"PageId"
|
|
164
|
-
);
|
|
165
|
-
CREATE INDEX IF NOT EXISTS "Button_PageSetImageId" ON "Button" (
|
|
166
|
-
"PageSetImageId"
|
|
167
|
-
);
|
|
168
|
-
CREATE UNIQUE INDEX IF NOT EXISTS "PageSetData_Identifier" ON "PageSetData" (
|
|
169
|
-
"Identifier"
|
|
170
|
-
);
|
|
171
|
-
CREATE UNIQUE INDEX IF NOT EXISTS "Page_UniqueId" ON "Page" (
|
|
172
|
-
"UniqueId"
|
|
173
|
-
);
|
|
174
|
-
CREATE INDEX IF NOT EXISTS "Page_PageSetImageId" ON "Page" (
|
|
175
|
-
"PageSetImageId"
|
|
176
|
-
);
|
|
177
|
-
COMMIT;
|
|
178
|
-
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
DBML
|
|
182
|
-
```dbml
|
|
183
|
-
Table CommandSequence {
|
|
184
|
-
Id int [pk, not null]
|
|
185
|
-
SerializedCommands varchar
|
|
186
|
-
ButtonId int
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
Table ButtonPlacement {
|
|
190
|
-
Id int [pk, not null]
|
|
191
|
-
GridPosition varchar
|
|
192
|
-
Visible int
|
|
193
|
-
ButtonId int
|
|
194
|
-
PageLayoutId int
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
Table PageLayout {
|
|
198
|
-
Id int [pk, not null]
|
|
199
|
-
PageLayoutSetting varchar
|
|
200
|
-
PageId int
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
Table PageExtra {
|
|
204
|
-
Id int [pk, not null, ref: > Page.Id]
|
|
205
|
-
AccessedAt bigint
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
Table PageSetData {
|
|
209
|
-
Id int [pk, not null]
|
|
210
|
-
Identifier varchar
|
|
211
|
-
Data blob
|
|
212
|
-
RefCount int [default: 0]
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
Table SyncData {
|
|
216
|
-
UniqueId varchar(36) [pk, not null]
|
|
217
|
-
Type int
|
|
218
|
-
Timestamp bigint
|
|
219
|
-
SyncHash int
|
|
220
|
-
Deleted int
|
|
221
|
-
Description varchar
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
Table Synchronization {
|
|
225
|
-
Id int [pk, not null]
|
|
226
|
-
SyncServerIdentifier varchar
|
|
227
|
-
PageSetTimestamp bigint
|
|
228
|
-
PageSetSyncHash int
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
Table Page {
|
|
232
|
-
Id int [pk, not null]
|
|
233
|
-
UniqueId varchar(36)
|
|
234
|
-
Title varchar
|
|
235
|
-
PageType int
|
|
236
|
-
Language varchar
|
|
237
|
-
BackgroundColor int
|
|
238
|
-
ContentTag varchar
|
|
239
|
-
Timestamp bigint
|
|
240
|
-
SyncHash int
|
|
241
|
-
LibrarySymbolId int
|
|
242
|
-
PageSetImageId int
|
|
243
|
-
GridDimension varchar
|
|
244
|
-
MessageBarVisible int
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
Table PageSetProperties {
|
|
248
|
-
Id int [pk, not null]
|
|
249
|
-
ContentIdentifier varchar
|
|
250
|
-
ContentVersion varchar
|
|
251
|
-
SchemaVersion varchar
|
|
252
|
-
UniqueId varchar(36)
|
|
253
|
-
Language varchar
|
|
254
|
-
Timestamp bigint
|
|
255
|
-
SyncHash int
|
|
256
|
-
DefaultHomePageUniqueId varchar(36)
|
|
257
|
-
SerializedHomePageUniqueIdOverrides blob
|
|
258
|
-
DefaultKeyboardPageUniqueId varchar(36)
|
|
259
|
-
SerializedKeyboardPageUniqueIdOverrides blob
|
|
260
|
-
ToolBarUniqueId varchar(36)
|
|
261
|
-
DashboardUniqueId varchar(36)
|
|
262
|
-
MessageBarUniqueId varchar(36)
|
|
263
|
-
MessageBarVisible int
|
|
264
|
-
ToolBarVisible int
|
|
265
|
-
FriendlyName varchar
|
|
266
|
-
Description varchar
|
|
267
|
-
IconImageId int
|
|
268
|
-
SerializedPreferredGridDimensions varchar
|
|
269
|
-
GridDimension varchar
|
|
270
|
-
SmartSymLayout int
|
|
271
|
-
FontFamily varchar
|
|
272
|
-
FontSize float
|
|
273
|
-
FontStyle int
|
|
274
|
-
PageBackgroundColor int
|
|
275
|
-
MessageBarBackgroundColor int
|
|
276
|
-
ToolBarBackgroundColor int
|
|
277
|
-
MessageWindowTextColor int
|
|
278
|
-
MessageWindowFontSize float
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
Table ButtonPageLink {
|
|
282
|
-
Id int [pk, not null]
|
|
283
|
-
ButtonId int [not null, ref: > Button.Id]
|
|
284
|
-
PageUniqueId varchar(36) [not null]
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
Table Button {
|
|
288
|
-
Id int [pk, not null]
|
|
289
|
-
Language varchar
|
|
290
|
-
Label varchar
|
|
291
|
-
LabelOwnership int
|
|
292
|
-
Message varchar
|
|
293
|
-
AudioCue varchar
|
|
294
|
-
ImageOwnership int
|
|
295
|
-
LabelColor int
|
|
296
|
-
BackgroundColor int
|
|
297
|
-
BorderColor int
|
|
298
|
-
BorderThickness float
|
|
299
|
-
FontSize float
|
|
300
|
-
FontFamily varchar
|
|
301
|
-
FontStyle int
|
|
302
|
-
SmartSymLayout int
|
|
303
|
-
CommandFlags int
|
|
304
|
-
ContentType int
|
|
305
|
-
ContentTag varchar
|
|
306
|
-
LibrarySymbolId int
|
|
307
|
-
PageSetImageId int
|
|
308
|
-
SerializedContentTypeHandler varchar
|
|
309
|
-
MessageRecordingId int
|
|
310
|
-
AudioCueRecordingId int
|
|
311
|
-
PageId int
|
|
312
|
-
UseMessageRecording int
|
|
313
|
-
UseAudioCueRecording int
|
|
314
|
-
UniqueId varchar(36)
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
// Relationships
|
|
318
|
-
Ref: CommandSequence.ButtonId > Button.Id
|
|
319
|
-
Ref: ButtonPlacement.ButtonId > Button.Id
|
|
320
|
-
Ref: ButtonPlacement.PageLayoutId > PageLayout.Id
|
|
321
|
-
Ref: PageLayout.PageId > Page.Id
|
|
322
|
-
Ref: PageExtra.Id > Page.Id
|
|
323
|
-
Ref: ButtonPageLink.ButtonId > Button.Id
|
|
324
|
-
Ref: Button.PageId > Page.Id
|
|
325
|
-
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
## Button/Language data
|
|
329
|
-
|
|
330
|
-
- There are really only two tables with this data in it `Button`- `Label` and `Button`- `Message` and `Page` - `Title`
|
|
331
|
-
|
|
332
|
-
## Symbols
|
|
333
|
-
|
|
334
|
-
### Symbol References in Snap Files
|
|
335
|
-
|
|
336
|
-
Snap files (.sps) store symbols in the following way:
|
|
337
|
-
|
|
338
|
-
1. **Button and Page References**
|
|
339
|
-
- `Button.PageSetImageId`: References an entry in the PageSetData table
|
|
340
|
-
- `Page.PageSetImageId`: Similar to Button, for page symbols
|
|
341
|
-
|
|
342
|
-
2. **PageSetData Table**
|
|
343
|
-
- Contains the actual symbol data and references
|
|
344
|
-
- Each entry has:
|
|
345
|
-
- `Id`: Referenced by PageSetImageId
|
|
346
|
-
- `Identifier`: Can be:
|
|
347
|
-
- A symbol reference (e.g., 'SYM:33053')
|
|
348
|
-
- A custom image identifier
|
|
349
|
-
- `Data`: The actual image data as a BLOB
|
|
350
|
-
|
|
351
|
-
3. **Element Structure**
|
|
352
|
-
- `ElementReference`: Contains metadata about elements (buttons, pages, etc.)
|
|
353
|
-
- `ElementPlacement`: Controls where elements are placed in the grid
|
|
354
|
-
- Buttons link to ElementReference through `Button.ElementReferenceId`
|
|
355
|
-
|
|
356
|
-
When processing a Snap file, symbols should be loaded by:
|
|
357
|
-
1. Getting the PageSetImageId from Button or Page
|
|
358
|
-
2. Looking up the entry in PageSetData
|
|
359
|
-
3. Using the image Data directly, with the Identifier as the label
|
|
360
|
-
|
|
361
|
-
Note: While Snap uses a separate symbol database (`SymbolsSnapCoreFoundation.db3`) in its installed version, exported .sps files contain all necessary symbol data within the PageSetData table.
|
|
362
|
-
|
|
363
|
-
### Symbol Resolution
|
|
364
|
-
|
|
365
|
-
`SymbolsSnapCoreFoundation.db3` is the symbol database used by Snap. It contains the following tables:
|
|
366
|
-
|
|
367
|
-
| Table | Description |
|
|
368
|
-
|------------------|--------------------------------------------------------------|
|
|
369
|
-
| `Symbol` | Stores the main symbol image and label text. |
|
|
370
|
-
| `Library` | Defines named symbol libraries (e.g., PCS, SymbolStix). |
|
|
371
|
-
| `Tag` | Defines tags or categories (e.g., “people”, “actions”). |
|
|
372
|
-
| `SymbolTag` | Many-to-many join between symbols and tags. |
|
|
373
|
-
| `SymbolLibrary` | Many-to-many join between symbols and libraries. |
|
|
374
|
-
| `SymbolSetProperties` | Metadata for the symbol set (e.g., version, GUID). |
|
|
375
|
-
|
|
376
|
-
Full schema below
|
|
377
|
-
|
|
378
|
-
```sql
|
|
379
|
-
CREATE TABLE Symbol (SymbolId INTEGER NOT NULL, Image BLOB NOT NULL, MonoImage BLOB, Label TEXT NOT NULL, PRIMARY KEY(SymbolId)) WITHOUT ROWID;
|
|
380
|
-
CREATE TABLE Library (Id INTEGER NOT NULL UNIQUE, LibraryName varchar NOT NULL UNIQUE, LibraryCategory varchar NOT NULL, PRIMARY KEY(Id));
|
|
381
|
-
CREATE TABLE Tag (Id INTEGER NOT NULL UNIQUE, TagCategory varchar NOT NULL, TagName varchar NOT NULL, PRIMARY KEY(Id));
|
|
382
|
-
CREATE TABLE SymbolTag (SymbolId INTEGER NOT NULL, TagId INTEGER NOT NULL, CONSTRAINT SymbolTag_pk PRIMARY KEY(SymbolId, TagId));
|
|
383
|
-
CREATE TABLE SymbolLibrary (SymbolId INTEGER NOT NULL, LibraryId INTEGER NOT NULL, CONSTRAINT SymbolLibrary_pk PRIMARY KEY(SymbolId, LibraryId));
|
|
384
|
-
CREATE TABLE SymbolSetProperties (Guid varchar NOT NULL UNIQUE, Version varchar NOT NULL, Description varchar, DisplayName varchar, IsBuiltIn INTEGER NOT NULL);
|
|
385
|
-
CREATE INDEX LabelIndex ON Symbol (Label collate nocase ASC);
|
|
386
|
-
CREATE INDEX SymbolTagIndex ON SymbolTag (SymbolId ASC);
|
|
387
|
-
CREATE INDEX SymbolLibraryIndex ON SymbolLibrary (SymbolId ASC);
|
|
388
|
-
```
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
So to resolve a symbol reference in a Snap file, you would need to:
|
|
392
|
-
1. Get the PageSetImageId from Button or Page
|
|
393
|
-
2. Look up the entry in PageSetData
|
|
394
|
-
3. Use the image Data directly, with the Identifier as the label
|