@bendyline/docblocks-react 2.3.1 → 2.3.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.
- package/README.md +4 -0
- package/THIRD_PARTY_NOTICES.txt +20 -20
- package/dist/{ExportToolbarControls-I2EX7ZTH.js → ExportToolbarControls-N3TCL5DD.js} +8 -4
- package/dist/{chunk-OSQUKIUN.js → chunk-ODYNOPC3.js} +5 -2
- package/dist/export/index.js +1 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.js +13 -2
- package/dist/{run-export-UYR5USUJ.js → run-export-I2XOVGG4.js} +1 -1
- package/package.json +8 -8
- package/src/styles/docblocks.css +46 -6
package/README.md
CHANGED
|
@@ -56,6 +56,8 @@ The canonical DocBlocks experience in one component — file explorer, workspace
|
|
|
56
56
|
- `theme` — `'light' | 'dark' | 'auto'` (auto follows `prefers-color-scheme`)
|
|
57
57
|
- `logoUrl` — brand mark for the app menu button
|
|
58
58
|
- `ffmpegWasm` — optional same-origin ffmpeg core URLs; supplying them enables the built-in Animated GIF flow on cross-origin-isolated hosts
|
|
59
|
+
- `showCodeCopyButton` — shows Copy controls on ordinary fenced code blocks (default: `true`; Mermaid fences remain diagrams)
|
|
60
|
+
- `onCopyCode` — optional clipboard adapter for native hosts; browser hosts fall back to `navigator.clipboard.writeText`
|
|
59
61
|
|
|
60
62
|
Storage is abstracted behind the byte-authoritative `FileSystemProviderV2` contract from `@bendyline/docblocks/filesystem`: browser-local (IndexedDB), native folders (File System Access API), transient memory workspaces, or the Electron host. Built-in compatibility facades expose it as `provider.v2`; first-party shell and file-tree operations are v2-first.
|
|
61
63
|
|
|
@@ -95,6 +97,8 @@ workspace; generated links warn after 4,096 characters and are capped at
|
|
|
95
97
|
|
|
96
98
|
The export flow: quick re-export of the last configuration plus the full dialog — format (PDF, Word, PowerPoint, EPUB, HTML, Markdown), visual theme, and page size. Hosts that supply `ffmpegWasm` also expose Animated GIF with timing, orientation, captions, looping, and color controls.
|
|
97
99
|
|
|
100
|
+
Rendered HTML and HTML ZIP exports include Copy controls for ordinary fenced code blocks; Mermaid fences remain diagrams.
|
|
101
|
+
|
|
98
102
|
## Hooks
|
|
99
103
|
|
|
100
104
|
### `useDocumentSession(delay?)`
|
package/THIRD_PARTY_NOTICES.txt
CHANGED
|
@@ -15,12 +15,12 @@ This notice is included in the published npm tarball. Transitive packages instal
|
|
|
15
15
|
| Package | Version | License | Source |
|
|
16
16
|
| --- | --- | --- | --- |
|
|
17
17
|
| @antfu/install-pkg | 1.1.0 | MIT | https://github.com/antfu/install-pkg |
|
|
18
|
-
| @bendyline/squisq | 2.
|
|
19
|
-
| @bendyline/squisq-editor-react | 2.
|
|
20
|
-
| @bendyline/squisq-formats | 2.
|
|
21
|
-
| @bendyline/squisq-react | 2.
|
|
22
|
-
| @bendyline/squisq-video | 2.2.
|
|
23
|
-
| @bendyline/squisq-video-react | 2.2
|
|
18
|
+
| @bendyline/squisq | 2.7.0 | MIT | https://github.com/bendyline/squisq |
|
|
19
|
+
| @bendyline/squisq-editor-react | 2.7.0 | MIT | https://github.com/bendyline/squisq |
|
|
20
|
+
| @bendyline/squisq-formats | 2.4.1 | MIT | https://github.com/bendyline/squisq |
|
|
21
|
+
| @bendyline/squisq-react | 2.7.0 | MIT | https://github.com/bendyline/squisq |
|
|
22
|
+
| @bendyline/squisq-video | 2.2.11 | MIT | https://github.com/bendyline/squisq |
|
|
23
|
+
| @bendyline/squisq-video-react | 2.3.2 | MIT | https://github.com/bendyline/squisq |
|
|
24
24
|
| @braintree/sanitize-url | 7.1.2 | MIT | https://github.com/braintree/sanitize-url |
|
|
25
25
|
| @chevrotain/types | 11.1.2 | Apache-2.0 | https://github.com/Chevrotain/chevrotain |
|
|
26
26
|
| @ffmpeg/core | 0.12.9 | GPL-2.0-or-later | https://github.com/ffmpegwasm/ffmpeg.wasm |
|
|
@@ -398,7 +398,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
398
398
|
SOFTWARE.
|
|
399
399
|
|
|
400
400
|
==============================================================================
|
|
401
|
-
Components: @bendyline/squisq-editor-react@2.
|
|
401
|
+
Components: @bendyline/squisq-editor-react@2.7.0, @bendyline/squisq-formats@2.4.1, @bendyline/squisq-react@2.7.0, @bendyline/squisq-video-react@2.3.2, @bendyline/squisq-video@2.2.11, @bendyline/squisq@2.7.0
|
|
402
402
|
Source files: node_modules/@bendyline/squisq-editor-react/LICENSE, node_modules/@bendyline/squisq-formats/LICENSE, node_modules/@bendyline/squisq-react/LICENSE, node_modules/@bendyline/squisq-video-react/LICENSE, node_modules/@bendyline/squisq-video/LICENSE, node_modules/@bendyline/squisq/LICENSE
|
|
403
403
|
==============================================================================
|
|
404
404
|
MIT License
|
|
@@ -564,7 +564,7 @@ The above copyright notice and this permission notice shall be included in all c
|
|
|
564
564
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
565
565
|
|
|
566
566
|
==============================================================================
|
|
567
|
-
Components: @bendyline/squisq-editor-react@2.
|
|
567
|
+
Components: @bendyline/squisq-editor-react@2.7.0
|
|
568
568
|
Source files: node_modules/@bendyline/squisq-editor-react/NOTICE.md
|
|
569
569
|
==============================================================================
|
|
570
570
|
# Third-Party Notices for @bendyline/squisq-editor-react
|
|
@@ -611,7 +611,7 @@ Exact third-party license texts for the bundled adapter, loader, state helper,
|
|
|
611
611
|
and Font Awesome assets are shipped in THIRD_PARTY_LICENSES.txt.
|
|
612
612
|
|
|
613
613
|
==============================================================================
|
|
614
|
-
Components: @bendyline/squisq-editor-react@2.
|
|
614
|
+
Components: @bendyline/squisq-editor-react@2.7.0, @tiptap/core@2.27.2, @tiptap/extension-blockquote@2.27.2, @tiptap/extension-bold@2.27.2, @tiptap/extension-bubble-menu@2.27.2, @tiptap/extension-bullet-list@2.27.2, @tiptap/extension-code-block@2.27.2, @tiptap/extension-code@2.27.2, @tiptap/extension-document@2.27.2, @tiptap/extension-dropcursor@2.27.2, @tiptap/extension-floating-menu@2.27.2, @tiptap/extension-gapcursor@2.27.2, @tiptap/extension-hard-break@2.27.2, @tiptap/extension-heading@2.27.2, @tiptap/extension-history@2.27.2, @tiptap/extension-horizontal-rule@2.27.2, @tiptap/extension-image@2.27.2, @tiptap/extension-italic@2.27.2, @tiptap/extension-link@2.27.2, @tiptap/extension-list-item@2.27.2, @tiptap/extension-mention@2.27.2, @tiptap/extension-ordered-list@2.27.2, @tiptap/extension-paragraph@2.27.2, @tiptap/extension-placeholder@2.27.2, @tiptap/extension-strike@2.27.2, @tiptap/extension-table-cell@2.27.2, @tiptap/extension-table-header@2.27.2, @tiptap/extension-table-row@2.27.2, @tiptap/extension-table@2.27.2, @tiptap/extension-task-item@2.27.2, @tiptap/extension-task-list@2.27.2, @tiptap/extension-text-style@2.27.2, @tiptap/extension-text@2.27.2, @tiptap/pm@2.27.2, @tiptap/react@2.27.2, @tiptap/starter-kit@2.27.2, @tiptap/suggestion@2.27.2
|
|
615
615
|
Source files: node_modules/@bendyline/squisq-editor-react/THIRD_PARTY_LICENSES.txt
|
|
616
616
|
==============================================================================
|
|
617
617
|
THIRD-PARTY LICENSES FOR @bendyline/squisq-editor-react
|
|
@@ -884,7 +884,7 @@ The above copyright notice and this permission notice shall be included in all c
|
|
|
884
884
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
885
885
|
|
|
886
886
|
==============================================================================
|
|
887
|
-
Components: @bendyline/squisq-formats@2.
|
|
887
|
+
Components: @bendyline/squisq-formats@2.4.1
|
|
888
888
|
Source files: node_modules/@bendyline/squisq-formats/NOTICE.md
|
|
889
889
|
==============================================================================
|
|
890
890
|
# Third-Party Notices for @bendyline/squisq-formats
|
|
@@ -909,7 +909,7 @@ texts for these dependencies are included in their respective npm
|
|
|
909
909
|
distributions and source repositories.
|
|
910
910
|
|
|
911
911
|
==============================================================================
|
|
912
|
-
Components: @bendyline/squisq-formats@2.
|
|
912
|
+
Components: @bendyline/squisq-formats@2.4.1
|
|
913
913
|
Source files: node_modules/@bendyline/squisq-formats/THIRD_PARTY_LICENSES.txt
|
|
914
914
|
==============================================================================
|
|
915
915
|
THIRD-PARTY LICENSES FOR @bendyline/squisq-formats
|
|
@@ -1091,7 +1091,7 @@ Awesome, nor vice versa. **Please do not use brand logos for any purpose except
|
|
|
1091
1091
|
to represent the company, product, or service to which they refer.**
|
|
1092
1092
|
|
|
1093
1093
|
==============================================================================
|
|
1094
|
-
Components: @bendyline/squisq-react@2.
|
|
1094
|
+
Components: @bendyline/squisq-react@2.7.0
|
|
1095
1095
|
Source files: node_modules/@bendyline/squisq-react/NOTICE.md
|
|
1096
1096
|
==============================================================================
|
|
1097
1097
|
# Third-Party Notices for @bendyline/squisq-react
|
|
@@ -1116,7 +1116,7 @@ third-party license texts for the complete standalone bundle graph are shipped
|
|
|
1116
1116
|
in THIRD_PARTY_LICENSES.txt.
|
|
1117
1117
|
|
|
1118
1118
|
==============================================================================
|
|
1119
|
-
Components: @bendyline/squisq-react@2.
|
|
1119
|
+
Components: @bendyline/squisq-react@2.7.0
|
|
1120
1120
|
Source files: node_modules/@bendyline/squisq-react/THIRD_PARTY_LICENSES.txt
|
|
1121
1121
|
==============================================================================
|
|
1122
1122
|
THIRD-PARTY LICENSES FOR @bendyline/squisq-react
|
|
@@ -5589,7 +5589,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
|
5589
5589
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
5590
5590
|
|
|
5591
5591
|
==============================================================================
|
|
5592
|
-
Components: @bendyline/squisq-video-react@2.2
|
|
5592
|
+
Components: @bendyline/squisq-video-react@2.3.2, @ffmpeg/core@0.12.9
|
|
5593
5593
|
Source files: node_modules/@bendyline/squisq-video-react/COPYING.GPL-2.0.txt
|
|
5594
5594
|
==============================================================================
|
|
5595
5595
|
GNU GENERAL PUBLIC LICENSE
|
|
@@ -5932,7 +5932,7 @@ library. If this is what you want to do, use the GNU Lesser General
|
|
|
5932
5932
|
Public License instead of this License.
|
|
5933
5933
|
|
|
5934
5934
|
==============================================================================
|
|
5935
|
-
Components: @bendyline/squisq-video-react@2.2
|
|
5935
|
+
Components: @bendyline/squisq-video-react@2.3.2, @ffmpeg/core@0.12.9
|
|
5936
5936
|
Source files: node_modules/@bendyline/squisq-video-react/NOTICE.md
|
|
5937
5937
|
==============================================================================
|
|
5938
5938
|
# Third-Party Notices for @bendyline/squisq-video-react
|
|
@@ -5977,7 +5977,7 @@ global WebCodecs declaration dependencies are not installed for consumers. Its
|
|
|
5977
5977
|
exact license text is shipped in THIRD_PARTY_LICENSES.txt.
|
|
5978
5978
|
|
|
5979
5979
|
==============================================================================
|
|
5980
|
-
Components: @bendyline/squisq-video-react@2.2
|
|
5980
|
+
Components: @bendyline/squisq-video-react@2.3.2, @ffmpeg/core@0.12.9, @ffmpeg/ffmpeg@0.12.15, @ffmpeg/types@0.12.4, @ffmpeg/util@0.12.2
|
|
5981
5981
|
Source files: node_modules/@bendyline/squisq-video-react/THIRD_PARTY_LICENSES.txt
|
|
5982
5982
|
==============================================================================
|
|
5983
5983
|
THIRD-PARTY LICENSES FOR @bendyline/squisq-video-react
|
|
@@ -6041,7 +6041,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
6041
6041
|
SOFTWARE.
|
|
6042
6042
|
|
|
6043
6043
|
==============================================================================
|
|
6044
|
-
Components: @bendyline/squisq-video@2.2.
|
|
6044
|
+
Components: @bendyline/squisq-video@2.2.11
|
|
6045
6045
|
Source files: node_modules/@bendyline/squisq-video/NOTICE.md
|
|
6046
6046
|
==============================================================================
|
|
6047
6047
|
# Third-Party Notices for @bendyline/squisq-video
|
|
@@ -6066,7 +6066,7 @@ Copyright and complete license texts for the listed dependencies are included
|
|
|
6066
6066
|
in their respective npm distributions and source repositories.
|
|
6067
6067
|
|
|
6068
6068
|
==============================================================================
|
|
6069
|
-
Components: @bendyline/squisq-video@2.2.
|
|
6069
|
+
Components: @bendyline/squisq-video@2.2.11
|
|
6070
6070
|
Source files: node_modules/@bendyline/squisq-video/THIRD_PARTY_LICENSES.txt
|
|
6071
6071
|
==============================================================================
|
|
6072
6072
|
THIRD-PARTY LICENSES FOR @bendyline/squisq-video
|
|
@@ -6078,7 +6078,7 @@ repository license, the pinned upstream copy is vendored and identified below.
|
|
|
6078
6078
|
COMPONENTS
|
|
6079
6079
|
|
|
6080
6080
|
==============================================================================
|
|
6081
|
-
Components: @bendyline/squisq@2.
|
|
6081
|
+
Components: @bendyline/squisq@2.7.0
|
|
6082
6082
|
Source files: node_modules/@bendyline/squisq/NOTICE.md
|
|
6083
6083
|
==============================================================================
|
|
6084
6084
|
# Third-Party Notices for @bendyline/squisq
|
|
@@ -6109,7 +6109,7 @@ third-party license texts for bundled code and data are shipped in
|
|
|
6109
6109
|
THIRD_PARTY_LICENSES.txt.
|
|
6110
6110
|
|
|
6111
6111
|
==============================================================================
|
|
6112
|
-
Components: @bendyline/squisq@2.
|
|
6112
|
+
Components: @bendyline/squisq@2.7.0
|
|
6113
6113
|
Source files: node_modules/@bendyline/squisq/THIRD_PARTY_LICENSES.txt
|
|
6114
6114
|
==============================================================================
|
|
6115
6115
|
THIRD-PARTY LICENSES FOR @bendyline/squisq
|
|
@@ -43,7 +43,7 @@ var ShareDialog = lazy(
|
|
|
43
43
|
);
|
|
44
44
|
var runExportModulePromise = null;
|
|
45
45
|
function loadRunExportModule() {
|
|
46
|
-
runExportModulePromise ?? (runExportModulePromise = import("./run-export-
|
|
46
|
+
runExportModulePromise ?? (runExportModulePromise = import("./run-export-I2XOVGG4.js"));
|
|
47
47
|
return runExportModulePromise;
|
|
48
48
|
}
|
|
49
49
|
var ExportCancelledError = class extends Error {
|
|
@@ -76,6 +76,7 @@ function loadVideoExportModules() {
|
|
|
76
76
|
]).then(([docModule, videoModule, playerModule]) => ({
|
|
77
77
|
Modal: videoModule.VideoExportModal,
|
|
78
78
|
markdownToDoc: docModule.markdownToDoc,
|
|
79
|
+
resolveAudioMapping: docModule.resolveAudioMapping,
|
|
79
80
|
playerScript: playerModule.PLAYER_BUNDLE
|
|
80
81
|
})));
|
|
81
82
|
return videoExportModulesPromise;
|
|
@@ -115,6 +116,7 @@ function quickLabel(opts, transformSummaries, saveMode, destinationPath) {
|
|
|
115
116
|
function ExportToolbarControls({
|
|
116
117
|
selectedFile,
|
|
117
118
|
mediaContainer,
|
|
119
|
+
workspaceContainer,
|
|
118
120
|
mediaProvider,
|
|
119
121
|
saveBlob,
|
|
120
122
|
destinationAdapter,
|
|
@@ -264,14 +266,16 @@ function ExportToolbarControls({
|
|
|
264
266
|
try {
|
|
265
267
|
const modules = videoModules ?? await loadVideoExportModules();
|
|
266
268
|
setVideoModules(modules);
|
|
267
|
-
|
|
269
|
+
const parsedDoc = modules.markdownToDoc(parseMarkdown(markdownSource));
|
|
270
|
+
const exportDoc = workspaceContainer ? await modules.resolveAudioMapping(parsedDoc, workspaceContainer) : parsedDoc;
|
|
271
|
+
setVideoDoc(exportDoc);
|
|
268
272
|
} catch {
|
|
269
273
|
setVideoLoadError("Video export could not be loaded.");
|
|
270
274
|
} finally {
|
|
271
275
|
setVideoLoading(false);
|
|
272
276
|
}
|
|
273
277
|
},
|
|
274
|
-
[markdownSource, videoModules]
|
|
278
|
+
[markdownSource, videoModules, workspaceContainer]
|
|
275
279
|
);
|
|
276
280
|
const handleCloseVideoModal = useCallback(() => {
|
|
277
281
|
setVideoModalOpen(false);
|
|
@@ -471,7 +475,7 @@ function ExportToolbarControls({
|
|
|
471
475
|
tabIndex: -1,
|
|
472
476
|
className: "db-toolbar-menu-item",
|
|
473
477
|
onClick: handleOpenDialog,
|
|
474
|
-
children: "Export..."
|
|
478
|
+
children: "Export document..."
|
|
475
479
|
}
|
|
476
480
|
),
|
|
477
481
|
/* @__PURE__ */ jsx(
|
|
@@ -106,6 +106,7 @@ async function runHtmlExport(markdown, htmlFilename, options, mediaContainer, se
|
|
|
106
106
|
title: baseName,
|
|
107
107
|
themeId,
|
|
108
108
|
mode: "static",
|
|
109
|
+
showCodeCopyButton: true,
|
|
109
110
|
entryAsIndex: options.entryAsIndex
|
|
110
111
|
});
|
|
111
112
|
await saveExportBlob(blob2, zipName, saveBlob);
|
|
@@ -138,7 +139,8 @@ async function runHtmlExport(markdown, htmlFilename, options, mediaContainer, se
|
|
|
138
139
|
playerScript: PLAYER_BUNDLE,
|
|
139
140
|
images,
|
|
140
141
|
mode: "static",
|
|
141
|
-
title: baseName
|
|
142
|
+
title: baseName,
|
|
143
|
+
showCodeCopyButton: true
|
|
142
144
|
});
|
|
143
145
|
await saveExportBlob(blob, zipName, saveBlob);
|
|
144
146
|
return;
|
|
@@ -147,7 +149,8 @@ async function runHtmlExport(markdown, htmlFilename, options, mediaContainer, se
|
|
|
147
149
|
playerScript: PLAYER_BUNDLE,
|
|
148
150
|
images,
|
|
149
151
|
mode: "static",
|
|
150
|
-
title: baseName
|
|
152
|
+
title: baseName,
|
|
153
|
+
showCodeCopyButton: true
|
|
151
154
|
});
|
|
152
155
|
await saveExportBlob(new Blob([html2], { type: MIME_TYPES.html }), singleHtmlFilename, saveBlob);
|
|
153
156
|
return;
|
package/dist/export/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import { FileSystemProvider, FileSystemEntry, FsErrorCode } from '@bendyline/docblocks/filesystem';
|
|
3
3
|
import { WorkspaceDescriptor } from '@bendyline/docblocks/workspace';
|
|
4
4
|
import { EditorColorScheme } from '@bendyline/squisq-editor-react';
|
|
5
|
+
import { CodeBlockCopyHandler } from '@bendyline/squisq-react';
|
|
5
6
|
import { FfmpegWasmLoadConfig } from '@bendyline/squisq-video';
|
|
6
7
|
import { PrunePolicy, SaveVersionResult, DocumentVersionManager } from '@bendyline/squisq/versions';
|
|
7
8
|
import { ThemePreference, AccentColor, WriteCanvasPreferences } from './settings/index.js';
|
|
@@ -286,13 +287,26 @@ interface DocBlocksShellProps {
|
|
|
286
287
|
onApplyUpdate?: () => void;
|
|
287
288
|
/** Host-supplied content rendered at the right edge of the editor status bar. */
|
|
288
289
|
statusBarSlotRight?: React.ReactNode;
|
|
290
|
+
/** Show Copy controls on ordinary fenced code blocks (default: true). */
|
|
291
|
+
showCodeCopyButton?: boolean;
|
|
292
|
+
/**
|
|
293
|
+
* Optional host clipboard adapter. Browser hosts can omit this to use the
|
|
294
|
+
* Clipboard API; Electron/native hosts should supply their trusted bridge.
|
|
295
|
+
*/
|
|
296
|
+
onCopyCode?: CodeBlockCopyHandler;
|
|
297
|
+
/** Whether the editor may expose microphone, camera, and screen recording. */
|
|
298
|
+
allowRecording?: boolean;
|
|
299
|
+
/** Whether presentation may open a synchronized audience window. */
|
|
300
|
+
allowPresentationWindow?: boolean;
|
|
301
|
+
/** Whether presentation may enter the browser/Electron Fullscreen API. */
|
|
302
|
+
allowPresentationFullscreen?: boolean;
|
|
289
303
|
/**
|
|
290
304
|
* True once the app has been fully cached for offline use (browser PWA
|
|
291
305
|
* hosts). Shown to the user once as a passive notice.
|
|
292
306
|
*/
|
|
293
307
|
offlineReady?: boolean;
|
|
294
308
|
}
|
|
295
|
-
declare function DocBlocksShell({ theme: hostTheme, logoUrl, issueReportVersion, appBuildDate, ffmpegWasm, homeDocumentTitle, homeDocumentPath, allowVersioning, versionBasename, versioningPrunePolicy, versioningAutoSaveIdleMs, onSaveVersion, versioningRef, updateAvailable, onApplyUpdate, statusBarSlotRight, offlineReady, }: DocBlocksShellProps): react_jsx_runtime.JSX.Element;
|
|
309
|
+
declare function DocBlocksShell({ theme: hostTheme, logoUrl, issueReportVersion, appBuildDate, ffmpegWasm, homeDocumentTitle, homeDocumentPath, allowVersioning, versionBasename, versioningPrunePolicy, versioningAutoSaveIdleMs, onSaveVersion, versioningRef, updateAvailable, onApplyUpdate, statusBarSlotRight, showCodeCopyButton, onCopyCode, allowRecording, allowPresentationWindow, allowPresentationFullscreen, offlineReady, }: DocBlocksShellProps): react_jsx_runtime.JSX.Element;
|
|
296
310
|
|
|
297
311
|
/**
|
|
298
312
|
* Versioning preferences — global default + per-workspace resolution.
|
|
@@ -367,6 +381,12 @@ interface ExportToolbarControlsProps {
|
|
|
367
381
|
selectedFile: string | null;
|
|
368
382
|
/** Media container for resolving images during export. */
|
|
369
383
|
mediaContainer?: ContentContainer | null;
|
|
384
|
+
/**
|
|
385
|
+
* Document-scoped container used to resolve narration timing sidecars.
|
|
386
|
+
* Video preview and export must use the same audio-mapping projection so
|
|
387
|
+
* recorded narration, camera media, and block transitions share one clock.
|
|
388
|
+
*/
|
|
389
|
+
workspaceContainer?: ContentContainer | null;
|
|
370
390
|
/** Active document media provider used to preload audio and video export assets. */
|
|
371
391
|
mediaProvider?: MediaProvider | null;
|
|
372
392
|
/** Override the default browser download behavior for host-provided save flows. */
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
} from "./chunk-SIIEGOHY.js";
|
|
37
37
|
import {
|
|
38
38
|
runExport
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-ODYNOPC3.js";
|
|
40
40
|
import {
|
|
41
41
|
createBrowserSaveAsAdapter
|
|
42
42
|
} from "./chunk-UMEDHMT7.js";
|
|
@@ -3154,7 +3154,7 @@ function useDocumentSession(autoSaveDelayMs = 500) {
|
|
|
3154
3154
|
import { lazy, Suspense } from "react";
|
|
3155
3155
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
3156
3156
|
var ExportToolbarControlsImplementation = lazy(
|
|
3157
|
-
() => import("./ExportToolbarControls-
|
|
3157
|
+
() => import("./ExportToolbarControls-N3TCL5DD.js").then((module) => ({
|
|
3158
3158
|
default: module.ExportToolbarControls
|
|
3159
3159
|
}))
|
|
3160
3160
|
);
|
|
@@ -4953,6 +4953,11 @@ function DocBlocksShell({
|
|
|
4953
4953
|
updateAvailable = false,
|
|
4954
4954
|
onApplyUpdate,
|
|
4955
4955
|
statusBarSlotRight,
|
|
4956
|
+
showCodeCopyButton = true,
|
|
4957
|
+
onCopyCode,
|
|
4958
|
+
allowRecording = true,
|
|
4959
|
+
allowPresentationWindow = true,
|
|
4960
|
+
allowPresentationFullscreen = true,
|
|
4956
4961
|
offlineReady = false
|
|
4957
4962
|
}) {
|
|
4958
4963
|
const osTheme = useOsTheme();
|
|
@@ -7912,6 +7917,11 @@ function DocBlocksShell({
|
|
|
7912
7917
|
placeholder: editorPlaceholder,
|
|
7913
7918
|
outlineWidth: 280,
|
|
7914
7919
|
mediaProvider,
|
|
7920
|
+
showCodeCopyButton,
|
|
7921
|
+
onCopyCode,
|
|
7922
|
+
allowRecording,
|
|
7923
|
+
allowPresentationWindow,
|
|
7924
|
+
allowPresentationFullscreen,
|
|
7915
7925
|
documentLinkProvider,
|
|
7916
7926
|
workspaceContainer: versionsContainer ?? void 0,
|
|
7917
7927
|
allowVersioning: effectiveVersioning,
|
|
@@ -7948,6 +7958,7 @@ function DocBlocksShell({
|
|
|
7948
7958
|
{
|
|
7949
7959
|
selectedFile,
|
|
7950
7960
|
mediaContainer: mediaContainerRef.current,
|
|
7961
|
+
workspaceContainer: versionsContainer,
|
|
7951
7962
|
mediaProvider,
|
|
7952
7963
|
destinationAdapter: exportDestinationAdapter,
|
|
7953
7964
|
colorScheme: resolvedTheme,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bendyline/docblocks-react",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.3",
|
|
4
4
|
"description": "React components for DocBlocks — file explorer, workspace picker, and editor shell",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bendyline",
|
|
@@ -75,13 +75,13 @@
|
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@bendyline/docblocks": "2.3.
|
|
79
|
-
"@bendyline/squisq": "2.
|
|
80
|
-
"@bendyline/squisq-editor-react": "2.
|
|
81
|
-
"@bendyline/squisq-formats": "2.
|
|
82
|
-
"@bendyline/squisq-react": "2.
|
|
83
|
-
"@bendyline/squisq-video": "2.2.
|
|
84
|
-
"@bendyline/squisq-video-react": "2.2
|
|
78
|
+
"@bendyline/docblocks": "2.3.3",
|
|
79
|
+
"@bendyline/squisq": "2.7.0",
|
|
80
|
+
"@bendyline/squisq-editor-react": "2.7.0",
|
|
81
|
+
"@bendyline/squisq-formats": "2.4.1",
|
|
82
|
+
"@bendyline/squisq-react": "2.7.0",
|
|
83
|
+
"@bendyline/squisq-video": "2.2.11",
|
|
84
|
+
"@bendyline/squisq-video-react": "2.3.2"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
87
|
"@happy-dom/global-registrator": "20.9.0",
|
package/src/styles/docblocks.css
CHANGED
|
@@ -1349,13 +1349,22 @@ body.db-resizing-sidebar * {
|
|
|
1349
1349
|
}
|
|
1350
1350
|
}
|
|
1351
1351
|
|
|
1352
|
+
/* Squisq's status bar leaves line-height at `normal`, so its height depends on
|
|
1353
|
+
the installed UI font's metrics — 16px on Segoe UI, 14px on the Linux CI
|
|
1354
|
+
stack. The footer below pins itself to a fixed height, so an unpinned status
|
|
1355
|
+
bar makes their shared top border jog by 2px on some platforms. Pin the line
|
|
1356
|
+
box here so both chrome regions are 25px everywhere. */
|
|
1357
|
+
.db-shell .squisq-status-bar {
|
|
1358
|
+
line-height: 16px;
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1352
1361
|
.db-shell-sidebar-footer {
|
|
1353
1362
|
box-sizing: border-box;
|
|
1354
1363
|
display: flex;
|
|
1355
1364
|
align-items: center;
|
|
1356
1365
|
gap: 6px;
|
|
1357
|
-
/* Match
|
|
1358
|
-
height:
|
|
1366
|
+
/* Match the status bar's pinned line box + 8px vertical padding + 1px border. */
|
|
1367
|
+
height: 25px;
|
|
1359
1368
|
padding: 0 12px 0 18px;
|
|
1360
1369
|
border-top: 1px solid var(--db-border-strong);
|
|
1361
1370
|
flex-shrink: 0;
|
|
@@ -2816,6 +2825,10 @@ body.db-resizing-sidebar * {
|
|
|
2816
2825
|
--squisq-accent: var(--db-accent);
|
|
2817
2826
|
--squisq-accent-hover: var(--db-accent-hover);
|
|
2818
2827
|
--squisq-text-on-accent: var(--db-text-on-accent);
|
|
2828
|
+
/* Hover/open surface for toolbar dropdown triggers (e.g. the cover-slide
|
|
2829
|
+
control). Squisq leaves this token undefined and falls back to its own
|
|
2830
|
+
palette; bind it so the open trigger keeps DocBlocks hover contrast. */
|
|
2831
|
+
--squisq-hover-bg: var(--db-bg-hover);
|
|
2819
2832
|
--squisq-editor-background: #ffffff;
|
|
2820
2833
|
--squisq-editor-foreground: #1f2937;
|
|
2821
2834
|
}
|
|
@@ -3033,7 +3046,7 @@ body.db-resizing-sidebar * {
|
|
|
3033
3046
|
|
|
3034
3047
|
.db-shell[data-theme='dark'] .squisq-editor-shell[data-theme='dark'] .squisq-status-bar {
|
|
3035
3048
|
background: var(--db-bg-subtle);
|
|
3036
|
-
border-top-color: var(--db-border);
|
|
3049
|
+
border-top-color: var(--db-border-strong);
|
|
3037
3050
|
}
|
|
3038
3051
|
|
|
3039
3052
|
.db-shell[data-theme='dark'] .squisq-image-viewer--dark,
|
|
@@ -3725,6 +3738,26 @@ html:has(.db-shell) .squisq-use-mode-menu .squisq-use-mode-menu-check {
|
|
|
3725
3738
|
color: var(--db-accent-hover);
|
|
3726
3739
|
}
|
|
3727
3740
|
|
|
3741
|
+
/* The cover-slide settings menu is portaled to document.body, so the editor
|
|
3742
|
+
shell's Squisq token bindings cannot reach it. It channels every surface
|
|
3743
|
+
through its own `--cover-*` tokens; re-point those (plus the accent its
|
|
3744
|
+
checkbox/radio/slider controls consume) at the palette hoisted to `html`
|
|
3745
|
+
so the panel follows the active DocBlocks appearance and accent instead
|
|
3746
|
+
of Squisq's standalone slate look. */
|
|
3747
|
+
html:has(.db-shell) .squisq-cover-slide-menu {
|
|
3748
|
+
--cover-bg: var(--db-bg);
|
|
3749
|
+
--cover-control: var(--db-bg-subtle);
|
|
3750
|
+
--cover-border: var(--db-border);
|
|
3751
|
+
--cover-text: var(--db-text);
|
|
3752
|
+
--cover-muted: var(--db-text-muted);
|
|
3753
|
+
--squisq-accent: var(--db-accent);
|
|
3754
|
+
--squisq-accent-hover: var(--db-accent-hover);
|
|
3755
|
+
--squisq-text-on-accent: var(--db-text-on-accent);
|
|
3756
|
+
box-shadow:
|
|
3757
|
+
0 12px 32px var(--db-shadow),
|
|
3758
|
+
0 2px 6px var(--db-shadow);
|
|
3759
|
+
}
|
|
3760
|
+
|
|
3728
3761
|
/* Custom layout authoring is portaled to document.body. Bind its host-facing
|
|
3729
3762
|
accent tokens at that portal boundary so selected layouts, palette states,
|
|
3730
3763
|
primary actions, and focus rings follow the active DocBlocks accent instead
|
|
@@ -4417,7 +4450,7 @@ html:has(.db-shell[data-theme='dark'])
|
|
|
4417
4450
|
|
|
4418
4451
|
.db-shell[data-theme='light'] .squisq-editor-shell[data-theme='light'] .squisq-status-bar {
|
|
4419
4452
|
background: var(--db-accent-tint-strong);
|
|
4420
|
-
border-top-color: var(--db-border);
|
|
4453
|
+
border-top-color: var(--db-border-strong);
|
|
4421
4454
|
}
|
|
4422
4455
|
|
|
4423
4456
|
/* Status bar "✓ OK" indicator — squisq paints this in saturated emerald
|
|
@@ -5557,8 +5590,7 @@ button.db-git-file-row:hover {
|
|
|
5557
5590
|
/* The first shell row replaces the native titlebar. Empty space can drag
|
|
5558
5591
|
the window; every interactive descendant opts back out below. */
|
|
5559
5592
|
.db-shell .db-shell-sidebar-header,
|
|
5560
|
-
.db-shell .squisq-
|
|
5561
|
-
.db-shell .squisq-editor-header--image {
|
|
5593
|
+
.db-shell .squisq-editor-header {
|
|
5562
5594
|
app-region: drag;
|
|
5563
5595
|
-webkit-app-region: drag;
|
|
5564
5596
|
box-sizing: border-box;
|
|
@@ -5566,6 +5598,14 @@ button.db-git-file-row:hover {
|
|
|
5566
5598
|
min-height: var(--db-wco-titlebar-height);
|
|
5567
5599
|
}
|
|
5568
5600
|
|
|
5601
|
+
.db-shell .squisq-toolbar {
|
|
5602
|
+
app-region: drag;
|
|
5603
|
+
-webkit-app-region: drag;
|
|
5604
|
+
box-sizing: border-box;
|
|
5605
|
+
height: 100%;
|
|
5606
|
+
min-height: 0;
|
|
5607
|
+
}
|
|
5608
|
+
|
|
5569
5609
|
.db-shell .db-shell-sidebar-header {
|
|
5570
5610
|
padding-block: 0;
|
|
5571
5611
|
padding-left: max(4px, calc(env(titlebar-area-x, 0px) + 4px));
|