docblocks-react-ui 0.6.5 → 0.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # docblocks-react-ui
2
2
 
3
+ ## 0.6.6
4
+
5
+ ### Patch Changes
6
+
7
+ - f730bec: The slash File command's pending upload stands the phrase block's skeleton (the spinner's rotation over the picker's open and the in-flight upload) over the closed popover instead of the menu's item stand; the refused upload's error line stands in the skeleton (the stand's click dismisses it) and a cancelled picker clears the stand over the page's focus.
8
+
3
9
  ## 0.6.5
4
10
 
5
11
  ### Patch Changes
@@ -2593,6 +2593,7 @@ function createEditorStore(doc, rootId) {
2593
2593
  presence: [],
2594
2594
  sharing: "off",
2595
2595
  canvasClipboard: null,
2596
+ fileUpload: null,
2596
2597
  applyChange,
2597
2598
  setPresence: (peers) => store.setState({ presence: peers }),
2598
2599
  setSharing: (mode) => store.setState({ sharing: mode }),
@@ -2601,7 +2602,8 @@ function createEditorStore(doc, rootId) {
2601
2602
  const ids = store.getState().collapsedIds;
2602
2603
  store.setState({ collapsedIds: collapsed ? [...ids.includes(id) ? ids : [...ids, id]] : ids.filter((x) => x !== id) });
2603
2604
  },
2604
- setCanvasClipboard: (clipboard) => store.setState({ canvasClipboard: clipboard })
2605
+ setCanvasClipboard: (clipboard) => store.setState({ canvasClipboard: clipboard }),
2606
+ setFileUpload: (stand) => store.setState({ fileUpload: stand })
2605
2607
  }));
2606
2608
  return store;
2607
2609
  }
@@ -6459,6 +6461,36 @@ var BlockErrorBoundary = class extends Component {
6459
6461
  }
6460
6462
  };
6461
6463
  //#endregion
6464
+ //#region src/blocks/FileUploadSkeleton.tsx
6465
+ /** The slash File command's upload stand: while the popover stands closed
6466
+ * over the pending file (the OS dialog's open, the in-flight upload), the
6467
+ * phrase block's row stands the skeleton (the spinner's rotation) instead
6468
+ * of its content. The refused upload's failed stand stands the error line
6469
+ * (the stand's click dismisses it — the phrase's row returns). View stand
6470
+ * only: the doc stands untouched until the upload's commit. */
6471
+ function FileUploadSkeleton({ id, stand }) {
6472
+ const { t } = useTranslation("slash");
6473
+ const { store } = useEditorContext();
6474
+ const failed = stand.phase === "failed";
6475
+ return /* @__PURE__ */ jsxs("div", {
6476
+ "data-slot": "docblocks/file-upload-skeleton",
6477
+ "data-block-id": id,
6478
+ "data-state": stand.phase,
6479
+ "aria-busy": !failed || void 0,
6480
+ className: cn("relative mx-0 my-(--docblocks-block-spacing) h-8 w-full", failed && "cursor-pointer"),
6481
+ onClick: failed ? () => store.getState().setFileUpload(null) : void 0,
6482
+ children: [/* @__PURE__ */ jsx(Skeleton, { className: "absolute inset-0 rounded-(--docblocks-radius)" }), /* @__PURE__ */ jsx("div", {
6483
+ className: "absolute inset-0 flex items-center justify-center",
6484
+ children: failed ? /* @__PURE__ */ jsx("span", {
6485
+ "data-slot": "docblocks/slash-file-error",
6486
+ role: "alert",
6487
+ className: "text-xs text-destructive",
6488
+ children: t("file.uploadFailed")
6489
+ }) : /* @__PURE__ */ jsx(LoaderCircle, { className: "size-4 animate-spin" })
6490
+ })]
6491
+ });
6492
+ }
6493
+ //#endregion
6462
6494
  //#region src/blocks/flat.ts
6463
6495
  /**
6464
6496
  * The flat page model, derived at render time.
@@ -17313,16 +17345,9 @@ function applySlashPlan(doc, plan, command, blockId, parentId, indent, scope) {
17313
17345
  * query back to a match brings the list back). The mousedown suppression
17314
17346
  * keeps the block's selection (and focus) alive across an item click.
17315
17347
  */
17316
- function SlashMenu({ rootRef, state, onHover, onPick, onClose, onFile, fileClickRef, fileUpload, databasePick, databaseAvailable, onDatabasePickCancel, onDatabaseCommit, framePick, onFramePickCancel, onFrameCommit, embedForm, onEmbedCancel, onEmbedCommit }) {
17348
+ function SlashMenu({ rootRef, state, onHover, onPick, onClose, databasePick, databaseAvailable, onDatabasePickCancel, onDatabaseCommit, framePick, onFramePickCancel, onFrameCommit, embedForm, onEmbedCancel, onEmbedCommit }) {
17317
17349
  const { t } = useTranslation("slash");
17318
17350
  const text = blockTextOf(useBlock(state.blockId));
17319
- const fileInputRef = useRef(null);
17320
- useEffect(() => {
17321
- fileClickRef.current = { open: () => fileInputRef.current?.click() };
17322
- return () => {
17323
- fileClickRef.current = null;
17324
- };
17325
- }, [fileClickRef]);
17326
17351
  const [derived, setDerived] = useState(null);
17327
17352
  useLayoutEffect(() => {
17328
17353
  if (databasePick || framePick || embedForm) return;
@@ -17386,15 +17411,9 @@ function SlashMenu({ rootRef, state, onHover, onPick, onClose, onFile, fileClick
17386
17411
  position
17387
17412
  ]);
17388
17413
  if (!visible) return null;
17389
- const onFileChange = (event) => {
17390
- const files = event.target.files;
17391
- const file = files !== null && files.length > 0 ? files[0] ?? null : null;
17392
- event.target.value = "";
17393
- onFile(file);
17394
- };
17395
17414
  const hoverAt = (index) => () => onHover(index);
17396
17415
  const pickAt = (index) => () => onPick(index);
17397
- return /* @__PURE__ */ jsxs(ScrollArea, {
17416
+ return /* @__PURE__ */ jsx(ScrollArea, {
17398
17417
  ref: menuRef,
17399
17418
  role: "menu",
17400
17419
  "data-slot": "docblocks/slash-menu",
@@ -17403,13 +17422,7 @@ function SlashMenu({ rootRef, state, onHover, onPick, onClose, onFile, fileClick
17403
17422
  left: position.left,
17404
17423
  ...position.top !== void 0 ? { top: position.top } : { bottom: position.bottom }
17405
17424
  },
17406
- children: [/* @__PURE__ */ jsx(Input, {
17407
- ref: fileInputRef,
17408
- type: "file",
17409
- "data-slot": "docblocks/slash-file-input",
17410
- className: "\n pointer-events-none absolute h-0 w-0 border-0 bg-transparent p-0 opacity-0 shadow-none\n file:h-0\n dark:bg-transparent\n ",
17411
- onChange: onFileChange
17412
- }), embedForm ? /* @__PURE__ */ jsx(SlashEmbedForm, {
17425
+ children: embedForm ? /* @__PURE__ */ jsx(SlashEmbedForm, {
17413
17426
  onCommit: onEmbedCommit,
17414
17427
  onCancel: onEmbedCancel
17415
17428
  }) : framePick ? /* @__PURE__ */ jsx(FrameSlashPicker, {
@@ -17418,7 +17431,7 @@ function SlashMenu({ rootRef, state, onHover, onPick, onClose, onFile, fileClick
17418
17431
  }) : databasePick ? /* @__PURE__ */ jsx(DatabaseSlashPicker, {
17419
17432
  onCommit: onDatabaseCommit,
17420
17433
  onCancel: onDatabasePickCancel
17421
- }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [items.map((command, index) => /* @__PURE__ */ jsxs("div", {
17434
+ }) : /* @__PURE__ */ jsx(Fragment$1, { children: items.map((command, index) => /* @__PURE__ */ jsxs("div", {
17422
17435
  role: "menuitem",
17423
17436
  "data-slot": "docblocks/slash-item",
17424
17437
  "data-active": index === active || void 0,
@@ -17426,13 +17439,8 @@ function SlashMenu({ rootRef, state, onHover, onPick, onClose, onFile, fileClick
17426
17439
  onMouseEnter: hoverAt(index),
17427
17440
  onMouseDown: preventDefault,
17428
17441
  onClick: pickAt(index),
17429
- children: [command.type === "file" && fileUpload === "uploading" ? /* @__PURE__ */ jsx(LoaderCircle, { className: "size-4 animate-spin" }) : /* @__PURE__ */ jsx(command.icon, { className: "size-4" }), t(command.labelKey)]
17430
- }, command.label)), fileUpload === "failed" ? /* @__PURE__ */ jsx("p", {
17431
- "data-slot": "docblocks/slash-file-error",
17432
- role: "alert",
17433
- className: "px-2 py-1.5 text-xs text-destructive",
17434
- children: t("file.uploadFailed")
17435
- }) : null] })]
17442
+ children: [/* @__PURE__ */ jsx(command.icon, { className: "size-4" }), t(command.labelKey)]
17443
+ }, command.label)) })
17436
17444
  });
17437
17445
  }
17438
17446
  //#endregion
@@ -17452,6 +17460,7 @@ function useSlashMenu(rootRef) {
17452
17460
  const [state, setState] = useState(null);
17453
17461
  const stateRef = useRef(null);
17454
17462
  stateRef.current = state;
17463
+ const fileInputRef = useRef(null);
17455
17464
  const fileClickRef = useRef(null);
17456
17465
  const pendingFileRef = useRef(null);
17457
17466
  const [databasePick, setDatabasePick] = useState(false);
@@ -17466,7 +17475,6 @@ function useSlashMenu(rootRef) {
17466
17475
  const embedFormRef = useRef(false);
17467
17476
  embedFormRef.current = embedForm;
17468
17477
  const pendingEmbedRef = useRef(null);
17469
- const [fileUpload, setFileUpload] = useState("idle");
17470
17478
  const open = useCallback((blockId, parentId, slashOffset) => {
17471
17479
  setDatabasePick(false);
17472
17480
  pendingDatabaseRef.current = null;
@@ -17474,7 +17482,6 @@ function useSlashMenu(rootRef) {
17474
17482
  pendingFrameRef.current = null;
17475
17483
  setEmbedForm(false);
17476
17484
  pendingEmbedRef.current = null;
17477
- setFileUpload("idle");
17478
17485
  setState({
17479
17486
  blockId,
17480
17487
  parentId,
@@ -17489,7 +17496,6 @@ function useSlashMenu(rootRef) {
17489
17496
  pendingFrameRef.current = null;
17490
17497
  setEmbedForm(false);
17491
17498
  pendingEmbedRef.current = null;
17492
- setFileUpload("idle");
17493
17499
  setState(null);
17494
17500
  }, []);
17495
17501
  /** The open-menu derivation (the live doc text + the live caret). */
@@ -17537,13 +17543,17 @@ function useSlashMenu(rootRef) {
17537
17543
  const items = filterCommands(derivation.query, databaseAvailable, t);
17538
17544
  const command = items.length === 0 ? void 0 : items[Math.min(index, items.length - 1)];
17539
17545
  if (command === void 0) return;
17540
- if (fileUpload === "uploading") return;
17541
17546
  if (command.type === "file") {
17542
17547
  pendingFileRef.current = {
17543
17548
  blockId: s.blockId,
17544
17549
  parentId: s.parentId,
17545
17550
  slashOffset: s.slashOffset
17546
17551
  };
17552
+ store.getState().setFileUpload({
17553
+ blockId: s.blockId,
17554
+ phase: "picker"
17555
+ });
17556
+ close();
17547
17557
  fileClickRef.current?.open();
17548
17558
  return;
17549
17559
  }
@@ -17582,9 +17592,9 @@ function useSlashMenu(rootRef) {
17582
17592
  }, [
17583
17593
  close,
17584
17594
  doc,
17585
- fileUpload,
17586
17595
  openDerivation,
17587
17596
  rootRef,
17597
+ store,
17588
17598
  t
17589
17599
  ]);
17590
17600
  /**
@@ -17594,22 +17604,35 @@ function useSlashMenu(rootRef) {
17594
17604
  * path (they grow, shrink, or end the query).
17595
17605
  */
17596
17606
  /**
17597
- * The file pick of the slash Image command: the upload runs first (the
17607
+ * The file pick of the slash File command: the upload runs first (the
17598
17608
  * doc holds only a committed key), then one transact — the trigger
17599
- * phrase strip (when it still stands at its anchor) + the image insert.
17600
- * A phrase-only block without a derived segment is replaced at its slot;
17601
- * otherwise the image lands after the caret block. A trailing empty
17602
- * paragraph stands when the image takes the sequence's end (the caret
17603
- * seats there). A refused or cancelled pick commits nothing (the menu
17604
- * stays open on the phrase).
17609
+ * phrase strip (when it still stands at its anchor) + the image / file
17610
+ * insert. A phrase-only block without a derived segment is replaced at
17611
+ * its slot; otherwise the attachment lands after the caret block. A
17612
+ * trailing empty paragraph stands when the attachment takes the
17613
+ * sequence's end (the caret seats there). A cancelled pick stands no
17614
+ * event of its own (the dialog's close's page-focus clears the stand,
17615
+ * the phrase's row returns); a refused upload commits nothing (the
17616
+ * failed stand's error line stands over the skeleton — the stand's
17617
+ * click dismisses it).
17605
17618
  */
17606
17619
  const handleFile = useCallback((file) => {
17607
17620
  const pending = pendingFileRef.current;
17608
17621
  pendingFileRef.current = null;
17609
- if (pending === null || file === null) return;
17622
+ if (pending === null) return;
17610
17623
  const { blockId, parentId, slashOffset } = pending;
17611
- if (doc.getBlock(blockId) === null) return;
17612
- setFileUpload("uploading");
17624
+ if (file === null) {
17625
+ store.getState().setFileUpload(null);
17626
+ return;
17627
+ }
17628
+ if (doc.getBlock(blockId) === null) {
17629
+ store.getState().setFileUpload(null);
17630
+ return;
17631
+ }
17632
+ store.getState().setFileUpload({
17633
+ blockId,
17634
+ phase: "uploading"
17635
+ });
17613
17636
  (async () => {
17614
17637
  try {
17615
17638
  const fileId = await blobStore.upload(file);
@@ -17659,22 +17682,26 @@ function useSlashMenu(rootRef) {
17659
17682
  });
17660
17683
  } catch (error) {
17661
17684
  if (error instanceof InvalidAttrsError || error instanceof InvalidOperationError) {
17662
- setFileUpload("idle");
17685
+ store.getState().setFileUpload(null);
17663
17686
  return;
17664
17687
  }
17665
17688
  throw error;
17666
17689
  }
17667
17690
  close();
17668
- setFileUpload("idle");
17691
+ store.getState().setFileUpload(null);
17669
17692
  } catch {
17670
- setFileUpload("failed");
17693
+ store.getState().setFileUpload({
17694
+ blockId,
17695
+ phase: "failed"
17696
+ });
17671
17697
  }
17672
17698
  })();
17673
17699
  }, [
17674
17700
  blobStore,
17675
17701
  close,
17676
17702
  doc,
17677
- rootRef
17703
+ rootRef,
17704
+ store
17678
17705
  ]);
17679
17706
  /**
17680
17707
  * The table pick of the slash Database command: one transact — the
@@ -17927,6 +17954,17 @@ function useSlashMenu(rootRef) {
17927
17954
  document.addEventListener("selectionchange", onSelectionChange);
17928
17955
  return () => document.removeEventListener("selectionchange", onSelectionChange);
17929
17956
  }, [openFlag, rootRef]);
17957
+ useEffect(() => {
17958
+ const onFocus = () => {
17959
+ const stand = store.getState().fileUpload;
17960
+ if (stand !== null && stand.phase === "picker") store.getState().setFileUpload(null);
17961
+ };
17962
+ window.addEventListener("focus", onFocus);
17963
+ return () => window.removeEventListener("focus", onFocus);
17964
+ }, [store]);
17965
+ useEffect(() => {
17966
+ fileClickRef.current = fileInputRef.current !== null ? { open: () => fileInputRef.current?.click() } : null;
17967
+ });
17930
17968
  const cancelDatabasePick = () => {
17931
17969
  setDatabasePick(false);
17932
17970
  pendingDatabaseRef.current = null;
@@ -17939,20 +17977,30 @@ function useSlashMenu(rootRef) {
17939
17977
  setEmbedForm(false);
17940
17978
  pendingEmbedRef.current = null;
17941
17979
  };
17980
+ const api = useMemo(() => ({
17981
+ onKeyDown,
17982
+ onSlashKey
17983
+ }), [onKeyDown, onSlashKey]);
17984
+ const onFileChange = (event) => {
17985
+ const files = event.target.files;
17986
+ const file = files !== null && files.length > 0 ? files[0] ?? null : null;
17987
+ event.target.value = "";
17988
+ handleFile(file);
17989
+ };
17942
17990
  return {
17943
- api: useMemo(() => ({
17944
- onKeyDown,
17945
- onSlashKey
17946
- }), [onKeyDown, onSlashKey]),
17947
- menuNode: state !== null ? /* @__PURE__ */ jsx(SlashMenu, {
17991
+ api,
17992
+ menuNode: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Input, {
17993
+ ref: fileInputRef,
17994
+ type: "file",
17995
+ "data-slot": "docblocks/slash-file-input",
17996
+ className: "\n pointer-events-none absolute h-0 w-0 border-0 bg-transparent p-0 opacity-0 shadow-none\n file:h-0\n dark:bg-transparent\n ",
17997
+ onChange: onFileChange
17998
+ }), state !== null ? /* @__PURE__ */ jsx(SlashMenu, {
17948
17999
  rootRef,
17949
18000
  state,
17950
18001
  onHover: hover,
17951
18002
  onPick: pick,
17952
18003
  onClose: close,
17953
- onFile: handleFile,
17954
- fileClickRef,
17955
- fileUpload,
17956
18004
  databasePick,
17957
18005
  databaseAvailable,
17958
18006
  onDatabasePickCancel: cancelDatabasePick,
@@ -17963,7 +18011,7 @@ function useSlashMenu(rootRef) {
17963
18011
  embedForm,
17964
18012
  onEmbedCancel: cancelEmbedForm,
17965
18013
  onEmbedCommit: commitEmbed
17966
- }) : null
18014
+ }) : null] })
17967
18015
  };
17968
18016
  }
17969
18017
  //#endregion
@@ -27302,9 +27350,14 @@ function BlockBody({ node, block, nested, collapsible, flat, renderers }) {
27302
27350
  * missing (removed by a peer) renders nothing.
27303
27351
  */
27304
27352
  const BlockNodeView = memo(function BlockNodeView({ node, flat = false, renderBlock }) {
27305
- const { renderers } = useEditorContext();
27353
+ const { renderers, store } = useEditorContext();
27306
27354
  const block = useBlock(node.id);
27355
+ const fileUpload = useStore(store, (state) => state.fileUpload !== null && state.fileUpload.blockId === node.id ? state.fileUpload : null);
27307
27356
  if (block === void 0) return null;
27357
+ if (fileUpload !== null) return /* @__PURE__ */ jsx(FileUploadSkeleton, {
27358
+ id: node.id,
27359
+ stand: fileUpload
27360
+ });
27308
27361
  const hasChildren = !flat && node.children.length > 0;
27309
27362
  const isListItem = block.type === "list-item";
27310
27363
  const collapsible = node.children.length > 0;
@@ -869,6 +869,20 @@ interface CanvasClipboard {
869
869
  }
870
870
  //#endregion
871
871
  //#region src/state/models.d.ts
872
+ /**
873
+ * The slash File command's upload stand: the block the skeleton stands on
874
+ * + the phase. View state per editor (not doc data, no wire).
875
+ */
876
+ interface FileUploadStand {
877
+ /** The block the skeleton stand stands on (the trigger phrase's block). */
878
+ blockId: BlockId;
879
+ /**
880
+ * The stand's phase: `picker` — the OS dialog's open (the file's not
881
+ * delivered yet), `uploading` — the in-flight upload, `failed` — the
882
+ * refused stand's error line (the stand's click dismisses it).
883
+ */
884
+ phase: "picker" | "uploading" | "failed";
885
+ }
872
886
  /**
873
887
  * Per-instance editor state: a projection of one docblocks-core Doc.
874
888
  *
@@ -923,6 +937,13 @@ interface EditorState {
923
937
  * blocks.
924
938
  */
925
939
  canvasClipboard: CanvasClipboard | null;
940
+ /**
941
+ * The slash File command's pending file upload stand (the phrase block's
942
+ * row stands the skeleton over its content while the popover stands
943
+ * closed). `null` when idle. A separate slice so a stand change never
944
+ * re-renders the other blocks.
945
+ */
946
+ fileUpload: FileUploadStand | null;
926
947
  }
927
948
  /** Internal write functions, called by the EditorProvider subscriptions. */
928
949
  interface EditorActions {
@@ -938,6 +959,8 @@ interface EditorActions {
938
959
  setCollapsed: (id: BlockId, collapsed: boolean) => void;
939
960
  /** Replaces the canvas clipboard slice (the copy / the clear). */
940
961
  setCanvasClipboard: (clipboard: CanvasClipboard | null) => void;
962
+ /** Replaces the pending file upload stand (the set / the clear). */
963
+ setFileUpload: (stand: FileUploadStand | null) => void;
941
964
  }
942
965
  /** The per-instance vanilla store created by `createEditorStore`. */
943
966
  type EditorStore = StoreApi<EditorState & EditorActions>;
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { n as BlockRendererMap, r as BlockRendererProps, t as BlockRenderer } from "./index-YJcgf8Hh.mjs";
2
- import { $ as ProtocolLimits, A as filterIsComplete, B as DatabaseBridge, C as DatabaseTableView, Ct as createMemoryBlobStore, D as DatabaseTableRow, E as DatabaseTablePhase, F as BridgeTableDescription, G as IsoInstant, H as FilterConditionInput, I as BridgeValueInput, J as OperationStatus, K as MutationContext, L as CellMap, M as BatchOp, N as BridgeColumn, O as UseDatabaseTable, P as BridgeColumnAnnotation, Q as ProtocolDescriptor, R as CellValueParse, S as DatabaseTableProps, St as BlobStore, T as useDatabaseTable, U as FilterInput, V as DomainEvent, W as Id, X as PageSnapshot, Y as PageQuery, Z as ProtocolCapability, _ as PresencePeer, _t as isBridgeError, a as EditorContextValue, at as SortInput, b as useTableList, bt as BlobMeta, c as EmbedSandboxPolicy, ct as SubscriptionStatus, d as PdfPreview, dt as TableEvent, et as QueryOperator, f as PdfPreviewProps, ft as TableRef, g as PresenceIdentity, gt as BridgeErrorCode, h as PresenceCrypto, ht as BridgeError, i as AccessLevel, it as RowWire, j as FilterBuilder, k as emptyFilter, l as MentionEntry, lt as TableDescription, m as SyncEmbedResolver, mt as BRIDGE_ERROR_CODES, n as DEFAULT_EMBED_SANDBOX, nt as Revision, o as EditorMode, ot as SubscriptionHandle, p as PresenceConfig, pt as TableSnapshot, q as MutationReceipt, r as EditorProvider, rt as RowPage, s as EditorProviderProps, st as SubscriptionObserver, t as useEditorContext, tt as QuerySemantics, u as MentionProvider, ut as TableEnvelopeBase, v as PresenceSharing, vt as isBridgeErrorCode, w as UseTableList, x as DatabaseTable, xt as BlobRef, y as PresenceSharingMode, yt as toBridgeError, z as Column } from "./index-DyPFy2m5.mjs";
2
+ import { $ as ProtocolLimits, A as filterIsComplete, B as DatabaseBridge, C as DatabaseTableView, Ct as createMemoryBlobStore, D as DatabaseTableRow, E as DatabaseTablePhase, F as BridgeTableDescription, G as IsoInstant, H as FilterConditionInput, I as BridgeValueInput, J as OperationStatus, K as MutationContext, L as CellMap, M as BatchOp, N as BridgeColumn, O as UseDatabaseTable, P as BridgeColumnAnnotation, Q as ProtocolDescriptor, R as CellValueParse, S as DatabaseTableProps, St as BlobStore, T as useDatabaseTable, U as FilterInput, V as DomainEvent, W as Id, X as PageSnapshot, Y as PageQuery, Z as ProtocolCapability, _ as PresencePeer, _t as isBridgeError, a as EditorContextValue, at as SortInput, b as useTableList, bt as BlobMeta, c as EmbedSandboxPolicy, ct as SubscriptionStatus, d as PdfPreview, dt as TableEvent, et as QueryOperator, f as PdfPreviewProps, ft as TableRef, g as PresenceIdentity, gt as BridgeErrorCode, h as PresenceCrypto, ht as BridgeError, i as AccessLevel, it as RowWire, j as FilterBuilder, k as emptyFilter, l as MentionEntry, lt as TableDescription, m as SyncEmbedResolver, mt as BRIDGE_ERROR_CODES, n as DEFAULT_EMBED_SANDBOX, nt as Revision, o as EditorMode, ot as SubscriptionHandle, p as PresenceConfig, pt as TableSnapshot, q as MutationReceipt, r as EditorProvider, rt as RowPage, s as EditorProviderProps, st as SubscriptionObserver, t as useEditorContext, tt as QuerySemantics, u as MentionProvider, ut as TableEnvelopeBase, v as PresenceSharing, vt as isBridgeErrorCode, w as UseTableList, x as DatabaseTable, xt as BlobRef, y as PresenceSharingMode, yt as toBridgeError, z as Column } from "./index-CeuUfoao.mjs";
3
3
  import * as React from "react";
4
4
  import { ComponentType, ReactNode } from "react";
5
5
  import { Block, BlockId, BlockType, Doc, DocMeta, PresenceState, Selection, SelectionView, SyncEmbedRef, TextRun } from "docblocks-core";
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as SelectValue, A as useBlock, At as CardFooter, B as DEFAULT_EMBED_SANDBOX, Bt as Badge, C as isBridgeError, Ct as PopoverTrigger, D as parseCellValue, Dt as CardAction, E as conditionMatches, Et as Card, F as useSelection, G as SelectContent, Gt as DocblocksI18nProvider, H as SegmentSelector, Ht as Alert, I as useSelectionView, It as BookOpen, J as SelectLabel, Jt as createMemoryBlobStore, K as SelectGroup, L as useText, Lt as Button, M as useMeta, Mt as CardTitle, N as usePresence, Nt as Pen, O as TEXT_TYPES, Ot as CardContent, P as usePresenceSharing, Pt as Eye, Q as SelectTrigger, R as EditorProvider, Rt as buttonVariants, S as BridgeError, St as PopoverTitle, T as toBridgeError, Tt as Checkbox, U as ScrollArea, Ut as AlertDescription, V as Skeleton, Vt as badgeVariants, W as Select, Wt as AlertTitle, X as SelectScrollUpButton, Y as SelectScrollDownButton, Z as SelectSeparator, _ as BASELINE_CAPABILITIES, _t as Popover, a as SHAPE_FONT_STACKS, at as DropdownMenuItem, b as validateProtocolDescriptor, bt as PopoverDescription, ct as DropdownMenuRadioGroup, d as useDatabaseTable, dt as DropdownMenuShortcut, et as Label, f as cellValueEqual, ft as DropdownMenuSub, g as filterIsComplete, gt as Separator, h as emptyFilter, ht as DropdownMenuTrigger, i as SHAPE_FONT_OPTIONS, it as DropdownMenuGroup, j as useDoc, jt as CardHeader, k as columnAnnotation, kt as CardDescription, l as markToggleAction, lt as DropdownMenuRadioItem, m as FilterBuilder, mt as DropdownMenuSubTrigger, nt as DropdownMenuCheckboxItem, ot as DropdownMenuLabel, p as newMutationContext, pt as DropdownMenuSubContent, q as SelectItem, qt as renderRuns, rt as DropdownMenuContent, s as FORMAT_PALETTE, st as DropdownMenuPortal, t as Editor, tt as DropdownMenu, u as GridBody, ut as DropdownMenuSeparator, v as PROTOCOL_VERSION, vt as PopoverAnchor, w as isBridgeErrorCode, wt as Input, x as BRIDGE_ERROR_CODES, xt as PopoverHeader, y as isDatabaseBridge, yt as PopoverContent, z as useEditorContext, zt as BareSelect } from "./Editor-RBfmEGXr.mjs";
1
+ import { $ as SelectValue, A as useBlock, At as CardFooter, B as DEFAULT_EMBED_SANDBOX, Bt as Badge, C as isBridgeError, Ct as PopoverTrigger, D as parseCellValue, Dt as CardAction, E as conditionMatches, Et as Card, F as useSelection, G as SelectContent, Gt as DocblocksI18nProvider, H as SegmentSelector, Ht as Alert, I as useSelectionView, It as BookOpen, J as SelectLabel, Jt as createMemoryBlobStore, K as SelectGroup, L as useText, Lt as Button, M as useMeta, Mt as CardTitle, N as usePresence, Nt as Pen, O as TEXT_TYPES, Ot as CardContent, P as usePresenceSharing, Pt as Eye, Q as SelectTrigger, R as EditorProvider, Rt as buttonVariants, S as BridgeError, St as PopoverTitle, T as toBridgeError, Tt as Checkbox, U as ScrollArea, Ut as AlertDescription, V as Skeleton, Vt as badgeVariants, W as Select, Wt as AlertTitle, X as SelectScrollUpButton, Y as SelectScrollDownButton, Z as SelectSeparator, _ as BASELINE_CAPABILITIES, _t as Popover, a as SHAPE_FONT_STACKS, at as DropdownMenuItem, b as validateProtocolDescriptor, bt as PopoverDescription, ct as DropdownMenuRadioGroup, d as useDatabaseTable, dt as DropdownMenuShortcut, et as Label, f as cellValueEqual, ft as DropdownMenuSub, g as filterIsComplete, gt as Separator, h as emptyFilter, ht as DropdownMenuTrigger, i as SHAPE_FONT_OPTIONS, it as DropdownMenuGroup, j as useDoc, jt as CardHeader, k as columnAnnotation, kt as CardDescription, l as markToggleAction, lt as DropdownMenuRadioItem, m as FilterBuilder, mt as DropdownMenuSubTrigger, nt as DropdownMenuCheckboxItem, ot as DropdownMenuLabel, p as newMutationContext, pt as DropdownMenuSubContent, q as SelectItem, qt as renderRuns, rt as DropdownMenuContent, s as FORMAT_PALETTE, st as DropdownMenuPortal, t as Editor, tt as DropdownMenu, u as GridBody, ut as DropdownMenuSeparator, v as PROTOCOL_VERSION, vt as PopoverAnchor, w as isBridgeErrorCode, wt as Input, x as BRIDGE_ERROR_CODES, xt as PopoverHeader, y as isDatabaseBridge, yt as PopoverContent, z as useEditorContext, zt as BareSelect } from "./Editor-D_TogV4X.mjs";
2
2
  import { a as preventDefault, m as cn } from "./constants-OOBlKSTr.mjs";
3
3
  import { useCallback, useEffect, useRef, useState } from "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { Ft as CodeXml, H as SegmentSelector, Ht as Alert, Kt as INLINE_CODE_CLASS, Pt as Eye, Ut as AlertDescription, V as Skeleton, Wt as AlertTitle, c as textOf, n as childrenSlot, o as TextBlock, r as CodeHeader, z as useEditorContext } from "../Editor-RBfmEGXr.mjs";
1
+ import { Ft as CodeXml, H as SegmentSelector, Ht as Alert, Kt as INLINE_CODE_CLASS, Pt as Eye, Ut as AlertDescription, V as Skeleton, Wt as AlertTitle, c as textOf, n as childrenSlot, o as TextBlock, r as CodeHeader, z as useEditorContext } from "../Editor-D_TogV4X.mjs";
2
2
  import { c as TriangleAlert, d as LoaderCircle } from "../constants-OOBlKSTr.mjs";
3
3
  import { useEffect, useRef, useState } from "react";
4
4
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { f as PdfPreviewProps } from "../index-DyPFy2m5.mjs";
1
+ import { f as PdfPreviewProps } from "../index-CeuUfoao.mjs";
2
2
  //#region src/pdf/PdfFirstPage.d.ts
3
3
  declare function PdfFirstPage({ id, blockType, url, name }: PdfPreviewProps): import("react").JSX.Element;
4
4
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docblocks-react-ui",
3
- "version": "0.6.5",
3
+ "version": "0.6.6",
4
4
  "description": "React rendering + editing layer for docblocks: hooks, block renderers, caret/selection, keyboard, clipboard.",
5
5
  "type": "module",
6
6
  "license": "MIT",