@bendyline/docblocks-react 2.1.1 → 2.2.0

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.
@@ -409,7 +409,7 @@ function ExportToolbarControls({
409
409
  role: "menuitem",
410
410
  className: "db-toolbar-menu-item",
411
411
  onClick: () => void handleOpenVideoModal("mp4"),
412
- children: "Export Video..."
412
+ children: "Export video..."
413
413
  }
414
414
  ),
415
415
  showAnimatedGifExport && /* @__PURE__ */ jsx(
@@ -419,7 +419,7 @@ function ExportToolbarControls({
419
419
  role: "menuitem",
420
420
  className: "db-toolbar-menu-item",
421
421
  onClick: () => void handleOpenVideoModal("gif"),
422
- children: "Export Animated GIF..."
422
+ children: "Export animated gif..."
423
423
  }
424
424
  )
425
425
  ] })
@@ -1,5 +1,5 @@
1
1
  // src/DocBlocksShell/LazyEditorShell.ts
2
- import { EditorShell } from "@bendyline/squisq-editor-react";
2
+ import { EditorShell } from "@bendyline/squisq-editor-react/shell";
3
3
  export {
4
4
  EditorShell as default
5
5
  };
package/dist/index.js CHANGED
@@ -221,13 +221,19 @@ function useFileTree(provider) {
221
221
  }
222
222
  })();
223
223
  };
224
- const subscription = providerV2.watch(requestRefresh, {
225
- onError: (caught) => {
226
- if (disposed) return;
227
- reportError(caught);
224
+ const subscription = providerV2.watch(
225
+ (event) => {
226
+ if (event.type === "modified") return;
228
227
  requestRefresh();
228
+ },
229
+ {
230
+ onError: (caught) => {
231
+ if (disposed) return;
232
+ reportError(caught);
233
+ requestRefresh();
234
+ }
229
235
  }
230
- });
236
+ );
231
237
  void subscription.ready.catch((caught) => {
232
238
  if (!disposed) reportError(caught);
233
239
  });
@@ -2254,7 +2260,7 @@ function useDocumentSession(autoSaveDelayMs = 500) {
2254
2260
  import { lazy, Suspense } from "react";
2255
2261
  import { jsx as jsx8 } from "react/jsx-runtime";
2256
2262
  var ExportToolbarControlsImplementation = lazy(
2257
- () => import("./ExportToolbarControls-5HUE3LSX.js").then((module) => ({
2263
+ () => import("./ExportToolbarControls-C46GMPKC.js").then((module) => ({
2258
2264
  default: module.ExportToolbarControls
2259
2265
  }))
2260
2266
  );
@@ -3549,8 +3555,9 @@ var editorShellModulePromise = null;
3549
3555
  function loadEditorShell() {
3550
3556
  editorShellModulePromise ?? (editorShellModulePromise = (async () => {
3551
3557
  const workersReady = globalThis.docBlocksMonacoWorkersReady;
3552
- await workersReady?.catch(() => void 0);
3553
- return import("./LazyEditorShell-RF54B5UD.js");
3558
+ const editorReady = import("./LazyEditorShell-LU4QFPDX.js");
3559
+ const [editorModule] = await Promise.all([editorReady, workersReady?.catch(() => void 0)]);
3560
+ return editorModule;
3554
3561
  })());
3555
3562
  return editorShellModulePromise;
3556
3563
  }
@@ -6136,6 +6143,14 @@ function DocBlocksShell({
6136
6143
  title: "Restore split view",
6137
6144
  children: /* @__PURE__ */ jsx12(SplitViewIcon, {})
6138
6145
  }
6146
+ ),
6147
+ /* @__PURE__ */ jsx12(
6148
+ "span",
6149
+ {
6150
+ className: "db-window-drag-grip",
6151
+ "data-tooltip": "Click and drag here to move your window around.",
6152
+ "aria-hidden": true
6153
+ }
6139
6154
  )
6140
6155
  ] }),
6141
6156
  git.available && /* @__PURE__ */ jsx12(Suspense2, { fallback: null, children: /* @__PURE__ */ jsx12(
@@ -6199,7 +6214,7 @@ function DocBlocksShell({
6199
6214
  /* @__PURE__ */ jsx12("span", { className: "db-shell-sidebar-footer-separator", "aria-hidden": "true", children: "\u2022" }),
6200
6215
  /* @__PURE__ */ jsx12("a", { href: "https://docblocks.com/terms/", target: "_blank", rel: "noopener noreferrer", children: "Terms" }),
6201
6216
  /* @__PURE__ */ jsx12("span", { className: "db-shell-sidebar-footer-separator", "aria-hidden": "true", children: "\u2022" }),
6202
- /* @__PURE__ */ jsx12("a", { href: issueReportUrl, target: "_blank", rel: "noopener noreferrer", children: "Issues" }),
6217
+ /* @__PURE__ */ jsx12("a", { href: issueReportUrl, target: "_blank", rel: "noopener noreferrer", children: "Report issue" }),
6203
6218
  showBrowserStorageWarning && /* @__PURE__ */ jsxs11(Fragment7, { children: [
6204
6219
  /* @__PURE__ */ jsx12("span", { className: "db-shell-sidebar-footer-separator", "aria-hidden": "true", children: "\u2022" }),
6205
6220
  /* @__PURE__ */ jsx12(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bendyline/docblocks-react",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "description": "React components for DocBlocks — file explorer, workspace picker, and editor shell",
5
5
  "license": "MIT",
6
6
  "author": "Bendyline",
@@ -65,13 +65,13 @@
65
65
  "react-dom": "^18.0.0 || ^19.0.0"
66
66
  },
67
67
  "dependencies": {
68
- "@bendyline/docblocks": "2.1.1",
69
- "@bendyline/squisq": "2.3.1",
70
- "@bendyline/squisq-editor-react": "2.3.2",
71
- "@bendyline/squisq-formats": "2.3.1",
72
- "@bendyline/squisq-react": "2.3.1",
73
- "@bendyline/squisq-video": "2.2.1",
74
- "@bendyline/squisq-video-react": "2.2.1"
68
+ "@bendyline/docblocks": "2.2.0",
69
+ "@bendyline/squisq": "2.3.2",
70
+ "@bendyline/squisq-editor-react": "2.3.3",
71
+ "@bendyline/squisq-formats": "2.3.2",
72
+ "@bendyline/squisq-react": "2.3.2",
73
+ "@bendyline/squisq-video": "2.2.2",
74
+ "@bendyline/squisq-video-react": "2.2.2"
75
75
  },
76
76
  "devDependencies": {
77
77
  "@happy-dom/global-registrator": "20.9.0",
@@ -1138,6 +1138,7 @@ body.db-resizing-sidebar * {
1138
1138
  display: flex;
1139
1139
  align-items: center;
1140
1140
  gap: 6px;
1141
+ /* Match Squisq's rendered line box + 4px vertical padding + 1px border. */
1141
1142
  height: 23px;
1142
1143
  padding: 0 12px 0 18px;
1143
1144
  border-top: 1px solid var(--db-border-strong);
@@ -2808,9 +2809,11 @@ html:has(.db-shell[data-theme='dark']) {
2808
2809
  --db-shadow: rgba(0, 0, 0, 0.4);
2809
2810
  --db-accent: #c8b48f;
2810
2811
  --db-accent-hover: #dec79d;
2812
+ --db-text-on-accent: #1a1812;
2811
2813
  --db-accent-soft-15: rgba(200, 180, 143, 0.18);
2812
2814
  --db-accent-soft-25: rgba(200, 180, 143, 0.28);
2813
2815
  --db-accent-tint-strong: #3a382e;
2816
+ --db-accent-deep: #e6dcc0;
2814
2817
  --db-gutter-bg: #4a4538;
2815
2818
  }
2816
2819
 
@@ -2829,9 +2832,11 @@ html:has(.db-shell[data-theme='light']) {
2829
2832
  --db-shadow: rgba(40, 30, 15, 0.12);
2830
2833
  --db-accent: #7d6948;
2831
2834
  --db-accent-hover: #5e4f37;
2835
+ --db-text-on-accent: #ffffff;
2832
2836
  --db-accent-soft-15: rgba(125, 105, 72, 0.15);
2833
2837
  --db-accent-soft-25: rgba(125, 105, 72, 0.25);
2834
2838
  --db-accent-tint-strong: #d8d0b5;
2839
+ --db-accent-deep: #3d3220;
2835
2840
  --db-gutter-bg: #efe8d4;
2836
2841
  }
2837
2842
 
@@ -3163,6 +3168,82 @@ html:has(.db-shell[data-theme='dark'][data-accent='gray']) {
3163
3168
  --db-badge-text-hover: #ffffff;
3164
3169
  }
3165
3170
 
3171
+ /* The Use mode menu is portaled to document.body, outside both the DocBlocks
3172
+ shell and the Squisq editor shell. Consume the palette hoisted to `html`
3173
+ above so its surface, states, icons, and text follow every DocBlocks theme
3174
+ and accent instead of falling back to Squisq's standalone blue/slate UI. */
3175
+ html:has(.db-shell) .squisq-use-mode-menu {
3176
+ background: var(--db-bg);
3177
+ border-color: var(--db-border);
3178
+ box-shadow:
3179
+ 0 12px 32px var(--db-shadow),
3180
+ 0 2px 6px var(--db-shadow);
3181
+ }
3182
+
3183
+ html:has(.db-shell) .squisq-use-mode-menu .squisq-use-mode-menu-item {
3184
+ color: var(--db-text-secondary);
3185
+ }
3186
+
3187
+ html:has(.db-shell) .squisq-use-mode-menu .squisq-use-mode-menu-item:hover,
3188
+ html:has(.db-shell) .squisq-use-mode-menu .squisq-use-mode-menu-item:focus-visible {
3189
+ background: var(--db-bg-hover);
3190
+ color: var(--db-text);
3191
+ }
3192
+
3193
+ html:has(.db-shell) .squisq-use-mode-menu .squisq-use-mode-menu-item--selected {
3194
+ background: var(--db-accent-tint-strong);
3195
+ color: var(--db-accent-deep);
3196
+ }
3197
+
3198
+ html:has(.db-shell) .squisq-use-mode-menu .squisq-use-mode-menu-icon {
3199
+ background: var(--db-bg-hover);
3200
+ color: var(--db-text-muted);
3201
+ }
3202
+
3203
+ html:has(.db-shell)
3204
+ .squisq-use-mode-menu
3205
+ .squisq-use-mode-menu-item--selected
3206
+ .squisq-use-mode-menu-icon {
3207
+ background: var(--db-accent-soft-25);
3208
+ color: var(--db-accent-hover);
3209
+ }
3210
+
3211
+ html:has(.db-shell) .squisq-use-mode-menu .squisq-use-mode-menu-summary {
3212
+ color: var(--db-text-muted);
3213
+ }
3214
+
3215
+ html:has(.db-shell) .squisq-use-mode-menu .squisq-use-mode-menu-check {
3216
+ color: var(--db-accent-hover);
3217
+ }
3218
+
3219
+ /* Custom layout authoring is portaled to document.body. Bind its host-facing
3220
+ accent tokens at that portal boundary so selected layouts, palette states,
3221
+ primary actions, and focus rings follow the active DocBlocks accent instead
3222
+ of Squisq's standalone indigo defaults. */
3223
+ html:has(.db-shell) :is(.squisq-template-designer-overlay, .squisq-layout-manager-overlay) {
3224
+ --squisq-layout-accent-text: var(--db-accent-hover);
3225
+ --squisq-layout-accent-bg: var(--db-accent);
3226
+ --squisq-layout-accent-bg-hover: var(--db-accent-hover);
3227
+ --squisq-layout-accent-border: var(--db-accent);
3228
+ --squisq-layout-accent-soft: var(--db-accent-tint-strong);
3229
+ --squisq-layout-accent-soft-hover: var(--db-bg-hover);
3230
+ --squisq-layout-accent-soft-border: var(--db-accent);
3231
+ --squisq-layout-accent-hover-border: var(--db-accent-hover);
3232
+ }
3233
+
3234
+ html:has(.db-shell)
3235
+ :is(.squisq-template-designer-overlay, .squisq-layout-manager-overlay)
3236
+ .squisq-template-designer-btn--primary {
3237
+ color: var(--db-text-on-accent);
3238
+ }
3239
+
3240
+ html:has(.db-shell)
3241
+ :is(.squisq-template-designer-overlay, .squisq-layout-manager-overlay)
3242
+ .squisq-template-designer-field
3243
+ input:focus {
3244
+ box-shadow: 0 0 0 3px var(--db-accent-soft-25);
3245
+ }
3246
+
3166
3247
  /* Convert/Insert is portaled to document.body, so the editor shell's Squisq
3167
3248
  overrides cannot reach it. The active DocBlocks palette is already hoisted
3168
3249
  to html above; consume it here so every accent and appearance produces the
@@ -4952,6 +5033,13 @@ button.db-git-file-row:hover {
4952
5033
  padding-bottom: 2px;
4953
5034
  }
4954
5035
 
5036
+ /* The native 32px caption band leaves the labels slightly above its visual
5037
+ center. Move only the text down; the tab hit area and active underline
5038
+ stay anchored to the titlebar edges. */
5039
+ .db-shell .squisq-toolbar-view-tab-label {
5040
+ transform: translateY(4px);
5041
+ }
5042
+
4955
5043
  .db-shell .squisq-use-mode-trigger {
4956
5044
  padding-bottom: 7px;
4957
5045
  }
@@ -4980,18 +5068,20 @@ button.db-git-file-row:hover {
4980
5068
  }
4981
5069
 
4982
5070
  /* Make the draggable header space beside the workspace gear discoverable,
4983
- matching the Electron titlebar without introducing another control. */
4984
- .db-shell .db-shell-sidebar-header::after {
4985
- content: '';
4986
- width: 12px;
5071
+ matching the Electron titlebar without introducing another control. The
5072
+ 12px dotted content and its 8px right padding form one drag region. */
5073
+ .db-shell .db-window-drag-grip {
5074
+ box-sizing: border-box;
5075
+ width: 20px;
4987
5076
  height: 20px;
4988
- flex: 0 0 12px;
4989
- margin-right: 3px;
5077
+ flex: 0 0 20px;
5078
+ padding-right: 8px;
4990
5079
  background-image: radial-gradient(circle, var(--db-text-muted) 1px, transparent 1.25px);
5080
+ background-clip: content-box;
5081
+ background-origin: content-box;
4991
5082
  background-position: center;
4992
5083
  background-size: 4px 4px;
4993
5084
  opacity: 0.72;
4994
- pointer-events: none;
4995
5085
  app-region: drag;
4996
5086
  -webkit-app-region: drag;
4997
5087
  }