quoin-editor 1.0.1 → 1.0.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.
Files changed (132) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/ai.cjs +78 -78
  3. package/dist/ai.js +6 -6
  4. package/dist/catalogue.cjs +24 -24
  5. package/dist/catalogue.js +16 -16
  6. package/dist/{chunk-BTBHHBVR.cjs → chunk-4SLJNZSM.cjs} +11 -7
  7. package/dist/chunk-4SLJNZSM.cjs.map +1 -0
  8. package/dist/{chunk-62WKUAQY.js → chunk-4XFXB37X.js} +7 -3
  9. package/dist/chunk-4XFXB37X.js.map +1 -0
  10. package/dist/{chunk-56C7GCKO.cjs → chunk-5MAYUGTE.cjs} +97 -97
  11. package/dist/{chunk-56C7GCKO.cjs.map → chunk-5MAYUGTE.cjs.map} +1 -1
  12. package/dist/{chunk-QXG3HWDS.js → chunk-623AOJM2.js} +4 -4
  13. package/dist/{chunk-6YSGUAVW.js → chunk-6NULZPVC.js} +6 -8
  14. package/dist/chunk-6NULZPVC.js.map +1 -0
  15. package/dist/{chunk-XX5FTPJR.cjs → chunk-6V6GGBDK.cjs} +10 -10
  16. package/dist/{chunk-XX5FTPJR.cjs.map → chunk-6V6GGBDK.cjs.map} +1 -1
  17. package/dist/{chunk-CLTHD5GO.cjs → chunk-73653CJ4.cjs} +3 -3
  18. package/dist/{chunk-CLTHD5GO.cjs.map → chunk-73653CJ4.cjs.map} +1 -1
  19. package/dist/{chunk-UBNG5YCG.js → chunk-ADSJ42DO.js} +6 -6
  20. package/dist/{chunk-PX6LZMH4.cjs → chunk-AUOEM3SF.cjs} +44 -44
  21. package/dist/{chunk-PX6LZMH4.cjs.map → chunk-AUOEM3SF.cjs.map} +1 -1
  22. package/dist/{chunk-ESMAW4NK.cjs → chunk-BQANU5BH.cjs} +12 -12
  23. package/dist/{chunk-ESMAW4NK.cjs.map → chunk-BQANU5BH.cjs.map} +1 -1
  24. package/dist/{chunk-UCXLRRWY.js → chunk-C23RQVRK.js} +5 -5
  25. package/dist/{chunk-5R3ISX4A.cjs → chunk-CW3AFJBR.cjs} +288 -295
  26. package/dist/chunk-CW3AFJBR.cjs.map +1 -0
  27. package/dist/{chunk-26Q4LSIU.js → chunk-DUE3HCZD.js} +2 -2
  28. package/dist/{chunk-SSIRYUCK.js → chunk-EPARJI4V.js} +6 -5
  29. package/dist/chunk-EPARJI4V.js.map +1 -0
  30. package/dist/{chunk-V3KLMSRO.cjs → chunk-FDRUAL3Z.cjs} +30 -30
  31. package/dist/{chunk-V3KLMSRO.cjs.map → chunk-FDRUAL3Z.cjs.map} +1 -1
  32. package/dist/{chunk-A4IJSJKL.js → chunk-IQBMAE3F.js} +5 -5
  33. package/dist/{chunk-PIWRSX7U.js → chunk-JHQUHFLX.js} +7 -7
  34. package/dist/{chunk-6PKVJZQV.cjs → chunk-KUYZMSMF.cjs} +8 -8
  35. package/dist/{chunk-6PKVJZQV.cjs.map → chunk-KUYZMSMF.cjs.map} +1 -1
  36. package/dist/{chunk-UDAVVEFC.cjs → chunk-LLTEGXWZ.cjs} +54 -54
  37. package/dist/{chunk-UDAVVEFC.cjs.map → chunk-LLTEGXWZ.cjs.map} +1 -1
  38. package/dist/{chunk-RQW3P3GH.js → chunk-N4FGA3H4.js} +5 -5
  39. package/dist/{chunk-LV6EYPJO.js → chunk-NEZJ7ZP5.js} +2 -2
  40. package/dist/{chunk-UPSLDTLT.js → chunk-OBMBSU2S.js} +3 -3
  41. package/dist/{chunk-WMN6566P.js → chunk-OSHZQR3W.js} +5 -5
  42. package/dist/{chunk-5M4QG3ZC.cjs → chunk-P6KYXFZC.cjs} +116 -115
  43. package/dist/chunk-P6KYXFZC.cjs.map +1 -0
  44. package/dist/{chunk-75C6PX2L.cjs → chunk-R2BLBV43.cjs} +23 -23
  45. package/dist/{chunk-75C6PX2L.cjs.map → chunk-R2BLBV43.cjs.map} +1 -1
  46. package/dist/{chunk-6LMS5J3Y.js → chunk-RJRX34BZ.js} +2 -2
  47. package/dist/{chunk-LE3F7WIP.js → chunk-T43RZTUT.js} +148 -155
  48. package/dist/chunk-T43RZTUT.js.map +1 -0
  49. package/dist/{chunk-MLRAVUFG.cjs → chunk-TLGX43P6.cjs} +17 -19
  50. package/dist/chunk-TLGX43P6.cjs.map +1 -0
  51. package/dist/{chunk-LMAEPFTX.js → chunk-U3LOLYAU.js} +2 -2
  52. package/dist/{chunk-JJ3RASQS.cjs → chunk-UEKXVCKC.cjs} +101 -91
  53. package/dist/chunk-UEKXVCKC.cjs.map +1 -0
  54. package/dist/{chunk-GPIDU3GN.js → chunk-VCLL5C7J.js} +5 -5
  55. package/dist/{chunk-PGSS4IOS.js → chunk-VRS6WCEK.js} +19 -9
  56. package/dist/chunk-VRS6WCEK.js.map +1 -0
  57. package/dist/{chunk-VACTAZWS.cjs → chunk-WEYDDIBQ.cjs} +14 -14
  58. package/dist/{chunk-VACTAZWS.cjs.map → chunk-WEYDDIBQ.cjs.map} +1 -1
  59. package/dist/{chunk-F5V3IEEE.cjs → chunk-X4HDKFW5.cjs} +27 -27
  60. package/dist/{chunk-F5V3IEEE.cjs.map → chunk-X4HDKFW5.cjs.map} +1 -1
  61. package/dist/{chunk-EYFCOV3T.cjs → chunk-X4P4TQXH.cjs} +5 -5
  62. package/dist/{chunk-EYFCOV3T.cjs.map → chunk-X4P4TQXH.cjs.map} +1 -1
  63. package/dist/{chunk-UWNZG2SD.cjs → chunk-XA3UEJIW.cjs} +3 -3
  64. package/dist/{chunk-UWNZG2SD.cjs.map → chunk-XA3UEJIW.cjs.map} +1 -1
  65. package/dist/{chunk-OCCKQHCY.js → chunk-YBMUEEM5.js} +2 -2
  66. package/dist/{chunk-HOIDJEVI.cjs → chunk-ZKVOS57Q.cjs} +217 -217
  67. package/dist/{chunk-HOIDJEVI.cjs.map → chunk-ZKVOS57Q.cjs.map} +1 -1
  68. package/dist/comments.cjs +58 -58
  69. package/dist/comments.js +7 -7
  70. package/dist/diff.cjs +28 -27
  71. package/dist/diff.cjs.map +1 -1
  72. package/dist/diff.js +5 -4
  73. package/dist/diff.js.map +1 -1
  74. package/dist/docx.cjs +30 -30
  75. package/dist/docx.js +3 -3
  76. package/dist/embed.cjs +8 -8
  77. package/dist/embed.js +7 -7
  78. package/dist/emoji.cjs +7 -7
  79. package/dist/emoji.js +6 -6
  80. package/dist/engine.cjs +4 -4
  81. package/dist/engine.js +3 -3
  82. package/dist/find.cjs +7 -7
  83. package/dist/find.js +6 -6
  84. package/dist/headless.cjs +5 -5
  85. package/dist/headless.js +4 -4
  86. package/dist/index.cjs +6 -6
  87. package/dist/index.js +5 -5
  88. package/dist/math.cjs +9 -9
  89. package/dist/math.js +8 -8
  90. package/dist/mention.cjs +9 -9
  91. package/dist/mention.js +8 -8
  92. package/dist/presence.cjs +39 -42
  93. package/dist/presence.cjs.map +1 -1
  94. package/dist/presence.js +9 -12
  95. package/dist/presence.js.map +1 -1
  96. package/dist/stats.cjs +8 -8
  97. package/dist/stats.js +7 -7
  98. package/dist/table.cjs +7 -7
  99. package/dist/table.js +6 -6
  100. package/dist/toc.cjs +7 -7
  101. package/dist/toc.js +6 -6
  102. package/dist/view.cjs +4 -4
  103. package/dist/view.js +2 -2
  104. package/dist/yjs.cjs +223 -171
  105. package/dist/yjs.cjs.map +1 -1
  106. package/dist/yjs.js +104 -52
  107. package/dist/yjs.js.map +1 -1
  108. package/package.json +1 -1
  109. package/dist/chunk-5M4QG3ZC.cjs.map +0 -1
  110. package/dist/chunk-5R3ISX4A.cjs.map +0 -1
  111. package/dist/chunk-62WKUAQY.js.map +0 -1
  112. package/dist/chunk-6YSGUAVW.js.map +0 -1
  113. package/dist/chunk-BTBHHBVR.cjs.map +0 -1
  114. package/dist/chunk-JJ3RASQS.cjs.map +0 -1
  115. package/dist/chunk-LE3F7WIP.js.map +0 -1
  116. package/dist/chunk-MLRAVUFG.cjs.map +0 -1
  117. package/dist/chunk-PGSS4IOS.js.map +0 -1
  118. package/dist/chunk-SSIRYUCK.js.map +0 -1
  119. /package/dist/{chunk-QXG3HWDS.js.map → chunk-623AOJM2.js.map} +0 -0
  120. /package/dist/{chunk-UBNG5YCG.js.map → chunk-ADSJ42DO.js.map} +0 -0
  121. /package/dist/{chunk-UCXLRRWY.js.map → chunk-C23RQVRK.js.map} +0 -0
  122. /package/dist/{chunk-26Q4LSIU.js.map → chunk-DUE3HCZD.js.map} +0 -0
  123. /package/dist/{chunk-A4IJSJKL.js.map → chunk-IQBMAE3F.js.map} +0 -0
  124. /package/dist/{chunk-PIWRSX7U.js.map → chunk-JHQUHFLX.js.map} +0 -0
  125. /package/dist/{chunk-RQW3P3GH.js.map → chunk-N4FGA3H4.js.map} +0 -0
  126. /package/dist/{chunk-LV6EYPJO.js.map → chunk-NEZJ7ZP5.js.map} +0 -0
  127. /package/dist/{chunk-UPSLDTLT.js.map → chunk-OBMBSU2S.js.map} +0 -0
  128. /package/dist/{chunk-WMN6566P.js.map → chunk-OSHZQR3W.js.map} +0 -0
  129. /package/dist/{chunk-6LMS5J3Y.js.map → chunk-RJRX34BZ.js.map} +0 -0
  130. /package/dist/{chunk-LMAEPFTX.js.map → chunk-U3LOLYAU.js.map} +0 -0
  131. /package/dist/{chunk-GPIDU3GN.js.map → chunk-VCLL5C7J.js.map} +0 -0
  132. /package/dist/{chunk-OCCKQHCY.js.map → chunk-YBMUEEM5.js.map} +0 -0
@@ -26,7 +26,7 @@ import {
26
26
  useToggleOpen,
27
27
  visibleBlockIndexes,
28
28
  wholeState
29
- } from "./chunk-SSIRYUCK.js";
29
+ } from "./chunk-EPARJI4V.js";
30
30
  import {
31
31
  blockByType,
32
32
  defineBlock,
@@ -100,10 +100,10 @@ import {
100
100
  unsetLink,
101
101
  unsetMark,
102
102
  validateSelection
103
- } from "./chunk-UPSLDTLT.js";
103
+ } from "./chunk-OBMBSU2S.js";
104
104
  import {
105
105
  sameValue
106
- } from "./chunk-6LMS5J3Y.js";
106
+ } from "./chunk-RJRX34BZ.js";
107
107
  import {
108
108
  PALETTE,
109
109
  SCHEME,
@@ -129,7 +129,7 @@ import {
129
129
  specFor,
130
130
  str,
131
131
  text
132
- } from "./chunk-62WKUAQY.js";
132
+ } from "./chunk-4XFXB37X.js";
133
133
 
134
134
  // src/canvas/BlockCanvas.tsx
135
135
  import { forwardRef as forwardRef8, useImperativeHandle as useImperativeHandle2, useMemo as useMemo17, useState as useState19 } from "react";
@@ -3336,37 +3336,30 @@ function ListMarker(props) {
3336
3336
  return /* @__PURE__ */ jsx36("span", { className: "quoin-marker", "aria-hidden": "true", children: text2 });
3337
3337
  }
3338
3338
 
3339
- // src/blocks/text/TaskCheckbox.tsx
3340
- import { jsx as jsx37 } from "react/jsx-runtime";
3341
- function TaskCheckbox2({ block, controller, labelledBy }) {
3342
- const labels = useLabels();
3343
- return /* @__PURE__ */ jsx37(TaskCheckbox, { block, controller, label: labels.task, labelledBy });
3344
- }
3345
-
3346
3339
  // src/blocks/text/MarkdownBlock.tsx
3347
- import { jsx as jsx38, jsxs as jsxs22 } from "react/jsx-runtime";
3340
+ import { jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
3348
3341
  var REGION = "text";
3349
3342
  var HEADING_LEVELS = ["mt-6 text-3xl", "mt-5 text-2xl", "mt-4 text-xl", "mt-3 text-lg", "mt-3 text-base", "mt-3 text-sm"];
3350
3343
  var headingStyles = (level) => `quoin-heading mb-1 font-semibold leading-tight in-[[data-quoin-block]:first-child]:mt-0 ${HEADING_LEVELS[level - 1]}`;
3351
3344
  function Heading({ block }) {
3352
3345
  const labels = useLabels();
3353
3346
  const level = headingLevel(block.attrs.level);
3354
- return /* @__PURE__ */ jsx38("div", { role: "heading", "aria-level": level, className: headingStyles(level), children: /* @__PURE__ */ jsx38(EditableRegion, { block: block.id, region: REGION, label: labels.heading(level) }) });
3347
+ return /* @__PURE__ */ jsx37("div", { role: "heading", "aria-level": level, className: headingStyles(level), children: /* @__PURE__ */ jsx37(EditableRegion, { block: block.id, region: REGION, label: labels.heading(level) }) });
3355
3348
  }
3356
3349
  function NumberedItem({ block, controller }) {
3357
3350
  const labels = useLabels();
3358
3351
  const number = useOrderedNumber(controller, block.id);
3359
3352
  return /* @__PURE__ */ jsxs22("div", { className: "quoin-list-item", "data-list": "ordered", children: [
3360
- /* @__PURE__ */ jsx38(ListMarker, { list: "ordered", number, depth: block.indent }),
3361
- /* @__PURE__ */ jsx38(EditableRegion, { block: block.id, region: REGION, label: labels.numberedItem(number) })
3353
+ /* @__PURE__ */ jsx37(ListMarker, { list: "ordered", number, depth: block.indent }),
3354
+ /* @__PURE__ */ jsx37(EditableRegion, { block: block.id, region: REGION, label: labels.numberedItem(number) })
3362
3355
  ] });
3363
3356
  }
3364
3357
  function TaskItem({ block, controller }) {
3365
3358
  const labels = useLabels();
3366
3359
  const hostId = useRegionDomId(block.id, REGION);
3367
3360
  return /* @__PURE__ */ jsxs22("div", { className: "quoin-task", "data-checked": block.attrs.checked === true, children: [
3368
- /* @__PURE__ */ jsx38(TaskCheckbox2, { block, controller, labelledBy: hostId }),
3369
- /* @__PURE__ */ jsx38(EditableRegion, { id: hostId, block: block.id, region: REGION, label: labels.task })
3361
+ /* @__PURE__ */ jsx37(TaskCheckbox, { block, controller, label: labels.task, labelledBy: hostId }),
3362
+ /* @__PURE__ */ jsx37(EditableRegion, { id: hostId, block: block.id, region: REGION, label: labels.task })
3370
3363
  ] });
3371
3364
  }
3372
3365
  var MarkdownBlock = (props) => {
@@ -3374,20 +3367,20 @@ var MarkdownBlock = (props) => {
3374
3367
  const labels = useLabels();
3375
3368
  switch (block.attrs.kind) {
3376
3369
  case "heading":
3377
- return /* @__PURE__ */ jsx38(Heading, { block });
3370
+ return /* @__PURE__ */ jsx37(Heading, { block });
3378
3371
  case "bullet":
3379
3372
  return /* @__PURE__ */ jsxs22("div", { className: "quoin-list-item", "data-list": "bullet", children: [
3380
- /* @__PURE__ */ jsx38(ListMarker, { list: "bullet", depth: block.indent }),
3381
- /* @__PURE__ */ jsx38(EditableRegion, { block: block.id, region: REGION, label: labels.bulletItem })
3373
+ /* @__PURE__ */ jsx37(ListMarker, { list: "bullet", depth: block.indent }),
3374
+ /* @__PURE__ */ jsx37(EditableRegion, { block: block.id, region: REGION, label: labels.bulletItem })
3382
3375
  ] });
3383
3376
  case "ordered":
3384
- return /* @__PURE__ */ jsx38(NumberedItem, { ...props });
3377
+ return /* @__PURE__ */ jsx37(NumberedItem, { ...props });
3385
3378
  case "task":
3386
- return /* @__PURE__ */ jsx38(TaskItem, { ...props });
3379
+ return /* @__PURE__ */ jsx37(TaskItem, { ...props });
3387
3380
  case "quote":
3388
- return /* @__PURE__ */ jsx38("div", { className: "quoin-quote", children: /* @__PURE__ */ jsx38(EditableRegion, { block: block.id, region: REGION, label: labels.quote }) });
3381
+ return /* @__PURE__ */ jsx37("div", { className: "quoin-quote", children: /* @__PURE__ */ jsx37(EditableRegion, { block: block.id, region: REGION, label: labels.quote }) });
3389
3382
  default:
3390
- return /* @__PURE__ */ jsx38(EditableRegion, { block: block.id, region: REGION, label: labels.paragraph });
3383
+ return /* @__PURE__ */ jsx37(EditableRegion, { block: block.id, region: REGION, label: labels.paragraph });
3391
3384
  }
3392
3385
  };
3393
3386
 
@@ -3402,14 +3395,14 @@ function useNestedBlocks(controller, blockId) {
3402
3395
  }
3403
3396
 
3404
3397
  // src/blocks/text/ToggleBlock.tsx
3405
- import { jsx as jsx39, jsxs as jsxs23 } from "react/jsx-runtime";
3398
+ import { jsx as jsx38, jsxs as jsxs23 } from "react/jsx-runtime";
3406
3399
  var ToggleBlock = ({ block, controller }) => {
3407
3400
  const labels = useLabels();
3408
3401
  const domId = useBlockDomId();
3409
3402
  const nested = useNestedBlocks(controller, block.id);
3410
3403
  const open = useToggleOpen(controller, block);
3411
3404
  return /* @__PURE__ */ jsxs23("div", { className: "quoin-toggle", "data-open": open, children: [
3412
- /* @__PURE__ */ jsx39(
3405
+ /* @__PURE__ */ jsx38(
3413
3406
  ToggleChevron,
3414
3407
  {
3415
3408
  block,
@@ -3418,7 +3411,7 @@ var ToggleBlock = ({ block, controller }) => {
3418
3411
  controls: nested.length === 0 ? void 0 : nested.map(domId).join(" ")
3419
3412
  }
3420
3413
  ),
3421
- /* @__PURE__ */ jsx39(EditableRegion, { block: block.id, region: "text", label: labels.toggle })
3414
+ /* @__PURE__ */ jsx38(EditableRegion, { block: block.id, region: "text", label: labels.toggle })
3422
3415
  ] });
3423
3416
  };
3424
3417
 
@@ -3491,12 +3484,12 @@ function turnIntoTargets(labels) {
3491
3484
  }
3492
3485
 
3493
3486
  // src/gutter/TurnIntoMenu.tsx
3494
- import { jsx as jsx40, jsxs as jsxs24 } from "react/jsx-runtime";
3487
+ import { jsx as jsx39, jsxs as jsxs24 } from "react/jsx-runtime";
3495
3488
  function TurnIntoItems({ kit, controller, blockIds }) {
3496
3489
  const { blockTypes, labels } = useQuoin();
3497
3490
  const targets = turnIntoTargets(labels).filter((target) => drawsType(blockTypes, target.type));
3498
3491
  return targets.map((target) => /* @__PURE__ */ jsxs24(kit.Item, { onSelect: () => runOnBlocks(controller, blockIds, setBlockType(target.type, target.attrs)), children: [
3499
- /* @__PURE__ */ jsx40(MenuIcon, { icon: target.icon }),
3492
+ /* @__PURE__ */ jsx39(MenuIcon, { icon: target.icon }),
3500
3493
  target.label
3501
3494
  ] }, target.id));
3502
3495
  }
@@ -3505,15 +3498,15 @@ function TurnIntoMenu(props) {
3505
3498
  const labels = useLabels();
3506
3499
  return /* @__PURE__ */ jsxs24(kit.Sub, { children: [
3507
3500
  /* @__PURE__ */ jsxs24(kit.SubTrigger, { children: [
3508
- /* @__PURE__ */ jsx40(MenuIcon, { icon: Repeat2 }),
3501
+ /* @__PURE__ */ jsx39(MenuIcon, { icon: Repeat2 }),
3509
3502
  labels.turnInto
3510
3503
  ] }),
3511
- /* @__PURE__ */ jsx40(kit.SubContent, { children: /* @__PURE__ */ jsx40(TurnIntoItems, { ...props }) })
3504
+ /* @__PURE__ */ jsx39(kit.SubContent, { children: /* @__PURE__ */ jsx39(TurnIntoItems, { ...props }) })
3512
3505
  ] });
3513
3506
  }
3514
3507
 
3515
3508
  // src/gutter/BlockMenuItems.tsx
3516
- import { Fragment as Fragment7, jsx as jsx41, jsxs as jsxs25 } from "react/jsx-runtime";
3509
+ import { Fragment as Fragment7, jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
3517
3510
  var DESTRUCTIVE = "text-destructive focus:text-destructive";
3518
3511
  function ActionItem({ kit, controller, action, blockIds }) {
3519
3512
  const labels = useLabels();
@@ -3525,9 +3518,9 @@ function ActionItem({ kit, controller, action, blockIds }) {
3525
3518
  "aria-keyshortcuts": hint?.aria,
3526
3519
  onSelect: () => action.run(controller, blockIds),
3527
3520
  children: [
3528
- /* @__PURE__ */ jsx41(MenuIcon, { icon: action.icon }),
3521
+ /* @__PURE__ */ jsx40(MenuIcon, { icon: action.icon }),
3529
3522
  action.label,
3530
- hint !== null && /* @__PURE__ */ jsx41(kit.Shortcut, { "aria-hidden": "true", children: hint.text })
3523
+ hint !== null && /* @__PURE__ */ jsx40(kit.Shortcut, { "aria-hidden": "true", children: hint.text })
3531
3524
  ]
3532
3525
  }
3533
3526
  );
@@ -3540,14 +3533,14 @@ function BlockMenuItems({ kit, controller, blocks, styled, title, actions }) {
3540
3533
  const anyMarkdown = styled.some((block) => block.type === "MARKDOWN");
3541
3534
  const allCallouts = styled.length > 0 && styled.every((block) => block.type === "CALLOUT");
3542
3535
  return /* @__PURE__ */ jsxs25(Fragment7, { children: [
3543
- /* @__PURE__ */ jsx41(kit.Label, { className: "text-muted-foreground text-xs", children: title }),
3544
- anyText && /* @__PURE__ */ jsx41(TurnIntoMenu, { kit, controller, blockIds: styled.map((block) => block.id) }),
3545
- anyMarkdown && /* @__PURE__ */ jsx41(ColorMenu, { kit, controller, blocks: styled }),
3546
- allCallouts && /* @__PURE__ */ jsx41(CalloutMenus, { kit, controller, blocks: styled }),
3547
- (anyText || anyMarkdown || allCallouts) && /* @__PURE__ */ jsx41(kit.Separator, {}),
3536
+ /* @__PURE__ */ jsx40(kit.Label, { className: "text-muted-foreground text-xs", children: title }),
3537
+ anyText && /* @__PURE__ */ jsx40(TurnIntoMenu, { kit, controller, blockIds: styled.map((block) => block.id) }),
3538
+ anyMarkdown && /* @__PURE__ */ jsx40(ColorMenu, { kit, controller, blocks: styled }),
3539
+ allCallouts && /* @__PURE__ */ jsx40(CalloutMenus, { kit, controller, blocks: styled }),
3540
+ (anyText || anyMarkdown || allCallouts) && /* @__PURE__ */ jsx40(kit.Separator, {}),
3548
3541
  shown.map((action) => /* @__PURE__ */ jsxs25(Fragment6, { children: [
3549
- action.destructive && /* @__PURE__ */ jsx41(kit.Separator, {}),
3550
- /* @__PURE__ */ jsx41(ActionItem, { kit, controller, action, blockIds })
3542
+ action.destructive && /* @__PURE__ */ jsx40(kit.Separator, {}),
3543
+ /* @__PURE__ */ jsx40(ActionItem, { kit, controller, action, blockIds })
3551
3544
  ] }, action.id))
3552
3545
  ] });
3553
3546
  }
@@ -3668,12 +3661,12 @@ function useMenuBlocks(controller, store, menu) {
3668
3661
  }
3669
3662
 
3670
3663
  // src/gutter/BlockContextMenu.tsx
3671
- import { jsx as jsx42, jsxs as jsxs26 } from "react/jsx-runtime";
3664
+ import { jsx as jsx41, jsxs as jsxs26 } from "react/jsx-runtime";
3672
3665
  function BlockContextMenuContent({ controller, store, actions, menu }) {
3673
3666
  const labels = useLabels();
3674
3667
  const { blocks, styled, title } = useMenuBlocks(controller, store, menu);
3675
3668
  if (blocks.length === 0) return null;
3676
- return /* @__PURE__ */ jsx42(ContextMenuContent, { "aria-label": labels.blockMenu(title), onCloseAutoFocus: returnFocusToText(controller), children: /* @__PURE__ */ jsx42(
3669
+ return /* @__PURE__ */ jsx41(ContextMenuContent, { "aria-label": labels.blockMenu(title), onCloseAutoFocus: returnFocusToText(controller), children: /* @__PURE__ */ jsx41(
3677
3670
  BlockMenuItems,
3678
3671
  {
3679
3672
  kit: CONTEXT_KIT,
@@ -3698,8 +3691,8 @@ function BlockContextMenu({ controller, store, actions }) {
3698
3691
  if (!next) closeBlockMenu(store);
3699
3692
  },
3700
3693
  children: [
3701
- /* @__PURE__ */ jsx42(ContextMenuTrigger, { ref: trigger, hidden: true }),
3702
- open && /* @__PURE__ */ jsx42(BlockContextMenuContent, { controller, store, actions, menu })
3694
+ /* @__PURE__ */ jsx41(ContextMenuTrigger, { ref: trigger, hidden: true }),
3695
+ open && /* @__PURE__ */ jsx41(BlockContextMenuContent, { controller, store, actions, menu })
3703
3696
  ]
3704
3697
  }
3705
3698
  );
@@ -3722,7 +3715,7 @@ import { GripVertical, Plus } from "lucide-react";
3722
3715
 
3723
3716
  // src/drag/DragOverlay.tsx
3724
3717
  import { forwardRef as forwardRef6, useImperativeHandle, useRef as useRef18 } from "react";
3725
- import { Fragment as Fragment8, jsx as jsx43, jsxs as jsxs27 } from "react/jsx-runtime";
3718
+ import { Fragment as Fragment8, jsx as jsx42, jsxs as jsxs27 } from "react/jsx-runtime";
3726
3719
  var UNIQUE_OR_FOCUSABLE = ["id", "data-block-id", "contenteditable", "tabindex"];
3727
3720
  function copyOf(shell) {
3728
3721
  const copy = shell.cloneNode(true);
@@ -3763,7 +3756,7 @@ var DragOverlay = forwardRef6(function DragOverlay2(_props, ref) {
3763
3756
  }
3764
3757
  }));
3765
3758
  return /* @__PURE__ */ jsxs27(Fragment8, { children: [
3766
- /* @__PURE__ */ jsx43(
3759
+ /* @__PURE__ */ jsx42(
3767
3760
  "div",
3768
3761
  {
3769
3762
  ref: ghost,
@@ -3773,7 +3766,7 @@ var DragOverlay = forwardRef6(function DragOverlay2(_props, ref) {
3773
3766
  className: "pointer-events-none fixed z-20 opacity-50"
3774
3767
  }
3775
3768
  ),
3776
- /* @__PURE__ */ jsx43(
3769
+ /* @__PURE__ */ jsx42(
3777
3770
  "div",
3778
3771
  {
3779
3772
  ref: line,
@@ -4067,19 +4060,19 @@ function addBlockBelow(controller, blockId) {
4067
4060
  }
4068
4061
 
4069
4062
  // src/gutter/BlockMenu.tsx
4070
- import { jsx as jsx44, jsxs as jsxs28 } from "react/jsx-runtime";
4063
+ import { jsx as jsx43, jsxs as jsxs28 } from "react/jsx-runtime";
4071
4064
  function BlockMenuContent({ controller, store, actions, menu }) {
4072
4065
  const labels = useLabels();
4073
4066
  const { blocks, styled, title } = useMenuBlocks(controller, store, menu);
4074
4067
  if (blocks.length === 0) return null;
4075
- return /* @__PURE__ */ jsx44(
4068
+ return /* @__PURE__ */ jsx43(
4076
4069
  DropdownMenuContent,
4077
4070
  {
4078
4071
  align: "start",
4079
4072
  "aria-label": labels.blockMenu(title),
4080
4073
  "aria-labelledby": void 0,
4081
4074
  onCloseAutoFocus: returnFocusToText(controller),
4082
- children: /* @__PURE__ */ jsx44(
4075
+ children: /* @__PURE__ */ jsx43(
4083
4076
  BlockMenuItems,
4084
4077
  {
4085
4078
  kit: DROPDOWN_KIT,
@@ -4105,8 +4098,8 @@ function BlockMenu({ controller, store, actions, onOpen, children }) {
4105
4098
  else closeBlockMenu(store);
4106
4099
  },
4107
4100
  children: [
4108
- /* @__PURE__ */ jsx44(DropdownMenuTrigger, { asChild: true, children }),
4109
- open && /* @__PURE__ */ jsx44(BlockMenuContent, { controller, store, actions, menu })
4101
+ /* @__PURE__ */ jsx43(DropdownMenuTrigger, { asChild: true, children }),
4102
+ open && /* @__PURE__ */ jsx43(BlockMenuContent, { controller, store, actions, menu })
4110
4103
  ]
4111
4104
  }
4112
4105
  );
@@ -4202,7 +4195,7 @@ function useGutterTarget(controller, store, gutter) {
4202
4195
  }
4203
4196
 
4204
4197
  // src/gutter/Gutter.tsx
4205
- import { Fragment as Fragment9, jsx as jsx45, jsxs as jsxs29 } from "react/jsx-runtime";
4198
+ import { Fragment as Fragment9, jsx as jsx44, jsxs as jsxs29 } from "react/jsx-runtime";
4206
4199
  var GUTTER = "absolute top-0 left-0 z-10 flex items-center gap-0.5 pointer-coarse:not-data-current:hidden";
4207
4200
  var ADD_BELOW = "text-muted-foreground pointer-coarse:hidden";
4208
4201
  function Gutter({ controller, store, actions }) {
@@ -4231,7 +4224,7 @@ function Gutter({ controller, store, actions }) {
4231
4224
  "data-current": focused || menuOpen ? "" : void 0,
4232
4225
  ...{ [GUTTER_BLOCK]: target ?? void 0 },
4233
4226
  children: [
4234
- /* @__PURE__ */ jsx45(
4227
+ /* @__PURE__ */ jsx44(
4235
4228
  Button,
4236
4229
  {
4237
4230
  type: "button",
@@ -4242,10 +4235,10 @@ function Gutter({ controller, store, actions }) {
4242
4235
  className: ADD_BELOW,
4243
4236
  onPointerDown: keepFocus,
4244
4237
  onClick: addBelow,
4245
- children: /* @__PURE__ */ jsx45(Plus, {})
4238
+ children: /* @__PURE__ */ jsx44(Plus, {})
4246
4239
  }
4247
4240
  ),
4248
- /* @__PURE__ */ jsx45(BlockMenu, { controller, store, actions, onOpen: openMenu, children: /* @__PURE__ */ jsx45(
4241
+ /* @__PURE__ */ jsx44(BlockMenu, { controller, store, actions, onOpen: openMenu, children: /* @__PURE__ */ jsx44(
4249
4242
  Button,
4250
4243
  {
4251
4244
  type: "button",
@@ -4264,13 +4257,13 @@ function Gutter({ controller, store, actions }) {
4264
4257
  menuOpenAtPress.current = false;
4265
4258
  if (!drag.takeClick(event) && !closing) openMenu();
4266
4259
  },
4267
- children: /* @__PURE__ */ jsx45(GripVertical, {})
4260
+ children: /* @__PURE__ */ jsx44(GripVertical, {})
4268
4261
  }
4269
4262
  ) })
4270
4263
  ]
4271
4264
  }
4272
4265
  ),
4273
- /* @__PURE__ */ jsx45(DragOverlay, { ref: overlay })
4266
+ /* @__PURE__ */ jsx44(DragOverlay, { ref: overlay })
4274
4267
  ] });
4275
4268
  }
4276
4269
 
@@ -4369,7 +4362,7 @@ import { AlignCenter as AlignCenter2, AlignJustify, AlignLeft as AlignLeft2, Ali
4369
4362
 
4370
4363
  // src/menus/bubble/ToolbarMenu.tsx
4371
4364
  import { useRef as useRef21 } from "react";
4372
- import { jsx as jsx46, jsxs as jsxs30 } from "react/jsx-runtime";
4365
+ import { jsx as jsx45, jsxs as jsxs30 } from "react/jsx-runtime";
4373
4366
  function ToolbarMenu({ controller, trigger, children }) {
4374
4367
  const fromToolbar = useRef21(false);
4375
4368
  return /* @__PURE__ */ jsxs30(
@@ -4379,8 +4372,8 @@ function ToolbarMenu({ controller, trigger, children }) {
4379
4372
  if (open) fromToolbar.current = isBubblePart(document.activeElement, controller);
4380
4373
  },
4381
4374
  children: [
4382
- /* @__PURE__ */ jsx46(DropdownMenuTrigger, { asChild: true, children: trigger }),
4383
- /* @__PURE__ */ jsx46(
4375
+ /* @__PURE__ */ jsx45(DropdownMenuTrigger, { asChild: true, children: trigger }),
4376
+ /* @__PURE__ */ jsx45(
4384
4377
  DropdownMenuContent,
4385
4378
  {
4386
4379
  align: "start",
@@ -4397,7 +4390,7 @@ function ToolbarMenu({ controller, trigger, children }) {
4397
4390
  }
4398
4391
 
4399
4392
  // src/menus/bubble/AlignDropdown.tsx
4400
- import { jsx as jsx47, jsxs as jsxs31 } from "react/jsx-runtime";
4393
+ import { jsx as jsx46, jsxs as jsxs31 } from "react/jsx-runtime";
4401
4394
  var ICONS = { left: AlignLeft2, center: AlignCenter2, right: AlignRight2, justify: AlignJustify };
4402
4395
  var ALIGNS2 = Object.keys(ICONS);
4403
4396
  var LABEL_KEYS = { left: "alignLeft", center: "alignCenter", right: "alignRight", justify: "alignJustify" };
@@ -4412,16 +4405,16 @@ function AlignDropdown({ controller, state }) {
4412
4405
  const value = sharedAlign(state);
4413
4406
  if (value === null) return null;
4414
4407
  const Icon = value === "" ? AlignLeft2 : ICONS[value];
4415
- const trigger = /* @__PURE__ */ jsx47(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": labels.align, children: /* @__PURE__ */ jsx47(Icon, {}) });
4416
- return /* @__PURE__ */ jsx47(ToolbarMenu, { controller, trigger, children: /* @__PURE__ */ jsx47(DropdownMenuRadioGroup, { value, onValueChange: (align) => controller.run(setTextAlign(align)), children: ALIGNS2.map((align) => /* @__PURE__ */ jsxs31(DropdownMenuRadioItem, { value: align, indicator: /* @__PURE__ */ jsx47(CheckIcon5, { className: "size-4" }), children: [
4417
- /* @__PURE__ */ jsx47(MenuIcon, { icon: ICONS[align] }),
4408
+ const trigger = /* @__PURE__ */ jsx46(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": labels.align, children: /* @__PURE__ */ jsx46(Icon, {}) });
4409
+ return /* @__PURE__ */ jsx46(ToolbarMenu, { controller, trigger, children: /* @__PURE__ */ jsx46(DropdownMenuRadioGroup, { value, onValueChange: (align) => controller.run(setTextAlign(align)), children: ALIGNS2.map((align) => /* @__PURE__ */ jsxs31(DropdownMenuRadioItem, { value: align, indicator: /* @__PURE__ */ jsx46(CheckIcon5, { className: "size-4" }), children: [
4410
+ /* @__PURE__ */ jsx46(MenuIcon, { icon: ICONS[align] }),
4418
4411
  labels[LABEL_KEYS[align]]
4419
4412
  ] }, align)) }) });
4420
4413
  }
4421
4414
 
4422
4415
  // src/menus/bubble/ColorPopover.tsx
4423
4416
  import { Baseline } from "lucide-react";
4424
- import { jsx as jsx48 } from "react/jsx-runtime";
4417
+ import { jsx as jsx47 } from "react/jsx-runtime";
4425
4418
  var MARKS = { color: "color", background: "highlight" };
4426
4419
  function selectionColor(state, mark) {
4427
4420
  const names = /* @__PURE__ */ new Set();
@@ -4440,24 +4433,24 @@ function colorCommand(key, name) {
4440
4433
  function ColorPopover({ controller, state }) {
4441
4434
  const labels = useLabels();
4442
4435
  const value = { color: selectionColor(state, MARKS.color), background: selectionColor(state, MARKS.background) };
4443
- const trigger = /* @__PURE__ */ jsx48(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": labels.color, children: /* @__PURE__ */ jsx48(Baseline, {}) });
4444
- return /* @__PURE__ */ jsx48(ToolbarMenu, { controller, trigger, children: /* @__PURE__ */ jsx48(ColorGroups, { kit: DROPDOWN_KIT, value, onPick: (key, name) => controller.run(colorCommand(key, name)) }) });
4436
+ const trigger = /* @__PURE__ */ jsx47(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": labels.color, children: /* @__PURE__ */ jsx47(Baseline, {}) });
4437
+ return /* @__PURE__ */ jsx47(ToolbarMenu, { controller, trigger, children: /* @__PURE__ */ jsx47(ColorGroups, { kit: DROPDOWN_KIT, value, onPick: (key, name) => controller.run(colorCommand(key, name)) }) });
4445
4438
  }
4446
4439
 
4447
4440
  // src/menus/bubble/TurnIntoDropdown.tsx
4448
4441
  import { ChevronDown } from "lucide-react";
4449
- import { jsx as jsx49, jsxs as jsxs32 } from "react/jsx-runtime";
4442
+ import { jsx as jsx48, jsxs as jsxs32 } from "react/jsx-runtime";
4450
4443
  function TurnIntoDropdown({ controller, state }) {
4451
4444
  const labels = useLabels();
4452
4445
  const trigger = /* @__PURE__ */ jsxs32(Button, { type: "button", variant: "ghost", size: "sm", className: "gap-1 px-2 has-[>svg]:px-2", children: [
4453
4446
  labels.turnInto,
4454
- /* @__PURE__ */ jsx49(ChevronDown, {})
4447
+ /* @__PURE__ */ jsx48(ChevronDown, {})
4455
4448
  ] });
4456
- return /* @__PURE__ */ jsx49(ToolbarMenu, { controller, trigger, children: /* @__PURE__ */ jsx49(TurnIntoItems, { kit: DROPDOWN_KIT, controller, blockIds: selectedBlockIds(state.doc, state.selection) }) });
4449
+ return /* @__PURE__ */ jsx48(ToolbarMenu, { controller, trigger, children: /* @__PURE__ */ jsx48(TurnIntoItems, { kit: DROPDOWN_KIT, controller, blockIds: selectedBlockIds(state.doc, state.selection) }) });
4457
4450
  }
4458
4451
 
4459
4452
  // src/menus/bubble/BubbleToolbar.tsx
4460
- import { jsx as jsx50, jsxs as jsxs33 } from "react/jsx-runtime";
4453
+ import { jsx as jsx49, jsxs as jsxs33 } from "react/jsx-runtime";
4461
4454
  var DIVIDER = "mx-0.5 h-5 w-px shrink-0 bg-border";
4462
4455
  function BubbleToolbar({ controller, labels, store, extraItems }) {
4463
4456
  const state = useEditorState(controller, wholeState);
@@ -4472,9 +4465,9 @@ function BubbleToolbar({ controller, labels, store, extraItems }) {
4472
4465
  controller.focus();
4473
4466
  } else roving.onKeyDown(event);
4474
4467
  };
4475
- const button = (item) => /* @__PURE__ */ jsx50(ToolbarButton, { item, state, controller }, item.id);
4468
+ const button = (item) => /* @__PURE__ */ jsx49(ToolbarButton, { item, state, controller }, item.id);
4476
4469
  return /* @__PURE__ */ jsxs33(Popover, { open: true, modal: false, children: [
4477
- /* @__PURE__ */ jsx50(PopoverAnchor, { virtualRef: anchor }),
4470
+ /* @__PURE__ */ jsx49(PopoverAnchor, { virtualRef: anchor }),
4478
4471
  /* @__PURE__ */ jsxs33(
4479
4472
  PopoverContent,
4480
4473
  {
@@ -4491,11 +4484,11 @@ function BubbleToolbar({ controller, labels, store, extraItems }) {
4491
4484
  onKeyDown,
4492
4485
  ...bubblePart(controller),
4493
4486
  children: [
4494
- /* @__PURE__ */ jsx50(TurnIntoDropdown, { controller, state }),
4495
- /* @__PURE__ */ jsx50("span", { "aria-hidden": "true", className: DIVIDER }),
4487
+ /* @__PURE__ */ jsx49(TurnIntoDropdown, { controller, state }),
4488
+ /* @__PURE__ */ jsx49("span", { "aria-hidden": "true", className: DIVIDER }),
4496
4489
  items.inline.map(button),
4497
- /* @__PURE__ */ jsx50(ColorPopover, { controller, state }),
4498
- /* @__PURE__ */ jsx50(AlignDropdown, { controller, state }),
4490
+ /* @__PURE__ */ jsx49(ColorPopover, { controller, state }),
4491
+ /* @__PURE__ */ jsx49(AlignDropdown, { controller, state }),
4499
4492
  items.scripts.map(button),
4500
4493
  extraItems.map(button)
4501
4494
  ]
@@ -4535,7 +4528,7 @@ function useBubbleVisibility(controller) {
4535
4528
  }
4536
4529
 
4537
4530
  // src/menus/bubble/bubble-extension.tsx
4538
- import { jsx as jsx51 } from "react/jsx-runtime";
4531
+ import { jsx as jsx50 } from "react/jsx-runtime";
4539
4532
  var NO_ITEMS = [];
4540
4533
  var BubbleItemsContext = createContext5(NO_ITEMS);
4541
4534
  var BubbleItemsProvider = BubbleItemsContext.Provider;
@@ -4545,7 +4538,7 @@ function BubbleOverlay({ controller }) {
4545
4538
  const store = useCanvasUiStore();
4546
4539
  const extraItems = useContext5(BubbleItemsContext);
4547
4540
  if (!visible) return null;
4548
- return /* @__PURE__ */ jsx51(BubbleToolbar, { controller, labels, store, extraItems });
4541
+ return /* @__PURE__ */ jsx50(BubbleToolbar, { controller, labels, store, extraItems });
4549
4542
  }
4550
4543
  function bubbleExtension() {
4551
4544
  return defineExtension({ name: "bubble", ui: { overlays: [BubbleOverlay] } });
@@ -4674,7 +4667,7 @@ function usePointerLink(controller, card, delay) {
4674
4667
  }
4675
4668
 
4676
4669
  // src/menus/link/LinkHoverCard.tsx
4677
- import { jsx as jsx52, jsxs as jsxs34 } from "react/jsx-runtime";
4670
+ import { jsx as jsx51, jsxs as jsxs34 } from "react/jsx-runtime";
4678
4671
  var REST_MS = 300;
4679
4672
  var URL_LENGTH = 48;
4680
4673
  var CARD = "flex w-auto items-center gap-0.5 py-1 ps-3 pe-1 shadow-md";
@@ -4707,7 +4700,7 @@ function LinkCard({ controller, labels, store, cardRef, element, onUnlinked }) {
4707
4700
  onUnlinked();
4708
4701
  };
4709
4702
  return /* @__PURE__ */ jsxs34(Popover, { open: true, modal: false, children: [
4710
- /* @__PURE__ */ jsx52(PopoverAnchor, { virtualRef: anchor }),
4703
+ /* @__PURE__ */ jsx51(PopoverAnchor, { virtualRef: anchor }),
4711
4704
  /* @__PURE__ */ jsxs34(
4712
4705
  PopoverContent,
4713
4706
  {
@@ -4721,10 +4714,10 @@ function LinkCard({ controller, labels, store, cardRef, element, onUnlinked }) {
4721
4714
  onPointerDown: keepFocus,
4722
4715
  onMouseDown: keepFocus,
4723
4716
  children: [
4724
- /* @__PURE__ */ jsx52("span", { className: ADDRESS, title: address === link.href ? void 0 : link.href, children: address }),
4725
- href !== null && /* @__PURE__ */ jsx52(Button, { asChild: true, variant: "ghost", size: "icon-sm", children: /* @__PURE__ */ jsx52("a", { href, target: "_blank", rel: "noopener noreferrer", "aria-label": labels.linkOpen, children: /* @__PURE__ */ jsx52(ExternalLink, {}) }) }),
4726
- /* @__PURE__ */ jsx52(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": labels.linkEdit, onClick: edit2, children: /* @__PURE__ */ jsx52(Pencil2, {}) }),
4727
- /* @__PURE__ */ jsx52(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": labels.linkRemove, onClick: unlink, children: /* @__PURE__ */ jsx52(Unlink, {}) })
4717
+ /* @__PURE__ */ jsx51("span", { className: ADDRESS, title: address === link.href ? void 0 : link.href, children: address }),
4718
+ href !== null && /* @__PURE__ */ jsx51(Button, { asChild: true, variant: "ghost", size: "icon-sm", children: /* @__PURE__ */ jsx51("a", { href, target: "_blank", rel: "noopener noreferrer", "aria-label": labels.linkOpen, children: /* @__PURE__ */ jsx51(ExternalLink, {}) }) }),
4719
+ /* @__PURE__ */ jsx51(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": labels.linkEdit, onClick: edit2, children: /* @__PURE__ */ jsx51(Pencil2, {}) }),
4720
+ /* @__PURE__ */ jsx51(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": labels.linkRemove, onClick: unlink, children: /* @__PURE__ */ jsx51(Unlink, {}) })
4728
4721
  ]
4729
4722
  }
4730
4723
  )
@@ -4735,7 +4728,7 @@ function LinkHoverCard(props) {
4735
4728
  const pointer = usePointerLink(props.controller, cardRef, REST_MS);
4736
4729
  const caretInLink = useCaretInLink(props.controller, REST_MS);
4737
4730
  if (pointer.element === null && !caretInLink) return null;
4738
- return /* @__PURE__ */ jsx52(LinkCard, { ...props, cardRef, element: pointer.element, onUnlinked: pointer.dismiss });
4731
+ return /* @__PURE__ */ jsx51(LinkCard, { ...props, cardRef, element: pointer.element, onUnlinked: pointer.dismiss });
4739
4732
  }
4740
4733
 
4741
4734
  // src/menus/link/LinkPopover.tsx
@@ -4766,7 +4759,7 @@ function applyLink(href, value) {
4766
4759
  }
4767
4760
 
4768
4761
  // src/menus/link/LinkPopover.tsx
4769
- import { jsx as jsx53, jsxs as jsxs35 } from "react/jsx-runtime";
4762
+ import { jsx as jsx52, jsxs as jsxs35 } from "react/jsx-runtime";
4770
4763
  var CONTENT2 = "w-80 p-2 shadow-md";
4771
4764
  var FIELD2 = "h-8";
4772
4765
  var MESSAGE = "mt-1.5 px-1 text-sm text-destructive";
@@ -4816,7 +4809,7 @@ function LinkPopover({ controller, labels, onClose }) {
4816
4809
  if (!open) onClose();
4817
4810
  },
4818
4811
  children: [
4819
- /* @__PURE__ */ jsx53(PopoverAnchor, { virtualRef: anchor }),
4812
+ /* @__PURE__ */ jsx52(PopoverAnchor, { virtualRef: anchor }),
4820
4813
  /* @__PURE__ */ jsxs35(
4821
4814
  PopoverContent,
4822
4815
  {
@@ -4831,7 +4824,7 @@ function LinkPopover({ controller, labels, onClose }) {
4831
4824
  },
4832
4825
  children: [
4833
4826
  /* @__PURE__ */ jsxs35("form", { noValidate: true, className: "flex items-center gap-0.5", onSubmit: apply, children: [
4834
- /* @__PURE__ */ jsx53(
4827
+ /* @__PURE__ */ jsx52(
4835
4828
  Input,
4836
4829
  {
4837
4830
  type: "url",
@@ -4843,11 +4836,11 @@ function LinkPopover({ controller, labels, onClose }) {
4843
4836
  onChange
4844
4837
  }
4845
4838
  ),
4846
- /* @__PURE__ */ jsx53(Button, { type: "submit", variant: "ghost", size: "icon-sm", "aria-label": labels.linkApply, children: /* @__PURE__ */ jsx53(Check3, {}) }),
4847
- openHref && /* @__PURE__ */ jsx53(Button, { asChild: true, variant: "ghost", size: "icon-sm", children: /* @__PURE__ */ jsx53("a", { href: openHref, target: "_blank", rel: "noopener noreferrer", "aria-label": labels.linkOpen, children: /* @__PURE__ */ jsx53(ExternalLink2, {}) }) }),
4848
- link !== null && /* @__PURE__ */ jsx53(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": labels.linkRemove, onClick: remove, children: /* @__PURE__ */ jsx53(Unlink2, {}) })
4839
+ /* @__PURE__ */ jsx52(Button, { type: "submit", variant: "ghost", size: "icon-sm", "aria-label": labels.linkApply, children: /* @__PURE__ */ jsx52(Check3, {}) }),
4840
+ openHref && /* @__PURE__ */ jsx52(Button, { asChild: true, variant: "ghost", size: "icon-sm", children: /* @__PURE__ */ jsx52("a", { href: openHref, target: "_blank", rel: "noopener noreferrer", "aria-label": labels.linkOpen, children: /* @__PURE__ */ jsx52(ExternalLink2, {}) }) }),
4841
+ link !== null && /* @__PURE__ */ jsx52(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": labels.linkRemove, onClick: remove, children: /* @__PURE__ */ jsx52(Unlink2, {}) })
4849
4842
  ] }),
4850
- invalid && /* @__PURE__ */ jsx53("p", { id: messageId, role: "alert", className: MESSAGE, children: labels.invalidLink })
4843
+ invalid && /* @__PURE__ */ jsx52("p", { id: messageId, role: "alert", className: MESSAGE, children: labels.invalidLink })
4851
4844
  ]
4852
4845
  }
4853
4846
  )
@@ -4872,7 +4865,7 @@ function useLinkClicks(controller) {
4872
4865
  }
4873
4866
 
4874
4867
  // src/menus/link/link-extension.tsx
4875
- import { jsx as jsx54 } from "react/jsx-runtime";
4868
+ import { jsx as jsx53 } from "react/jsx-runtime";
4876
4869
  var isPopoverOpen = (state) => state.linkPopover.open;
4877
4870
  function LinkOverlay({ controller }) {
4878
4871
  const labels = useLabels();
@@ -4884,8 +4877,8 @@ function LinkOverlay({ controller }) {
4884
4877
  if (readOnly && store.get().linkPopover.open) store.set({ linkPopover: { open: false } });
4885
4878
  }, [readOnly, store]);
4886
4879
  if (readOnly) return null;
4887
- if (!popoverOpen) return /* @__PURE__ */ jsx54(LinkHoverCard, { controller, labels, store });
4888
- return /* @__PURE__ */ jsx54(LinkPopover, { controller, labels, onClose: () => store.set({ linkPopover: { open: false } }) });
4880
+ if (!popoverOpen) return /* @__PURE__ */ jsx53(LinkHoverCard, { controller, labels, store });
4881
+ return /* @__PURE__ */ jsx53(LinkPopover, { controller, labels, onClose: () => store.set({ linkPopover: { open: false } }) });
4889
4882
  }
4890
4883
  function linkExtension(store) {
4891
4884
  const openPopover = (state, dispatch) => {
@@ -5271,7 +5264,7 @@ function useSuggestion({
5271
5264
  }
5272
5265
 
5273
5266
  // src/menus/suggestion/SuggestionMenu.tsx
5274
- import { Fragment as Fragment10, jsx as jsx55, jsxs as jsxs36 } from "react/jsx-runtime";
5267
+ import { Fragment as Fragment10, jsx as jsx54, jsxs as jsxs36 } from "react/jsx-runtime";
5275
5268
  var CONTENT3 = cn(
5276
5269
  MENU_CONTENT,
5277
5270
  "flex w-72 max-h-[min(22rem,var(--radix-popper-available-height))] flex-col overflow-y-hidden"
@@ -5279,7 +5272,7 @@ var CONTENT3 = cn(
5279
5272
  var LISTBOX = "min-h-0 overflow-y-auto";
5280
5273
  var GROUP_LABEL = "px-2 pt-2 pb-1 text-xs font-medium text-muted-foreground";
5281
5274
  function SuggestionGroup({ section, labelId, activeIndex, optionId, renderItem, highlight, select }) {
5282
- const options = section.entries.map(({ item, index }) => /* @__PURE__ */ jsx55(
5275
+ const options = section.entries.map(({ item, index }) => /* @__PURE__ */ jsx54(
5283
5276
  SuggestionOption,
5284
5277
  {
5285
5278
  id: optionId(item),
@@ -5290,9 +5283,9 @@ function SuggestionGroup({ section, labelId, activeIndex, optionId, renderItem,
5290
5283
  },
5291
5284
  optionId(item)
5292
5285
  ));
5293
- if (section.label === null) return /* @__PURE__ */ jsx55(Fragment10, { children: options });
5286
+ if (section.label === null) return /* @__PURE__ */ jsx54(Fragment10, { children: options });
5294
5287
  return /* @__PURE__ */ jsxs36("div", { role: "group", "aria-labelledby": labelId, children: [
5295
- /* @__PURE__ */ jsx55("div", { role: "presentation", id: labelId, className: GROUP_LABEL, children: section.label }),
5288
+ /* @__PURE__ */ jsx54("div", { role: "presentation", id: labelId, className: GROUP_LABEL, children: section.label }),
5296
5289
  options
5297
5290
  ] });
5298
5291
  }
@@ -5322,7 +5315,7 @@ function SuggestionMenu(props) {
5322
5315
  if (!open) queueMicrotask(suggestion.dismiss);
5323
5316
  },
5324
5317
  children: [
5325
- /* @__PURE__ */ jsx55(PopoverAnchor, { virtualRef: anchor }),
5318
+ /* @__PURE__ */ jsx54(PopoverAnchor, { virtualRef: anchor }),
5326
5319
  /* @__PURE__ */ jsxs36(
5327
5320
  PopoverContent,
5328
5321
  {
@@ -5336,7 +5329,7 @@ function SuggestionMenu(props) {
5336
5329
  onPointerDownOutside: insideEditor,
5337
5330
  onFocusOutside: insideEditor,
5338
5331
  children: [
5339
- /* @__PURE__ */ jsx55("div", { ref: listbox, role: "listbox", id: listboxId, "aria-label": label, className: LISTBOX, children: sections.map((section, index) => /* @__PURE__ */ jsx55(
5332
+ /* @__PURE__ */ jsx54("div", { ref: listbox, role: "listbox", id: listboxId, "aria-label": label, className: LISTBOX, children: sections.map((section, index) => /* @__PURE__ */ jsx54(
5340
5333
  SuggestionGroup,
5341
5334
  {
5342
5335
  section,
@@ -5349,7 +5342,7 @@ function SuggestionMenu(props) {
5349
5342
  },
5350
5343
  section.label ?? ""
5351
5344
  )) }),
5352
- status && /* @__PURE__ */ jsx55("p", { className: "px-2 py-1.5 text-sm text-muted-foreground", children: status })
5345
+ status && /* @__PURE__ */ jsx54("p", { className: "px-2 py-1.5 text-sm text-muted-foreground", children: status })
5353
5346
  ]
5354
5347
  }
5355
5348
  )
@@ -5429,17 +5422,17 @@ function fuzzyFilter(items, query) {
5429
5422
  }
5430
5423
 
5431
5424
  // src/menus/slash/SlashMenu.tsx
5432
- import { Fragment as Fragment11, jsx as jsx56, jsxs as jsxs37 } from "react/jsx-runtime";
5425
+ import { Fragment as Fragment11, jsx as jsx55, jsxs as jsxs37 } from "react/jsx-runtime";
5433
5426
  var itemKey = (item) => item.id;
5434
5427
  function SlashRow({ item, isMac, labels }) {
5435
5428
  const hint = item.shortcut === void 0 ? null : shortcutHint(item.shortcut, isMac, labels);
5436
5429
  return /* @__PURE__ */ jsxs37(Fragment11, { children: [
5437
- item.icon !== void 0 && /* @__PURE__ */ jsx56(MenuIcon, { icon: item.icon }),
5430
+ item.icon !== void 0 && /* @__PURE__ */ jsx55(MenuIcon, { icon: item.icon }),
5438
5431
  /* @__PURE__ */ jsxs37("span", { className: "flex min-w-0 flex-col", children: [
5439
- /* @__PURE__ */ jsx56("span", { className: "truncate", children: item.title }),
5440
- item.description !== void 0 && /* @__PURE__ */ jsx56("span", { className: "truncate text-xs text-muted-foreground", children: item.description })
5432
+ /* @__PURE__ */ jsx55("span", { className: "truncate", children: item.title }),
5433
+ item.description !== void 0 && /* @__PURE__ */ jsx55("span", { className: "truncate text-xs text-muted-foreground", children: item.description })
5441
5434
  ] }),
5442
- hint !== null && /* @__PURE__ */ jsx56("kbd", { "aria-hidden": "true", className: "ml-auto font-sans text-xs tracking-widest text-muted-foreground pointer-coarse:hidden", children: hint.text })
5435
+ hint !== null && /* @__PURE__ */ jsx55("kbd", { "aria-hidden": "true", className: "ml-auto font-sans text-xs tracking-widest text-muted-foreground pointer-coarse:hidden", children: hint.text })
5443
5436
  ] });
5444
5437
  }
5445
5438
  function SlashMenu({ controller, labels, items }) {
@@ -5455,14 +5448,14 @@ function SlashMenu({ controller, labels, items }) {
5455
5448
  );
5456
5449
  const groupOf2 = useCallback10((item) => labels.groups[item.group], [labels]);
5457
5450
  const renderItem = useCallback10(
5458
- (item) => /* @__PURE__ */ jsx56(SlashRow, { item, isMac: controller.isMac, labels }),
5451
+ (item) => /* @__PURE__ */ jsx55(SlashRow, { item, isMac: controller.isMac, labels }),
5459
5452
  [controller, labels]
5460
5453
  );
5461
5454
  const choose = useCallback10(
5462
5455
  (item, range) => chooseSlashItem(controller, item, range),
5463
5456
  [controller]
5464
5457
  );
5465
- return /* @__PURE__ */ jsx56(
5458
+ return /* @__PURE__ */ jsx55(
5466
5459
  SuggestionMenu,
5467
5460
  {
5468
5461
  controller,
@@ -5479,7 +5472,7 @@ function SlashMenu({ controller, labels, items }) {
5479
5472
  }
5480
5473
 
5481
5474
  // src/menus/slash/slash-extension.tsx
5482
- import { jsx as jsx57 } from "react/jsx-runtime";
5475
+ import { jsx as jsx56 } from "react/jsx-runtime";
5483
5476
  var NO_ITEMS2 = [];
5484
5477
  var SlashItemsContext = createContext6(NO_ITEMS2);
5485
5478
  var SlashItemsProvider = SlashItemsContext.Provider;
@@ -5491,7 +5484,7 @@ function SlashOverlay({ controller }) {
5491
5484
  () => [...builtInSlashItems(labels, blockTypes), ...extraItems],
5492
5485
  [labels, blockTypes, extraItems]
5493
5486
  );
5494
- return /* @__PURE__ */ jsx57(SlashMenu, { controller, labels, items });
5487
+ return /* @__PURE__ */ jsx56(SlashMenu, { controller, labels, items });
5495
5488
  }
5496
5489
  function slashExtension() {
5497
5490
  return defineExtension({
@@ -5587,7 +5580,7 @@ function useVisualViewport() {
5587
5580
  }
5588
5581
 
5589
5582
  // src/mobile/MobileToolbar.tsx
5590
- import { jsx as jsx58, jsxs as jsxs38 } from "react/jsx-runtime";
5583
+ import { jsx as jsx57, jsxs as jsxs38 } from "react/jsx-runtime";
5591
5584
  var TOOLBAR = [
5592
5585
  "quoin bg-popover text-popover-foreground fixed inset-x-0 z-40 flex items-center gap-0.5 overflow-x-auto",
5593
5586
  "border-t p-1 shadow-md"
@@ -5609,7 +5602,7 @@ function EditingTools({ controller }) {
5609
5602
  controller.focus();
5610
5603
  } else roving.onKeyDown(event);
5611
5604
  };
5612
- const button = (item) => /* @__PURE__ */ jsx58(ToolbarButton, { item, state, controller }, item.id);
5605
+ const button = (item) => /* @__PURE__ */ jsx57(ToolbarButton, { item, state, controller }, item.id);
5613
5606
  return createPortal(
5614
5607
  /* @__PURE__ */ jsxs38(
5615
5608
  "div",
@@ -5626,7 +5619,7 @@ function EditingTools({ controller }) {
5626
5619
  ...bubblePart(controller),
5627
5620
  children: [
5628
5621
  button(items.addBlock),
5629
- /* @__PURE__ */ jsx58(TurnIntoDropdown, { controller, state }),
5622
+ /* @__PURE__ */ jsx57(TurnIntoDropdown, { controller, state }),
5630
5623
  items.editing.map(button)
5631
5624
  ]
5632
5625
  }
@@ -5638,7 +5631,7 @@ function MobileToolbar({ controller }) {
5638
5631
  const coarse = useCoarsePointer();
5639
5632
  const focused = useEditorFocus(controller);
5640
5633
  if (!coarse || !focused) return null;
5641
- return /* @__PURE__ */ jsx58(EditingTools, { controller });
5634
+ return /* @__PURE__ */ jsx57(EditingTools, { controller });
5642
5635
  }
5643
5636
 
5644
5637
  // src/shortcuts/shortcuts-extension.tsx
@@ -5651,15 +5644,15 @@ import { useId as useId7, useMemo as useMemo15 } from "react";
5651
5644
  import * as React8 from "react";
5652
5645
  import * as DialogPrimitive from "@radix-ui/react-dialog";
5653
5646
  import { XIcon } from "lucide-react";
5654
- import { jsx as jsx59, jsxs as jsxs39 } from "react/jsx-runtime";
5647
+ import { jsx as jsx58, jsxs as jsxs39 } from "react/jsx-runtime";
5655
5648
  function Dialog(props) {
5656
- return /* @__PURE__ */ jsx59(DialogPrimitive.Root, { ...props });
5649
+ return /* @__PURE__ */ jsx58(DialogPrimitive.Root, { ...props });
5657
5650
  }
5658
5651
  function DialogPortal(props) {
5659
- return /* @__PURE__ */ jsx59(DialogPrimitive.Portal, { ...props });
5652
+ return /* @__PURE__ */ jsx58(DialogPrimitive.Portal, { ...props });
5660
5653
  }
5661
5654
  var DialogOverlay = /* @__PURE__ */ React8.forwardRef(function DialogOverlay2({ className, ...props }, ref) {
5662
- return /* @__PURE__ */ jsx59(
5655
+ return /* @__PURE__ */ jsx58(
5663
5656
  DialogPrimitive.Overlay,
5664
5657
  {
5665
5658
  ref,
@@ -5674,7 +5667,7 @@ var DialogOverlay = /* @__PURE__ */ React8.forwardRef(function DialogOverlay2({
5674
5667
  });
5675
5668
  var DialogContent = /* @__PURE__ */ React8.forwardRef(function DialogContent2({ className, children, closeLabel = "Close", ...props }, ref) {
5676
5669
  return /* @__PURE__ */ jsxs39(DialogPortal, { children: [
5677
- /* @__PURE__ */ jsx59(DialogOverlay, {}),
5670
+ /* @__PURE__ */ jsx58(DialogOverlay, {}),
5678
5671
  /* @__PURE__ */ jsxs39(
5679
5672
  DialogPrimitive.Content,
5680
5673
  {
@@ -5696,8 +5689,8 @@ var DialogContent = /* @__PURE__ */ React8.forwardRef(function DialogContent2({
5696
5689
  ICON_TAP_TARGET_FLOOR
5697
5690
  ),
5698
5691
  children: [
5699
- /* @__PURE__ */ jsx59(XIcon, {}),
5700
- /* @__PURE__ */ jsx59("span", { className: "sr-only", children: closeLabel })
5692
+ /* @__PURE__ */ jsx58(XIcon, {}),
5693
+ /* @__PURE__ */ jsx58("span", { className: "sr-only", children: closeLabel })
5701
5694
  ]
5702
5695
  }
5703
5696
  )
@@ -5707,7 +5700,7 @@ var DialogContent = /* @__PURE__ */ React8.forwardRef(function DialogContent2({
5707
5700
  ] });
5708
5701
  });
5709
5702
  var DialogHeader = /* @__PURE__ */ React8.forwardRef(function DialogHeader2({ className, ...props }, ref) {
5710
- return /* @__PURE__ */ jsx59(
5703
+ return /* @__PURE__ */ jsx58(
5711
5704
  "div",
5712
5705
  {
5713
5706
  ref,
@@ -5718,7 +5711,7 @@ var DialogHeader = /* @__PURE__ */ React8.forwardRef(function DialogHeader2({ cl
5718
5711
  );
5719
5712
  });
5720
5713
  var DialogTitle = /* @__PURE__ */ React8.forwardRef(function DialogTitle2({ className, ...props }, ref) {
5721
- return /* @__PURE__ */ jsx59(
5714
+ return /* @__PURE__ */ jsx58(
5722
5715
  DialogPrimitive.Title,
5723
5716
  {
5724
5717
  ref,
@@ -5810,21 +5803,21 @@ function shortcutGroups(labels, isMac) {
5810
5803
  }
5811
5804
 
5812
5805
  // src/shortcuts/ShortcutsDialog.tsx
5813
- import { jsx as jsx60, jsxs as jsxs40 } from "react/jsx-runtime";
5806
+ import { jsx as jsx59, jsxs as jsxs40 } from "react/jsx-runtime";
5814
5807
  var KEYS3 = "rounded border bg-muted px-1.5 py-0.5 font-sans text-xs whitespace-nowrap";
5815
5808
  function ShortcutSection({ group }) {
5816
5809
  const titleId = useId7();
5817
5810
  return /* @__PURE__ */ jsxs40("section", { "aria-labelledby": titleId, children: [
5818
- /* @__PURE__ */ jsx60("h3", { id: titleId, className: "mb-2 text-sm font-semibold", children: group.title }),
5819
- /* @__PURE__ */ jsx60("dl", { className: "grid gap-1.5 text-sm", children: group.items.map(({ label, keys }) => /* @__PURE__ */ jsxs40("div", { className: "flex items-center justify-between gap-4", children: [
5820
- /* @__PURE__ */ jsx60("dt", { children: label }),
5821
- /* @__PURE__ */ jsx60("dd", { children: /* @__PURE__ */ jsx60("kbd", { className: KEYS3, children: keys }) })
5811
+ /* @__PURE__ */ jsx59("h3", { id: titleId, className: "mb-2 text-sm font-semibold", children: group.title }),
5812
+ /* @__PURE__ */ jsx59("dl", { className: "grid gap-1.5 text-sm", children: group.items.map(({ label, keys }) => /* @__PURE__ */ jsxs40("div", { className: "flex items-center justify-between gap-4", children: [
5813
+ /* @__PURE__ */ jsx59("dt", { children: label }),
5814
+ /* @__PURE__ */ jsx59("dd", { children: /* @__PURE__ */ jsx59("kbd", { className: KEYS3, children: keys }) })
5822
5815
  ] }, `${label} ${keys}`)) })
5823
5816
  ] });
5824
5817
  }
5825
5818
  function ShortcutsDialog({ open, onOpenChange, labels, isMac, onCloseAutoFocus }) {
5826
5819
  const groups = useMemo15(() => shortcutGroups(labels, isMac), [labels, isMac]);
5827
- return /* @__PURE__ */ jsx60(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs40(
5820
+ return /* @__PURE__ */ jsx59(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs40(
5828
5821
  DialogContent,
5829
5822
  {
5830
5823
  closeLabel: labels.close,
@@ -5832,22 +5825,22 @@ function ShortcutsDialog({ open, onOpenChange, labels, isMac, onCloseAutoFocus }
5832
5825
  onCloseAutoFocus,
5833
5826
  className: "max-h-[85vh] overflow-y-auto sm:max-w-2xl",
5834
5827
  children: [
5835
- /* @__PURE__ */ jsx60(DialogHeader, { children: /* @__PURE__ */ jsx60(DialogTitle, { children: labels.shortcuts }) }),
5836
- /* @__PURE__ */ jsx60("div", { className: "grid gap-6 sm:grid-cols-2", children: groups.map((group) => /* @__PURE__ */ jsx60(ShortcutSection, { group }, group.name)) })
5828
+ /* @__PURE__ */ jsx59(DialogHeader, { children: /* @__PURE__ */ jsx59(DialogTitle, { children: labels.shortcuts }) }),
5829
+ /* @__PURE__ */ jsx59("div", { className: "grid gap-6 sm:grid-cols-2", children: groups.map((group) => /* @__PURE__ */ jsx59(ShortcutSection, { group }, group.name)) })
5837
5830
  ]
5838
5831
  }
5839
5832
  ) });
5840
5833
  }
5841
5834
 
5842
5835
  // src/shortcuts/shortcuts-extension.tsx
5843
- import { jsx as jsx61 } from "react/jsx-runtime";
5836
+ import { jsx as jsx60 } from "react/jsx-runtime";
5844
5837
  var SHORTCUT = "Mod-Shift-/";
5845
5838
  var isOpen = (state) => state.shortcutsOpen;
5846
5839
  function ShortcutsOverlay({ controller }) {
5847
5840
  const labels = useLabels();
5848
5841
  const store = useCanvasUiStore();
5849
5842
  const open = useCanvasUi(store, isOpen);
5850
- return /* @__PURE__ */ jsx61(
5843
+ return /* @__PURE__ */ jsx60(
5851
5844
  ShortcutsDialog,
5852
5845
  {
5853
5846
  open,
@@ -5968,7 +5961,7 @@ function useEditingFocus(root, editing, stop) {
5968
5961
  }
5969
5962
 
5970
5963
  // src/blocks/void/VoidBlock.tsx
5971
- import { jsx as jsx62, jsxs as jsxs41 } from "react/jsx-runtime";
5964
+ import { jsx as jsx61, jsxs as jsxs41 } from "react/jsx-runtime";
5972
5965
  function useMissingPreviewWarning(readOnly, { type, preview }) {
5973
5966
  useEffect22(() => {
5974
5967
  if (!readOnly || preview !== void 0) return;
@@ -5978,8 +5971,8 @@ function useMissingPreviewWarning(readOnly, { type, preview }) {
5978
5971
  }, [readOnly, type, preview]);
5979
5972
  }
5980
5973
  function VoidPreview({ definition: { preview: Preview }, name, ...props }) {
5981
- if (Preview === void 0) return /* @__PURE__ */ jsx62("p", { className: "py-1 text-sm text-muted-foreground", children: name });
5982
- return /* @__PURE__ */ jsx62(Preview, { ...props });
5974
+ if (Preview === void 0) return /* @__PURE__ */ jsx61("p", { className: "py-1 text-sm text-muted-foreground", children: name });
5975
+ return /* @__PURE__ */ jsx61(Preview, { ...props });
5983
5976
  }
5984
5977
  function VoidBlock({ block, controller, definition }) {
5985
5978
  const { blockTypes, labels } = useQuoin();
@@ -6037,8 +6030,8 @@ function VoidBlock({ block, controller, definition }) {
6037
6030
  onClick,
6038
6031
  onDoubleClick,
6039
6032
  children: [
6040
- editorShown && Editor ? /* @__PURE__ */ jsx62(Editor, { data, onChange, onInsertBlock, onDone: leave }) : /* @__PURE__ */ jsx62(VoidPreview, { definition, name, data, blockId }),
6041
- editable && !editorShown && /* @__PURE__ */ jsx62(
6033
+ editorShown && Editor ? /* @__PURE__ */ jsx61(Editor, { data, onChange, onInsertBlock, onDone: leave }) : /* @__PURE__ */ jsx61(VoidPreview, { definition, name, data, blockId }),
6034
+ editable && !editorShown && /* @__PURE__ */ jsx61(
6042
6035
  Button,
6043
6036
  {
6044
6037
  type: "button",
@@ -6048,7 +6041,7 @@ function VoidBlock({ block, controller, definition }) {
6048
6041
  "aria-label": labels.editBlock(name),
6049
6042
  onClick: () => start(),
6050
6043
  className: "absolute right-0 top-0 bg-background/90 opacity-0 group-hover/void:opacity-100 in-data-[selected=true]:opacity-100 pointer-coarse:opacity-100 focus-visible:opacity-100",
6051
- children: /* @__PURE__ */ jsx62(Pencil3, { "aria-hidden": "true" })
6044
+ children: /* @__PURE__ */ jsx61(Pencil3, { "aria-hidden": "true" })
6052
6045
  }
6053
6046
  )
6054
6047
  ]
@@ -6274,7 +6267,7 @@ function useTypedInPlaceWarning(definitions, readOnly) {
6274
6267
  }
6275
6268
 
6276
6269
  // src/canvas/BlockCanvas.tsx
6277
- import { jsx as jsx63, jsxs as jsxs42 } from "react/jsx-runtime";
6270
+ import { jsx as jsx62, jsxs as jsxs42 } from "react/jsx-runtime";
6278
6271
  var GUTTER_ROOM = "ps-12";
6279
6272
  var BlockCanvas = forwardRef8(function BlockCanvas2({
6280
6273
  blocks,
@@ -6354,7 +6347,7 @@ var BlockCanvas = forwardRef8(function BlockCanvas2({
6354
6347
  }),
6355
6348
  [controller, resolveAssetUrl]
6356
6349
  );
6357
- return /* @__PURE__ */ jsx63(QuoinProvider, { value: { blockTypes, upload, resolveAssetUrl, onError, highlight, controller, labels }, children: /* @__PURE__ */ jsx63(VoidEditingContext.Provider, { value: voidEditing, children: /* @__PURE__ */ jsx63(SlashItemsProvider, { value: slashItems, children: /* @__PURE__ */ jsx63(BubbleItemsProvider, { value: ui.bubbleItems, children: /* @__PURE__ */ jsx63(CanvasUiProvider, { value: uiStore, children: /* @__PURE__ */ jsxs42(
6350
+ return /* @__PURE__ */ jsx62(QuoinProvider, { value: { blockTypes, upload, resolveAssetUrl, onError, highlight, controller, labels }, children: /* @__PURE__ */ jsx62(VoidEditingContext.Provider, { value: voidEditing, children: /* @__PURE__ */ jsx62(SlashItemsProvider, { value: slashItems, children: /* @__PURE__ */ jsx62(BubbleItemsProvider, { value: ui.bubbleItems, children: /* @__PURE__ */ jsx62(CanvasUiProvider, { value: uiStore, children: /* @__PURE__ */ jsxs42(
6358
6351
  EditorView,
6359
6352
  {
6360
6353
  controller,
@@ -6372,11 +6365,11 @@ var BlockCanvas = forwardRef8(function BlockCanvas2({
6372
6365
  blocksSelectedLabel: labels.blocksSelected,
6373
6366
  children: [
6374
6367
  !readOnly && /* @__PURE__ */ jsxs42(ExtensionBlockNames.Provider, { value: ui.blockNames, children: [
6375
- /* @__PURE__ */ jsx63(Gutter, { controller, store: uiStore, actions }),
6376
- /* @__PURE__ */ jsx63(BlockContextMenu, { controller, store: uiStore, actions }),
6377
- /* @__PURE__ */ jsx63(MobileToolbar, { controller })
6368
+ /* @__PURE__ */ jsx62(Gutter, { controller, store: uiStore, actions }),
6369
+ /* @__PURE__ */ jsx62(BlockContextMenu, { controller, store: uiStore, actions }),
6370
+ /* @__PURE__ */ jsx62(MobileToolbar, { controller })
6378
6371
  ] }),
6379
- ui.overlays.map((Overlay2, index) => /* @__PURE__ */ jsx63(Overlay2, { controller }, index))
6372
+ ui.overlays.map((Overlay2, index) => /* @__PURE__ */ jsx62(Overlay2, { controller }, index))
6380
6373
  ]
6381
6374
  }
6382
6375
  ) }) }) }) }) });
@@ -6384,7 +6377,7 @@ var BlockCanvas = forwardRef8(function BlockCanvas2({
6384
6377
 
6385
6378
  // src/upload/UploadField.tsx
6386
6379
  import * as React9 from "react";
6387
- import { jsx as jsx64, jsxs as jsxs43 } from "react/jsx-runtime";
6380
+ import { jsx as jsx63, jsxs as jsxs43 } from "react/jsx-runtime";
6388
6381
  function progressText(state, labels) {
6389
6382
  if (state.phase === "busy") return labels.uploading;
6390
6383
  if (state.phase === "uploaded") return labels.uploaded(state.name);
@@ -6414,7 +6407,7 @@ function UploadField({ category, label, accept, onUploaded }) {
6414
6407
  }
6415
6408
  const progress = progressText(state, labels);
6416
6409
  return /* @__PURE__ */ jsxs43("div", { className: "flex flex-col items-start gap-1.5", children: [
6417
- /* @__PURE__ */ jsx64(
6410
+ /* @__PURE__ */ jsx63(
6418
6411
  FilePickerButton,
6419
6412
  {
6420
6413
  label,
@@ -6424,9 +6417,9 @@ function UploadField({ category, label, accept, onUploaded }) {
6424
6417
  onPick: (file) => void run(file)
6425
6418
  }
6426
6419
  ),
6427
- !upload && /* @__PURE__ */ jsx64("span", { role: "note", className: "text-xs text-muted-foreground", children: labels.uploadsUnavailable }),
6428
- /* @__PURE__ */ jsx64("span", { role: "status", className: progress === "" ? "sr-only" : "text-xs text-muted-foreground", children: progress }),
6429
- state.phase === "failed" && /* @__PURE__ */ jsx64("span", { role: "alert", className: "text-xs text-destructive", children: state.message })
6420
+ !upload && /* @__PURE__ */ jsx63("span", { role: "note", className: "text-xs text-muted-foreground", children: labels.uploadsUnavailable }),
6421
+ /* @__PURE__ */ jsx63("span", { role: "status", className: progress === "" ? "sr-only" : "text-xs text-muted-foreground", children: progress }),
6422
+ state.phase === "failed" && /* @__PURE__ */ jsx63("span", { role: "alert", className: "text-xs text-destructive", children: state.message })
6430
6423
  ] });
6431
6424
  }
6432
6425
 
@@ -6640,4 +6633,4 @@ export {
6640
6633
  UploadField,
6641
6634
  useAutosave
6642
6635
  };
6643
- //# sourceMappingURL=chunk-LE3F7WIP.js.map
6636
+ //# sourceMappingURL=chunk-T43RZTUT.js.map