@f-office/docs-react 0.0.0-stage → 0.2.2

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/LICENSE ADDED
@@ -0,0 +1,168 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separately separable from, or merely link (or bind by name) to the
46
+ interfaces of, the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated into the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Work; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Work, in at least one of the
111
+ following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own copyright
118
+ notice to Your own Derivative Works and may provide additional
119
+ or different license terms for use, reproduction, or distribution
120
+ of Your own Derivative Works, or for any such Derivative Works
121
+ as a whole, provided Your use, reproduction, or distribution
122
+ of the Work otherwise complies with the License.
123
+
124
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
125
+ any Contribution intentionally submitted for inclusion in the Work
126
+ by You to the Licensor shall be dual-licensed under the MIT License
127
+ and the Apache License, Version 2.0, without any additional terms or
128
+ conditions. Notwithstanding the above, nothing herein shall supersede
129
+ or modify the terms of any separate license agreement you may have
130
+ with Licensor regarding such Contributions.
131
+
132
+ 6. Trademarks. This License does not grant permission to use the trade
133
+ names, trademarks, service marks, or product names of the Licensor,
134
+ except as required for reasonable and customary use in describing the
135
+ origin of the Work and reproducing the content of the NOTICE file.
136
+
137
+ 7. Disclaimer of Warranty. Unless required by applicable law or
138
+ agreed to in writing, Licensor provides the Work (and its
139
+ Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR
140
+ CONDITIONS OF ANY KIND, either express or implied. You are solely
141
+ responsible for determining the appropriateness of the Work and
142
+ assume any risks associated with Your exercise of permissions under
143
+ this License.
144
+
145
+ 8. Limitation of Liability. In no event and under no legal theory,
146
+ whether in tort (including negligence), contract, or otherwise,
147
+ unless required by applicable law (such as deliberate and grossly
148
+ negligent acts) or agreed to in writing, shall any Contributor be
149
+ liable for damages, including any direct, indirect, special,
150
+ incidental, or consequential damages of any character arising as a
151
+ result of this License or out of the use or inability to use the
152
+ Work (including but not limited to damages for loss of goodwill,
153
+ work stoppage, computer failure or malfunction, or any and all
154
+ other commercial damages or losses), even if such Contributor
155
+ has been advised of the possibility of such damages.
156
+
157
+ 9. Accepting Warranty or Additional Liability. While redistributing
158
+ the Work or Derivative Works thereof, You may choose to accept,
159
+ and charge a fee for, acceptance of support, warranty, or indemnity
160
+ obligations and/or other liability obligations and/or rights
161
+ consistent with this License. However, in accepting such obligations,
162
+ You may act only on Your own behalf and on Your own responsibility,
163
+ and not on behalf of any other Contributor, and only if You agree
164
+ to indemnify, defend, and hold each Contributor harmless for any
165
+ liability incurred by, or claims arising from, such Contributor
166
+ by reason of your accepting any such warranty or additional liability.
167
+
168
+ END OF TERMS AND CONDITIONS
package/NOTICE ADDED
@@ -0,0 +1,31 @@
1
+ F-Office
2
+ Copyright (c) 2026 Onur Solmaz and F-Office Contributors
3
+
4
+ This product is licensed under the Apache License, Version 2.0 (Apache-2.0).
5
+
6
+ Third-Party Notices
7
+ -------------------
8
+
9
+ 1. DrawingML Preset Shape Definitions (`crates/f-office-drawingml/presets/NOTICE`)
10
+ Derived from ECMA-376 preset shape geometry definitions, Ecma International.
11
+ See `crates/f-office-drawingml/presets/NOTICE` for the full notice.
12
+
13
+ 2. Symbol Font Unicode Mappings (`crates/f-office-fonts`)
14
+ Based on `dingbat-to-unicode` (BSD-2-Clause License) and Unicode Consortium
15
+ mapping tables.
16
+
17
+ 3. Windows Code Page Tables (`crates/f-office-fonts`, `crates/f-office-docx`)
18
+ Derived from Unicode Consortium / Microsoft public code page mapping tables.
19
+
20
+ 4. Hyphenation Patterns (`crates/f-office-hyphenate/data/hyph-*.tex`)
21
+ TeX `hyph-utf8` hyphenation pattern files for English, French, and Spanish.
22
+ See the header of each `.tex` file for its individual copyright and license
23
+ notice.
24
+
25
+ 5. Open Fonts (optional `open-fonts` feature, enabled by default in `foffice`)
26
+ Provided via the independent `compatifont` project under the SIL Open Font
27
+ License 1.1 (OFL-1.1).
28
+
29
+ 6. Apache-2.0 and Permissive Rust Dependencies
30
+ Includes crates licensed under MIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause,
31
+ Unicode-3.0, and Zlib (including `ab_glyph_rasterizer`, `zopfli`, and `ryu`).
package/README.md CHANGED
@@ -1,3 +1,84 @@
1
- # Temporary Holding Version
1
+ # `@f-office/docs-react`
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ React 19 components and composable Google Docs-style UI for F-Office Docs, backed by `@f-office/docs` and `@f-office/core`.
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ npm install @f-office/docs-react @f-office/docs @f-office/core react react-dom
9
+ ```
10
+
11
+ ## Full UI (`<DocsApp />`)
12
+
13
+ ```tsx
14
+ import { DocsApp } from "@f-office/docs-react";
15
+ import "@f-office/docs-react/styles.css";
16
+
17
+ export function Page() {
18
+ return (
19
+ <div style={{ height: "100dvh" }}>
20
+ <DocsApp syncDocumentTitle />
21
+ </div>
22
+ );
23
+ }
24
+ ```
25
+
26
+ ## Custom header & navigation (`<DocsProvider>`)
27
+
28
+ Compose your own header (brand links, Next.js / React Router `<Link>`, site navigation) using `<DocsProvider>` and the exported header primitives:
29
+
30
+ ```tsx
31
+ import {
32
+ DocsCanvas,
33
+ DocsDialogs,
34
+ DocsMark,
35
+ DocsOpenButton,
36
+ DocsOutlineButton,
37
+ DocsPageControls,
38
+ DocsProvider,
39
+ DocsThemeButton,
40
+ DocsTitle,
41
+ } from "@f-office/docs-react";
42
+ import "@f-office/docs-react/styles.css";
43
+
44
+ export function DocsRoute() {
45
+ return (
46
+ <div style={{ height: "100dvh" }}>
47
+ <DocsProvider syncDocumentTitle>
48
+ <header className="flex h-16 shrink-0 items-center gap-3 px-4">
49
+ <a href="/" aria-label="Home">
50
+ <DocsMark />
51
+ </a>
52
+ <DocsOutlineButton />
53
+ <DocsTitle />
54
+ <DocsPageControls />
55
+ <DocsThemeButton />
56
+ <DocsOpenButton />
57
+ </header>
58
+ <DocsCanvas />
59
+ <DocsDialogs />
60
+ </DocsProvider>
61
+ </div>
62
+ );
63
+ }
64
+ ```
65
+
66
+ ## Headless React 19 wrapper (`<FOfficeDocs />`)
67
+
68
+ For zero UI chrome (no header, menus, dialogs, or stylesheet required):
69
+
70
+ ```tsx
71
+ import { FOfficeDocs } from "@f-office/docs-react";
72
+
73
+ export function EmbeddedDoc({ file }: { file: File }) {
74
+ return (
75
+ <div style={{ height: "80vh" }}>
76
+ <FOfficeDocs source={file} zoom="fit-width" />
77
+ </div>
78
+ );
79
+ }
80
+ ```
81
+
82
+ ## License
83
+
84
+ Licensed under `Apache-2.0`.
@@ -0,0 +1,42 @@
1
+ import { type CommandId, type FontMode } from "@f-office/docs/chrome";
2
+ import type { Theme } from "./theme.js";
3
+ /** Dialogs opened from the menu bar. */
4
+ export type DialogKind = "shortcuts" | "about" | "advanced";
5
+ /** Currently visible dialog: a menu dialog, or a file-open error message. */
6
+ export type ShownDialog = DialogKind | {
7
+ readonly problem: string;
8
+ };
9
+ /** Document and UI chrome state exposed by {@link useDocs}. */
10
+ export type ChromeState = {
11
+ readonly name: string | null;
12
+ readonly note: string | null;
13
+ readonly selected: boolean;
14
+ readonly outline: boolean;
15
+ readonly zoom: string;
16
+ readonly zoomSteps: readonly number[];
17
+ readonly page: number;
18
+ readonly pageCount: number;
19
+ readonly theme: Theme;
20
+ readonly fonts: FontMode;
21
+ /** Whether the browser supports reading locally installed fonts. */
22
+ readonly installedFonts: boolean;
23
+ };
24
+ /** Actions exposed by {@link useDocs} for menus, toolbars, and custom headers. */
25
+ export type ChromeCalls = {
26
+ /** Runs a command from the shared command table. */
27
+ readonly run: (id: CommandId) => void;
28
+ readonly setOutline: (open: boolean) => void;
29
+ readonly setZoom: (value: string) => void;
30
+ readonly setTheme: (theme: Theme) => void;
31
+ /** Switches between open fonts and locally installed fonts. */
32
+ readonly setFonts: (mode: FontMode) => void;
33
+ /** Returns keyboard focus to the document pages. */
34
+ readonly focusPages: () => void;
35
+ };
36
+ /** Option in the zoom select and zoom menu. */
37
+ export type ZoomOption = {
38
+ readonly value: string;
39
+ readonly label: string;
40
+ };
41
+ /** Zoom menu options: fit modes, discrete steps, and any intermediate pinch zoom factor. */
42
+ export declare function zoomOptions(steps: readonly number[], value: string): ZoomOption[];
@@ -0,0 +1,6 @@
1
+ /** The F-Office mark with the wordmark beside it, switching automatically with theme. */
2
+ export declare function DocsWordmark({ className }: {
3
+ className: string;
4
+ }): import("react").JSX.Element;
5
+ /** Dialogs opened from {@link DocsMenuBar} or file-open errors, bound to {@link useDocs}. */
6
+ export declare function DocsDialogs(): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { type DocsProviderProps } from "./docs-provider.js";
2
+ export type DocsAppProps = Omit<DocsProviderProps, "children">;
3
+ /**
4
+ * Batteries-included Google Docs-style React 19 application shell filling its parent container
5
+ * (`h-full min-h-0`). For custom navigation or header layouts, compose {@link DocsProvider},
6
+ * {@link DocsCanvas}, {@link DocsDialogs}, and header primitives directly.
7
+ */
8
+ export declare function DocsApp(props: DocsAppProps): import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import type { ReactNode } from "react";
2
+ /**
3
+ * Document canvas area inside {@link DocsProvider}: renders `<f-office-docs>` declaratively
4
+ * using React 19 native custom-element support, plus the right-click context menu, empty state,
5
+ * and drag-and-drop overlay.
6
+ */
7
+ export declare function DocsCanvas({ emptyState, className, }: {
8
+ /** Optional custom empty state shown before a document is opened (defaults to {@link DocsStart}). */
9
+ emptyState?: ReactNode;
10
+ className?: string;
11
+ }): import("react").JSX.Element;
@@ -0,0 +1,66 @@
1
+ import { type ReactNode, type RefObject } from "react";
2
+ import { type FOfficeDocsElement, type FontSource } from "@f-office/docs";
3
+ import { type MenuRequest, type ViewerFiles } from "@f-office/docs/chrome";
4
+ import type { ChromeCalls, ChromeState, ShownDialog } from "./chrome.js";
5
+ import { Keeper, type Kept } from "./keep.js";
6
+ import { type Theme } from "./theme.js";
7
+ export type DocsProviderProps = {
8
+ children: ReactNode;
9
+ /** Optional persistence keeper; pass `null` to disable browser storage. */
10
+ keeper?: Keeper | null;
11
+ /** Compatifont CDN base URL for open fonts (defaults to verified v0.1.2 CDN). */
12
+ fontCdnUrl?: string;
13
+ /** Local font folder URL override (used by dev/QA builds serving local fonts). */
14
+ fontFolderUrl?: string | URL;
15
+ /** Full custom font source override. */
16
+ fontSource?: FontSource;
17
+ /** Optional custom WASM/glue/dictionaries URLs for self-hosted builds. */
18
+ moduleUrls?: Partial<ViewerFiles>;
19
+ /** Controlled theme value; omit for uncontrolled theme state. */
20
+ theme?: Theme;
21
+ /** Controlled theme change handler. */
22
+ onThemeChange?: (theme: Theme) => void;
23
+ /** Whether to mirror `data-theme` on `document.documentElement` (default `true`). */
24
+ applyDocumentTheme?: boolean;
25
+ /** localStorage key when theme is uncontrolled (default `"f-office-viewer:theme"`). */
26
+ themeStorageKey?: string;
27
+ /** Whether to update `document.title` with the opened file name (default `false`). */
28
+ syncDocumentTitle?: boolean;
29
+ /** Whether to read `?file=`, `?target=`, and `?fonts=` from `window.location.search` (default `true`). */
30
+ readUrlParams?: boolean;
31
+ /** Optional initial `File` to open on mount. */
32
+ initialFile?: File;
33
+ /** Optional initial same-origin document URL to fetch and open on mount. */
34
+ initialUrl?: string;
35
+ className?: string;
36
+ };
37
+ /** Public context value returned by {@link useDocs}. */
38
+ export type DocsContextValue = {
39
+ readonly state: ChromeState;
40
+ readonly calls: ChromeCalls;
41
+ readonly openFile: (file: File | undefined) => void;
42
+ readonly elementRef: RefObject<FOfficeDocsElement | null>;
43
+ readonly target: string;
44
+ readonly setTarget: (id: string) => void;
45
+ readonly dialog: ShownDialog | null;
46
+ readonly closeDialog: () => void;
47
+ };
48
+ /** Internal wiring shared between {@link DocsProvider} and {@link DocsCanvas}. */
49
+ export type DocsInternalValue = {
50
+ readonly file: Kept | null;
51
+ readonly dragging: boolean;
52
+ readonly generation: number;
53
+ readonly menu: MenuRequest | null;
54
+ readonly moduleUrls: Partial<ViewerFiles> | undefined;
55
+ readonly attachElement: (element: FOfficeDocsElement | null) => () => void;
56
+ };
57
+ /** Reads the current F-Office Docs state and commands inside a {@link DocsProvider}. */
58
+ export declare function useDocs(): DocsContextValue;
59
+ /** @internal Internal state for {@link DocsCanvas}. */
60
+ export declare function useDocsInternal(): DocsInternalValue;
61
+ /**
62
+ * Composable React 19 provider owning document state, commands, keyboard shortcuts, drag-and-drop,
63
+ * file picker, optional OPFS persistence, and theme state. Pair with {@link DocsHeader},
64
+ * {@link DocsMenuBar}, {@link DocsCanvas}, and {@link DocsDialogs} — or build your own header.
65
+ */
66
+ export declare function DocsProvider({ children, keeper: keeperProp, fontCdnUrl, fontFolderUrl, fontSource: customFontSource, moduleUrls, theme: controlledTheme, onThemeChange, applyDocumentTheme, themeStorageKey, syncDocumentTitle, readUrlParams, initialFile, initialUrl, className, }: DocsProviderProps): import("react").JSX.Element;
@@ -0,0 +1,42 @@
1
+ import { type CSSProperties, type Ref } from "react";
2
+ import { type DocsChrome, type DocsEvents, type DocsSource, type FOfficeDocsElement, type FontSource, type HighlightItem, type ZoomSetting } from "@f-office/docs";
3
+ import type { MenuRequest, View, ViewerFiles } from "@f-office/docs/chrome";
4
+ export type FOfficeDocsProps = {
5
+ /** Ref to the underlying `<f-office-docs>` Custom Element (React 19 plain ref prop). */
6
+ ref?: Ref<FOfficeDocsElement | null>;
7
+ /** Document bytes, `ArrayBuffer`, or `File`/`Blob` to open. */
8
+ source?: DocsSource | null;
9
+ /** Display name for `source` (defaults to `source.name` for `File` or `"document.docx"`). */
10
+ name?: string;
11
+ /** Initial or controlled zoom setting (`"fit-width"`, `"fit-page"`, or numeric factor). */
12
+ zoom?: ZoomSetting;
13
+ /** Word layout target ID (`"word-win"`, `"word-web"`, `"word-mac"`). */
14
+ target?: string | null;
15
+ /** Built-in shadow DOM bar mode (`"none"` by default for headless embedding). */
16
+ chrome?: DocsChrome;
17
+ /** Read-only mode (`true` by default). */
18
+ readOnly?: boolean;
19
+ /** Outline panel open state. */
20
+ outlineOpen?: boolean;
21
+ /** Custom font source (defaults to verified Compatifont CDN inside `<f-office-docs>`). */
22
+ fontSource?: FontSource | null;
23
+ /** Optional lazy per-page highlights (search hits, comments, notes). */
24
+ highlights?: readonly HighlightItem[];
25
+ /** Optional custom URLs for self-hosted WASM/glue/dictionaries. */
26
+ moduleUrls?: Partial<ViewerFiles>;
27
+ className?: string;
28
+ style?: CSSProperties;
29
+ onOpen?: (detail: DocsEvents["open"]) => void;
30
+ onViewChange?: (view: View) => void;
31
+ onPageChange?: (detail: DocsEvents["pagechange"]) => void;
32
+ onOutlineChange?: (detail: DocsEvents["outlinechange"]) => void;
33
+ onSelectionChange?: (detail: DocsEvents["selectionchange"]) => void;
34
+ /** Called on page right-click / context menu; prevents default automatically when provided. */
35
+ onMenu?: (request: MenuRequest) => void;
36
+ onError?: (detail: DocsEvents["error"]) => void;
37
+ };
38
+ /**
39
+ * Unopinionated React 19 wrapper around the `<f-office-docs>` Web Component.
40
+ * Assumes zero UI chrome, menus, or styling framework.
41
+ */
42
+ export declare function FOfficeDocs({ ref, source, name, zoom, target, chrome, readOnly, outlineOpen, fontSource, highlights, moduleUrls, className, style, onOpen, onViewChange, onPageChange, onOutlineChange, onSelectionChange, onMenu, onError, }: FOfficeDocsProps): import("react").JSX.Element;
@@ -0,0 +1,35 @@
1
+ /** The F-Office square mark icon, bundled cleanly inside `@f-office/docs-react`. */
2
+ export declare function DocsMark({ className, alt, }: {
3
+ className?: string;
4
+ alt?: string;
5
+ }): import("react").JSX.Element;
6
+ /** Mobile outline toggle button shown when a document is open and the outline panel is closed. */
7
+ export declare function DocsOutlineButton({ className }: {
8
+ className?: string;
9
+ }): import("react").JSX.Element | null;
10
+ /** Document title heading + {@link DocsMenuBar}, bound to {@link useDocs}. */
11
+ export declare function DocsTitle({ fallback, className, }: {
12
+ fallback?: string;
13
+ className?: string;
14
+ }): import("react").JSX.Element;
15
+ /** Compact page indicator and zoom dropdown shown at medium+ viewports when a document is open. */
16
+ export declare function DocsPageControls({ className }: {
17
+ className?: string;
18
+ }): import("react").JSX.Element | null;
19
+ /** Cycles between System, Light, and Dark theme via {@link useDocs}. */
20
+ export declare function DocsThemeButton({ className }: {
21
+ className?: string;
22
+ }): import("react").JSX.Element;
23
+ /** Primary button triggering the local DOCX file picker via {@link useDocs}. */
24
+ export declare function DocsOpenButton({ className }: {
25
+ className?: string;
26
+ }): import("react").JSX.Element;
27
+ /**
28
+ * Default Google Docs-style header assembled from the composable primitives.
29
+ * Hosts wanting custom navigation or branding can render their own `<header>` inside
30
+ * {@link DocsProvider} using {@link DocsOutlineButton}, {@link DocsTitle}, {@link DocsPageControls},
31
+ * {@link DocsThemeButton}, and {@link DocsOpenButton}.
32
+ */
33
+ export declare function DocsHeader({ className }: {
34
+ className?: string;
35
+ }): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import "./styles.css";
2
+ export { DocsApp, type DocsAppProps } from "./docs-app.js";
3
+ export { DocsCanvas } from "./docs-canvas.js";
4
+ export { DocsProvider, useDocs, type DocsContextValue, type DocsProviderProps, } from "./docs-provider.js";
5
+ export { DocsDialogs, DocsWordmark } from "./dialogs.js";
6
+ export { FOfficeDocs, type FOfficeDocsProps } from "./f-office-docs.js";
7
+ export { DocsHeader, DocsMark, DocsOpenButton, DocsOutlineButton, DocsPageControls, DocsThemeButton, DocsTitle, } from "./header.js";
8
+ export { DocsMenuBar } from "./menus.js";
9
+ export { DocsStart } from "./start.js";
10
+ export { zoomOptions, type ChromeCalls, type ChromeState, type DialogKind, type ShownDialog, type ZoomOption, } from "./chrome.js";
11
+ export { browserSlots, databaseSlots, folderSlots, KEEP_LIMIT, KEEP_NOTES, Keeper, openDatabase, VIEW_DELAY, type Folder, type KeepResult, type Kept, type Slot, type Slots, } from "./keep.js";
12
+ export { applyTheme, DEFAULT_THEME_STORAGE_KEY, loadTheme, nextTheme, saveTheme, THEME_NAMES, THEMES, type StorageLike, type Theme, } from "./theme.js";
13
+ export { askedFile, dropFileParameter, fetchAskedFile, FILE_PARAMETER, fileName, type AskedFile, type FetchedFile, } from "./url-file.js";