docblocks-react-ui 0.24.1 → 0.26.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.
@@ -778,6 +778,20 @@ declare function cellValueEqual(current: unknown, next: unknown): boolean;
778
778
  * convergence is the rebaseline (the next snapshot / the envelope). */
779
779
  declare function newMutationContext(): MutationContext;
780
780
  //#endregion
781
+ //#region src/database/table-section.d.ts
782
+ /** The consumer's per-table section settings: the values that belong to
783
+ * the table itself rather than to a document block. The consumer owns the
784
+ * storage (its own table registry); the package reads the values as the
785
+ * block's fallback and writes them back over the section's own grid. */
786
+ interface DatabaseTableSection {
787
+ /** The table's persisted header-row height (px); `undefined` stands none
788
+ * (the block's own attr over it, else the auto height). */
789
+ getHeaderHeight?: (tableId: string) => number | undefined;
790
+ /** Commits the header-row height for the table (the section's grid drag's
791
+ * release): one value over every block referencing the table. */
792
+ setHeaderHeight?: (tableId: string, height: number) => void;
793
+ }
794
+ //#endregion
781
795
  //#region src/database/standalone/models.d.ts
782
796
  /**
783
797
  * The database table's view settings — the standalone's `DatabaseTable`
@@ -834,6 +848,10 @@ interface DatabaseTableProps {
834
848
  * constrained root stands the grid's inner scroll (the unconstrained's
835
849
  * stand is the content's height, as over the document's block). */
836
850
  className?: string;
851
+ /** The consumer's per-table section settings: the header-row height the
852
+ * table itself carries (the document blocks reference the same table id
853
+ * and read the same stand over their provider's `databaseTableSection`). */
854
+ tableSection?: DatabaseTableSection;
837
855
  }
838
856
  /**
839
857
  * The standalone's database table: the live grid over the bridge's table
@@ -849,7 +867,7 @@ interface DatabaseTableProps {
849
867
  * stands the grid's inner scroll; the unconstrained's stand is the
850
868
  * content's height).
851
869
  */
852
- declare function DatabaseTable({ bridge, tableId, readOnly, view, onViewChange, className }: DatabaseTableProps): import("react").JSX.Element;
870
+ declare function DatabaseTable({ bridge, tableId, readOnly, view, onViewChange, className, tableSection }: DatabaseTableProps): import("react").JSX.Element;
853
871
  //#endregion
854
872
  //#region src/database/standalone/use-table-list.d.ts
855
873
  /**
@@ -927,7 +945,7 @@ interface MentionInteractions {
927
945
  * mode (consumer session state, never document data). */
928
946
  /** 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. */
929
947
  type AccessLevel = "viewer" | "editor";
930
- /** 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) with its text selectable and copyable; "published" is the `publishedDoc`'s snapshot read-only (static) with no selection and no copy. */
948
+ /** 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) with its text selectable and copyable; "published" is the `publishedDoc`'s snapshot read-only (static) with no selection and no copy by default — the `publishedCopyable` provider prop lifts the block per reader (the `view` mode's payload). */
931
949
  type EditorMode = "edit" | "view" | "published";
932
950
  //#endregion
933
951
  //#region src/editor-provider/models/panels.d.ts
@@ -1133,6 +1151,21 @@ interface EditorProviderBaseProps {
1133
1151
  * none inherits the enclosing bridge.
1134
1152
  */
1135
1153
  databaseBridge?: DatabaseBridge;
1154
+ /**
1155
+ * Optional per-table section settings: the values the consumer keeps for
1156
+ * the table itself instead of a document block, keyed by the bridge's
1157
+ * table id. `getHeaderHeight` feeds the external-form grid's header-row
1158
+ * height as the block's fallback — a block's own `headerHeight` attr wins
1159
+ * over it, an absent stand is the auto height; `setHeaderHeight` is the
1160
+ * section's own grid's commit (the standalone `DatabaseTable` over the
1161
+ * same table id). Without the prop the grid keeps the document-level
1162
+ * stand only (the block's attr).
1163
+ *
1164
+ * Like `databaseBridge`, the value is read per render into the provider
1165
+ * context: pass a stable reference. A nested provider that supplies none
1166
+ * inherits the enclosing stand.
1167
+ */
1168
+ databaseTableSection?: DatabaseTableSection;
1136
1169
  /**
1137
1170
  * Optional PDF first-page preview renderer for file blocks and legacy PDF
1138
1171
  * image blocks. The component receives the library-owned object URL and the
@@ -1207,6 +1240,10 @@ interface EditorContextValue {
1207
1240
  * undefined when none was supplied — the external-form database blocks
1208
1241
  * render the disconnected placeholder. */
1209
1242
  databaseBridge: DatabaseBridge | undefined;
1243
+ /** The consumer's per-table section settings (the `databaseTableSection`
1244
+ * prop): the table-level values the grid reads as the block's fallback;
1245
+ * null when none was supplied. */
1246
+ databaseTableSection: DatabaseTableSection | null;
1210
1247
  /** The sync-embed master-doc resolver; null when none was supplied. */
1211
1248
  syncEmbedResolver: SyncEmbedResolver | null;
1212
1249
  /** The consumer's PDF first-page preview renderer; null when none was supplied (the native iframe stands). */
@@ -1241,6 +1278,8 @@ interface EditorContextValue {
1241
1278
  accessLevel: AccessLevel;
1242
1279
  /** The effective document mode (resolved: a viewer stands "published" over any stand; a nested provider without its own `mode` inherits the enclosing one). */
1243
1280
  mode: EditorMode;
1281
+ /** The published stand's selection policy (`publishedCopyable`): true makes the published snapshot's page text selectable and copyable — the `view` mode's parity; false (the default) keeps the reader's selection off. The canvas world keeps the no-select stand either way. */
1282
+ publishedCopyable: boolean;
1244
1283
  /** True over the non-edit modes ("view" / "published"): every editing surface gates off (the read-only stand). */
1245
1284
  viewMode: boolean;
1246
1285
  /** The presence identity + cipher (the provider's `presence` prop); null when none was supplied (the legacy's anonymous stand). */
@@ -1275,6 +1314,18 @@ interface EditorProviderAccessProps {
1275
1314
  * snapshot is a consumer remount over a `key` change.
1276
1315
  */
1277
1316
  publishedDoc?: Doc | null;
1317
+ /**
1318
+ * The published stand's selection policy (default `false`): `true` makes
1319
+ * the published snapshot's page text selectable and copyable — the
1320
+ * `view` mode's parity (the native range over the non-editable inners,
1321
+ * the editor's copy payload: marks, `@label` mentions, cross-block
1322
+ * ranges, and the table's grid serialization), so the consumer decides
1323
+ * per reader whether the published state may be quoted. The canvas
1324
+ * world keeps the no-select stand in every mode. Session state supplied
1325
+ * by the consumer — never document data. A nested provider without its
1326
+ * own stand inherits the enclosing one.
1327
+ */
1328
+ publishedCopyable?: boolean;
1278
1329
  /**
1279
1330
  * Optional presence identity + the selection-sharing cipher (consumer
1280
1331
  * session state, never document data): the local user's stable `userId`
@@ -1464,4 +1515,4 @@ declare const DEFAULT_EMBED_SANDBOX = "allow-scripts allow-same-origin allow-for
1464
1515
  /** Read the per-instance editor context; throws outside an EditorProvider. */
1465
1516
  declare function useEditorContext(): EditorContextValue;
1466
1517
  //#endregion
1467
- export { TableEnvelopeBase as $, DatabaseTablePhase as A, RenderAttribute as At, BridgeTableDescription as B, DatabaseTable as C, toBridgeError as Ct, cellValueEqual as D, createMemoryBlobStore as Dt, UseTableList as E, BlobStore as Et, FilterBuilder as F, MutationReceipt as G, CellValueParse as H, BatchOp as I, ProtocolDescriptor as J, OperationStatus as K, DatabaseBridge as L, UseDatabaseTable as M, emptyFilter as N, newMutationContext as O, AttributeTypePicker as Ot, filterIsComplete as P, SubscriptionStatus as Q, BridgeColumn as R, useTableList as S, isBridgeErrorCode as St, DatabaseTableView as T, BlobRef as Tt, DomainEvent as U, BridgeValueInput as V, MutationContext as W, SubscriptionHandle as X, ProtocolLimits as Y, SubscriptionObserver as Z, AccessLevel as _, TableSnapshot as _t, EditorContextValue as a, Id as at, MentionInteractions as b, BridgeErrorCode as bt, SelectionRef as c, PageSnapshot as ct, PdfPreview as d, Revision as dt, TableEvent as et, PdfPreviewProps as f, RowPage as ft, DocTags as g, TableRef as gt, DocTag as h, TableDescription as ht, EditorProviderProps as i, FilterInput as it, DatabaseTableRow as j, RenderAttributeProps as jt, useDatabaseTable as k, AttributeTypePickerProps as kt, BlobLoading as l, QueryOperator as lt, DocDescription as m, SortInput as mt, DEFAULT_EMBED_SANDBOX as n, Column as nt, EmbedSandboxPolicy as o, IsoInstant as ot, CoverPresetSets as p, RowWire as pt, ProtocolCapability as q, EditorProvider as r, FilterConditionInput as rt, SyncEmbedResolver as s, PageQuery as st, useEditorContext as t, CellMap as tt, PresenceConfig as u, QuerySemantics as ut, EditorMode as v, BRIDGE_ERROR_CODES as vt, DatabaseTableProps as w, BlobMeta as wt, MentionProvider as x, isBridgeError as xt, MentionEntry as y, BridgeError as yt, BridgeColumnAnnotation as z };
1518
+ export { SubscriptionStatus as $, useDatabaseTable as A, AttributeTypePickerProps as At, BridgeColumnAnnotation as B, DatabaseTable as C, isBridgeErrorCode as Ct, DatabaseTableSection as D, BlobStore as Dt, UseTableList as E, BlobRef as Et, filterIsComplete as F, MutationContext as G, BridgeValueInput as H, FilterBuilder as I, ProtocolCapability as J, MutationReceipt as K, BatchOp as L, DatabaseTableRow as M, RenderAttributeProps as Mt, UseDatabaseTable as N, cellValueEqual as O, createMemoryBlobStore as Ot, emptyFilter as P, SubscriptionObserver as Q, DatabaseBridge as R, useTableList as S, isBridgeError as St, DatabaseTableView as T, BlobMeta as Tt, CellValueParse as U, BridgeTableDescription as V, DomainEvent as W, ProtocolLimits as X, ProtocolDescriptor as Y, SubscriptionHandle as Z, AccessLevel as _, TableRef as _t, EditorContextValue as a, FilterInput as at, MentionInteractions as b, BridgeError as bt, SelectionRef as c, PageQuery as ct, PdfPreview as d, QuerySemantics as dt, TableEnvelopeBase as et, PdfPreviewProps as f, Revision as ft, DocTags as g, TableDescription as gt, DocTag as h, SortInput as ht, EditorProviderProps as i, FilterConditionInput as it, DatabaseTablePhase as j, RenderAttribute as jt, newMutationContext as k, AttributeTypePicker as kt, BlobLoading as l, PageSnapshot as lt, DocDescription as m, RowWire as mt, DEFAULT_EMBED_SANDBOX as n, CellMap as nt, EmbedSandboxPolicy as o, Id as ot, CoverPresetSets as p, RowPage as pt, OperationStatus as q, EditorProvider as r, Column as rt, SyncEmbedResolver as s, IsoInstant as st, useEditorContext as t, TableEvent as tt, PresenceConfig as u, QueryOperator as ut, EditorMode as v, TableSnapshot as vt, DatabaseTableProps as w, toBridgeError as wt, MentionProvider as x, BridgeErrorCode as xt, MentionEntry as y, BRIDGE_ERROR_CODES as yt, BridgeColumn as z };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { a as PresenceCrypto, c as PresenceSharing, l as PresenceSharingMode, n as BlockRendererMap, o as PresenceIdentity, r as BlockRendererProps, s as PresencePeer, t as BlockRenderer } from "./index-DeOMnr7f.mjs";
2
- import { $ as TableEnvelopeBase, A as DatabaseTablePhase, At as RenderAttribute, B as BridgeTableDescription, C as DatabaseTable, Ct as toBridgeError, D as cellValueEqual, Dt as createMemoryBlobStore, E as UseTableList, Et as BlobStore, F as FilterBuilder, G as MutationReceipt, H as CellValueParse, I as BatchOp, J as ProtocolDescriptor, K as OperationStatus, L as DatabaseBridge, M as UseDatabaseTable, N as emptyFilter, O as newMutationContext, Ot as AttributeTypePicker, P as filterIsComplete, Q as SubscriptionStatus, R as BridgeColumn, S as useTableList, St as isBridgeErrorCode, T as DatabaseTableView, Tt as BlobRef, U as DomainEvent, V as BridgeValueInput, W as MutationContext, X as SubscriptionHandle, Y as ProtocolLimits, Z as SubscriptionObserver, _ as AccessLevel, _t as TableSnapshot, a as EditorContextValue, at as Id, b as MentionInteractions, bt as BridgeErrorCode, c as SelectionRef, ct as PageSnapshot, d as PdfPreview, dt as Revision, et as TableEvent, f as PdfPreviewProps, ft as RowPage, g as DocTags, gt as TableRef, h as DocTag, ht as TableDescription, i as EditorProviderProps, it as FilterInput, j as DatabaseTableRow, jt as RenderAttributeProps, k as useDatabaseTable, kt as AttributeTypePickerProps, l as BlobLoading, lt as QueryOperator, m as DocDescription, mt as SortInput, n as DEFAULT_EMBED_SANDBOX, nt as Column, o as EmbedSandboxPolicy, ot as IsoInstant, p as CoverPresetSets, pt as RowWire, q as ProtocolCapability, r as EditorProvider, rt as FilterConditionInput, s as SyncEmbedResolver, st as PageQuery, t as useEditorContext, tt as CellMap, u as PresenceConfig, ut as QuerySemantics, v as EditorMode, vt as BRIDGE_ERROR_CODES, w as DatabaseTableProps, wt as BlobMeta, x as MentionProvider, xt as isBridgeError, y as MentionEntry, yt as BridgeError, z as BridgeColumnAnnotation } from "./index-CE8wKsue.mjs";
2
+ import { $ as SubscriptionStatus, A as useDatabaseTable, At as AttributeTypePickerProps, B as BridgeColumnAnnotation, C as DatabaseTable, Ct as isBridgeErrorCode, D as DatabaseTableSection, Dt as BlobStore, E as UseTableList, Et as BlobRef, F as filterIsComplete, G as MutationContext, H as BridgeValueInput, I as FilterBuilder, J as ProtocolCapability, K as MutationReceipt, L as BatchOp, M as DatabaseTableRow, Mt as RenderAttributeProps, N as UseDatabaseTable, O as cellValueEqual, Ot as createMemoryBlobStore, P as emptyFilter, Q as SubscriptionObserver, R as DatabaseBridge, S as useTableList, St as isBridgeError, T as DatabaseTableView, Tt as BlobMeta, U as CellValueParse, V as BridgeTableDescription, W as DomainEvent, X as ProtocolLimits, Y as ProtocolDescriptor, Z as SubscriptionHandle, _ as AccessLevel, _t as TableRef, a as EditorContextValue, at as FilterInput, b as MentionInteractions, bt as BridgeError, c as SelectionRef, ct as PageQuery, d as PdfPreview, dt as QuerySemantics, et as TableEnvelopeBase, f as PdfPreviewProps, ft as Revision, g as DocTags, gt as TableDescription, h as DocTag, ht as SortInput, i as EditorProviderProps, it as FilterConditionInput, j as DatabaseTablePhase, jt as RenderAttribute, k as newMutationContext, kt as AttributeTypePicker, l as BlobLoading, lt as PageSnapshot, m as DocDescription, mt as RowWire, n as DEFAULT_EMBED_SANDBOX, nt as CellMap, o as EmbedSandboxPolicy, ot as Id, p as CoverPresetSets, pt as RowPage, q as OperationStatus, r as EditorProvider, rt as Column, s as SyncEmbedResolver, st as IsoInstant, t as useEditorContext, tt as TableEvent, u as PresenceConfig, ut as QueryOperator, v as EditorMode, vt as TableSnapshot, w as DatabaseTableProps, wt as toBridgeError, x as MentionProvider, xt as BridgeErrorCode, y as MentionEntry, yt as BRIDGE_ERROR_CODES, z as BridgeColumn } from "./index-DAc-REs_.mjs";
3
3
  import * as React$1 from "react";
4
4
  import { Component, ComponentType, ErrorInfo, ReactNode } from "react";
5
5
  import { VariantProps } from "class-variance-authority";
@@ -427,7 +427,7 @@ declare function AlertDescription({ className, ...props }: React$1.ComponentProp
427
427
  //#endregion
428
428
  //#region src/shared/ui/Badge.d.ts
429
429
  declare const badgeVariants: (props?: ({
430
- variant?: "default" | "destructive" | "custom" | "secondary" | "outline" | null | undefined;
430
+ variant?: "default" | "custom" | "secondary" | "destructive" | "outline" | null | undefined;
431
431
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
432
432
  declare function Badge({ className, variant, asChild, ...props }: React$1.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
433
433
  asChild?: boolean;
@@ -438,7 +438,7 @@ declare function BareSelect({ className, children, ...props }: React$1.Component
438
438
  //#endregion
439
439
  //#region src/shared/ui/Button.d.ts
440
440
  declare const buttonVariants: (props?: ({
441
- variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
441
+ variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
442
442
  size?: "default" | "icon" | "sm" | "lg" | "xl" | null | undefined;
443
443
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
444
444
  declare function Button({ className, variant, size, asChild, type, ...props }: React$1.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
@@ -574,4 +574,4 @@ declare function TooltipContent({ className, sideOffset, children, ...props }: R
574
574
  //#region src/shared/ui/cn.d.ts
575
575
  declare function cn(...inputs: ClassValue[]): string;
576
576
  //#endregion
577
- export { type AccessLevel, Alert, AlertDescription, AlertTitle, type AttributeType, type AttributeTypePicker, type AttributeTypePickerProps, BASELINE_CAPABILITIES, BRIDGE_ERROR_CODES, Badge, BareSelect, type BatchOp, type BlobLoading, type BlobMeta, BlobNotFoundError, type BlobRef, type BlobStore, type BlockRenderer, type BlockRendererMap, type BlockRendererProps, type BridgeColumn, type BridgeColumnAnnotation, BridgeError, type BridgeErrorCode, type BridgeTableDescription, type BridgeValueInput, Button, CanvasPasteError, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CellMap, type CellValueParse, Checkbox, type Column, type CoverPresetSets, DEFAULT_EMBED_SANDBOX, type DatabaseBridge, DatabaseTable, type DatabaseTablePhase, type DatabaseTableProps, type DatabaseTableRow, type DatabaseTableView, DocBlocksUiError, type DocDescription, DocHeader, type DocHeaderAvatarContentContext, type DocTag, type DocTags, DocblocksI18nProvider, type DocblocksI18nProviderProps, type DomainEvent, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Editor, type EditorContextValue, EditorErrorBoundary, type EditorErrorBoundaryProps, type EditorMode, EditorProvider, EditorProviderError, type EditorProviderProps, type EditorView, type EmbedSandboxPolicy, FORMAT_PALETTE, FilterBuilder, type FilterConditionInput, type FilterInput, type FormatMark, HookMisuseError, type Id, ImportDocumentError, Input, type IsoInstant, Label, MONO_FONT_STACK, type MentionEntry, type MentionInteractions, type MentionMark, type MentionProvider, type MutationContext, type MutationReceipt, type OperationStatus, PROTOCOL_VERSION, type PageQuery, type PageSnapshot, PdfFetchError, 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 RenderAttribute, type RenderAttributeProps, type Revision, type RowPage, type RowWire, SHAPE_FONT_OPTIONS, SHAPE_FONT_STACKS, ScrollArea, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, type SelectionRef, 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, type TypedAttributeValue, UI_FONT_ID, UI_FONT_STACK, UnhandledValueError, UnknownSlashCommandError, type UseDatabaseTable, type UseTableList, badgeVariants, buttonVariants, cellValueEqual, cn, columnAnnotation, conditionMatches, createMemoryBlobStore, emptyFilter, filterIsComplete, importDocument, isBridgeError, isBridgeErrorCode, isDatabaseBridge, markToggleAction, newMutationContext, parseCellValue, renderRuns, toBridgeError, useBlock, useCoverAverageColor, useDatabaseTable, useDoc, useEditorContext, useMeta, usePresence, usePresenceSharing, useSelection, useSelectionView, useTableList, useText, validateProtocolDescriptor };
577
+ export { type AccessLevel, Alert, AlertDescription, AlertTitle, type AttributeType, type AttributeTypePicker, type AttributeTypePickerProps, BASELINE_CAPABILITIES, BRIDGE_ERROR_CODES, Badge, BareSelect, type BatchOp, type BlobLoading, type BlobMeta, BlobNotFoundError, type BlobRef, type BlobStore, type BlockRenderer, type BlockRendererMap, type BlockRendererProps, type BridgeColumn, type BridgeColumnAnnotation, BridgeError, type BridgeErrorCode, type BridgeTableDescription, type BridgeValueInput, Button, CanvasPasteError, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CellMap, type CellValueParse, Checkbox, type Column, type CoverPresetSets, DEFAULT_EMBED_SANDBOX, type DatabaseBridge, DatabaseTable, type DatabaseTablePhase, type DatabaseTableProps, type DatabaseTableRow, type DatabaseTableSection, type DatabaseTableView, DocBlocksUiError, type DocDescription, DocHeader, type DocHeaderAvatarContentContext, type DocTag, type DocTags, DocblocksI18nProvider, type DocblocksI18nProviderProps, type DomainEvent, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Editor, type EditorContextValue, EditorErrorBoundary, type EditorErrorBoundaryProps, type EditorMode, EditorProvider, EditorProviderError, type EditorProviderProps, type EditorView, type EmbedSandboxPolicy, FORMAT_PALETTE, FilterBuilder, type FilterConditionInput, type FilterInput, type FormatMark, HookMisuseError, type Id, ImportDocumentError, Input, type IsoInstant, Label, MONO_FONT_STACK, type MentionEntry, type MentionInteractions, type MentionMark, type MentionProvider, type MutationContext, type MutationReceipt, type OperationStatus, PROTOCOL_VERSION, type PageQuery, type PageSnapshot, PdfFetchError, 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 RenderAttribute, type RenderAttributeProps, type Revision, type RowPage, type RowWire, SHAPE_FONT_OPTIONS, SHAPE_FONT_STACKS, ScrollArea, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, type SelectionRef, 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, type TypedAttributeValue, UI_FONT_ID, UI_FONT_STACK, UnhandledValueError, UnknownSlashCommandError, type UseDatabaseTable, type UseTableList, badgeVariants, buttonVariants, cellValueEqual, cn, columnAnnotation, conditionMatches, createMemoryBlobStore, emptyFilter, filterIsComplete, importDocument, isBridgeError, isBridgeErrorCode, isDatabaseBridge, markToggleAction, newMutationContext, parseCellValue, renderRuns, toBridgeError, useBlock, useCoverAverageColor, useDatabaseTable, useDoc, useEditorContext, useMeta, usePresence, usePresenceSharing, useSelection, useSelectionView, useTableList, useText, validateProtocolDescriptor };
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { C as UnknownSlashCommandError, S as UnhandledValueError, _ as CanvasPasteError, b as HookMisuseError, g as BlobNotFoundError, s as preventDefault, v as DocBlocksUiError, w as cn, x as PdfFetchError, y as EditorProviderError } from "./constants-D_3p65rk.mjs";
2
- import { $ as DropdownMenuShortcut, $t as DocblocksI18nProvider, A as Select, B as Label, Bt as CardFooter, C as cellValueEqual, Ct as isBridgeError, D as filterIsComplete, Dt as parseCellValue, E as emptyFilter, Et as conditionMatches, F as SelectScrollDownButton, Ft as Skeleton, G as DropdownMenuContent, Gt as useBlock, H as Input, Ht as CardTitle, I as SelectScrollUpButton, It as Card, J as DropdownMenuLabel, Jt as usePresence, K as DropdownMenuGroup, Kt as useDoc, L as SelectSeparator, Lt as CardAction, M as SelectGroup, Mt as Eye, N as SelectItem, O as SegmentSelector, Ot as TEXT_TYPES, P as SelectLabel, Pt as BookOpen, Q as DropdownMenuSeparator, Qt as useText, R as SelectTrigger, Rt as CardContent, S as useDatabaseTable, St as BridgeError, T as FilterBuilder, Tt as toBridgeError, U as DropdownMenu, Ut as Badge, V as InlineEditInput, Vt as CardHeader, W as DropdownMenuCheckboxItem, Wt as badgeVariants, X as DropdownMenuRadioGroup, Xt as useSelection, Y as DropdownMenuPortal, Yt as usePresenceSharing, Z as DropdownMenuRadioItem, Zt as useSelectionView, _ as mapFrontmatter, _t as BASELINE_CAPABILITIES, a as DEFAULT_EMBED_SANDBOX, at as Popover, b as renderRuns, bt as validateProtocolDescriptor, c as SHAPE_FONT_OPTIONS, ct as PopoverDescription, d as FORMAT_PALETTE, dt as PopoverTrigger, en as createMemoryBlobStore, et as DropdownMenuSub, ft as Checkbox, g as parseFrontmatter, gt as AlertTitle, h as mdToBlocks, ht as AlertDescription, i as useEditorContext, it as Separator, j as SelectContent, jt as Pen, k as ScrollArea, kt as columnAnnotation, l as SHAPE_FONT_STACKS, lt as PopoverHeader, m as insertNative, mt as Alert, n as useCoverAverageColor, nn as Button, nt as DropdownMenuSubTrigger, ot as PopoverAnchor, p as htmlToBlocks, pt as BareSelect, q as DropdownMenuItem, qt as useMeta, r as EditorProvider, rn as buttonVariants, rt as DropdownMenuTrigger, st as PopoverContent, t as Editor, tn as EditorErrorBoundary, tt as DropdownMenuSubContent, ut as PopoverTitle, v as markToggleAction, vt as PROTOCOL_VERSION, w as newMutationContext, wt as isBridgeErrorCode, x as GridBody, xt as BRIDGE_ERROR_CODES, yt as isDatabaseBridge, z as SelectValue, zt as CardDescription } from "./Editor-Du_hrZ3E.mjs";
2
+ import { $ as DropdownMenuShortcut, $t as DocblocksI18nProvider, A as Select, B as Label, Bt as CardFooter, C as cellValueEqual, Ct as isBridgeError, D as filterIsComplete, Dt as parseCellValue, E as emptyFilter, Et as conditionMatches, F as SelectScrollDownButton, Ft as Skeleton, G as DropdownMenuContent, Gt as useBlock, H as Input, Ht as CardTitle, I as SelectScrollUpButton, It as Card, J as DropdownMenuLabel, Jt as usePresence, K as DropdownMenuGroup, Kt as useDoc, L as SelectSeparator, Lt as CardAction, M as SelectGroup, Mt as Eye, N as SelectItem, O as SegmentSelector, Ot as TEXT_TYPES, P as SelectLabel, Pt as BookOpen, Q as DropdownMenuSeparator, Qt as useText, R as SelectTrigger, Rt as CardContent, S as useDatabaseTable, St as BridgeError, T as FilterBuilder, Tt as toBridgeError, U as DropdownMenu, Ut as Badge, V as InlineEditInput, Vt as CardHeader, W as DropdownMenuCheckboxItem, Wt as badgeVariants, X as DropdownMenuRadioGroup, Xt as useSelection, Y as DropdownMenuPortal, Yt as usePresenceSharing, Z as DropdownMenuRadioItem, Zt as useSelectionView, _ as mapFrontmatter, _t as BASELINE_CAPABILITIES, a as DEFAULT_EMBED_SANDBOX, at as Popover, b as renderRuns, bt as validateProtocolDescriptor, c as SHAPE_FONT_OPTIONS, ct as PopoverDescription, d as FORMAT_PALETTE, dt as PopoverTrigger, en as createMemoryBlobStore, et as DropdownMenuSub, ft as Checkbox, g as parseFrontmatter, gt as AlertTitle, h as mdToBlocks, ht as AlertDescription, i as useEditorContext, it as Separator, j as SelectContent, jt as Pen, k as ScrollArea, kt as columnAnnotation, l as SHAPE_FONT_STACKS, lt as PopoverHeader, m as insertNative, mt as Alert, n as useCoverAverageColor, nn as Button, nt as DropdownMenuSubTrigger, ot as PopoverAnchor, p as htmlToBlocks, pt as BareSelect, q as DropdownMenuItem, qt as useMeta, r as EditorProvider, rn as buttonVariants, rt as DropdownMenuTrigger, st as PopoverContent, t as Editor, tn as EditorErrorBoundary, tt as DropdownMenuSubContent, ut as PopoverTitle, v as markToggleAction, vt as PROTOCOL_VERSION, w as newMutationContext, wt as isBridgeErrorCode, x as GridBody, xt as BRIDGE_ERROR_CODES, yt as isDatabaseBridge, z as SelectValue, zt as CardDescription } from "./Editor-DsnFHj1x.mjs";
3
3
  import { useCallback, useEffect, useRef, useState } from "react";
4
4
  import { useTranslation } from "react-i18next";
5
5
  import { cva } from "class-variance-authority";
@@ -397,10 +397,21 @@ const EMPTY_VIEW = {};
397
397
  * stands the grid's inner scroll; the unconstrained's stand is the
398
398
  * content's height).
399
399
  */
400
- function DatabaseTable({ bridge, tableId, readOnly = false, view, onViewChange, className }) {
400
+ function DatabaseTable({ bridge, tableId, readOnly = false, view, onViewChange, className, tableSection }) {
401
401
  const [viewState, setViewState] = useState(view ?? EMPTY_VIEW);
402
402
  const viewRef = useRef(viewState);
403
403
  viewRef.current = viewState;
404
+ const [headerEcho, setHeaderEcho] = useState(null);
405
+ const sectionHeight = tableSection?.getHeaderHeight?.(tableId);
406
+ const sectionHeaderHeight = headerEcho !== null && headerEcho.tableId === tableId && headerEcho.base === sectionHeight ? headerEcho.height : sectionHeight;
407
+ const commitHeaderHeight = (height) => {
408
+ setHeaderEcho({
409
+ tableId,
410
+ base: sectionHeight,
411
+ height
412
+ });
413
+ tableSection?.setHeaderHeight?.(tableId, height);
414
+ };
404
415
  const handleViewChange = useCallback((patch) => {
405
416
  const typed = patch;
406
417
  setViewState((current) => ({
@@ -420,6 +431,8 @@ function DatabaseTable({ bridge, tableId, readOnly = false, view, onViewChange,
420
431
  columnOrder: viewState.columnOrder,
421
432
  hiddenColumns: viewState.hiddenColumns,
422
433
  columnWidths: viewState.columnWidths,
434
+ sectionHeaderHeight,
435
+ onHeaderHeightChange: tableSection === void 0 ? void 0 : commitHeaderHeight,
423
436
  onViewChange: handleViewChange,
424
437
  readColumnOrder: () => viewRef.current.columnOrder,
425
438
  readOnly
@@ -1,5 +1,5 @@
1
1
  import { a as clamp, d as Plus, f as Minus, p as LoaderCircle, s as preventDefault, u as TriangleAlert } from "../constants-D_3p65rk.mjs";
2
- import { At as RotateCcw, Ft as Skeleton, Mt as Eye, Nt as CodeXml, O as SegmentSelector, f as textOf, gt as AlertTitle, ht as AlertDescription, i as useEditorContext, mt as Alert, nn as Button, o as childrenSlot, s as CodeHeader, u as TextBlock, y as INLINE_CODE_CLASS } from "../Editor-Du_hrZ3E.mjs";
2
+ import { At as RotateCcw, Ft as Skeleton, Mt as Eye, Nt as CodeXml, O as SegmentSelector, f as textOf, gt as AlertTitle, ht as AlertDescription, i as useEditorContext, mt as Alert, nn as Button, o as childrenSlot, s as CodeHeader, u as TextBlock, y as INLINE_CODE_CLASS } from "../Editor-DsnFHj1x.mjs";
3
3
  import { t as Maximize } from "../Maximize-BBHnCDWL.mjs";
4
4
  import { useEffect, useRef, useState } from "react";
5
5
  import { useTranslation } from "react-i18next";
@@ -1,4 +1,4 @@
1
- import { f as PdfPreviewProps } from "../index-CE8wKsue.mjs";
1
+ import { f as PdfPreviewProps } from "../index-DAc-REs_.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/dist/styles.css CHANGED
@@ -407,6 +407,9 @@
407
407
  .z-60 {
408
408
  z-index: 60;
409
409
  }
410
+ .col-span-full {
411
+ grid-column: 1 / -1;
412
+ }
410
413
  .col-start-2 {
411
414
  grid-column-start: 2;
412
415
  }
@@ -539,6 +542,9 @@
539
542
  .block {
540
543
  display: block;
541
544
  }
545
+ .contents {
546
+ display: contents;
547
+ }
542
548
  .flex {
543
549
  display: flex;
544
550
  }
@@ -664,6 +670,9 @@
664
670
  .h-0\.5 {
665
671
  height: calc(var(--spacing) * 0.5);
666
672
  }
673
+ .h-1\.5 {
674
+ height: calc(var(--spacing) * 1.5);
675
+ }
667
676
  .h-2 {
668
677
  height: calc(var(--spacing) * 2);
669
678
  }
@@ -940,6 +949,10 @@
940
949
  --tw-translate-y: calc(calc(1 / 2 * 100%) * -1);
941
950
  translate: var(--tw-translate-x) var(--tw-translate-y);
942
951
  }
952
+ .translate-y-1\/2 {
953
+ --tw-translate-y: calc(1 / 2 * 100%);
954
+ translate: var(--tw-translate-x) var(--tw-translate-y);
955
+ }
943
956
  .translate-y-3 {
944
957
  --tw-translate-y: calc(var(--spacing) * 3);
945
958
  translate: var(--tw-translate-x) var(--tw-translate-y);
@@ -1134,6 +1147,9 @@
1134
1147
  .gap-y-0\.5 {
1135
1148
  row-gap: calc(var(--spacing) * 0.5);
1136
1149
  }
1150
+ .self-end {
1151
+ align-self: flex-end;
1152
+ }
1137
1153
  .self-start {
1138
1154
  align-self: flex-start;
1139
1155
  }
@@ -3958,26 +3974,29 @@
3958
3974
  * read-only — the inners stand contenteditable="false" (the caret's
3959
3975
  * editing's affordance is impossible).
3960
3976
  *
3961
- * The PUBLISHED stand also blocks the text selection: the reader's copy
3962
- * stands no stand (the published state is readable over the rendered page
3963
- * only — no range, no copy). The VIEW stand keeps
3964
- * the native selection (the live document is read-only but copyable: the
3965
- * text is the reader's to quote, and the editor's copy payload serves it
3966
- * — see use-editing). The `data-readonly` over the standalone's read-only
3967
- * grid (no `data-mode` — the consumer's own surfaces) keeps the no-select
3968
- * stand.
3977
+ * The PUBLISHED stand blocks the text selection by default: the reader's
3978
+ * copy stands no stand (the published state is readable over the rendered
3979
+ * page only — no range, no copy). The consumer lifts the block per reader
3980
+ * over the `publishedCopyable` prop: the copyable stand marks the root
3981
+ * `data-copyable="true"` and stands the `view` mode's policy (the native
3982
+ * selection over the page's text + the editor's copy payload — see
3983
+ * use-editing). The VIEW stand always keeps the native selection (the live
3984
+ * document is read-only but copyable: the text is the reader's to quote).
3985
+ * The `data-readonly` over the standalone's read-only grid (no
3986
+ * `data-mode` — the consumer's own surfaces) keeps the no-select stand.
3969
3987
  */
3970
- [data-slot="docblocks/editor"][data-readonly="true"]:not([data-mode="view"]) {
3988
+ [data-slot="docblocks/editor"][data-readonly="true"]:not([data-mode="view"]):not([data-copyable="true"]) {
3971
3989
  user-select: none;
3972
3990
  }
3973
3991
 
3974
3992
  /*
3975
- * The view's mode over the canvas: the page's text stands selectable, the
3976
- * canvas's world keeps the read-only's no-select stand — the native range
3977
- * would fight the pan's drag (the observing gesture) and the world's text
3978
- * is not an editing surface.
3993
+ * The canvas world keeps the read-only's no-select stand over the
3994
+ * selectable stands (the view's mode, the copyable published stand): the
3995
+ * page's text stands selectable, the canvas's world does not — the native
3996
+ * range would fight the pan's drag (the observing gesture) and the world's
3997
+ * text is not an editing surface.
3979
3998
  */
3980
- [data-slot="docblocks/editor"][data-mode="view"] [data-slot="docblocks/canvas-world"] {
3999
+ [data-slot="docblocks/editor"]:is([data-mode="view"], [data-copyable="true"]) [data-slot="docblocks/canvas-world"] {
3981
4000
  user-select: none;
3982
4001
  }
3983
4002
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docblocks-react-ui",
3
- "version": "0.24.1",
3
+ "version": "0.26.0",
4
4
  "description": "React rendering + editing layer for docblocks: hooks, block renderers, caret/selection, keyboard, clipboard.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -36,7 +36,7 @@
36
36
  "access": "public"
37
37
  },
38
38
  "peerDependencies": {
39
- "docblocks-core": "^0.9.0",
39
+ "docblocks-core": "^0.10.0",
40
40
  "framer-motion": "^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0",
41
41
  "mermaid": "^12.0.0",
42
42
  "pdfjs-dist": "^6.0.0",