docblocks-react-ui 0.27.0 → 0.29.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.
@@ -1,6 +1,6 @@
1
1
  import { a as PresenceCrypto, i as EditorStore, n as BlockRendererMap } from "./index-DeOMnr7f.mjs";
2
2
  import { ComponentType, ReactNode } from "react";
3
- import { AttributeType, BlockId, DatabaseFilterPayload, Doc, DocAttributeValue, MentionKind, MentionMark, SelectionView, SyncEmbedRef, SyncProvider } from "docblocks-core";
3
+ import { AttributeType, BlockId, DatabaseFilterPayload, DatabaseSortKey, Doc, DocAttributeValue, MentionKind, MentionMark, SelectionView, SyncEmbedRef, SyncProvider } from "docblocks-core";
4
4
  //#region src/editor-provider/models/attributes.d.ts
5
5
  /** The props an attribute-value renderer receives (the `renderAttribute` provider prop). */
6
6
  interface RenderAttributeProps {
@@ -155,6 +155,9 @@ interface TableRef {
155
155
  * `listTables`, reachable by id. */
156
156
  system?: boolean;
157
157
  }
158
+ /** The system column's role: its value comes from the row's own system
159
+ * fields, never from the cells — the grid renders it read-only. */
160
+ type ColumnSystem = "id" | "created" | "updated";
158
161
  /** The column's schema entry (the consumer's field registry row). */
159
162
  interface Column {
160
163
  id: Id;
@@ -169,15 +172,33 @@ interface Column {
169
172
  operators?: string[];
170
173
  /** The reference relation over the plain column: the cell holds the
171
174
  * referenced row's stable id (an option row id for the enum, a linked
172
- * row id for the row link); `many` = the cell holds the array. */
175
+ * row id for the row link); `many` = the cell holds the array. The
176
+ * consumer creates the relation's own structures: the enum's hidden
177
+ * dictionary (the create's `enumOptions`) and, for a junction-based
178
+ * consumer, the `many` junction — the ids come back here. */
173
179
  reference?: {
174
180
  kind: "enum" | "row";
181
+ /** The enum: the hidden dictionary table; the row link: the linked
182
+ * table. */
175
183
  tableId: Id;
176
184
  many: boolean;
177
- /** The display column of the linked table (the row-link's stand; the
178
- * default is the first text column / the pk). */
185
+ /** The display column of the referenced table (the enum option's
186
+ * label / the linked row's display; the default is the consumer's
187
+ * first text column / the pk). */
179
188
  displayColumnId?: Id;
189
+ /** The enum's chip color column (a text column of the dictionary
190
+ * holding a hex; absent = the neutral chip). */
191
+ colorColumnId?: Id;
192
+ /** The `many` junction table (the consumer-owned link table behind
193
+ * the array cell; absent = the consumer keeps no junction). */
194
+ junctionTableId?: Id;
180
195
  };
196
+ /** The system role (the consumer's id / created / updated column): the
197
+ * cell value is the row's `id` / `createdAt` / `updatedAt`, never a
198
+ * stored cell — the package renders the column read-only (the
199
+ * selection and the copy stand, every write stands off). Absent = a
200
+ * plain data column. */
201
+ system?: ColumnSystem;
181
202
  /** The number column's display attributes. */
182
203
  numberDisplay?: {
183
204
  decimals?: number;
@@ -223,27 +244,63 @@ interface FilterInput {
223
244
  conditions: FilterConditionInput[];
224
245
  groups?: FilterInput[] | null;
225
246
  }
247
+ /** The enum catalog's initial option (the column create's stand). */
248
+ interface EnumOptionInput {
249
+ name: string;
250
+ color?: string;
251
+ }
252
+ /** The create's reference: an enum column may omit the catalog's ids —
253
+ * the consumer creates the dictionary (and the `many` junction) from the
254
+ * create's `enumOptions` and returns them in the created column's
255
+ * `reference`. */
256
+ type ColumnReference = NonNullable<Column["reference"]>;
257
+ type ColumnCreateReference = Omit<ColumnReference, "tableId"> & {
258
+ tableId?: Id;
259
+ };
260
+ /** The column create's input: the wire column (the ids are bridge-owned) +
261
+ * the enum's initial options. */
262
+ interface ColumnCreateInput {
263
+ column: Omit<Column, "id" | "revision" | "reference"> & {
264
+ reference?: ColumnCreateReference;
265
+ };
266
+ afterColumnId?: Id;
267
+ /** The enum column's initial catalog: the consumer creates the hidden
268
+ * dictionary (and the `many` junction where it keeps one), assigns the
269
+ * ids, and returns them in the created column's `reference`. */
270
+ enumOptions?: EnumOptionInput[];
271
+ }
226
272
  /** The sort input: the ordered sort keys (the null ordering per key). */
227
273
  type SortInput = {
228
274
  fieldId: Id;
229
275
  direction: "asc" | "desc";
230
276
  nulls?: "first" | "last";
231
277
  }[];
232
- /** The page query (the filter + the sort + the page size). */
278
+ /** The page query: the filter + the sort + the optional chunk size. The
279
+ * client sends no `limit` — the returned chunk is the consumer's default
280
+ * (its `limits.maxPageSize` stands the ceiling); the cursor continues the
281
+ * query the snapshot was taken with. */
233
282
  interface PageQuery {
234
283
  filter?: FilterInput;
235
284
  sort?: SortInput;
285
+ /** The requested chunk size (optional): absent = the consumer's default
286
+ * page. */
236
287
  limit?: number;
237
288
  }
238
289
  /** A wire row: the stable id + the canonical physical order key (a finite
239
290
  * IEEE-754 number — never a string, NaN or infinity; the canonical total
240
- * order is `(orderKey, rowId)`) + the revision + the cells. The page's
241
- * row order is the array's order. */
291
+ * order is `(orderKey, rowId)`) + the revision + the cells + the row's
292
+ * system instants (the `created` / `updated` system columns' values;
293
+ * absent = the column is empty). The page's row order is the array's
294
+ * order. */
242
295
  interface RowWire {
243
296
  id: Id;
244
297
  orderKey: number;
245
298
  revision: Revision;
246
299
  cells: Record<string, unknown>;
300
+ /** The row's creation instant (the `created` system column's value). */
301
+ createdAt?: IsoInstant;
302
+ /** The row's last-write instant (the `updated` system column's value). */
303
+ updatedAt?: IsoInstant;
247
304
  }
248
305
  /** An ordered row page: the rows in the server's order + the opaque next
249
306
  * cursor (null = the last page) + the snapshot's top event boundary +
@@ -427,11 +484,6 @@ interface SubscriptionHandle {
427
484
  }
428
485
  //#endregion
429
486
  //#region src/database/bridge/grid-types.d.ts
430
- /**
431
- * The grid-facing's contract's shapes (the bridge column / table
432
- * description's view over the wire's schema — the display attributes
433
- * flattened, the cell annotation + the value's parse contract).
434
- */
435
487
  /**
436
488
  * A bridge column (the grid's view over the wire's `Column` — the display
437
489
  * attributes flattened, the reference relation's fields in the wire's
@@ -466,9 +518,16 @@ interface BridgeColumn {
466
518
  refKind?: "enum" | "row";
467
519
  /** The many cardinality (the cell value is an array). */
468
520
  refMany?: boolean;
469
- /** The display column of the linked table (the row-link display; the
470
- * default is the first text column / the pk). */
521
+ /** The display column of the referenced table (the enum option's label /
522
+ * the row-link display; the default is the consumer's first text column
523
+ * / the pk). */
471
524
  refDisplayColumn?: string;
525
+ /** The enum's chip color column (the consumer's, a hex text column;
526
+ * absent = the neutral chip). */
527
+ refColorColumn?: string;
528
+ /** The `many` junction table (the consumer-owned link table behind the
529
+ * array cell; absent = the consumer keeps no junction). */
530
+ refJunctionTable?: string;
472
531
  /** The number's digit count after the point (default 0 = integer). */
473
532
  decimals?: number;
474
533
  /** The thousands' separator (the space grouping: `1 000 000`). */
@@ -479,6 +538,11 @@ interface BridgeColumn {
479
538
  suffix?: string;
480
539
  /** Whether negative values are allowed (the edit rejects them otherwise). */
481
540
  allowNegative?: boolean;
541
+ /** The system role (the consumer's id / created / updated column): the
542
+ * value comes from the row's own system fields (the id / the created
543
+ * / the updated instant), never from a cell, and the grid renders the
544
+ * column read-only. Absent = a plain data column. */
545
+ system?: ColumnSystem;
482
546
  }
483
547
  /**
484
548
  * The table description (the grid's view over the wire's
@@ -580,11 +644,13 @@ interface DatabaseBridge {
580
644
  asOfSeq: number;
581
645
  queryFingerprint: string;
582
646
  }): Promise<PageSnapshot>;
583
- /** Add a column (after `afterColumnId`, or at the end). */
584
- createColumn(tableId: Id, input: {
585
- column: Omit<Column, "id" | "revision">;
586
- afterColumnId?: Id;
587
- }, ctx: MutationContext): Promise<MutationReceipt<Column>>;
647
+ /** Add a column (after `afterColumnId`, or at the end). An enum column's
648
+ * `enumOptions` stand the initial catalog: the consumer creates the
649
+ * hidden dictionary (and the `many` junction where it keeps one) inside
650
+ * the one operation and returns the ids in the created column's
651
+ * `reference` — the client never creates the catalog's structures nor
652
+ * names them. */
653
+ createColumn(tableId: Id, input: ColumnCreateInput, ctx: MutationContext): Promise<MutationReceipt<Column>>;
588
654
  /** Patch the column's attributes (the rename stands the `name` key —
589
655
  * the name is an attribute). */
590
656
  updateColumn(tableId: Id, columnId: Id, patch: Partial<Omit<Column, "id" | "revision">>, ctx: MutationContext): Promise<MutationReceipt<Column>>;
@@ -671,10 +737,14 @@ declare function emptyFilter(): DatabaseFilterPayload;
671
737
  declare function filterIsComplete(payload: DatabaseFilterPayload | null, columns: BridgeColumn[]): boolean;
672
738
  //#endregion
673
739
  //#region src/database/use-database-table/models.d.ts
674
- /** One loaded row: the row id (the pk value) + the cells. */
740
+ /** One loaded row: the row id (the pk value) + the cells + the row's
741
+ * system instants (the `created` / `updated` system columns' values;
742
+ * absent = the column is empty). */
675
743
  interface DatabaseTableRow {
676
744
  rowId: string;
677
745
  cells: Record<string, unknown>;
746
+ createdAt?: string;
747
+ updatedAt?: string;
678
748
  }
679
749
  type DatabaseTablePhase = "loading" | "ready" | "broken";
680
750
  /** The public result of the hook (the grid renderer + the consumer UI read from it). */
@@ -729,13 +799,15 @@ interface UseDatabaseTable {
729
799
  beforeRowId: string | null;
730
800
  }): Promise<string[]>;
731
801
  removeRow(rowId: string): Promise<void>;
802
+ /** Removes known listed rows in one batch; unknown ids are skipped. One undo restores the batch when supported. */
803
+ removeRows(rowIds: string[]): Promise<void>;
732
804
  /** Moves the row before `beforeRowId` (null = the table's tail). An
733
805
  * unknown `rowId` (a peer's removed row, a stale page) is a no-op:
734
806
  * the seat resolves against the page, and no matching row exists. */
735
807
  moveRow(rowId: string, beforeRowId: string | null): Promise<void>;
736
808
  /** Creates the column over the bridge → the bridge-assigned column id
737
809
  * (the view state the caller appends to the block's `columnOrder`). */
738
- addColumn(column: BridgeColumn, afterColumnId?: string): Promise<string>;
810
+ addColumn(column: BridgeColumn, enumOptions?: EnumOptionInput[], afterColumnId?: string): Promise<string>;
739
811
  updateColumn(columnId: string, patch: Partial<Omit<BridgeColumn, "id" | "name">>): Promise<void>;
740
812
  deleteColumn(columnId: string): Promise<void>;
741
813
  renameColumn(columnId: string, name: string): Promise<void>;
@@ -752,17 +824,25 @@ interface UseDatabaseTable {
752
824
  redo(): Promise<void>;
753
825
  canUndo: boolean;
754
826
  canRedo: boolean;
827
+ /** The stale view's normalized stand (a column deleted outside the grid /
828
+ * a changed operator catalog): the grid renders and edits over it, and
829
+ * the caller repairs the document's view attrs over it (`undefined` = no
830
+ * repair stands). */
831
+ normalizedView?: {
832
+ filter?: DatabaseFilterPayload;
833
+ sort?: DatabaseSortKey[];
834
+ };
755
835
  }
756
836
  //#endregion
757
837
  //#region src/database/use-database-table/use-database-table.d.ts
758
838
  /**
759
839
  * The external-form data provider for one `tableId` (per block
760
840
  * instance: each block has its own row store and its own undo stack, even
761
- * when several blocks reference the same table). The `filter` stands the
762
- * block's view state (the block's `filter` attr's payload — the contract
763
- * filter's input shape).
841
+ * when several blocks reference the same table). The `filter` and the `sort`
842
+ * stand the block's view state (the block's `filter` / `sort` attrs — the
843
+ * contract query's input shapes).
764
844
  */
765
- declare function useDatabaseTable(bridge: DatabaseBridge, tableId: string, filter?: DatabaseFilterPayload): UseDatabaseTable;
845
+ declare function useDatabaseTable(bridge: DatabaseBridge, tableId: string, filter?: DatabaseFilterPayload, sort?: DatabaseSortKey[]): UseDatabaseTable;
766
846
  //#endregion
767
847
  //#region src/database/use-database-table/utils.d.ts
768
848
  /** The cell-value equality (null / undefined stand as the empty cell).
@@ -801,8 +881,9 @@ interface DatabaseTableSection {
801
881
  //#region src/database/standalone/models.d.ts
802
882
  /**
803
883
  * The database table's view settings — the standalone's `DatabaseTable`
804
- * stand over the block's view attrs: the `filter`, the `columnOrder`, the
805
- * `hiddenColumns`, the `columnWidths`, and the legacy `name` (the display
884
+ * stand over the block's view attrs: the `filter`, the `sort`, the
885
+ * `columnOrder`, the `hiddenColumns`, the `columnWidths`, and the legacy
886
+ * `name` (the display
806
887
  * stands the bridge's table name, as over the block — the `name` attr is
807
888
  * the persistence's parity, not a display override). The schema's
808
889
  * `views` / `viewType` attrs stand out of the UI's v1 (the view's kinds
@@ -813,6 +894,8 @@ interface DatabaseTableView {
813
894
  name?: string;
814
895
  /** The applied filter (the block's `filter` attr's payload shape). */
815
896
  filter?: DatabaseFilterPayload;
897
+ /** The applied sort (the block's `sort` attr's shape). */
898
+ sort?: DatabaseSortKey[];
816
899
  /** The visible columns' order (the drag's committed stand). */
817
900
  columnOrder?: string[];
818
901
  /** The hidden columns' ids (the column menu's toggle stand). */
@@ -1521,4 +1604,4 @@ declare const DEFAULT_EMBED_SANDBOX = "allow-scripts allow-same-origin allow-for
1521
1604
  /** Read the per-instance editor context; throws outside an EditorProvider. */
1522
1605
  declare function useEditorContext(): EditorContextValue;
1523
1606
  //#endregion
1524
- 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 };
1607
+ export { SubscriptionStatus as $, useDatabaseTable as A, BlobRef as At, BridgeColumnAnnotation as B, DatabaseTable as C, BRIDGE_ERROR_CODES as Ct, DatabaseTableSection as D, isBridgeErrorCode as Dt, UseTableList as E, isBridgeError as Et, filterIsComplete as F, RenderAttribute as Ft, MutationContext as G, BridgeValueInput as H, FilterBuilder as I, RenderAttributeProps as It, ProtocolCapability as J, MutationReceipt as K, BatchOp as L, DatabaseTableRow as M, createMemoryBlobStore as Mt, UseDatabaseTable as N, AttributeTypePicker as Nt, cellValueEqual as O, toBridgeError as Ot, emptyFilter as P, AttributeTypePickerProps as Pt, SubscriptionObserver as Q, DatabaseBridge as R, useTableList as S, TableSnapshot as St, DatabaseTableView as T, BridgeErrorCode as Tt, CellValueParse as U, BridgeTableDescription as V, DomainEvent as W, ProtocolLimits as X, ProtocolDescriptor as Y, SubscriptionHandle as Z, AccessLevel as _, RowPage as _t, EditorContextValue as a, ColumnCreateReference as at, MentionInteractions as b, TableDescription as bt, SelectionRef as c, FilterConditionInput as ct, PdfPreview as d, IsoInstant as dt, TableEnvelopeBase as et, PdfPreviewProps as f, PageQuery as ft, DocTags as g, Revision as gt, DocTag as h, QuerySemantics as ht, EditorProviderProps as i, ColumnCreateInput as it, DatabaseTablePhase as j, BlobStore as jt, newMutationContext as k, BlobMeta as kt, BlobLoading as l, FilterInput as lt, DocDescription as m, QueryOperator as mt, DEFAULT_EMBED_SANDBOX as n, CellMap as nt, EmbedSandboxPolicy as o, ColumnSystem as ot, CoverPresetSets as p, PageSnapshot as pt, OperationStatus as q, EditorProvider as r, Column as rt, SyncEmbedResolver as s, EnumOptionInput as st, useEditorContext as t, TableEvent as tt, PresenceConfig as u, Id as ut, EditorMode as v, RowWire as vt, DatabaseTableProps as w, BridgeError as wt, MentionProvider as x, TableRef as xt, MentionEntry as y, SortInput 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 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";
2
+ import { $ as SubscriptionStatus, A as useDatabaseTable, At as BlobRef, B as BridgeColumnAnnotation, C as DatabaseTable, Ct as BRIDGE_ERROR_CODES, D as DatabaseTableSection, Dt as isBridgeErrorCode, E as UseTableList, Et as isBridgeError, F as filterIsComplete, Ft as RenderAttribute, G as MutationContext, H as BridgeValueInput, I as FilterBuilder, It as RenderAttributeProps, J as ProtocolCapability, K as MutationReceipt, L as BatchOp, M as DatabaseTableRow, Mt as createMemoryBlobStore, N as UseDatabaseTable, Nt as AttributeTypePicker, O as cellValueEqual, Ot as toBridgeError, P as emptyFilter, Pt as AttributeTypePickerProps, Q as SubscriptionObserver, R as DatabaseBridge, S as useTableList, St as TableSnapshot, T as DatabaseTableView, Tt as BridgeErrorCode, U as CellValueParse, V as BridgeTableDescription, W as DomainEvent, X as ProtocolLimits, Y as ProtocolDescriptor, Z as SubscriptionHandle, _ as AccessLevel, _t as RowPage, a as EditorContextValue, at as ColumnCreateReference, b as MentionInteractions, bt as TableDescription, c as SelectionRef, ct as FilterConditionInput, d as PdfPreview, dt as IsoInstant, et as TableEnvelopeBase, f as PdfPreviewProps, ft as PageQuery, g as DocTags, gt as Revision, h as DocTag, ht as QuerySemantics, i as EditorProviderProps, it as ColumnCreateInput, j as DatabaseTablePhase, jt as BlobStore, k as newMutationContext, kt as BlobMeta, l as BlobLoading, lt as FilterInput, m as DocDescription, mt as QueryOperator, n as DEFAULT_EMBED_SANDBOX, nt as CellMap, o as EmbedSandboxPolicy, ot as ColumnSystem, p as CoverPresetSets, pt as PageSnapshot, q as OperationStatus, r as EditorProvider, rt as Column, s as SyncEmbedResolver, st as EnumOptionInput, t as useEditorContext, tt as TableEvent, u as PresenceConfig, ut as Id, v as EditorMode, vt as RowWire, w as DatabaseTableProps, wt as BridgeError, x as MentionProvider, xt as TableRef, y as MentionEntry, yt as SortInput, z as BridgeColumn } from "./index-sSq0oOSl.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";
@@ -141,6 +141,19 @@ declare function parseCellValue(kind: BridgeValueInput, raw: string): CellValueP
141
141
  /** Evaluates one filter condition against a cell value. */
142
142
  declare function conditionMatches(op: string, value: unknown, expected: unknown): boolean;
143
143
  //#endregion
144
+ //#region src/database/bridge/enum.d.ts
145
+ /**
146
+ * The enum option's system table's schema (the option IS a row of the
147
+ * table — the row's pk stands the option's identity, so the rename / the
148
+ * reorder stand the cell values intact; the `name` column stands the
149
+ * option's label, the `color` column stands the option's chip color (the
150
+ * hex data — the absent value stands the neutral display)). The enum
151
+ * column's `refTableId` points at the table; the cell's value stands the
152
+ * option's row id.
153
+ */
154
+ declare const ENUM_OPTION_NAME_COLUMN = "name";
155
+ declare const ENUM_OPTION_COLOR_COLUMN = "color";
156
+ //#endregion
144
157
  //#region src/database/bridge/protocol.d.ts
145
158
  /** The protocol's version. */
146
159
  declare const PROTOCOL_VERSION = 2;
@@ -574,4 +587,4 @@ declare function TooltipContent({ className, sideOffset, children, ...props }: R
574
587
  //#region src/shared/ui/cn.d.ts
575
588
  declare function cn(...inputs: ClassValue[]): string;
576
589
  //#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 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 };
590
+ 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 ColumnCreateInput, type ColumnCreateReference, type ColumnSystem, 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, ENUM_OPTION_COLOR_COLUMN, ENUM_OPTION_NAME_COLUMN, Editor, type EditorContextValue, EditorErrorBoundary, type EditorErrorBoundaryProps, type EditorMode, EditorProvider, EditorProviderError, type EditorProviderProps, type EditorView, type EmbedSandboxPolicy, type EnumOptionInput, 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-L0Ph4I89.mjs";
2
+ import { $ as DropdownMenuShortcut, $t as useText, A as Select, At as columnAnnotation, B as Label, Bt as CardDescription, C as cellValueEqual, Ct as isBridgeErrorCode, D as filterIsComplete, Dt as conditionMatches, E as emptyFilter, Et as ENUM_OPTION_NAME_COLUMN, F as SelectScrollDownButton, Ft as BookOpen, G as DropdownMenuContent, Gt as badgeVariants, H as Input, Ht as CardHeader, I as SelectScrollUpButton, It as Skeleton, J as DropdownMenuLabel, Jt as useMeta, K as DropdownMenuGroup, Kt as useBlock, L as SelectSeparator, Lt as Card, M as SelectGroup, Mt as Pen, N as SelectItem, Nt as Eye, O as SegmentSelector, Ot as parseCellValue, P as SelectLabel, Q as DropdownMenuSeparator, Qt as useSelectionView, R as SelectTrigger, Rt as CardAction, S as useDatabaseTable, St as isBridgeError, T as FilterBuilder, Tt as ENUM_OPTION_COLOR_COLUMN, U as DropdownMenu, Ut as CardTitle, V as InlineEditInput, Vt as CardFooter, W as DropdownMenuCheckboxItem, Wt as Badge, X as DropdownMenuRadioGroup, Xt as usePresenceSharing, Y as DropdownMenuPortal, Yt as usePresence, Z as DropdownMenuRadioItem, Zt as useSelection, _ as mapFrontmatter, _t as PROTOCOL_VERSION, a as DEFAULT_EMBED_SANDBOX, at as Popover, b as renderRuns, bt as BRIDGE_ERROR_CODES, c as SHAPE_FONT_OPTIONS, ct as PopoverDescription, d as FORMAT_PALETTE, dt as PopoverTrigger, en as DocblocksI18nProvider, et as DropdownMenuSub, ft as Checkbox, g as parseFrontmatter, gt as BASELINE_CAPABILITIES, h as mdToBlocks, ht as AlertTitle, i as useEditorContext, in as buttonVariants, it as Separator, j as SelectContent, k as ScrollArea, kt as TEXT_TYPES, l as SHAPE_FONT_STACKS, lt as PopoverHeader, m as insertNative, mt as AlertDescription, n as useCoverAverageColor, nn as EditorErrorBoundary, nt as DropdownMenuSubTrigger, ot as PopoverAnchor, p as htmlToBlocks, pt as Alert, q as DropdownMenuItem, qt as useDoc, r as EditorProvider, rn as Button, rt as DropdownMenuTrigger, st as PopoverContent, t as Editor, tn as createMemoryBlobStore, tt as DropdownMenuSubContent, ut as PopoverTitle, v as markToggleAction, vt as isDatabaseBridge, w as newMutationContext, wt as toBridgeError, x as GridBody, xt as BridgeError, yt as validateProtocolDescriptor, z as SelectValue, zt as CardContent } from "./Editor-DbW7iFPK.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";
@@ -78,6 +78,16 @@ function SquareText(props) {
78
78
  });
79
79
  }
80
80
  //#endregion
81
+ //#region src/shared/ui/BareSelect.tsx
82
+ function BareSelect({ className, children, ...props }) {
83
+ return /* @__PURE__ */ jsx("select", {
84
+ "data-slot": "select-bare",
85
+ className: cn("h-8 rounded-md border border-input bg-transparent px-2 text-sm text-foreground outline-none dark:bg-input/30", className),
86
+ ...props,
87
+ children
88
+ });
89
+ }
90
+ //#endregion
81
91
  //#region src/shared/ui/emoji-catalog.ts
82
92
  const AVATAR_EMOJI = [
83
93
  {
@@ -437,6 +447,7 @@ function DatabaseTable({ bridge, tableId, readOnly = false, view, onViewChange,
437
447
  bridge,
438
448
  tableId,
439
449
  filter: viewState.filter,
450
+ sort: viewState.sort,
440
451
  columnOrder: viewState.columnOrder,
441
452
  hiddenColumns: viewState.hiddenColumns,
442
453
  columnWidths: viewState.columnWidths,
@@ -846,4 +857,4 @@ const UI_FONT_STACK = "'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif
846
857
  */
847
858
  const MONO_FONT_STACK = "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
848
859
  //#endregion
849
- export { Alert, AlertDescription, AlertTitle, BASELINE_CAPABILITIES, BRIDGE_ERROR_CODES, Badge, BareSelect, BlobNotFoundError, BridgeError, Button, CanvasPasteError, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, DEFAULT_EMBED_SANDBOX, DatabaseTable, DocBlocksUiError, DocHeader, DocblocksI18nProvider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Editor, EditorErrorBoundary, EditorProvider, EditorProviderError, FORMAT_PALETTE, FilterBuilder, HookMisuseError, ImportDocumentError, Input, Label, MONO_FONT_STACK, PROTOCOL_VERSION, PdfFetchError, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, SHAPE_FONT_OPTIONS, SHAPE_FONT_STACKS, ScrollArea, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Skeleton, TEXT_TYPES, Tabs, TabsContent, TabsList, TabsTrigger, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UI_FONT_ID, UI_FONT_STACK, UnhandledValueError, UnknownSlashCommandError, 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 };
860
+ export { Alert, AlertDescription, AlertTitle, BASELINE_CAPABILITIES, BRIDGE_ERROR_CODES, Badge, BareSelect, BlobNotFoundError, BridgeError, Button, CanvasPasteError, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, DEFAULT_EMBED_SANDBOX, DatabaseTable, DocBlocksUiError, DocHeader, DocblocksI18nProvider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ENUM_OPTION_COLOR_COLUMN, ENUM_OPTION_NAME_COLUMN, Editor, EditorErrorBoundary, EditorProvider, EditorProviderError, FORMAT_PALETTE, FilterBuilder, HookMisuseError, ImportDocumentError, Input, Label, MONO_FONT_STACK, PROTOCOL_VERSION, PdfFetchError, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, SHAPE_FONT_OPTIONS, SHAPE_FONT_STACKS, ScrollArea, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Skeleton, TEXT_TYPES, Tabs, TabsContent, TabsList, TabsTrigger, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UI_FONT_ID, UI_FONT_STACK, UnhandledValueError, UnknownSlashCommandError, 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 };
@@ -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-L0Ph4I89.mjs";
2
+ import { It as Skeleton, Nt as Eye, O as SegmentSelector, Pt as CodeXml, f as textOf, ht as AlertTitle, i as useEditorContext, jt as RotateCcw, mt as AlertDescription, o as childrenSlot, pt as Alert, rn as Button, s as CodeHeader, u as TextBlock, y as INLINE_CODE_CLASS } from "../Editor-DbW7iFPK.mjs";
3
3
  import { t as Maximize } from "../Maximize-BBHnCDWL.mjs";
4
4
  import { useEffect, useRef, useState } from "react";
5
5
  import { useTranslation } from "react-i18next";
@@ -1,4 +1,4 @@
1
- import { f as PdfPreviewProps } from "../index-QtG3mkFQ.mjs";
1
+ import { f as PdfPreviewProps } from "../index-sSq0oOSl.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
@@ -350,6 +350,9 @@
350
350
  .bottom-0 {
351
351
  bottom: 0px;
352
352
  }
353
+ .bottom-2 {
354
+ bottom: calc(var(--spacing) * 2);
355
+ }
353
356
  .bottom-4 {
354
357
  bottom: calc(var(--spacing) * 4);
355
358
  }
@@ -817,6 +820,9 @@
817
820
  .w-40 {
818
821
  width: calc(var(--spacing) * 40);
819
822
  }
823
+ .w-48 {
824
+ width: calc(var(--spacing) * 48);
825
+ }
820
826
  .w-52 {
821
827
  width: calc(var(--spacing) * 52);
822
828
  }
@@ -832,6 +838,9 @@
832
838
  .w-72 {
833
839
  width: calc(var(--spacing) * 72);
834
840
  }
841
+ .w-96 {
842
+ width: calc(var(--spacing) * 96);
843
+ }
835
844
  .w-110 {
836
845
  width: calc(var(--spacing) * 110);
837
846
  }
@@ -871,6 +880,9 @@
871
880
  .max-w-60 {
872
881
  max-width: calc(var(--spacing) * 60);
873
882
  }
883
+ .max-w-\[min\(28rem\,calc\(100\%-1rem\)\)\] {
884
+ max-width: min(28rem, calc(100% - 1rem));
885
+ }
874
886
  .max-w-full {
875
887
  max-width: 100%;
876
888
  }
@@ -1330,6 +1342,12 @@
1330
1342
  .border-current {
1331
1343
  border-color: currentcolor;
1332
1344
  }
1345
+ .border-destructive\/50 {
1346
+ border-color: var(--destructive);
1347
+ @supports (color: color-mix(in lab, red, red)) {
1348
+ border-color: color-mix(in oklab, var(--destructive) 50%, transparent);
1349
+ }
1350
+ }
1333
1351
  .border-input {
1334
1352
  border-color: var(--input);
1335
1353
  }
@@ -1387,6 +1405,9 @@
1387
1405
  .bg-\(--docblocks-code-background\) {
1388
1406
  background-color: var(--docblocks-code-background);
1389
1407
  }
1408
+ .bg-\(--docblocks-database-header-bg\) {
1409
+ background-color: var(--docblocks-database-header-bg);
1410
+ }
1390
1411
  .bg-\(--docblocks-divider-border-color\) {
1391
1412
  background-color: var(--docblocks-divider-border-color);
1392
1413
  }
@@ -1778,6 +1799,9 @@
1778
1799
  .text-balance {
1779
1800
  text-wrap: balance;
1780
1801
  }
1802
+ .text-pretty {
1803
+ text-wrap: pretty;
1804
+ }
1781
1805
  .wrap-break-word {
1782
1806
  overflow-wrap: break-word;
1783
1807
  }
@@ -1838,6 +1862,9 @@
1838
1862
  color: color-mix(in oklab, var(--foreground) 60%, transparent);
1839
1863
  }
1840
1864
  }
1865
+ .text-inherit {
1866
+ color: inherit;
1867
+ }
1841
1868
  .text-muted-foreground {
1842
1869
  color: var(--muted-foreground);
1843
1870
  }
@@ -1897,6 +1924,9 @@
1897
1924
  .opacity-30 {
1898
1925
  opacity: 30%;
1899
1926
  }
1927
+ .opacity-40 {
1928
+ opacity: 40%;
1929
+ }
1900
1930
  .opacity-50 {
1901
1931
  opacity: 50%;
1902
1932
  }
@@ -1972,6 +2002,10 @@
1972
2002
  outline-style: var(--tw-outline-style);
1973
2003
  outline-width: var(--docblocks-canvas-selection-border-width);
1974
2004
  }
2005
+ .outline-\(length\:--docblocks-database-paste-range-border-width\) {
2006
+ outline-style: var(--tw-outline-style);
2007
+ outline-width: var(--docblocks-database-paste-range-border-width);
2008
+ }
1975
2009
  .outline-offset-1 {
1976
2010
  outline-offset: 1px;
1977
2011
  }
@@ -1981,6 +2015,9 @@
1981
2015
  .outline-\(--docblocks-canvas-selection-border-color\) {
1982
2016
  outline-color: var(--docblocks-canvas-selection-border-color);
1983
2017
  }
2018
+ .outline-\(--docblocks-database-paste-range-border-color\) {
2019
+ outline-color: var(--docblocks-database-paste-range-border-color);
2020
+ }
1984
2021
  .blur {
1985
2022
  --tw-blur: blur(8px);
1986
2023
  filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
@@ -2354,6 +2391,14 @@
2354
2391
  .hover\:bg-accent:hover {
2355
2392
  background-color: var(--accent);
2356
2393
  }
2394
+ .hover\:bg-destructive\/10:hover {
2395
+ background-color: var(--destructive);
2396
+ }
2397
+ @supports (color: color-mix(in lab, red, red)) {
2398
+ .hover\:bg-destructive\/10:hover {
2399
+ background-color: color-mix(in oklab, var(--destructive) 10%, transparent);
2400
+ }
2401
+ }
2357
2402
  .hover\:bg-destructive\/90:hover {
2358
2403
  background-color: var(--destructive);
2359
2404
  }
@@ -2885,6 +2930,14 @@
2885
2930
  background-color: color-mix(in oklab, var(--accent) 50%, transparent);
2886
2931
  }
2887
2932
  }
2933
+ .dark\:hover\:bg-destructive\/20:is(.dark *):hover {
2934
+ background-color: var(--destructive);
2935
+ }
2936
+ @supports (color: color-mix(in lab, red, red)) {
2937
+ .dark\:hover\:bg-destructive\/20:is(.dark *):hover {
2938
+ background-color: color-mix(in oklab, var(--destructive) 20%, transparent);
2939
+ }
2940
+ }
2888
2941
  .dark\:hover\:bg-input\/50:is(.dark *):hover {
2889
2942
  background-color: var(--input);
2890
2943
  }
@@ -3836,8 +3889,14 @@
3836
3889
  column type stands the one height — the cell's trigger / the input fit
3837
3890
  the content box, the row never grows over its content). */
3838
3891
  --docblocks-database-row-height: 32px;
3892
+ /* The header row's sticky trailing rail (the add-column cell): the
3893
+ opaque stand of the header's translucent tint over the card, so the
3894
+ columns scrolling under it never show through. */
3895
+ --docblocks-database-header-bg: color-mix(in srgb, var(--muted, #f5f5f5) 40%, var(--card, #ffffff));
3839
3896
  /* The locally inserted row that stays visible outside the active filter. */
3840
3897
  --docblocks-database-pending-row-border-color: #d97706;
3898
+ --docblocks-database-paste-range-border-color: #16a34a;
3899
+ --docblocks-database-paste-range-border-width: 1px;
3841
3900
 
3842
3901
  /* Image. */
3843
3902
  --docblocks-image-radius: 0;
@@ -3934,7 +3993,9 @@
3934
3993
  --docblocks-table-border-color: var(--border, rgba(110, 118, 129, 0.65));
3935
3994
  --docblocks-table-drag-background: var(--card, #27272a);
3936
3995
  --docblocks-table-drag-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
3996
+ --docblocks-database-header-bg: color-mix(in srgb, var(--muted, #27272a) 40%, var(--card, #09090b));
3937
3997
  --docblocks-database-pending-row-border-color: #f59e0b;
3998
+ --docblocks-database-paste-range-border-color: #4ade80;
3938
3999
  --docblocks-selected-background: color-mix(in srgb, var(--accent, #388bfd) 15%, transparent);
3939
4000
 
3940
4001
  --docblocks-canvas-background: color-mix(in srgb, var(--muted, #6e7681) 15%, transparent);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docblocks-react-ui",
3
- "version": "0.27.0",
3
+ "version": "0.29.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.11.0",
39
+ "docblocks-core": "^0.12.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",