@bendyline/squisq-editor-react 2.12.0 → 2.12.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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  RecorderModal
3
- } from "./chunk-IT3NPQ4J.js";
3
+ } from "./chunk-TCGWKYME.js";
4
4
 
5
5
  // src/recorder/RecorderButton.tsx
6
6
  import { useCallback, useState } from "react";
@@ -412,9 +412,13 @@ function resolveFileKind(fileName, language) {
412
412
  // src/useBlockNavigator.ts
413
413
  import { useCallback, useMemo as useMemo2, useState } from "react";
414
414
  var NEW_BLOCK_MARKDOWN = "## New section\n\n";
415
+ var NO_SLICES = [];
415
416
  function useBlockNavigator(source, setSource, opts) {
416
417
  const enabled = opts?.enabled ?? false;
417
- const slices = useMemo2(() => getBlockSlices(source), [source]);
418
+ const slices = useMemo2(
419
+ () => enabled ? getBlockSlices(source) : NO_SLICES,
420
+ [enabled, source]
421
+ );
418
422
  const blockCount = slices.length;
419
423
  const [rawKey, setRawKey] = useState(0);
420
424
  const activeBlockKey = blockCount === 0 ? 0 : Math.min(Math.max(rawKey, 0), blockCount - 1);
@@ -2308,14 +2308,17 @@ var modalStyle = {
2308
2308
  border: "1px solid var(--squisq-recorder-border)",
2309
2309
  borderRadius: 0,
2310
2310
  padding: "24px 28px",
2311
+ boxSizing: "border-box",
2311
2312
  width: "min(560px, calc(100vw - 48px))",
2312
- maxHeight: "calc(100vh - 48px)",
2313
+ maxHeight: "calc(100dvh - 48px)",
2313
2314
  overflowY: "auto",
2315
+ overscrollBehaviorY: "contain",
2314
2316
  boxShadow: "0 8px 32px rgba(0,0,0,0.18)",
2315
2317
  fontFamily: "system-ui, -apple-system, sans-serif",
2316
2318
  color: "var(--squisq-recorder-text)"
2317
2319
  };
2318
2320
  var titleStyle = {
2321
+ flexShrink: 0,
2319
2322
  margin: "0 0 16px 0",
2320
2323
  fontSize: 18,
2321
2324
  fontWeight: 600,
@@ -2496,8 +2499,7 @@ var recordingStatusStyle = {
2496
2499
  var modalExpandedStyle = {
2497
2500
  ...modalStyle,
2498
2501
  width: "calc(100vw - 48px)",
2499
- height: "calc(100vh - 48px)",
2500
- maxHeight: "none",
2502
+ height: "calc(100dvh - 48px)",
2501
2503
  overflowY: "hidden",
2502
2504
  display: "flex",
2503
2505
  flexDirection: "column"
@@ -2511,6 +2513,7 @@ var bodyRowStyle = {
2511
2513
  var leftColStyle = {
2512
2514
  flex: "0 0 min(420px, 38vw)",
2513
2515
  overflowY: "auto",
2516
+ overscrollBehaviorY: "contain",
2514
2517
  minHeight: 0,
2515
2518
  paddingRight: 4
2516
2519
  };
@@ -2529,6 +2532,11 @@ var checkboxRowStyle = {
2529
2532
  marginBottom: 12,
2530
2533
  fontSize: 13
2531
2534
  };
2535
+ var modeTogglesStyle = {
2536
+ display: "flex",
2537
+ flexWrap: "wrap",
2538
+ columnGap: 20
2539
+ };
2532
2540
  var meterLevelStyle = {
2533
2541
  position: "absolute",
2534
2542
  left: 0,
@@ -3374,33 +3382,35 @@ function RecorderModal({
3374
3382
  }) })
3375
3383
  ] }, group.label)) }),
3376
3384
  /* @__PURE__ */ jsx6("p", { style: summaryStyle, children: narrationRecording ? narrationCaptureSummary(stage.recorder.withCamera) : captureSummary(micOn, cameraOn, screenOn, includeSystemAudio) }),
3377
- narrationAvailable && /* @__PURE__ */ jsxs5("label", { style: checkboxRowStyle, children: [
3378
- /* @__PURE__ */ jsx6(
3379
- "input",
3380
- {
3381
- type: "checkbox",
3382
- style: { accentColor: "var(--squisq-recorder-accent)" },
3383
- checked: narrationOn,
3384
- onChange: (e) => setPanelMode(panelModeAfterToggle(panelMode, "narration", e.target.checked)),
3385
- disabled: narrationToggleDisabled,
3386
- title: narrationToggleDisabled ? narrationRecording ? "Finish or discard the narration take first" : "Save or discard this recording before switching modes" : void 0
3387
- }
3388
- ),
3389
- "Show narration mode"
3390
- ] }),
3391
- slidesAvailable && /* @__PURE__ */ jsxs5("label", { style: checkboxRowStyle, children: [
3392
- /* @__PURE__ */ jsx6(
3393
- "input",
3394
- {
3395
- type: "checkbox",
3396
- style: { accentColor: "var(--squisq-recorder-accent)" },
3397
- checked: slidesOn,
3398
- onChange: (e) => setPanelMode(panelModeAfterToggle(panelMode, "slides", e.target.checked)),
3399
- disabled: narrationToggleDisabled,
3400
- title: narrationToggleDisabled ? "Save or discard this recording before switching modes" : void 0
3401
- }
3402
- ),
3403
- "Show slides mode"
3385
+ /* @__PURE__ */ jsxs5("div", { style: modeTogglesStyle, children: [
3386
+ narrationAvailable && /* @__PURE__ */ jsxs5("label", { style: checkboxRowStyle, children: [
3387
+ /* @__PURE__ */ jsx6(
3388
+ "input",
3389
+ {
3390
+ type: "checkbox",
3391
+ style: { accentColor: "var(--squisq-recorder-accent)" },
3392
+ checked: narrationOn,
3393
+ onChange: (e) => setPanelMode(panelModeAfterToggle(panelMode, "narration", e.target.checked)),
3394
+ disabled: narrationToggleDisabled,
3395
+ title: narrationToggleDisabled ? narrationRecording ? "Finish or discard the narration take first" : "Save or discard this recording before switching modes" : void 0
3396
+ }
3397
+ ),
3398
+ "Show narration mode"
3399
+ ] }),
3400
+ slidesAvailable && /* @__PURE__ */ jsxs5("label", { style: checkboxRowStyle, children: [
3401
+ /* @__PURE__ */ jsx6(
3402
+ "input",
3403
+ {
3404
+ type: "checkbox",
3405
+ style: { accentColor: "var(--squisq-recorder-accent)" },
3406
+ checked: slidesOn,
3407
+ onChange: (e) => setPanelMode(panelModeAfterToggle(panelMode, "slides", e.target.checked)),
3408
+ disabled: narrationToggleDisabled,
3409
+ title: narrationToggleDisabled ? "Save or discard this recording before switching modes" : void 0
3410
+ }
3411
+ ),
3412
+ "Show slides mode"
3413
+ ] })
3404
3414
  ] }),
3405
3415
  /* @__PURE__ */ jsx6(
3406
3416
  RecorderDeviceQuickPicks,
@@ -19,7 +19,7 @@ import {
19
19
  useDictationState,
20
20
  useEditorContext,
21
21
  useEditorContextOptional
22
- } from "./chunk-4SZ3UWSL.js";
22
+ } from "./chunk-SKKA3YFF.js";
23
23
  import {
24
24
  monacoLanguageRequestKey,
25
25
  monacoLanguagesForDocument,
@@ -49,7 +49,7 @@ import {
49
49
  documentTitleFromFileName,
50
50
  resolveBlockVisual,
51
51
  useModalDialog
52
- } from "./chunk-IT3NPQ4J.js";
52
+ } from "./chunk-TCGWKYME.js";
53
53
  import {
54
54
  Icon
55
55
  } from "./chunk-UYB5CPRE.js";
@@ -3410,6 +3410,9 @@ function controlKeysForMode(displayMode, hasVideoMedia) {
3410
3410
  if (displayMode === "linear") {
3411
3411
  return keys.filter((key) => key !== "format" && key !== "captions");
3412
3412
  }
3413
+ if (displayMode === "slideshow") {
3414
+ return keys.filter((key) => key !== "captions");
3415
+ }
3413
3416
  return keys;
3414
3417
  }
3415
3418
  var PREVIEW_POPOVER_GAP = 4;
@@ -12433,8 +12436,7 @@ function slicePastHeading(doc, headingNode) {
12433
12436
  }
12434
12437
  return out;
12435
12438
  }
12436
- function findBlockSliceAtLine(source, lineNumber) {
12437
- const doc = parseMarkdown3(source);
12439
+ function findBlockSliceAtLineInDoc(doc, lineNumber) {
12438
12440
  for (const node2 of doc.children) {
12439
12441
  if (node2.type !== "heading") continue;
12440
12442
  const pos = node2.position;
@@ -12446,7 +12448,9 @@ function findBlockSliceAtLine(source, lineNumber) {
12446
12448
  return null;
12447
12449
  }
12448
12450
  function findBlockSliceByHeadingIndex(source, headingIndex) {
12449
- const doc = parseMarkdown3(source);
12451
+ return findBlockSliceByHeadingIndexInDoc(parseMarkdown3(source), headingIndex);
12452
+ }
12453
+ function findBlockSliceByHeadingIndexInDoc(doc, headingIndex) {
12450
12454
  let seen = 0;
12451
12455
  for (const node2 of doc.children) {
12452
12456
  if (node2.type !== "heading") continue;
@@ -19565,6 +19569,7 @@ function Toolbar({
19565
19569
  const {
19566
19570
  activeView,
19567
19571
  markdownSource,
19572
+ markdownDoc,
19568
19573
  doc,
19569
19574
  setMarkdownSource,
19570
19575
  tiptapEditor,
@@ -20776,17 +20781,17 @@ ${TASK_LIST_MARKDOWN}
20776
20781
  }, [isWysiwyg, tiptapEditor]);
20777
20782
  const currentTemplate = isWysiwyg ? wysiwygTemplate : isRawView ? rawTemplate : null;
20778
20783
  const recommendedTemplates = useMemo24(() => {
20779
- if (currentTemplate === null) return void 0;
20784
+ if (currentTemplate === null || !markdownDoc) return void 0;
20780
20785
  let slice = null;
20781
20786
  if (isRawView && rawHeadingLine !== null) {
20782
- slice = findBlockSliceAtLine(markdownSource, rawHeadingLine);
20787
+ slice = findBlockSliceAtLineInDoc(markdownDoc, rawHeadingLine);
20783
20788
  } else if (isWysiwyg && wysiwygHeadingIndex !== null) {
20784
- slice = findBlockSliceByHeadingIndex(markdownSource, wysiwygHeadingIndex);
20789
+ slice = findBlockSliceByHeadingIndexInDoc(markdownDoc, wysiwygHeadingIndex);
20785
20790
  }
20786
20791
  if (slice === null) return void 0;
20787
20792
  const profile = profileBlockContents(slice);
20788
20793
  return recommendTemplatesForBlock(profile, TEMPLATE_NAMES).recommended;
20789
- }, [currentTemplate, isRawView, isWysiwyg, rawHeadingLine, wysiwygHeadingIndex, markdownSource]);
20794
+ }, [currentTemplate, isRawView, isWysiwyg, rawHeadingLine, wysiwygHeadingIndex, markdownDoc]);
20790
20795
  const templatePreviewBlock = useMemo24(() => {
20791
20796
  if (!doc || currentTemplate === null) return null;
20792
20797
  const flat = flattenBlocks(doc.blocks);
@@ -34622,6 +34627,10 @@ function WysiwygEditor({
34622
34627
  initialDisplayBodyRef.current = body;
34623
34628
  }
34624
34629
  }
34630
+ const initialContentRef = useRef48(void 0);
34631
+ if (initialContentRef.current === void 0) {
34632
+ initialContentRef.current = markdownToTiptap(initialDisplayBodyRef.current);
34633
+ }
34625
34634
  const submitOnEnterRef = useRef48(submitOnEnter);
34626
34635
  useEffect50(() => {
34627
34636
  submitOnEnterRef.current = submitOnEnter;
@@ -34695,7 +34704,7 @@ function WysiwygEditor({
34695
34704
  ReviewExtension,
34696
34705
  DictationExtension
34697
34706
  ],
34698
- content: markdownToTiptap(initialDisplayBodyRef.current),
34707
+ content: initialContentRef.current,
34699
34708
  onUpdate: ({ editor: ed }) => {
34700
34709
  if (isExternalUpdate.current || externalApplyPendingRef.current) return;
34701
34710
  const bodyMd = persistFromWrite(tiptapToMarkdown(ed.getHTML()), wrapStateRef.current);
@@ -35223,6 +35232,7 @@ import { VIEWPORT_PRESETS as VIEWPORT_PRESETS5 } from "@bendyline/squisq/schemas
35223
35232
  import {
35224
35233
  flattenBlocks as flattenBlocks4,
35225
35234
  materializeBlockLayers as materializeBlockLayers2,
35235
+ coerceTemplateParams as coerceTemplateParams2,
35226
35236
  DEFAULT_THEME as DEFAULT_THEME5,
35227
35237
  deriveTemplateInputs as deriveTemplateInputs2
35228
35238
  } from "@bendyline/squisq/doc";
@@ -35721,8 +35731,11 @@ function InlinePreviewGutter({
35721
35731
  // Forward it before authored params/overrides so document-mode cards
35722
35732
  // render the same CSV/XLSX data as block and full-preview modes.
35723
35733
  ...block.templateData,
35724
- ...annotation.params,
35725
- ...block.templateOverrides
35734
+ // Authored `{[…]}` params are raw strings. Coerce them per the
35735
+ // template's input descriptors, as the full preview does, or a
35736
+ // template with structured inputs renders nothing — twoColumn needs
35737
+ // `left="Web|Start in a browser"` as `{ label, sublabel }`.
35738
+ ...coerceTemplateParams2(template, { ...annotation.params, ...block.templateOverrides }).input
35726
35739
  };
35727
35740
  const ctx = {
35728
35741
  blockIndex: index2,
@@ -39343,6 +39356,7 @@ import {
39343
39356
  useState as useState73
39344
39357
  } from "react";
39345
39358
  import { createPortal as createPortal17 } from "react-dom";
39359
+ import { inferDocumentTitle as inferDocumentTitle2 } from "@bendyline/squisq/markdown";
39346
39360
  import { jsx as jsx80, jsxs as jsxs65 } from "react/jsx-runtime";
39347
39361
  var PresentationModeContext = createContext6(null);
39348
39362
  function usePresentationMode() {
@@ -39430,8 +39444,9 @@ function preparePopupDocument(popup, sourceRoot, title, colorScheme, presentatio
39430
39444
  doc.body.appendChild(root);
39431
39445
  return root;
39432
39446
  }
39433
- function presentationTitle(docTitle) {
39434
- return typeof docTitle === "string" && docTitle.trim() ? `${docTitle.trim()} - Presentation` : "Squisq Presentation";
39447
+ function presentationTitle(markdownDoc) {
39448
+ const title = markdownDoc ? inferDocumentTitle2(markdownDoc) : void 0;
39449
+ return title ? `${title} - Presentation` : "Presentation";
39435
39450
  }
39436
39451
  function PresentationModeProvider({
39437
39452
  rootRef,
@@ -39439,7 +39454,7 @@ function PresentationModeProvider({
39439
39454
  allowWindow = true,
39440
39455
  allowFullscreen = true
39441
39456
  }) {
39442
- const { activeView, colorScheme, doc } = useEditorContext();
39457
+ const { activeView, colorScheme, markdownDoc } = useEditorContext();
39443
39458
  const { activeTheme } = usePreviewSettings();
39444
39459
  const popupNameId = useId15().replace(/[^a-zA-Z0-9_-]/g, "");
39445
39460
  const [selectedTarget, setSelectedTarget] = useState73("control");
@@ -39507,84 +39522,90 @@ function PresentationModeProvider({
39507
39522
  }
39508
39523
  setActiveTarget(null);
39509
39524
  }, [releasePopup, rootRef]);
39510
- const start = useCallback51(async () => {
39511
- setError(null);
39512
- const root = rootRef.current;
39513
- if (!root) return;
39514
- const activeElement = root.ownerDocument.activeElement;
39515
- returnFocusRef.current = activeElement instanceof HTMLElement ? activeElement : null;
39516
- if (selectedTarget === "control") {
39517
- setActiveTarget("control");
39518
- return;
39519
- }
39520
- if (selectedTarget === "fullscreen") {
39521
- if (!allowFullscreen) return;
39522
- if (typeof root.requestFullscreen !== "function") {
39523
- setError("Full screen is unavailable here.");
39525
+ const start = useCallback51(
39526
+ async (requestedTarget) => {
39527
+ const target = requestedTarget ?? selectedTarget;
39528
+ if (!availableTargets.includes(target)) return;
39529
+ setError(null);
39530
+ const root = rootRef.current;
39531
+ if (!root) return;
39532
+ const activeElement = root.ownerDocument.activeElement;
39533
+ returnFocusRef.current = activeElement instanceof HTMLElement ? activeElement : null;
39534
+ if (target === "control") {
39535
+ setActiveTarget("control");
39524
39536
  return;
39525
39537
  }
39538
+ if (target === "fullscreen") {
39539
+ if (!allowFullscreen) return;
39540
+ if (typeof root.requestFullscreen !== "function") {
39541
+ setError("Full screen is unavailable here.");
39542
+ return;
39543
+ }
39544
+ try {
39545
+ await root.requestFullscreen({ navigationUI: "hide" });
39546
+ setActiveTarget("fullscreen");
39547
+ } catch {
39548
+ setError("Could not enter full screen.");
39549
+ }
39550
+ return;
39551
+ }
39552
+ if (!allowWindow) return;
39553
+ let popup = null;
39526
39554
  try {
39527
- await root.requestFullscreen({ navigationUI: "hide" });
39528
- setActiveTarget("fullscreen");
39555
+ const screenWidth = window.screen?.availWidth || POPUP_WIDTH;
39556
+ const screenHeight = window.screen?.availHeight || POPUP_HEIGHT;
39557
+ const width = Math.min(POPUP_WIDTH, Math.max(640, Math.round(screenWidth * 0.9)));
39558
+ const height = Math.min(POPUP_HEIGHT, Math.max(480, Math.round(screenHeight * 0.9)));
39559
+ popup = window.open(
39560
+ "",
39561
+ `squisq-presentation-${popupNameId}`,
39562
+ `popup=yes,width=${width},height=${height}`
39563
+ );
39564
+ if (!popup) throw new Error("Popup blocked");
39565
+ const nextRoot = preparePopupDocument(
39566
+ popup,
39567
+ root,
39568
+ presentationTitle(markdownDoc),
39569
+ colorScheme,
39570
+ activeTheme.colors.background
39571
+ );
39572
+ popupRef.current = popup;
39573
+ setPopupRoot(nextRoot);
39574
+ setActiveTarget("window");
39575
+ const handlePageHide = () => releasePopup(false);
39576
+ const handlePopupKeyDown = (event) => {
39577
+ if (event.key === "Escape") releasePopup(true);
39578
+ };
39579
+ popup.addEventListener("pagehide", handlePageHide);
39580
+ popup.document.addEventListener("keydown", handlePopupKeyDown);
39581
+ const closedPoll = window.setInterval(() => {
39582
+ if (popup?.closed) releasePopup(false);
39583
+ }, 500);
39584
+ popupCleanupRef.current = () => {
39585
+ popup?.removeEventListener("pagehide", handlePageHide);
39586
+ popup?.document.removeEventListener("keydown", handlePopupKeyDown);
39587
+ window.clearInterval(closedPoll);
39588
+ };
39589
+ popup.focus();
39529
39590
  } catch {
39530
- setError("Could not enter full screen.");
39591
+ if (popupRef.current) releasePopup(true);
39592
+ else if (popup && !popup.closed) popup.close();
39593
+ setError("The presentation window was blocked. Allow pop-ups and try again.");
39531
39594
  }
39532
- return;
39533
- }
39534
- if (!allowWindow) return;
39535
- let popup = null;
39536
- try {
39537
- const screenWidth = window.screen?.availWidth || POPUP_WIDTH;
39538
- const screenHeight = window.screen?.availHeight || POPUP_HEIGHT;
39539
- const width = Math.min(POPUP_WIDTH, Math.max(640, Math.round(screenWidth * 0.9)));
39540
- const height = Math.min(POPUP_HEIGHT, Math.max(480, Math.round(screenHeight * 0.9)));
39541
- popup = window.open(
39542
- "",
39543
- `squisq-presentation-${popupNameId}`,
39544
- `popup=yes,width=${width},height=${height}`
39545
- );
39546
- if (!popup) throw new Error("Popup blocked");
39547
- const nextRoot = preparePopupDocument(
39548
- popup,
39549
- root,
39550
- presentationTitle(doc?.frontmatter?.title),
39551
- colorScheme,
39552
- activeTheme.colors.background
39553
- );
39554
- popupRef.current = popup;
39555
- setPopupRoot(nextRoot);
39556
- setActiveTarget("window");
39557
- const handlePageHide = () => releasePopup(false);
39558
- const handlePopupKeyDown = (event) => {
39559
- if (event.key === "Escape") releasePopup(true);
39560
- };
39561
- popup.addEventListener("pagehide", handlePageHide);
39562
- popup.document.addEventListener("keydown", handlePopupKeyDown);
39563
- const closedPoll = window.setInterval(() => {
39564
- if (popup?.closed) releasePopup(false);
39565
- }, 500);
39566
- popupCleanupRef.current = () => {
39567
- popup?.removeEventListener("pagehide", handlePageHide);
39568
- popup?.document.removeEventListener("keydown", handlePopupKeyDown);
39569
- window.clearInterval(closedPoll);
39570
- };
39571
- popup.focus();
39572
- } catch {
39573
- if (popupRef.current) releasePopup(true);
39574
- else if (popup && !popup.closed) popup.close();
39575
- setError("The presentation window was blocked. Allow pop-ups and try again.");
39576
- }
39577
- }, [
39578
- allowFullscreen,
39579
- allowWindow,
39580
- activeTheme.colors.background,
39581
- colorScheme,
39582
- doc?.frontmatter?.title,
39583
- popupNameId,
39584
- releasePopup,
39585
- rootRef,
39586
- selectedTarget
39587
- ]);
39595
+ },
39596
+ [
39597
+ allowFullscreen,
39598
+ allowWindow,
39599
+ activeTheme.colors.background,
39600
+ availableTargets,
39601
+ colorScheme,
39602
+ markdownDoc,
39603
+ popupNameId,
39604
+ releasePopup,
39605
+ rootRef,
39606
+ selectedTarget
39607
+ ]
39608
+ );
39588
39609
  const selectTarget = useCallback51(
39589
39610
  (target) => {
39590
39611
  if (!availableTargets.includes(target)) return;
@@ -39909,8 +39930,10 @@ function PresentationModeControl() {
39909
39930
  tabIndex: isSelected ? 0 : -1,
39910
39931
  disabled,
39911
39932
  onClick: () => {
39933
+ const alreadyThere = activeTarget === option.target;
39912
39934
  selectTarget(option.target);
39913
39935
  closeMenu(true);
39936
+ if (!alreadyThere) void start(option.target);
39914
39937
  },
39915
39938
  children: [
39916
39939
  /* @__PURE__ */ jsx80(
package/dist/index.d.ts CHANGED
@@ -125,7 +125,7 @@ interface BlockNavigator {
125
125
  editorSource: string;
126
126
  /** What the bound editor writes through: splices back into the full source (block mode). */
127
127
  setEditorSource: (s: string) => void;
128
- /** Number of navigable blocks in the current source. */
128
+ /** Number of navigable blocks in the current source; 0 while disabled. */
129
129
  blockCount: number;
130
130
  /** Index of the active block (clamped into range). */
131
131
  activeBlockKey: number;
@@ -150,7 +150,9 @@ interface BlockNavigator {
150
150
  interface UseBlockNavigatorOptions {
151
151
  /**
152
152
  * When false (the default), the channel passes through to the full source
153
- * and navigation is inert. Hosts flip this on to enter block-at-a-time mode.
153
+ * and navigation is inert: the source is not sliced, so `blockCount` is 0
154
+ * and `activeBlockStartLine` is null. Hosts flip this on to enter
155
+ * block-at-a-time mode.
154
156
  */
155
157
  enabled?: boolean;
156
158
  }
package/dist/index.js CHANGED
@@ -233,7 +233,7 @@ import {
233
233
  videoEmbedParagraphJson,
234
234
  viewStateFromBinding,
235
235
  writeHeadingViewState
236
- } from "./chunk-RQZA4BGN.js";
236
+ } from "./chunk-WA7KBG3D.js";
237
237
  import {
238
238
  EditorProvider,
239
239
  applySourceEditsToText,
@@ -254,7 +254,7 @@ import {
254
254
  useBlockNavigator,
255
255
  useEditorContext,
256
256
  useEditorInsertMenuItems
257
- } from "./chunk-4SZ3UWSL.js";
257
+ } from "./chunk-SKKA3YFF.js";
258
258
  import {
259
259
  SPEECH_INPUT_SAMPLE_RATE,
260
260
  isSpeechInputProviderFactory,
@@ -280,7 +280,7 @@ import {
280
280
  } from "./chunk-HLU6ZBS7.js";
281
281
  import {
282
282
  RecorderButton
283
- } from "./chunk-4HZMZPWD.js";
283
+ } from "./chunk-H3XGOKPT.js";
284
284
  import {
285
285
  RecorderDeviceQuickPicks,
286
286
  RecorderDeviceSettingsPanel,
@@ -305,7 +305,7 @@ import {
305
305
  unshownSlidesWarning,
306
306
  useMediaDevices,
307
307
  useMediaRecorder
308
- } from "./chunk-IT3NPQ4J.js";
308
+ } from "./chunk-TCGWKYME.js";
309
309
  import {
310
310
  DEFAULT_RECORDER_DEVICE_SETTINGS,
311
311
  buildRecorderAudioConstraints,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  RecorderButton
3
- } from "../chunk-4HZMZPWD.js";
3
+ } from "../chunk-H3XGOKPT.js";
4
4
  import {
5
5
  RecorderDeviceQuickPicks,
6
6
  RecorderDeviceSettingsPanel,
@@ -14,7 +14,7 @@ import {
14
14
  requestScreenStream,
15
15
  useMediaDevices,
16
16
  useMediaRecorder
17
- } from "../chunk-IT3NPQ4J.js";
17
+ } from "../chunk-TCGWKYME.js";
18
18
  import {
19
19
  DEFAULT_RECORDER_DEVICE_SETTINGS,
20
20
  buildRecorderAudioConstraints,
@@ -19,7 +19,7 @@ import {
19
19
  updateReviewDecorations,
20
20
  useReview,
21
21
  useReviewState
22
- } from "../chunk-4SZ3UWSL.js";
22
+ } from "../chunk-SKKA3YFF.js";
23
23
  import "../chunk-DNEVUOBZ.js";
24
24
  import "../chunk-WMNL2WEI.js";
25
25
 
@@ -5,18 +5,18 @@ import {
5
5
  RawEditor,
6
6
  WysiwygEditor,
7
7
  useEditorContextMenuItems
8
- } from "../chunk-RQZA4BGN.js";
8
+ } from "../chunk-WA7KBG3D.js";
9
9
  import {
10
10
  EditorProvider,
11
11
  useEditorContext,
12
12
  useEditorInsertMenuItems
13
- } from "../chunk-4SZ3UWSL.js";
13
+ } from "../chunk-SKKA3YFF.js";
14
14
  import "../chunk-DNEVUOBZ.js";
15
15
  import "../chunk-V4NBQF5C.js";
16
16
  import "../chunk-KI5XQWRU.js";
17
17
  import "../chunk-WMNL2WEI.js";
18
18
  import "../chunk-HLU6ZBS7.js";
19
- import "../chunk-IT3NPQ4J.js";
19
+ import "../chunk-TCGWKYME.js";
20
20
  import "../chunk-LRZJD5YD.js";
21
21
  import "../chunk-UYB5CPRE.js";
22
22
  import "../chunk-DJS5I5NO.js";
@@ -7657,6 +7657,7 @@
7657
7657
  --squisq-surface-sunken: #f3f4f6;
7658
7658
  --squisq-surface-hover: #f3f4f6;
7659
7659
  --squisq-surface-raised: #e5e7eb;
7660
+ --squisq-surface-overlay: var(--squisq-surface);
7660
7661
  --squisq-input-bg: #ffffff;
7661
7662
  --squisq-row-hover: #f3f4f6;
7662
7663
  --squisq-desk-bg: #dcd8d0;
@@ -7733,6 +7734,7 @@
7733
7734
  --squisq-surface-sunken: #111827;
7734
7735
  --squisq-surface-hover: #374151;
7735
7736
  --squisq-surface-raised: #4b5563;
7737
+ --squisq-surface-overlay: var(--squisq-surface);
7736
7738
  --squisq-input-bg: #374151;
7737
7739
  --squisq-row-hover: #374151;
7738
7740
  --squisq-desk-bg: #0f1219;
@@ -8013,7 +8015,7 @@
8013
8015
  padding: 6px;
8014
8016
  border: 1px solid var(--squisq-border);
8015
8017
  border-radius: 10px;
8016
- background: var(--squisq-surface);
8018
+ background: var(--squisq-surface-overlay);
8017
8019
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.2), 0 2px 6px rgba(15, 23, 42, 0.08);
8018
8020
  box-sizing: border-box;
8019
8021
  font-family:
@@ -8117,7 +8119,7 @@
8117
8119
  }
8118
8120
  .squisq-use-mode-menu[data-theme=dark] {
8119
8121
  border-color: var(--squisq-border);
8120
- background: var(--squisq-surface);
8122
+ background: var(--squisq-surface-overlay);
8121
8123
  }
8122
8124
  .squisq-use-mode-menu[data-theme=dark] .squisq-use-mode-menu-icon {
8123
8125
  background: var(--squisq-surface-hover);
@@ -8615,7 +8617,7 @@
8615
8617
  min-width: 220px;
8616
8618
  max-width: 280px;
8617
8619
  padding: 4px 0;
8618
- background: var(--squisq-surface);
8620
+ background: var(--squisq-surface-overlay);
8619
8621
  border: 1px solid var(--squisq-border-subtle);
8620
8622
  border-radius: 6px;
8621
8623
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
@@ -8696,7 +8698,7 @@
8696
8698
  overflow-y: auto;
8697
8699
  overscroll-behavior: contain;
8698
8700
  font-family: var( --squisq-ux-font, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif );
8699
- background: var(--squisq-surface);
8701
+ background: var(--squisq-surface-overlay);
8700
8702
  border: 1px solid var(--squisq-border-subtle);
8701
8703
  border-radius: 6px;
8702
8704
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
@@ -8716,7 +8718,7 @@
8716
8718
  border-top: 1px solid var(--squisq-border-subtle);
8717
8719
  }
8718
8720
  .squisq-insert-menu[data-theme=dark] {
8719
- background: var(--squisq-surface);
8721
+ background: var(--squisq-surface-overlay);
8720
8722
  border-color: var(--squisq-border-subtle);
8721
8723
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
8722
8724
  }
@@ -8791,7 +8793,7 @@
8791
8793
  padding: 8px 8px 8px 12px;
8792
8794
  border: 1px solid var(--squisq-danger-border);
8793
8795
  border-radius: 8px;
8794
- background: var(--squisq-surface);
8796
+ background: var(--squisq-surface-overlay);
8795
8797
  box-shadow: var(--squisq-shadow-md);
8796
8798
  color: var(--squisq-danger-text);
8797
8799
  font-size: 12px;
@@ -8889,7 +8891,7 @@
8889
8891
  margin: 0 -8px 4px;
8890
8892
  padding: 12px 14px 10px;
8891
8893
  color: var(--squisq-text-strong);
8892
- background: var(--squisq-surface);
8894
+ background: var(--squisq-surface-overlay);
8893
8895
  border-bottom: 1px solid var(--squisq-border-subtle);
8894
8896
  }
8895
8897
  .squisq-mermaid-type-menu-heading strong {
@@ -8980,7 +8982,7 @@
8980
8982
  }
8981
8983
  .squisq-mermaid-type-menu[data-theme=dark] .squisq-mermaid-type-menu-heading {
8982
8984
  color: var(--squisq-text-strong);
8983
- background: var(--squisq-surface);
8985
+ background: var(--squisq-surface-overlay);
8984
8986
  border-bottom-color: var(--squisq-border-subtle);
8985
8987
  }
8986
8988
  .squisq-mermaid-type-menu[data-theme=dark] .squisq-mermaid-type-card {
@@ -10988,7 +10990,7 @@
10988
10990
  border-left-color: var(--squisq-border);
10989
10991
  }
10990
10992
  .squisq-editor-shell[data-theme=dark] .squisq-toolbar-overflow-menu {
10991
- background: var(--squisq-surface);
10993
+ background: var(--squisq-surface-overlay);
10992
10994
  border-color: var(--squisq-border-subtle);
10993
10995
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
10994
10996
  }
@@ -11040,7 +11042,7 @@
11040
11042
  color: var(--squisq-text-strong);
11041
11043
  }
11042
11044
  .squisq-editor-shell[data-theme=dark] .squisq-template-gallery {
11043
- background: var(--squisq-surface);
11045
+ background: var(--squisq-surface-overlay);
11044
11046
  border-color: var(--squisq-border-subtle);
11045
11047
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.2);
11046
11048
  }
@@ -11528,7 +11530,7 @@
11528
11530
  padding: 4px;
11529
11531
  border: 1px solid var(--squisq-border);
11530
11532
  border-radius: 6px;
11531
- background: var(--squisq-surface);
11533
+ background: var(--squisq-surface-overlay);
11532
11534
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.12);
11533
11535
  }
11534
11536
  .squisq-media-bin-context-menu-item {
@@ -11815,7 +11817,7 @@
11815
11817
  max-width: 320px;
11816
11818
  max-height: 240px;
11817
11819
  overflow-y: auto;
11818
- background: var(--squisq-surface);
11820
+ background: var(--squisq-surface-overlay);
11819
11821
  border: 1px solid rgba(0, 0, 0, 0.12);
11820
11822
  border-radius: 6px;
11821
11823
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
@@ -12172,7 +12174,7 @@
12172
12174
  gap: 12px;
12173
12175
  }
12174
12176
  .squisq-editor-shell[data-theme=dark] .squisq-version-history-popover {
12175
- background: var(--squisq-surface);
12177
+ background: var(--squisq-surface-overlay);
12176
12178
  border-color: var(--squisq-border-subtle);
12177
12179
  color: var(--squisq-text-soft);
12178
12180
  }
@@ -12344,7 +12346,7 @@ button.squisq-view-menu-radio-row:focus-visible {
12344
12346
  margin: 6px 0;
12345
12347
  }
12346
12348
  .squisq-editor-shell[data-theme=dark] .squisq-view-menu-popover {
12347
- background: var(--squisq-surface);
12349
+ background: var(--squisq-surface-overlay);
12348
12350
  border-color: var(--squisq-border-subtle);
12349
12351
  color: var(--squisq-text-soft);
12350
12352
  }
@@ -12603,7 +12605,7 @@ button.squisq-view-menu-radio-row:focus-visible {
12603
12605
  background: rgba(59, 130, 246, 0.12);
12604
12606
  }
12605
12607
  .squisq-editor-shell[data-theme=dark] .squisq-theme-customizer-popover {
12606
- background: var(--squisq-surface);
12608
+ background: var(--squisq-surface-overlay);
12607
12609
  border-color: var(--squisq-border-subtle);
12608
12610
  color: var(--squisq-text-soft);
12609
12611
  }
@@ -14250,7 +14252,7 @@ button.squisq-view-menu-radio-row:focus-visible {
14250
14252
  color: var(--squisq-text);
14251
14253
  }
14252
14254
  .squisq-editor-shell[data-theme=dark] .squisq-theme-picker-popover {
14253
- background: var(--squisq-surface);
14255
+ background: var(--squisq-surface-overlay);
14254
14256
  border-color: var(--squisq-border-subtle);
14255
14257
  color: var(--squisq-text);
14256
14258
  }
@@ -14932,7 +14934,7 @@ button.squisq-view-menu-radio-row:focus-visible {
14932
14934
  color: var(--squisq-text-muted);
14933
14935
  }
14934
14936
  .squisq-editor-shell[data-theme=dark] .squisq-transform-menu-popover {
14935
- background: var(--squisq-surface);
14937
+ background: var(--squisq-surface-overlay);
14936
14938
  border-color: var(--squisq-border-subtle);
14937
14939
  color: var(--squisq-text-soft);
14938
14940
  }
@@ -16345,7 +16347,7 @@ button.squisq-view-menu-radio-row:focus-visible {
16345
16347
  flex-direction: column;
16346
16348
  width: 100%;
16347
16349
  height: 100%;
16348
- background: var(--squisq-surface);
16350
+ background: var(--squisq-surface-overlay);
16349
16351
  border-radius: 6px;
16350
16352
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
16351
16353
  overflow: hidden;
@@ -16365,7 +16367,7 @@ button.squisq-view-menu-radio-row:focus-visible {
16365
16367
  background: var(--squisq-bg);
16366
16368
  }
16367
16369
  [data-theme=dark] .squisq-image-edit-modal__header {
16368
- background: var(--squisq-surface);
16370
+ background: var(--squisq-surface-overlay);
16369
16371
  border-bottom-color: var(--squisq-border-subtle);
16370
16372
  }
16371
16373
  .squisq-image-edit-modal__title {
@@ -16476,7 +16478,7 @@ button.squisq-view-menu-radio-row:focus-visible {
16476
16478
  flex-direction: column;
16477
16479
  width: min(560px, 100%);
16478
16480
  max-height: 100%;
16479
- background: var(--squisq-surface);
16481
+ background: var(--squisq-surface-overlay);
16480
16482
  color: var(--squisq-editor-text);
16481
16483
  border-radius: 6px;
16482
16484
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
@@ -17217,7 +17219,7 @@ button.squisq-view-menu-radio-row:focus-visible {
17217
17219
  padding: 3px;
17218
17220
  border: 1px solid var(--squisq-border);
17219
17221
  border-radius: 7px;
17220
- background: var(--squisq-surface);
17222
+ background: var(--squisq-surface-overlay);
17221
17223
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
17222
17224
  transform: translate(-50%, calc(-100% - 8px));
17223
17225
  }
@@ -17309,7 +17311,7 @@ button.squisq-view-menu-radio-row:focus-visible {
17309
17311
  padding: 8px;
17310
17312
  border: 1px solid var(--squisq-border);
17311
17313
  border-radius: 8px;
17312
- background: var(--squisq-surface);
17314
+ background: var(--squisq-surface-overlay);
17313
17315
  color: var(--squisq-text);
17314
17316
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
17315
17317
  }
@@ -18965,7 +18967,7 @@ button.squisq-ascii-timeline-track-name:focus-visible {
18965
18967
  padding: 4px;
18966
18968
  border: 1px solid var(--squisq-border);
18967
18969
  border-radius: 8px;
18968
- background: var(--squisq-surface);
18970
+ background: var(--squisq-surface-overlay);
18969
18971
  box-shadow: var(--squisq-shadow-lg);
18970
18972
  color: var(--squisq-text);
18971
18973
  font-family: var(--squisq-ux-font, system-ui, sans-serif);
@@ -19199,7 +19201,7 @@ button.squisq-ascii-timeline-track-name:focus-visible {
19199
19201
  .squisq-proof-menu {
19200
19202
  min-width: 200px;
19201
19203
  max-width: 320px;
19202
- background: var(--squisq-surface);
19204
+ background: var(--squisq-surface-overlay);
19203
19205
  border: 1px solid var(--squisq-border);
19204
19206
  border-radius: 8px;
19205
19207
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
@@ -19246,7 +19248,7 @@ button.squisq-ascii-timeline-track-name:focus-visible {
19246
19248
  }
19247
19249
  .squisq-proof-tooltip {
19248
19250
  max-width: 320px;
19249
- background: var(--squisq-surface);
19251
+ background: var(--squisq-surface-overlay);
19250
19252
  border: 1px solid var(--squisq-border);
19251
19253
  border-radius: 8px;
19252
19254
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
@@ -19391,7 +19393,7 @@ button.squisq-ascii-timeline-track-name:focus-visible {
19391
19393
  color: var(--squisq-text-faint);
19392
19394
  }
19393
19395
  .squisq-proof-menu[data-theme=dark] {
19394
- background: var(--squisq-surface);
19396
+ background: var(--squisq-surface-overlay);
19395
19397
  border-color: var(--squisq-border);
19396
19398
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
19397
19399
  }
@@ -19407,7 +19409,7 @@ button.squisq-ascii-timeline-track-name:focus-visible {
19407
19409
  background: var(--squisq-surface-hover);
19408
19410
  }
19409
19411
  .squisq-proof-tooltip[data-theme=dark] {
19410
- background: var(--squisq-surface);
19412
+ background: var(--squisq-surface-overlay);
19411
19413
  border-color: var(--squisq-border);
19412
19414
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
19413
19415
  color: var(--squisq-text-soft);
@@ -19909,7 +19911,7 @@ button.squisq-ascii-timeline-track-name:focus-visible {
19909
19911
  overflow: hidden;
19910
19912
  border: 1px solid var(--squisq-border);
19911
19913
  border-radius: 6px;
19912
- background: var(--squisq-surface);
19914
+ background: var(--squisq-surface-overlay);
19913
19915
  color: var(--squisq-text);
19914
19916
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
19915
19917
  }
@@ -20055,7 +20057,7 @@ button.squisq-ascii-timeline-track-name:focus-visible {
20055
20057
  max-height: 420px;
20056
20058
  display: flex;
20057
20059
  flex-direction: column;
20058
- background: var(--squisq-surface);
20060
+ background: var(--squisq-surface-overlay);
20059
20061
  color: var(--squisq-text);
20060
20062
  border: 1px solid var(--squisq-border-subtle);
20061
20063
  border-radius: 8px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bendyline/squisq-editor-react",
3
- "version": "2.12.0",
3
+ "version": "2.12.2",
4
4
  "description": "React editor shell with raw/WYSIWYG/preview modes for Squisq documents",
5
5
  "license": "MIT",
6
6
  "author": "Bendyline",
@@ -102,12 +102,12 @@
102
102
  }
103
103
  },
104
104
  "dependencies": {
105
- "@bendyline/squisq": "2.12.0",
105
+ "@bendyline/squisq": "2.12.1",
106
106
  "@bendyline/squisq-calc": "2.11.2",
107
- "@bendyline/squisq-formats": "2.7.0",
108
- "@bendyline/squisq-grid-react": "2.11.23",
109
- "@bendyline/squisq-react": "2.12.0",
110
- "@bendyline/squisq-video-react": "2.5.0",
107
+ "@bendyline/squisq-formats": "2.7.1",
108
+ "@bendyline/squisq-grid-react": "2.11.24",
109
+ "@bendyline/squisq-react": "2.12.2",
110
+ "@bendyline/squisq-video-react": "2.5.2",
111
111
  "@fortawesome/fontawesome-free": "7.3.1",
112
112
  "@tiptap/core": "2.27.3",
113
113
  "@tiptap/extension-heading": "2.27.3",