docblocks-react-ui 0.25.0 → 0.27.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 +37 -0
- package/README.md +36 -2
- package/dist/{Editor-D91f-KD8.mjs → Editor-L0Ph4I89.mjs} +662 -281
- package/dist/{index-DAc-REs_.d.mts → index-QtG3mkFQ.d.mts} +8 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +12 -1
- package/dist/mermaid/index.mjs +1 -1
- package/dist/pdf/index.d.mts +1 -1
- package/dist/styles.css +39 -0
- package/package.json +2 -2
|
@@ -788,8 +788,14 @@ interface DatabaseTableSection {
|
|
|
788
788
|
* (the block's own attr over it, else the auto height). */
|
|
789
789
|
getHeaderHeight?: (tableId: string) => number | undefined;
|
|
790
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
|
-
|
|
791
|
+
* release): one value over every block referencing the table.
|
|
792
|
+
* `undefined` clears the persisted value (the header's double-click's
|
|
793
|
+
* reset's stand — the auto height's return). */
|
|
794
|
+
setHeaderHeight?: (tableId: string, height: number | undefined) => void;
|
|
795
|
+
/** The consumer's authoritative total row count; `undefined` lets the
|
|
796
|
+
* grid fall back to its loaded rows. The interface is a read, not a
|
|
797
|
+
* subscription: the consumer re-renders when its count changes. */
|
|
798
|
+
getRowCount?: (tableId: string) => number | undefined;
|
|
793
799
|
}
|
|
794
800
|
//#endregion
|
|
795
801
|
//#region src/database/standalone/models.d.ts
|
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 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-
|
|
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-QtG3mkFQ.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";
|
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-L0Ph4I89.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";
|
|
@@ -412,6 +412,15 @@ function DatabaseTable({ bridge, tableId, readOnly = false, view, onViewChange,
|
|
|
412
412
|
});
|
|
413
413
|
tableSection?.setHeaderHeight?.(tableId, height);
|
|
414
414
|
};
|
|
415
|
+
const commitHeaderHeightReset = () => {
|
|
416
|
+
if (sectionHeight === void 0) return;
|
|
417
|
+
setHeaderEcho({
|
|
418
|
+
tableId,
|
|
419
|
+
base: sectionHeight,
|
|
420
|
+
height: void 0
|
|
421
|
+
});
|
|
422
|
+
tableSection?.setHeaderHeight?.(tableId, void 0);
|
|
423
|
+
};
|
|
415
424
|
const handleViewChange = useCallback((patch) => {
|
|
416
425
|
const typed = patch;
|
|
417
426
|
setViewState((current) => ({
|
|
@@ -432,7 +441,9 @@ function DatabaseTable({ bridge, tableId, readOnly = false, view, onViewChange,
|
|
|
432
441
|
hiddenColumns: viewState.hiddenColumns,
|
|
433
442
|
columnWidths: viewState.columnWidths,
|
|
434
443
|
sectionHeaderHeight,
|
|
444
|
+
getRowCount: tableSection?.getRowCount,
|
|
435
445
|
onHeaderHeightChange: tableSection === void 0 ? void 0 : commitHeaderHeight,
|
|
446
|
+
onHeaderHeightReset: tableSection === void 0 ? void 0 : commitHeaderHeightReset,
|
|
436
447
|
onViewChange: handleViewChange,
|
|
437
448
|
readColumnOrder: () => viewRef.current.columnOrder,
|
|
438
449
|
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-L0Ph4I89.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-QtG3mkFQ.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
|
@@ -542,6 +542,9 @@
|
|
|
542
542
|
.block {
|
|
543
543
|
display: block;
|
|
544
544
|
}
|
|
545
|
+
.contents {
|
|
546
|
+
display: contents;
|
|
547
|
+
}
|
|
545
548
|
.flex {
|
|
546
549
|
display: flex;
|
|
547
550
|
}
|
|
@@ -745,6 +748,9 @@
|
|
|
745
748
|
.max-h-80 {
|
|
746
749
|
max-height: calc(var(--spacing) * 80);
|
|
747
750
|
}
|
|
751
|
+
.max-h-full {
|
|
752
|
+
max-height: 100%;
|
|
753
|
+
}
|
|
748
754
|
.min-h-0 {
|
|
749
755
|
min-height: 0px;
|
|
750
756
|
}
|
|
@@ -757,6 +763,9 @@
|
|
|
757
763
|
.min-h-16 {
|
|
758
764
|
min-height: calc(var(--spacing) * 16);
|
|
759
765
|
}
|
|
766
|
+
.min-h-28 {
|
|
767
|
+
min-height: calc(var(--spacing) * 28);
|
|
768
|
+
}
|
|
760
769
|
.min-h-40 {
|
|
761
770
|
min-height: calc(var(--spacing) * 40);
|
|
762
771
|
}
|
|
@@ -1226,10 +1235,22 @@
|
|
|
1226
1235
|
border-top-left-radius: var(--cell-radius);
|
|
1227
1236
|
border-bottom-left-radius: var(--cell-radius);
|
|
1228
1237
|
}
|
|
1238
|
+
.rounded-tl-\(--docblocks-radius\) {
|
|
1239
|
+
border-top-left-radius: var(--docblocks-radius);
|
|
1240
|
+
}
|
|
1229
1241
|
.rounded-r-\(--cell-radius\) {
|
|
1230
1242
|
border-top-right-radius: var(--cell-radius);
|
|
1231
1243
|
border-bottom-right-radius: var(--cell-radius);
|
|
1232
1244
|
}
|
|
1245
|
+
.rounded-tr-\(--docblocks-radius\) {
|
|
1246
|
+
border-top-right-radius: var(--docblocks-radius);
|
|
1247
|
+
}
|
|
1248
|
+
.rounded-br-\(--docblocks-radius\) {
|
|
1249
|
+
border-bottom-right-radius: var(--docblocks-radius);
|
|
1250
|
+
}
|
|
1251
|
+
.rounded-bl-\(--docblocks-radius\) {
|
|
1252
|
+
border-bottom-left-radius: var(--docblocks-radius);
|
|
1253
|
+
}
|
|
1233
1254
|
.border {
|
|
1234
1255
|
border-style: var(--tw-border-style);
|
|
1235
1256
|
border-width: 1px;
|
|
@@ -4095,6 +4116,24 @@
|
|
|
4095
4116
|
appearance: textfield;
|
|
4096
4117
|
}
|
|
4097
4118
|
|
|
4119
|
+
/* The database header's name: the single-line's ellipsis stand (the
|
|
4120
|
+
auto height's floor — the one line never grows the row). Over the
|
|
4121
|
+
stretched header (the grid root's `data-header-wrap`'s key — the
|
|
4122
|
+
height's stand over the single-line's auto) the name wraps over the
|
|
4123
|
+
column's width (the ellipsis stands off — the full name's stand);
|
|
4124
|
+
the span's `max-h-full`'s clip stands the lines' stand past the row's
|
|
4125
|
+
height (the under-height's clip). */
|
|
4126
|
+
[data-slot="docblocks/database-header-name"] {
|
|
4127
|
+
overflow: hidden;
|
|
4128
|
+
text-overflow: ellipsis;
|
|
4129
|
+
white-space: nowrap;
|
|
4130
|
+
}
|
|
4131
|
+
[data-slot="docblocks/database-table"][data-header-wrap="true"] [data-slot="docblocks/database-header-name"] {
|
|
4132
|
+
white-space: normal;
|
|
4133
|
+
overflow-wrap: break-word;
|
|
4134
|
+
text-overflow: clip;
|
|
4135
|
+
}
|
|
4136
|
+
|
|
4098
4137
|
/* The multi-ref cell's display (the multi-enum / the row-links' chips)
|
|
4099
4138
|
stands the right fade over the overflowing train: the mask gradients the
|
|
4100
4139
|
tail to transparency at the right edge (the chips clip without the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docblocks-react-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.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.11.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",
|