docblocks-react-ui 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { n as BlockRendererMap } from "./index-YJcgf8Hh.mjs";
2
2
  import { ComponentType, ReactNode } from "react";
3
- import { Block, BlockContent, BlockId, BlockType, CanvasTextAttrs, Change, ConnectorAttrs, DatabaseFilterPayload, Doc, DocMeta, Geometry, PresenceState, Selection, SelectionView, ShapeAttrs, SyncEmbedRef, SyncProvider } from "docblocks-core";
3
+ import { Block, BlockContent, BlockId, BlockType, CanvasTextAttrs, Change, ConnectorAttrs, DatabaseFilterPayload, Doc, DocMeta, Geometry, PresenceSelection, PresenceState, Selection, SelectionView, ShapeAttrs, SyncEmbedRef, SyncProvider } from "docblocks-core";
4
4
  import { StoreApi } from "zustand/vanilla";
5
5
  //#region src/blob-store.d.ts
6
6
  /**
@@ -669,12 +669,11 @@ interface UseDatabaseTable {
669
669
  rowId: string;
670
670
  cells: Record<string, unknown>;
671
671
  }>): Promise<void>;
672
- /** The mixed paste (the spec's paste batch): the visible rows' updates
673
- * (from the active row down) + the overflow's creates — ONE `batchRows`
674
- * (one transaction, one undo entry; the inverse = the updates' restore
675
- * + the created rows' deletion). The updates stand the optimistic
676
- * apply; the creates stand over the post-commit refresh. Returns the
677
- * created rows' ids. */
672
+ /** The mixed paste: the visible rows' updates (from the active row down)
673
+ * + the overflow's creates — ONE `batchRows` (one transaction, one undo
674
+ * entry; the inverse = the updates' restore + the created rows'
675
+ * deletion). The updates stand the optimistic apply; the creates stand
676
+ * over the post-commit refresh. Returns the created rows' ids. */
678
677
  pasteRows(input: {
679
678
  updates: Array<{
680
679
  rowId: string;
@@ -718,6 +717,129 @@ interface UseDatabaseTable {
718
717
  */
719
718
  declare function useDatabaseTable(bridge: DatabaseBridge, tableId: string, filter?: DatabaseFilterPayload): UseDatabaseTable;
720
719
  //#endregion
720
+ //#region src/database/standalone/models.d.ts
721
+ /**
722
+ * The database table's view settings — the standalone's `DatabaseTable`
723
+ * stand over the block's view attrs: the `filter`, the `columnOrder`, the
724
+ * `hiddenColumns`, the `columnWidths`, and the legacy `name` (the display
725
+ * stands the bridge's table name, as over the block — the `name` attr is
726
+ * the persistence's parity, not a display override). The schema's
727
+ * `views` / `viewType` attrs stand out of the UI's v1 (the view's kinds
728
+ * are unrendered).
729
+ */
730
+ interface DatabaseTableView {
731
+ /** The display name's legacy parity (the bridge's table name stands the display). */
732
+ name?: string;
733
+ /** The applied filter (the block's `filter` attr's payload shape). */
734
+ filter?: DatabaseFilterPayload;
735
+ /** The visible columns' order (the drag's committed stand). */
736
+ columnOrder?: string[];
737
+ /** The hidden columns' ids (the column menu's toggle stand). */
738
+ hiddenColumns?: string[];
739
+ /** The columns' widths (px, over the `columnOrder` positions). */
740
+ columnWidths?: number[];
741
+ }
742
+ /** The `useTableList`'s return: the catalog's read projection + the create / rename's mutations. */
743
+ interface UseTableList {
744
+ /** The catalog's tables (the system tables stand absent); `null` until the first successful read. */
745
+ tables: TableRef[] | null;
746
+ /** The catalog read's in-flight stand. */
747
+ loading: boolean;
748
+ /** The catalog read's last error (the `BridgeError` stand — the create / rename's failures stand their promises' rejects). */
749
+ error: BridgeError | null;
750
+ /** The catalog's re-read (the manual's stand — the contract's catalog stands no push). */
751
+ refresh: () => Promise<void>;
752
+ /** The `createTable`'s mutation (the fresh's `operationId` per op; rejects with the `BridgeError`). Resolves the created table's ref. */
753
+ create: (name: string) => Promise<TableRef>;
754
+ /** The `renameTable`'s mutation (the fresh's `operationId` per op; rejects with the `BridgeError`). */
755
+ rename: (tableId: string, name: string) => Promise<void>;
756
+ }
757
+ //#endregion
758
+ //#region src/database/standalone/DatabaseTable.d.ts
759
+ interface DatabaseTableProps {
760
+ /** The consumer's bridge (the table's truth). */
761
+ bridge: DatabaseBridge;
762
+ /** The bridge's table id (the `TableRef.id` over the `listTables`'s catalog). */
763
+ tableId: string;
764
+ /** The read-only's stand: the grid's data stands rendered, the editing's paths stand off (the block's read-only's parity). */
765
+ readOnly?: boolean;
766
+ /** The initial view's state (the consumer's persistence's seed; the mount's stand only — the controlled's mode stands absent). */
767
+ view?: Partial<DatabaseTableView>;
768
+ /** The view's change's hook (the persistence's stand; the patch = the changed's attrs only). */
769
+ onViewChange?: (patch: Partial<DatabaseTableView>) => void;
770
+ }
771
+ /**
772
+ * The standalone's database table: the live grid over the bridge's table
773
+ * id — the same `useDatabaseTable`'s data stand as the document block
774
+ * (the schema + the rows + the live events + the optimistic cell's layer),
775
+ * rendered outside any document (the consumer's own page / panel). The
776
+ * view's settings stand the internal's state (seeded from the `view`
777
+ * prop) + the consumer's persistence over the `onViewChange`'s patch
778
+ * (one patch per change, as the block's `updateBlock` stand). The i18n's
779
+ * scope stands self-contained (the package's instance — the same's stand
780
+ * as the consumer-placed components).
781
+ */
782
+ declare function DatabaseTable({ bridge, tableId, readOnly, view, onViewChange }: DatabaseTableProps): import("react").JSX.Element;
783
+ //#endregion
784
+ //#region src/database/standalone/use-table-list.d.ts
785
+ /**
786
+ * The table catalog's hook (the standalone's stand): the consumer's
787
+ * `DatabaseBridge`'s catalog read (`listTables` — the system tables stand
788
+ * absent) + the `createTable` / `renameTable` mutations (the fresh's
789
+ * `operationId` per op over `newMutationContext`). The catalog's truth
790
+ * stands in the bridge — the hook's state is the read projection,
791
+ * re-read over the own's successful mutations (the auto's stand) + the
792
+ * manual's `refresh` (the contract's catalog stands no push — the
793
+ * per-table's events stand over the `useDatabaseTable`'s subscription).
794
+ * The create / rename's failures stand their promises' rejects (the
795
+ * `BridgeError` stand) — the `error` state is the catalog read's own.
796
+ */
797
+ declare function useTableList(bridge: DatabaseBridge): UseTableList;
798
+ //#endregion
799
+ //#region src/presence/models.d.ts
800
+ /** The local selection's sharing grant: no sharing, sharing over the whole
801
+ * room (plaintext), or a targeted user-id list (encrypted per target). */
802
+ type PresenceSharingMode = "off" | "everyone" | string[];
803
+ /**
804
+ * The consumer's selection cipher (the privacy's stand): the library
805
+ * orchestrates the publish/receive pipeline and the consumer brings the
806
+ * keys. An entry is an opaque string — the algorithm is the consumer's
807
+ * choice.
808
+ */
809
+ interface PresenceCrypto {
810
+ /**
811
+ * Encrypt the local selection for the grant: one opaque entry per target
812
+ * (grant order; no target id inside an entry — the recipient tries each
813
+ * entry with its own `decrypt`).
814
+ */
815
+ encrypt(selection: PresenceSelection, grant: string[]): Promise<string[]>;
816
+ /** Try to decrypt a received entry for the local user. Null when the entry is not addressed to the local user. */
817
+ decrypt(entry: string): Promise<PresenceSelection | null>;
818
+ }
819
+ /** One live roster entry: the peer's identity and whether its selection stands visible to the local user. */
820
+ interface PresencePeer {
821
+ peerId: string;
822
+ userId?: string;
823
+ name?: string;
824
+ updatedAt: number;
825
+ /** True when the peer's selection is accepted locally (decrypted, everyone, or legacy plaintext). */
826
+ selectionVisible: boolean;
827
+ }
828
+ /** The presence sharing's session state (per EditorProvider instance). */
829
+ interface PresenceSharing {
830
+ /** The local grant (session state; the default "off"; not persisted, not on the wire). */
831
+ sharing: PresenceSharingMode;
832
+ /** Set the local grant. A no-op over the read-only modes. */
833
+ setSharing: (mode: PresenceSharingMode) => void;
834
+ /** The live roster of the connected peers (the identity frames are always published). */
835
+ peers: PresencePeer[];
836
+ }
837
+ /** The presence identity's wire payload: the stable user id + the optional display label. */
838
+ interface PresenceIdentity {
839
+ userId?: string;
840
+ name?: string;
841
+ }
842
+ //#endregion
721
843
  //#region src/canvas/clipboard.d.ts
722
844
  /** The one copied canvas item (the deep data; the ids stand the originals). */
723
845
  type ClipboardItem = {
@@ -794,6 +916,12 @@ interface EditorState {
794
916
  collapsedIds: BlockId[];
795
917
  /** Remote peers' ephemeral state; a separate slice for the same reason. */
796
918
  presence: PresenceState[];
919
+ /**
920
+ * The local selection's sharing grant (session state per provider
921
+ * instance; the default "off" — not document data, never on the wire).
922
+ * A separate slice so a grant change never re-renders blocks.
923
+ */
924
+ sharing: PresenceSharingMode;
797
925
  /**
798
926
  * The canvas clipboard: the deep copy of
799
927
  * the copied canvas items — the view state per editor (not doc data, no
@@ -808,6 +936,8 @@ interface EditorActions {
808
936
  applyChange: (change: Change) => void;
809
937
  /** Replaces the presence slice. */
810
938
  setPresence: (peers: PresenceState[]) => void;
939
+ /** Sets the local sharing grant. */
940
+ setSharing: (mode: PresenceSharingMode) => void;
811
941
  /** Replaces the selection slice. */
812
942
  setSelection: (selection: Selection) => void;
813
943
  /** Sets the collapsed state of one list item (view state, no doc command). */
@@ -859,6 +989,27 @@ interface MentionProvider {
859
989
  interface SelectionRef {
860
990
  view: SelectionView | null;
861
991
  }
992
+ /**
993
+ * The local user's presence identity and the selection-sharing cipher
994
+ * (consumer session state — never document data). Without `userId` the
995
+ * peer is unaddressable: targeted sharing stands unavailable (the roster
996
+ * still lists the peer by its transport-level `peerId`). Without `crypto`
997
+ * the grant degrades to "off" / "everyone" (a targeted grant is a no-op).
998
+ */
999
+ interface PresenceConfig {
1000
+ /** The stable user id — the addressable identity on the wire. */
1001
+ userId: string;
1002
+ /** The roster display label (optional). */
1003
+ name?: string;
1004
+ /**
1005
+ * The selection cipher (the targeted's stand): the local selection is
1006
+ * encrypted per target for a targeted grant, and a received ciphertext
1007
+ * entry is decrypted with the local user's keys. Opaque strings
1008
+ * throughout — the algorithm is the consumer's choice. Without it, only
1009
+ * "off" / "everyone" are available.
1010
+ */
1011
+ crypto?: PresenceCrypto;
1012
+ }
862
1013
  /** The consumer's user access level: the available document modes. "viewer" is locked to the published's view (the current state is never rendered); "editor" (the default) may edit and view. Session state — not document data, never on the wire. */
863
1014
  type AccessLevel = "viewer" | "editor";
864
1015
  /** The document's mode (consumer-controlled view state, like the page/canvas `view`): "edit" (the default) is the live document editable; "view" is the live document read-only (the current state, still syncing); "published" is the `publishedDoc`'s snapshot read-only (static). */
@@ -899,6 +1050,8 @@ interface EditorContextValue {
899
1050
  mode: EditorMode;
900
1051
  /** True over the non-edit modes ("view" / "published"): every editing surface gates off (the read-only stand). */
901
1052
  viewMode: boolean;
1053
+ /** The presence identity + cipher (the provider's `presence` prop); null when none was supplied (the legacy's anonymous stand). */
1054
+ presence: PresenceConfig | null;
902
1055
  }
903
1056
  interface EditorProviderProps {
904
1057
  /**
@@ -1041,6 +1194,22 @@ interface EditorProviderProps {
1041
1194
  * inherits the enclosing value, like the resolvers.
1042
1195
  */
1043
1196
  commandPalettePlaceholder?: string;
1197
+ /**
1198
+ * Optional presence identity + the selection-sharing cipher (consumer
1199
+ * session state, never document data): the local user's stable `userId`
1200
+ * (the addressable identity on the wire), the optional roster label, and
1201
+ * the optional `PresenceCrypto` cipher (without it a targeted grant
1202
+ * degrades to "off" / "everyone": the hook's setter stands a no-op over
1203
+ * a targeted grant without the identity or the cipher). With the prop
1204
+ * the selection sharing grant is session state
1205
+ * driven through `usePresenceSharing()` (the default "off" — the
1206
+ * privacy stand); without it the provider keeps the legacy stand (the
1207
+ * anonymous plaintext selection — always shared over the room).
1208
+ *
1209
+ * Like the other customization values, the value is read per render:
1210
+ * pass a stable reference.
1211
+ */
1212
+ presence?: PresenceConfig;
1044
1213
  children: ReactNode;
1045
1214
  }
1046
1215
  //#endregion
@@ -1072,4 +1241,4 @@ declare const DEFAULT_EMBED_SANDBOX = "allow-scripts allow-forms allow-popups";
1072
1241
  /** Read the per-instance editor context; throws outside an EditorProvider. */
1073
1242
  declare function useEditorContext(): EditorContextValue;
1074
1243
  //#endregion
1075
- export { TableEnvelopeBase as $, DomainEvent as A, ProtocolCapability as B, BridgeColumnAnnotation as C, CellValueParse as D, CellMap as E, MutationContext as F, Revision as G, ProtocolLimits as H, MutationReceipt as I, SortInput as J, RowPage as K, OperationStatus as L, FilterInput as M, Id as N, Column as O, IsoInstant as P, TableDescription as Q, PageQuery as R, BridgeColumn as S, BridgeValueInput as T, QueryOperator as U, ProtocolDescriptor as V, QuerySemantics as W, SubscriptionObserver as X, SubscriptionHandle as Y, SubscriptionStatus as Z, UseDatabaseTable as _, EditorContextValue as a, BridgeErrorCode as at, FilterBuilder as b, EmbedSandboxPolicy as c, toBridgeError as ct, PdfPreview as d, BlobStore as dt, TableEvent as et, PdfPreviewProps as f, BlobSubtype as ft, DatabaseTableRow as g, DatabaseTablePhase as h, AccessLevel as i, BridgeError as it, FilterConditionInput as j, DatabaseBridge as k, MentionEntry as l, BlobMeta as lt, useDatabaseTable as m, createMemoryBlobStore as mt, DEFAULT_EMBED_SANDBOX as n, TableSnapshot as nt, EditorMode as o, isBridgeError as ot, SyncEmbedResolver as p, blobSubtypeOf as pt, RowWire as q, EditorProvider as r, BRIDGE_ERROR_CODES as rt, EditorProviderProps as s, isBridgeErrorCode as st, useEditorContext as t, TableRef as tt, MentionProvider as u, BlobRef as ut, emptyFilter as v, BridgeTableDescription as w, BatchOp as x, filterIsComplete as y, PageSnapshot as z };
1244
+ export { ProtocolLimits as $, filterIsComplete as A, DatabaseBridge as B, DatabaseTableView as C, BlobSubtype as Ct, DatabaseTableRow as D, DatabaseTablePhase as E, BridgeTableDescription as F, IsoInstant as G, FilterConditionInput as H, BridgeValueInput as I, OperationStatus as J, MutationContext as K, CellMap as L, BatchOp as M, BridgeColumn as N, UseDatabaseTable as O, BridgeColumnAnnotation as P, ProtocolDescriptor as Q, CellValueParse as R, DatabaseTableProps as S, BlobStore as St, useDatabaseTable as T, createMemoryBlobStore as Tt, FilterInput as U, DomainEvent as V, Id as W, PageSnapshot as X, PageQuery as Y, ProtocolCapability as Z, PresencePeer as _, isBridgeError as _t, EditorContextValue as a, SortInput as at, useTableList as b, BlobMeta as bt, EmbedSandboxPolicy as c, SubscriptionStatus as ct, PdfPreview as d, TableEvent as dt, QueryOperator as et, PdfPreviewProps as f, TableRef as ft, PresenceIdentity as g, BridgeErrorCode as gt, PresenceCrypto as h, BridgeError as ht, AccessLevel as i, RowWire as it, FilterBuilder as j, emptyFilter as k, MentionEntry as l, TableDescription as lt, SyncEmbedResolver as m, BRIDGE_ERROR_CODES as mt, DEFAULT_EMBED_SANDBOX as n, Revision as nt, EditorMode as o, SubscriptionHandle as ot, PresenceConfig as p, TableSnapshot as pt, MutationReceipt as q, EditorProvider as r, RowPage as rt, EditorProviderProps as s, SubscriptionObserver as st, useEditorContext as t, QuerySemantics as tt, MentionProvider as u, TableEnvelopeBase as ut, PresenceSharing as v, isBridgeErrorCode as vt, UseTableList as w, blobSubtypeOf as wt, DatabaseTable as x, BlobRef as xt, PresenceSharingMode as y, toBridgeError as yt, Column as z };
package/dist/index.d.mts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { n as BlockRendererMap, r as BlockRendererProps, t as BlockRenderer } from "./index-YJcgf8Hh.mjs";
2
- import { n as EditorView, t as Editor } from "./Editor-DT7RkRXf.mjs";
3
- import { $ as TableEnvelopeBase, A as DomainEvent, B as ProtocolCapability, C as BridgeColumnAnnotation, D as CellValueParse, E as CellMap, F as MutationContext, G as Revision, H as ProtocolLimits, I as MutationReceipt, J as SortInput, K as RowPage, L as OperationStatus, M as FilterInput, N as Id, O as Column, P as IsoInstant, Q as TableDescription, R as PageQuery, S as BridgeColumn, T as BridgeValueInput, U as QueryOperator, V as ProtocolDescriptor, W as QuerySemantics, X as SubscriptionObserver, Y as SubscriptionHandle, Z as SubscriptionStatus, _ as UseDatabaseTable, a as EditorContextValue, at as BridgeErrorCode, b as FilterBuilder, c as EmbedSandboxPolicy, ct as toBridgeError, d as PdfPreview, dt as BlobStore, et as TableEvent, f as PdfPreviewProps, ft as BlobSubtype, g as DatabaseTableRow, h as DatabaseTablePhase, i as AccessLevel, it as BridgeError, j as FilterConditionInput, k as DatabaseBridge, l as MentionEntry, lt as BlobMeta, m as useDatabaseTable, mt as createMemoryBlobStore, n as DEFAULT_EMBED_SANDBOX, nt as TableSnapshot, o as EditorMode, ot as isBridgeError, p as SyncEmbedResolver, pt as blobSubtypeOf, q as RowWire, r as EditorProvider, rt as BRIDGE_ERROR_CODES, s as EditorProviderProps, st as isBridgeErrorCode, t as useEditorContext, tt as TableRef, u as MentionProvider, ut as BlobRef, v as emptyFilter, w as BridgeTableDescription, x as BatchOp, y as filterIsComplete, z as PageSnapshot } from "./index-D6_ysSmQ.mjs";
2
+ import { $ as ProtocolLimits, A as filterIsComplete, B as DatabaseBridge, C as DatabaseTableView, Ct as BlobSubtype, 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, Tt as createMemoryBlobStore, 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, wt as blobSubtypeOf, x as DatabaseTable, xt as BlobRef, y as PresenceSharingMode, yt as toBridgeError, z as Column } from "./index-DG0lJy_t.mjs";
4
3
  import * as React from "react";
5
4
  import { ComponentType, ReactNode } from "react";
6
5
  import { Block, BlockId, BlockType, Doc, DocMeta, PresenceState, Selection, SelectionView, SyncEmbedRef, TextRun } from "docblocks-core";
@@ -14,6 +13,41 @@ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
14
13
  import * as SelectPrimitive from "@radix-ui/react-select";
15
14
  import * as TabsPrimitive from "@radix-ui/react-tabs";
16
15
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
16
+ //#region src/Editor.d.ts
17
+ /**
18
+ * The document's view mode: the page flow (the root's children in reading
19
+ * order) or the canvas (the page as a miniature rectangle plus the surface
20
+ * elements on one canvas). View state — switching writes nothing to the
21
+ * data (like the selection).
22
+ */
23
+ type EditorView = "page" | "canvas";
24
+ interface EditorProps {
25
+ view?: EditorView;
26
+ /** The format toolbar's color palette (the default six colors). */
27
+ formatPalette?: readonly string[];
28
+ }
29
+ /**
30
+ * The document's editor: the root is the editor's focus/keyboard scope
31
+ * (the undo/redo hotkeys only fire for keys targeted inside it), and the
32
+ * root block context is provided for every entry (the entry list's
33
+ * siblings, and the entry root's sequence container as the gestures'
34
+ * command parent — a subtree entry root is a page block, structurally
35
+ * childless, so its commands target the container of its sequence, not
36
+ * itself).
37
+ *
38
+ * The `view` prop selects the rendering: "page" (default) is the flat page
39
+ * sequence — every page block is its own `Reorder.Item` row (the nesting is
40
+ * the block's `indent` attr; a list item's marker is a rendered label per
41
+ * row), the top-level rows render through `AnimatePresence` (`sync`), and
42
+ * the drag-reorder is pure framer `Reorder` (one drag = one range move of
43
+ * the dragged block's derived subtree — see the `motion` segment);
44
+ * "canvas" renders the document's page as a page miniature and the
45
+ * root-level surfaces' elements on one canvas (see CanvasView). The
46
+ * `formatPalette` prop overrides the floating format toolbar's color
47
+ * palette.
48
+ */
49
+ declare function Editor({ view, formatPalette }: EditorProps): import("react").JSX.Element;
50
+ //#endregion
17
51
  //#region src/database/bridge/annotation.d.ts
18
52
  /** The standard PostgreSQL type names per operator / input group. The contract
19
53
  * is type-agnostic — this is the package's DEFAULT catalog; a non-standard
@@ -61,13 +95,17 @@ declare function isDatabaseBridge(candidate: unknown): candidate is DatabaseBrid
61
95
  declare function validateProtocolDescriptor(descriptor: ProtocolDescriptor): Set<ProtocolCapability>;
62
96
  //#endregion
63
97
  //#region src/database/use-database-table/utils.d.ts
64
- /** The cell-value equality (null / undefined stand as the empty cell). */
98
+ /** The cell-value equality (null / undefined stand as the empty cell).
99
+ * The composite value (the multi-select's array) stands the element-wise
100
+ * stand: the same content over a fresh array instance is NOT a change
101
+ * (the identity stand would commit the no-op and push the undo entry). */
65
102
  declare function cellValueEqual(current: unknown, next: unknown): boolean;
66
103
  /** The write's context: the fresh client-issued operation id (a UUID,
67
104
  * unique within the retention) + the issue time. Every user action stands
68
105
  * a fresh `operationId` — the id is never reused across logical
69
- * operations, and a failed write is reconciled by the SAME id (the
70
- * bridge's idempotency), never a silent new one. */
106
+ * operations. The lost response's reconciliation (the write's fate) is
107
+ * the consumer's stand over the bridge's `getOperationStatus`; the UI's
108
+ * convergence is the rebaseline (the next snapshot / the envelope). */
71
109
  declare function newMutationContext(): MutationContext;
72
110
  //#endregion
73
111
  //#region src/canvas/text-fonts.d.ts
@@ -112,7 +150,9 @@ declare const SHAPE_FONT_OPTIONS: readonly [{
112
150
  declare const SHAPE_FONT_STACKS: Record<string, string>;
113
151
  //#endregion
114
152
  //#region src/DocHeader.d.ts
115
- declare function DocHeader({ doc, view, onViewChange, accessLevel, mode, onModeChange, publishedDoc }: {
153
+ /** The header's props (the consumer's state: the doc's stand, the view and
154
+ * the mode's switchers — the consumer owns the view / the mode's state). */
155
+ interface DocHeaderProps {
116
156
  /** The headless document (the consumer's own stand: the live doc over the editor's stand, the published snapshot over the viewer's stand — the reader's browser never holds the live document). */
117
157
  doc?: Doc;
118
158
  view: EditorView;
@@ -125,7 +165,13 @@ declare function DocHeader({ doc, view, onViewChange, accessLevel, mode, onModeC
125
165
  onModeChange?: (mode: EditorMode) => void;
126
166
  /** The published snapshot (the meta's source over the published's stand; the "Published"'s option stands disabled over its absence). */
127
167
  publishedDoc?: Doc | null;
128
- }): import("react").JSX.Element;
168
+ }
169
+ /** The header's i18n scope: the package's instance stands the provider's seat
170
+ * over the panel (the consumer places the header outside the editor — the
171
+ * editor's own scope never reaches it). A consumer-wrapped subtree stands
172
+ * the same instance nested — the provider is a plain context, the render
173
+ * is unchanged. */
174
+ declare function DocHeader(props: DocHeaderProps): import("react").JSX.Element;
129
175
  //#endregion
130
176
  //#region src/hooks.d.ts
131
177
  /** The headless document owned by the nearest EditorProvider. */
@@ -147,6 +193,14 @@ declare function useText(id: BlockId): string;
147
193
  declare function useSelection(): Selection;
148
194
  /** Remote peers' ephemeral state; a separate slice for the same reason. */
149
195
  declare function usePresence(): PresenceState[];
196
+ /**
197
+ * The presence sharing's session state (per provider instance): the local
198
+ * grant (the default "off" — the privacy stand), the grant's setter (a
199
+ * no-op over the read-only stand), and the live roster of the connected
200
+ * peers (the identity frames are always present, the selection only over
201
+ * the grant it stands shared).
202
+ */
203
+ declare function usePresenceSharing(): PresenceSharing;
150
204
  /** The document meta; the reference is replaced only when the title changed. */
151
205
  declare function useMeta(): DocMeta;
152
206
  /**
@@ -240,7 +294,7 @@ declare function AlertDescription({ className, ...props }: React.ComponentProps<
240
294
  //#endregion
241
295
  //#region src/shared/ui/Badge.d.ts
242
296
  declare const badgeVariants: (props?: ({
243
- variant?: "default" | "destructive" | "outline" | "secondary" | "custom" | null | undefined;
297
+ variant?: "default" | "destructive" | "custom" | "secondary" | "outline" | null | undefined;
244
298
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
245
299
  declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
246
300
  asChild?: boolean;
@@ -251,7 +305,7 @@ declare function BareSelect({ className, children, ...props }: React.ComponentPr
251
305
  //#endregion
252
306
  //#region src/shared/ui/Button.d.ts
253
307
  declare const buttonVariants: (props?: ({
254
- variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
308
+ variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
255
309
  size?: "default" | "icon" | "sm" | "lg" | "xl" | null | undefined;
256
310
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
257
311
  declare function Button({ className, variant, size, asChild, type, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
@@ -385,4 +439,4 @@ declare function TooltipContent({ className, sideOffset, children, ...props }: R
385
439
  //#region src/shared/ui/cn.d.ts
386
440
  declare function cn(...inputs: ClassValue[]): string;
387
441
  //#endregion
388
- export { type AccessLevel, Alert, AlertDescription, AlertTitle, BASELINE_CAPABILITIES, BRIDGE_ERROR_CODES, Badge, BareSelect, type BatchOp, type BlobMeta, type BlobRef, type BlobStore, type BlobSubtype, type BlockRenderer, type BlockRendererMap, type BlockRendererProps, type BridgeColumn, type BridgeColumnAnnotation, BridgeError, type BridgeErrorCode, type BridgeTableDescription, type BridgeValueInput, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CellMap, type CellValueParse, Checkbox, type Column, DEFAULT_EMBED_SANDBOX, type DatabaseBridge, type DatabaseTablePhase, type DatabaseTableRow, DocHeader, type DomainEvent, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Editor, type EditorContextValue, type EditorMode, EditorProvider, type EditorProviderProps, type EditorView, type EmbedSandboxPolicy, FORMAT_PALETTE, FilterBuilder, type FilterConditionInput, type FilterInput, type FormatMark, type Id, Input, type IsoInstant, Label, MONO_FONT_STACK, type MentionEntry, type MentionProvider, type MutationContext, type MutationReceipt, type OperationStatus, PROTOCOL_VERSION, type PageQuery, type PageSnapshot, type PdfPreview, type PdfPreviewProps, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, type ProtocolCapability, type ProtocolDescriptor, type ProtocolLimits, type QueryOperator, type QuerySemantics, type Revision, type RowPage, type RowWire, SHAPE_FONT_OPTIONS, SHAPE_FONT_STACKS, ScrollArea, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Skeleton, type SortInput, type SubscriptionHandle, type SubscriptionObserver, type SubscriptionStatus, type SyncEmbedRef, type SyncEmbedResolver, TEXT_TYPES, type TableDescription, type TableEnvelopeBase, type TableEvent, type TableRef, type TableSnapshot, Tabs, TabsContent, TabsList, TabsTrigger, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UI_FONT_ID, UI_FONT_STACK, type UseDatabaseTable, badgeVariants, blobSubtypeOf, buttonVariants, cellValueEqual, cn, columnAnnotation, conditionMatches, createMemoryBlobStore, emptyFilter, filterIsComplete, isBridgeError, isBridgeErrorCode, isDatabaseBridge, markToggleAction, newMutationContext, parseCellValue, renderRuns, toBridgeError, useBlock, useDatabaseTable, useDoc, useEditorContext, useMeta, usePresence, useSelection, useSelectionView, useText, validateProtocolDescriptor };
442
+ export { type AccessLevel, Alert, AlertDescription, AlertTitle, BASELINE_CAPABILITIES, BRIDGE_ERROR_CODES, Badge, BareSelect, type BatchOp, type BlobMeta, type BlobRef, type BlobStore, type BlobSubtype, type BlockRenderer, type BlockRendererMap, type BlockRendererProps, type BridgeColumn, type BridgeColumnAnnotation, BridgeError, type BridgeErrorCode, type BridgeTableDescription, type BridgeValueInput, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CellMap, type CellValueParse, Checkbox, type Column, DEFAULT_EMBED_SANDBOX, type DatabaseBridge, DatabaseTable, type DatabaseTablePhase, type DatabaseTableProps, type DatabaseTableRow, type DatabaseTableView, DocHeader, type DomainEvent, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Editor, type EditorContextValue, type EditorMode, EditorProvider, type EditorProviderProps, type EditorView, type EmbedSandboxPolicy, FORMAT_PALETTE, FilterBuilder, type FilterConditionInput, type FilterInput, type FormatMark, type Id, Input, type IsoInstant, Label, MONO_FONT_STACK, type MentionEntry, type MentionProvider, type MutationContext, type MutationReceipt, type OperationStatus, PROTOCOL_VERSION, type PageQuery, type PageSnapshot, type PdfPreview, type PdfPreviewProps, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, type PresenceConfig, type PresenceCrypto, type PresenceIdentity, type PresencePeer, type PresenceSharing, type PresenceSharingMode, type ProtocolCapability, type ProtocolDescriptor, type ProtocolLimits, type QueryOperator, type QuerySemantics, type Revision, type RowPage, type RowWire, SHAPE_FONT_OPTIONS, SHAPE_FONT_STACKS, ScrollArea, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Skeleton, type SortInput, type SubscriptionHandle, type SubscriptionObserver, type SubscriptionStatus, type SyncEmbedRef, type SyncEmbedResolver, TEXT_TYPES, type TableDescription, type TableEnvelopeBase, type TableEvent, type TableRef, type TableSnapshot, Tabs, TabsContent, TabsList, TabsTrigger, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UI_FONT_ID, UI_FONT_STACK, type UseDatabaseTable, type UseTableList, badgeVariants, blobSubtypeOf, buttonVariants, cellValueEqual, cn, columnAnnotation, conditionMatches, createMemoryBlobStore, emptyFilter, filterIsComplete, isBridgeError, isBridgeErrorCode, isDatabaseBridge, markToggleAction, newMutationContext, parseCellValue, renderRuns, toBridgeError, useBlock, useDatabaseTable, useDoc, useEditorContext, useMeta, usePresence, usePresenceSharing, useSelection, useSelectionView, useTableList, useText, validateProtocolDescriptor };