docblocks-react-ui 0.6.5 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -0
- package/README.md +53 -3
- package/dist/{Editor-RBfmEGXr.mjs → Editor-BM6-5TFS.mjs} +3812 -3375
- package/dist/{constants-OOBlKSTr.mjs → constants-D8PSgkwi.mjs} +6 -6
- package/dist/{index-DyPFy2m5.d.mts → index-B72m5FmT.d.mts} +70 -2
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +2 -2
- package/dist/mermaid/index.mjs +2 -2
- package/dist/pdf/index.d.mts +1 -1
- package/dist/pdf/index.mjs +2 -2
- package/dist/styles.css +25 -18
- package/package.json +1 -1
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { clsx } from "clsx";
|
|
3
3
|
import { twMerge } from "tailwind-merge";
|
|
4
|
-
//#region src/shared/ui/cn.ts
|
|
5
|
-
function cn(...inputs) {
|
|
6
|
-
return twMerge(clsx(inputs));
|
|
7
|
-
}
|
|
8
|
-
//#endregion
|
|
9
4
|
//#region src/shared/ui/icons/ChevronLeft.tsx
|
|
10
5
|
function ChevronLeft(props) {
|
|
11
6
|
return /* @__PURE__ */ jsx("svg", {
|
|
@@ -129,6 +124,11 @@ function X(props) {
|
|
|
129
124
|
});
|
|
130
125
|
}
|
|
131
126
|
//#endregion
|
|
127
|
+
//#region src/shared/ui/cn.ts
|
|
128
|
+
function cn(...inputs) {
|
|
129
|
+
return twMerge(clsx(inputs));
|
|
130
|
+
}
|
|
131
|
+
//#endregion
|
|
132
132
|
//#region src/shared/utils.ts
|
|
133
133
|
/** Clamps a value into the inclusive [min, max] range. */
|
|
134
134
|
function clamp(value, min, max) {
|
|
@@ -179,4 +179,4 @@ function isEmbeddablePdfUrl(url) {
|
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
//#endregion
|
|
182
|
-
export { preventDefault as a,
|
|
182
|
+
export { preventDefault as a, X as c, Minus as d, LoaderCircle as f, isSafeDownloadHref as i, TriangleAlert as l, ChevronLeft as m, assertNever as n, stopPropagation as o, ChevronRight as p, clamp as r, cn as s, isEmbeddablePdfUrl as t, Plus as u };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as BlockRendererMap } from "./index-YJcgf8Hh.mjs";
|
|
2
2
|
import { ComponentType, ReactNode } from "react";
|
|
3
|
-
import { Block, BlockContent, BlockId, BlockType, CanvasTextAttrs, Change, ConnectorAttrs, DatabaseFilterPayload, Doc, DocMeta, Geometry, PresenceSelection, PresenceState, Selection, SelectionView, ShapeAttrs, SyncEmbedRef, SyncProvider } from "docblocks-core";
|
|
3
|
+
import { Block, BlockContent, BlockId, BlockType, CanvasTextAttrs, Change, ConnectorAttrs, DatabaseFilterPayload, Doc, DocMeta, Geometry, MentionMark, PresenceSelection, PresenceState, Selection, SelectionView, ShapeAttrs, SyncEmbedRef, SyncProvider } from "docblocks-core";
|
|
4
4
|
import { StoreApi } from "zustand/vanilla";
|
|
5
5
|
//#region src/blob-store.d.ts
|
|
6
6
|
/**
|
|
@@ -32,6 +32,18 @@ interface BlobStore {
|
|
|
32
32
|
subscribe(fileId: string, onChange: () => void): () => void;
|
|
33
33
|
/** Optional garbage collection. */
|
|
34
34
|
remove?(fileId: string): Promise<void>;
|
|
35
|
+
/** Optional lightweight display resolution: file id → the metadata WITHOUT
|
|
36
|
+
* the bytes (the cheap head stand, no body transfer). The built-in
|
|
37
|
+
* file / image blocks resolve the bytes over `get` only when they render
|
|
38
|
+
* the payload (the pdf preview, the `<img>`); any other MIME stands the
|
|
39
|
+
* meta card with the `downloadUrl`'s href. Without the member the blocks
|
|
40
|
+
* keep the legacy stand (the bytes over `get`). Rejects an unknown id
|
|
41
|
+
* (the missing's stand). */
|
|
42
|
+
getMeta?(fileId: string): Promise<BlobMeta>;
|
|
43
|
+
/** Optional direct download URL for a file id (the meta card's href — no
|
|
44
|
+
* object URL stands). Without the member the download's href stands the
|
|
45
|
+
* object URL resolved over `get` (the legacy's path). */
|
|
46
|
+
downloadUrl?(fileId: string): string;
|
|
35
47
|
}
|
|
36
48
|
/** The default in-memory store: blobs live for the JS session only. */
|
|
37
49
|
declare function createMemoryBlobStore(): BlobStore;
|
|
@@ -869,6 +881,20 @@ interface CanvasClipboard {
|
|
|
869
881
|
}
|
|
870
882
|
//#endregion
|
|
871
883
|
//#region src/state/models.d.ts
|
|
884
|
+
/**
|
|
885
|
+
* The slash File command's upload stand: the block the skeleton stands on
|
|
886
|
+
* + the phase. View state per editor (not doc data, no wire).
|
|
887
|
+
*/
|
|
888
|
+
interface FileUploadStand {
|
|
889
|
+
/** The block the skeleton stand stands on (the trigger phrase's block). */
|
|
890
|
+
blockId: BlockId;
|
|
891
|
+
/**
|
|
892
|
+
* The stand's phase: `picker` — the OS dialog's open (the file's not
|
|
893
|
+
* delivered yet), `uploading` — the in-flight upload, `failed` — the
|
|
894
|
+
* refused stand's error line (the stand's click dismisses it).
|
|
895
|
+
*/
|
|
896
|
+
phase: "picker" | "uploading" | "failed";
|
|
897
|
+
}
|
|
872
898
|
/**
|
|
873
899
|
* Per-instance editor state: a projection of one docblocks-core Doc.
|
|
874
900
|
*
|
|
@@ -923,6 +949,13 @@ interface EditorState {
|
|
|
923
949
|
* blocks.
|
|
924
950
|
*/
|
|
925
951
|
canvasClipboard: CanvasClipboard | null;
|
|
952
|
+
/**
|
|
953
|
+
* The slash File command's pending file upload stand (the phrase block's
|
|
954
|
+
* row stands the skeleton over its content while the popover stands
|
|
955
|
+
* closed). `null` when idle. A separate slice so a stand change never
|
|
956
|
+
* re-renders the other blocks.
|
|
957
|
+
*/
|
|
958
|
+
fileUpload: FileUploadStand | null;
|
|
926
959
|
}
|
|
927
960
|
/** Internal write functions, called by the EditorProvider subscriptions. */
|
|
928
961
|
interface EditorActions {
|
|
@@ -938,6 +971,8 @@ interface EditorActions {
|
|
|
938
971
|
setCollapsed: (id: BlockId, collapsed: boolean) => void;
|
|
939
972
|
/** Replaces the canvas clipboard slice (the copy / the clear). */
|
|
940
973
|
setCanvasClipboard: (clipboard: CanvasClipboard | null) => void;
|
|
974
|
+
/** Replaces the pending file upload stand (the set / the clear). */
|
|
975
|
+
setFileUpload: (stand: FileUploadStand | null) => void;
|
|
941
976
|
}
|
|
942
977
|
/** The per-instance vanilla store created by `createEditorStore`. */
|
|
943
978
|
type EditorStore = StoreApi<EditorState & EditorActions>;
|
|
@@ -981,6 +1016,26 @@ interface MentionProvider {
|
|
|
981
1016
|
/** The documents matching the query (the `doc` mention kind). */
|
|
982
1017
|
searchDocs(query: string): Promise<MentionEntry[]>;
|
|
983
1018
|
}
|
|
1019
|
+
/**
|
|
1020
|
+
* The mention interactions: the consumer's hover card (the design + the
|
|
1021
|
+
* data — the package stands the position and the lifecycle only, over a
|
|
1022
|
+
* plain portaled host) and the chip's click (the consumer decides what
|
|
1023
|
+
* opens). The target stands the document's `mention` mark (the core's
|
|
1024
|
+
* `MentionMark`: the kind, the stable id, and the label snapshot) — the
|
|
1025
|
+
* consumer resolves the current data over the id (the catalog, the URL).
|
|
1026
|
+
* Optional over the provider: without it the chip stands as before (no
|
|
1027
|
+
* card, the click is the browser's stand).
|
|
1028
|
+
*/
|
|
1029
|
+
interface MentionInteractions {
|
|
1030
|
+
/** The hover card's content (the consumer's design + data); `null`
|
|
1031
|
+
* stands no card for this target (e.g. the removed's target stand). */
|
|
1032
|
+
renderCard: (mention: MentionMark) => ReactNode | null;
|
|
1033
|
+
/** The chip's click: the consumer decides what opens (the navigation,
|
|
1034
|
+
* the modal). The native event — the consumer's `preventDefault()`
|
|
1035
|
+
* keeps the caret in place (the atomic chip's default stand moves it).
|
|
1036
|
+
* The package stands no default behavior and opens nothing. */
|
|
1037
|
+
onClick?: (mention: MentionMark, event: MouseEvent) => void;
|
|
1038
|
+
}
|
|
984
1039
|
/** The per-instance selection view; null before the mount effect ran and after unmount. */
|
|
985
1040
|
interface SelectionRef {
|
|
986
1041
|
view: SelectionView | null;
|
|
@@ -1040,6 +1095,8 @@ interface EditorContextValue {
|
|
|
1040
1095
|
pdfPreview: PdfPreview | null;
|
|
1041
1096
|
/** The consumer's mention search provider; null when none was supplied (`@` stays plain text). */
|
|
1042
1097
|
mentionProvider: MentionProvider | null;
|
|
1098
|
+
/** The consumer's mention interactions (the hover card + the click); null when none was supplied (the chip stands inert). */
|
|
1099
|
+
mentionInteractions: MentionInteractions | null;
|
|
1043
1100
|
/** The effective embed sandbox policy (the consumer's, or the safe default) — always present. */
|
|
1044
1101
|
embedSandbox: EmbedSandboxPolicy;
|
|
1045
1102
|
/** The entry-list root: the document root by default, a subtree block otherwise. */
|
|
@@ -1156,6 +1213,17 @@ interface EditorProviderProps {
|
|
|
1156
1213
|
* supplies none inherits the enclosing one.
|
|
1157
1214
|
*/
|
|
1158
1215
|
mentionProvider?: MentionProvider;
|
|
1216
|
+
/**
|
|
1217
|
+
* Optional mention interactions: the hover card's content
|
|
1218
|
+
* (`renderCard`) and the chip's click's delivery (`onClick`). The
|
|
1219
|
+
* package stands the card's position + lifecycle only (the portaled
|
|
1220
|
+
* host, the hover's delay/grace, the Escape's close, the anchor's
|
|
1221
|
+
* removal's close) — the design and the data are the consumer's, the
|
|
1222
|
+
* click's stand is the consumer's. Like `mentionProvider`, the value is
|
|
1223
|
+
* read per render into the provider context: pass a stable reference.
|
|
1224
|
+
* A nested provider that supplies none inherits the enclosing one.
|
|
1225
|
+
*/
|
|
1226
|
+
mentionInteractions?: MentionInteractions;
|
|
1159
1227
|
/**
|
|
1160
1228
|
* Optional embed sandbox policy: the iframe's `sandbox` value for a given
|
|
1161
1229
|
* embed src; `null` stands no sandbox (a fully trusted embed). Without it
|
|
@@ -1232,4 +1300,4 @@ declare const DEFAULT_EMBED_SANDBOX = "allow-scripts allow-same-origin allow-for
|
|
|
1232
1300
|
/** Read the per-instance editor context; throws outside an EditorProvider. */
|
|
1233
1301
|
declare function useEditorContext(): EditorContextValue;
|
|
1234
1302
|
//#endregion
|
|
1235
|
-
export {
|
|
1303
|
+
export { ProtocolDescriptor as $, emptyFilter as A, Column as B, DatabaseTableProps as C, BlobStore as Ct, DatabaseTablePhase as D, useDatabaseTable as E, BridgeColumnAnnotation as F, Id as G, DomainEvent as H, BridgeTableDescription as I, MutationReceipt as J, IsoInstant as K, BridgeValueInput as L, FilterBuilder as M, BatchOp as N, DatabaseTableRow as O, BridgeColumn as P, ProtocolCapability as Q, CellMap as R, DatabaseTable as S, BlobRef as St, UseTableList as T, FilterConditionInput as U, DatabaseBridge as V, FilterInput as W, PageQuery as X, OperationStatus as Y, PageSnapshot as Z, PresenceIdentity as _, BridgeErrorCode as _t, EditorContextValue as a, RowWire as at, PresenceSharingMode as b, toBridgeError as bt, EmbedSandboxPolicy as c, SubscriptionObserver as ct, MentionProvider as d, TableEnvelopeBase as dt, ProtocolLimits as et, PdfPreview as f, TableEvent as ft, PresenceCrypto as g, BridgeError as gt, SyncEmbedResolver as h, BRIDGE_ERROR_CODES as ht, AccessLevel as i, RowPage as it, filterIsComplete as j, UseDatabaseTable as k, MentionEntry as l, SubscriptionStatus as lt, PresenceConfig as m, TableSnapshot as mt, DEFAULT_EMBED_SANDBOX as n, QuerySemantics as nt, EditorMode as o, SortInput as ot, PdfPreviewProps as p, TableRef as pt, MutationContext as q, EditorProvider as r, Revision as rt, EditorProviderProps as s, SubscriptionHandle as st, useEditorContext as t, QueryOperator as tt, MentionInteractions as u, TableDescription as ut, PresencePeer as v, isBridgeError as vt, DatabaseTableView as w, createMemoryBlobStore as wt, useTableList as x, BlobMeta as xt, PresenceSharing as y, isBridgeErrorCode as yt, CellValueParse as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as BlockRendererMap, r as BlockRendererProps, t as BlockRenderer } from "./index-YJcgf8Hh.mjs";
|
|
2
|
-
import { $ as
|
|
2
|
+
import { $ as ProtocolDescriptor, A as emptyFilter, B as Column, C as DatabaseTableProps, Ct as BlobStore, D as DatabaseTablePhase, E as useDatabaseTable, F as BridgeColumnAnnotation, G as Id, H as DomainEvent, I as BridgeTableDescription, J as MutationReceipt, K as IsoInstant, L as BridgeValueInput, M as FilterBuilder, N as BatchOp, O as DatabaseTableRow, P as BridgeColumn, Q as ProtocolCapability, R as CellMap, S as DatabaseTable, St as BlobRef, T as UseTableList, U as FilterConditionInput, V as DatabaseBridge, W as FilterInput, X as PageQuery, Y as OperationStatus, Z as PageSnapshot, _ as PresenceIdentity, _t as BridgeErrorCode, a as EditorContextValue, at as RowWire, b as PresenceSharingMode, bt as toBridgeError, c as EmbedSandboxPolicy, ct as SubscriptionObserver, d as MentionProvider, dt as TableEnvelopeBase, et as ProtocolLimits, f as PdfPreview, ft as TableEvent, g as PresenceCrypto, gt as BridgeError, h as SyncEmbedResolver, ht as BRIDGE_ERROR_CODES, i as AccessLevel, it as RowPage, j as filterIsComplete, k as UseDatabaseTable, l as MentionEntry, lt as SubscriptionStatus, m as PresenceConfig, mt as TableSnapshot, n as DEFAULT_EMBED_SANDBOX, nt as QuerySemantics, o as EditorMode, ot as SortInput, p as PdfPreviewProps, pt as TableRef, q as MutationContext, r as EditorProvider, rt as Revision, s as EditorProviderProps, st as SubscriptionHandle, t as useEditorContext, tt as QueryOperator, u as MentionInteractions, ut as TableDescription, v as PresencePeer, vt as isBridgeError, w as DatabaseTableView, wt as createMemoryBlobStore, x as useTableList, xt as BlobMeta, y as PresenceSharing, yt as isBridgeErrorCode, z as CellValueParse } from "./index-B72m5FmT.mjs";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { ComponentType, ReactNode } from "react";
|
|
5
|
-
import { Block, BlockId, BlockType, Doc, DocMeta, PresenceState, Selection, SelectionView, SyncEmbedRef, TextRun } from "docblocks-core";
|
|
5
|
+
import { Block, BlockId, BlockType, Doc, DocMeta, MentionMark, PresenceState, Selection, SelectionView, SyncEmbedRef, TextRun } from "docblocks-core";
|
|
6
6
|
import "i18next";
|
|
7
7
|
import { VariantProps } from "class-variance-authority";
|
|
8
8
|
import { ClassValue } from "clsx";
|
|
@@ -322,7 +322,7 @@ declare function AlertDescription({ className, ...props }: React.ComponentProps<
|
|
|
322
322
|
//#endregion
|
|
323
323
|
//#region src/shared/ui/Badge.d.ts
|
|
324
324
|
declare const badgeVariants: (props?: ({
|
|
325
|
-
variant?: "default" | "destructive" | "
|
|
325
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "custom" | null | undefined;
|
|
326
326
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
327
327
|
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
328
328
|
asChild?: boolean;
|
|
@@ -333,7 +333,7 @@ declare function BareSelect({ className, children, ...props }: React.ComponentPr
|
|
|
333
333
|
//#endregion
|
|
334
334
|
//#region src/shared/ui/Button.d.ts
|
|
335
335
|
declare const buttonVariants: (props?: ({
|
|
336
|
-
variant?: "link" | "default" | "destructive" | "
|
|
336
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
337
337
|
size?: "default" | "icon" | "sm" | "lg" | "xl" | null | undefined;
|
|
338
338
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
339
339
|
declare function Button({ className, variant, size, asChild, type, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
@@ -467,4 +467,4 @@ declare function TooltipContent({ className, sideOffset, children, ...props }: R
|
|
|
467
467
|
//#region src/shared/ui/cn.d.ts
|
|
468
468
|
declare function cn(...inputs: ClassValue[]): string;
|
|
469
469
|
//#endregion
|
|
470
|
-
export { type AccessLevel, Alert, AlertDescription, AlertTitle, BASELINE_CAPABILITIES, BRIDGE_ERROR_CODES, Badge, BareSelect, type BatchOp, type BlobMeta, type BlobRef, type BlobStore, type BlockRenderer, type BlockRendererMap, type BlockRendererProps, type BridgeColumn, type BridgeColumnAnnotation, BridgeError, type BridgeErrorCode, type BridgeTableDescription, type BridgeValueInput, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CellMap, type CellValueParse, Checkbox, type Column, DEFAULT_EMBED_SANDBOX, type DatabaseBridge, DatabaseTable, type DatabaseTablePhase, type DatabaseTableProps, type DatabaseTableRow, type DatabaseTableView, DocHeader, DocblocksI18nProvider, type DocblocksI18nProviderProps, type DomainEvent, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Editor, type EditorContextValue, type EditorMode, EditorProvider, type EditorProviderProps, type EditorView, type EmbedSandboxPolicy, FORMAT_PALETTE, FilterBuilder, type FilterConditionInput, type FilterInput, type FormatMark, type Id, Input, type IsoInstant, Label, MONO_FONT_STACK, type MentionEntry, type MentionProvider, type MutationContext, type MutationReceipt, type OperationStatus, PROTOCOL_VERSION, type PageQuery, type PageSnapshot, 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 Revision, type RowPage, type RowWire, SHAPE_FONT_OPTIONS, SHAPE_FONT_STACKS, ScrollArea, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, 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, UI_FONT_ID, UI_FONT_STACK, type UseDatabaseTable, type UseTableList, badgeVariants, buttonVariants, cellValueEqual, cn, columnAnnotation, conditionMatches, createMemoryBlobStore, emptyFilter, filterIsComplete, isBridgeError, isBridgeErrorCode, isDatabaseBridge, markToggleAction, newMutationContext, parseCellValue, renderRuns, toBridgeError, useBlock, useDatabaseTable, useDoc, useEditorContext, useMeta, usePresence, usePresenceSharing, useSelection, useSelectionView, useTableList, useText, validateProtocolDescriptor };
|
|
470
|
+
export { type AccessLevel, Alert, AlertDescription, AlertTitle, BASELINE_CAPABILITIES, BRIDGE_ERROR_CODES, Badge, BareSelect, type BatchOp, type BlobMeta, type BlobRef, type BlobStore, type BlockRenderer, type BlockRendererMap, type BlockRendererProps, type BridgeColumn, type BridgeColumnAnnotation, BridgeError, type BridgeErrorCode, type BridgeTableDescription, type BridgeValueInput, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CellMap, type CellValueParse, Checkbox, type Column, DEFAULT_EMBED_SANDBOX, type DatabaseBridge, DatabaseTable, type DatabaseTablePhase, type DatabaseTableProps, type DatabaseTableRow, type DatabaseTableView, DocHeader, DocblocksI18nProvider, type DocblocksI18nProviderProps, type DomainEvent, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Editor, type EditorContextValue, type EditorMode, EditorProvider, type EditorProviderProps, type EditorView, type EmbedSandboxPolicy, FORMAT_PALETTE, FilterBuilder, type FilterConditionInput, type FilterInput, type FormatMark, type Id, 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, 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 Revision, type RowPage, type RowWire, SHAPE_FONT_OPTIONS, SHAPE_FONT_STACKS, ScrollArea, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, 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, UI_FONT_ID, UI_FONT_STACK, type UseDatabaseTable, type UseTableList, badgeVariants, buttonVariants, cellValueEqual, cn, columnAnnotation, conditionMatches, createMemoryBlobStore, emptyFilter, filterIsComplete, isBridgeError, isBridgeErrorCode, isDatabaseBridge, markToggleAction, newMutationContext, parseCellValue, renderRuns, toBridgeError, useBlock, useDatabaseTable, useDoc, useEditorContext, useMeta, usePresence, usePresenceSharing, useSelection, useSelectionView, useTableList, useText, validateProtocolDescriptor };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as SelectValue, A as useBlock, At as CardFooter, B as DEFAULT_EMBED_SANDBOX, Bt as
|
|
2
|
-
import { a as preventDefault,
|
|
1
|
+
import { $ as SelectValue, A as useBlock, At as CardFooter, B as DEFAULT_EMBED_SANDBOX, Bt as AlertTitle, C as isBridgeError, Ct as PopoverTrigger, D as parseCellValue, Dt as CardAction, E as conditionMatches, Et as Card, F as useSelection, Ft as BareSelect, G as SelectContent, Gt as Eye, H as SegmentSelector, I as useSelectionView, It as Badge, J as SelectLabel, Jt as createMemoryBlobStore, K as SelectGroup, L as useText, Lt as badgeVariants, M as useMeta, Mt as CardTitle, N as usePresence, Nt as Button, O as TEXT_TYPES, Ot as CardContent, P as usePresenceSharing, Pt as buttonVariants, Q as SelectTrigger, R as EditorProvider, Rt as Alert, S as BridgeError, St as PopoverTitle, T as toBridgeError, Tt as Checkbox, U as ScrollArea, Ut as renderRuns, V as Skeleton, Vt as DocblocksI18nProvider, W as Select, Wt as Pen, X as SelectScrollUpButton, Y as SelectScrollDownButton, Z as SelectSeparator, _ as BASELINE_CAPABILITIES, _t as Popover, a as SHAPE_FONT_STACKS, at as DropdownMenuItem, b as validateProtocolDescriptor, bt as PopoverDescription, ct as DropdownMenuRadioGroup, d as useDatabaseTable, dt as DropdownMenuShortcut, et as Label, f as cellValueEqual, ft as DropdownMenuSub, g as filterIsComplete, gt as Separator, h as emptyFilter, ht as DropdownMenuTrigger, i as SHAPE_FONT_OPTIONS, it as DropdownMenuGroup, j as useDoc, jt as CardHeader, k as columnAnnotation, kt as CardDescription, l as markToggleAction, lt as DropdownMenuRadioItem, m as FilterBuilder, mt as DropdownMenuSubTrigger, nt as DropdownMenuCheckboxItem, ot as DropdownMenuLabel, p as newMutationContext, pt as DropdownMenuSubContent, q as SelectItem, qt as BookOpen, rt as DropdownMenuContent, s as FORMAT_PALETTE, st as DropdownMenuPortal, t as Editor, tt as DropdownMenu, u as GridBody, ut as DropdownMenuSeparator, v as PROTOCOL_VERSION, vt as PopoverAnchor, w as isBridgeErrorCode, wt as Input, x as BRIDGE_ERROR_CODES, xt as PopoverHeader, y as isDatabaseBridge, yt as PopoverContent, z as useEditorContext, zt as AlertDescription } from "./Editor-BM6-5TFS.mjs";
|
|
2
|
+
import { a as preventDefault, s as cn } from "./constants-D8PSgkwi.mjs";
|
|
3
3
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { useTranslation } from "react-i18next";
|
package/dist/mermaid/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Bt as AlertTitle, Gt as Eye, H as SegmentSelector, Ht as INLINE_CODE_CLASS, Kt as CodeXml, Rt as Alert, V as Skeleton, c as textOf, n as childrenSlot, o as TextBlock, r as CodeHeader, z as useEditorContext, zt as AlertDescription } from "../Editor-BM6-5TFS.mjs";
|
|
2
|
+
import { f as LoaderCircle, l as TriangleAlert } from "../constants-D8PSgkwi.mjs";
|
|
3
3
|
import { useEffect, useRef, useState } from "react";
|
|
4
4
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { useTranslation } from "react-i18next";
|
package/dist/pdf/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { p as PdfPreviewProps } from "../index-B72m5FmT.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/pdf/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as
|
|
1
|
+
import { c as X, d as Minus, f as LoaderCircle, i as isSafeDownloadHref, l as TriangleAlert, m as ChevronLeft, p as ChevronRight, r as clamp, s as cn, t as isEmbeddablePdfUrl, u as Plus } from "../constants-D8PSgkwi.mjs";
|
|
2
2
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
|
-
import { GlobalWorkerOptions, RenderingCancelledException, getDocument } from "pdfjs-dist";
|
|
6
5
|
import { createPortal } from "react-dom";
|
|
6
|
+
import { GlobalWorkerOptions, RenderingCancelledException, getDocument } from "pdfjs-dist";
|
|
7
7
|
//#region src/shared/ui/icons/Maximize.tsx
|
|
8
8
|
function Maximize(props) {
|
|
9
9
|
return /* @__PURE__ */ jsxs("svg", {
|
package/dist/styles.css
CHANGED
|
@@ -1492,6 +1492,9 @@
|
|
|
1492
1492
|
.pt-2 {
|
|
1493
1493
|
padding-top: calc(var(--spacing) * 2);
|
|
1494
1494
|
}
|
|
1495
|
+
.pt-2\.5 {
|
|
1496
|
+
padding-top: calc(var(--spacing) * 2.5);
|
|
1497
|
+
}
|
|
1495
1498
|
.pt-5 {
|
|
1496
1499
|
padding-top: calc(var(--spacing) * 5);
|
|
1497
1500
|
}
|
|
@@ -2231,6 +2234,9 @@
|
|
|
2231
2234
|
color: color-mix(in oklab, var(--muted-foreground) 50%, transparent);
|
|
2232
2235
|
}
|
|
2233
2236
|
}
|
|
2237
|
+
.hover\:text-primary-foreground:hover {
|
|
2238
|
+
color: var(--primary-foreground);
|
|
2239
|
+
}
|
|
2234
2240
|
.hover\:underline:hover {
|
|
2235
2241
|
text-decoration-line: underline;
|
|
2236
2242
|
}
|
|
@@ -3474,9 +3480,8 @@
|
|
|
3474
3480
|
--docblocks-selection-background: #b6d7fe;
|
|
3475
3481
|
--docblocks-inline-code-background: var(--muted, rgba(175, 184, 193, 0.2));
|
|
3476
3482
|
|
|
3477
|
-
/* The mention chip (an atomic, display-only inline run):
|
|
3478
|
-
|
|
3479
|
-
--docblocks-mention-background: color-mix(in srgb, var(--primary, #0969da) 14%, transparent);
|
|
3483
|
+
/* The mention chip (an atomic, display-only inline run): the
|
|
3484
|
+
brand-colored label. */
|
|
3480
3485
|
--docblocks-mention-color: var(--primary, #0969da);
|
|
3481
3486
|
|
|
3482
3487
|
/* Callout borders / backgrounds per variant (info/danger follow the
|
|
@@ -3700,7 +3705,6 @@
|
|
|
3700
3705
|
--docblocks-link-color: #58a6ff;
|
|
3701
3706
|
--docblocks-selection-background: rgba(56, 139, 253, 0.4);
|
|
3702
3707
|
--docblocks-inline-code-background: var(--muted, rgba(110, 118, 129, 0.4));
|
|
3703
|
-
--docblocks-mention-background: color-mix(in srgb, var(--primary, #58a6ff) 22%, transparent);
|
|
3704
3708
|
--docblocks-mention-color: var(--primary, #58a6ff);
|
|
3705
3709
|
|
|
3706
3710
|
--docblocks-code-background: var(--muted, rgba(110, 118, 129, 0.35));
|
|
@@ -3985,22 +3989,25 @@
|
|
|
3985
3989
|
pointer-events: none;
|
|
3986
3990
|
}
|
|
3987
3991
|
|
|
3988
|
-
/* The mention chip: an atomic inline run (contenteditable="false")
|
|
3989
|
-
|
|
3992
|
+
/* The mention chip: an atomic inline run (contenteditable="false"), the
|
|
3993
|
+
plain-text stand — the semibold + the underline + the kind's inline
|
|
3994
|
+
icon (1em, no box of its own: the row keeps its plain-text height). */
|
|
3990
3995
|
[data-slot="docblocks/mention"] {
|
|
3991
|
-
|
|
3992
|
-
max-width: 100%;
|
|
3993
|
-
margin: 0 1px;
|
|
3994
|
-
padding: 0.05em 0.4em;
|
|
3995
|
-
border-radius: var(--radius, 0.375rem);
|
|
3996
|
-
background: var(--docblocks-mention-background, color-mix(in srgb, var(--primary, #0969da) 14%, transparent));
|
|
3996
|
+
font-weight: 600;
|
|
3997
3997
|
color: var(--docblocks-mention-color, var(--primary, #0969da));
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
3998
|
+
text-decoration: underline;
|
|
3999
|
+
text-underline-offset: 2px;
|
|
4000
|
+
}
|
|
4001
|
+
|
|
4002
|
+
[data-slot="docblocks/mention"] svg {
|
|
4003
|
+
/* The consumer page's global reset (e.g. Tailwind's preflight's
|
|
4004
|
+
`svg { display: block }`) must not break the icon onto its own line —
|
|
4005
|
+
the chip is an inline run over the text line. */
|
|
4006
|
+
display: inline;
|
|
4007
|
+
width: 1em;
|
|
4008
|
+
height: 1em;
|
|
4009
|
+
margin-right: 0.25em;
|
|
4010
|
+
vertical-align: -0.125em;
|
|
4004
4011
|
}
|
|
4005
4012
|
|
|
4006
4013
|
/* The flat grid has no row element: the pending row's outline is composed
|
package/package.json
CHANGED