docblocks-react-ui 0.12.0 → 0.13.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.
@@ -846,7 +846,7 @@ interface PresenceIdentity {
846
846
  name?: string;
847
847
  }
848
848
  //#endregion
849
- //#region src/canvas/clipboard.d.ts
849
+ //#region src/canvas/clipboard/models.d.ts
850
850
  /** The one copied canvas item (the deep data; the ids stand the originals). */
851
851
  type ClipboardItem = {
852
852
  type: "shape";
@@ -1121,6 +1121,33 @@ interface DocTags {
1121
1121
  */
1122
1122
  onTagClick?: (tag: DocTag, event: MouseEvent) => void;
1123
1123
  }
1124
+ /**
1125
+ * The consumer-owned description contract (the `docDescription` provider
1126
+ * prop): the description is NEVER document data — the consumer's store is
1127
+ * the source (the document never stores or syncs it), and the panel's
1128
+ * `description` row displays the passed value and reports the user's edit
1129
+ * over `onEdit` (over the consumer-owned data there are no document events:
1130
+ * no wire, no undo). The inline editor's commit passes the entered string
1131
+ * verbatim — the empty string stands the removal's stand (the consumer
1132
+ * clears its store over the callback). Without the prop the row keeps the
1133
+ * built-in stand (the value over the doc's `attributes.description`
1134
+ * record); the legacy's stored `attributes.description` data stands inert
1135
+ * over the prop's presence (the consumer's migration's read over
1136
+ * `doc.meta.attributes`).
1137
+ */
1138
+ interface DocDescription {
1139
+ /** The document's description (the consumer's store's read; `null` = none). */
1140
+ value: string | null;
1141
+ /**
1142
+ * The edit's commit (the panel's inline editor's Enter / blur — the
1143
+ * entered string verbatim; the empty string stands the removal's stand):
1144
+ * the consumer persists the value over its own store and passes the
1145
+ * updated stand back over `value`. Without it the row stands
1146
+ * display-only (the edit's and the removal's affordances stand absent,
1147
+ * over the edit mode too).
1148
+ */
1149
+ onEdit?: (value: string) => void;
1150
+ }
1124
1151
  /**
1125
1152
  * The consumer's cover preset gallery (the `coverPresets` provider prop):
1126
1153
  * the ready-made cover's file ids (the consumer's own blob store's ids) per
@@ -1198,7 +1225,7 @@ interface PresenceConfig {
1198
1225
  }
1199
1226
  /** 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. */
1200
1227
  type AccessLevel = "viewer" | "editor";
1201
- /** 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). */
1228
+ /** 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. */
1202
1229
  type EditorMode = "edit" | "view" | "published";
1203
1230
  /** Per-instance editor context: the store, the doc, the selection handle, and the customization values. */
1204
1231
  interface EditorContextValue {
@@ -1230,6 +1257,8 @@ interface EditorContextValue {
1230
1257
  attributeTypePicker: AttributeTypePicker | null;
1231
1258
  /** The consumer's tags contract (the `docTags` prop); null stands the display-only stand (the `notSet` over the row). */
1232
1259
  docTags: DocTags | null;
1260
+ /** The consumer's description contract (the `docDescription` prop); null stands the built-in stand (the value over the doc's record). */
1261
+ docDescription: DocDescription | null;
1233
1262
  /** The consumer's cover preset gallery (the `coverPresets` prop); null stands the built-in's stand (the preset's grid stands absent). */
1234
1263
  coverPresets: CoverPresetSets | null;
1235
1264
  /** The effective embed sandbox policy (the consumer's, or the safe default) — always present. */
@@ -1384,6 +1413,24 @@ interface EditorProviderProps {
1384
1413
  * provider that supplies none inherits the enclosing one.
1385
1414
  */
1386
1415
  docTags?: DocTags;
1416
+ /**
1417
+ * Optional consumer-owned description contract (the document-attributes
1418
+ * panel's `description` row): the description is never document data
1419
+ * (the consumer's store is the source — the document never stores or
1420
+ * syncs it). The panel displays the passed value and reports the user's
1421
+ * edit over the `onEdit` callback (the panel's inline editor's commit —
1422
+ * the entered string verbatim; the empty string stands the removal's
1423
+ * stand — the consumer clears its store over the callback; the row's
1424
+ * removal's affordance stands over the non-empty's value and commits the
1425
+ * empty string's stand; without it the row stands display-only, over the
1426
+ * edit mode too). Over the prop's
1427
+ * presence the row stands out of the `renderAttribute`'s reach (the
1428
+ * consumer's value is the source). Like the other customization values,
1429
+ * the value is read per render into the provider context: pass a stable
1430
+ * reference (a memoized object). A nested provider that supplies none
1431
+ * inherits the enclosing one.
1432
+ */
1433
+ docDescription?: DocDescription;
1387
1434
  /**
1388
1435
  * Optional cover preset gallery (the document-attributes panel's cover row,
1389
1436
  * the upload modal's stand): the consumer's ready-made cover's file ids
@@ -1408,7 +1455,9 @@ interface EditorProviderProps {
1408
1455
  * zone (a preset key — `description` / `createdBy` / `cover` /
1409
1456
  * `status` / `publishedAt` — or a custom key; the `tags` row is the
1410
1457
  * consumer-owned stand over the `docTags`'s prop and stands out of
1411
- * this renderer's reach). The renderer receives the
1458
+ * this renderer's reach; the `description` row stands out of it over
1459
+ * the `docDescription`'s prop's presence — the consumer's value is the
1460
+ * source over the stand). The renderer receives the
1412
1461
  * key, the current value, the commit / removal entries, and the
1413
1462
  * read-only stand; `null` (or the absent stand) selects the built-in
1414
1463
  * editor for that key. The row's label (the key's display name) is the
@@ -1503,4 +1552,4 @@ declare const DEFAULT_EMBED_SANDBOX = "allow-scripts allow-same-origin allow-for
1503
1552
  /** Read the per-instance editor context; throws outside an EditorProvider. */
1504
1553
  declare function useEditorContext(): EditorContextValue;
1505
1554
  //#endregion
1506
- export { Id as $, DatabaseTable as A, BlobRef as At, FilterBuilder as B, SyncEmbedResolver as C, BRIDGE_ERROR_CODES as Ct, PresenceSharing as D, isBridgeErrorCode as Dt, PresencePeer as E, isBridgeError as Et, DatabaseTablePhase as F, BridgeValueInput as G, BridgeColumn as H, DatabaseTableRow as I, Column as J, CellMap as K, UseDatabaseTable as L, DatabaseTableView as M, createMemoryBlobStore as Mt, UseTableList as N, PresenceSharingMode as O, toBridgeError as Ot, useDatabaseTable as P, FilterInput as Q, emptyFilter as R, SelectionRef as S, TableSnapshot as St, PresenceIdentity as T, BridgeErrorCode as Tt, BridgeColumnAnnotation as U, BatchOp as V, BridgeTableDescription as W, DomainEvent as X, DatabaseBridge as Y, FilterConditionInput as Z, PdfPreview as _, SubscriptionStatus as _t, AttributeTypePicker as a, PageSnapshot as at, RenderAttribute as b, TableEvent as bt, DocTag as c, ProtocolLimits as ct, EditorMode as d, Revision as dt, IsoInstant as et, EditorProviderProps as f, RowPage as ft, MentionProvider as g, SubscriptionObserver as gt, MentionInteractions as h, SubscriptionHandle as ht, AccessLevel as i, PageQuery as it, DatabaseTableProps as j, BlobStore as jt, useTableList as k, BlobMeta as kt, DocTags as l, QueryOperator as lt, MentionEntry as m, SortInput as mt, DEFAULT_EMBED_SANDBOX as n, MutationReceipt as nt, AttributeTypePickerProps as o, ProtocolCapability as ot, EmbedSandboxPolicy as p, RowWire as pt, CellValueParse as q, EditorProvider as r, OperationStatus as rt, CoverPresetSets as s, ProtocolDescriptor as st, useEditorContext as t, MutationContext as tt, EditorContextValue as u, QuerySemantics as ut, PdfPreviewProps as v, TableDescription as vt, PresenceCrypto as w, BridgeError as wt, RenderAttributeProps as x, TableRef as xt, PresenceConfig as y, TableEnvelopeBase as yt, filterIsComplete as z };
1555
+ export { FilterInput as $, useTableList as A, BlobMeta as At, filterIsComplete as B, SelectionRef as C, TableSnapshot as Ct, PresencePeer as D, isBridgeError as Dt, PresenceIdentity as E, BridgeErrorCode as Et, useDatabaseTable as F, BridgeTableDescription as G, BatchOp as H, DatabaseTablePhase as I, CellValueParse as J, BridgeValueInput as K, DatabaseTableRow as L, DatabaseTableProps as M, BlobStore as Mt, DatabaseTableView as N, createMemoryBlobStore as Nt, PresenceSharing as O, isBridgeErrorCode as Ot, UseTableList as P, FilterConditionInput as Q, UseDatabaseTable as R, RenderAttributeProps as S, TableRef as St, PresenceCrypto as T, BridgeError as Tt, BridgeColumn as U, FilterBuilder as V, BridgeColumnAnnotation as W, DatabaseBridge as X, Column as Y, DomainEvent as Z, MentionProvider as _, SubscriptionObserver as _t, AttributeTypePicker as a, PageQuery as at, PresenceConfig as b, TableEnvelopeBase as bt, DocDescription as c, ProtocolDescriptor as ct, EditorContextValue as d, QuerySemantics as dt, Id as et, EditorMode as f, Revision as ft, MentionInteractions as g, SubscriptionHandle as gt, MentionEntry as h, SortInput as ht, AccessLevel as i, OperationStatus as it, DatabaseTable as j, BlobRef as jt, PresenceSharingMode as k, toBridgeError as kt, DocTag as l, ProtocolLimits as lt, EmbedSandboxPolicy as m, RowWire as mt, DEFAULT_EMBED_SANDBOX as n, MutationContext as nt, AttributeTypePickerProps as o, PageSnapshot as ot, EditorProviderProps as p, RowPage as pt, CellMap as q, EditorProvider as r, MutationReceipt as rt, CoverPresetSets as s, ProtocolCapability as st, useEditorContext as t, IsoInstant as tt, DocTags as u, QueryOperator as ut, PdfPreview as v, SubscriptionStatus as vt, SyncEmbedResolver as w, BRIDGE_ERROR_CODES as wt, RenderAttribute as x, TableEvent as xt, PdfPreviewProps as y, TableDescription as yt, emptyFilter as z };
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 Id, A as DatabaseTable, At as BlobRef, B as FilterBuilder, C as SyncEmbedResolver, Ct as BRIDGE_ERROR_CODES, D as PresenceSharing, Dt as isBridgeErrorCode, E as PresencePeer, Et as isBridgeError, F as DatabaseTablePhase, G as BridgeValueInput, H as BridgeColumn, I as DatabaseTableRow, J as Column, K as CellMap, L as UseDatabaseTable, M as DatabaseTableView, Mt as createMemoryBlobStore, N as UseTableList, O as PresenceSharingMode, Ot as toBridgeError, P as useDatabaseTable, Q as FilterInput, R as emptyFilter, S as SelectionRef, St as TableSnapshot, T as PresenceIdentity, Tt as BridgeErrorCode, U as BridgeColumnAnnotation, V as BatchOp, W as BridgeTableDescription, X as DomainEvent, Y as DatabaseBridge, Z as FilterConditionInput, _ as PdfPreview, _t as SubscriptionStatus, a as AttributeTypePicker, at as PageSnapshot, b as RenderAttribute, bt as TableEvent, c as DocTag, ct as ProtocolLimits, d as EditorMode, dt as Revision, et as IsoInstant, f as EditorProviderProps, ft as RowPage, g as MentionProvider, gt as SubscriptionObserver, h as MentionInteractions, ht as SubscriptionHandle, i as AccessLevel, it as PageQuery, j as DatabaseTableProps, jt as BlobStore, k as useTableList, kt as BlobMeta, l as DocTags, lt as QueryOperator, m as MentionEntry, mt as SortInput, n as DEFAULT_EMBED_SANDBOX, nt as MutationReceipt, o as AttributeTypePickerProps, ot as ProtocolCapability, p as EmbedSandboxPolicy, pt as RowWire, q as CellValueParse, r as EditorProvider, rt as OperationStatus, s as CoverPresetSets, st as ProtocolDescriptor, t as useEditorContext, tt as MutationContext, u as EditorContextValue, ut as QuerySemantics, v as PdfPreviewProps, vt as TableDescription, w as PresenceCrypto, wt as BridgeError, x as RenderAttributeProps, xt as TableRef, y as PresenceConfig, yt as TableEnvelopeBase, z as filterIsComplete } from "./index-BRYlGI3B.mjs";
2
+ import { $ as FilterInput, A as useTableList, At as BlobMeta, B as filterIsComplete, C as SelectionRef, Ct as TableSnapshot, D as PresencePeer, Dt as isBridgeError, E as PresenceIdentity, Et as BridgeErrorCode, F as useDatabaseTable, G as BridgeTableDescription, H as BatchOp, I as DatabaseTablePhase, J as CellValueParse, K as BridgeValueInput, L as DatabaseTableRow, M as DatabaseTableProps, Mt as BlobStore, N as DatabaseTableView, Nt as createMemoryBlobStore, O as PresenceSharing, Ot as isBridgeErrorCode, P as UseTableList, Q as FilterConditionInput, R as UseDatabaseTable, S as RenderAttributeProps, St as TableRef, T as PresenceCrypto, Tt as BridgeError, U as BridgeColumn, V as FilterBuilder, W as BridgeColumnAnnotation, X as DatabaseBridge, Y as Column, Z as DomainEvent, _ as MentionProvider, _t as SubscriptionObserver, a as AttributeTypePicker, at as PageQuery, b as PresenceConfig, bt as TableEnvelopeBase, c as DocDescription, ct as ProtocolDescriptor, d as EditorContextValue, dt as QuerySemantics, et as Id, f as EditorMode, ft as Revision, g as MentionInteractions, gt as SubscriptionHandle, h as MentionEntry, ht as SortInput, i as AccessLevel, it as OperationStatus, j as DatabaseTable, jt as BlobRef, k as PresenceSharingMode, kt as toBridgeError, l as DocTag, lt as ProtocolLimits, m as EmbedSandboxPolicy, mt as RowWire, n as DEFAULT_EMBED_SANDBOX, nt as MutationContext, o as AttributeTypePickerProps, ot as PageSnapshot, p as EditorProviderProps, pt as RowPage, q as CellMap, r as EditorProvider, rt as MutationReceipt, s as CoverPresetSets, st as ProtocolCapability, t as useEditorContext, tt as IsoInstant, u as DocTags, ut as QueryOperator, v as PdfPreview, vt as SubscriptionStatus, w as SyncEmbedResolver, wt as BRIDGE_ERROR_CODES, x as RenderAttribute, xt as TableEvent, y as PdfPreviewProps, yt as TableDescription, z as emptyFilter } from "./index-BA6ZzJK8.mjs";
3
3
  import * as React$1 from "react";
4
4
  import { ComponentType, ReactNode } from "react";
5
5
  import { AttributeType, Block, BlockId, BlockType, Doc, DocMeta, MentionKind, MentionMark, PresenceState, Selection, SelectionView, SyncEmbedRef, TextRun, TypedAttributeValue } from "docblocks-core";
@@ -503,4 +503,4 @@ declare function TooltipContent({ className, sideOffset, children, ...props }: R
503
503
  //#region src/shared/ui/cn.d.ts
504
504
  declare function cn(...inputs: ClassValue[]): string;
505
505
  //#endregion
506
- export { type AccessLevel, Alert, AlertDescription, AlertTitle, type AttributeType, type AttributeTypePicker, type AttributeTypePickerProps, BASELINE_CAPABILITIES, BRIDGE_ERROR_CODES, Badge, BareSelect, type BatchOp, type BlobMeta, type BlobRef, type BlobStore, 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, type CoverPresetSets, DEFAULT_EMBED_SANDBOX, type DatabaseBridge, DatabaseTable, type DatabaseTablePhase, type DatabaseTableProps, type DatabaseTableRow, type DatabaseTableView, DocHeader, 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, type EditorMode, EditorProvider, type EditorProviderProps, type EditorView, type EmbedSandboxPolicy, FORMAT_PALETTE, FilterBuilder, type FilterConditionInput, type FilterInput, type FormatMark, 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, 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, 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 };
506
+ export { type AccessLevel, Alert, AlertDescription, AlertTitle, type AttributeType, type AttributeTypePicker, type AttributeTypePickerProps, BASELINE_CAPABILITIES, BRIDGE_ERROR_CODES, Badge, BareSelect, type BatchOp, type BlobMeta, type BlobRef, type BlobStore, 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, type CoverPresetSets, DEFAULT_EMBED_SANDBOX, type DatabaseBridge, DatabaseTable, type DatabaseTablePhase, type DatabaseTableProps, type DatabaseTableRow, type DatabaseTableView, type DocDescription, DocHeader, 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, type EditorMode, EditorProvider, type EditorProviderProps, type EditorView, type EmbedSandboxPolicy, FORMAT_PALETTE, FilterBuilder, type FilterConditionInput, type FilterInput, type FormatMark, 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, 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, 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,4 +1,4 @@
1
- import { $ as DropdownMenuSubContent, $t as Eye, A as SelectGroup, At as Skeleton, B as Input, Bt as useBlock, C as FilterBuilder, Ct as isBridgeError, D as ScrollArea, Dt as parseCellValue, E as SegmentSelector, Et as conditionMatches, F as SelectSeparator, Ft as CardFooter, G as DropdownMenuItem, Gt as useSelection, H as DropdownMenuCheckboxItem, Ht as useMeta, I as SelectTrigger, It as CardHeader, J as DropdownMenuRadioGroup, Jt as DocblocksI18nProvider, K as DropdownMenuLabel, Kt as useSelectionView, L as SelectValue, Lt as CardTitle, M as SelectLabel, Mt as CardAction, N as SelectScrollDownButton, Nt as CardContent, O as Select, Ot as TEXT_TYPES, P as SelectScrollUpButton, Pt as CardDescription, Q as DropdownMenuSub, Qt as Pen, R as Label, Rt as Badge, S as newMutationContext, St as BridgeError, T as filterIsComplete, Tt as toBridgeError, U as DropdownMenuContent, Ut as usePresence, V as DropdownMenu, Vt as useDoc, W as DropdownMenuGroup, Wt as usePresenceSharing, X as DropdownMenuSeparator, Xt as renderRuns, Y as DropdownMenuRadioItem, Z as DropdownMenuShortcut, _ as mapFrontmatter, _t as BASELINE_CAPABILITIES, a as DEFAULT_EMBED_SANDBOX, at as PopoverContent, b as useDatabaseTable, bt as validateProtocolDescriptor, c as SHAPE_FONT_OPTIONS, ct as PopoverTitle, d as FORMAT_PALETTE, dt as Button, et as DropdownMenuSubTrigger, ft as buttonVariants, g as mdToBlocks, gt as AlertTitle, h as insertNative, ht as AlertDescription, i as useEditorContext, it as PopoverAnchor, j as SelectItem, jt as Card, k as SelectContent, kt as columnAnnotation, l as SHAPE_FONT_STACKS, lt as PopoverTrigger, m as htmlToBlocks, mt as Alert, n as useCoverAverageColor, nn as createMemoryBlobStore, nt as Separator, ot as PopoverDescription, p as markToggleAction, pt as BareSelect, q as DropdownMenuPortal, qt as useText, r as EditorProvider, rt as Popover, st as PopoverHeader, t as Editor, tn as BookOpen, tt as DropdownMenuTrigger, ut as Checkbox, v as parseFrontmatter, vt as PROTOCOL_VERSION, w as emptyFilter, wt as isBridgeErrorCode, x as cellValueEqual, xt as BRIDGE_ERROR_CODES, y as GridBody, yt as isDatabaseBridge, z as InlineEditInput, zt as badgeVariants } from "./Editor-BhnGAuCO.mjs";
1
+ import { $ as DropdownMenuSubContent, $t as Eye, A as SelectGroup, At as Skeleton, B as Input, Bt as useBlock, C as FilterBuilder, Ct as isBridgeError, D as ScrollArea, Dt as parseCellValue, E as SegmentSelector, Et as conditionMatches, F as SelectSeparator, Ft as CardFooter, G as DropdownMenuItem, Gt as useSelection, H as DropdownMenuCheckboxItem, Ht as useMeta, I as SelectTrigger, It as CardHeader, J as DropdownMenuRadioGroup, Jt as DocblocksI18nProvider, K as DropdownMenuLabel, Kt as useSelectionView, L as SelectValue, Lt as CardTitle, M as SelectLabel, Mt as CardAction, N as SelectScrollDownButton, Nt as CardContent, O as Select, Ot as TEXT_TYPES, P as SelectScrollUpButton, Pt as CardDescription, Q as DropdownMenuSub, Qt as Pen, R as Label, Rt as Badge, S as newMutationContext, St as BridgeError, T as filterIsComplete, Tt as toBridgeError, U as DropdownMenuContent, Ut as usePresence, V as DropdownMenu, Vt as useDoc, W as DropdownMenuGroup, Wt as usePresenceSharing, X as DropdownMenuSeparator, Xt as renderRuns, Y as DropdownMenuRadioItem, Z as DropdownMenuShortcut, _ as mapFrontmatter, _t as BASELINE_CAPABILITIES, a as DEFAULT_EMBED_SANDBOX, at as PopoverContent, b as useDatabaseTable, bt as validateProtocolDescriptor, c as SHAPE_FONT_OPTIONS, ct as PopoverTitle, d as FORMAT_PALETTE, dt as Button, et as DropdownMenuSubTrigger, ft as buttonVariants, g as mdToBlocks, gt as AlertTitle, h as insertNative, ht as AlertDescription, i as useEditorContext, it as PopoverAnchor, j as SelectItem, jt as Card, k as SelectContent, kt as columnAnnotation, l as SHAPE_FONT_STACKS, lt as PopoverTrigger, m as htmlToBlocks, mt as Alert, n as useCoverAverageColor, nn as createMemoryBlobStore, nt as Separator, ot as PopoverDescription, p as markToggleAction, pt as BareSelect, q as DropdownMenuPortal, qt as useText, r as EditorProvider, rt as Popover, st as PopoverHeader, t as Editor, tn as BookOpen, tt as DropdownMenuTrigger, ut as Checkbox, v as parseFrontmatter, vt as PROTOCOL_VERSION, w as emptyFilter, wt as isBridgeErrorCode, x as cellValueEqual, xt as BRIDGE_ERROR_CODES, y as GridBody, yt as isDatabaseBridge, z as InlineEditInput, zt as badgeVariants } from "./Editor-dcSgC9ho.mjs";
2
2
  import { a as preventDefault, s as cn } from "./constants-D8PSgkwi.mjs";
3
3
  import { useCallback, useEffect, useRef, useState } from "react";
4
4
  import { useTranslation } from "react-i18next";
@@ -1,4 +1,4 @@
1
- import { $t as Eye, At as Skeleton, E as SegmentSelector, Yt as INLINE_CODE_CLASS, Zt as RotateCcw, dt as Button, en as CodeXml, f as textOf, gt as AlertTitle, ht as AlertDescription, i as useEditorContext, mt as Alert, o as childrenSlot, s as CodeHeader, u as TextBlock } from "../Editor-BhnGAuCO.mjs";
1
+ import { $t as Eye, At as Skeleton, E as SegmentSelector, Yt as INLINE_CODE_CLASS, Zt as RotateCcw, dt as Button, en as CodeXml, f as textOf, gt as AlertTitle, ht as AlertDescription, i as useEditorContext, mt as Alert, o as childrenSlot, s as CodeHeader, u as TextBlock } from "../Editor-dcSgC9ho.mjs";
2
2
  import { a as preventDefault, d as Minus, f as LoaderCircle, l as TriangleAlert, r as clamp, u as Plus } from "../constants-D8PSgkwi.mjs";
3
3
  import { t as Maximize } from "../Maximize-BBHnCDWL.mjs";
4
4
  import { useEffect, useRef, useState } from "react";
@@ -1,4 +1,4 @@
1
- import { v as PdfPreviewProps } from "../index-BRYlGI3B.mjs";
1
+ import { y as PdfPreviewProps } from "../index-BA6ZzJK8.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
@@ -392,6 +392,9 @@
392
392
  .z-40 {
393
393
  z-index: 40;
394
394
  }
395
+ .z-45 {
396
+ z-index: 45;
397
+ }
395
398
  .z-50 {
396
399
  z-index: 50;
397
400
  }
@@ -533,9 +536,6 @@
533
536
  .block {
534
537
  display: block;
535
538
  }
536
- .contents {
537
- display: contents;
538
- }
539
539
  .flex {
540
540
  display: flex;
541
541
  }
@@ -923,10 +923,18 @@
923
923
  --tw-translate-x: calc(calc(1 / 2 * 100%) * -1);
924
924
  translate: var(--tw-translate-x) var(--tw-translate-y);
925
925
  }
926
+ .translate-x-3 {
927
+ --tw-translate-x: calc(var(--spacing) * 3);
928
+ translate: var(--tw-translate-x) var(--tw-translate-y);
929
+ }
926
930
  .-translate-y-1\/2 {
927
931
  --tw-translate-y: calc(calc(1 / 2 * 100%) * -1);
928
932
  translate: var(--tw-translate-x) var(--tw-translate-y);
929
933
  }
934
+ .translate-y-3 {
935
+ --tw-translate-y: calc(var(--spacing) * 3);
936
+ translate: var(--tw-translate-x) var(--tw-translate-y);
937
+ }
930
938
  .translate-y-\[calc\(-50\%-2px\)\] {
931
939
  --tw-translate-y: calc(-50% - 2px);
932
940
  translate: var(--tw-translate-x) var(--tw-translate-y);
@@ -1255,6 +1263,9 @@
1255
1263
  .border-\(--border\) {
1256
1264
  border-color: var(--border);
1257
1265
  }
1266
+ .border-\(--docblocks-canvas-group-border-color\) {
1267
+ border-color: var(--docblocks-canvas-group-border-color);
1268
+ }
1258
1269
  .border-\(--docblocks-canvas-selection-border-color\) {
1259
1270
  border-color: var(--docblocks-canvas-selection-border-color);
1260
1271
  }
@@ -3583,7 +3594,7 @@
3583
3594
  * docblocks/format-palette),
3584
3595
  * plus the per-block elements;
3585
3596
  * + `data-block-type` / `data-list` / `data-depth` / `data-variant` / `data-checked`
3586
- * / `data-kind` / `data-selected` / `data-state` / `data-doc-id` / `data-readonly`.
3597
+ * / `data-kind` / `data-selected` / `data-state` / `data-doc-id` / `data-mode` / `data-readonly`.
3587
3598
  */
3588
3599
 
3589
3600
  /*
@@ -3906,12 +3917,29 @@
3906
3917
 
3907
3918
  /*
3908
3919
  * The read-only stand (view / published modes): the editor's content is
3909
- * read-only — the text selection stands no stand (the native range's
3910
- * gesture is an editing's affordance). The caret is already impossible
3911
- * (the inners stand contenteditable="false"), this keeps the
3912
- * selection's gesture off over the whole content.
3920
+ * read-only — the inners stand contenteditable="false" (the caret's
3921
+ * editing's affordance is impossible).
3922
+ *
3923
+ * The PUBLISHED stand also blocks the text selection: the reader's copy
3924
+ * stands no stand (the published state is readable over the rendered page
3925
+ * only — no range, no copy). The VIEW stand keeps
3926
+ * the native selection (the live document is read-only but copyable: the
3927
+ * text is the reader's to quote, and the editor's copy payload serves it
3928
+ * — see use-editing). The `data-readonly` over the standalone's read-only
3929
+ * grid (no `data-mode` — the consumer's own surfaces) keeps the no-select
3930
+ * stand.
3931
+ */
3932
+ [data-slot="docblocks/editor"][data-readonly="true"]:not([data-mode="view"]) {
3933
+ user-select: none;
3934
+ }
3935
+
3936
+ /*
3937
+ * The view's mode over the canvas: the page's text stands selectable, the
3938
+ * canvas's world keeps the read-only's no-select stand — the native range
3939
+ * would fight the pan's drag (the observing gesture) and the world's text
3940
+ * is not an editing surface.
3913
3941
  */
3914
- [data-slot="docblocks/editor"][data-readonly="true"] {
3942
+ [data-slot="docblocks/editor"][data-mode="view"] [data-slot="docblocks/canvas-world"] {
3915
3943
  user-select: none;
3916
3944
  }
3917
3945
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docblocks-react-ui",
3
- "version": "0.12.0",
3
+ "version": "0.13.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",
@@ -34,7 +34,7 @@
34
34
  "access": "public"
35
35
  },
36
36
  "peerDependencies": {
37
- "docblocks-core": "^0.5.0",
37
+ "docblocks-core": "^0.6.0",
38
38
  "framer-motion": "^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0",
39
39
  "mermaid": "^12.0.0",
40
40
  "pdfjs-dist": "^6.0.0",