@willwade/aac-processors 0.0.20 → 0.0.21
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.
|
@@ -1611,14 +1611,22 @@ class GridsetProcessor extends baseProcessor_1.BaseProcessor {
|
|
|
1611
1611
|
'?xml': { '@_version': '1.0', '@_encoding': 'UTF-8' },
|
|
1612
1612
|
GridSetSettings: {
|
|
1613
1613
|
'@_xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',
|
|
1614
|
+
Name: tree.metadata?.name || '',
|
|
1615
|
+
Description: tree.metadata?.description || '',
|
|
1616
|
+
Author: tree.metadata?.author || '',
|
|
1617
|
+
PrimaryLanguage: tree.metadata?.locale || 'en-US',
|
|
1614
1618
|
StartGrid: startGrid,
|
|
1615
1619
|
// Add other common Grid3 settings
|
|
1620
|
+
Thumbnail: tree.metadata?.thumbnail || '',
|
|
1621
|
+
ThumbnailBackground: tree.metadata?.thumbnailBackground || '',
|
|
1622
|
+
DocumentationUrl: tree.metadata?.homepageUrl || tree.metadata?.url || '',
|
|
1623
|
+
DocumentationSlug: tree.metadata?.documentationSlug || '',
|
|
1616
1624
|
ScanEnabled: 'false',
|
|
1617
1625
|
ScanTimeoutMs: '2000',
|
|
1618
1626
|
HoverEnabled: 'false',
|
|
1619
1627
|
HoverTimeoutMs: '1000',
|
|
1620
1628
|
MouseclickEnabled: 'true',
|
|
1621
|
-
Language: 'en-US',
|
|
1629
|
+
Language: tree.metadata?.locale || 'en-US',
|
|
1622
1630
|
},
|
|
1623
1631
|
};
|
|
1624
1632
|
const settingsBuilder = new fast_xml_parser_1.XMLBuilder({
|
|
@@ -694,6 +694,18 @@ class SnapProcessor extends baseProcessor_1.BaseProcessor {
|
|
|
694
694
|
Data BLOB,
|
|
695
695
|
RefCount INTEGER DEFAULT 1
|
|
696
696
|
);
|
|
697
|
+
|
|
698
|
+
CREATE TABLE IF NOT EXISTS PageSetProperties (
|
|
699
|
+
Id INTEGER PRIMARY KEY,
|
|
700
|
+
Name TEXT,
|
|
701
|
+
Description TEXT,
|
|
702
|
+
Author TEXT,
|
|
703
|
+
Locale TEXT,
|
|
704
|
+
DefaultHomePageUniqueId TEXT,
|
|
705
|
+
DefaultKeyboardPageUniqueId TEXT,
|
|
706
|
+
DashboardUniqueId TEXT,
|
|
707
|
+
ToolBarUniqueId TEXT
|
|
708
|
+
);
|
|
697
709
|
`);
|
|
698
710
|
// Insert pages
|
|
699
711
|
let pageIdCounter = 1;
|
|
@@ -801,6 +813,15 @@ class SnapProcessor extends baseProcessor_1.BaseProcessor {
|
|
|
801
813
|
insertPlacement.run(placementIdCounter++, elementRefId, gridPosition);
|
|
802
814
|
});
|
|
803
815
|
});
|
|
816
|
+
// Insert PageSetProperties metadata
|
|
817
|
+
const insertProps = db.prepare(`
|
|
818
|
+
INSERT INTO PageSetProperties (
|
|
819
|
+
Id, Name, Description, Author, Locale,
|
|
820
|
+
DefaultHomePageUniqueId, DefaultKeyboardPageUniqueId,
|
|
821
|
+
DashboardUniqueId, ToolBarUniqueId
|
|
822
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
823
|
+
`);
|
|
824
|
+
insertProps.run(1, tree.metadata?.name || null, tree.metadata?.description || null, tree.metadata?.author || null, tree.metadata?.locale || null, tree.metadata?.defaultHomePageId || tree.rootId || null, tree.metadata?.defaultKeyboardPageId || null, tree.metadata?.dashboardId || null, tree.metadata?.hasGlobalToolbar ? tree.metadata.toolbarId || null : null);
|
|
804
825
|
}
|
|
805
826
|
finally {
|
|
806
827
|
db.close();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@willwade/aac-processors",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
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
|
"types": "dist/index.d.ts",
|