@eldrajs/theme-core 0.0.0 → 0.1.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +301 -0
  2. package/LICENSE +21 -0
  3. package/README.md +68 -1
  4. package/dist/bridge-DfNINXLL.js +314 -0
  5. package/dist/bridge.d.ts +2 -0
  6. package/dist/bridge.js +2 -0
  7. package/dist/design-tokens.d.ts +68 -0
  8. package/dist/design-tokens.js +486 -0
  9. package/dist/dynamic-route.d.ts +2 -0
  10. package/dist/dynamic-route.js +3 -0
  11. package/dist/dynamicRoute-CxXY-Y_8.js +126 -0
  12. package/dist/dynamicRoute-pRTBoYT6.d.ts +55 -0
  13. package/dist/i18n.d.ts +107 -0
  14. package/dist/i18n.js +192 -0
  15. package/dist/image-framing.d.ts +2 -0
  16. package/dist/image-framing.js +109 -0
  17. package/dist/imageFraming-BUZ-yqho.d.ts +51 -0
  18. package/dist/index-DxrkKyG4.d.ts +488 -0
  19. package/dist/index.d.ts +407 -0
  20. package/dist/index.js +1136 -0
  21. package/dist/layout-CWq_v6ws.d.ts +244 -0
  22. package/dist/layout.d.ts +2 -0
  23. package/dist/layout.js +930 -0
  24. package/dist/links.d.ts +113 -0
  25. package/dist/links.js +184 -0
  26. package/dist/overlay-Bgi0tIbN.d.ts +201 -0
  27. package/dist/overlay-BvkEOiMB.js +2908 -0
  28. package/dist/overlay.d.ts +2 -0
  29. package/dist/overlay.js +6 -0
  30. package/dist/preview-router.d.ts +2 -0
  31. package/dist/preview-router.js +130 -0
  32. package/dist/reusable.d.ts +66 -0
  33. package/dist/reusable.js +92 -0
  34. package/dist/reusableExpansion-Bqm83nCJ.js +229 -0
  35. package/dist/reusableExpansion-CXvs_ckx.d.ts +42 -0
  36. package/dist/stega.d.ts +17 -0
  37. package/dist/stega.js +69 -0
  38. package/dist/template-layout.d.ts +3 -0
  39. package/dist/template-layout.js +328 -0
  40. package/dist/templateLayout-MjNs0gbF.d.ts +254 -0
  41. package/package.json +89 -2
@@ -0,0 +1,488 @@
1
+ //#region src/bridge/protocol.d.ts
2
+ declare const BRIDGE_PROTOCOL: "eldra-bridge";
3
+ declare const BRIDGE_VERSION = 1;
4
+ type EditorMode = 'preview' | 'edit';
5
+ interface DOMRectLike {
6
+ x: number;
7
+ y: number;
8
+ width: number;
9
+ height: number;
10
+ }
11
+ interface DraftEntryPayload {
12
+ entryId: string;
13
+ schemaApiId: string;
14
+ /** Full draft data document for the entry (same shape as CMSEntry.data). */
15
+ draftDoc: Record<string, unknown>;
16
+ }
17
+ interface ResolvedDesignTokensPayload {
18
+ revision: number;
19
+ resolved: {
20
+ colors: Record<string, {
21
+ label: string;
22
+ value: string;
23
+ group?: string;
24
+ allowSiteOverride?: boolean;
25
+ }>;
26
+ containers: Record<string, {
27
+ label: string;
28
+ maxWidth: string;
29
+ gutter: {
30
+ normal: string;
31
+ tablet?: string;
32
+ mobile?: string;
33
+ };
34
+ allowSiteOverride?: boolean;
35
+ }>;
36
+ allowCustomColors?: boolean;
37
+ };
38
+ }
39
+ /**
40
+ * The theme-message catalogue, after Studio's "Theme texts" page saves an override — the same
41
+ * shape `virtual:eldra/messages` serves, so `useEldraPreview` can apply it onto `context.messages`
42
+ * with no translation step. `revision` lets a theme ignore a stale push (the editor may post one
43
+ * after an operator leaves the settings page, or on a reconnect); `locales` carries only the
44
+ * locales Studio is pushing an update for — a flat `{ "<key>": "<value>" }` record per locale tag,
45
+ * each one a **full replacement** of that locale's messages, not a per-key patch.
46
+ */
47
+ interface ResolvedThemeMessagesPayload {
48
+ revision: number;
49
+ locales: Record<string, Record<string, string>>;
50
+ }
51
+ type StructuralDragPayload = {
52
+ kind: 'layout-node';
53
+ nodeId: string;
54
+ parentId: string;
55
+ index: number;
56
+ } | {
57
+ id: string;
58
+ kind: 'palette-block';
59
+ apiId: string;
60
+ } | {
61
+ id: string;
62
+ kind: 'palette-container';
63
+ containerType: 'grid' | 'flex';
64
+ };
65
+ /** §17 image framing: focal point as fractions (0..1) and zoom (1..4). */
66
+ interface ImageFramingValue {
67
+ x: number;
68
+ y: number;
69
+ zoom: number;
70
+ }
71
+ /**
72
+ * §18 v3: the whole TipTap JSON document of a top-level rich-text field. The
73
+ * theme renders it; Studio owns the one headless editor that writes it back
74
+ * through `editor:content-update` — it never crosses the bridge as a message
75
+ * of its own.
76
+ */
77
+ interface RichTextDoc {
78
+ type: 'doc';
79
+ content?: unknown[];
80
+ }
81
+ /**
82
+ * §18 v3: which rich-text field a message is about. Every §18 message carries
83
+ * it; the optional pair disambiguates the same entry placed more than once
84
+ * (a layout node, or a reusable placement), exactly as `theme:field-clicked`
85
+ * already does.
86
+ */
87
+ interface RichTextIdentity {
88
+ entryId: string;
89
+ fieldPath: string;
90
+ locale: string | null;
91
+ layoutNodeId?: string;
92
+ reusablePlacementId?: string;
93
+ }
94
+ /**
95
+ * §18 v3: the fixed `beforeinput` inputTypes the theme forwards as commands —
96
+ * everything it cannot let the browser do natively inside one text run. The
97
+ * names are the native `InputEvent.inputType` spellings so neither side
98
+ * invents a vocabulary of its own; Studio maps each to a TipTap command.
99
+ */
100
+ declare const RICH_TEXT_COMMAND_NAMES: readonly ["insertParagraph", "insertLineBreak", "insertFromPaste", "insertFromDrop", "deleteByCut", "deleteContentBackward", "deleteContentForward", "deleteWordBackward", "deleteWordForward", "deleteContent", "formatBold", "formatItalic", "formatUnderline", "formatStrikeThrough", "historyUndo", "historyRedo"];
101
+ type RichTextCommandName = (typeof RICH_TEXT_COMMAND_NAMES)[number];
102
+ /**
103
+ * §18 v3 (theme → editor): the selection inside a rich-text root, as
104
+ * ProseMirror document positions computed by the theme from the stamped
105
+ * render tree. Posted rAF-coalesced on `selectionchange` while the selection
106
+ * is inside a root. `anchor: null` (with `head: null`) is the blur report the
107
+ * theme posts once when the selection leaves the root.
108
+ *
109
+ * `rect` is the caret/range rect in iframe viewport pixels; `rootRect` is the
110
+ * root element's `getBoundingClientRect()`, in the same coordinate space —
111
+ * the floating toolbar falls back to it when there is no caret rect (an
112
+ * empty range with no layout yet) and anchors above it when there is no
113
+ * caret at all. Both are bounded the same way (`boundedRect`); `rootRect` is
114
+ * `null` only on the blur message. `marks` and `block` are read from the DOM
115
+ * (ancestor mark elements and the nearest node element), which is all the
116
+ * toolbar's active state needs.
117
+ */
118
+ interface ThemeRichTextSelectionMessage extends RichTextIdentity {
119
+ type: 'theme:rich-text-selection';
120
+ anchor: number | null;
121
+ head: number | null;
122
+ rect: DOMRectLike | null;
123
+ rootRect: DOMRectLike | null;
124
+ marks: string[];
125
+ block: {
126
+ type: string;
127
+ attrs?: Record<string, unknown>;
128
+ } | null;
129
+ revision: number;
130
+ }
131
+ /**
132
+ * §18 v3 (theme → editor): a native text edit the browser already performed
133
+ * inside one text run of one node — the theme reports it rather than
134
+ * preventing it, so the caret never leaves the theme. `from`/`to` are the
135
+ * positions of the target range captured in `beforeinput`; `text` is the
136
+ * inserted text (`''` for a deletion). `revision` is the theme's per-field
137
+ * counter, incremented per op and echoed back in `editor:rich-text-applied`.
138
+ */
139
+ interface ThemeRichTextInputMessage extends RichTextIdentity {
140
+ type: 'theme:rich-text-input';
141
+ from: number;
142
+ to: number;
143
+ text: string;
144
+ revision: number;
145
+ }
146
+ /**
147
+ * §18 v3 (theme → editor): a structural or formatting intent the theme
148
+ * `preventDefault()`ed — Enter, paste, cut, a mark shortcut, undo/redo, or a
149
+ * text edit whose target range crosses a block or leaf boundary. `text`
150
+ * carries the plain text of a paste/drop; `from`/`to` are the target range.
151
+ */
152
+ interface ThemeRichTextCommandMessage extends RichTextIdentity {
153
+ type: 'theme:rich-text-command';
154
+ name: RichTextCommandName;
155
+ from: number;
156
+ to: number;
157
+ text?: string;
158
+ revision: number;
159
+ }
160
+ /**
161
+ * §18 v3 (editor → theme): Studio activated (`active: true`) or closed
162
+ * (`active: false`) its headless editor and docked toolbar for this field.
163
+ * The theme only marks the root (`data-eldra-rich-text-editing`) — it keeps
164
+ * rendering and showing its own content; nothing is hidden or overlaid.
165
+ */
166
+ interface EditorRichTextEditingMessage {
167
+ type: 'editor:rich-text-editing';
168
+ entryId: string;
169
+ fieldPath: string;
170
+ locale: string | null;
171
+ active: boolean;
172
+ }
173
+ /**
174
+ * §18 v3 (editor → theme): the acknowledgement that follows every
175
+ * `editor:content-update` Studio sends for the active field. `revision` is
176
+ * the theme revision this applies to. When it matches the theme's latest
177
+ * posted revision and `rerender` is false, the theme's DOM already shows the
178
+ * edit: it skips the re-render for that root and only re-stamps positions.
179
+ * Otherwise the content update re-renders and the theme restores the
180
+ * selection at `anchor`/`head`.
181
+ */
182
+ interface EditorRichTextAppliedMessage extends RichTextIdentity {
183
+ type: 'editor:rich-text-applied';
184
+ revision: number;
185
+ anchor: number;
186
+ head: number;
187
+ rerender: boolean;
188
+ }
189
+ /**
190
+ * §18 v3 (editor → theme): scroll the field into view, focus its root and put
191
+ * the caret at the end. Studio's sidebar "Edit on canvas" uses it.
192
+ */
193
+ interface EditorRichTextLocateMessage {
194
+ type: 'editor:rich-text-locate';
195
+ entryId: string;
196
+ fieldPath: string;
197
+ locale: string | null;
198
+ }
199
+ interface BridgePayloads {
200
+ 'editor:hello': {
201
+ capabilities: string[];
202
+ };
203
+ 'editor:init': {
204
+ mode: EditorMode;
205
+ previewToken: string;
206
+ locale: string;
207
+ path: string;
208
+ };
209
+ 'editor:content-update': {
210
+ entries: DraftEntryPayload[];
211
+ };
212
+ 'editor:design-tokens': ResolvedDesignTokensPayload;
213
+ /** A theme-message override save — see `ResolvedThemeMessagesPayload`. */
214
+ 'editor:theme-messages': ResolvedThemeMessagesPayload;
215
+ 'editor:select-block': {
216
+ entryId: string;
217
+ layoutNodeId?: string;
218
+ reusablePlacementId?: string;
219
+ };
220
+ 'editor:navigate': {
221
+ path: string;
222
+ };
223
+ 'editor:set-mode': {
224
+ mode: EditorMode;
225
+ };
226
+ 'editor:set-viewport': {
227
+ width: number;
228
+ };
229
+ 'editor:refresh': Record<string, never>;
230
+ 'editor:ping': Record<string, never>;
231
+ 'editor:drag-start': {
232
+ payload: StructuralDragPayload;
233
+ };
234
+ 'editor:drag-end': Record<string, never>;
235
+ /** §17: enter framing for a field (the inspector's "Adjust on canvas") or leave it. */
236
+ 'editor:framing-mode': {
237
+ entryId: string;
238
+ fieldPath: string;
239
+ } | {
240
+ entryId: null;
241
+ };
242
+ /** §18 v3: Studio's headless rich-text editor became active for a field, or closed. */
243
+ 'editor:rich-text-editing': Omit<EditorRichTextEditingMessage, 'type'>;
244
+ /** §18 v3: the ack that follows a content update for the active field. */
245
+ 'editor:rich-text-applied': Omit<EditorRichTextAppliedMessage, 'type'>;
246
+ /** §18 v3: scroll a rich-text field into view, focus it and place the caret. */
247
+ 'editor:rich-text-locate': Omit<EditorRichTextLocateMessage, 'type'>;
248
+ /**
249
+ * Breakpoints negotiation: the theme's own tablet/normal layout
250
+ * breakpoints, as configured min-width px — so Studio's UI can react to
251
+ * the theme's actual ranges (its side panels overlay the preview at
252
+ * `tablet + 100`px) rather than a value the theme may not share.
253
+ * `mobile` is `< tablet`, `tablet` is `tablet…normal-1`, `normal` is
254
+ * `>= normal`. Additive and optional: a theme SDK build older than this
255
+ * field omits it; a current one always includes it, defaults (768/1024)
256
+ * when the theme did not configure custom ones. Bounds:
257
+ * `320 <= tablet < normal <= 4096` — see @eldrajs/theme-core's
258
+ * `resolveLayoutBreakpoints`, the one place that validates and defaults
259
+ * this pair; Studio should treat an out-of-bounds pair the same way (fall
260
+ * back to 768/1024) rather than trust it blindly.
261
+ */
262
+ 'theme:ready': {
263
+ manifestVersion: number;
264
+ themeVersion: string;
265
+ sdkVersion: string;
266
+ path: string;
267
+ capabilities: string[];
268
+ breakpoints?: {
269
+ tablet: number;
270
+ normal: number;
271
+ };
272
+ };
273
+ 'theme:pong': Record<string, never>;
274
+ 'theme:route-changed': {
275
+ path: string;
276
+ };
277
+ 'theme:block-clicked': {
278
+ entryId: string;
279
+ schemaApiId: string;
280
+ rect: DOMRectLike;
281
+ layoutNodeId?: string;
282
+ reusablePlacementId?: string;
283
+ /**
284
+ * Present, and always `true`, when the block's **own** layout node is
285
+ * hidden at the breakpoint the theme is currently rendering at
286
+ * (`style.visible` false there). A block hidden only because an ancestor
287
+ * node is hidden does not carry it — unhiding it is a different act from
288
+ * unhiding its parent. Edit mode keeps such a block on the canvas —
289
+ * dimmed, still selectable — so Studio needs to be told what the viewport
290
+ * alone no longer shows. Absent means visible: additive, so an editor that
291
+ * does not know the field is unaffected.
292
+ */
293
+ hiddenAtBreakpoint?: true;
294
+ };
295
+ 'theme:field-clicked': {
296
+ entryId: string;
297
+ fieldPath: string;
298
+ locale: string | null;
299
+ rect: DOMRectLike;
300
+ layoutNodeId?: string;
301
+ reusablePlacementId?: string;
302
+ };
303
+ 'theme:text-edited': {
304
+ entryId: string;
305
+ fieldPath: string;
306
+ locale: string | null;
307
+ value: string;
308
+ layoutNodeId?: string;
309
+ reusablePlacementId?: string;
310
+ };
311
+ 'theme:blocks-rendered': {
312
+ blocks: Array<{
313
+ entryId: string;
314
+ rect: DOMRectLike;
315
+ layoutNodeId?: string;
316
+ reusablePlacementId?: string;
317
+ /** See `theme:block-clicked`'s field of the same name. */
318
+ hiddenAtBreakpoint?: true;
319
+ }>;
320
+ };
321
+ /**
322
+ * The block the pointer is currently over, reported in edit mode only and
323
+ * only when the editor negotiated the `block-hover` capability
324
+ * (theme → editor).
325
+ *
326
+ * Posted when the hovered block *changes* — never once per pointer move
327
+ * inside the same block — and `null` when the pointer leaves the last
328
+ * hovered block (onto the page background, out of the document, or because
329
+ * a rerender detached it). While a block stays hovered the message is
330
+ * re-posted, coalesced to one per animation frame, whenever the theme's
331
+ * geometry may have moved — a scroll, a resize, a selection change or a
332
+ * content rerender — exactly the triggers `theme:blocks-rendered` re-posts
333
+ * on, and for the same reason: the iframe can scroll or re-lay-out without
334
+ * any DOM mutation, and a stale rect would strand the editor's chrome. A
335
+ * re-post can repeat the rect it last sent, so a consumer applies it
336
+ * idempotently rather than treating every message as a change.
337
+ *
338
+ * `rect` is the block's `getBoundingClientRect()` in iframe viewport
339
+ * pixels, the same space `theme:blocks-rendered` and `theme:block-clicked`
340
+ * report; `layoutNodeId`/`reusablePlacementId` are the block's placement
341
+ * identity, omitted (never `undefined`) when it has none.
342
+ *
343
+ * The identity is always the block's — hovering a field, or anything inside
344
+ * a rich-text editing root, reports the block that contains it and nothing
345
+ * finer. The intended consumer is an editor-side "add block" affordance
346
+ * anchored to the hovered block's bottom edge; the theme draws its own hover
347
+ * outline regardless and that behaviour is independent of this message.
348
+ */
349
+ 'theme:block-hovered': {
350
+ entryId: string;
351
+ rect: DOMRectLike;
352
+ layoutNodeId?: string;
353
+ reusablePlacementId?: string;
354
+ } | null;
355
+ /**
356
+ * Geometry of the editor-only slot markers rendered by the theme when the
357
+ * editor negotiated the `block-slots` capability (theme → editor).
358
+ */
359
+ 'theme:slots-rendered': {
360
+ slots: Array<{
361
+ layoutNodeId: string;
362
+ slotId: string;
363
+ rect: DOMRectLike;
364
+ }>;
365
+ };
366
+ 'theme:height-changed': {
367
+ height: number;
368
+ };
369
+ 'theme:error': {
370
+ message: string;
371
+ scope: 'bridge' | 'data' | 'render';
372
+ };
373
+ /**
374
+ * A gateway request the theme made for this preview failed with an HTTP
375
+ * status (theme → editor). Posted once per failed request, and only while
376
+ * a preview token is in use *and* the token that request carried is still
377
+ * the one the client holds — a failure belonging to a token the editor has
378
+ * since replaced is the editor's own retry in flight, not news. A 404 is
379
+ * never posted: it is a miss the theme resolves itself (an unknown route, a
380
+ * link target that no longer exists), not a preview that stopped working.
381
+ *
382
+ * The editor's reason for wanting it: a preview token is one hash per
383
+ * organization, so minting one anywhere (another browser, another device, a
384
+ * test run) invalidates every other open builder's token and the gateway
385
+ * answers its draft reads with 401. Without this message the builder simply
386
+ * shows no drafts and says nothing. `status` is what the editor branches on;
387
+ * `path` is the request path (no query, no token) for diagnostics.
388
+ */
389
+ 'theme:request-failed': {
390
+ status: number;
391
+ path: string;
392
+ };
393
+ 'theme:drop-candidate': {
394
+ layoutNodeId: string;
395
+ placement: 'before' | 'after' | 'inside';
396
+ rect: DOMRectLike;
397
+ /** Set when the drop point resolves to a slot marker rect (editor-only). */
398
+ slotId?: string;
399
+ } | null;
400
+ 'theme:node-dropped': {
401
+ payload: StructuralDragPayload;
402
+ layoutNodeId: string;
403
+ placement: 'before' | 'after' | 'inside';
404
+ /** Set when the drop resolved to a slot marker rect (editor-only). */
405
+ slotId?: string;
406
+ };
407
+ /** §17: the theme entered ({rect} of the frame) or left ({entryId: null}) framing mode. */
408
+ 'theme:framing-target': {
409
+ entryId: string;
410
+ fieldPath: string;
411
+ rect: DOMRectLike;
412
+ } | {
413
+ entryId: null;
414
+ };
415
+ /** §17: a live (final: false) or settled (final: true) framing value. */
416
+ 'theme:framing-changed': {
417
+ entryId: string;
418
+ fieldPath: string;
419
+ framing: ImageFramingValue;
420
+ final: boolean;
421
+ };
422
+ /** §18 v3: the selection inside a rich-text root, in document positions. */
423
+ 'theme:rich-text-selection': Omit<ThemeRichTextSelectionMessage, 'type'>;
424
+ /** §18 v3: a native text edit the theme already performed, as a position range. */
425
+ 'theme:rich-text-input': Omit<ThemeRichTextInputMessage, 'type'>;
426
+ /** §18 v3: a structural/format intent the theme prevented and forwarded. */
427
+ 'theme:rich-text-command': Omit<ThemeRichTextCommandMessage, 'type'>;
428
+ }
429
+ type BridgeMessageType = keyof BridgePayloads;
430
+ interface BridgeEnvelope<T extends BridgeMessageType = BridgeMessageType> {
431
+ protocol: typeof BRIDGE_PROTOCOL;
432
+ version: number;
433
+ id: string;
434
+ type: T;
435
+ payload: BridgePayloads[T];
436
+ }
437
+ type BridgeHandler = <T extends BridgeMessageType>(type: T, payload: BridgePayloads[T]) => void;
438
+ declare const KNOWN_MESSAGE_TYPES: ReadonlySet<string>;
439
+ /**
440
+ * Capabilities advertised in editor:hello. Single source of truth is contracts §8b.1/§8b.13:
441
+ * the list below, matched verbatim by Studio's vendored app/types/bridge.ts.
442
+ */
443
+ declare const EDITOR_CAPABILITIES: readonly ["content-update", "select-block", "inline-text", "block-slots", "block-hover", "image-framing", "rich-text-inline"];
444
+ /** Capabilities the theme advertises in theme:ready. `block-slots` gates the
445
+ * editor-only slot markers and their theme:slots-rendered geometry reports.
446
+ * `block-hover` gates theme:block-hovered, the hovered block's identity and
447
+ * rect, the same way. `image-framing` gates the framing messages. `rich-text-inline` gates the
448
+ * §18 v3 messages that let the operator edit rich text natively in the
449
+ * theme's own rendered DOM while Studio owns the document, the editor and
450
+ * the toolbar; a side that does not advertise it never sends, and must
451
+ * ignore, those messages. */
452
+ declare const THEME_CAPABILITIES: readonly ["design-tokens", "block-slots", "block-hover", "image-framing", "rich-text-inline"];
453
+ //#endregion
454
+ //#region src/bridge/envelope.d.ts
455
+ declare function makeEnvelope<T extends BridgeMessageType>(type: T, payload: BridgePayloads[T]): BridgeEnvelope<T>;
456
+ /** Returns null for anything that must be ignored; logs per contracts §1.4. */
457
+ declare function parseEnvelope(data: unknown): BridgeEnvelope | null;
458
+ //#endregion
459
+ //#region src/bridge/editor.d.ts
460
+ declare function createEditorBridge(opts: {
461
+ iframe: HTMLIFrameElement;
462
+ targetOrigin: string;
463
+ onMessage: BridgeHandler;
464
+ onDisconnected: () => void;
465
+ onConnected: () => void;
466
+ }): {
467
+ post<T extends BridgeMessageType>(type: T, payload: BridgePayloads[T]): void;
468
+ destroy(): void;
469
+ };
470
+ //#endregion
471
+ //#region src/bridge/theme.d.ts
472
+ declare function createThemeBridge(opts: {
473
+ allowedOrigins: string[];
474
+ onMessage: BridgeHandler;
475
+ /** Editor capabilities from each editor:hello (reconnects re-fire it). */
476
+ onEditorHello?: (capabilities: string[]) => void;
477
+ /** Breakpoints negotiation: included in every theme:ready this bridge
478
+ * sends when given. The caller (theme-vue's startEldraPreview) resolves
479
+ * and defaults this — @eldrajs/theme-core's resolveLayoutBreakpoints — before
480
+ * it ever reaches here; the bridge itself does no validation. */
481
+ breakpoints?: BridgePayloads['theme:ready']['breakpoints'];
482
+ }): {
483
+ post<T extends BridgeMessageType>(type: T, payload: BridgePayloads[T]): void;
484
+ readonly connected: boolean;
485
+ destroy(): void;
486
+ };
487
+ //#endregion
488
+ export { RichTextDoc as C, ThemeRichTextCommandMessage as D, THEME_CAPABILITIES as E, ThemeRichTextInputMessage as O, RichTextCommandName as S, StructuralDragPayload as T, EditorRichTextLocateMessage as _, BRIDGE_PROTOCOL as a, ResolvedDesignTokensPayload as b, BridgeHandler as c, DOMRectLike as d, DraftEntryPayload as f, EditorRichTextEditingMessage as g, EditorRichTextAppliedMessage as h, parseEnvelope as i, ThemeRichTextSelectionMessage as k, BridgeMessageType as l, EditorMode as m, createEditorBridge as n, BRIDGE_VERSION as o, EDITOR_CAPABILITIES as p, makeEnvelope as r, BridgeEnvelope as s, createThemeBridge as t, BridgePayloads as u, KNOWN_MESSAGE_TYPES as v, RichTextIdentity as w, ResolvedThemeMessagesPayload as x, RICH_TEXT_COMMAND_NAMES as y };