docblocks-react-ui 0.18.1 → 0.19.1
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 +82 -0
- package/README.md +30 -0
- package/dist/{Editor-DCzrR1FJ.mjs → Editor-C51vAW7_.mjs} +399 -113
- package/dist/{index-G44JW36p.d.mts → index-2gZyAsdf.d.mts} +2 -2
- package/dist/{index-sNhMaFHp.d.mts → index-BoKKzCxv.d.mts} +112 -72
- package/dist/index.d.mts +5 -19
- package/dist/index.mjs +2 -2
- package/dist/mermaid/index.d.mts +1 -1
- package/dist/mermaid/index.mjs +1 -1
- package/dist/pdf/index.d.mts +1 -1
- package/dist/styles.css +7 -0
- package/package.json +2 -2
|
@@ -118,8 +118,8 @@ interface EditorState {
|
|
|
118
118
|
/**
|
|
119
119
|
* The sequence-structure stamp: bumped only when the entry sequence's
|
|
120
120
|
* structure changes (a rootChildren change, or a sequence block's
|
|
121
|
-
* `indent` / `list` kind changing) — never on a text/mark
|
|
122
|
-
* unchanged structure. The motion view's row derivation keys on it, so a
|
|
121
|
+
* `type` / `indent` / `list` kind changing) — never on a text/mark
|
|
122
|
+
* change of an unchanged structure. The motion view's row derivation keys on it, so a
|
|
123
123
|
* text-only edit re-renders the edited row through its own subscription
|
|
124
124
|
* only (the origin is irrelevant — every change flows through
|
|
125
125
|
* `applyChange`).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as PresenceCrypto, i as EditorStore, n as BlockRendererMap } from "./index-
|
|
1
|
+
import { a as PresenceCrypto, i as EditorStore, n as BlockRendererMap } from "./index-2gZyAsdf.mjs";
|
|
2
2
|
import { ComponentType, ReactNode } from "react";
|
|
3
3
|
import { AttributeType, BlockId, DatabaseFilterPayload, Doc, DocAttributeValue, MentionKind, MentionMark, SelectionView, SyncEmbedRef, SyncProvider } from "docblocks-core";
|
|
4
4
|
//#region src/editor-provider/models/attributes.d.ts
|
|
@@ -34,6 +34,12 @@ interface BlobMeta {
|
|
|
34
34
|
name: string;
|
|
35
35
|
/** The MIME type; application/octet-stream stands for an unknown type. */
|
|
36
36
|
mimeType: string;
|
|
37
|
+
/** Optional intrinsic width in CSS px (the image blocks' placeholder
|
|
38
|
+
* reserves the aspect ratio from it — no layout shift on the lazy
|
|
39
|
+
* resolution's landing). */
|
|
40
|
+
width?: number;
|
|
41
|
+
/** Optional intrinsic height in CSS px (the width's pair). */
|
|
42
|
+
height?: number;
|
|
37
43
|
}
|
|
38
44
|
/** A blob payload returned by the consumer's store. */
|
|
39
45
|
interface BlobRef {
|
|
@@ -718,6 +724,9 @@ interface UseDatabaseTable {
|
|
|
718
724
|
beforeRowId: string | null;
|
|
719
725
|
}): Promise<string[]>;
|
|
720
726
|
removeRow(rowId: string): Promise<void>;
|
|
727
|
+
/** Moves the row before `beforeRowId` (null = the table's tail). An
|
|
728
|
+
* unknown `rowId` (a peer's removed row, a stale page) is a no-op:
|
|
729
|
+
* the seat resolves against the page, and no matching row exists. */
|
|
721
730
|
moveRow(rowId: string, beforeRowId: string | null): Promise<void>;
|
|
722
731
|
/** Creates the column over the bridge → the bridge-assigned column id
|
|
723
732
|
* (the view state the caller appends to the block's `columnOrder`). */
|
|
@@ -750,6 +759,20 @@ interface UseDatabaseTable {
|
|
|
750
759
|
*/
|
|
751
760
|
declare function useDatabaseTable(bridge: DatabaseBridge, tableId: string, filter?: DatabaseFilterPayload): UseDatabaseTable;
|
|
752
761
|
//#endregion
|
|
762
|
+
//#region src/database/use-database-table/utils.d.ts
|
|
763
|
+
/** The cell-value equality (null / undefined stand as the empty cell).
|
|
764
|
+
* The composite value (the multi-select's array) stands the element-wise
|
|
765
|
+
* stand: the same content over a fresh array instance is NOT a change
|
|
766
|
+
* (the identity stand would commit the no-op and push the undo entry). */
|
|
767
|
+
declare function cellValueEqual(current: unknown, next: unknown): boolean;
|
|
768
|
+
/** The write's context: the fresh client-issued operation id (a UUID,
|
|
769
|
+
* unique within the retention) + the issue time. Every user action stands
|
|
770
|
+
* a fresh `operationId` — the id is never reused across logical
|
|
771
|
+
* operations. The lost response's reconciliation (the write's fate) is
|
|
772
|
+
* the consumer's stand over the bridge's `getOperationStatus`; the UI's
|
|
773
|
+
* convergence is the rebaseline (the next snapshot / the envelope). */
|
|
774
|
+
declare function newMutationContext(): MutationContext;
|
|
775
|
+
//#endregion
|
|
753
776
|
//#region src/database/standalone/models.d.ts
|
|
754
777
|
/**
|
|
755
778
|
* The database table's view settings — the standalone's `DatabaseTable`
|
|
@@ -1034,6 +1057,90 @@ interface PresenceConfig {
|
|
|
1034
1057
|
crypto?: PresenceCrypto;
|
|
1035
1058
|
}
|
|
1036
1059
|
//#endregion
|
|
1060
|
+
//#region src/editor-provider/models/props-base.d.ts
|
|
1061
|
+
/** The blob loading policy: the viewport-gated lazy stand (the default) or
|
|
1062
|
+
* the eager stand (every block resolves at mount). */
|
|
1063
|
+
type BlobLoading = "eager" | "lazy";
|
|
1064
|
+
interface EditorProviderBaseProps {
|
|
1065
|
+
/**
|
|
1066
|
+
* The headless document to render and edit; must not change after mount.
|
|
1067
|
+
* Required over the editor's stand. Over the `viewer`'s stand the doc IS
|
|
1068
|
+
* the published snapshot — the consumer passes only the stand the reader
|
|
1069
|
+
* may see (the live document never reaches the reader's browser); an
|
|
1070
|
+
* absent stand over the viewer renders the not-published placeholder.
|
|
1071
|
+
*/
|
|
1072
|
+
doc?: Doc;
|
|
1073
|
+
/** Optional sync transport for presence (awareness); the doc's own changes are always tracked. */
|
|
1074
|
+
provider?: SyncProvider;
|
|
1075
|
+
/**
|
|
1076
|
+
* Optional per-instance block renderers: a consumer renderer for a type
|
|
1077
|
+
* replaces the built-in one (view-layer customization). Replacing a
|
|
1078
|
+
* text-editable type replaces the whole block view, including its
|
|
1079
|
+
* editing affordance; a renderer that needs editing drives the core
|
|
1080
|
+
* commands through the hooks. Pass a stable reference for the map
|
|
1081
|
+
* (module-level or memoized): it is read into the provider context per
|
|
1082
|
+
* render, so a fresh inline object would churn the context value and
|
|
1083
|
+
* re-render every context consumer.
|
|
1084
|
+
*/
|
|
1085
|
+
blockRenderers?: BlockRendererMap;
|
|
1086
|
+
/**
|
|
1087
|
+
* Optional blob bridge: returns bytes + authoritative metadata by file id,
|
|
1088
|
+
* uploads and renames files, and notifies open views about store changes.
|
|
1089
|
+
* Without it the editor uses the shared default in-memory store, cleared on
|
|
1090
|
+
* page reload. Pass a stable reference; nested providers inherit it.
|
|
1091
|
+
*/
|
|
1092
|
+
blobStore?: BlobStore;
|
|
1093
|
+
/**
|
|
1094
|
+
* The blob loading policy. "lazy" (the default) resolves a block's bytes
|
|
1095
|
+
* only when the block enters the viewport's preload band — the blocks
|
|
1096
|
+
* standing above the fold on mount and the cover resolve eagerly; "eager"
|
|
1097
|
+
* resolves every block at mount (the pre-lazy behavior). The metadata's
|
|
1098
|
+
* lookup (the store's `getMeta`) always runs at mount: it is the cheap
|
|
1099
|
+
* head stand the placeholder's aspect-ratio reservation reads.
|
|
1100
|
+
*
|
|
1101
|
+
* A nested provider that supplies none inherits the enclosing policy.
|
|
1102
|
+
*/
|
|
1103
|
+
blobLoading?: BlobLoading;
|
|
1104
|
+
/**
|
|
1105
|
+
* Optional database bridge: the consumer's implementation of the table
|
|
1106
|
+
* operations behind the external-form database blocks (the document
|
|
1107
|
+
* keeps only the `tableId` reference; the schema and the rows live in
|
|
1108
|
+
* the consumer's database). Without it the external-form blocks render
|
|
1109
|
+
* the disconnected placeholder (the inline form stands unchanged — its
|
|
1110
|
+
* data is the document's own).
|
|
1111
|
+
*
|
|
1112
|
+
* Like `blobStore`, the value is read per render into the provider
|
|
1113
|
+
* context: pass a stable reference. A nested provider that supplies
|
|
1114
|
+
* none inherits the enclosing bridge.
|
|
1115
|
+
*/
|
|
1116
|
+
databaseBridge?: DatabaseBridge;
|
|
1117
|
+
/**
|
|
1118
|
+
* Optional PDF first-page preview renderer for file blocks and legacy PDF
|
|
1119
|
+
* image blocks. The component receives the library-owned object URL and the
|
|
1120
|
+
* store's authoritative metadata. Without it the native iframe stands.
|
|
1121
|
+
*
|
|
1122
|
+
* Like `blockRenderers`, the value is read per render into the provider
|
|
1123
|
+
* context: pass a stable reference (the component is module-level). A
|
|
1124
|
+
* nested provider that supplies none inherits the enclosing one.
|
|
1125
|
+
*/
|
|
1126
|
+
pdfPreview?: PdfPreview;
|
|
1127
|
+
/**
|
|
1128
|
+
* Optional entry-list root: render the entry list of this block instead
|
|
1129
|
+
* of the document root (the subtree view — the block itself plus its own
|
|
1130
|
+
* subtree). Defaults to the document root: behavior unchanged.
|
|
1131
|
+
*
|
|
1132
|
+
* Like `doc`, the value must not change after mount.
|
|
1133
|
+
*/
|
|
1134
|
+
rootBlockId?: BlockId;
|
|
1135
|
+
/**
|
|
1136
|
+
* The command palette placeholder override, shown while the caret sits in
|
|
1137
|
+
* an empty text block. The default comes from the editor locale. A nested
|
|
1138
|
+
* provider that supplies none inherits the enclosing override.
|
|
1139
|
+
*/
|
|
1140
|
+
commandPalettePlaceholder?: string;
|
|
1141
|
+
children: ReactNode;
|
|
1142
|
+
}
|
|
1143
|
+
//#endregion
|
|
1037
1144
|
//#region src/editor-provider/models/selection.d.ts
|
|
1038
1145
|
/** The per-instance selection view; null before the mount effect ran and after unmount. */
|
|
1039
1146
|
interface SelectionRef {
|
|
@@ -1071,6 +1178,9 @@ interface EditorContextValue {
|
|
|
1071
1178
|
/** The effective blob bridge (the consumer's store, the legacy resolver
|
|
1072
1179
|
* wrapped, or the shared default in-memory store) — always present. */
|
|
1073
1180
|
blobStore: BlobStore;
|
|
1181
|
+
/** The effective blob loading policy (the own prop, else the enclosing
|
|
1182
|
+
* one, else "lazy"). */
|
|
1183
|
+
blobLoading: BlobLoading;
|
|
1074
1184
|
/** The effective database bridge (the consumer's implementation);
|
|
1075
1185
|
* undefined when none was supplied — the external-form database blocks
|
|
1076
1186
|
* render the disconnected placeholder. */
|
|
@@ -1161,76 +1271,6 @@ interface EditorProviderAccessProps {
|
|
|
1161
1271
|
presence?: PresenceConfig;
|
|
1162
1272
|
}
|
|
1163
1273
|
//#endregion
|
|
1164
|
-
//#region src/editor-provider/models/props-base.d.ts
|
|
1165
|
-
interface EditorProviderBaseProps {
|
|
1166
|
-
/**
|
|
1167
|
-
* The headless document to render and edit; must not change after mount.
|
|
1168
|
-
* Required over the editor's stand. Over the `viewer`'s stand the doc IS
|
|
1169
|
-
* the published snapshot — the consumer passes only the stand the reader
|
|
1170
|
-
* may see (the live document never reaches the reader's browser); an
|
|
1171
|
-
* absent stand over the viewer renders the not-published placeholder.
|
|
1172
|
-
*/
|
|
1173
|
-
doc?: Doc;
|
|
1174
|
-
/** Optional sync transport for presence (awareness); the doc's own changes are always tracked. */
|
|
1175
|
-
provider?: SyncProvider;
|
|
1176
|
-
/**
|
|
1177
|
-
* Optional per-instance block renderers: a consumer renderer for a type
|
|
1178
|
-
* replaces the built-in one (view-layer customization). Replacing a
|
|
1179
|
-
* text-editable type replaces the whole block view, including its
|
|
1180
|
-
* editing affordance; a renderer that needs editing drives the core
|
|
1181
|
-
* commands through the hooks. Pass a stable reference for the map
|
|
1182
|
-
* (module-level or memoized): it is read into the provider context per
|
|
1183
|
-
* render, so a fresh inline object would churn the context value and
|
|
1184
|
-
* re-render every context consumer.
|
|
1185
|
-
*/
|
|
1186
|
-
blockRenderers?: BlockRendererMap;
|
|
1187
|
-
/**
|
|
1188
|
-
* Optional blob bridge: returns bytes + authoritative metadata by file id,
|
|
1189
|
-
* uploads and renames files, and notifies open views about store changes.
|
|
1190
|
-
* Without it the editor uses the shared default in-memory store, cleared on
|
|
1191
|
-
* page reload. Pass a stable reference; nested providers inherit it.
|
|
1192
|
-
*/
|
|
1193
|
-
blobStore?: BlobStore;
|
|
1194
|
-
/**
|
|
1195
|
-
* Optional database bridge: the consumer's implementation of the table
|
|
1196
|
-
* operations behind the external-form database blocks (the document
|
|
1197
|
-
* keeps only the `tableId` reference; the schema and the rows live in
|
|
1198
|
-
* the consumer's database). Without it the external-form blocks render
|
|
1199
|
-
* the disconnected placeholder (the inline form stands unchanged — its
|
|
1200
|
-
* data is the document's own).
|
|
1201
|
-
*
|
|
1202
|
-
* Like `blobStore`, the value is read per render into the provider
|
|
1203
|
-
* context: pass a stable reference. A nested provider that supplies
|
|
1204
|
-
* none inherits the enclosing bridge.
|
|
1205
|
-
*/
|
|
1206
|
-
databaseBridge?: DatabaseBridge;
|
|
1207
|
-
/**
|
|
1208
|
-
* Optional PDF first-page preview renderer for file blocks and legacy PDF
|
|
1209
|
-
* image blocks. The component receives the library-owned object URL and the
|
|
1210
|
-
* store's authoritative metadata. Without it the native iframe stands.
|
|
1211
|
-
*
|
|
1212
|
-
* Like `blockRenderers`, the value is read per render into the provider
|
|
1213
|
-
* context: pass a stable reference (the component is module-level). A
|
|
1214
|
-
* nested provider that supplies none inherits the enclosing one.
|
|
1215
|
-
*/
|
|
1216
|
-
pdfPreview?: PdfPreview;
|
|
1217
|
-
/**
|
|
1218
|
-
* Optional entry-list root: render the entry list of this block instead
|
|
1219
|
-
* of the document root (the subtree view — the block itself plus its own
|
|
1220
|
-
* subtree). Defaults to the document root: behavior unchanged.
|
|
1221
|
-
*
|
|
1222
|
-
* Like `doc`, the value must not change after mount.
|
|
1223
|
-
*/
|
|
1224
|
-
rootBlockId?: BlockId;
|
|
1225
|
-
/**
|
|
1226
|
-
* The command palette placeholder override, shown while the caret sits in
|
|
1227
|
-
* an empty text block. The default comes from the editor locale. A nested
|
|
1228
|
-
* provider that supplies none inherits the enclosing override.
|
|
1229
|
-
*/
|
|
1230
|
-
commandPalettePlaceholder?: string;
|
|
1231
|
-
children: ReactNode;
|
|
1232
|
-
}
|
|
1233
|
-
//#endregion
|
|
1234
1274
|
//#region src/editor-provider/models/props-customization.d.ts
|
|
1235
1275
|
interface EditorProviderCustomizationProps {
|
|
1236
1276
|
/**
|
|
@@ -1402,4 +1442,4 @@ declare const DEFAULT_EMBED_SANDBOX = "allow-scripts allow-same-origin allow-for
|
|
|
1402
1442
|
/** Read the per-instance editor context; throws outside an EditorProvider. */
|
|
1403
1443
|
declare function useEditorContext(): EditorContextValue;
|
|
1404
1444
|
//#endregion
|
|
1405
|
-
export {
|
|
1445
|
+
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 };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
-
import { $ as
|
|
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-2gZyAsdf.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-BoKKzCxv.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";
|
|
@@ -159,20 +159,6 @@ declare function isDatabaseBridge(candidate: unknown): candidate is DatabaseBrid
|
|
|
159
159
|
*/
|
|
160
160
|
declare function validateProtocolDescriptor(descriptor: ProtocolDescriptor): Set<ProtocolCapability>;
|
|
161
161
|
//#endregion
|
|
162
|
-
//#region src/database/use-database-table/utils.d.ts
|
|
163
|
-
/** The cell-value equality (null / undefined stand as the empty cell).
|
|
164
|
-
* The composite value (the multi-select's array) stands the element-wise
|
|
165
|
-
* stand: the same content over a fresh array instance is NOT a change
|
|
166
|
-
* (the identity stand would commit the no-op and push the undo entry). */
|
|
167
|
-
declare function cellValueEqual(current: unknown, next: unknown): boolean;
|
|
168
|
-
/** The write's context: the fresh client-issued operation id (a UUID,
|
|
169
|
-
* unique within the retention) + the issue time. Every user action stands
|
|
170
|
-
* a fresh `operationId` — the id is never reused across logical
|
|
171
|
-
* operations. The lost response's reconciliation (the write's fate) is
|
|
172
|
-
* the consumer's stand over the bridge's `getOperationStatus`; the UI's
|
|
173
|
-
* convergence is the rebaseline (the next snapshot / the envelope). */
|
|
174
|
-
declare function newMutationContext(): MutationContext;
|
|
175
|
-
//#endregion
|
|
176
162
|
//#region src/DocHeaderAvatar.d.ts
|
|
177
163
|
/** The content replacement's context: the standing avatar (`null` — none)
|
|
178
164
|
* and the interaction's stand (`false` over the read-only modes — the
|
|
@@ -441,7 +427,7 @@ declare function AlertDescription({ className, ...props }: React$1.ComponentProp
|
|
|
441
427
|
//#endregion
|
|
442
428
|
//#region src/shared/ui/Badge.d.ts
|
|
443
429
|
declare const badgeVariants: (props?: ({
|
|
444
|
-
variant?: "default" | "destructive" | "
|
|
430
|
+
variant?: "default" | "destructive" | "custom" | "secondary" | "outline" | null | undefined;
|
|
445
431
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
446
432
|
declare function Badge({ className, variant, asChild, ...props }: React$1.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
447
433
|
asChild?: boolean;
|
|
@@ -452,7 +438,7 @@ declare function BareSelect({ className, children, ...props }: React$1.Component
|
|
|
452
438
|
//#endregion
|
|
453
439
|
//#region src/shared/ui/Button.d.ts
|
|
454
440
|
declare const buttonVariants: (props?: ({
|
|
455
|
-
variant?: "link" | "default" | "destructive" | "
|
|
441
|
+
variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
|
|
456
442
|
size?: "default" | "icon" | "sm" | "lg" | "xl" | null | undefined;
|
|
457
443
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
458
444
|
declare function Button({ className, variant, size, asChild, type, ...props }: React$1.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
@@ -588,4 +574,4 @@ declare function TooltipContent({ className, sideOffset, children, ...props }: R
|
|
|
588
574
|
//#region src/shared/ui/cn.d.ts
|
|
589
575
|
declare function cn(...inputs: ClassValue[]): string;
|
|
590
576
|
//#endregion
|
|
591
|
-
export { type AccessLevel, Alert, AlertDescription, AlertTitle, type AttributeType, type AttributeTypePicker, type AttributeTypePickerProps, BASELINE_CAPABILITIES, BRIDGE_ERROR_CODES, Badge, BareSelect, type BatchOp, 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 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-C51vAW7_.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";
|
|
@@ -465,7 +465,7 @@ function useTableList(bridge) {
|
|
|
465
465
|
}, []);
|
|
466
466
|
useEffect(() => {
|
|
467
467
|
refresh();
|
|
468
|
-
}, [refresh]);
|
|
468
|
+
}, [bridge, refresh]);
|
|
469
469
|
return {
|
|
470
470
|
tables,
|
|
471
471
|
loading,
|
package/dist/mermaid/index.d.mts
CHANGED
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-C51vAW7_.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 {
|
|
1
|
+
import { f as PdfPreviewProps } from "../index-BoKKzCxv.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
|
@@ -919,6 +919,9 @@
|
|
|
919
919
|
.origin-left {
|
|
920
920
|
transform-origin: 0;
|
|
921
921
|
}
|
|
922
|
+
.origin-top-left {
|
|
923
|
+
transform-origin: 0 0;
|
|
924
|
+
}
|
|
922
925
|
.-translate-x-1\/2 {
|
|
923
926
|
--tw-translate-x: calc(calc(1 / 2 * 100%) * -1);
|
|
924
927
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
@@ -3661,6 +3664,10 @@
|
|
|
3661
3664
|
(the block content's width + the two gutter paddings — the token
|
|
3662
3665
|
stands on the blocks, the paddings stand outside it). */
|
|
3663
3666
|
--docblocks-page-column-max-width: calc(var(--docblocks-page-max-width) + 2 * var(--docblocks-page-padding-x));
|
|
3667
|
+
/* The image blocks' preload band: the lazy blob resolution starts this
|
|
3668
|
+
far outside the viewport (the IntersectionObserver's root margin), so
|
|
3669
|
+
the bytes land before the block enters the frame. */
|
|
3670
|
+
--docblocks-image-preload-margin: 200%;
|
|
3664
3671
|
|
|
3665
3672
|
/* Block selection. */
|
|
3666
3673
|
--docblocks-selected-background: color-mix(in srgb, var(--accent, #0969da) 8%, transparent);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docblocks-react-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.1",
|
|
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.8.
|
|
39
|
+
"docblocks-core": "^0.8.2",
|
|
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",
|