docblocks-react-ui 0.29.0 → 0.29.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.
package/dist/index.d.mts CHANGED
@@ -1,20 +1,26 @@
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 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";
1
+ /**
2
+ * docblocks-react-ui — public entry.
3
+ *
4
+ * React rendering layer for docblocks: the per-instance provider and store
5
+ * projection, hooks, and block renderers. Builds strictly on the public
6
+ * API of docblocks-core — direct yjs imports are forbidden (ESLint gate).
7
+ */
8
+ 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-BsP8XWdE.mjs";
3
9
  import * as React$1 from "react";
4
- import { Component, ComponentType, ErrorInfo, ReactNode } from "react";
5
- import { VariantProps } from "class-variance-authority";
6
- import { ClassValue } from "clsx";
7
- import { AttributeType, Block, BlockId, BlockType, Doc, DocMeta, MentionKind, MentionMark, PresenceState, Selection, SelectionView, SyncEmbedRef, TextRun, TypedAttributeValue } from "docblocks-core";
10
+ import { Component, ErrorInfo, ReactNode } from "react";
11
+ 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-DxRfzb-L.mjs";
12
+ import { AttributeType, Block, BlockId, Doc, DocMeta, MentionKind, MentionMark, PresenceState, Selection, SelectionView, SyncEmbedRef, TextRun, TypedAttributeValue } from "docblocks-core";
8
13
  import "i18next";
9
- import { DayPicker } from "react-day-picker";
14
+ import { VariantProps } from "class-variance-authority";
15
+ import "react-day-picker";
10
16
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
17
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
11
18
  import * as PopoverPrimitive from "@radix-ui/react-popover";
12
19
  import * as SeparatorPrimitive from "@radix-ui/react-separator";
13
- import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
14
20
  import * as SelectPrimitive from "@radix-ui/react-select";
15
21
  import * as TabsPrimitive from "@radix-ui/react-tabs";
16
22
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
17
- //#region src/canvas/text-fonts.d.ts
23
+ import { ClassValue } from "clsx";
18
24
  /**
19
25
  * The shape text's font options: the
20
26
  * self-hosted set (the package ships the woff2 in fonts/ + the
@@ -54,8 +60,6 @@ declare const SHAPE_FONT_OPTIONS: readonly [{
54
60
  /** The name → the stack map (the absent / an unrecognized name falls to
55
61
  * the raw name — a consumer's own loaded font is addressable by name). */
56
62
  declare const SHAPE_FONT_STACKS: Record<string, string>;
57
- //#endregion
58
- //#region src/Editor.d.ts
59
63
  /**
60
64
  * The document's view mode: the page flow (the root's children in reading
61
65
  * order) or the canvas (the page as a miniature rectangle plus the surface
@@ -89,8 +93,6 @@ interface EditorProps {
89
93
  * palette.
90
94
  */
91
95
  declare function Editor({ view, formatPalette }: EditorProps): import("react").JSX.Element;
92
- //#endregion
93
- //#region src/EditorErrorBoundary.d.ts
94
96
  interface EditorErrorBoundaryProps {
95
97
  children: ReactNode;
96
98
  /** The consumer's replacement for the built-in note. */
@@ -112,8 +114,6 @@ declare class EditorErrorBoundary extends Component<EditorErrorBoundaryProps, Ed
112
114
  componentDidCatch(error: unknown, info: ErrorInfo): void;
113
115
  render(): ReactNode;
114
116
  }
115
- //#endregion
116
- //#region src/database/bridge/annotation.d.ts
117
117
  /** The standard PostgreSQL type names per operator / input group. The contract
118
118
  * is type-agnostic — this is the package's DEFAULT catalog; a non-standard
119
119
  * type name falls back to the minimal `is` / `is not` + the text input, and
@@ -128,8 +128,6 @@ declare const TEXT_TYPES: Set<string>;
128
128
  * exactly the declared operators.
129
129
  */
130
130
  declare function columnAnnotation(column: BridgeColumn): BridgeColumnAnnotation;
131
- //#endregion
132
- //#region src/database/bridge/filter.d.ts
133
131
  /**
134
132
  * Validates a raw (string) value against the value input kind before it is
135
133
  * written to the row (the number must parse, the date / datetime must be a
@@ -140,8 +138,6 @@ declare function columnAnnotation(column: BridgeColumn): BridgeColumnAnnotation;
140
138
  declare function parseCellValue(kind: BridgeValueInput, raw: string): CellValueParse;
141
139
  /** Evaluates one filter condition against a cell value. */
142
140
  declare function conditionMatches(op: string, value: unknown, expected: unknown): boolean;
143
- //#endregion
144
- //#region src/database/bridge/enum.d.ts
145
141
  /**
146
142
  * The enum option's system table's schema (the option IS a row of the
147
143
  * table — the row's pk stands the option's identity, so the rename / the
@@ -153,8 +149,6 @@ declare function conditionMatches(op: string, value: unknown, expected: unknown)
153
149
  */
154
150
  declare const ENUM_OPTION_NAME_COLUMN = "name";
155
151
  declare const ENUM_OPTION_COLOR_COLUMN = "color";
156
- //#endregion
157
- //#region src/database/bridge/protocol.d.ts
158
152
  /** The protocol's version. */
159
153
  declare const PROTOCOL_VERSION = 2;
160
154
  /** The capabilities every conformant bridge declares (the baseline:
@@ -171,8 +165,6 @@ declare function isDatabaseBridge(candidate: unknown): candidate is DatabaseBrid
171
165
  * capability rejects with `protocol_mismatch`.
172
166
  */
173
167
  declare function validateProtocolDescriptor(descriptor: ProtocolDescriptor): Set<ProtocolCapability>;
174
- //#endregion
175
- //#region src/DocHeaderAvatar.d.ts
176
168
  /** The content replacement's context: the standing avatar (`null` — none)
177
169
  * and the interaction's stand (`false` over the read-only modes — the
178
170
  * picker is off and the content is the consumer's display-only view). */
@@ -182,8 +174,6 @@ interface DocHeaderAvatarContentContext {
182
174
  /** `false` over the read-only modes: the slot's content is display-only. */
183
175
  editable: boolean;
184
176
  }
185
- //#endregion
186
- //#region src/DocHeader.d.ts
187
177
  /** The header's props (the consumer's state: the doc's stand, the view and
188
178
  * the mode's switchers — the consumer owns the view / the mode's state). */
189
179
  interface DocHeaderProps {
@@ -210,8 +200,6 @@ interface DocHeaderProps {
210
200
  * the same instance nested — the provider is a plain context, the render
211
201
  * is unchanged. */
212
202
  declare function DocHeader(props: DocHeaderProps): import("react").JSX.Element;
213
- //#endregion
214
- //#region src/i18n/provider.d.ts
215
203
  /** The provider's props (the optional controlled locale + the children's i18n scope). */
216
204
  interface DocblocksI18nProviderProps {
217
205
  /** The consumer's resolved locale (the SSR's parity: the server and the client pass the same value, so both renders take the same language from the first render — independent of the `<html lang>` attribute). */
@@ -237,8 +225,6 @@ interface DocblocksI18nProviderProps {
237
225
  * driven by the `<html lang>` attribute and its runtime flip.
238
226
  */
239
227
  declare function DocblocksI18nProvider({ locale, children }: DocblocksI18nProviderProps): import("react").JSX.Element;
240
- //#endregion
241
- //#region src/shared/errors.d.ts
242
228
  /**
243
229
  * Typed react-ui errors.
244
230
  *
@@ -284,8 +270,6 @@ declare class UnhandledValueError extends DocBlocksUiError {
284
270
  declare class HookMisuseError extends DocBlocksUiError {
285
271
  constructor(message: string);
286
272
  }
287
- //#endregion
288
- //#region src/hooks.d.ts
289
273
  /** The headless document owned by the nearest EditorProvider. */
290
274
  declare function useDoc(): Doc;
291
275
  /**
@@ -323,12 +307,8 @@ declare function useMeta(): DocMeta;
323
307
  * unrelated state.
324
308
  */
325
309
  declare function useSelectionView(): SelectionView | null;
326
- //#endregion
327
- //#region src/editing/keyboard/models.d.ts
328
310
  /** The marks the format shortcuts and the mark toolbar toggle. */
329
311
  type FormatMark = "bold" | "italic" | "strike" | "underline" | "code";
330
- //#endregion
331
- //#region src/editing/keyboard/utils.d.ts
332
312
  /**
333
313
  * The toggle decision for one mark over [from, to): "unset" when every run
334
314
  * overlapping the range already carries the mark, "set" otherwise. A
@@ -336,14 +316,10 @@ type FormatMark = "bold" | "italic" | "strike" | "underline" | "code";
336
316
  * snapshot via `getBlock`; the caller issues the command.
337
317
  */
338
318
  declare function markToggleAction(doc: Doc, blockId: BlockId, from: number, to: number, mark: FormatMark): "set" | "unset";
339
- //#endregion
340
- //#region src/editing/format-toolbar/constants.d.ts
341
319
  /** The default format palette: the shared palette's seven pastel theme
342
320
  * tokens + the theme's own background token (a consumer can pass its own
343
321
  * through the editor's `formatPalette` prop — a `string[]` of hex or var). */
344
322
  declare const FORMAT_PALETTE: readonly string[];
345
- //#endregion
346
- //#region src/attributes/cover-tint.d.ts
347
323
  /**
348
324
  * The stored cover's average color (the frame's tint's / the consumer's
349
325
  * glow's data's source): the cover's resolved url drawn into the sample's
@@ -354,8 +330,6 @@ declare const FORMAT_PALETTE: readonly string[];
354
330
  * object URL (the library's own read).
355
331
  */
356
332
  declare function useCoverAverageColor(): string | null;
357
- //#endregion
358
- //#region src/editing/import.d.ts
359
333
  /** The import payload kind (the parser dispatch). */
360
334
  type ImportKind = "markdown" | "html";
361
335
  /** The document is not fresh: the import requires the empty root. */
@@ -369,12 +343,8 @@ declare class ImportDocumentError extends Error {
369
343
  * `ImportDocumentError` when the root already has children.
370
344
  */
371
345
  declare function importDocument(doc: Doc, source: string, kind: ImportKind): void;
372
- //#endregion
373
- //#region src/text/runs-dom.d.ts
374
346
  /** A mention chip's label resolver (the consumer's live label over the target's id). */
375
347
  type MentionLabelResolver = (kind: MentionKind, id: string) => string | null;
376
- //#endregion
377
- //#region src/text/runs.d.ts
378
348
  /**
379
349
  * Render inline text runs with their marks (lenient reader contract:
380
350
  * unknown marks are ignored and the text is kept). The link's href is
@@ -385,8 +355,6 @@ type MentionLabelResolver = (kind: MentionKind, id: string) => string | null;
385
355
  * insertion-time label (the run's text) otherwise.
386
356
  */
387
357
  declare function renderRuns(runs: TextRun[], resolveMentionLabel?: MentionLabelResolver): ReactNode;
388
- //#endregion
389
- //#region src/fonts.d.ts
390
358
  /**
391
359
  * The package's font subsystem — the single place for the package's fonts.
392
360
  *
@@ -429,36 +397,26 @@ declare const UI_FONT_STACK = "'Inter', system-ui, -apple-system, 'Segoe UI', sa
429
397
  * `--docblocks-mono-font-family` token's default.
430
398
  */
431
399
  declare const MONO_FONT_STACK = "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
432
- //#endregion
433
- //#region src/shared/ui/Alert.d.ts
434
400
  declare const alertVariants: (props?: ({
435
401
  variant?: "default" | "destructive" | null | undefined;
436
402
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
437
403
  declare function Alert({ className, variant, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof alertVariants>): React$1.JSX.Element;
438
404
  declare function AlertTitle({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
439
405
  declare function AlertDescription({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
440
- //#endregion
441
- //#region src/shared/ui/Badge.d.ts
442
406
  declare const badgeVariants: (props?: ({
443
- variant?: "default" | "destructive" | "custom" | "secondary" | "outline" | null | undefined;
407
+ variant?: "default" | "destructive" | "outline" | "secondary" | "custom" | null | undefined;
444
408
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
445
409
  declare function Badge({ className, variant, asChild, ...props }: React$1.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
446
410
  asChild?: boolean;
447
411
  }): React$1.JSX.Element;
448
- //#endregion
449
- //#region src/shared/ui/BareSelect.d.ts
450
412
  declare function BareSelect({ className, children, ...props }: React$1.ComponentProps<"select">): React$1.JSX.Element;
451
- //#endregion
452
- //#region src/shared/ui/Button.d.ts
453
413
  declare const buttonVariants: (props?: ({
454
- variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
455
- size?: "default" | "icon" | "sm" | "lg" | "xl" | null | undefined;
414
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
415
+ size?: "default" | "sm" | "lg" | "icon" | "xl" | null | undefined;
456
416
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
457
417
  declare function Button({ className, variant, size, asChild, type, ...props }: React$1.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
458
418
  asChild?: boolean;
459
419
  }): React$1.JSX.Element;
460
- //#endregion
461
- //#region src/shared/ui/Card.d.ts
462
420
  declare function Card({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
463
421
  declare function CardHeader({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
464
422
  declare function CardTitle({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
@@ -466,11 +424,7 @@ declare function CardDescription({ className, ...props }: React$1.ComponentProps
466
424
  declare function CardAction({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
467
425
  declare function CardContent({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
468
426
  declare function CardFooter({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
469
- //#endregion
470
- //#region src/shared/ui/Checkbox.d.ts
471
427
  declare function Checkbox({ className, ...props }: React$1.ComponentProps<typeof CheckboxPrimitive.Root>): React$1.JSX.Element;
472
- //#endregion
473
- //#region src/shared/ui/DropdownMenu.d.ts
474
428
  declare function DropdownMenu({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Root>): React$1.JSX.Element;
475
429
  declare function DropdownMenuPortal({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Portal>): React$1.JSX.Element;
476
430
  declare function DropdownMenuTrigger({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): React$1.JSX.Element;
@@ -493,8 +447,6 @@ declare function DropdownMenuSubTrigger({ className, inset, children, ...props }
493
447
  inset?: boolean;
494
448
  }): React$1.JSX.Element;
495
449
  declare function DropdownMenuSubContent({ className, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): React$1.JSX.Element;
496
- //#endregion
497
- //#region src/shared/ui/Input.d.ts
498
450
  declare const inputVariants: (props?: ({
499
451
  size?: "default" | "sm" | null | undefined;
500
452
  variant?: "default" | "inline" | null | undefined;
@@ -508,11 +460,7 @@ declare const inputVariants: (props?: ({
508
460
  */
509
461
  type InputProps = Omit<React$1.ComponentProps<"input">, "size"> & VariantProps<typeof inputVariants>;
510
462
  declare function Input({ className, size, variant, type, ...props }: InputProps): React$1.JSX.Element;
511
- //#endregion
512
- //#region src/shared/ui/Label.d.ts
513
463
  declare function Label({ className, ...props }: React$1.ComponentProps<"label">): React$1.JSX.Element;
514
- //#endregion
515
- //#region src/shared/ui/Popover.d.ts
516
464
  declare function Popover({ ...props }: React$1.ComponentProps<typeof PopoverPrimitive.Root>): React$1.JSX.Element;
517
465
  declare function PopoverTrigger({ ...props }: React$1.ComponentProps<typeof PopoverPrimitive.Trigger>): React$1.JSX.Element;
518
466
  declare function PopoverContent({ className, align, sideOffset, ...props }: React$1.ComponentProps<typeof PopoverPrimitive.Content>): React$1.JSX.Element;
@@ -520,11 +468,7 @@ declare function PopoverAnchor({ ...props }: React$1.ComponentProps<typeof Popov
520
468
  declare function PopoverHeader({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
521
469
  declare function PopoverTitle({ className, ...props }: React$1.ComponentProps<"h2">): React$1.JSX.Element;
522
470
  declare function PopoverDescription({ className, ...props }: React$1.ComponentProps<"p">): React$1.JSX.Element;
523
- //#endregion
524
- //#region src/shared/ui/Separator.d.ts
525
471
  declare function Separator({ className, orientation, decorative, ...props }: React$1.ComponentProps<typeof SeparatorPrimitive.Root>): React$1.JSX.Element;
526
- //#endregion
527
- //#region src/shared/ui/Select.d.ts
528
472
  declare function Select({ ...props }: React$1.ComponentProps<typeof SelectPrimitive.Root>): React$1.JSX.Element;
529
473
  declare function SelectGroup({ ...props }: React$1.ComponentProps<typeof SelectPrimitive.Group>): React$1.JSX.Element;
530
474
  declare function SelectValue({ ...props }: React$1.ComponentProps<typeof SelectPrimitive.Value>): React$1.JSX.Element;
@@ -540,8 +484,6 @@ declare function SelectItem({ className, children, ...props }: React$1.Component
540
484
  declare function SelectSeparator({ className, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Separator>): React$1.JSX.Element;
541
485
  declare function SelectScrollUpButton({ className, ...props }: React$1.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): React$1.JSX.Element;
542
486
  declare function SelectScrollDownButton({ className, ...props }: React$1.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): React$1.JSX.Element;
543
- //#endregion
544
- //#region src/shared/ui/ScrollArea.d.ts
545
487
  /**
546
488
  * The thin-scrollbar scroll container: the native scrollbar styled to the
547
489
  * theme's border color (`scrollbar-width: thin` + `scrollbar-color`), so a
@@ -556,11 +498,7 @@ declare function SelectScrollDownButton({ className, ...props }: React$1.Compone
556
498
  declare function ScrollArea({ className, ref, ...props }: React$1.ComponentProps<"div"> & {
557
499
  ref?: React$1.Ref<HTMLDivElement>;
558
500
  }): React$1.JSX.Element;
559
- //#endregion
560
- //#region src/shared/ui/Skeleton.d.ts
561
501
  declare function Skeleton({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
562
- //#endregion
563
- //#region src/shared/ui/Tabs.d.ts
564
502
  /**
565
503
  * The tabs primitive (Radix): a root with a list of triggers and the
566
504
  * optional content panels. The root is controlled through `value` /
@@ -572,19 +510,14 @@ declare function Skeleton({ className, ...props }: React$1.ComponentProps<"div">
572
510
  */
573
511
  declare function Tabs({ className, orientation, ...props }: React$1.ComponentProps<typeof TabsPrimitive.Root>): React$1.JSX.Element;
574
512
  declare const tabsListVariants: (props?: ({
575
- variant?: "line" | "default" | null | undefined;
513
+ variant?: "default" | "line" | null | undefined;
576
514
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
577
515
  declare function TabsList({ className, variant, ...props }: React$1.ComponentProps<typeof TabsPrimitive.List> & VariantProps<typeof tabsListVariants>): React$1.JSX.Element;
578
516
  declare function TabsTrigger({ className, ...props }: React$1.ComponentProps<typeof TabsPrimitive.Trigger>): React$1.JSX.Element;
579
517
  declare function TabsContent({ className, ...props }: React$1.ComponentProps<typeof TabsPrimitive.Content>): React$1.JSX.Element;
580
- //#endregion
581
- //#region src/shared/ui/Tooltip.d.ts
582
518
  declare function TooltipProvider({ delayDuration, ...props }: React$1.ComponentProps<typeof TooltipPrimitive.Provider>): React$1.JSX.Element;
583
519
  declare function Tooltip({ ...props }: React$1.ComponentProps<typeof TooltipPrimitive.Root>): React$1.JSX.Element;
584
520
  declare function TooltipTrigger({ ...props }: React$1.ComponentProps<typeof TooltipPrimitive.Trigger>): React$1.JSX.Element;
585
521
  declare function TooltipContent({ className, sideOffset, children, ...props }: React$1.ComponentProps<typeof TooltipPrimitive.Content>): React$1.JSX.Element;
586
- //#endregion
587
- //#region src/shared/ui/cn.d.ts
588
522
  declare function cn(...inputs: ClassValue[]): string;
589
- //#endregion
590
523
  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,12 +1,12 @@
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 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
- import { useCallback, useEffect, useRef, useState } from "react";
1
+ 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-y3dFOZE4.mjs";
4
2
  import { useTranslation } from "react-i18next";
5
- import { cva } from "class-variance-authority";
3
+ import { useCallback, useEffect, useRef, useState } from "react";
4
+ 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-CBPODzZc.mjs";
6
5
  import { jsx, jsxs } from "react/jsx-runtime";
7
6
  import * as TabsPrimitive from "@radix-ui/react-tabs";
7
+ import { cva } from "class-variance-authority";
8
8
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
9
- //#region src/shared/ui/icons/Network.tsx
9
+ // src/shared/ui/icons/Network.tsx
10
10
  /** The canvas mode's icon (the central node and its peers). */
11
11
  function Network(props) {
12
12
  return /* @__PURE__ */ jsxs("svg", {
@@ -47,8 +47,7 @@ function Network(props) {
47
47
  ]
48
48
  });
49
49
  }
50
- //#endregion
51
- //#region src/shared/ui/icons/SquareText.tsx
50
+ // src/shared/ui/icons/SquareText.tsx
52
51
  /** The page mode's icon (a rounded page with text lines). */
53
52
  function SquareText(props) {
54
53
  return /* @__PURE__ */ jsxs("svg", {
@@ -77,8 +76,7 @@ function SquareText(props) {
77
76
  ]
78
77
  });
79
78
  }
80
- //#endregion
81
- //#region src/shared/ui/BareSelect.tsx
79
+ // src/shared/ui/BareSelect.tsx
82
80
  function BareSelect({ className, children, ...props }) {
83
81
  return /* @__PURE__ */ jsx("select", {
84
82
  "data-slot": "select-bare",
@@ -87,8 +85,7 @@ function BareSelect({ className, children, ...props }) {
87
85
  children
88
86
  });
89
87
  }
90
- //#endregion
91
- //#region src/shared/ui/emoji-catalog.ts
88
+ // src/shared/ui/emoji-catalog.ts
92
89
  const AVATAR_EMOJI = [
93
90
  {
94
91
  emoji: "🦊",
@@ -211,8 +208,7 @@ const AVATAR_EMOJI = [
211
208
  label: "Trophy"
212
209
  }
213
210
  ];
214
- //#endregion
215
- //#region src/shared/ui/EmojiPicker.tsx
211
+ // src/shared/ui/EmojiPicker.tsx
216
212
  /**
217
213
  * The avatar emoji picker (the document avatar's popover content): a grid of
218
214
  * the curated catalog's emoji over a clear option. Presentational — the pick
@@ -266,8 +262,7 @@ function EmojiPickerInner({ selected, onPick, onClear }) {
266
262
  })]
267
263
  });
268
264
  }
269
- //#endregion
270
- //#region src/shared/ui/Tabs.tsx
265
+ // src/shared/ui/Tabs.tsx
271
266
  /**
272
267
  * The tabs primitive (Radix): a root with a list of triggers and the
273
268
  * optional content panels. The root is controlled through `value` /
@@ -351,8 +346,7 @@ function TabsContent({ className, ...props }) {
351
346
  ...props
352
347
  });
353
348
  }
354
- //#endregion
355
- //#region src/shared/ui/Tooltip.tsx
349
+ // src/shared/ui/Tooltip.tsx
356
350
  function TooltipProvider({ delayDuration = 0, ...props }) {
357
351
  return /* @__PURE__ */ jsx(TooltipPrimitive.Provider, {
358
352
  "data-slot": "tooltip-provider",
@@ -389,8 +383,7 @@ function TooltipContent({ className, sideOffset = 0, children, ...props }) {
389
383
  children: [children, /* @__PURE__ */ jsx(TooltipPrimitive.Arrow, { className: "z-modal size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs bg-primary fill-primary" })]
390
384
  }) });
391
385
  }
392
- //#endregion
393
- //#region src/database/standalone/DatabaseTable.tsx
386
+ // src/database/standalone/DatabaseTable.tsx
394
387
  /** The stable absent-seed's stand (the `view` prop's absent stand). */
395
388
  const EMPTY_VIEW = {};
396
389
  /**
@@ -461,8 +454,7 @@ function DatabaseTable({ bridge, tableId, readOnly = false, view, onViewChange,
461
454
  })
462
455
  }) });
463
456
  }
464
- //#endregion
465
- //#region src/database/standalone/use-table-list.ts
457
+ // src/database/standalone/use-table-list.ts
466
458
  /**
467
459
  * The table catalog's hook (the standalone's stand): the consumer's
468
460
  * `DatabaseBridge`'s catalog read (`listTables` — the system tables stand
@@ -517,8 +509,7 @@ function useTableList(bridge) {
517
509
  }, [refresh])
518
510
  };
519
511
  }
520
- //#endregion
521
- //#region src/DocHeaderAvatar.tsx
512
+ // src/DocHeaderAvatar.tsx
522
513
  /**
523
514
  * The document header's avatar slot: the emoji picker's popover over the
524
515
  * edit's mode, the display-only stand over the read-only ones. The library
@@ -589,8 +580,7 @@ function DocHeaderAvatar({ avatar, editable, renderContent, onPick, onClear }) {
589
580
  })]
590
581
  });
591
582
  }
592
- //#endregion
593
- //#region src/DocHeader.tsx
583
+ // src/DocHeader.tsx
594
584
  /**
595
585
  * The document's header panel — a consumer-placed component (outside the
596
586
  * editor, so it takes the core `Doc` directly, not the editor context). It
@@ -758,8 +748,7 @@ function DocHeaderInner({ doc, view, onViewChange, accessLevel = "editor", mode
758
748
  ]
759
749
  });
760
750
  }
761
- //#endregion
762
- //#region src/editing/import.ts
751
+ // src/editing/import.ts
763
752
  /** The document is not fresh: the import requires the empty root. */
764
753
  var ImportDocumentError = class extends Error {
765
754
  constructor(message) {
@@ -812,8 +801,7 @@ function materializeImport(doc, parsed) {
812
801
  prevIndent = indent;
813
802
  }
814
803
  }
815
- //#endregion
816
- //#region src/fonts.ts
804
+ // src/fonts.ts
817
805
  /**
818
806
  * The package's font subsystem — the single place for the package's fonts.
819
807
  *
@@ -856,5 +844,4 @@ const UI_FONT_STACK = "'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif
856
844
  * `--docblocks-mono-font-family` token's default.
857
845
  */
858
846
  const MONO_FONT_STACK = "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
859
- //#endregion
860
847
  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,10 +1,8 @@
1
- import { r as BlockRendererProps } from "../index-DeOMnr7f.mjs";
2
- //#region src/mermaid/MermaidCodeRenderer.d.ts
1
+ import { r as BlockRendererProps } from "../index-BsP8XWdE.mjs";
3
2
  /**
4
3
  * A BlockRenderer for the `code` type. The registry dispatches by type:
5
4
  * a renderer registered under "code" only receives code blocks (the union
6
5
  * cannot express that narrowing at the call site).
7
6
  */
8
7
  declare function MermaidCodeRenderer({ id, block }: BlockRendererProps): import("react").JSX.Element;
9
- //#endregion
10
8
  export { MermaidCodeRenderer };
@@ -1,11 +1,11 @@
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 { 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
- import { t as Maximize } from "../Maximize-BBHnCDWL.mjs";
4
- import { useEffect, useRef, useState } from "react";
1
+ 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-y3dFOZE4.mjs";
2
+ import mermaid from "mermaid";
5
3
  import { useTranslation } from "react-i18next";
4
+ import { useEffect, useRef, useState } from "react";
5
+ import { a as clamp, d as Plus, f as Minus, p as LoaderCircle, s as preventDefault, u as TriangleAlert } from "../constants-CBPODzZc.mjs";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
- import mermaid from "mermaid";
8
- //#region src/mermaid/mermaid-config.ts
7
+ import { t as Maximize } from "../Maximize-BTsFyI81.mjs";
8
+ // src/mermaid/mermaid-config.ts
9
9
  /** The mermaid renderer's config stand (the v1 security + behavior stand —
10
10
  * `securityLevel: "strict"` — the user's diagram source is sanitized and
11
11
  * no click handlers or foreign scripts are bound — and
@@ -43,8 +43,7 @@ configureMermaidTheme("light");
43
43
  function safeId(id) {
44
44
  return id.replace(/[^a-zA-Z0-9_-]/g, "");
45
45
  }
46
- //#endregion
47
- //#region src/mermaid/use-container-theme.ts
46
+ // src/mermaid/use-container-theme.ts
48
47
  /** The editor's theme for one ref'd element, reactive to a theme flip:
49
48
  * a single MutationObserver watches the `class` attribute of the
50
49
  * element's ancestor chain (collected on mount — the preview's branch
@@ -80,8 +79,7 @@ function useContainerTheme(ref) {
80
79
  }, [ref]);
81
80
  return theme;
82
81
  }
83
- //#endregion
84
- //#region src/mermaid/MermaidDiagram.tsx
82
+ // src/mermaid/MermaidDiagram.tsx
85
83
  /** The live diagram preview of one mermaid code block: `mermaid.render`
86
84
  * into a unique id per attempt, the svg injected into a container. The
87
85
  * previous svg stays put while a (re-)render runs (no flicker while
@@ -170,8 +168,7 @@ function MermaidDiagram({ id, text }) {
170
168
  })]
171
169
  });
172
170
  }
173
- //#endregion
174
- //#region src/mermaid/mermaid-viewport-view.ts
171
+ // src/mermaid/mermaid-viewport-view.ts
175
172
  /** The mermaid viewport's pure view math: the scale / pan bounds, the
176
173
  * view's canonical forms (the restore, the rounding, the pan's clamp
177
174
  * over the scaled overflow, the point-fixed zoom). */
@@ -315,8 +312,7 @@ function useMermaidHeight({ id, block, doc, wrapperRef }) {
315
312
  onResizeKeyDown
316
313
  };
317
314
  }
318
- //#endregion
319
- //#region src/mermaid/use-mermaid-pan.ts
315
+ // src/mermaid/use-mermaid-pan.ts
320
316
  /** The mermaid viewport's pan: the wheel's zoom / pan (the non-passive
321
317
  * listener) and the left-button's drag-pan over the diagram's area. */
322
318
  function useMermaidPan({ wrapperRef, layerRef, viewRef, clampView, markExplicit, setView }) {
@@ -391,8 +387,7 @@ function useMermaidPan({ wrapperRef, layerRef, viewRef, clampView, markExplicit,
391
387
  endPan
392
388
  };
393
389
  }
394
- //#endregion
395
- //#region src/mermaid/use-mermaid-viewport-view.ts
390
+ // src/mermaid/use-mermaid-viewport-view.ts
396
391
  /** The mermaid viewport's view state: the persisted view's restore, the
397
392
  * geometry's settle (the load-time fit / the pan's re-clamp), the zoom's
398
393
  * controls, and the view's persist / remote adopt (the panes' shared
@@ -584,8 +579,7 @@ function useMermaidViewportView({ id, block, doc, wrapperRef, layerRef }) {
584
579
  atIdentity
585
580
  };
586
581
  }
587
- //#endregion
588
- //#region src/mermaid/MermaidViewport.tsx
582
+ // src/mermaid/MermaidViewport.tsx
589
583
  /**
590
584
  * The diagram's viewport over one mermaid code block (the `nested`'s
591
585
  * stand — the diagram + the legacy's nested children render inside the
@@ -714,8 +708,7 @@ function MermaidViewport({ id, block, children }) {
714
708
  ]
715
709
  });
716
710
  }
717
- //#endregion
718
- //#region src/mermaid/MermaidCodeRenderer.tsx
711
+ // src/mermaid/MermaidCodeRenderer.tsx
719
712
  function MermaidModeSelector({ id, block }) {
720
713
  const { doc } = useEditorContext();
721
714
  const mode = block.attrs?.mermaidMode ?? "code";
@@ -796,5 +789,4 @@ function MermaidCodeRenderer({ id, block }) {
796
789
  block
797
790
  });
798
791
  }
799
- //#endregion
800
792
  export { MermaidCodeRenderer };
@@ -1,5 +1,17 @@
1
- import { f as PdfPreviewProps } from "../index-sSq0oOSl.mjs";
2
- //#region src/pdf/PdfFirstPage.d.ts
1
+ /**
2
+ * docblocks-react-ui/pdf — the PDF first-page preview renderer.
3
+ *
4
+ * pdfjs-dist is imported only from this subpath: the base entry never imports
5
+ * it, so consumers that do not enable the preview ship no pdfjs code.
6
+ *
7
+ * New PDFs are file blocks with a consumer-owned fileId; legacy image blocks
8
+ * carrying PDF bytes remain supported. The preview is view-only: it writes no
9
+ * document data, wire updates, or awareness. Wire it per instance through the
10
+ * EditorProvider `pdfPreview` prop.
11
+ *
12
+ * On fetch, parse, or render failure the preview falls back to the native
13
+ * iframe viewer, so the document stays viewable.
14
+ */
15
+ import { f as PdfPreviewProps } from "../index-DxRfzb-L.mjs";
3
16
  declare function PdfFirstPage({ id, blockType, url, name }: PdfPreviewProps): import("react").JSX.Element;
4
- //#endregion
5
17
  export { PdfFirstPage, type PdfPreviewProps };