docblocks-react-ui 0.0.0-stage → 0.1.1
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 +107 -0
- package/LICENSE +21 -0
- package/README.md +592 -2
- package/dist/Editor-CiJY5R4v.mjs +26587 -0
- package/dist/Editor-DT7RkRXf.d.mts +32 -0
- package/dist/LoaderCircle-AGVFE4IP.mjs +19 -0
- package/dist/Skeleton-D922Ths5.mjs +13 -0
- package/dist/constants-D4FTL0ph.mjs +81 -0
- package/dist/fonts/OFL.txt +162 -0
- package/dist/fonts/inter-300-c.woff2 +0 -0
- package/dist/fonts/inter-300-l.woff2 +0 -0
- package/dist/fonts/inter-300i-c.woff2 +0 -0
- package/dist/fonts/inter-300i-l.woff2 +0 -0
- package/dist/fonts/inter-400-c.woff2 +0 -0
- package/dist/fonts/inter-400-l.woff2 +0 -0
- package/dist/fonts/inter-400i-c.woff2 +0 -0
- package/dist/fonts/inter-400i-l.woff2 +0 -0
- package/dist/fonts/inter-600-c.woff2 +0 -0
- package/dist/fonts/inter-600-l.woff2 +0 -0
- package/dist/fonts/inter-600i-c.woff2 +0 -0
- package/dist/fonts/inter-600i-l.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-300-c.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-300-l.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-300i-c.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-300i-l.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-400-c.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-400-l.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-400i-c.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-400i-l.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-600-c.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-600-l.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-600i-c.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-600i-l.woff2 +0 -0
- package/dist/fonts/lora-400-c.woff2 +0 -0
- package/dist/fonts/lora-400-l.woff2 +0 -0
- package/dist/fonts/lora-400i-c.woff2 +0 -0
- package/dist/fonts/lora-400i-l.woff2 +0 -0
- package/dist/fonts/lora-600-c.woff2 +0 -0
- package/dist/fonts/lora-600-l.woff2 +0 -0
- package/dist/fonts/lora-600i-c.woff2 +0 -0
- package/dist/fonts/lora-600i-l.woff2 +0 -0
- package/dist/fonts/lora-700-c.woff2 +0 -0
- package/dist/fonts/lora-700-l.woff2 +0 -0
- package/dist/fonts/lora-700i-c.woff2 +0 -0
- package/dist/fonts/lora-700i-l.woff2 +0 -0
- package/dist/fonts/open-sans-300-c.woff2 +0 -0
- package/dist/fonts/open-sans-300-l.woff2 +0 -0
- package/dist/fonts/open-sans-300i-c.woff2 +0 -0
- package/dist/fonts/open-sans-300i-l.woff2 +0 -0
- package/dist/fonts/open-sans-400-c.woff2 +0 -0
- package/dist/fonts/open-sans-400-l.woff2 +0 -0
- package/dist/fonts/open-sans-400i-c.woff2 +0 -0
- package/dist/fonts/open-sans-400i-l.woff2 +0 -0
- package/dist/fonts/open-sans-600-c.woff2 +0 -0
- package/dist/fonts/open-sans-600-l.woff2 +0 -0
- package/dist/fonts/open-sans-600i-c.woff2 +0 -0
- package/dist/fonts/open-sans-600i-l.woff2 +0 -0
- package/dist/fonts/pt-sans-400-c.woff2 +0 -0
- package/dist/fonts/pt-sans-400-l.woff2 +0 -0
- package/dist/fonts/pt-sans-400i-c.woff2 +0 -0
- package/dist/fonts/pt-sans-400i-l.woff2 +0 -0
- package/dist/fonts/pt-sans-700-c.woff2 +0 -0
- package/dist/fonts/pt-sans-700-l.woff2 +0 -0
- package/dist/fonts/pt-sans-700i-c.woff2 +0 -0
- package/dist/fonts/pt-sans-700i-l.woff2 +0 -0
- package/dist/fonts/pt-serif-400-c.woff2 +0 -0
- package/dist/fonts/pt-serif-400-l.woff2 +0 -0
- package/dist/fonts/pt-serif-400i-c.woff2 +0 -0
- package/dist/fonts/pt-serif-400i-l.woff2 +0 -0
- package/dist/fonts/pt-serif-700-c.woff2 +0 -0
- package/dist/fonts/pt-serif-700-l.woff2 +0 -0
- package/dist/fonts/pt-serif-700i-c.woff2 +0 -0
- package/dist/fonts/pt-serif-700i-l.woff2 +0 -0
- package/dist/index-D6_ysSmQ.d.mts +1075 -0
- package/dist/index-YJcgf8Hh.d.mts +39 -0
- package/dist/index.d.mts +388 -0
- package/dist/index.mjs +641 -0
- package/dist/mermaid/index.d.mts +10 -0
- package/dist/mermaid/index.mjs +252 -0
- package/dist/motion/index.d.mts +8 -0
- package/dist/motion/index.mjs +1009 -0
- package/dist/pdf/index.d.mts +5 -0
- package/dist/pdf/index.mjs +164 -0
- package/dist/pdf/jbig2.wasm +0 -0
- package/dist/pdf/jbig2_nowasm_fallback.js +15 -0
- package/dist/pdf/pdf.worker.min.mjs +28 -0
- package/dist/styles.css +4562 -0
- package/package.json +99 -4
- package/theme.css +128 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ComponentType, ReactNode } from "react";
|
|
2
|
+
import { Block, BlockId, BlockType, Doc, TextRun } from "docblocks-core";
|
|
3
|
+
//#region src/blocks/renderers.d.ts
|
|
4
|
+
/** The props a block renderer receives: the block id and its plain snapshot. */
|
|
5
|
+
interface BlockRendererProps {
|
|
6
|
+
id: BlockId;
|
|
7
|
+
block: Block;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A consumer renderer for a block type; resolved in place of the built-in
|
|
11
|
+
* renderer. Replacing a text-editable type swaps the whole block view,
|
|
12
|
+
* including the wrapper, the contenteditable element, and its editing
|
|
13
|
+
* affordance — a renderer that needs editing drives the core commands
|
|
14
|
+
* through the hooks (the consumer builds its own UI on top of them).
|
|
15
|
+
*
|
|
16
|
+
* The built-in text renderers read the per-block context (the page
|
|
17
|
+
* context — the root, a table cell, or a frame — and the flat page
|
|
18
|
+
* sequence) for the keyboard gestures; a consumer renderer does not read
|
|
19
|
+
* it — the context is part of the built-in rendering, not of the renderer
|
|
20
|
+
* contract. Nesting is a derived notion (the flat page model: a block's
|
|
21
|
+
* `indent` attr relative to its preceding block, not a data field), so a
|
|
22
|
+
* replaced block does not receive its derived nested content — the
|
|
23
|
+
* sequence rendering stands a block's deeper followers as a nested slot
|
|
24
|
+
* AFTER the replaced view (the content is never dropped); a renderer that
|
|
25
|
+
* wants to render them itself drives the doc through the hooks.
|
|
26
|
+
*
|
|
27
|
+
* A renderer is a plain render function, not a component: it is invoked
|
|
28
|
+
* during the block view's render, so it must not call hooks itself —
|
|
29
|
+
* return a component's output from a wrapper component if needed.
|
|
30
|
+
*/
|
|
31
|
+
type BlockRenderer = (props: BlockRendererProps) => ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* Per-instance consumer renderers, keyed by block type. A type without an
|
|
34
|
+
* entry keeps its built-in renderer; a type with neither renders the
|
|
35
|
+
* placeholder (future block types keep working).
|
|
36
|
+
*/
|
|
37
|
+
type BlockRendererMap = Partial<Record<BlockType, BlockRenderer>>;
|
|
38
|
+
//#endregion
|
|
39
|
+
export { BlockRendererMap as n, BlockRendererProps as r, BlockRenderer as t };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
import { n as BlockRendererMap, r as BlockRendererProps, t as BlockRenderer } from "./index-YJcgf8Hh.mjs";
|
|
2
|
+
import { n as EditorView, t as Editor } from "./Editor-DT7RkRXf.mjs";
|
|
3
|
+
import { $ as TableEnvelopeBase, A as DomainEvent, B as ProtocolCapability, C as BridgeColumnAnnotation, D as CellValueParse, E as CellMap, F as MutationContext, G as Revision, H as ProtocolLimits, I as MutationReceipt, J as SortInput, K as RowPage, L as OperationStatus, M as FilterInput, N as Id, O as Column, P as IsoInstant, Q as TableDescription, R as PageQuery, S as BridgeColumn, T as BridgeValueInput, U as QueryOperator, V as ProtocolDescriptor, W as QuerySemantics, X as SubscriptionObserver, Y as SubscriptionHandle, Z as SubscriptionStatus, _ as UseDatabaseTable, a as EditorContextValue, at as BridgeErrorCode, b as FilterBuilder, c as EmbedSandboxPolicy, ct as toBridgeError, d as PdfPreview, dt as BlobStore, et as TableEvent, f as PdfPreviewProps, ft as BlobSubtype, g as DatabaseTableRow, h as DatabaseTablePhase, i as AccessLevel, it as BridgeError, j as FilterConditionInput, k as DatabaseBridge, l as MentionEntry, lt as BlobMeta, m as useDatabaseTable, mt as createMemoryBlobStore, n as DEFAULT_EMBED_SANDBOX, nt as TableSnapshot, o as EditorMode, ot as isBridgeError, p as SyncEmbedResolver, pt as blobSubtypeOf, q as RowWire, r as EditorProvider, rt as BRIDGE_ERROR_CODES, s as EditorProviderProps, st as isBridgeErrorCode, t as useEditorContext, tt as TableRef, u as MentionProvider, ut as BlobRef, v as emptyFilter, w as BridgeTableDescription, x as BatchOp, y as filterIsComplete, z as PageSnapshot } from "./index-D6_ysSmQ.mjs";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { ComponentType, ReactNode } from "react";
|
|
6
|
+
import { Block, BlockId, BlockType, Doc, DocMeta, PresenceState, Selection, SelectionView, SyncEmbedRef, TextRun } from "docblocks-core";
|
|
7
|
+
import { VariantProps } from "class-variance-authority";
|
|
8
|
+
import { ClassValue } from "clsx";
|
|
9
|
+
import { DayPicker } from "react-day-picker";
|
|
10
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
11
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
12
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
13
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
14
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
15
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
16
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
17
|
+
//#region src/database/bridge/annotation.d.ts
|
|
18
|
+
/** The standard PostgreSQL type names per operator / input group. The contract
|
|
19
|
+
* is type-agnostic — this is the package's DEFAULT catalog; a non-standard
|
|
20
|
+
* type name falls back to the minimal `is` / `is not` + the text input, and
|
|
21
|
+
* the consumer's `operators` override always wins. */
|
|
22
|
+
declare const TEXT_TYPES: Set<string>;
|
|
23
|
+
/**
|
|
24
|
+
* Builds the column annotation from the `BridgeColumn`: the operator
|
|
25
|
+
* catalog (the consumer's `operators` override, else the option-based
|
|
26
|
+
* catalog for the option columns, else the package default for the
|
|
27
|
+
* Postgres type, else the minimal `is` / `is not`) + the value input
|
|
28
|
+
* kind. The filter builder renders from this; `snapshotTable` / `queryNextPage` must apply
|
|
29
|
+
* exactly the declared operators.
|
|
30
|
+
*/
|
|
31
|
+
declare function columnAnnotation(column: BridgeColumn): BridgeColumnAnnotation;
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/database/bridge/filter.d.ts
|
|
34
|
+
/**
|
|
35
|
+
* Validates a raw (string) value against the value input kind before it is
|
|
36
|
+
* written to the row (the number must parse, the date / datetime must be a
|
|
37
|
+
* real date). The empty string is a valid "clear" (null). text / enum /
|
|
38
|
+
* row-link / boolean pass through (the browser input / the picker
|
|
39
|
+
* already constrains them).
|
|
40
|
+
*/
|
|
41
|
+
declare function parseCellValue(kind: BridgeValueInput, raw: string): CellValueParse;
|
|
42
|
+
/** Evaluates one filter condition against a cell value. */
|
|
43
|
+
declare function conditionMatches(op: string, value: unknown, expected: unknown): boolean;
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/database/bridge/protocol.d.ts
|
|
46
|
+
/** The protocol's version. */
|
|
47
|
+
declare const PROTOCOL_VERSION = 2;
|
|
48
|
+
/** The capabilities every conformant bridge declares (the baseline:
|
|
49
|
+
* the ordered rows, the snapshot → replay bootstrap, the idempotent
|
|
50
|
+
* writes, the structured errors, and the view invalidation). */
|
|
51
|
+
declare const BASELINE_CAPABILITIES: readonly ["orderedRows", "snapshotReplay", "idempotentWrites", "structuredErrors", "viewInvalidation"];
|
|
52
|
+
/** The bridge's guard (a pre-contract bridge object stands none of the discriminators). */
|
|
53
|
+
declare function isDatabaseBridge(candidate: unknown): candidate is DatabaseBridge;
|
|
54
|
+
/**
|
|
55
|
+
* Validates the negotiated descriptor: the protocol version 2 + every
|
|
56
|
+
* baseline capability. Returns the capability set the UI gates its
|
|
57
|
+
* optional paths on (the `rowRestore` / `columnRestore` / `mixedBatch` /
|
|
58
|
+
* `cas` / `serverSort` stands). A mismatched version or a missing baseline
|
|
59
|
+
* capability rejects with `protocol_mismatch`.
|
|
60
|
+
*/
|
|
61
|
+
declare function validateProtocolDescriptor(descriptor: ProtocolDescriptor): Set<ProtocolCapability>;
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/database/use-database-table/utils.d.ts
|
|
64
|
+
/** The cell-value equality (null / undefined stand as the empty cell). */
|
|
65
|
+
declare function cellValueEqual(current: unknown, next: unknown): boolean;
|
|
66
|
+
/** The write's context: the fresh client-issued operation id (a UUID,
|
|
67
|
+
* unique within the retention) + the issue time. Every user action stands
|
|
68
|
+
* a fresh `operationId` — the id is never reused across logical
|
|
69
|
+
* operations, and a failed write is reconciled by the SAME id (the
|
|
70
|
+
* bridge's idempotency), never a silent new one. */
|
|
71
|
+
declare function newMutationContext(): MutationContext;
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/canvas/text-fonts.d.ts
|
|
74
|
+
/**
|
|
75
|
+
* The shape text's font options: the
|
|
76
|
+
* self-hosted set (the package ships the woff2 in fonts/ + the
|
|
77
|
+
* @font-face in the assembled stylesheet's section 5) — each with a
|
|
78
|
+
* Cyrillic-capable fallback in the stack (a file / family missing on
|
|
79
|
+
* the consumer's side degrades to the fallback, not to invisible).
|
|
80
|
+
*
|
|
81
|
+
* The weight coverage per family follows the family's available weights
|
|
82
|
+
* (PT Sans stands 700 over the 600, Lora / PT Serif stand 400 over the
|
|
83
|
+
* 300 — the browser's font matching picks the nearest stand).
|
|
84
|
+
*/
|
|
85
|
+
declare const SHAPE_FONT_OPTIONS: readonly [{
|
|
86
|
+
readonly id: "Inter";
|
|
87
|
+
readonly label: "Inter";
|
|
88
|
+
readonly stack: "'Inter', 'Open Sans', Arial, sans-serif";
|
|
89
|
+
}, {
|
|
90
|
+
readonly id: "Open Sans";
|
|
91
|
+
readonly label: "Open Sans";
|
|
92
|
+
readonly stack: "'Open Sans', Arial, sans-serif";
|
|
93
|
+
}, {
|
|
94
|
+
readonly id: "PT Sans";
|
|
95
|
+
readonly label: "PT Sans";
|
|
96
|
+
readonly stack: "'PT Sans', 'Open Sans', Arial, sans-serif";
|
|
97
|
+
}, {
|
|
98
|
+
readonly id: "Lora";
|
|
99
|
+
readonly label: "Lora";
|
|
100
|
+
readonly stack: "'Lora', Georgia, 'Times New Roman', serif";
|
|
101
|
+
}, {
|
|
102
|
+
readonly id: "PT Serif";
|
|
103
|
+
readonly label: "PT Serif";
|
|
104
|
+
readonly stack: "'PT Serif', Georgia, 'Times New Roman', serif";
|
|
105
|
+
}, {
|
|
106
|
+
readonly id: "JetBrains Mono";
|
|
107
|
+
readonly label: "JetBrains Mono";
|
|
108
|
+
readonly stack: "'JetBrains Mono', 'Courier New', monospace";
|
|
109
|
+
}];
|
|
110
|
+
/** The name → the stack map (the absent / an unrecognized name falls to
|
|
111
|
+
* the raw name — a consumer's own loaded font is addressable by name). */
|
|
112
|
+
declare const SHAPE_FONT_STACKS: Record<string, string>;
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region src/DocHeader.d.ts
|
|
115
|
+
declare function DocHeader({ doc, view, onViewChange, accessLevel, mode, onModeChange, publishedDoc }: {
|
|
116
|
+
/** The headless document (the consumer's own stand: the live doc over the editor's stand, the published snapshot over the viewer's stand — the reader's browser never holds the live document). */
|
|
117
|
+
doc?: Doc;
|
|
118
|
+
view: EditorView;
|
|
119
|
+
onViewChange: (view: EditorView) => void;
|
|
120
|
+
/** The consumer's user access level (the switcher's gate): a "viewer" stands the published's mode forced (the switcher stands no stand); an "editor" (the default) may switch the modes. */
|
|
121
|
+
accessLevel?: AccessLevel;
|
|
122
|
+
/** The current document mode (consumer-controlled, like `view`): the switcher's value over the "editor"'s level. */
|
|
123
|
+
mode?: EditorMode;
|
|
124
|
+
/** The mode's change (the consumer owns the state, like `onViewChange`): the switcher's entry stands only over the callback's presence. */
|
|
125
|
+
onModeChange?: (mode: EditorMode) => void;
|
|
126
|
+
/** The published snapshot (the meta's source over the published's stand; the "Published"'s option stands disabled over its absence). */
|
|
127
|
+
publishedDoc?: Doc | null;
|
|
128
|
+
}): import("react").JSX.Element;
|
|
129
|
+
//#endregion
|
|
130
|
+
//#region src/hooks.d.ts
|
|
131
|
+
/** The headless document owned by the nearest EditorProvider. */
|
|
132
|
+
declare function useDoc(): Doc;
|
|
133
|
+
/**
|
|
134
|
+
* The block snapshot at id; undefined when the block is missing (e.g.
|
|
135
|
+
* removed by a peer). Selecting the reference itself keeps consumers
|
|
136
|
+
* re-rendering only when the block actually changed.
|
|
137
|
+
*/
|
|
138
|
+
declare function useBlock(id: BlockId): Block | undefined;
|
|
139
|
+
/**
|
|
140
|
+
* The flattened text of the block's runs. Read from the store (not via
|
|
141
|
+
* `doc.getText`) so the read participates in the store's reference
|
|
142
|
+
* stability: the selector re-runs on store changes, but consumers
|
|
143
|
+
* re-render only when the flattened text actually changes.
|
|
144
|
+
*/
|
|
145
|
+
declare function useText(id: BlockId): string;
|
|
146
|
+
/** The local view selection; a separate slice so caret moves do not re-render block consumers. */
|
|
147
|
+
declare function useSelection(): Selection;
|
|
148
|
+
/** Remote peers' ephemeral state; a separate slice for the same reason. */
|
|
149
|
+
declare function usePresence(): PresenceState[];
|
|
150
|
+
/** The document meta; the reference is replaced only when the title changed. */
|
|
151
|
+
declare function useMeta(): DocMeta;
|
|
152
|
+
/**
|
|
153
|
+
* The per-instance selection view for setting selections and reading the
|
|
154
|
+
* local state; null before the mount effect ran and after unmount (the
|
|
155
|
+
* view is destroyed on unmount). Read it at event time (the render value
|
|
156
|
+
* only updates when the component re-renders), not in effects keyed on
|
|
157
|
+
* unrelated state.
|
|
158
|
+
*/
|
|
159
|
+
declare function useSelectionView(): SelectionView | null;
|
|
160
|
+
//#endregion
|
|
161
|
+
//#region src/editing/keyboard/models.d.ts
|
|
162
|
+
/** The marks the format shortcuts and the mark toolbar toggle. */
|
|
163
|
+
type FormatMark = "bold" | "italic" | "strike" | "underline" | "code";
|
|
164
|
+
//#endregion
|
|
165
|
+
//#region src/editing/keyboard/utils.d.ts
|
|
166
|
+
/**
|
|
167
|
+
* The toggle decision for one mark over [from, to): "unset" when every run
|
|
168
|
+
* overlapping the range already carries the mark, "set" otherwise. A
|
|
169
|
+
* partially covered run counts only if it carries the mark. Reads the block
|
|
170
|
+
* snapshot via `getBlock`; the caller issues the command.
|
|
171
|
+
*/
|
|
172
|
+
declare function markToggleAction(doc: Doc, blockId: BlockId, from: number, to: number, mark: FormatMark): "set" | "unset";
|
|
173
|
+
//#endregion
|
|
174
|
+
//#region src/editing/format-toolbar/constants.d.ts
|
|
175
|
+
/** The default format palette: the shared palette's seven pastel theme
|
|
176
|
+
* tokens + the theme's own background token (a consumer can pass its own
|
|
177
|
+
* through the editor's `formatPalette` prop — a `string[]` of hex or var). */
|
|
178
|
+
declare const FORMAT_PALETTE: readonly string[];
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region src/text/runs.d.ts
|
|
181
|
+
/**
|
|
182
|
+
* Render inline text runs with their marks (lenient reader contract:
|
|
183
|
+
* unknown marks are ignored and the text is kept). The link's href is
|
|
184
|
+
* gated over the public contract (the remote input is not validated —
|
|
185
|
+
* an unsafe scheme stands the plain text, never the raw <a>).
|
|
186
|
+
*/
|
|
187
|
+
declare function renderRuns(runs: TextRun[]): ReactNode;
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region src/fonts.d.ts
|
|
190
|
+
/**
|
|
191
|
+
* The package's font subsystem — the single place for the package's fonts.
|
|
192
|
+
*
|
|
193
|
+
* One self-hosted set (the woff2 in `fonts/`; the @font-face declarations in
|
|
194
|
+
* the assembled stylesheet's last section, `fonts/shape-fonts.css`) — a file
|
|
195
|
+
* is fetched only for the used family / weight / subset via `unicode-range`.
|
|
196
|
+
*
|
|
197
|
+
* Three roles share the set:
|
|
198
|
+
* - The UI default font (the editor's chrome + the page text) — `Inter`,
|
|
199
|
+
* the `--docblocks-font-family` token's default (the consumer's
|
|
200
|
+
* `--font-sans` override takes priority — the token contract is unchanged).
|
|
201
|
+
* - The shape text's font options (`SHAPE_FONT_OPTIONS` — the shape
|
|
202
|
+
* `fontFamily` attr's catalog; a consumer's own loaded font is addressable
|
|
203
|
+
* by its raw name — the absent / an unrecognized name falls to the raw name).
|
|
204
|
+
* - The mono font (the code block) — the `--docblocks-mono-
|
|
205
|
+
* font-family` token's default (the consumer's `--font-mono` override takes
|
|
206
|
+
* priority).
|
|
207
|
+
*
|
|
208
|
+
* Adding a font:
|
|
209
|
+
* 1. Drop the woff2 in `fonts/` under the `<family>-<weight><i?>-<l|c>.woff2`
|
|
210
|
+
* naming (l = latin, c = cyrillic).
|
|
211
|
+
* 2. Add the @font-face declarations to `fonts/shape-fonts.css` (a
|
|
212
|
+
* unicode-range per subset, so a subset is fetched only when used).
|
|
213
|
+
* 3. If the font is a shape option, add it to `SHAPE_FONT_OPTIONS` — the
|
|
214
|
+
* `SHAPE_FONT_STACKS` map derives from it.
|
|
215
|
+
* The build (`scripts/assemble-styles.mjs`) copies `fonts/` to `dist/fonts/`
|
|
216
|
+
* and appends the @font-face section to the shipped stylesheet.
|
|
217
|
+
*/
|
|
218
|
+
/** The UI default font's name (self-hosted — the shape set's own Inter). */
|
|
219
|
+
declare const UI_FONT_ID = "Inter";
|
|
220
|
+
/**
|
|
221
|
+
* The UI default font's stack: the self-hosted Inter first, then the system
|
|
222
|
+
* fallbacks (a consumer without the package's stylesheet degrades to the
|
|
223
|
+
* system font, not to nothing). Stands the `--docblocks-font-family` token's
|
|
224
|
+
* default.
|
|
225
|
+
*/
|
|
226
|
+
declare const UI_FONT_STACK = "'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif";
|
|
227
|
+
/**
|
|
228
|
+
* The mono default's stack (the code block). Stands the
|
|
229
|
+
* `--docblocks-mono-font-family` token's default.
|
|
230
|
+
*/
|
|
231
|
+
declare const MONO_FONT_STACK = "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
|
|
232
|
+
//#endregion
|
|
233
|
+
//#region src/shared/ui/Alert.d.ts
|
|
234
|
+
declare const alertVariants: (props?: ({
|
|
235
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
236
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
237
|
+
declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): React.JSX.Element;
|
|
238
|
+
declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
239
|
+
declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
240
|
+
//#endregion
|
|
241
|
+
//#region src/shared/ui/Badge.d.ts
|
|
242
|
+
declare const badgeVariants: (props?: ({
|
|
243
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "custom" | null | undefined;
|
|
244
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
245
|
+
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
246
|
+
asChild?: boolean;
|
|
247
|
+
}): React.JSX.Element;
|
|
248
|
+
//#endregion
|
|
249
|
+
//#region src/shared/ui/BareSelect.d.ts
|
|
250
|
+
declare function BareSelect({ className, children, ...props }: React.ComponentProps<"select">): React.JSX.Element;
|
|
251
|
+
//#endregion
|
|
252
|
+
//#region src/shared/ui/Button.d.ts
|
|
253
|
+
declare const buttonVariants: (props?: ({
|
|
254
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
255
|
+
size?: "default" | "icon" | "sm" | "lg" | "xl" | null | undefined;
|
|
256
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
257
|
+
declare function Button({ className, variant, size, asChild, type, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
258
|
+
asChild?: boolean;
|
|
259
|
+
}): React.JSX.Element;
|
|
260
|
+
//#endregion
|
|
261
|
+
//#region src/shared/ui/Card.d.ts
|
|
262
|
+
declare function Card({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
263
|
+
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
264
|
+
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
265
|
+
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
266
|
+
declare function CardAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
267
|
+
declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
268
|
+
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
269
|
+
//#endregion
|
|
270
|
+
//#region src/shared/ui/Checkbox.d.ts
|
|
271
|
+
declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): React.JSX.Element;
|
|
272
|
+
//#endregion
|
|
273
|
+
//#region src/shared/ui/DropdownMenu.d.ts
|
|
274
|
+
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): React.JSX.Element;
|
|
275
|
+
declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): React.JSX.Element;
|
|
276
|
+
declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): React.JSX.Element;
|
|
277
|
+
declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): React.JSX.Element;
|
|
278
|
+
declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): React.JSX.Element;
|
|
279
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
280
|
+
inset?: boolean;
|
|
281
|
+
variant?: "default" | "destructive";
|
|
282
|
+
}): React.JSX.Element;
|
|
283
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): React.JSX.Element;
|
|
284
|
+
declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): React.JSX.Element;
|
|
285
|
+
declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): React.JSX.Element;
|
|
286
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
287
|
+
inset?: boolean;
|
|
288
|
+
}): React.JSX.Element;
|
|
289
|
+
declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): React.JSX.Element;
|
|
290
|
+
declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
291
|
+
declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): React.JSX.Element;
|
|
292
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
293
|
+
inset?: boolean;
|
|
294
|
+
}): React.JSX.Element;
|
|
295
|
+
declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): React.JSX.Element;
|
|
296
|
+
//#endregion
|
|
297
|
+
//#region src/shared/ui/Input.d.ts
|
|
298
|
+
declare const inputVariants: (props?: ({
|
|
299
|
+
size?: "default" | "sm" | null | undefined;
|
|
300
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
301
|
+
/**
|
|
302
|
+
* The input's props: the native input props minus the native `size`
|
|
303
|
+
* attribute (the number) — it would collide with the size variant
|
|
304
|
+
* (`number & "sm" | "default"` collapses to `undefined`); the variant
|
|
305
|
+
* takes the name.
|
|
306
|
+
*/
|
|
307
|
+
type InputProps = Omit<React.ComponentProps<"input">, "size"> & VariantProps<typeof inputVariants>;
|
|
308
|
+
declare function Input({ className, size, type, ...props }: InputProps): React.JSX.Element;
|
|
309
|
+
//#endregion
|
|
310
|
+
//#region src/shared/ui/Label.d.ts
|
|
311
|
+
declare function Label({ className, ...props }: React.ComponentProps<"label">): React.JSX.Element;
|
|
312
|
+
//#endregion
|
|
313
|
+
//#region src/shared/ui/Popover.d.ts
|
|
314
|
+
declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): React.JSX.Element;
|
|
315
|
+
declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): React.JSX.Element;
|
|
316
|
+
declare function PopoverContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>): React.JSX.Element;
|
|
317
|
+
declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): React.JSX.Element;
|
|
318
|
+
declare function PopoverHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
319
|
+
declare function PopoverTitle({ className, ...props }: React.ComponentProps<"h2">): React.JSX.Element;
|
|
320
|
+
declare function PopoverDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
|
|
321
|
+
//#endregion
|
|
322
|
+
//#region src/shared/ui/Separator.d.ts
|
|
323
|
+
declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>): React.JSX.Element;
|
|
324
|
+
//#endregion
|
|
325
|
+
//#region src/shared/ui/Select.d.ts
|
|
326
|
+
declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): React.JSX.Element;
|
|
327
|
+
declare function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): React.JSX.Element;
|
|
328
|
+
declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): React.JSX.Element;
|
|
329
|
+
declare function SelectTrigger({ className, size, bare, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
330
|
+
size?: "sm" | "default";
|
|
331
|
+
/** The iconless trigger (the flat cell stand — the chevron is
|
|
332
|
+
* hidden; the value / the placeholder stand alone). */
|
|
333
|
+
bare?: boolean;
|
|
334
|
+
}): React.JSX.Element;
|
|
335
|
+
declare function SelectContent({ className, children, position, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): React.JSX.Element;
|
|
336
|
+
declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): React.JSX.Element;
|
|
337
|
+
declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): React.JSX.Element;
|
|
338
|
+
declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>): React.JSX.Element;
|
|
339
|
+
declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): React.JSX.Element;
|
|
340
|
+
declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): React.JSX.Element;
|
|
341
|
+
//#endregion
|
|
342
|
+
//#region src/shared/ui/ScrollArea.d.ts
|
|
343
|
+
/**
|
|
344
|
+
* The thin-scrollbar scroll container: the native scrollbar styled to the
|
|
345
|
+
* theme's border color (`scrollbar-width: thin` + `scrollbar-color`), so a
|
|
346
|
+
* scrollable region never shows the browser's default bar. The focus ring
|
|
347
|
+
* stands for the keyboard scroll (the container takes the focus while a
|
|
348
|
+
* user scrolls it with the keys).
|
|
349
|
+
*
|
|
350
|
+
* React 19: the `ref` stands as a regular prop (ref-as-prop) — the consumer
|
|
351
|
+
* holds a DOM handle of the scroll element (the slash menu's active-item
|
|
352
|
+
* auto-scroll queries through it).
|
|
353
|
+
*/
|
|
354
|
+
declare function ScrollArea({ className, ref, ...props }: React.ComponentProps<"div"> & {
|
|
355
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
356
|
+
}): React.JSX.Element;
|
|
357
|
+
//#endregion
|
|
358
|
+
//#region src/shared/ui/Skeleton.d.ts
|
|
359
|
+
declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
360
|
+
//#endregion
|
|
361
|
+
//#region src/shared/ui/Tabs.d.ts
|
|
362
|
+
/**
|
|
363
|
+
* The tabs primitive (Radix): a root with a list of triggers and the
|
|
364
|
+
* optional content panels. The root is controlled through `value` /
|
|
365
|
+
* `onValueChange` (or uncontrolled through `defaultValue`); the list
|
|
366
|
+
* carries the `default` (a muted pill) or the `line` variant (an
|
|
367
|
+
* underline under the active tab). The trigger's active state is the
|
|
368
|
+
* Radix `data-state="active"` attribute, styled through the
|
|
369
|
+
* `data-[state=active]:` classes.
|
|
370
|
+
*/
|
|
371
|
+
declare function Tabs({ className, orientation, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>): React.JSX.Element;
|
|
372
|
+
declare const tabsListVariants: (props?: ({
|
|
373
|
+
variant?: "line" | "default" | null | undefined;
|
|
374
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
375
|
+
declare function TabsList({ className, variant, ...props }: React.ComponentProps<typeof TabsPrimitive.List> & VariantProps<typeof tabsListVariants>): React.JSX.Element;
|
|
376
|
+
declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>): React.JSX.Element;
|
|
377
|
+
declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>): React.JSX.Element;
|
|
378
|
+
//#endregion
|
|
379
|
+
//#region src/shared/ui/Tooltip.d.ts
|
|
380
|
+
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): React.JSX.Element;
|
|
381
|
+
declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): React.JSX.Element;
|
|
382
|
+
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): React.JSX.Element;
|
|
383
|
+
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): React.JSX.Element;
|
|
384
|
+
//#endregion
|
|
385
|
+
//#region src/shared/ui/cn.d.ts
|
|
386
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
387
|
+
//#endregion
|
|
388
|
+
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, type DatabaseTablePhase, type DatabaseTableRow, DocHeader, 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 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, badgeVariants, blobSubtypeOf, buttonVariants, cellValueEqual, cn, columnAnnotation, conditionMatches, createMemoryBlobStore, emptyFilter, filterIsComplete, isBridgeError, isBridgeErrorCode, isDatabaseBridge, markToggleAction, newMutationContext, parseCellValue, renderRuns, toBridgeError, useBlock, useDatabaseTable, useDoc, useEditorContext, useMeta, usePresence, useSelection, useSelectionView, useText, validateProtocolDescriptor };
|