@bendyline/docblocks-react 2.3.1 → 2.3.2

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.
@@ -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
- setVideoDoc(modules.markdownToDoc(parseMarkdown(markdownSource)));
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(
package/dist/index.d.ts CHANGED
@@ -367,6 +367,12 @@ interface ExportToolbarControlsProps {
367
367
  selectedFile: string | null;
368
368
  /** Media container for resolving images during export. */
369
369
  mediaContainer?: ContentContainer | null;
370
+ /**
371
+ * Document-scoped container used to resolve narration timing sidecars.
372
+ * Video preview and export must use the same audio-mapping projection so
373
+ * recorded narration, camera media, and block transitions share one clock.
374
+ */
375
+ workspaceContainer?: ContentContainer | null;
370
376
  /** Active document media provider used to preload audio and video export assets. */
371
377
  mediaProvider?: MediaProvider | null;
372
378
  /** Override the default browser download behavior for host-provided save flows. */
package/dist/index.js CHANGED
@@ -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-I2EX7ZTH.js").then((module) => ({
3157
+ () => import("./ExportToolbarControls-5D4R6UXA.js").then((module) => ({
3158
3158
  default: module.ExportToolbarControls
3159
3159
  }))
3160
3160
  );
@@ -7948,6 +7948,7 @@ function DocBlocksShell({
7948
7948
  {
7949
7949
  selectedFile,
7950
7950
  mediaContainer: mediaContainerRef.current,
7951
+ workspaceContainer: versionsContainer,
7951
7952
  mediaProvider,
7952
7953
  destinationAdapter: exportDestinationAdapter,
7953
7954
  colorScheme: resolvedTheme,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bendyline/docblocks-react",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
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.1",
79
- "@bendyline/squisq": "2.4.4",
80
- "@bendyline/squisq-editor-react": "2.4.7",
81
- "@bendyline/squisq-formats": "2.3.9",
82
- "@bendyline/squisq-react": "2.4.7",
83
- "@bendyline/squisq-video": "2.2.8",
84
- "@bendyline/squisq-video-react": "2.2.11"
78
+ "@bendyline/docblocks": "2.3.2",
79
+ "@bendyline/squisq": "2.5.0",
80
+ "@bendyline/squisq-editor-react": "2.5.0",
81
+ "@bendyline/squisq-formats": "2.3.10",
82
+ "@bendyline/squisq-react": "2.5.0",
83
+ "@bendyline/squisq-video": "2.2.9",
84
+ "@bendyline/squisq-video-react": "2.3.0"
85
85
  },
86
86
  "devDependencies": {
87
87
  "@happy-dom/global-registrator": "20.9.0",
@@ -2816,6 +2816,10 @@ body.db-resizing-sidebar * {
2816
2816
  --squisq-accent: var(--db-accent);
2817
2817
  --squisq-accent-hover: var(--db-accent-hover);
2818
2818
  --squisq-text-on-accent: var(--db-text-on-accent);
2819
+ /* Hover/open surface for toolbar dropdown triggers (e.g. the cover-slide
2820
+ control). Squisq leaves this token undefined and falls back to its own
2821
+ palette; bind it so the open trigger keeps DocBlocks hover contrast. */
2822
+ --squisq-hover-bg: var(--db-bg-hover);
2819
2823
  --squisq-editor-background: #ffffff;
2820
2824
  --squisq-editor-foreground: #1f2937;
2821
2825
  }
@@ -3725,6 +3729,26 @@ html:has(.db-shell) .squisq-use-mode-menu .squisq-use-mode-menu-check {
3725
3729
  color: var(--db-accent-hover);
3726
3730
  }
3727
3731
 
3732
+ /* The cover-slide settings menu is portaled to document.body, so the editor
3733
+ shell's Squisq token bindings cannot reach it. It channels every surface
3734
+ through its own `--cover-*` tokens; re-point those (plus the accent its
3735
+ checkbox/radio/slider controls consume) at the palette hoisted to `html`
3736
+ so the panel follows the active DocBlocks appearance and accent instead
3737
+ of Squisq's standalone slate look. */
3738
+ html:has(.db-shell) .squisq-cover-slide-menu {
3739
+ --cover-bg: var(--db-bg);
3740
+ --cover-control: var(--db-bg-subtle);
3741
+ --cover-border: var(--db-border);
3742
+ --cover-text: var(--db-text);
3743
+ --cover-muted: var(--db-text-muted);
3744
+ --squisq-accent: var(--db-accent);
3745
+ --squisq-accent-hover: var(--db-accent-hover);
3746
+ --squisq-text-on-accent: var(--db-text-on-accent);
3747
+ box-shadow:
3748
+ 0 12px 32px var(--db-shadow),
3749
+ 0 2px 6px var(--db-shadow);
3750
+ }
3751
+
3728
3752
  /* Custom layout authoring is portaled to document.body. Bind its host-facing
3729
3753
  accent tokens at that portal boundary so selected layouts, palette states,
3730
3754
  primary actions, and focus rings follow the active DocBlocks accent instead