retold-remote 0.0.23 → 0.0.26

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 (79) hide show
  1. package/css/retold-remote.css +343 -20
  2. package/docs/.nojekyll +0 -0
  3. package/docs/README.md +64 -12
  4. package/docs/_cover.md +6 -6
  5. package/docs/_sidebar.md +2 -0
  6. package/docs/_topbar.md +1 -1
  7. package/docs/_version.json +7 -0
  8. package/docs/collections.md +30 -0
  9. package/docs/css/docuserve.css +327 -0
  10. package/docs/ebook-reader.md +75 -1
  11. package/docs/image-explorer.md +62 -2
  12. package/docs/index.html +39 -0
  13. package/docs/retold-catalog.json +254 -0
  14. package/docs/retold-keyword-index.json +31216 -0
  15. package/docs/server-setup.md +122 -91
  16. package/docs/stack-launcher.md +218 -0
  17. package/docs/synology.md +585 -0
  18. package/docs/ultravisor-configuration.md +5 -5
  19. package/docs/ultravisor-integration.md +4 -2
  20. package/package.json +20 -14
  21. package/source/Pict-Application-RetoldRemote.js +22 -0
  22. package/source/RetoldRemote-ExtensionMaps.js +1 -1
  23. package/source/cli/RetoldRemote-Server-Setup.js +460 -7
  24. package/source/cli/RetoldRemote-Stack-Launcher.js +563 -0
  25. package/source/cli/RetoldRemote-Stack-Run.js +41 -0
  26. package/source/cli/commands/RetoldRemote-Command-Serve.js +129 -54
  27. package/source/providers/CollectionManager-AddItems.js +166 -0
  28. package/source/providers/Pict-Provider-GalleryNavigation.js +55 -0
  29. package/source/providers/Pict-Provider-OperationStatus.js +597 -0
  30. package/source/providers/keyboard-handlers/KeyHandler-ImageExplorer.js +20 -1
  31. package/source/providers/keyboard-handlers/KeyHandler-Viewer.js +23 -0
  32. package/source/server/RetoldRemote-AudioWaveformService.js +49 -3
  33. package/source/server/RetoldRemote-CollectionExportService.js +763 -0
  34. package/source/server/RetoldRemote-CollectionService.js +5 -0
  35. package/source/server/RetoldRemote-EbookService.js +218 -3
  36. package/source/server/RetoldRemote-ImageService.js +221 -46
  37. package/source/server/RetoldRemote-MediaService.js +63 -4
  38. package/source/server/RetoldRemote-MetadataCache.js +25 -5
  39. package/source/server/RetoldRemote-OperationBroadcaster.js +363 -0
  40. package/source/server/RetoldRemote-SubimageService.js +680 -0
  41. package/source/server/RetoldRemote-ToolDetector.js +50 -0
  42. package/source/server/RetoldRemote-UltravisorBeacon.js +18 -3
  43. package/source/server/RetoldRemote-UltravisorDispatcher.js +65 -491
  44. package/source/server/RetoldRemote-UltravisorOperations.js +133 -20
  45. package/source/server/RetoldRemote-VideoFrameService.js +302 -9
  46. package/source/views/MediaViewer-EbookViewer.js +419 -1
  47. package/source/views/MediaViewer-PdfViewer.js +1050 -0
  48. package/source/views/PictView-Remote-AudioExplorer.js +77 -1
  49. package/source/views/PictView-Remote-CollectionsPanel.js +213 -0
  50. package/source/views/PictView-Remote-Gallery.js +365 -64
  51. package/source/views/PictView-Remote-ImageExplorer.js +1529 -44
  52. package/source/views/PictView-Remote-ImageViewer.js +2 -2
  53. package/source/views/PictView-Remote-Layout.js +58 -0
  54. package/source/views/PictView-Remote-MediaViewer.js +100 -25
  55. package/source/views/PictView-Remote-RegionsBrowser.js +554 -0
  56. package/source/views/PictView-Remote-SubimagesPanel.js +353 -0
  57. package/source/views/PictView-Remote-TopBar.js +1 -0
  58. package/source/views/PictView-Remote-VideoExplorer.js +77 -1
  59. package/web-application/css/docuserve.css +277 -23
  60. package/web-application/css/retold-remote.css +343 -20
  61. package/web-application/docs/README.md +64 -12
  62. package/web-application/docs/_cover.md +6 -6
  63. package/web-application/docs/_sidebar.md +2 -0
  64. package/web-application/docs/_topbar.md +1 -1
  65. package/web-application/docs/collections.md +30 -0
  66. package/web-application/docs/ebook-reader.md +75 -1
  67. package/web-application/docs/image-explorer.md +62 -2
  68. package/web-application/docs/server-setup.md +122 -91
  69. package/web-application/docs/stack-launcher.md +218 -0
  70. package/web-application/docs/synology.md +585 -0
  71. package/web-application/docs/ultravisor-configuration.md +5 -5
  72. package/web-application/docs/ultravisor-integration.md +4 -2
  73. package/web-application/js/pict-docuserve.min.js +12 -12
  74. package/web-application/js/pict.min.js +2 -2
  75. package/web-application/js/pict.min.js.map +1 -1
  76. package/web-application/retold-remote.js +6596 -1784
  77. package/web-application/retold-remote.js.map +1 -1
  78. package/web-application/retold-remote.min.js +75 -23
  79. package/web-application/retold-remote.min.js.map +1 -1
@@ -40,6 +40,7 @@ class ToolDetector
40
40
  p7zip: this._detectCommand('7z --help'),
41
41
  audiowaveform: this._detectCommand('audiowaveform --version'),
42
42
  ebook_convert: this._detectCommand('ebook-convert --version'),
43
+ libreoffice: this._detectLibreOffice(),
43
44
  exiftool: this._detectCommand('exiftool -ver'),
44
45
  dcraw: this._detectCommandExists('dcraw'),
45
46
  dcrawJs: this._detectModule('dcraw'),
@@ -151,6 +152,55 @@ class ToolDetector
151
152
  return this._detectCommand('vlc --version');
152
153
  }
153
154
 
155
+ /**
156
+ * Detect LibreOffice for headless document conversion.
157
+ * macOS: check for the .app bundle (soffice in the bundle).
158
+ * Linux: check the soffice command.
159
+ * Windows: check default install paths.
160
+ *
161
+ * @returns {boolean}
162
+ */
163
+ _detectLibreOffice()
164
+ {
165
+ const libFS = require('fs');
166
+
167
+ // macOS: check for LibreOffice.app
168
+ try
169
+ {
170
+ if (libFS.existsSync('/Applications/LibreOffice.app/Contents/MacOS/soffice'))
171
+ {
172
+ return true;
173
+ }
174
+ }
175
+ catch (pError)
176
+ {
177
+ // ignore
178
+ }
179
+
180
+ // Windows: check default install paths
181
+ if (process.platform === 'win32')
182
+ {
183
+ try
184
+ {
185
+ if (libFS.existsSync('C:\\Program Files\\LibreOffice\\program\\soffice.exe'))
186
+ {
187
+ return true;
188
+ }
189
+ if (libFS.existsSync('C:\\Program Files (x86)\\LibreOffice\\program\\soffice.exe'))
190
+ {
191
+ return true;
192
+ }
193
+ }
194
+ catch (pError)
195
+ {
196
+ // ignore
197
+ }
198
+ }
199
+
200
+ // Linux / other: check soffice on PATH
201
+ return this._detectCommandExists('soffice');
202
+ }
203
+
154
204
  /**
155
205
  * Check if a command-line tool exists on the PATH using 'which'.
156
206
  * Useful for tools that exit non-zero when invoked with no arguments (e.g. dcraw).
@@ -44,6 +44,8 @@ class RetoldRemoteUltravisorBeacon extends libFableServiceProviderBase
44
44
  * - ContentPath {string} Absolute path to content directory
45
45
  * - ContentBaseURL {string} URL prefix for content access (e.g. 'http://localhost:7500/content/')
46
46
  * - CacheRoot {string} Absolute path to cache directory
47
+ * - HostID {string} Override for the host identity (default: os.hostname())
48
+ * - SharedMounts {Array<{MountID, Root}>} Shared filesystem mounts to advertise
47
49
  * @param {Function} fCallback Called with (pError, pBeaconInfo)
48
50
  */
49
51
  connectBeacon(pBeaconConfig, fCallback)
@@ -62,8 +64,10 @@ class RetoldRemoteUltravisorBeacon extends libFableServiceProviderBase
62
64
  // Register the beacon service type with fable if not already present
63
65
  this.fable.addServiceTypeIfNotExists('UltravisorBeacon', libBeaconService);
64
66
 
65
- // Instantiate the beacon service with the provided config
66
- this._BeaconService = this.fable.instantiateServiceProviderWithoutRegistration('UltravisorBeacon',
67
+ // Build the beacon options. SharedMounts is forwarded as-is — the caller
68
+ // (Server-Setup) computes the MountID hash so that both retold-remote and
69
+ // orator-conversion advertise the SAME id for the same on-disk mount.
70
+ let tmpBeaconOptions =
67
71
  {
68
72
  ServerURL: pBeaconConfig.ServerURL,
69
73
  Name: pBeaconConfig.Name || 'retold-remote',
@@ -72,7 +76,18 @@ class RetoldRemoteUltravisorBeacon extends libFableServiceProviderBase
72
76
  StagingPath: pBeaconConfig.StagingPath || process.cwd(),
73
77
  Tags: pBeaconConfig.Tags || {},
74
78
  BindAddresses: pBeaconConfig.BindAddresses || []
75
- });
79
+ };
80
+ if (pBeaconConfig.HostID)
81
+ {
82
+ tmpBeaconOptions.HostID = pBeaconConfig.HostID;
83
+ }
84
+ if (Array.isArray(pBeaconConfig.SharedMounts) && pBeaconConfig.SharedMounts.length > 0)
85
+ {
86
+ tmpBeaconOptions.SharedMounts = pBeaconConfig.SharedMounts;
87
+ }
88
+
89
+ // Instantiate the beacon service with the provided config
90
+ this._BeaconService = this.fable.instantiateServiceProviderWithoutRegistration('UltravisorBeacon', tmpBeaconOptions);
76
91
 
77
92
  // Register the File context (content root — the user's media folder)
78
93
  if (pBeaconConfig.ContentPath)