docblocks-react-ui 0.5.0 → 0.6.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.
@@ -6,43 +6,6 @@ function cn(...inputs) {
6
6
  return twMerge(clsx(inputs));
7
7
  }
8
8
  //#endregion
9
- //#region src/shared/utils.ts
10
- /** Clamps a value into the inclusive [min, max] range. */
11
- function clamp(value, min, max) {
12
- return Math.min(max, Math.max(min, value));
13
- }
14
- /** The DOM event's default-cancelling handler (the chrome's press stand). */
15
- function preventDefault(event) {
16
- event.preventDefault();
17
- }
18
- /** The DOM event's propagation-stopping handler (the inner chrome's press
19
- * stands over the outer gesture). */
20
- function stopPropagation(event) {
21
- event.stopPropagation();
22
- }
23
- /** The executable schemes a download href must not carry (a `javascript:` / `vbscript:` href runs on the click — the `download` attribute does not neutralize it). */
24
- const UNSAFE_DOWNLOAD_SCHEME = /^[\u0000-\u0020]*(javascript|vbscript)\s*:/i;
25
- /**
26
- * The download href gate (the defense in depth over the consumer's BlobStore
27
- * url): the executable schemes stand no anchor; the `data:` / the `blob:` / the
28
- * http(s) urls stand (the default store's data urls, the consumer's CDN).
29
- * The browser's leading-control trim is undone before the scheme check (the
30
- * link href's stand).
31
- */
32
- function isSafeDownloadHref(url) {
33
- return typeof url === "string" && !UNSAFE_DOWNLOAD_SCHEME.test(url);
34
- }
35
- /**
36
- * The exhaustiveness check for a `switch` over a closed union: `value` is
37
- * typed `never`, so once every member has a `case` the compiler narrows it
38
- * to `never` in the `default` and the call type-checks; a member without a
39
- * `case` fails the build. The throw is the runtime backstop for a value that
40
- * slipped past the types.
41
- */
42
- function assertNever(value) {
43
- throw new Error(`Unhandled value: ${String(value)}`);
44
- }
45
- //#endregion
46
9
  //#region src/shared/ui/icons/ChevronLeft.tsx
47
10
  function ChevronLeft(props) {
48
11
  return /* @__PURE__ */ jsx("svg", {
@@ -77,6 +40,40 @@ function ChevronRight(props) {
77
40
  });
78
41
  }
79
42
  //#endregion
43
+ //#region src/shared/ui/icons/Minus.tsx
44
+ function Minus(props) {
45
+ return /* @__PURE__ */ jsx("svg", {
46
+ xmlns: "http://www.w3.org/2000/svg",
47
+ width: 24,
48
+ height: 24,
49
+ viewBox: "0 0 24 24",
50
+ fill: "none",
51
+ stroke: "currentColor",
52
+ strokeWidth: 2,
53
+ strokeLinecap: "round",
54
+ strokeLinejoin: "round",
55
+ ...props,
56
+ children: /* @__PURE__ */ jsx("path", { d: "M5 12h14" })
57
+ });
58
+ }
59
+ //#endregion
60
+ //#region src/shared/ui/icons/Plus.tsx
61
+ function Plus(props) {
62
+ return /* @__PURE__ */ jsxs("svg", {
63
+ xmlns: "http://www.w3.org/2000/svg",
64
+ width: 24,
65
+ height: 24,
66
+ viewBox: "0 0 24 24",
67
+ fill: "none",
68
+ stroke: "currentColor",
69
+ strokeWidth: 2,
70
+ strokeLinecap: "round",
71
+ strokeLinejoin: "round",
72
+ ...props,
73
+ children: [/* @__PURE__ */ jsx("path", { d: "M5 12h14" }), /* @__PURE__ */ jsx("path", { d: "M12 5v14" })]
74
+ });
75
+ }
76
+ //#endregion
80
77
  //#region src/shared/ui/icons/TriangleAlert.tsx
81
78
  function TriangleAlert(props) {
82
79
  return /* @__PURE__ */ jsxs("svg", {
@@ -115,18 +112,54 @@ function X(props) {
115
112
  });
116
113
  }
117
114
  //#endregion
115
+ //#region src/shared/utils.ts
116
+ /** Clamps a value into the inclusive [min, max] range. */
117
+ function clamp(value, min, max) {
118
+ return Math.min(max, Math.max(min, value));
119
+ }
120
+ /** The DOM event's default-cancelling handler (the chrome's press stand). */
121
+ function preventDefault(event) {
122
+ event.preventDefault();
123
+ }
124
+ /** The DOM event's propagation-stopping handler (the inner chrome's press
125
+ * stands over the outer gesture). */
126
+ function stopPropagation(event) {
127
+ event.stopPropagation();
128
+ }
129
+ /** The executable schemes a download href must not carry (a `javascript:` / `vbscript:` href runs on the click — the `download` attribute does not neutralize it). */
130
+ const UNSAFE_DOWNLOAD_SCHEME = /^[\u0000-\u0020]*(javascript|vbscript)\s*:/i;
131
+ /**
132
+ * The download href gate (the defense in depth over the consumer's BlobStore
133
+ * url): the executable schemes stand no anchor; the `data:` / the `blob:` / the
134
+ * http(s) urls stand (the default store's data urls, the consumer's CDN).
135
+ * The browser's leading-control trim is undone before the scheme check (the
136
+ * link href's stand).
137
+ */
138
+ function isSafeDownloadHref(url) {
139
+ return typeof url === "string" && !UNSAFE_DOWNLOAD_SCHEME.test(url);
140
+ }
141
+ /**
142
+ * The exhaustiveness check for a `switch` over a closed union: `value` is
143
+ * typed `never`, so once every member has a `case` the compiler narrows it
144
+ * to `never` in the `default` and the call type-checks; a member without a
145
+ * `case` fails the build. The throw is the runtime backstop for a value that
146
+ * slipped past the types.
147
+ */
148
+ function assertNever(value) {
149
+ throw new Error(`Unhandled value: ${String(value)}`);
150
+ }
151
+ //#endregion
118
152
  //#region src/pdf/constants.ts
119
- /** The iframe's embeddable-url gate: only the http(s) scheme may stand the
120
- * viewer's iframe. The data / blob / javascript schemes (and the
121
- * unparseable url) stand the download-only fallback — the consumer's
122
- * document bytes are never executed in the frame's context. */
153
+ /** The iframe's embeddable-url gate: http(s) and the library-owned blob URL
154
+ * may stand the viewer's iframe. Data / javascript schemes and unparseable
155
+ * URLs stand the download-only fallback. */
123
156
  function isEmbeddablePdfUrl(url) {
124
157
  try {
125
158
  const scheme = new URL(url).protocol;
126
- return scheme === "http:" || scheme === "https:";
159
+ return scheme === "http:" || scheme === "https:" || scheme === "blob:";
127
160
  } catch {
128
161
  return false;
129
162
  }
130
163
  }
131
164
  //#endregion
132
- export { ChevronLeft as a, isSafeDownloadHref as c, cn as d, ChevronRight as i, preventDefault as l, X as n, assertNever as o, TriangleAlert as r, clamp as s, isEmbeddablePdfUrl as t, stopPropagation as u };
165
+ export { preventDefault as a, TriangleAlert as c, ChevronRight as d, ChevronLeft as f, isSafeDownloadHref as i, Plus as l, assertNever as n, stopPropagation as o, cn as p, clamp as r, X as s, isEmbeddablePdfUrl as t, Minus as u };
@@ -4,55 +4,36 @@ import { Block, BlockContent, BlockId, BlockType, CanvasTextAttrs, Change, Conne
4
4
  import { StoreApi } from "zustand/vanilla";
5
5
  //#region src/blob-store.d.ts
6
6
  /**
7
- * The blob bridge: the library does not own storage.
8
- *
9
- * The bytes live where the consumer stored them (S3, disk, a CDN — the
10
- * package does not know and does not care). The document holds only an
11
- * opaque key, and the consumer's callbacks are the only path key →
12
- * displayable url and file → key. Both directions carry the metadata:
13
- * `upload` accepts a `meta` (the consumer decides the subtype), and
14
- * `resolve` returns the key's url plus the authoritative metadata — the
15
- * UI renders from `meta.subtype` and never guesses (an image blob stands
16
- * an `<img>`, a pdf an iframe viewer, a file a download card).
17
- *
18
- * The legacy `blobResolver` prop (synchronous key → src string) wraps as
19
- * a store: view-only (no upload), subtype "image".
7
+ * The blob bridge: the library does not own storage. Documents hold only an
8
+ * opaque file id; the consumer's store returns the bytes and authoritative
9
+ * metadata, and notifies open views when that metadata changes.
20
10
  */
21
- /** The blob's media class; the consumer decides, extends additively. */
22
- type BlobSubtype = "image" | "pdf" | "file";
23
- /** The blob's display metadata (the consumer is the source of truth). */
11
+ /** The blob's authoritative display metadata. */
24
12
  interface BlobMeta {
25
- subtype: BlobSubtype;
26
- /** The file name (the file card's caption). */
27
- name?: string;
28
- /** The mime type. */
29
- type?: string;
30
- /** The byte size. */
31
- size?: number;
13
+ /** The current display and suggested download name. */
14
+ name: string;
15
+ /** The MIME type; application/octet-stream stands for an unknown type. */
16
+ mimeType: string;
32
17
  }
33
- /** A resolved blob: the displayable url and its authoritative metadata. */
18
+ /** A blob payload returned by the consumer's store. */
34
19
  interface BlobRef {
35
- /** The displayable url (http(s)/data/object — the form is the consumer's). */
36
- url: string;
20
+ blob: Blob;
37
21
  meta: BlobMeta;
38
22
  }
39
- /** The consumer's blob bridge (injected via the EditorProvider `blobStore` prop). */
23
+ /** The consumer's blob bridge, injected via the EditorProvider `blobStore` prop. */
40
24
  interface BlobStore {
41
- /** Key → the displayable url + the authoritative metadata; rejects an unknown key. */
42
- resolve(key: string): Promise<BlobRef>;
43
- /** Upload: file → the opaque key (the doc holds only the key).
44
- * The consumer may extend or override `meta` (it decides the subtype).
45
- * Throws a typed error on the backend's refusal. */
46
- upload(file: File | Blob, meta?: Partial<BlobMeta>): Promise<string>;
47
- /** Optional: drop the bit (gc). Not required by the v contract. */
48
- remove?(key: string): Promise<void>;
25
+ /** File id → bytes + authoritative metadata; rejects an unknown id. */
26
+ get(fileId: string): Promise<BlobRef>;
27
+ /** Upload a file and return its opaque id. */
28
+ upload(file: File): Promise<string>;
29
+ /** Rename the stored object, return its metadata, and notify subscribers. */
30
+ rename(fileId: string, name: string): Promise<BlobMeta>;
31
+ /** Subscribe to byte or metadata replacement; the callback starts a fresh get. */
32
+ subscribe(fileId: string, onChange: () => void): () => void;
33
+ /** Optional garbage collection. */
34
+ remove?(fileId: string): Promise<void>;
49
35
  }
50
- /** Derive the subtype from the file's mime (the consumer's `meta.subtype` wins). */
51
- declare function blobSubtypeOf(file: File | Blob): BlobSubtype;
52
- /**
53
- * The package's default in-memory store (the consumer passes no `blobStore`):
54
- * uploads stand data urls for the JS session, cleared on the page reload.
55
- */
36
+ /** The default in-memory store: blobs live for the JS session only. */
56
37
  declare function createMemoryBlobStore(): BlobStore;
57
38
  //#endregion
58
39
  //#region src/database/bridge/errors.d.ts
@@ -974,10 +955,12 @@ type EmbedSandboxPolicy = (src: string) => string | null;
974
955
  interface PdfPreviewProps {
975
956
  /** The block's id — the renderer stamps it on its root, like the other block renderers. */
976
957
  id: BlockId;
977
- /** The resolved blob url (the store's resolve result). */
958
+ /** The owning block type (file for new PDFs, image for legacy PDF blocks). */
959
+ blockType: "file" | "image";
960
+ /** The library-owned object URL for the PDF bytes. */
978
961
  url: string;
979
- /** The blob's display name (absent when the store has none). */
980
- name?: string;
962
+ /** The store's authoritative display name. */
963
+ name: string;
981
964
  }
982
965
  /** A PDF first-page preview renderer: a component over a resolved `pdf` blob. */
983
966
  type PdfPreview = ComponentType<PdfPreviewProps>;
@@ -1065,8 +1048,8 @@ interface EditorContextValue {
1065
1048
  ancestorDocIds: readonly string[];
1066
1049
  /** The number of enclosing editor renders (the sync-embed cycle depth bound). */
1067
1050
  embedDepth: number;
1068
- /** The empty-block hint text (the default points at the slash command palette). */
1069
- commandPalettePlaceholder: string;
1051
+ /** The consumer's empty-block hint override; null selects the localized default. */
1052
+ commandPalettePlaceholder: string | null;
1070
1053
  /** The consumer's access level (the effective stand: the own prop, else the enclosing one, else "editor"). */
1071
1054
  accessLevel: AccessLevel;
1072
1055
  /** The effective document mode (resolved: a viewer stands "published" over any stand; a nested provider without its own `mode` inherits the enclosing one). */
@@ -1125,26 +1108,10 @@ interface EditorProviderProps {
1125
1108
  */
1126
1109
  blockRenderers?: BlockRendererMap;
1127
1110
  /**
1128
- * Optional resolver of an image's blob key to an img src; without it the
1129
- * image renders a placeholder.
1130
- *
1131
- * Like `blockRenderers`, the value is read per render into the provider
1132
- * context: pass a stable reference (module-level or memoized) so the
1133
- * context does not churn on every provider render.
1134
- */
1135
- blobResolver?: (key: string) => string;
1136
- /**
1137
- * Optional blob bridge: resolves a blob key to its displayable url and
1138
- * metadata, and uploads a file to a new key (the slash Image path and
1139
- * the future attachment blocks write the key only after the upload
1140
- * resolved). Without it — and without `blobResolver` — the editor uses
1141
- * the shared default in-memory store (uploads stand data urls for the
1142
- * JS session; a page reload clears them), so the upload path works
1143
- * out of the box.
1144
- *
1145
- * Like `blobResolver`, the value is read per render into the provider
1146
- * context: pass a stable reference. A nested provider that supplies
1147
- * none inherits the enclosing store.
1111
+ * Optional blob bridge: returns bytes + authoritative metadata by file id,
1112
+ * uploads and renames files, and notifies open views about store changes.
1113
+ * Without it the editor uses the shared default in-memory store, cleared on
1114
+ * page reload. Pass a stable reference; nested providers inherit it.
1148
1115
  */
1149
1116
  blobStore?: BlobStore;
1150
1117
  /**
@@ -1172,10 +1139,9 @@ interface EditorProviderProps {
1172
1139
  */
1173
1140
  syncEmbedResolver?: SyncEmbedResolver;
1174
1141
  /**
1175
- * Optional PDF first-page preview renderer: a component that renders a
1176
- * `pdf`-subtype image block's resolved blob as a client-side first-page
1177
- * preview (the `./pdf` subpath provides one over pdfjs-dist, an optional
1178
- * peer). Without it the block stands the native iframe viewer.
1142
+ * Optional PDF first-page preview renderer for file blocks and legacy PDF
1143
+ * image blocks. The component receives the library-owned object URL and the
1144
+ * store's authoritative metadata. Without it the native iframe stands.
1179
1145
  *
1180
1146
  * Like `blockRenderers`, the value is read per render into the provider
1181
1147
  * context: pass a stable reference (the component is module-level). A
@@ -1211,10 +1177,9 @@ interface EditorProviderProps {
1211
1177
  */
1212
1178
  rootBlockId?: BlockId;
1213
1179
  /**
1214
- * The command palette placeholder hint text, shown while the caret sits
1215
- * in a text block with no content; defaults to "Type '/' for commands"
1216
- * (`COMMAND_PALETTE_PLACEHOLDER`). A nested provider that supplies none
1217
- * inherits the enclosing value, like the resolvers.
1180
+ * The command palette placeholder override, shown while the caret sits in
1181
+ * an empty text block. The default comes from the editor locale. A nested
1182
+ * provider that supplies none inherits the enclosing override.
1218
1183
  */
1219
1184
  commandPalettePlaceholder?: string;
1220
1185
  /**
@@ -1267,4 +1232,4 @@ declare const DEFAULT_EMBED_SANDBOX = "allow-scripts allow-same-origin allow-for
1267
1232
  /** Read the per-instance editor context; throws outside an EditorProvider. */
1268
1233
  declare function useEditorContext(): EditorContextValue;
1269
1234
  //#endregion
1270
- export { ProtocolLimits as $, filterIsComplete as A, DatabaseBridge as B, DatabaseTableView as C, BlobSubtype as Ct, DatabaseTableRow as D, DatabaseTablePhase as E, BridgeTableDescription as F, IsoInstant as G, FilterConditionInput as H, BridgeValueInput as I, OperationStatus as J, MutationContext as K, CellMap as L, BatchOp as M, BridgeColumn as N, UseDatabaseTable as O, BridgeColumnAnnotation as P, ProtocolDescriptor as Q, CellValueParse as R, DatabaseTableProps as S, BlobStore as St, useDatabaseTable as T, createMemoryBlobStore as Tt, FilterInput as U, DomainEvent as V, Id as W, PageSnapshot as X, PageQuery as Y, ProtocolCapability as Z, PresencePeer as _, isBridgeError as _t, EditorContextValue as a, SortInput as at, useTableList as b, BlobMeta as bt, EmbedSandboxPolicy as c, SubscriptionStatus as ct, PdfPreview as d, TableEvent as dt, QueryOperator as et, PdfPreviewProps as f, TableRef as ft, PresenceIdentity as g, BridgeErrorCode as gt, PresenceCrypto as h, BridgeError as ht, AccessLevel as i, RowWire as it, FilterBuilder as j, emptyFilter as k, MentionEntry as l, TableDescription as lt, SyncEmbedResolver as m, BRIDGE_ERROR_CODES as mt, DEFAULT_EMBED_SANDBOX as n, Revision as nt, EditorMode as o, SubscriptionHandle as ot, PresenceConfig as p, TableSnapshot as pt, MutationReceipt as q, EditorProvider as r, RowPage as rt, EditorProviderProps as s, SubscriptionObserver as st, useEditorContext as t, QuerySemantics as tt, MentionProvider as u, TableEnvelopeBase as ut, PresenceSharing as v, isBridgeErrorCode as vt, UseTableList as w, blobSubtypeOf as wt, DatabaseTable as x, BlobRef as xt, PresenceSharingMode as y, toBridgeError as yt, Column as z };
1235
+ export { ProtocolLimits as $, filterIsComplete as A, DatabaseBridge as B, DatabaseTableView as C, createMemoryBlobStore as Ct, DatabaseTableRow as D, DatabaseTablePhase as E, BridgeTableDescription as F, IsoInstant as G, FilterConditionInput as H, BridgeValueInput as I, OperationStatus as J, MutationContext as K, CellMap as L, BatchOp as M, BridgeColumn as N, UseDatabaseTable as O, BridgeColumnAnnotation as P, ProtocolDescriptor as Q, CellValueParse as R, DatabaseTableProps as S, BlobStore as St, useDatabaseTable as T, FilterInput as U, DomainEvent as V, Id as W, PageSnapshot as X, PageQuery as Y, ProtocolCapability as Z, PresencePeer as _, isBridgeError as _t, EditorContextValue as a, SortInput as at, useTableList as b, BlobMeta as bt, EmbedSandboxPolicy as c, SubscriptionStatus as ct, PdfPreview as d, TableEvent as dt, QueryOperator as et, PdfPreviewProps as f, TableRef as ft, PresenceIdentity as g, BridgeErrorCode as gt, PresenceCrypto as h, BridgeError as ht, AccessLevel as i, RowWire as it, FilterBuilder as j, emptyFilter as k, MentionEntry as l, TableDescription as lt, SyncEmbedResolver as m, BRIDGE_ERROR_CODES as mt, DEFAULT_EMBED_SANDBOX as n, Revision as nt, EditorMode as o, SubscriptionHandle as ot, PresenceConfig as p, TableSnapshot as pt, MutationReceipt as q, EditorProvider as r, RowPage as rt, EditorProviderProps as s, SubscriptionObserver as st, useEditorContext as t, QuerySemantics as tt, MentionProvider as u, TableEnvelopeBase as ut, PresenceSharing as v, isBridgeErrorCode as vt, UseTableList as w, DatabaseTable as x, BlobRef as xt, PresenceSharingMode as y, toBridgeError as yt, Column as z };
package/dist/index.d.mts CHANGED
@@ -1,13 +1,13 @@
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-DtVBbaEs.mjs";
2
+ import { $ as ProtocolLimits, A as filterIsComplete, B as DatabaseBridge, C as DatabaseTableView, Ct as createMemoryBlobStore, 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, 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, x as DatabaseTable, xt as BlobRef, y as PresenceSharingMode, yt as toBridgeError, z as Column } from "./index-DyPFy2m5.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";
6
+ import "i18next";
6
7
  import { VariantProps } from "class-variance-authority";
7
8
  import { ClassValue } from "clsx";
8
9
  import { DayPicker } from "react-day-picker";
9
10
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
10
- import "i18next";
11
11
  import * as PopoverPrimitive from "@radix-ui/react-popover";
12
12
  import * as SeparatorPrimitive from "@radix-ui/react-separator";
13
13
  import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
@@ -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 BlobSubtype, 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, blobSubtypeOf, 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 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 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-BBbAwxWT.mjs";
2
- import { d as cn, l as preventDefault } from "./constants-BaAj3jDA.mjs";
1
+ import { $ as SelectValue, A as useBlock, At as CardFooter, B as DEFAULT_EMBED_SANDBOX, Bt as Badge, C as isBridgeError, Ct as PopoverTrigger, D as parseCellValue, Dt as CardAction, E as conditionMatches, Et as Card, F as useSelection, G as SelectContent, Gt as DocblocksI18nProvider, H as SegmentSelector, Ht as Alert, I as useSelectionView, It as BookOpen, J as SelectLabel, Jt as createMemoryBlobStore, K as SelectGroup, L as useText, Lt as Button, M as useMeta, Mt as CardTitle, N as usePresence, Nt as Pen, O as TEXT_TYPES, Ot as CardContent, P as usePresenceSharing, Pt as Eye, Q as SelectTrigger, R as EditorProvider, Rt as buttonVariants, S as BridgeError, St as PopoverTitle, T as toBridgeError, Tt as Checkbox, U as ScrollArea, Ut as AlertDescription, V as Skeleton, Vt as badgeVariants, W as Select, Wt as AlertTitle, 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 renderRuns, 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 BareSelect } from "./Editor-BavCl07r.mjs";
2
+ import { a as preventDefault, p as cn } from "./constants-2VXoyPmd.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";
@@ -756,4 +756,4 @@ const UI_FONT_STACK = "'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif
756
756
  */
757
757
  const MONO_FONT_STACK = "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
758
758
  //#endregion
759
- export { Alert, AlertDescription, AlertTitle, BASELINE_CAPABILITIES, BRIDGE_ERROR_CODES, Badge, BareSelect, BridgeError, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, DEFAULT_EMBED_SANDBOX, DatabaseTable, DocHeader, DocblocksI18nProvider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Editor, EditorProvider, FORMAT_PALETTE, FilterBuilder, Input, Label, MONO_FONT_STACK, PROTOCOL_VERSION, 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, badgeVariants, blobSubtypeOf, 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 };
759
+ export { Alert, AlertDescription, AlertTitle, BASELINE_CAPABILITIES, BRIDGE_ERROR_CODES, Badge, BareSelect, BridgeError, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, DEFAULT_EMBED_SANDBOX, DatabaseTable, DocHeader, DocblocksI18nProvider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Editor, EditorProvider, FORMAT_PALETTE, FilterBuilder, Input, Label, MONO_FONT_STACK, PROTOCOL_VERSION, 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, 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 };
@@ -1,5 +1,5 @@
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-BBbAwxWT.mjs";
2
- import { r as TriangleAlert } from "../constants-BaAj3jDA.mjs";
1
+ import { Ft as CodeXml, H as SegmentSelector, Ht as Alert, Kt as INLINE_CODE_CLASS, Pt as Eye, Ut as AlertDescription, V as Skeleton, Wt as AlertTitle, c as textOf, n as childrenSlot, o as TextBlock, r as CodeHeader, z as useEditorContext } from "../Editor-BavCl07r.mjs";
2
+ import { c as TriangleAlert } from "../constants-2VXoyPmd.mjs";
3
3
  import { t as LoaderCircle } from "../LoaderCircle-AGVFE4IP.mjs";
4
4
  import { useEffect, useRef, useState } from "react";
5
5
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
- import { f as PdfPreviewProps } from "../index-DtVBbaEs.mjs";
1
+ import { f as PdfPreviewProps } from "../index-DyPFy2m5.mjs";
2
2
  //#region src/pdf/PdfFirstPage.d.ts
3
- declare function PdfFirstPage({ id, url, name }: PdfPreviewProps): import("react").JSX.Element;
3
+ declare function PdfFirstPage({ id, blockType, url, name }: PdfPreviewProps): import("react").JSX.Element;
4
4
  //#endregion
5
5
  export { PdfFirstPage, type PdfPreviewProps };