docblocks-react-ui 0.4.0 → 0.4.2

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.
@@ -767,6 +767,12 @@ interface DatabaseTableProps {
767
767
  view?: Partial<DatabaseTableView>;
768
768
  /** The view's change's hook (the persistence's stand; the patch = the changed's attrs only). */
769
769
  onViewChange?: (patch: Partial<DatabaseTableView>) => void;
770
+ /** The consumer's sizing / layout's classes over the root (the package's
771
+ * token's scope's anchor + the flex-column's stand): the width stands the
772
+ * consumer's layout (the grid's `w-full`'s parity), and a height-
773
+ * constrained root stands the grid's inner scroll (the unconstrained's
774
+ * stand is the content's height, as over the document's block). */
775
+ className?: string;
770
776
  }
771
777
  /**
772
778
  * The standalone's database table: the live grid over the bridge's table
@@ -777,9 +783,12 @@ interface DatabaseTableProps {
777
783
  * prop) + the consumer's persistence over the `onViewChange`'s patch
778
784
  * (one patch per change, as the block's `updateBlock` stand). The i18n's
779
785
  * scope stands self-contained (the package's instance — the same's stand
780
- * as the consumer-placed components).
786
+ * as the consumer-placed components). The sizing's stand is the
787
+ * consumer's: the `className` over the root (a height-constrained root
788
+ * stands the grid's inner scroll; the unconstrained's stand is the
789
+ * content's height).
781
790
  */
782
- declare function DatabaseTable({ bridge, tableId, readOnly, view, onViewChange }: DatabaseTableProps): import("react").JSX.Element;
791
+ declare function DatabaseTable({ bridge, tableId, readOnly, view, onViewChange, className }: DatabaseTableProps): import("react").JSX.Element;
783
792
  //#endregion
784
793
  //#region src/database/standalone/use-table-list.d.ts
785
794
  /**
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { n as BlockRendererMap, r as BlockRendererProps, t as BlockRenderer } from "./index-YJcgf8Hh.mjs";
2
- import { $ as ProtocolLimits, A as filterIsComplete, B as DatabaseBridge, C as DatabaseTableView, Ct as BlobSubtype, D as DatabaseTableRow, E as DatabaseTablePhase, F as BridgeTableDescription, G as IsoInstant, H as FilterConditionInput, I as BridgeValueInput, J as OperationStatus, K as MutationContext, L as CellMap, M as BatchOp, N as BridgeColumn, O as UseDatabaseTable, P as BridgeColumnAnnotation, Q as ProtocolDescriptor, R as CellValueParse, S as DatabaseTableProps, St as BlobStore, T as useDatabaseTable, Tt as createMemoryBlobStore, U as FilterInput, V as DomainEvent, W as Id, X as PageSnapshot, Y as PageQuery, Z as ProtocolCapability, _ as PresencePeer, _t as isBridgeError, a as EditorContextValue, at as SortInput, b as useTableList, bt as BlobMeta, c as EmbedSandboxPolicy, ct as SubscriptionStatus, d as PdfPreview, dt as TableEvent, et as QueryOperator, f as PdfPreviewProps, ft as TableRef, g as PresenceIdentity, gt as BridgeErrorCode, h as PresenceCrypto, ht as BridgeError, i as AccessLevel, it as RowWire, j as FilterBuilder, k as emptyFilter, l as MentionEntry, lt as TableDescription, m as SyncEmbedResolver, mt as BRIDGE_ERROR_CODES, n as DEFAULT_EMBED_SANDBOX, nt as Revision, o as EditorMode, ot as SubscriptionHandle, p as PresenceConfig, pt as TableSnapshot, q as MutationReceipt, r as EditorProvider, rt as RowPage, s as EditorProviderProps, st as SubscriptionObserver, t as useEditorContext, tt as QuerySemantics, u as MentionProvider, ut as TableEnvelopeBase, v as PresenceSharing, vt as isBridgeErrorCode, w as UseTableList, wt as blobSubtypeOf, x as DatabaseTable, xt as BlobRef, y as PresenceSharingMode, yt as toBridgeError, z as Column } from "./index-1dJBnGYv.mjs";
2
+ import { $ as ProtocolLimits, A as filterIsComplete, B as DatabaseBridge, C as DatabaseTableView, Ct as BlobSubtype, D as DatabaseTableRow, E as DatabaseTablePhase, F as BridgeTableDescription, G as IsoInstant, H as FilterConditionInput, I as BridgeValueInput, J as OperationStatus, K as MutationContext, L as CellMap, M as BatchOp, N as BridgeColumn, O as UseDatabaseTable, P as BridgeColumnAnnotation, Q as ProtocolDescriptor, R as CellValueParse, S as DatabaseTableProps, St as BlobStore, T as useDatabaseTable, Tt as createMemoryBlobStore, U as FilterInput, V as DomainEvent, W as Id, X as PageSnapshot, Y as PageQuery, Z as ProtocolCapability, _ as PresencePeer, _t as isBridgeError, a as EditorContextValue, at as SortInput, b as useTableList, bt as BlobMeta, c as EmbedSandboxPolicy, ct as SubscriptionStatus, d as PdfPreview, dt as TableEvent, et as QueryOperator, f as PdfPreviewProps, ft as TableRef, g as PresenceIdentity, gt as BridgeErrorCode, h as PresenceCrypto, ht as BridgeError, i as AccessLevel, it as RowWire, j as FilterBuilder, k as emptyFilter, l as MentionEntry, lt as TableDescription, m as SyncEmbedResolver, mt as BRIDGE_ERROR_CODES, n as DEFAULT_EMBED_SANDBOX, nt as Revision, o as EditorMode, ot as SubscriptionHandle, p as PresenceConfig, pt as TableSnapshot, q as MutationReceipt, r as EditorProvider, rt as RowPage, s as EditorProviderProps, st as SubscriptionObserver, t as useEditorContext, tt as QuerySemantics, u as MentionProvider, ut as TableEnvelopeBase, v as PresenceSharing, vt as isBridgeErrorCode, w as UseTableList, wt as blobSubtypeOf, x as DatabaseTable, xt as BlobRef, y as PresenceSharingMode, yt as toBridgeError, z as Column } from "./index-BQRTt8x2.mjs";
3
3
  import * as React from "react";
4
4
  import { ComponentType, ReactNode } from "react";
5
5
  import { Block, BlockId, BlockType, Doc, DocMeta, PresenceState, Selection, SelectionView, SyncEmbedRef, TextRun } from "docblocks-core";
@@ -294,7 +294,7 @@ declare function AlertDescription({ className, ...props }: React.ComponentProps<
294
294
  //#endregion
295
295
  //#region src/shared/ui/Badge.d.ts
296
296
  declare const badgeVariants: (props?: ({
297
- variant?: "default" | "destructive" | "outline" | "secondary" | "custom" | null | undefined;
297
+ variant?: "default" | "destructive" | "custom" | "secondary" | "outline" | null | undefined;
298
298
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
299
299
  declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
300
300
  asChild?: boolean;
@@ -305,7 +305,7 @@ declare function BareSelect({ className, children, ...props }: React.ComponentPr
305
305
  //#endregion
306
306
  //#region src/shared/ui/Button.d.ts
307
307
  declare const buttonVariants: (props?: ({
308
- variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
308
+ variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
309
309
  size?: "default" | "icon" | "sm" | "lg" | "xl" | null | undefined;
310
310
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
311
311
  declare function Button({ className, variant, size, asChild, type, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as PopoverHeader, A as SelectTrigger, At as isBridgeErrorCode, B as DropdownMenuRadioGroup, Bt as useMeta, C as SelectContent, Ct as BASELINE_CAPABILITIES, D as SelectScrollDownButton, Dt as BRIDGE_ERROR_CODES, E as SelectLabel, Et as validateProtocolDescriptor, F as DropdownMenuContent, Ft as columnAnnotation, G as DropdownMenuSubContent, Gt as useText, H as DropdownMenuSeparator, Ht as usePresenceSharing, I as DropdownMenuGroup, It as ScrollArea, J as Separator, Jt as blobSubtypeOf, K as DropdownMenuSubTrigger, L as DropdownMenuItem, Lt as Input, M as Label, Mt as conditionMatches, N as DropdownMenu, Nt as parseCellValue, O as SelectScrollUpButton, Ot as BridgeError, P as DropdownMenuCheckboxItem, Pt as TEXT_TYPES, Q as PopoverDescription, R as DropdownMenuLabel, Rt as useBlock, S as Select, St as AlertTitle, T as SelectItem, Tt as isDatabaseBridge, U as DropdownMenuShortcut, Ut as useSelection, V as DropdownMenuRadioItem, Vt as usePresence, W as DropdownMenuSub, Wt as useSelectionView, X as PopoverAnchor, Y as Popover, Yt as createMemoryBlobStore, Z as PopoverContent, _ as FilterBuilder, _t as BareSelect, a as SHAPE_FONT_STACKS, at as CardAction, b as Skeleton, bt as Alert, ct as CardFooter, d as useEditorContext, dt as Pen, et as PopoverTitle, f as DEFAULT_EMBED_SANDBOX, ft as Eye, g as newMutationContext, gt as buttonVariants, h as cellValueEqual, ht as Button, i as SHAPE_FONT_OPTIONS, it as Card, j as SelectValue, jt as toBridgeError, k as SelectSeparator, kt as isBridgeError, l as markToggleAction, lt as CardHeader, m as useDatabaseTable, mt as BookOpen, nt as DocblocksI18nProvider, o as FORMAT_PALETTE, ot as CardContent, p as GridBody, q as DropdownMenuTrigger, qt as renderRuns, rt as Checkbox, st as CardDescription, t as Editor, tt as PopoverTrigger, u as EditorProvider, ut as CardTitle, v as emptyFilter, vt as Badge, w as SelectGroup, wt as PROTOCOL_VERSION, x as SegmentSelector, xt as AlertDescription, y as filterIsComplete, yt as badgeVariants, z as DropdownMenuPortal, zt as useDoc } from "./Editor-BgG_An_T.mjs";
1
+ import { $ as PopoverHeader, A as SelectTrigger, At as isBridgeErrorCode, B as DropdownMenuRadioGroup, Bt as useMeta, C as SelectContent, Ct as BASELINE_CAPABILITIES, D as SelectScrollDownButton, Dt as BRIDGE_ERROR_CODES, E as SelectLabel, Et as validateProtocolDescriptor, F as DropdownMenuContent, Ft as columnAnnotation, G as DropdownMenuSubContent, Gt as useText, H as DropdownMenuSeparator, Ht as usePresenceSharing, I as DropdownMenuGroup, It as ScrollArea, J as Separator, Jt as blobSubtypeOf, K as DropdownMenuSubTrigger, L as DropdownMenuItem, Lt as Input, M as Label, Mt as conditionMatches, N as DropdownMenu, Nt as parseCellValue, O as SelectScrollUpButton, Ot as BridgeError, P as DropdownMenuCheckboxItem, Pt as TEXT_TYPES, Q as PopoverDescription, R as DropdownMenuLabel, Rt as useBlock, S as Select, St as AlertTitle, T as SelectItem, Tt as isDatabaseBridge, U as DropdownMenuShortcut, Ut as useSelection, V as DropdownMenuRadioItem, Vt as usePresence, W as DropdownMenuSub, Wt as useSelectionView, X as PopoverAnchor, Y as Popover, Yt as createMemoryBlobStore, Z as PopoverContent, _ as FilterBuilder, _t as BareSelect, a as SHAPE_FONT_STACKS, at as CardAction, b as Skeleton, bt as Alert, ct as CardFooter, d as useEditorContext, dt as Pen, et as PopoverTitle, f as DEFAULT_EMBED_SANDBOX, ft as Eye, g as newMutationContext, gt as buttonVariants, h as cellValueEqual, ht as Button, i as SHAPE_FONT_OPTIONS, it as Card, j as SelectValue, jt as toBridgeError, k as SelectSeparator, kt as isBridgeError, l as markToggleAction, lt as CardHeader, m as useDatabaseTable, mt as BookOpen, nt as DocblocksI18nProvider, ot as CardContent, p as GridBody, q as DropdownMenuTrigger, qt as renderRuns, rt as Checkbox, s as FORMAT_PALETTE, st as CardDescription, t as Editor, tt as PopoverTrigger, u as EditorProvider, ut as CardTitle, v as emptyFilter, vt as Badge, w as SelectGroup, wt as PROTOCOL_VERSION, x as SegmentSelector, xt as AlertDescription, y as filterIsComplete, yt as badgeVariants, z as DropdownMenuPortal, zt as useDoc } from "./Editor-7TzmKd9z.mjs";
2
2
  import { d as cn, l as preventDefault } from "./constants-BaAj3jDA.mjs";
3
3
  import { useCallback, useEffect, useRef, useState } from "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -392,9 +392,12 @@ const EMPTY_VIEW = {};
392
392
  * prop) + the consumer's persistence over the `onViewChange`'s patch
393
393
  * (one patch per change, as the block's `updateBlock` stand). The i18n's
394
394
  * scope stands self-contained (the package's instance — the same's stand
395
- * as the consumer-placed components).
395
+ * as the consumer-placed components). The sizing's stand is the
396
+ * consumer's: the `className` over the root (a height-constrained root
397
+ * stands the grid's inner scroll; the unconstrained's stand is the
398
+ * content's height).
396
399
  */
397
- function DatabaseTable({ bridge, tableId, readOnly = false, view, onViewChange }) {
400
+ function DatabaseTable({ bridge, tableId, readOnly = false, view, onViewChange, className }) {
398
401
  const [viewState, setViewState] = useState(view ?? EMPTY_VIEW);
399
402
  const viewRef = useRef(viewState);
400
403
  viewRef.current = viewState;
@@ -409,6 +412,7 @@ function DatabaseTable({ bridge, tableId, readOnly = false, view, onViewChange }
409
412
  return /* @__PURE__ */ jsx(DocblocksI18nProvider, { children: /* @__PURE__ */ jsx("div", {
410
413
  "data-slot": "docblocks/editor",
411
414
  "data-readonly": readOnly ? "true" : void 0,
415
+ className: cn("flex flex-col", className),
412
416
  children: /* @__PURE__ */ jsx(GridBody, {
413
417
  bridge,
414
418
  tableId,
@@ -1,4 +1,4 @@
1
- import { Kt as INLINE_CODE_CLASS, St as AlertTitle, b as Skeleton, bt as Alert, c as textOf, d as useEditorContext, ft as Eye, n as childrenSlot, pt as CodeXml, r as CodeHeader, s as TextBlock, x as SegmentSelector, xt as AlertDescription } from "../Editor-BgG_An_T.mjs";
1
+ import { Kt as INLINE_CODE_CLASS, St as AlertTitle, b as Skeleton, bt as Alert, c as textOf, d as useEditorContext, ft as Eye, n as childrenSlot, o as TextBlock, pt as CodeXml, r as CodeHeader, x as SegmentSelector, xt as AlertDescription } from "../Editor-7TzmKd9z.mjs";
2
2
  import { r as TriangleAlert } from "../constants-BaAj3jDA.mjs";
3
3
  import { t as LoaderCircle } from "../LoaderCircle-AGVFE4IP.mjs";
4
4
  import { useEffect, useRef, useState } from "react";
@@ -1,4 +1,4 @@
1
- import { f as PdfPreviewProps } from "../index-1dJBnGYv.mjs";
1
+ import { f as PdfPreviewProps } from "../index-BQRTt8x2.mjs";
2
2
  //#region src/pdf/PdfFirstPage.d.ts
3
3
  declare function PdfFirstPage({ id, url, name }: PdfPreviewProps): import("react").JSX.Element;
4
4
  //#endregion
package/dist/styles.css CHANGED
@@ -597,6 +597,10 @@
597
597
  width: auto;
598
598
  height: auto;
599
599
  }
600
+ .size-full {
601
+ width: 100%;
602
+ height: 100%;
603
+ }
600
604
  .h-\(--cell-size\) {
601
605
  height: var(--cell-size);
602
606
  }
@@ -723,6 +727,9 @@
723
727
  .w-7 {
724
728
  width: calc(var(--spacing) * 7);
725
729
  }
730
+ .w-8 {
731
+ width: calc(var(--spacing) * 8);
732
+ }
726
733
  .w-10 {
727
734
  width: calc(var(--spacing) * 10);
728
735
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docblocks-react-ui",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "React rendering + editing layer for docblocks: hooks, block renderers, caret/selection, keyboard, clipboard.",
5
5
  "type": "module",
6
6
  "license": "MIT",