@bendyline/docblocks-react 2.7.0 → 2.7.1
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/THIRD_PARTY_NOTICES.txt +17 -17
- package/dist/{AiDiagrams-XWOM3YZX.js → AiDiagrams-LFV4YU6W.js} +2 -2
- package/dist/{AiEditorAssistant-M4LI2CRY.js → AiEditorAssistant-GN2KXKZD.js} +21 -6
- package/dist/{ExportDialog-L6FG6W3H.js → ExportDialog-IMBVGRYG.js} +1 -1
- package/dist/{ExportToolbarControls-BRCPZ7H3.js → ExportToolbarControls-MUM6HM3K.js} +14 -12
- package/dist/{GitToolbarControl-J4UYZDV6.js → GitToolbarControl-B7KG4MFP.js} +4 -4
- package/dist/{GitUI-LZW3IUXO.js → GitUI-RCWUZVS6.js} +2 -2
- package/dist/{PresentationMaker-622NHMIN.js → PresentationMaker-W2JIBHRN.js} +2 -2
- package/dist/ShareDialog-XUA2OVGI.js +292 -0
- package/dist/{SpeechToolbarControl-UZQKGQWD.js → SpeechToolbarControl-OSQS7NVY.js} +1 -1
- package/dist/{WorkspaceSearchPanel-OUQQ5DOM.js → WorkspaceSearchPanel-BKZJRPMY.js} +7 -1
- package/dist/{chunk-SGQKTKDX.js → chunk-BD54Z5XP.js} +10 -1
- package/dist/{chunk-MMOTEQK6.js → chunk-EPOLZNFD.js} +1 -1
- package/dist/{chunk-MRUK56JS.js → chunk-GMA4KGGO.js} +7 -3
- package/dist/{chunk-5OZBGIIT.js → chunk-NAH52736.js} +86 -28
- package/dist/{chunk-YS4HVWIO.js → chunk-SPUPWCSI.js} +49 -1
- package/dist/{chunk-Q5ZVP5LV.js → chunk-W55E6TE2.js} +13 -10
- package/dist/{chunk-OINKNX26.js → chunk-X3DDTJKR.js} +1 -1
- package/dist/editor.js +2 -2
- package/dist/export/index.js +1 -1
- package/dist/index.js +66 -60
- package/dist/proofing/index.js +11 -1
- package/dist/settings/index.js +1 -1
- package/package.json +6 -6
- package/src/styles/docblocks.css +16 -5
- package/dist/ShareDialog-N7GPM4SB.js +0 -310
package/dist/editor.js
CHANGED
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
} from "./chunk-G4MFB3IO.js";
|
|
12
12
|
import {
|
|
13
13
|
PresentationMaker
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-EPOLZNFD.js";
|
|
15
|
+
import "./chunk-NAH52736.js";
|
|
16
16
|
import "./chunk-K4I3NJFL.js";
|
|
17
17
|
import "./chunk-56KO2LYN.js";
|
|
18
18
|
export {
|
package/dist/export/index.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from "./chunk-2IYBBFQX.js";
|
|
23
23
|
import {
|
|
24
24
|
sharedDocumentFilename
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-SPUPWCSI.js";
|
|
26
26
|
import {
|
|
27
27
|
createBrowserSaveAsAdapter
|
|
28
28
|
} from "./chunk-UMEDHMT7.js";
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
} from "./chunk-6E635KCJ.js";
|
|
40
40
|
import {
|
|
41
41
|
useMenuKeyboard
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-GMA4KGGO.js";
|
|
43
43
|
import {
|
|
44
44
|
displayFileName,
|
|
45
45
|
renameDraft,
|
|
@@ -86,7 +86,7 @@ import {
|
|
|
86
86
|
saveProofingPreferences,
|
|
87
87
|
saveThemePreference,
|
|
88
88
|
saveWriteCanvasPreferences
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-W55E6TE2.js";
|
|
90
90
|
import {
|
|
91
91
|
FindButton,
|
|
92
92
|
findShortcutLabel,
|
|
@@ -97,12 +97,12 @@ import {
|
|
|
97
97
|
shortcutLabel,
|
|
98
98
|
useResponsivePreviewViewportPreset
|
|
99
99
|
} from "./chunk-G4MFB3IO.js";
|
|
100
|
-
import "./chunk-
|
|
101
|
-
import "./chunk-
|
|
100
|
+
import "./chunk-EPOLZNFD.js";
|
|
101
|
+
import "./chunk-NAH52736.js";
|
|
102
102
|
import "./chunk-K4I3NJFL.js";
|
|
103
103
|
import {
|
|
104
104
|
ExportDialog
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-BD54Z5XP.js";
|
|
106
106
|
import "./chunk-YBEYTVU2.js";
|
|
107
107
|
import {
|
|
108
108
|
DEFAULT_OPTIONS,
|
|
@@ -3636,7 +3636,7 @@ async function prepareHostLifecycle(session, request) {
|
|
|
3636
3636
|
}
|
|
3637
3637
|
|
|
3638
3638
|
// src/DocBlocksShell/DocBlocksShell.tsx
|
|
3639
|
-
import { useState as useState23, useCallback as useCallback18, useEffect as useEffect29, useRef as
|
|
3639
|
+
import { useState as useState23, useCallback as useCallback18, useEffect as useEffect29, useRef as useRef19, useMemo as useMemo6, lazy as lazy2, Suspense as Suspense2 } from "react";
|
|
3640
3640
|
import {
|
|
3641
3641
|
DocumentVersionManager
|
|
3642
3642
|
} from "@bendyline/squisq/versions";
|
|
@@ -4055,7 +4055,7 @@ function AppMenu({
|
|
|
4055
4055
|
}, [closeMenu, isOpen]);
|
|
4056
4056
|
const handleAction = useCallback8(
|
|
4057
4057
|
(action) => {
|
|
4058
|
-
closeMenu(
|
|
4058
|
+
closeMenu(true);
|
|
4059
4059
|
action();
|
|
4060
4060
|
},
|
|
4061
4061
|
[closeMenu]
|
|
@@ -4398,7 +4398,7 @@ function WorkspaceSettingsButton({
|
|
|
4398
4398
|
}, [closeMenu, isOpen]);
|
|
4399
4399
|
const handleAction = useCallback9(
|
|
4400
4400
|
(action) => {
|
|
4401
|
-
closeMenu(
|
|
4401
|
+
closeMenu(true);
|
|
4402
4402
|
action();
|
|
4403
4403
|
},
|
|
4404
4404
|
[closeMenu]
|
|
@@ -4896,7 +4896,7 @@ function useDocumentSession(autoSaveDelayMs = 500) {
|
|
|
4896
4896
|
import { lazy, Suspense } from "react";
|
|
4897
4897
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
4898
4898
|
var ExportToolbarControlsImplementation = lazy(
|
|
4899
|
-
() => import("./ExportToolbarControls-
|
|
4899
|
+
() => import("./ExportToolbarControls-MUM6HM3K.js").then((module) => ({
|
|
4900
4900
|
default: module.ExportToolbarControls
|
|
4901
4901
|
}))
|
|
4902
4902
|
);
|
|
@@ -6273,8 +6273,18 @@ function useKeyboardInset(enabled) {
|
|
|
6273
6273
|
}
|
|
6274
6274
|
|
|
6275
6275
|
// src/layout/useFormFactorAttributes.ts
|
|
6276
|
-
import { useEffect as useEffect23 } from "react";
|
|
6276
|
+
import { useEffect as useEffect23, useRef as useRef16 } from "react";
|
|
6277
6277
|
function useFormFactorAttributes(rootRef, formFactor, layoutMode, drawerOpen) {
|
|
6278
|
+
const published = useRef16(/* @__PURE__ */ new Map());
|
|
6279
|
+
useEffect23(() => {
|
|
6280
|
+
const owned = published.current;
|
|
6281
|
+
return () => {
|
|
6282
|
+
for (const [target, names] of owned) {
|
|
6283
|
+
for (const name of names) target.removeAttribute(name);
|
|
6284
|
+
}
|
|
6285
|
+
owned.clear();
|
|
6286
|
+
};
|
|
6287
|
+
}, []);
|
|
6278
6288
|
useEffect23(() => {
|
|
6279
6289
|
if (typeof document === "undefined") return;
|
|
6280
6290
|
const attributes = {
|
|
@@ -6286,21 +6296,17 @@ function useFormFactorAttributes(rootRef, formFactor, layoutMode, drawerOpen) {
|
|
|
6286
6296
|
const targets = [document.documentElement, rootRef.current].filter(
|
|
6287
6297
|
(node) => node !== null
|
|
6288
6298
|
);
|
|
6289
|
-
const names = Object.keys(attributes);
|
|
6290
6299
|
for (const target of targets) {
|
|
6300
|
+
const names = published.current.get(target) ?? /* @__PURE__ */ new Set();
|
|
6301
|
+
published.current.set(target, names);
|
|
6291
6302
|
for (const [name, value] of Object.entries(attributes)) {
|
|
6303
|
+
names.add(name);
|
|
6292
6304
|
if (target.getAttribute(name) !== value) target.setAttribute(name, value);
|
|
6293
6305
|
}
|
|
6294
6306
|
if (layoutMode !== "single-pane" && target.hasAttribute("data-db-drawer")) {
|
|
6295
6307
|
target.removeAttribute("data-db-drawer");
|
|
6296
6308
|
}
|
|
6297
6309
|
}
|
|
6298
|
-
return () => {
|
|
6299
|
-
for (const target of targets) {
|
|
6300
|
-
for (const name of names) target.removeAttribute(name);
|
|
6301
|
-
target.removeAttribute("data-db-drawer");
|
|
6302
|
-
}
|
|
6303
|
-
};
|
|
6304
6310
|
}, [rootRef, formFactor, layoutMode, drawerOpen]);
|
|
6305
6311
|
}
|
|
6306
6312
|
|
|
@@ -6482,9 +6488,9 @@ function useEditorFileDrop(targetRef, enabled, onFiles) {
|
|
|
6482
6488
|
}
|
|
6483
6489
|
|
|
6484
6490
|
// src/DocBlocksShell/useShellShortcuts.ts
|
|
6485
|
-
import { useEffect as useEffect27, useRef as
|
|
6491
|
+
import { useEffect as useEffect27, useRef as useRef17 } from "react";
|
|
6486
6492
|
function useShellShortcuts(handlers, layoutMode) {
|
|
6487
|
-
const handlersRef =
|
|
6493
|
+
const handlersRef = useRef17(handlers);
|
|
6488
6494
|
handlersRef.current = handlers;
|
|
6489
6495
|
useEffect27(() => {
|
|
6490
6496
|
if (typeof window === "undefined") return;
|
|
@@ -6623,7 +6629,7 @@ function useDocumentLinkProvider(index, selectedFile, ensureIndex) {
|
|
|
6623
6629
|
}
|
|
6624
6630
|
|
|
6625
6631
|
// src/WorkspaceIndex/useWorkspaceIndex.ts
|
|
6626
|
-
import { useCallback as useCallback17, useEffect as useEffect28, useMemo as useMemo5, useRef as
|
|
6632
|
+
import { useCallback as useCallback17, useEffect as useEffect28, useMemo as useMemo5, useRef as useRef18, useState as useState22, useSyncExternalStore as useSyncExternalStore4 } from "react";
|
|
6627
6633
|
import { getFileSystemProviderV2 as getFileSystemProviderV28 } from "@bendyline/docblocks/filesystem";
|
|
6628
6634
|
import { maybeGetDocBlocksHost as maybeGetDocBlocksHost3 } from "@bendyline/docblocks/host";
|
|
6629
6635
|
var IDLE_WORKSPACE_INDEX_STATUS = Object.freeze({
|
|
@@ -6656,7 +6662,7 @@ function whenIdle(callback) {
|
|
|
6656
6662
|
function useWorkspaceIndex(provider, workspaceId, mode = "eager") {
|
|
6657
6663
|
const providerV2 = provider && mode !== "off" ? getFileSystemProviderV28(provider) : null;
|
|
6658
6664
|
const [index, setIndex] = useState22(null);
|
|
6659
|
-
const startRequestedRef =
|
|
6665
|
+
const startRequestedRef = useRef18(false);
|
|
6660
6666
|
useEffect28(() => {
|
|
6661
6667
|
setIndex(null);
|
|
6662
6668
|
startRequestedRef.current = false;
|
|
@@ -6960,7 +6966,7 @@ var WELCOME_DOCUMENT_CONTENT = [
|
|
|
6960
6966
|
"",
|
|
6961
6967
|
'## Choose your DocBlocks app {[twoColumn header="The same Markdown, wherever you work" left="Web|Start in a browser, with no account. Install the web app when your browser offers it." right="Desktop|Download for macOS (Apple silicon), Windows, or Linux. Work directly in your folders."]}',
|
|
6962
6968
|
"",
|
|
6963
|
-
"Choose the **Web app**
|
|
6969
|
+
"Choose the **Web app** to start writing in your browser, or **Desktop** for everyday work in local folders on macOS (Apple silicon), Windows, and Linux. Use **VS Code** for documents beside your code, and the **CLI and MCP server** for automation. The links at the end of this guide lead to downloads and setup instructions.",
|
|
6964
6970
|
"",
|
|
6965
6971
|
"## Get started on desktop {[list]}",
|
|
6966
6972
|
"",
|
|
@@ -6978,7 +6984,7 @@ var WELCOME_DOCUMENT_CONTENT = [
|
|
|
6978
6984
|
"",
|
|
6979
6985
|
"## Work inside VS Code {[content]}",
|
|
6980
6986
|
"",
|
|
6981
|
-
"Install the DocBlocks extension, then open a `.md` file in your project. If it opens as plain text, right-click it and choose **Open in DocBlocks**. VS Code supplies the file explorer, tabs, saving, and source control; DocBlocks supplies the visual editor, Markdown source, previews, and export.
|
|
6987
|
+
"Install the DocBlocks extension, then open a `.md` file in your project. If it opens as plain text, right-click it and choose **Open in DocBlocks**. VS Code supplies the file explorer, tabs, saving, and source control; DocBlocks supplies the visual editor, Markdown source, previews, and export. Follow the extension guide below to get started.",
|
|
6982
6988
|
"",
|
|
6983
6989
|
"## On a phone or tablet {[content]}",
|
|
6984
6990
|
"",
|
|
@@ -6986,7 +6992,7 @@ var WELCOME_DOCUMENT_CONTENT = [
|
|
|
6986
6992
|
"",
|
|
6987
6993
|
'## Automate with the CLI and MCP {[twoColumn header="For repeatable document work" left="CLI|Install @bendyline/docblocks-cli with npm, then run docblocks --help. Build, preview, and convert files from your terminal." right="MCP|Connect the local server to an agent. Convert and preview documents, then deliberately save the resulting artifacts."]}',
|
|
6988
6994
|
"",
|
|
6989
|
-
"With a supported Node.js
|
|
6995
|
+
"With a supported version of `Node.js` installed, run `npm install -g @bendyline/docblocks-cli`, then `docblocks --help`. The CLI builds, previews, and converts files from your terminal. Its local MCP server gives agents document tools with explicitly allowed file access. Follow the CLI and MCP guide below for requirements and configuration.",
|
|
6990
6996
|
"",
|
|
6991
6997
|
"## One source, four ways to publish {[diagram]}",
|
|
6992
6998
|
"",
|
|
@@ -7030,7 +7036,7 @@ var WELCOME_DOCUMENT_CONTENT = [
|
|
|
7030
7036
|
"",
|
|
7031
7037
|
"## Export without rebuilding the document {[list]}",
|
|
7032
7038
|
"",
|
|
7033
|
-
"- Create **Word documents and PDFs** for review, printing, and fixed
|
|
7039
|
+
"- Create **Word documents and PDFs** for review, printing, and sharing with a fixed page layout.",
|
|
7034
7040
|
"- Create **PowerPoint decks** from the same annotated sections you preview as a slideshow.",
|
|
7035
7041
|
"- Publish **HTML pages, packaged HTML, and EPUB e-books**.",
|
|
7036
7042
|
"- Keep portable **Markdown or DBK bundles** with their media assets.",
|
|
@@ -7076,12 +7082,12 @@ function loadEditorShell() {
|
|
|
7076
7082
|
}
|
|
7077
7083
|
var EditorShell = lazy2(loadEditorShell);
|
|
7078
7084
|
var DocumentConflictDialog = lazy2(() => import("./DocumentConflictDialog-5LRVIGXS.js"));
|
|
7079
|
-
var GitUI = lazy2(() => import("./GitUI-
|
|
7085
|
+
var GitUI = lazy2(() => import("./GitUI-RCWUZVS6.js").then((m) => ({ default: m.GitUI })));
|
|
7080
7086
|
var QuickOpenDialog = lazy2(
|
|
7081
7087
|
() => import("./QuickOpenDialog-2KK4SEBU.js").then((m) => ({ default: m.QuickOpenDialog }))
|
|
7082
7088
|
);
|
|
7083
7089
|
var WorkspaceSearchPanel = lazy2(
|
|
7084
|
-
() => import("./WorkspaceSearchPanel-
|
|
7090
|
+
() => import("./WorkspaceSearchPanel-BKZJRPMY.js").then((m) => ({
|
|
7085
7091
|
default: m.WorkspaceSearchPanel
|
|
7086
7092
|
}))
|
|
7087
7093
|
);
|
|
@@ -7089,25 +7095,25 @@ var GitGrantNotice = lazy2(
|
|
|
7089
7095
|
() => import("./GitGrantNotice-I2VNKPLH.js").then((m) => ({ default: m.GitGrantNotice }))
|
|
7090
7096
|
);
|
|
7091
7097
|
var GitToolbarControl = lazy2(
|
|
7092
|
-
() => import("./GitToolbarControl-
|
|
7098
|
+
() => import("./GitToolbarControl-B7KG4MFP.js").then((m) => ({ default: m.GitToolbarControl }))
|
|
7093
7099
|
);
|
|
7094
7100
|
var AiToolbarControl = lazy2(
|
|
7095
|
-
() => import("./AiEditorAssistant-
|
|
7101
|
+
() => import("./AiEditorAssistant-GN2KXKZD.js").then((module) => ({
|
|
7096
7102
|
default: module.AiToolbarControl
|
|
7097
7103
|
}))
|
|
7098
7104
|
);
|
|
7099
7105
|
var PresentationMaker = lazy2(
|
|
7100
|
-
() => import("./PresentationMaker-
|
|
7106
|
+
() => import("./PresentationMaker-W2JIBHRN.js").then((module) => ({
|
|
7101
7107
|
default: module.PresentationMaker
|
|
7102
7108
|
}))
|
|
7103
7109
|
);
|
|
7104
7110
|
var AiReviewPanel = lazy2(
|
|
7105
|
-
() => import("./AiEditorAssistant-
|
|
7111
|
+
() => import("./AiEditorAssistant-GN2KXKZD.js").then((module) => ({
|
|
7106
7112
|
default: module.AiReviewPanel
|
|
7107
7113
|
}))
|
|
7108
7114
|
);
|
|
7109
7115
|
var AiIllustratePanel = lazy2(
|
|
7110
|
-
() => import("./AiDiagrams-
|
|
7116
|
+
() => import("./AiDiagrams-LFV4YU6W.js").then((module) => ({
|
|
7111
7117
|
default: module.AiIllustratePanel
|
|
7112
7118
|
}))
|
|
7113
7119
|
);
|
|
@@ -7117,12 +7123,12 @@ var TextFromNarration = lazy2(
|
|
|
7117
7123
|
}))
|
|
7118
7124
|
);
|
|
7119
7125
|
var SpeechToolbarControl = lazy2(
|
|
7120
|
-
() => import("./SpeechToolbarControl-
|
|
7126
|
+
() => import("./SpeechToolbarControl-OSQS7NVY.js").then((module) => ({
|
|
7121
7127
|
default: module.SpeechToolbarControl
|
|
7122
7128
|
}))
|
|
7123
7129
|
);
|
|
7124
7130
|
var SpeechMenuBridge = lazy2(
|
|
7125
|
-
() => import("./SpeechToolbarControl-
|
|
7131
|
+
() => import("./SpeechToolbarControl-OSQS7NVY.js").then((module) => ({
|
|
7126
7132
|
default: module.SpeechMenuBridge
|
|
7127
7133
|
}))
|
|
7128
7134
|
);
|
|
@@ -7519,7 +7525,7 @@ function DocBlocksShell({
|
|
|
7519
7525
|
setViewPreferences(prefs);
|
|
7520
7526
|
saveViewPreferences(prefs);
|
|
7521
7527
|
}, []);
|
|
7522
|
-
const shellRef =
|
|
7528
|
+
const shellRef = useRef19(null);
|
|
7523
7529
|
const formFactor = useFormFactor(shellRef);
|
|
7524
7530
|
const [sidebarPreference, setSidebarPreference] = useState23(loadSidebarPreference);
|
|
7525
7531
|
const layoutMode = resolveLayoutMode(formFactor, sidebarPreference);
|
|
@@ -7541,7 +7547,7 @@ function DocBlocksShell({
|
|
|
7541
7547
|
const drawerOpen = singlePane && !mobileShowEditor;
|
|
7542
7548
|
const [sidebarWidth, setSidebarWidth] = useState23(loadSidebarWidth);
|
|
7543
7549
|
const canRestoreSplitView = sidebarPreference === "collapsed" && formFactor.splitPaneAllowed;
|
|
7544
|
-
const editorAreaRef =
|
|
7550
|
+
const editorAreaRef = useRef19(null);
|
|
7545
7551
|
const [desktopToolbarWrapped, setDesktopToolbarWrapped] = useState23(false);
|
|
7546
7552
|
useEffect29(() => {
|
|
7547
7553
|
const editorArea = editorAreaRef.current;
|
|
@@ -7572,7 +7578,7 @@ function DocBlocksShell({
|
|
|
7572
7578
|
});
|
|
7573
7579
|
const [browserStoragePersistent, setBrowserStoragePersistent] = useState23(false);
|
|
7574
7580
|
const [saveToast, setSaveToast] = useState23(null);
|
|
7575
|
-
const saveToastTimerRef =
|
|
7581
|
+
const saveToastTimerRef = useRef19(null);
|
|
7576
7582
|
const showToast = useCallback18((kind, message) => {
|
|
7577
7583
|
setSaveToast({ kind, message });
|
|
7578
7584
|
if (saveToastTimerRef.current) clearTimeout(saveToastTimerRef.current);
|
|
@@ -7593,8 +7599,8 @@ function DocBlocksShell({
|
|
|
7593
7599
|
const [installPromptEvent, setInstallPromptEvent] = useState23(
|
|
7594
7600
|
null
|
|
7595
7601
|
);
|
|
7596
|
-
const panesRef =
|
|
7597
|
-
const sidebarRef =
|
|
7602
|
+
const panesRef = useRef19(null);
|
|
7603
|
+
const sidebarRef = useRef19(null);
|
|
7598
7604
|
useInert(sidebarRef, singlePane && !drawerOpen);
|
|
7599
7605
|
useInert(editorAreaRef, drawerOpen);
|
|
7600
7606
|
const openDrawer = useCallback18(() => setMobileShowEditor(false), []);
|
|
@@ -7607,7 +7613,7 @@ function DocBlocksShell({
|
|
|
7607
7613
|
onOpen: openDrawer,
|
|
7608
7614
|
onClose: closeDrawer
|
|
7609
7615
|
});
|
|
7610
|
-
const dragStateRef =
|
|
7616
|
+
const dragStateRef = useRef19(null);
|
|
7611
7617
|
const handleResizerPointerDown = useCallback18(
|
|
7612
7618
|
(e) => {
|
|
7613
7619
|
if (e.button !== 0) return;
|
|
@@ -7811,19 +7817,19 @@ function DocBlocksShell({
|
|
|
7811
7817
|
};
|
|
7812
7818
|
}, [activeWorkspaceDescriptor]);
|
|
7813
7819
|
const nativeWorkspaceId = provider && activeWorkspaceDescriptor?.id === activeWorkspaceId && provider.id === activeWorkspaceId && activeWorkspaceDescriptor.type === "host-native" ? activeWorkspaceDescriptor.id : null;
|
|
7814
|
-
const workingTreeChangedRef =
|
|
7820
|
+
const workingTreeChangedRef = useRef19(() => void 0);
|
|
7815
7821
|
const handleWorkingTreeChanged = useCallback18(() => workingTreeChangedRef.current(), []);
|
|
7816
7822
|
const git = useGit(provider, nativeWorkspaceId, resolvedTheme, handleWorkingTreeChanged);
|
|
7817
|
-
const gitRef =
|
|
7823
|
+
const gitRef = useRef19(git);
|
|
7818
7824
|
gitRef.current = git;
|
|
7819
7825
|
const { scheduleRefresh: gitScheduleRefresh } = git;
|
|
7820
7826
|
const workspaceSettingsEnabled = provider !== null && provider.id === activeWorkspaceId && getTransientWorkspace(provider.id) === null;
|
|
7821
7827
|
const workspaceSettings = useWorkspaceSettings(provider, workspaceSettingsEnabled);
|
|
7822
7828
|
const { refresh: refreshWorkspaceSettings, save: saveWorkspaceSettings } = workspaceSettings;
|
|
7823
7829
|
const workspaceDefaultThemeId = resolveWorkspaceDefaultThemeId(workspaceSettings.settings);
|
|
7824
|
-
const workspaceDefaultThemeRef =
|
|
7830
|
+
const workspaceDefaultThemeRef = useRef19(workspaceDefaultThemeId);
|
|
7825
7831
|
workspaceDefaultThemeRef.current = workspaceDefaultThemeId;
|
|
7826
|
-
const outsideInRenderRef =
|
|
7832
|
+
const outsideInRenderRef = useRef19({
|
|
7827
7833
|
defaultThemeId: () => workspaceDefaultThemeRef.current
|
|
7828
7834
|
});
|
|
7829
7835
|
const workspaceOutputs = useWorkspaceOutputs(
|
|
@@ -7832,10 +7838,10 @@ function DocBlocksShell({
|
|
|
7832
7838
|
workspaceSettings.settings,
|
|
7833
7839
|
workspaceSettingsEnabled
|
|
7834
7840
|
);
|
|
7835
|
-
const workspaceOutputsSchedulerRef =
|
|
7841
|
+
const workspaceOutputsSchedulerRef = useRef19(workspaceOutputs.scheduler);
|
|
7836
7842
|
workspaceOutputsSchedulerRef.current = workspaceOutputs.scheduler;
|
|
7837
7843
|
const workspaceIndex = useWorkspaceIndex(provider, activeWorkspaceId, workspaceIndexMode);
|
|
7838
|
-
const workspaceIndexRef =
|
|
7844
|
+
const workspaceIndexRef = useRef19(workspaceIndex.index);
|
|
7839
7845
|
workspaceIndexRef.current = workspaceIndex.index;
|
|
7840
7846
|
const notifyWorkspaceChanged = useCallback18(
|
|
7841
7847
|
(workspaceId, path) => {
|
|
@@ -7897,7 +7903,7 @@ function DocBlocksShell({
|
|
|
7897
7903
|
const [selectedImage, setSelectedImage] = useState23(void 0);
|
|
7898
7904
|
const [selectedManagedOutput, setSelectedManagedOutput] = useState23(void 0);
|
|
7899
7905
|
const [findMode, setFindMode] = useState23(false);
|
|
7900
|
-
const findModeRef =
|
|
7906
|
+
const findModeRef = useRef19(findMode);
|
|
7901
7907
|
findModeRef.current = findMode;
|
|
7902
7908
|
useEffect29(() => {
|
|
7903
7909
|
setFindMode(false);
|
|
@@ -8035,10 +8041,10 @@ function DocBlocksShell({
|
|
|
8035
8041
|
const [initialSharedMode, setInitialSharedMode] = useState23(null);
|
|
8036
8042
|
const [showWelcomeGateway, setShowWelcomeGateway] = useState23(false);
|
|
8037
8043
|
const [aiPanel, setAiPanel] = useState23(null);
|
|
8038
|
-
const navigationRequestRef =
|
|
8044
|
+
const navigationRequestRef = useRef19(0);
|
|
8039
8045
|
const workspaceAuthorityBarrier = useMemo6(() => new WorkspaceAuthorityBarrier(), []);
|
|
8040
|
-
const preparedCloseRequestRef =
|
|
8041
|
-
const pendingDbkConflictsRef =
|
|
8046
|
+
const preparedCloseRequestRef = useRef19(null);
|
|
8047
|
+
const pendingDbkConflictsRef = useRef19(/* @__PURE__ */ new Map());
|
|
8042
8048
|
const afterWorkspaceCommit = useCallback18(
|
|
8043
8049
|
(workspaceId, path) => {
|
|
8044
8050
|
gitScheduleRefresh();
|
|
@@ -8222,10 +8228,10 @@ function DocBlocksShell({
|
|
|
8222
8228
|
},
|
|
8223
8229
|
[afterWorkspaceCommit, gitScheduleRefresh]
|
|
8224
8230
|
);
|
|
8225
|
-
const mediaContainerRef =
|
|
8231
|
+
const mediaContainerRef = useRef19(null);
|
|
8226
8232
|
const [mediaProvider, setMediaProvider] = useState23(null);
|
|
8227
8233
|
const [mediaEpoch, setMediaEpoch] = useState23(0);
|
|
8228
|
-
const versionsContainerRef =
|
|
8234
|
+
const versionsContainerRef = useRef19(null);
|
|
8229
8235
|
const [versionsContainer, setVersionsContainer] = useState23(null);
|
|
8230
8236
|
const pushHash = useCallback18((wsId, filePath) => {
|
|
8231
8237
|
const hash = buildHash(wsId, filePath);
|
|
@@ -8433,11 +8439,11 @@ function DocBlocksShell({
|
|
|
8433
8439
|
},
|
|
8434
8440
|
[adoptRegularDocument, createDocumentTarget, documentSession, pushHash]
|
|
8435
8441
|
);
|
|
8436
|
-
const startupOpenFromIdsRef =
|
|
8442
|
+
const startupOpenFromIdsRef = useRef19(openFromIds);
|
|
8437
8443
|
startupOpenFromIdsRef.current = openFromIds;
|
|
8438
|
-
const startupOpenSharedDocumentRef =
|
|
8444
|
+
const startupOpenSharedDocumentRef = useRef19(openSharedDocument);
|
|
8439
8445
|
startupOpenSharedDocumentRef.current = openSharedDocument;
|
|
8440
|
-
const startupSeedWelcomeFileRef =
|
|
8446
|
+
const startupSeedWelcomeFileRef = useRef19(seedWelcomeFile);
|
|
8441
8447
|
startupSeedWelcomeFileRef.current = seedWelcomeFile;
|
|
8442
8448
|
const closeWelcomeGateway = useCallback18(() => {
|
|
8443
8449
|
setShowWelcomeGateway((showing) => {
|
|
@@ -8789,7 +8795,7 @@ function DocBlocksShell({
|
|
|
8789
8795
|
};
|
|
8790
8796
|
}, []);
|
|
8791
8797
|
const [offlineReadyToast, setOfflineReadyToast] = useState23(false);
|
|
8792
|
-
const offlineReadyAnnouncedRef =
|
|
8798
|
+
const offlineReadyAnnouncedRef = useRef19(false);
|
|
8793
8799
|
useEffect29(() => {
|
|
8794
8800
|
if (!offlineReady || offlineReadyAnnouncedRef.current) return;
|
|
8795
8801
|
offlineReadyAnnouncedRef.current = true;
|
|
@@ -8805,7 +8811,7 @@ function DocBlocksShell({
|
|
|
8805
8811
|
setStorageFull(false);
|
|
8806
8812
|
}
|
|
8807
8813
|
}, [documentSnapshot.error, documentSnapshot.status]);
|
|
8808
|
-
const autoPersistRequestedRef =
|
|
8814
|
+
const autoPersistRequestedRef = useRef19(false);
|
|
8809
8815
|
useEffect29(() => {
|
|
8810
8816
|
if (!showBrowserStorageWarning || browserStoragePersistent) return;
|
|
8811
8817
|
if (autoPersistRequestedRef.current) return;
|
|
@@ -9656,7 +9662,7 @@ function DocBlocksShell({
|
|
|
9656
9662
|
singlePane
|
|
9657
9663
|
]);
|
|
9658
9664
|
const canFind = selectedFile !== null && mediaProvider !== null && selectedManagedOutput !== "catalog-html" && selectedImage === void 0;
|
|
9659
|
-
const canFindRef =
|
|
9665
|
+
const canFindRef = useRef19(canFind);
|
|
9660
9666
|
canFindRef.current = canFind;
|
|
9661
9667
|
const { ensure: ensureWorkspaceIndex } = workspaceIndex;
|
|
9662
9668
|
const openQuickOpen = useCallback18(() => {
|
|
@@ -9746,7 +9752,7 @@ function DocBlocksShell({
|
|
|
9746
9752
|
}),
|
|
9747
9753
|
[singlePane, mobileShowEditor]
|
|
9748
9754
|
);
|
|
9749
|
-
const actionNewHandledRef =
|
|
9755
|
+
const actionNewHandledRef = useRef19(false);
|
|
9750
9756
|
useEffect29(() => {
|
|
9751
9757
|
if (!provider || actionNewHandledRef.current) return;
|
|
9752
9758
|
if (typeof window === "undefined") return;
|
package/dist/proofing/index.js
CHANGED
|
@@ -8,6 +8,13 @@ import { createHarperProofingProvider } from "@bendyline/squisq-editor-react/pro
|
|
|
8
8
|
|
|
9
9
|
// src/Proofing/proofing-dictionary.ts
|
|
10
10
|
var STORAGE_KEY = "docblocks:proofingDictionary";
|
|
11
|
+
var DOCBLOCKS_PROOFING_WORDS = Object.freeze([
|
|
12
|
+
"DocBlocks",
|
|
13
|
+
"Squisq",
|
|
14
|
+
"DBK",
|
|
15
|
+
"CLI",
|
|
16
|
+
"MCP"
|
|
17
|
+
]);
|
|
11
18
|
function readWords() {
|
|
12
19
|
try {
|
|
13
20
|
const raw = localStorage.getItem(STORAGE_KEY);
|
|
@@ -38,7 +45,10 @@ function createDocBlocksProofingProvider(options) {
|
|
|
38
45
|
const { wasmUrl, dictionary } = options;
|
|
39
46
|
return createHarperProofingProvider({
|
|
40
47
|
wasmUrl,
|
|
41
|
-
|
|
48
|
+
// Sentence case is an intentional house style, not a grammar error.
|
|
49
|
+
// Keep every other spelling, grammar, and spacing rule at its default.
|
|
50
|
+
lintConfig: { UseTitleCase: false },
|
|
51
|
+
initialWords: [...DOCBLOCKS_PROOFING_WORDS, ...dictionary?.read() ?? []],
|
|
42
52
|
onDictionaryWord: dictionary ? (word) => dictionary.append(word) : void 0
|
|
43
53
|
});
|
|
44
54
|
}
|
package/dist/settings/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bendyline/docblocks-react",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"description": "React components for DocBlocks — file explorer, workspace picker, and editor shell",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bendyline",
|
|
@@ -85,14 +85,14 @@
|
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"@bendyline/docblocks": "2.7.
|
|
88
|
+
"@bendyline/docblocks": "2.7.1",
|
|
89
89
|
"@bendyline/squisq": "2.11.19",
|
|
90
90
|
"@bendyline/squisq-calc": "2.11.2",
|
|
91
|
-
"@bendyline/squisq-editor-react": "2.11.
|
|
92
|
-
"@bendyline/squisq-formats": "2.6.
|
|
93
|
-
"@bendyline/squisq-react": "2.11.
|
|
91
|
+
"@bendyline/squisq-editor-react": "2.11.26",
|
|
92
|
+
"@bendyline/squisq-formats": "2.6.20",
|
|
93
|
+
"@bendyline/squisq-react": "2.11.24",
|
|
94
94
|
"@bendyline/squisq-video": "2.3.23",
|
|
95
|
-
"@bendyline/squisq-video-react": "2.4.
|
|
95
|
+
"@bendyline/squisq-video-react": "2.4.28",
|
|
96
96
|
"qrcode": "1.5.4"
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
package/src/styles/docblocks.css
CHANGED
|
@@ -2329,6 +2329,12 @@ body.db-resizing-sidebar * {
|
|
|
2329
2329
|
line-height: 1.5;
|
|
2330
2330
|
}
|
|
2331
2331
|
|
|
2332
|
+
/* A status line stays mounted while empty so later changes are announced, but
|
|
2333
|
+
it should not leave a gap. */
|
|
2334
|
+
.db-settings-hint:empty {
|
|
2335
|
+
margin: 0;
|
|
2336
|
+
}
|
|
2337
|
+
|
|
2332
2338
|
.db-settings-hint code {
|
|
2333
2339
|
font-size: 11px;
|
|
2334
2340
|
background: var(--db-bg-subtle);
|
|
@@ -3549,6 +3555,12 @@ body.db-resizing-sidebar * {
|
|
|
3549
3555
|
background: rgba(255, 255, 255, 0.04);
|
|
3550
3556
|
}
|
|
3551
3557
|
|
|
3558
|
+
/* Squisq also assigns this token directly on its dark toolbar. Bind it at
|
|
3559
|
+
that boundary so readable heading glyphs never inherit placeholder ink. */
|
|
3560
|
+
.db-shell[data-theme] .squisq-editor-shell .squisq-toolbar {
|
|
3561
|
+
--squisq-toolbar-icon: var(--db-text-muted);
|
|
3562
|
+
}
|
|
3563
|
+
|
|
3552
3564
|
.db-shell[data-theme='dark'] .squisq-toolbar-view-tabs {
|
|
3553
3565
|
background: var(--db-editor-canvas);
|
|
3554
3566
|
}
|
|
@@ -4544,7 +4556,7 @@ html:has(.db-shell)
|
|
|
4544
4556
|
}
|
|
4545
4557
|
|
|
4546
4558
|
html:has(.db-shell) .squisq-use-mode-menu .squisq-use-mode-menu-summary {
|
|
4547
|
-
color: var(--db-text-
|
|
4559
|
+
color: var(--db-text-secondary);
|
|
4548
4560
|
}
|
|
4549
4561
|
|
|
4550
4562
|
html:has(.db-shell) .squisq-use-mode-menu .squisq-use-mode-menu-check {
|
|
@@ -5276,15 +5288,14 @@ html:has(.db-shell[data-theme='dark'])
|
|
|
5276
5288
|
}
|
|
5277
5289
|
|
|
5278
5290
|
.db-shell[data-theme='light'] .squisq-editor-shell[data-theme='light'] .squisq-status-bar {
|
|
5291
|
+
--squisq-text-muted: var(--db-text-secondary);
|
|
5279
5292
|
background: var(--db-accent-tint-strong);
|
|
5280
5293
|
border-top-color: var(--db-border-strong);
|
|
5281
5294
|
}
|
|
5282
5295
|
|
|
5283
|
-
/*
|
|
5284
|
-
(#059669 light, #34d399 dark). Re-tone to the sage accent so the
|
|
5285
|
-
status indicator harmonizes with the rest of the chrome. */
|
|
5296
|
+
/* The stronger accent keeps small status text readable on the tinted bar. */
|
|
5286
5297
|
.db-shell .squisq-status-ok {
|
|
5287
|
-
color: var(--db-accent);
|
|
5298
|
+
color: var(--db-accent-hover);
|
|
5288
5299
|
}
|
|
5289
5300
|
|
|
5290
5301
|
.db-shell[data-theme='dark'] .squisq-status-ok {
|