docblocks-react-ui 0.24.0 → 0.25.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.
- package/CHANGELOG.md +48 -0
- package/README.md +50 -25
- package/dist/{Editor-CDZqsAHh.mjs → Editor-D91f-KD8.mjs} +349 -128
- package/dist/{index-CE8wKsue.d.mts → index-DAc-REs_.d.mts} +54 -3
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +15 -2
- package/dist/mermaid/index.mjs +1 -1
- package/dist/pdf/index.d.mts +1 -1
- package/dist/styles.css +30 -14
- package/package.json +2 -2
|
@@ -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 {
|
|
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
|
|
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" | "
|
|
430
|
+
variant?: "default" | "destructive" | "custom" | "secondary" | "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" | "
|
|
441
|
+
variant?: "link" | "default" | "destructive" | "secondary" | "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-
|
|
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-D91f-KD8.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
|
package/dist/mermaid/index.mjs
CHANGED
|
@@ -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-
|
|
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-D91f-KD8.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";
|
package/dist/pdf/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as PdfPreviewProps } from "../index-
|
|
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
|
}
|
|
@@ -664,6 +667,9 @@
|
|
|
664
667
|
.h-0\.5 {
|
|
665
668
|
height: calc(var(--spacing) * 0.5);
|
|
666
669
|
}
|
|
670
|
+
.h-1\.5 {
|
|
671
|
+
height: calc(var(--spacing) * 1.5);
|
|
672
|
+
}
|
|
667
673
|
.h-2 {
|
|
668
674
|
height: calc(var(--spacing) * 2);
|
|
669
675
|
}
|
|
@@ -940,6 +946,10 @@
|
|
|
940
946
|
--tw-translate-y: calc(calc(1 / 2 * 100%) * -1);
|
|
941
947
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
942
948
|
}
|
|
949
|
+
.translate-y-1\/2 {
|
|
950
|
+
--tw-translate-y: calc(1 / 2 * 100%);
|
|
951
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
952
|
+
}
|
|
943
953
|
.translate-y-3 {
|
|
944
954
|
--tw-translate-y: calc(var(--spacing) * 3);
|
|
945
955
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
@@ -1134,6 +1144,9 @@
|
|
|
1134
1144
|
.gap-y-0\.5 {
|
|
1135
1145
|
row-gap: calc(var(--spacing) * 0.5);
|
|
1136
1146
|
}
|
|
1147
|
+
.self-end {
|
|
1148
|
+
align-self: flex-end;
|
|
1149
|
+
}
|
|
1137
1150
|
.self-start {
|
|
1138
1151
|
align-self: flex-start;
|
|
1139
1152
|
}
|
|
@@ -3958,26 +3971,29 @@
|
|
|
3958
3971
|
* read-only — the inners stand contenteditable="false" (the caret's
|
|
3959
3972
|
* editing's affordance is impossible).
|
|
3960
3973
|
*
|
|
3961
|
-
* The PUBLISHED stand
|
|
3962
|
-
* stands no stand (the published state is readable over the rendered
|
|
3963
|
-
* only — no range, no copy). The
|
|
3964
|
-
* the
|
|
3965
|
-
*
|
|
3966
|
-
*
|
|
3967
|
-
*
|
|
3968
|
-
*
|
|
3974
|
+
* The PUBLISHED stand blocks the text selection by default: the reader's
|
|
3975
|
+
* copy stands no stand (the published state is readable over the rendered
|
|
3976
|
+
* page only — no range, no copy). The consumer lifts the block per reader
|
|
3977
|
+
* over the `publishedCopyable` prop: the copyable stand marks the root
|
|
3978
|
+
* `data-copyable="true"` and stands the `view` mode's policy (the native
|
|
3979
|
+
* selection over the page's text + the editor's copy payload — see
|
|
3980
|
+
* use-editing). The VIEW stand always keeps the native selection (the live
|
|
3981
|
+
* document is read-only but copyable: the text is the reader's to quote).
|
|
3982
|
+
* The `data-readonly` over the standalone's read-only grid (no
|
|
3983
|
+
* `data-mode` — the consumer's own surfaces) keeps the no-select stand.
|
|
3969
3984
|
*/
|
|
3970
|
-
[data-slot="docblocks/editor"][data-readonly="true"]:not([data-mode="view"]) {
|
|
3985
|
+
[data-slot="docblocks/editor"][data-readonly="true"]:not([data-mode="view"]):not([data-copyable="true"]) {
|
|
3971
3986
|
user-select: none;
|
|
3972
3987
|
}
|
|
3973
3988
|
|
|
3974
3989
|
/*
|
|
3975
|
-
* The
|
|
3976
|
-
*
|
|
3977
|
-
*
|
|
3978
|
-
*
|
|
3990
|
+
* The canvas world keeps the read-only's no-select stand over the
|
|
3991
|
+
* selectable stands (the view's mode, the copyable published stand): the
|
|
3992
|
+
* page's text stands selectable, the canvas's world does not — the native
|
|
3993
|
+
* range would fight the pan's drag (the observing gesture) and the world's
|
|
3994
|
+
* text is not an editing surface.
|
|
3979
3995
|
*/
|
|
3980
|
-
[data-slot="docblocks/editor"][data-mode="view"] [data-slot="docblocks/canvas-world"] {
|
|
3996
|
+
[data-slot="docblocks/editor"]:is([data-mode="view"], [data-copyable="true"]) [data-slot="docblocks/canvas-world"] {
|
|
3981
3997
|
user-select: none;
|
|
3982
3998
|
}
|
|
3983
3999
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docblocks-react-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.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.
|
|
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",
|