@craftguild/expo-oriha 0.0.0-stage → 0.2.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 (46) hide show
  1. package/ExpoOriha.podspec +26 -0
  2. package/LICENSE +8 -0
  3. package/LICENSE-APACHE +176 -0
  4. package/LICENSE-MIT +27 -0
  5. package/README.md +76 -2
  6. package/THIRD_PARTY_NOTICES.md +126 -0
  7. package/android/build.gradle +37 -0
  8. package/android/src/main/AndroidManifest.xml +1 -0
  9. package/android/src/main/java/co/progressiveworks/oriha/ExpoOrihaModule.kt +62 -0
  10. package/android/src/main/java/co/progressiveworks/oriha/OrihaRustBridge.kt +73 -0
  11. package/android/src/main/java/uniffi/oriha_native_bridge/oriha_native_bridge.kt +5862 -0
  12. package/android/src/main/jniLibs/arm64-v8a/liboriha_native_bridge.so +0 -0
  13. package/android/src/main/jniLibs/armeabi-v7a/liboriha_native_bridge.so +0 -0
  14. package/android/src/main/jniLibs/x86_64/liboriha_native_bridge.so +0 -0
  15. package/dist/chunk-CfYAbeIz.mjs +13 -0
  16. package/dist/index.cjs +4517 -0
  17. package/dist/index.d.cts +1031 -0
  18. package/dist/index.d.mts +1029 -0
  19. package/dist/index.mjs +4338 -0
  20. package/expo-module.config.json +10 -0
  21. package/ios/ExpoOrihaModule.swift +55 -0
  22. package/ios/OrihaRustBridge.swift +62 -0
  23. package/ios/generated/oriha_native_bridge.swift +6526 -0
  24. package/ios/generated/oriha_native_bridgeFFI.h +766 -0
  25. package/ios/generated/oriha_native_bridgeFFI.modulemap +7 -0
  26. package/ios/native/OrihaNativeBridge.xcframework/Info.plist +47 -0
  27. package/ios/native/OrihaNativeBridge.xcframework/ios-arm64/Headers/oriha_native_bridge.swift +6526 -0
  28. package/ios/native/OrihaNativeBridge.xcframework/ios-arm64/Headers/oriha_native_bridgeFFI.h +766 -0
  29. package/ios/native/OrihaNativeBridge.xcframework/ios-arm64/Headers/oriha_native_bridgeFFI.modulemap +7 -0
  30. package/ios/native/OrihaNativeBridge.xcframework/ios-arm64/liboriha_native_bridge.a +0 -0
  31. package/ios/native/OrihaNativeBridge.xcframework/ios-arm64-simulator/Headers/oriha_native_bridge.swift +6526 -0
  32. package/ios/native/OrihaNativeBridge.xcframework/ios-arm64-simulator/Headers/oriha_native_bridgeFFI.h +766 -0
  33. package/ios/native/OrihaNativeBridge.xcframework/ios-arm64-simulator/Headers/oriha_native_bridgeFFI.modulemap +7 -0
  34. package/ios/native/OrihaNativeBridge.xcframework/ios-arm64-simulator/liboriha_native_bridge.a +0 -0
  35. package/licenses/heroicons-LICENSE +21 -0
  36. package/licenses/rolldown-LICENSE +25 -0
  37. package/licenses/third-party-licenses.json +415 -0
  38. package/package.json +82 -4
  39. package/sbom/aarch64-apple-ios-sim.cdx.json +912 -0
  40. package/sbom/aarch64-apple-ios.cdx.json +912 -0
  41. package/sbom/aarch64-linux-android.cdx.json +929 -0
  42. package/sbom/armv7-linux-androideabi.cdx.json +929 -0
  43. package/sbom/artifacts.json +241 -0
  44. package/sbom/bom.cdx.json +6607 -0
  45. package/sbom/javascript.cdx.json +85 -0
  46. package/sbom/x86_64-linux-android.cdx.json +929 -0
@@ -0,0 +1,1031 @@
1
+ import React, { Dispatch, SetStateAction } from "react";
2
+ import { WebViewProps } from "react-native-webview";
3
+ import { StyleProp, ViewStyle } from "react-native";
4
+
5
+ //#region \0rolldown/runtime.js
6
+ //#endregion
7
+ //#region src/provider/OrihaEnums.d.ts
8
+ declare enum OrihaOverlayPlacement {
9
+ Top = "top",
10
+ Center = "center",
11
+ Bottom = "bottom",
12
+ Fill = "fill"
13
+ }
14
+ declare enum OrihaToastPosition {
15
+ Top = "top",
16
+ Center = "center",
17
+ Bottom = "bottom"
18
+ }
19
+ declare enum OrihaToastVariant {
20
+ Neutral = "neutral",
21
+ Info = "info",
22
+ Note = "note",
23
+ Success = "success",
24
+ Warn = "warn",
25
+ Warning = "warn",
26
+ Err = "err",
27
+ Error = "err"
28
+ }
29
+ //#endregion
30
+ //#region generated/generatedBridgeEnums.d.ts
31
+ declare enum RenderMode {
32
+ StyledHtml = "styledHtml",
33
+ SemanticHtml = "semanticHtml"
34
+ }
35
+ declare enum AppearanceStyle {
36
+ Rich = "rich",
37
+ Simple = "simple"
38
+ }
39
+ declare enum TableBorderStyle {
40
+ None = "none",
41
+ Inner = "inner",
42
+ All = "all",
43
+ Vertical = "vertical",
44
+ Horizontal = "horizontal"
45
+ }
46
+ declare enum RenderDiagnosticSeverity {
47
+ Info = "info",
48
+ Warning = "warning",
49
+ Error = "error"
50
+ }
51
+ declare enum RenderDiagnosticEngine {
52
+ Core = "core",
53
+ Bridge = "bridge"
54
+ }
55
+ declare enum RenderAssetKind {
56
+ Svg = "svg",
57
+ Css = "css",
58
+ Other = "other"
59
+ }
60
+ declare enum RenderPatchStrategy {
61
+ Incremental = "incremental",
62
+ ReplaceAll = "replaceAll"
63
+ }
64
+ declare enum RenderPatchFallbackReason {
65
+ MissingSnapshot = "missingSnapshot",
66
+ IncompatibleSnapshot = "incompatibleSnapshot",
67
+ TailChanged = "tailChanged",
68
+ OutputTruncated = "outputTruncated",
69
+ InvalidInput = "invalidInput",
70
+ EnginePanic = "enginePanic"
71
+ }
72
+ declare enum BridgeFeature {
73
+ Gfm = "gfm",
74
+ SyntaxHighlight = "syntaxHighlight",
75
+ DarkMode = "darkMode",
76
+ Tables = "tables",
77
+ TaskLists = "taskLists",
78
+ Footnotes = "footnotes",
79
+ RawHtml = "rawHtml",
80
+ PdfExport = "pdfExport",
81
+ Callouts = "callouts",
82
+ RemovePdfWatermark = "removePdfWatermark",
83
+ PrioritySupport = "prioritySupport",
84
+ Plantuml = "plantuml",
85
+ Mermaid = "mermaid",
86
+ Math = "math",
87
+ SyntaxThemeCustomization = "syntaxThemeCustomization",
88
+ FontCustomization = "fontCustomization"
89
+ }
90
+ declare enum UsageAnalyticsOutboxCommandKind {
91
+ LoadEnvelopes = "loadEnvelopes",
92
+ WriteEnvelope = "writeEnvelope",
93
+ DeleteEnvelope = "deleteEnvelope",
94
+ PurgeEnvelopes = "purgeEnvelopes",
95
+ SendHttp = "sendHttp"
96
+ }
97
+ declare enum Plan {
98
+ Free = "free",
99
+ Premium = "premium"
100
+ }
101
+ declare enum ColorScheme {
102
+ Light = "light",
103
+ Dark = "dark"
104
+ }
105
+ declare enum SyntaxTheme {
106
+ GitHubLight = "github-light",
107
+ GitHubDark = "github-dark",
108
+ SolarizedLight = "solarized-light",
109
+ SolarizedDark = "solarized-dark",
110
+ GruvboxLight = "gruvbox-light",
111
+ GruvboxDark = "gruvbox-dark",
112
+ CatppuccinLatte = "catppuccin-latte",
113
+ CatppuccinMocha = "catppuccin-mocha",
114
+ AyuLight = "ayu-light",
115
+ AyuDark = "ayu-dark",
116
+ TokyoNightDay = "tokyo-night-day",
117
+ TokyoNight = "tokyo-night",
118
+ RosePineDawn = "rose-pine-dawn",
119
+ RosePine = "rose-pine",
120
+ HighContrastLight = "high-contrast-light",
121
+ HighContrastDark = "high-contrast-dark",
122
+ Custom = "custom"
123
+ }
124
+ declare enum HeadingFont {
125
+ SystemDefault = "system-default",
126
+ Custom = "custom"
127
+ }
128
+ declare enum BodyFont {
129
+ SystemDefault = "system-default",
130
+ Custom = "custom"
131
+ }
132
+ declare enum CodeFont {
133
+ SystemDefault = "system-default",
134
+ Custom = "custom"
135
+ }
136
+ type OrihaBuiltinLocale = "en" | "es" | "fr" | "ja" | "ko" | "zh-Hans" | "zh-Hant";
137
+ type RenderPatchOperationKind = "replaceAll" | "replaceBlocks";
138
+ declare namespace generatedBridgeTypes_d_exports {
139
+ export { AppearanceStyle, BodyFont, BridgeAvailableOptions, BridgeControlAvailability, BridgeEffectiveSettingsInput, BridgeFeature, BridgeFontOption, BridgeFunctionMap, BridgeOption, BridgeRenderInput, BridgeRenderingOptions, BridgeResolvedSettings, BridgeSettingsControls, BridgeSettingsInput, CodeFont, ColorScheme, ExportHtmlInput, ExportHtmlOutput, ExportOptions, FontFamilySpec, HeadingFont, HtmlExportOptions, HttpHeader, KindCount, NativeBridgeVersionInfo, OrihaBuiltinLocale, Plan, PreparedHtmlExport, PreparedMarkdownLayout, PreparedMarkdownPatch, PrintOptions, RenderAsset, RenderAssetKind, RenderDiagnostic, RenderDiagnosticEngine, RenderDiagnosticSeverity, RenderMode, RenderOptions, RenderOutput, RenderPatchFallbackReason, RenderPatchOperation, RenderPatchOperationKind, RenderPatchOutput, RenderPatchStrategy, RenderSnapshot, RenderSnapshotBlock, RenderStats, RenderedBlock, SendHttpContext, SourceRange, SyntaxTheme, TableBorderStyle, TextMeasurementBatch, TextMeasurementRect, TextMeasurementRequest, TextMeasurementResult, TextMeasurementRun, TextMeasurementRunResult, TextMeasurementStyle, UsageAnalyticsOutboxCommand, UsageAnalyticsOutboxCommandKind, UsageAnalyticsOutboxCommandResult, UsageAnalyticsOutboxConfig, UsageAnalyticsOutboxDeliveryStateInput, UsageAnalyticsOutboxEnqueueStartInput, UsageAnalyticsOutboxResumeInput, UsageAnalyticsOutboxStartInput, UsageAnalyticsOutboxStep, UsageAnalyticsRenderPayloadInput, UsageAnalyticsStoredEnvelope, Viewport, WatermarkOptions };
140
+ }
141
+ type FontFamilySpec = {
142
+ family: string;
143
+ fallbacks?: string[];
144
+ };
145
+ type BridgeOption = {
146
+ id: string;
147
+ label: string;
148
+ description?: string;
149
+ family?: string;
150
+ recommended?: boolean;
151
+ };
152
+ type BridgeFontOption = {
153
+ id: string;
154
+ label: string;
155
+ description?: string;
156
+ family?: string;
157
+ recommended?: boolean;
158
+ fontFamily: FontFamilySpec | null;
159
+ };
160
+ type BridgeRenderInput = {
161
+ markdown: string;
162
+ locale?: string;
163
+ plan: Plan;
164
+ renderingOptions: BridgeRenderingOptions;
165
+ print?: PrintOptions;
166
+ renderMode: RenderMode;
167
+ watermark?: WatermarkOptions;
168
+ sourceAttributes: boolean;
169
+ tableOfContents: boolean;
170
+ viewport?: Viewport;
171
+ };
172
+ type BridgeSettingsInput = {
173
+ locale?: string;
174
+ plan: Plan;
175
+ renderingOptions: BridgeRenderingOptions;
176
+ mode: RenderMode;
177
+ viewport?: Viewport;
178
+ };
179
+ type BridgeRenderingOptions = {
180
+ colorScheme: ColorScheme;
181
+ appearanceStyle: AppearanceStyle;
182
+ syntaxTheme: SyntaxTheme;
183
+ customSyntaxTheme?: string;
184
+ headingFont: HeadingFont;
185
+ customHeadingFont?: FontFamilySpec;
186
+ bodyFont: BodyFont;
187
+ customBodyFont?: FontFamilySpec;
188
+ bodyFontSizePx?: number;
189
+ codeFont: CodeFont;
190
+ customCodeFont?: FontFamilySpec;
191
+ tableBorderStyle: TableBorderStyle;
192
+ roundedCorners: boolean;
193
+ shadows: boolean;
194
+ fullTableData: boolean;
195
+ blockBorders: boolean;
196
+ };
197
+ type BridgeEffectiveSettingsInput = {
198
+ locale: OrihaBuiltinLocale;
199
+ plan: Plan;
200
+ renderingOptions: BridgeRenderingOptions;
201
+ mode: RenderMode;
202
+ viewport?: Viewport;
203
+ };
204
+ type BridgeControlAvailability = {
205
+ enabled: boolean;
206
+ reason?: string;
207
+ };
208
+ type BridgeSettingsControls = {
209
+ plan: BridgeControlAvailability;
210
+ colorScheme: BridgeControlAvailability;
211
+ syntaxTheme: BridgeControlAvailability;
212
+ headingFont: BridgeControlAvailability;
213
+ bodyFont: BridgeControlAvailability;
214
+ codeFont: BridgeControlAvailability;
215
+ tableBorderStyle: BridgeControlAvailability;
216
+ };
217
+ type BridgeAvailableOptions = {
218
+ plan: BridgeOption[];
219
+ colorScheme: BridgeOption[];
220
+ syntaxTheme: BridgeOption[];
221
+ headingFont: BridgeFontOption[];
222
+ bodyFont: BridgeFontOption[];
223
+ codeFont: BridgeFontOption[];
224
+ tableBorderStyle: BridgeOption[];
225
+ locale: BridgeOption[];
226
+ };
227
+ type BridgeResolvedSettings = {
228
+ resolvedLocale: OrihaBuiltinLocale;
229
+ effectiveInput: BridgeEffectiveSettingsInput;
230
+ controls: BridgeSettingsControls;
231
+ availableOptions: BridgeAvailableOptions;
232
+ features: BridgeFeature[];
233
+ diagnostics: RenderDiagnostic[];
234
+ };
235
+ type PrintOptions = {
236
+ pageSize?: string;
237
+ margin?: string;
238
+ };
239
+ type WatermarkOptions = {
240
+ text: string;
241
+ imageSrc?: string;
242
+ opacity?: number;
243
+ };
244
+ type RenderOptions = {
245
+ watermark?: WatermarkOptions;
246
+ sourceAttributes?: boolean;
247
+ tableOfContents?: boolean;
248
+ };
249
+ type ExportOptions = {
250
+ watermark?: WatermarkOptions;
251
+ sourceAttributes?: boolean;
252
+ tableOfContents?: boolean;
253
+ print?: PrintOptions;
254
+ };
255
+ type HtmlExportOptions = {
256
+ minify?: boolean;
257
+ obfuscate?: boolean;
258
+ preserveHeadingAnchors?: boolean;
259
+ stripOrihaDataAttributes?: boolean;
260
+ };
261
+ type ExportHtmlInput = {
262
+ input: BridgeRenderInput;
263
+ options?: HtmlExportOptions;
264
+ };
265
+ type Viewport = {
266
+ width: number;
267
+ scale: number;
268
+ };
269
+ type RenderOutput = {
270
+ html: string;
271
+ css?: string;
272
+ stats: RenderStats;
273
+ diagnostics: RenderDiagnostic[];
274
+ assets: RenderAsset[];
275
+ sourceMap: RenderedBlock[];
276
+ };
277
+ type ExportHtmlOutput = {
278
+ html: string;
279
+ stats: RenderStats;
280
+ diagnostics: RenderDiagnostic[];
281
+ };
282
+ type RenderPatchOutput = {
283
+ output: RenderOutput;
284
+ snapshot: RenderSnapshot;
285
+ strategy: RenderPatchStrategy;
286
+ fallbackReason?: RenderPatchFallbackReason;
287
+ patches: RenderPatchOperation[];
288
+ };
289
+ type RenderPatchOperation = {
290
+ op: RenderPatchOperationKind;
291
+ html: string;
292
+ removeStableIds?: string[];
293
+ insertAfterStableId?: string;
294
+ insertBeforeStableId?: string;
295
+ };
296
+ type RenderSnapshot = {
297
+ schemaVersion: number;
298
+ settingsFingerprint: string;
299
+ nextStableIndex: number;
300
+ blocks: RenderSnapshotBlock[];
301
+ tailHash: string;
302
+ tailHtmlByteLength: number;
303
+ outputResourceFingerprint: string;
304
+ };
305
+ type RenderSnapshotBlock = {
306
+ stableId: string;
307
+ kind: string;
308
+ sourceHash: string;
309
+ htmlHash: string;
310
+ sourceRange: SourceRange;
311
+ };
312
+ type RenderStats = {
313
+ schemaVersion: number;
314
+ totalBlocks: number;
315
+ blocksByKind: KindCount[];
316
+ headingsByLevel: KindCount[];
317
+ codeBlocksByLanguageKind: KindCount[];
318
+ calloutsByKind: KindCount[];
319
+ lockedFeaturesByKind: KindCount[];
320
+ unsupportedByKind: KindCount[];
321
+ issuesByKind: KindCount[];
322
+ };
323
+ type KindCount = {
324
+ kind: string;
325
+ count: number;
326
+ };
327
+ type UsageAnalyticsOutboxConfig = {
328
+ ingestUrl: string;
329
+ apiKey: string;
330
+ requestTimeoutMs: number;
331
+ maxQueuedEvents: number;
332
+ retentionMs: number;
333
+ };
334
+ type UsageAnalyticsRenderPayloadInput = {
335
+ platform: string;
336
+ appVersion: string;
337
+ buildVersion: string;
338
+ locale: string;
339
+ subscriptionPlan: string;
340
+ stats: RenderStats;
341
+ eventId?: string;
342
+ };
343
+ type UsageAnalyticsStoredEnvelope = {
344
+ id: string;
345
+ envelopeJson: string;
346
+ };
347
+ type SendHttpContext = {
348
+ url: string;
349
+ method: string;
350
+ timeoutMs: number;
351
+ headers: HttpHeader[];
352
+ body: string;
353
+ };
354
+ type HttpHeader = {
355
+ name: string;
356
+ value: string;
357
+ };
358
+ type UsageAnalyticsOutboxStartInput = {
359
+ config: UsageAnalyticsOutboxConfig;
360
+ isDeliveryEnabled: boolean;
361
+ deliveryGeneration: number;
362
+ };
363
+ type UsageAnalyticsOutboxEnqueueStartInput = {
364
+ config: UsageAnalyticsOutboxConfig;
365
+ renderPayload: UsageAnalyticsRenderPayloadInput;
366
+ isDeliveryEnabled: boolean;
367
+ deliveryGeneration: number;
368
+ };
369
+ type UsageAnalyticsOutboxDeliveryStateInput = {
370
+ isDeliveryEnabled: boolean;
371
+ deliveryGeneration: number;
372
+ };
373
+ type UsageAnalyticsOutboxResumeInput = {
374
+ stepToken: string;
375
+ results: UsageAnalyticsOutboxCommandResult[];
376
+ isDeliveryEnabled: boolean;
377
+ deliveryGeneration: number;
378
+ };
379
+ type UsageAnalyticsOutboxStep = {
380
+ stepToken?: string;
381
+ commands: UsageAnalyticsOutboxCommand[];
382
+ nextDrainDelayMs?: number;
383
+ isComplete: boolean;
384
+ };
385
+ type UsageAnalyticsOutboxCommand = {
386
+ id: string;
387
+ kind: UsageAnalyticsOutboxCommandKind;
388
+ envelopeId?: string;
389
+ envelopeJson?: string;
390
+ httpContext?: SendHttpContext;
391
+ };
392
+ type UsageAnalyticsOutboxCommandResult = {
393
+ commandId: string;
394
+ succeeded: boolean;
395
+ storedEnvelopes: UsageAnalyticsStoredEnvelope[];
396
+ statusCode?: number;
397
+ };
398
+ type RenderDiagnostic = {
399
+ severity: RenderDiagnosticSeverity;
400
+ code: string;
401
+ message: string;
402
+ sourceRange?: SourceRange;
403
+ blockId?: string;
404
+ engine: RenderDiagnosticEngine;
405
+ };
406
+ type SourceRange = {
407
+ startLine: number;
408
+ startColumn: number;
409
+ endLine: number;
410
+ endColumn: number;
411
+ };
412
+ type RenderAsset = {
413
+ id: string;
414
+ kind: RenderAssetKind;
415
+ mimeType: string;
416
+ content: string;
417
+ };
418
+ type RenderedBlock = {
419
+ id: string;
420
+ kind: string;
421
+ sourceRange: SourceRange;
422
+ metadata?: Record<string, string>;
423
+ };
424
+ type TextMeasurementStyle = {
425
+ fontFamily?: string;
426
+ fontSize?: number;
427
+ fontWeight?: string | number;
428
+ fontStyle?: string;
429
+ lineHeight?: number;
430
+ letterSpacing?: number;
431
+ textTransform?: string;
432
+ textDecorationLine?: string;
433
+ color?: string;
434
+ width?: number;
435
+ maxWidth?: number;
436
+ [key: string]: string | number | undefined;
437
+ };
438
+ type TextMeasurementRun = {
439
+ id?: string;
440
+ text: string;
441
+ style?: TextMeasurementStyle;
442
+ };
443
+ type TextMeasurementRequest = {
444
+ id: string;
445
+ engine?: string;
446
+ kind?: string;
447
+ text: string;
448
+ style?: TextMeasurementStyle;
449
+ fontFamily?: string;
450
+ fontSize?: number;
451
+ fontWeight?: string | number;
452
+ fontStyle?: string;
453
+ runs?: TextMeasurementRun[];
454
+ width?: number;
455
+ maxWidth?: number;
456
+ wrapMode?: string;
457
+ };
458
+ type TextMeasurementBatch = {
459
+ requests: TextMeasurementRequest[];
460
+ };
461
+ type TextMeasurementRect = {
462
+ x: number;
463
+ y: number;
464
+ width: number;
465
+ height: number;
466
+ };
467
+ type TextMeasurementRunResult = {
468
+ id?: string;
469
+ index: number;
470
+ width: number;
471
+ height: number;
472
+ rects: TextMeasurementRect[];
473
+ };
474
+ type TextMeasurementResult = {
475
+ id: string;
476
+ width: number;
477
+ height?: number;
478
+ lineCount?: number;
479
+ left?: number;
480
+ right?: number;
481
+ rawWidth?: number;
482
+ runs?: TextMeasurementRunResult[];
483
+ };
484
+ type NativeBridgeVersionInfo = {
485
+ version: string;
486
+ gitShortHash: string;
487
+ };
488
+ type PreparedMarkdownLayout = {
489
+ version: number;
490
+ input: BridgeRenderInput;
491
+ textMeasurements: TextMeasurementBatch;
492
+ policyDiagnostics: RenderDiagnostic[];
493
+ policyStats: RenderStats;
494
+ };
495
+ type PreparedMarkdownPatch = {
496
+ version: number;
497
+ previousSnapshot?: RenderSnapshot;
498
+ input: BridgeRenderInput;
499
+ textMeasurements: TextMeasurementBatch;
500
+ policyDiagnostics: RenderDiagnostic[];
501
+ policyStats: RenderStats;
502
+ };
503
+ type PreparedHtmlExport = {
504
+ version: number;
505
+ input: BridgeRenderInput;
506
+ options: HtmlExportOptions;
507
+ textMeasurements: TextMeasurementBatch;
508
+ policyDiagnostics: RenderDiagnostic[];
509
+ policyStats: RenderStats;
510
+ };
511
+ type BridgeFunctionMap = {
512
+ nativeBridgeVersionInfo(): Promise<NativeBridgeVersionInfo>;
513
+ prepareMarkdownLayout(input: BridgeRenderInput): Promise<PreparedMarkdownLayout>;
514
+ prepareMarkdownPatch(previousSnapshot: RenderSnapshot | null, input: BridgeRenderInput): Promise<PreparedMarkdownPatch>;
515
+ prepareHtmlExport(input: BridgeRenderInput, options: HtmlExportOptions | undefined): Promise<PreparedHtmlExport>;
516
+ resolveRenderSettings(input: BridgeSettingsInput): Promise<BridgeResolvedSettings>;
517
+ renderPreparedMarkdown(layout: PreparedMarkdownLayout, measureResults: TextMeasurementResult[]): Promise<RenderOutput>;
518
+ renderPreparedMarkdownPatch(preparedPatch: PreparedMarkdownPatch, measureResults: TextMeasurementResult[]): Promise<RenderPatchOutput>;
519
+ renderPreparedHtmlExport(preparedExport: PreparedHtmlExport, measureResults: TextMeasurementResult[]): Promise<ExportHtmlOutput>;
520
+ usageAnalyticsOutboxStartEnqueue(input: UsageAnalyticsOutboxEnqueueStartInput, nowMs: number): Promise<UsageAnalyticsOutboxStep>;
521
+ usageAnalyticsOutboxStartDrain(input: UsageAnalyticsOutboxStartInput, nowMs: number): Promise<UsageAnalyticsOutboxStep>;
522
+ usageAnalyticsOutboxStartDeliveryStateChange(input: UsageAnalyticsOutboxDeliveryStateInput): Promise<UsageAnalyticsOutboxStep>;
523
+ usageAnalyticsOutboxResume(input: UsageAnalyticsOutboxResumeInput, nowMs: number): Promise<UsageAnalyticsOutboxStep>;
524
+ };
525
+ //#endregion
526
+ //#region src/types.d.ts
527
+ type RenderInput = BridgeRenderInput;
528
+ type RenderingOptions = BridgeRenderingOptions;
529
+ declare const OrihaPdfPaperSize: {
530
+ readonly A4: "A4";
531
+ readonly B4: "B4";
532
+ readonly Letter: "Letter";
533
+ };
534
+ type OrihaPdfPaperSize = (typeof OrihaPdfPaperSize)[keyof typeof OrihaPdfPaperSize];
535
+ declare const OrihaPdfOrientation: {
536
+ readonly Portrait: "Portrait";
537
+ readonly Landscape: "Landscape";
538
+ };
539
+ type OrihaPdfOrientation = (typeof OrihaPdfOrientation)[keyof typeof OrihaPdfOrientation];
540
+ type OrihaPdfExportOptions = {
541
+ paperSize?: OrihaPdfPaperSize;
542
+ orientation?: OrihaPdfOrientation;
543
+ margin?: string;
544
+ watermark?: false | Partial<WatermarkOptions>;
545
+ renderingOptions?: Partial<BridgeRenderingOptions>;
546
+ };
547
+ type OrihaPdfExportResult = {
548
+ blob: Blob;
549
+ mimeType: "application/pdf";
550
+ byteLength: number;
551
+ pageCount?: number;
552
+ temporaryUri: string;
553
+ dispose: () => Promise<void>;
554
+ };
555
+ type OrihaPreviewHandle = {
556
+ exportPdf: (options?: OrihaPdfExportOptions) => Promise<OrihaPdfExportResult>;
557
+ };
558
+ type OrihaPreviewDebugOptions = {
559
+ renderedHtmlFileName?: string;
560
+ shareRenderedHtmlLabel?: string;
561
+ enabled?: boolean;
562
+ };
563
+ type OrihaPreviewInput = Partial<Omit<BridgeRenderInput, "markdown" | "renderingOptions">> & {
564
+ renderingOptions?: Partial<BridgeRenderingOptions>;
565
+ };
566
+ type OrihaPreviewProps = {
567
+ markdown: string;
568
+ input?: OrihaPreviewInput;
569
+ loadingFallback?: React.ReactNode;
570
+ debug?: boolean | OrihaPreviewDebugOptions;
571
+ onRendered?: (output: RenderOutput) => void;
572
+ onRenderError?: (error: unknown) => void;
573
+ webViewProps?: Omit<WebViewProps, "source">;
574
+ };
575
+ //#endregion
576
+ //#region src/fonts/fontRegistryTypes.d.ts
577
+ type FontRegistryFontKind = "heading" | "body" | "code";
578
+ type FontRegistrySourcePolicy = {
579
+ allowTextParameter: false;
580
+ allowPerDocumentSubset: false;
581
+ };
582
+ type FontRegistryConfig = {
583
+ version: string | number;
584
+ source: {
585
+ provider: "google-fonts-css2";
586
+ baseUrl: string;
587
+ display?: string;
588
+ policy: FontRegistrySourcePolicy;
589
+ };
590
+ fonts: FontRegistryConfigFont[];
591
+ };
592
+ type FontRegistryConfigFont = {
593
+ id: string;
594
+ label: string;
595
+ family: string;
596
+ kinds: FontRegistryFontKind[];
597
+ source: {
598
+ specimenUrl?: string;
599
+ css2Family: string;
600
+ };
601
+ };
602
+ type FontRegistryFontFamilySpec = {
603
+ family: string;
604
+ fallbacks?: string[];
605
+ };
606
+ type FontRegistryFontFile = {
607
+ url: string;
608
+ fileName?: string;
609
+ sha256: string;
610
+ weight?: string | number;
611
+ style?: string;
612
+ format?: string;
613
+ unicodeRange?: string | null;
614
+ size?: number;
615
+ };
616
+ type FontRegistryFont = {
617
+ id: string;
618
+ label: string;
619
+ family: string;
620
+ kinds: FontRegistryFontKind[];
621
+ fontFamilySpec: FontRegistryFontFamilySpec;
622
+ version: string;
623
+ files: FontRegistryFontFile[];
624
+ description?: string;
625
+ };
626
+ type FontRegistryManifest = {
627
+ version: string | number;
628
+ generatedAt: string;
629
+ source: {
630
+ provider: "google-fonts-css2";
631
+ policy: FontRegistrySourcePolicy;
632
+ };
633
+ fonts: FontRegistryFont[];
634
+ };
635
+ //#endregion
636
+ //#region src/fonts/fontRegistryStorage.d.ts
637
+ type InstalledFontFileRuntimeRecord = {
638
+ uri: string;
639
+ relativePath: string;
640
+ fileName: string;
641
+ sha256: string;
642
+ weight?: string | number;
643
+ style?: string;
644
+ format?: string;
645
+ unicodeRange?: string | null;
646
+ size?: number;
647
+ };
648
+ //#endregion
649
+ //#region src/fonts/fontRegistryModel.d.ts
650
+ type OrihaFontKind = FontRegistryFontKind;
651
+ type OrihaFontFile = FontRegistryFontFile;
652
+ type OrihaInstalledFontFile = Omit<OrihaFontFile, "url"> & InstalledFontFileRuntimeRecord;
653
+ type OrihaInstallableFont = FontRegistryFont;
654
+ type OrihaInstalledFont = Omit<OrihaInstallableFont, "files"> & {
655
+ installedAt: string;
656
+ files: OrihaInstalledFontFile[];
657
+ };
658
+ type OrihaFontRegistryConfig = {
659
+ baseUrl?: string;
660
+ storageNamespace?: string;
661
+ };
662
+ type OrihaFontInstallPhase = "download" | "verify" | "write" | "complete";
663
+ type OrihaFontInstallProgress = {
664
+ fontId: string;
665
+ fontLabel: string;
666
+ fileIndex: number;
667
+ fileCount: number;
668
+ fileName: string;
669
+ fileUrl: string;
670
+ phase: OrihaFontInstallPhase;
671
+ fileReceivedBytes?: number;
672
+ fileTotalBytes?: number;
673
+ installedBytes?: number;
674
+ totalBytes?: number;
675
+ overallProgress?: number;
676
+ };
677
+ type OrihaInstallFontOptions = {
678
+ onProgress?: (progress: OrihaFontInstallProgress) => void;
679
+ };
680
+ //#endregion
681
+ //#region src/runtime/expoRuntimeI18n.d.ts
682
+ declare const DEFAULT_ORIHA_LOCALE = "en";
683
+ declare const ORIHA_MESSAGE_KEYS: readonly ["codeCopy.success", "codeCopy.failure", "debug.shareRenderedHtml", "debug.shareDialogTitle", "debug.renderedHtmlSaved", "debug.shareFailed", "debug.fileSystemDirectoryUnavailable", "externalLink.openFailed", "measurement.cancelled", "measurement.timeout"];
684
+ type OrihaLocale = OrihaBuiltinLocale | (string & {});
685
+ type OrihaMessageKey = (typeof ORIHA_MESSAGE_KEYS)[number];
686
+ type OrihaMessageValues = Readonly<Record<string, boolean | number | string | null | undefined>>;
687
+ type OrihaMessageTemplate = string | ((values: OrihaMessageValues) => string);
688
+ type OrihaMessages = Partial<Record<OrihaMessageKey, OrihaMessageTemplate>>;
689
+ type OrihaFormatMessage = (key: OrihaMessageKey, values?: OrihaMessageValues) => string;
690
+ type OrihaI18nState = {
691
+ locale: OrihaLocale;
692
+ formatMessage: OrihaFormatMessage;
693
+ };
694
+ declare function createOrihaI18n(locale?: OrihaLocale, messages?: OrihaMessages): OrihaI18nState;
695
+ declare function defaultOrihaFormatMessage(key: OrihaMessageKey, values?: OrihaMessageValues): string;
696
+ declare function formatOrihaMessage(messages: Readonly<Record<OrihaMessageKey, OrihaMessageTemplate>>, key: OrihaMessageKey, values?: OrihaMessageValues): string;
697
+ //#endregion
698
+ //#region src/provider/providerContext.d.ts
699
+ type OrihaProviderProps = {
700
+ children: React.ReactNode;
701
+ measurementTimeoutMs?: number;
702
+ debugMeasurementLogs?: boolean;
703
+ fontRegistry?: OrihaFontRegistryConfig;
704
+ locale?: OrihaLocale;
705
+ messages?: OrihaMessages;
706
+ };
707
+ type OrihaFontsState = {
708
+ installedFonts: OrihaInstalledFont[];
709
+ installableFonts: OrihaInstallableFont[];
710
+ isLoading: boolean;
711
+ error: unknown;
712
+ listInstalledFonts: () => Promise<OrihaInstalledFont[]>;
713
+ listInstallableFonts: () => Promise<OrihaInstallableFont[]>;
714
+ refreshFontRegistry: () => Promise<OrihaInstallableFont[]>;
715
+ installFont: (fontId: string, options?: OrihaInstallFontOptions) => Promise<OrihaInstalledFont>;
716
+ uninstallFont: (fontId: string) => Promise<void>;
717
+ };
718
+ type OrihaOverlayOptions = {
719
+ id?: string;
720
+ placement?: OrihaOverlayPlacement;
721
+ pointerEvents?: "box-none" | "none" | "box-only" | "auto";
722
+ style?: StyleProp<ViewStyle>;
723
+ };
724
+ type OrihaToastOptions = {
725
+ id?: string;
726
+ durationMs?: number;
727
+ position?: OrihaToastPosition;
728
+ variant?: OrihaToastVariant;
729
+ };
730
+ declare function useOrihaFonts(): OrihaFontsState;
731
+ declare function useOrihaOverlay(): {
732
+ presentOverlay: (node: React.ReactNode, options?: OrihaOverlayOptions) => () => void;
733
+ dismissOverlay: (id: string) => void;
734
+ showToast: (message: string, options?: OrihaToastOptions) => () => void;
735
+ dismissToast: (id: string) => void;
736
+ };
737
+ declare function useOrihaI18n(): OrihaI18nState;
738
+ //#endregion
739
+ //#region src/provider/OrihaProvider.d.ts
740
+ declare function OrihaProvider({
741
+ children,
742
+ measurementTimeoutMs,
743
+ debugMeasurementLogs,
744
+ fontRegistry,
745
+ locale,
746
+ messages
747
+ }: OrihaProviderProps): React.JSX.Element;
748
+ //#endregion
749
+ //#region src/preview/OrihaPreview.d.ts
750
+ declare const OrihaPreview: React.ForwardRefExoticComponent<OrihaPreviewProps & React.RefAttributes<OrihaPreviewHandle>>;
751
+ //#endregion
752
+ //#region src/bridge/render.d.ts
753
+ type BridgeRenderInputDraft = Partial<Omit<BridgeRenderInput, "markdown" | "renderingOptions">> & {
754
+ markdown: string;
755
+ renderingOptions?: Partial<BridgeRenderingOptions>;
756
+ };
757
+ type HtmlExportMeasureTextBatch = (requests: TextMeasurementRequest[]) => Promise<TextMeasurementResult[]>;
758
+ declare function prepareMarkdownLayout(input: BridgeRenderInputDraft): Promise<PreparedMarkdownLayout>;
759
+ declare function prepareMarkdownPatch(previousSnapshot: RenderSnapshot | null | undefined, input: BridgeRenderInputDraft): Promise<PreparedMarkdownPatch>;
760
+ declare function prepareHtmlExport(input: BridgeRenderInputDraft, options?: HtmlExportOptions): Promise<PreparedHtmlExport>;
761
+ declare function resolveRenderSettings(input: BridgeSettingsInput): Promise<BridgeResolvedSettings>;
762
+ declare function renderPreparedMarkdown(layout: PreparedMarkdownLayout, measureResults: TextMeasurementResult[]): Promise<RenderOutput>;
763
+ declare function renderPreparedMarkdownPatch(preparedPatch: PreparedMarkdownPatch, measureResults: TextMeasurementResult[]): Promise<RenderPatchOutput>;
764
+ declare function renderPreparedHtmlExport(preparedExport: PreparedHtmlExport, measureResults: TextMeasurementResult[]): Promise<ExportHtmlOutput>;
765
+ declare function exportHtml(input: BridgeRenderInputDraft, options?: HtmlExportOptions, measureTextBatch?: HtmlExportMeasureTextBatch): Promise<ExportHtmlOutput>;
766
+ //#endregion
767
+ //#region src/settings/renderSettingsModel.d.ts
768
+ type TypedBridgeOption<T extends string> = Omit<BridgeOption, "id"> & {
769
+ id: T;
770
+ };
771
+ type OrihaInstalledFontSelection = `installed:${string}`;
772
+ type OrihaHeadingFontSelection = HeadingFont | OrihaInstalledFontSelection;
773
+ type OrihaBodyFontSelection = BodyFont | OrihaInstalledFontSelection;
774
+ type OrihaCodeFontSelection = CodeFont | OrihaInstalledFontSelection;
775
+ type OrihaRenderSettingsFontKind = Extract<OrihaFontKind, "heading" | "body" | "code">;
776
+ type OrihaRenderSettingsDraft = {
777
+ plan: Plan;
778
+ colorScheme: ColorScheme;
779
+ syntaxTheme: SyntaxTheme;
780
+ headingFont: OrihaHeadingFontSelection;
781
+ bodyFont: OrihaBodyFontSelection;
782
+ bodyFontSizePx: number;
783
+ codeFont: OrihaCodeFontSelection;
784
+ tableBorderStyle: TableBorderStyle;
785
+ appearanceStyle?: NonNullable<BridgeSettingsInput["renderingOptions"]>["appearanceStyle"];
786
+ customSyntaxTheme?: string;
787
+ mode: RenderMode;
788
+ viewport?: BridgeSettingsInput["viewport"];
789
+ roundedCorners?: boolean;
790
+ shadows?: boolean;
791
+ fullTableData?: boolean;
792
+ blockBorders?: boolean;
793
+ };
794
+ type OrihaRenderSettingsControlState = {
795
+ disabled: boolean;
796
+ reason?: string;
797
+ };
798
+ type OrihaRenderSettingsControls = {
799
+ plan: OrihaRenderSettingsControlState;
800
+ colorScheme: OrihaRenderSettingsControlState;
801
+ locale: OrihaRenderSettingsControlState;
802
+ syntaxTheme: OrihaRenderSettingsControlState;
803
+ headingFont: OrihaRenderSettingsControlState;
804
+ bodyFont: OrihaRenderSettingsControlState;
805
+ codeFont: OrihaRenderSettingsControlState;
806
+ tableBorderStyle: OrihaRenderSettingsControlState;
807
+ };
808
+ type OrihaRenderSettingsAvailableOptions = {
809
+ plan: readonly TypedBridgeOption<Plan>[];
810
+ colorScheme: readonly TypedBridgeOption<ColorScheme>[];
811
+ locale: readonly TypedBridgeOption<OrihaLocale>[];
812
+ syntaxTheme: readonly TypedBridgeOption<SyntaxTheme>[];
813
+ headingFont: readonly TypedBridgeOption<OrihaHeadingFontSelection>[];
814
+ bodyFont: readonly TypedBridgeOption<OrihaBodyFontSelection>[];
815
+ codeFont: readonly TypedBridgeOption<OrihaCodeFontSelection>[];
816
+ tableBorderStyle: readonly TypedBridgeOption<TableBorderStyle>[];
817
+ };
818
+ type OrihaRenderSettingsDraftPatch = Partial<OrihaRenderSettingsDraft>;
819
+ type OrihaRenderSettingsDraftSetter = <K extends keyof OrihaRenderSettingsDraft>(key: K, value: OrihaRenderSettingsDraft[K]) => void;
820
+ type UseOrihaRenderSettingsOptions = {
821
+ locale?: OrihaLocale;
822
+ initialDraft?: OrihaRenderSettingsDraftPatch;
823
+ installedFonts?: readonly OrihaInstalledFont[];
824
+ resolvingReason?: string;
825
+ unavailableReason?: string;
826
+ };
827
+ type OrihaRenderSettingsState = {
828
+ draft: OrihaRenderSettingsDraft;
829
+ setDraft: Dispatch<SetStateAction<OrihaRenderSettingsDraft>>;
830
+ setDraftValue: OrihaRenderSettingsDraftSetter;
831
+ selectedInput: BridgeSettingsInput;
832
+ resolvedSettings: BridgeResolvedSettings | null;
833
+ effectiveInput: BridgeSettingsInput | BridgeEffectiveSettingsInput;
834
+ effectiveLocale: OrihaLocale;
835
+ effectiveTableBorderStyle: TableBorderStyle;
836
+ previewInput: Omit<BridgeRenderInput, "markdown">;
837
+ availableOptions: OrihaRenderSettingsAvailableOptions;
838
+ options: OrihaRenderSettingsAvailableOptions;
839
+ controls: OrihaRenderSettingsControls;
840
+ isResolving: boolean;
841
+ error: string | null;
842
+ };
843
+ declare const DEFAULT_ORIHA_RENDER_SETTINGS_DRAFT: OrihaRenderSettingsDraft;
844
+ declare function createOrihaRenderSettingsDraft(patch?: OrihaRenderSettingsDraftPatch): OrihaRenderSettingsDraft;
845
+ declare function createOrihaRenderSettingsInput({
846
+ draft,
847
+ installedFonts,
848
+ locale
849
+ }: {
850
+ draft: OrihaRenderSettingsDraft;
851
+ installedFonts?: readonly OrihaInstalledFont[];
852
+ locale?: OrihaLocale;
853
+ }): BridgeSettingsInput;
854
+ declare function createOrihaRenderSettingsControls({
855
+ controls,
856
+ resolved,
857
+ resolvingReason,
858
+ unavailableReason
859
+ }: {
860
+ controls?: {
861
+ plan?: BridgeControlAvailability;
862
+ colorScheme?: BridgeControlAvailability;
863
+ syntaxTheme?: BridgeControlAvailability;
864
+ headingFont?: BridgeControlAvailability;
865
+ bodyFont?: BridgeControlAvailability;
866
+ codeFont?: BridgeControlAvailability;
867
+ tableBorderStyle?: BridgeControlAvailability;
868
+ };
869
+ resolved: boolean;
870
+ resolvingReason?: string;
871
+ unavailableReason?: string;
872
+ }): OrihaRenderSettingsControls;
873
+ declare function createOrihaRenderSettingsOptions({
874
+ availableOptions,
875
+ installedFonts
876
+ }: {
877
+ availableOptions?: Partial<BridgeAvailableOptions>;
878
+ installedFonts?: readonly OrihaInstalledFont[];
879
+ }): OrihaRenderSettingsAvailableOptions;
880
+ declare function orihaFontOptionsForKind<T extends string>(bridgeOptions: readonly TypedBridgeOption<T>[], installedFonts: readonly OrihaInstalledFont[], kind: OrihaRenderSettingsFontKind): TypedBridgeOption<T | OrihaInstalledFontSelection>[];
881
+ declare function installedOrihaFontBySelection(fonts: readonly OrihaInstalledFont[], selectedId: string, kind: OrihaRenderSettingsFontKind): OrihaInstalledFont | null;
882
+ declare function installedOrihaFontSelectionId(fontId: string): OrihaInstalledFontSelection;
883
+ declare function bridgeOrihaFontSelection<TGenerated extends string>(selectedId: TGenerated | OrihaInstalledFontSelection, defaultValue: TGenerated): TGenerated;
884
+ declare function orihaRenderSettingsControlState(control: BridgeControlAvailability | undefined, resolved: boolean, options?: {
885
+ resolvingReason?: string;
886
+ unavailableReason?: string;
887
+ }): OrihaRenderSettingsControlState;
888
+ //#endregion
889
+ //#region src/settings/orihaRenderSettings.d.ts
890
+ declare function useOrihaRenderSettings({
891
+ locale,
892
+ initialDraft,
893
+ installedFonts,
894
+ resolvingReason,
895
+ unavailableReason
896
+ }?: UseOrihaRenderSettingsOptions): OrihaRenderSettingsState;
897
+ //#endregion
898
+ //#region src/bridge/version.d.ts
899
+ declare function nativeBridgeVersionInfo(): Promise<NativeBridgeVersionInfo>;
900
+ //#endregion
901
+ //#region src/usage-analytics/usageAnalytics.d.ts
902
+ declare function usageAnalyticsOutboxStartEnqueue(input: UsageAnalyticsOutboxEnqueueStartInput, nowMs: number): Promise<UsageAnalyticsOutboxStep>;
903
+ declare function usageAnalyticsOutboxStartDrain(input: UsageAnalyticsOutboxStartInput, nowMs: number): Promise<UsageAnalyticsOutboxStep>;
904
+ declare function usageAnalyticsOutboxStartDeliveryStateChange(input: UsageAnalyticsOutboxDeliveryStateInput): Promise<UsageAnalyticsOutboxStep>;
905
+ declare function usageAnalyticsOutboxResume(input: UsageAnalyticsOutboxResumeInput, nowMs: number): Promise<UsageAnalyticsOutboxStep>;
906
+ //#endregion
907
+ //#region src/usage-analytics/usageAnalyticsOutboxStore.d.ts
908
+ type UsageAnalyticsOutboxStore = {
909
+ loadEnvelopes(): Promise<UsageAnalyticsStoredEnvelope[]>;
910
+ writeEnvelope(envelope: UsageAnalyticsStoredEnvelope): Promise<void>;
911
+ deleteEnvelope(id: string): Promise<void>;
912
+ purgeEnvelopes(): Promise<void>;
913
+ pendingCount?(): Promise<number>;
914
+ };
915
+ type UsageAnalyticsOutboxFileStoreConfig = {
916
+ storageNamespace?: string;
917
+ rootDirectory?: string | null;
918
+ };
919
+ declare function createExpoUsageAnalyticsOutboxStore(config?: UsageAnalyticsOutboxFileStoreConfig): UsageAnalyticsOutboxStore;
920
+ //#endregion
921
+ //#region src/usage-analytics/usageAnalyticsOutboxTransport.d.ts
922
+ type UsageAnalyticsHttpResponse = {
923
+ statusCode?: number;
924
+ };
925
+ type UsageAnalyticsHttpTransport = {
926
+ send(context: SendHttpContext): Promise<UsageAnalyticsHttpResponse>;
927
+ };
928
+ type UsageAnalyticsFetch = (input: string, init?: {
929
+ method?: string;
930
+ headers?: Record<string, string>;
931
+ body?: string;
932
+ signal?: AbortSignal;
933
+ }) => Promise<{
934
+ status: number;
935
+ }>;
936
+ type FetchUsageAnalyticsTransportOptions = {
937
+ fetch?: UsageAnalyticsFetch;
938
+ };
939
+ declare function createFetchUsageAnalyticsTransport(options?: FetchUsageAnalyticsTransportOptions): UsageAnalyticsHttpTransport;
940
+ //#endregion
941
+ //#region src/usage-analytics/usageAnalyticsOutboxCore.d.ts
942
+ type UsageAnalyticsOutboxEngine = {
943
+ startEnqueue(input: UsageAnalyticsOutboxEnqueueStartInput, nowMs: number): Promise<UsageAnalyticsOutboxStep>;
944
+ startDrain(input: UsageAnalyticsOutboxStartInput, nowMs: number): Promise<UsageAnalyticsOutboxStep>;
945
+ startDeliveryStateChange(input: UsageAnalyticsOutboxDeliveryStateInput): Promise<UsageAnalyticsOutboxStep>;
946
+ resume(input: UsageAnalyticsOutboxResumeInput, nowMs: number): Promise<UsageAnalyticsOutboxStep>;
947
+ };
948
+ type UsageAnalyticsOutboxLogger = {
949
+ debug?: (...messages: unknown[]) => void;
950
+ warn?: (...messages: unknown[]) => void;
951
+ };
952
+ type UsageAnalyticsOutboxCoreOptions = {
953
+ config: UsageAnalyticsOutboxConfig;
954
+ store: UsageAnalyticsOutboxStore;
955
+ transport: UsageAnalyticsHttpTransport;
956
+ engine: UsageAnalyticsOutboxEngine;
957
+ isDeliveryEnabled?: boolean;
958
+ nowMs?: () => number;
959
+ logger?: UsageAnalyticsOutboxLogger;
960
+ };
961
+ declare class UsageAnalyticsOutboxCore {
962
+ private deliveryEnabled;
963
+ private deliveryGeneration;
964
+ private scheduledDrain;
965
+ private serialOperation;
966
+ private readonly config;
967
+ private readonly store;
968
+ private readonly transport;
969
+ private readonly engine;
970
+ private readonly nowMs;
971
+ private readonly logger?;
972
+ constructor(options: UsageAnalyticsOutboxCoreOptions);
973
+ get isDeliveryEnabled(): boolean;
974
+ get generation(): number;
975
+ enqueue(renderPayload: UsageAnalyticsRenderPayloadInput): Promise<void>;
976
+ drain(): Promise<void>;
977
+ setDeliveryEnabled(isEnabled: boolean): Promise<void>;
978
+ purge(): Promise<void>;
979
+ pendingCount(): Promise<number>;
980
+ private runStep;
981
+ private startDrain;
982
+ private canContinue;
983
+ private scheduleDrain;
984
+ private cancelScheduledDrain;
985
+ private enqueueOperation;
986
+ }
987
+ declare function executeUsageAnalyticsOutboxCommands(commands: UsageAnalyticsOutboxCommand[], dependencies: {
988
+ store: UsageAnalyticsOutboxStore;
989
+ transport: UsageAnalyticsHttpTransport;
990
+ logger?: UsageAnalyticsOutboxLogger;
991
+ }): Promise<UsageAnalyticsOutboxCommandResult[]>;
992
+ //#endregion
993
+ //#region src/usage-analytics/usageAnalyticsOutbox.d.ts
994
+ type CreateUsageAnalyticsOutboxOptions = UsageAnalyticsOutboxFileStoreConfig & {
995
+ store?: UsageAnalyticsOutboxStore;
996
+ transport?: UsageAnalyticsHttpTransport;
997
+ engine?: UsageAnalyticsOutboxEngine;
998
+ isDeliveryEnabled?: boolean;
999
+ nowMs?: () => number;
1000
+ logger?: UsageAnalyticsOutboxLogger;
1001
+ };
1002
+ declare const nativeUsageAnalyticsOutboxEngine: UsageAnalyticsOutboxEngine;
1003
+ declare function createUsageAnalyticsOutbox(config: UsageAnalyticsOutboxConfig, options?: CreateUsageAnalyticsOutboxOptions): UsageAnalyticsOutbox;
1004
+ declare class UsageAnalyticsOutbox extends UsageAnalyticsOutboxCore {
1005
+ constructor(config: UsageAnalyticsOutboxConfig, options?: CreateUsageAnalyticsOutboxOptions);
1006
+ }
1007
+ //#endregion
1008
+ //#region src/usage-analytics/usageAnalyticsReporter.d.ts
1009
+ type UsageAnalyticsReporterContext = Omit<UsageAnalyticsRenderPayloadInput, "stats" | "eventId">;
1010
+ type UsageAnalyticsReporterOptions = CreateUsageAnalyticsOutboxOptions & {
1011
+ outbox?: UsageAnalyticsOutbox;
1012
+ };
1013
+ type UsageAnalyticsRenderCompleteInput = {
1014
+ stats: RenderStats;
1015
+ eventId?: string;
1016
+ context?: Partial<UsageAnalyticsReporterContext>;
1017
+ };
1018
+ declare function createUsageAnalyticsReporter(outboxConfig: UsageAnalyticsOutboxConfig, context: UsageAnalyticsReporterContext, options?: UsageAnalyticsReporterOptions): UsageAnalyticsReporter;
1019
+ declare class UsageAnalyticsReporter {
1020
+ readonly outbox: UsageAnalyticsOutbox;
1021
+ private context;
1022
+ constructor(outboxConfig: UsageAnalyticsOutboxConfig, context: UsageAnalyticsReporterContext, options?: UsageAnalyticsReporterOptions);
1023
+ updateContext(context: Partial<UsageAnalyticsReporterContext>): void;
1024
+ setDeliveryEnabled(isEnabled: boolean): Promise<void>;
1025
+ drain(): Promise<void>;
1026
+ purge(): Promise<void>;
1027
+ recordRenderComplete(input: UsageAnalyticsRenderCompleteInput): Promise<void>;
1028
+ }
1029
+ declare function makeUsageAnalyticsEventId(): string;
1030
+ //#endregion
1031
+ export { AppearanceStyle, BodyFont, type BridgeAvailableOptions, type BridgeControlAvailability, type BridgeEffectiveSettingsInput, BridgeFeature, type BridgeFontOption, type BridgeFunctionMap, type BridgeOption, type BridgeRenderInput, type BridgeRenderingOptions, type BridgeResolvedSettings, type BridgeSettingsControls, type BridgeSettingsInput, CodeFont, ColorScheme, type CreateUsageAnalyticsOutboxOptions, DEFAULT_ORIHA_LOCALE, DEFAULT_ORIHA_RENDER_SETTINGS_DRAFT, type ExportHtmlInput, type ExportHtmlOutput, type ExportOptions, type FetchUsageAnalyticsTransportOptions, type FontRegistryConfig, type FontRegistryConfigFont, type FontRegistryFont, type FontRegistryFontFamilySpec, type FontRegistryFontFile, type FontRegistryFontKind, type FontRegistryManifest, type FontRegistrySourcePolicy, HeadingFont, type HtmlExportMeasureTextBatch, type HtmlExportOptions, type HttpHeader, type KindCount, type NativeBridgeVersionInfo, ORIHA_MESSAGE_KEYS, type OrihaBodyFontSelection, type OrihaBuiltinLocale, type OrihaCodeFontSelection, type OrihaFontFile, type OrihaFontInstallPhase, type OrihaFontInstallProgress, type OrihaFontKind, type OrihaFontRegistryConfig, type OrihaFontsState, type OrihaFormatMessage, type OrihaHeadingFontSelection, type OrihaI18nState, type OrihaInstallFontOptions, type OrihaInstallableFont, type OrihaInstalledFont, type OrihaInstalledFontFile, type OrihaInstalledFontSelection, type OrihaLocale, type OrihaMessageKey, type OrihaMessageTemplate, type OrihaMessageValues, type OrihaMessages, type OrihaOverlayOptions, OrihaOverlayPlacement, type OrihaPdfExportOptions, type OrihaPdfExportResult, OrihaPdfOrientation, OrihaPdfPaperSize, OrihaPreview, type OrihaPreviewDebugOptions, type OrihaPreviewHandle, type OrihaPreviewProps, OrihaProvider, type OrihaProviderProps, type OrihaRenderSettingsAvailableOptions, type OrihaRenderSettingsControlState, type OrihaRenderSettingsControls, type OrihaRenderSettingsDraft, type OrihaRenderSettingsDraftPatch, type OrihaRenderSettingsDraftSetter, type OrihaRenderSettingsFontKind, type OrihaRenderSettingsState, type OrihaToastOptions, OrihaToastPosition, OrihaToastVariant, Plan, type PreparedHtmlExport, type PreparedMarkdownLayout, type PreparedMarkdownPatch, type RenderAsset, RenderAssetKind, type RenderDiagnostic, RenderDiagnosticEngine, RenderDiagnosticSeverity, type RenderInput, RenderMode, type RenderOutput, RenderPatchFallbackReason, type RenderPatchOperation, type RenderPatchOperationKind, type RenderPatchOutput, RenderPatchStrategy, type RenderSnapshot, type RenderSnapshotBlock, type RenderStats, type RenderedBlock, type RenderingOptions, type SendHttpContext, SyntaxTheme, TableBorderStyle, type UsageAnalyticsFetch, type UsageAnalyticsHttpResponse, type UsageAnalyticsHttpTransport, UsageAnalyticsOutbox, type UsageAnalyticsOutboxCommand, UsageAnalyticsOutboxCommandKind, type UsageAnalyticsOutboxCommandResult, type UsageAnalyticsOutboxConfig, type UsageAnalyticsOutboxDeliveryStateInput, type UsageAnalyticsOutboxEngine, type UsageAnalyticsOutboxEnqueueStartInput, type UsageAnalyticsOutboxFileStoreConfig, type UsageAnalyticsOutboxLogger, type UsageAnalyticsOutboxResumeInput, type UsageAnalyticsOutboxStartInput, type UsageAnalyticsOutboxStep, type UsageAnalyticsOutboxStore, type UsageAnalyticsRenderCompleteInput, type UsageAnalyticsRenderPayloadInput, UsageAnalyticsReporter, type UsageAnalyticsReporterContext, type UsageAnalyticsReporterOptions, type UsageAnalyticsStoredEnvelope, type UseOrihaRenderSettingsOptions, bridgeOrihaFontSelection, createExpoUsageAnalyticsOutboxStore, createFetchUsageAnalyticsTransport, createOrihaI18n, createOrihaRenderSettingsControls, createOrihaRenderSettingsDraft, createOrihaRenderSettingsInput, createOrihaRenderSettingsOptions, createUsageAnalyticsOutbox, createUsageAnalyticsReporter, defaultOrihaFormatMessage, executeUsageAnalyticsOutboxCommands, exportHtml, formatOrihaMessage, generatedBridgeTypes_d_exports as generatedBridgeTypes, installedOrihaFontBySelection, installedOrihaFontSelectionId, makeUsageAnalyticsEventId, nativeBridgeVersionInfo, nativeUsageAnalyticsOutboxEngine, orihaFontOptionsForKind, orihaRenderSettingsControlState, prepareHtmlExport, prepareMarkdownLayout, prepareMarkdownPatch, renderPreparedHtmlExport, renderPreparedMarkdown, renderPreparedMarkdownPatch, resolveRenderSettings, usageAnalyticsOutboxResume, usageAnalyticsOutboxStartDeliveryStateChange, usageAnalyticsOutboxStartDrain, usageAnalyticsOutboxStartEnqueue, useOrihaFonts, useOrihaI18n, useOrihaOverlay, useOrihaRenderSettings };