@book.dev/ui 1.60.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.
- package/LICENSE +21 -0
- package/dist/EmojiGrid-xK5mPJPo.js +205 -0
- package/dist/blockeditor/BlockEditor.d.ts +68 -0
- package/dist/blockeditor/CodeBlockView.d.ts +19 -0
- package/dist/blockeditor/InlineToolbar.d.ts +18 -0
- package/dist/blockeditor/LinkPicker.d.ts +16 -0
- package/dist/blockeditor/MentionMenu.d.ts +14 -0
- package/dist/blockeditor/PresentBlocks.d.ts +21 -0
- package/dist/blockeditor/RichTextEditor.d.ts +29 -0
- package/dist/blockeditor/SlashMenu.d.ts +49 -0
- package/dist/blockeditor/TextBlockView.d.ts +9 -0
- package/dist/blockeditor/__tests__/LinkPicker.test.d.ts +1 -0
- package/dist/blockeditor/__tests__/SlashMenu.test.d.ts +1 -0
- package/dist/blockeditor/__tests__/aiApply.test.d.ts +1 -0
- package/dist/blockeditor/__tests__/groupLock.test.d.ts +1 -0
- package/dist/blockeditor/__tests__/highlight.test.d.ts +1 -0
- package/dist/blockeditor/__tests__/mergeUp.test.d.ts +1 -0
- package/dist/blockeditor/__tests__/present.test.d.ts +1 -0
- package/dist/blockeditor/aiBlocks.d.ts +9 -0
- package/dist/blockeditor/colors.d.ts +23 -0
- package/dist/blockeditor/exportBlocks.d.ts +25 -0
- package/dist/blockeditor/highlight.d.ts +25 -0
- package/dist/blockeditor/index.d.ts +8 -0
- package/dist/blockeditor/kit/KitFrame.d.ts +95 -0
- package/dist/blockeditor/kit/KitSettings.d.ts +18 -0
- package/dist/blockeditor/kit/OptionsEditor.d.ts +8 -0
- package/dist/blockeditor/kit/__tests__/chartMath.test.d.ts +1 -0
- package/dist/blockeditor/kit/__tests__/dataflow.test.d.ts +1 -0
- package/dist/blockeditor/kit/__tests__/exportKit.test.d.ts +1 -0
- package/dist/blockeditor/kit/__tests__/exportKit2.test.d.ts +1 -0
- package/dist/blockeditor/kit/__tests__/groupSync.test.d.ts +1 -0
- package/dist/blockeditor/kit/__tests__/inputs2Render.test.d.ts +1 -0
- package/dist/blockeditor/kit/__tests__/inputs2Scope.test.d.ts +1 -0
- package/dist/blockeditor/kit/__tests__/inputsRender.test.d.ts +1 -0
- package/dist/blockeditor/kit/__tests__/kitConfig.test.d.ts +1 -0
- package/dist/blockeditor/kit/__tests__/kitPanel.test.d.ts +1 -0
- package/dist/blockeditor/kit/__tests__/options.test.d.ts +1 -0
- package/dist/blockeditor/kit/__tests__/scope.test.d.ts +1 -0
- package/dist/blockeditor/kit/cards.d.ts +51 -0
- package/dist/blockeditor/kit/chartMath.d.ts +62 -0
- package/dist/blockeditor/kit/charts.d.ts +27 -0
- package/dist/blockeditor/kit/completion.d.ts +45 -0
- package/dist/blockeditor/kit/dataflow.d.ts +68 -0
- package/dist/blockeditor/kit/groupSync.d.ts +23 -0
- package/dist/blockeditor/kit/index.d.ts +11 -0
- package/dist/blockeditor/kit/inputs.d.ts +135 -0
- package/dist/blockeditor/kit/inputs2.d.ts +86 -0
- package/dist/blockeditor/kit/kitConfig.d.ts +5 -0
- package/dist/blockeditor/kit/kitPanel.d.ts +31 -0
- package/dist/blockeditor/kit/lock.d.ts +12 -0
- package/dist/blockeditor/kit/options.d.ts +60 -0
- package/dist/blockeditor/kit/progress.d.ts +20 -0
- package/dist/blockeditor/kit/scope.d.ts +100 -0
- package/dist/blockeditor/model.d.ts +236 -0
- package/dist/blockeditor/present.d.ts +18 -0
- package/dist/blockeditor/provider.d.ts +16 -0
- package/dist/blockeditor/reactiveBlocks.d.ts +2 -0
- package/dist/blockeditor/registry.d.ts +38 -0
- package/dist/blockeditor/richtext.d.ts +48 -0
- package/dist/blockeditor/useBlockEditor.d.ts +45 -0
- package/dist/components/AboutDialog.d.ts +9 -0
- package/dist/components/AgentPanel.d.ts +2 -0
- package/dist/components/AiBridgeHost.d.ts +14 -0
- package/dist/components/AiSearchDialog.d.ts +8 -0
- package/dist/components/AiSettings.d.ts +7 -0
- package/dist/components/AppearanceSettings.d.ts +3 -0
- package/dist/components/BackForwardCluster.d.ts +1 -0
- package/dist/components/BackupSettings.d.ts +2 -0
- package/dist/components/BreadcrumbCluster.d.ts +1 -0
- package/dist/components/ColorSchemeMenu.d.ts +1 -0
- package/dist/components/CommandMenu.d.ts +1 -0
- package/dist/components/CommandToggle.d.ts +3 -0
- package/dist/components/DocumentArea.d.ts +8 -0
- package/dist/components/Drawer.d.ts +7 -0
- package/dist/components/EmojiGrid.d.ts +16 -0
- package/dist/components/EmojiPickerHost.d.ts +8 -0
- package/dist/components/ExtensionsSettings.d.ts +7 -0
- package/dist/components/FavoritesNav.d.ts +8 -0
- package/dist/components/GeneralSettings.d.ts +2 -0
- package/dist/components/GlobalShortcuts.d.ts +9 -0
- package/dist/components/HomeButton.d.ts +2 -0
- package/dist/components/IconPicker.d.ts +17 -0
- package/dist/components/NavBar.d.ts +1 -0
- package/dist/components/NavContextMenu.d.ts +7 -0
- package/dist/components/PageActionsCluster.d.ts +9 -0
- package/dist/components/PageAppearanceHost.d.ts +9 -0
- package/dist/components/PageContextMenu.d.ts +17 -0
- package/dist/components/PageCover.d.ts +18 -0
- package/dist/components/PageHeaderControls.d.ts +13 -0
- package/dist/components/PageIcon.d.ts +16 -0
- package/dist/components/PageProperties.d.ts +53 -0
- package/dist/components/PluginBoot.d.ts +2 -0
- package/dist/components/PresentMode.d.ts +7 -0
- package/dist/components/ProfileAvatar.d.ts +17 -0
- package/dist/components/ProfileMenu.d.ts +6 -0
- package/dist/components/Settings.d.ts +7 -0
- package/dist/components/SettingsButton.d.ts +2 -0
- package/dist/components/SettingsPanel.d.ts +14 -0
- package/dist/components/SideNav.d.ts +1 -0
- package/dist/components/SideNavToggle.d.ts +3 -0
- package/dist/components/SidebarSections.d.ts +17 -0
- package/dist/components/SplitPane.d.ts +9 -0
- package/dist/components/TemplateGallery.d.ts +8 -0
- package/dist/components/TitlebarTabs.d.ts +10 -0
- package/dist/components/TrashDialog.d.ts +7 -0
- package/dist/components/WindowActionsCluster.d.ts +6 -0
- package/dist/components/WindowControls.d.ts +6 -0
- package/dist/components/WindowTitle.d.ts +7 -0
- package/dist/components/WorkspaceInfo.d.ts +6 -0
- package/dist/components/WorkspaceNavigationTree.d.ts +14 -0
- package/dist/components/WorkspaceSelectMenu.d.ts +10 -0
- package/dist/components/__tests__/AppearanceSettings.test.d.ts +1 -0
- package/dist/components/__tests__/PageIcon.test.d.ts +1 -0
- package/dist/components/__tests__/SettingsPanel.test.d.ts +1 -0
- package/dist/components/__tests__/buildTree.test.d.ts +1 -0
- package/dist/components/__tests__/profileAvatar.test.d.ts +1 -0
- package/dist/components/appearance/AppearanceControls.d.ts +33 -0
- package/dist/components/appearance/PageCustomiseBody.d.ts +29 -0
- package/dist/components/brand/OpenBookLogo.d.ts +11 -0
- package/dist/components/brand/index.d.ts +1 -0
- package/dist/components/database/DatabaseCard.d.ts +36 -0
- package/dist/components/database/DatabasePicker.d.ts +12 -0
- package/dist/components/database/DatabaseRowProperties.d.ts +13 -0
- package/dist/components/database/DatabaseView.d.ts +9 -0
- package/dist/components/database/InlineDatabaseBlock.d.ts +3 -0
- package/dist/components/database/__tests__/InlineDatabaseBlock.test.d.ts +1 -0
- package/dist/components/database/databaseCells.d.ts +57 -0
- package/dist/components/database/databaseCharts.d.ts +28 -0
- package/dist/components/database/databaseColors.d.ts +12 -0
- package/dist/components/database/databaseGraph.d.ts +16 -0
- package/dist/components/database/databaseLayouts.d.ts +84 -0
- package/dist/components/database/databaseMap.d.ts +21 -0
- package/dist/components/database/databaseMapLeaflet.d.ts +26 -0
- package/dist/components/database/databaseMenus.d.ts +97 -0
- package/dist/components/database/databaseTimeline.d.ts +27 -0
- package/dist/components/database/geocode.d.ts +24 -0
- package/dist/components/database/useDatabase.d.ts +129 -0
- package/dist/components/index.d.ts +12 -0
- package/dist/components/review/BlockReviewMarkers.d.ts +19 -0
- package/dist/components/review/CommentThread.d.ts +20 -0
- package/dist/components/review/ReviewPaneBody.d.ts +12 -0
- package/dist/components/review/SuggestHost.d.ts +13 -0
- package/dist/components/review/SuggestionCard.d.ts +21 -0
- package/dist/components/review/__tests__/review.test.d.ts +1 -0
- package/dist/components/review/useReview.d.ts +27 -0
- package/dist/components/settings/AccountSettings.d.ts +6 -0
- package/dist/components/settings/AdminSettings.d.ts +2 -0
- package/dist/components/settings/ConnectionSettings.d.ts +7 -0
- package/dist/components/settings/CustomisationSettings.d.ts +2 -0
- package/dist/components/settings/ProfileSettings.d.ts +2 -0
- package/dist/components/settings/primitives.d.ts +47 -0
- package/dist/components/settings/stubs.d.ts +8 -0
- package/dist/components/ui/__tests__/kbd.test.d.ts +1 -0
- package/dist/components/ui/__tests__/markdown.test.d.ts +1 -0
- package/dist/components/ui/__tests__/select.test.d.ts +1 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/command.d.ts +86 -0
- package/dist/components/ui/context-menu.d.ts +24 -0
- package/dist/components/ui/dialog.d.ts +18 -0
- package/dist/components/ui/dropdown-menu.d.ts +27 -0
- package/dist/components/ui/icon-button.d.ts +16 -0
- package/dist/components/ui/input.d.ts +9 -0
- package/dist/components/ui/kbd.d.ts +31 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/markdown.d.ts +19 -0
- package/dist/components/ui/navigation-menu.d.ts +12 -0
- package/dist/components/ui/popover.d.ts +6 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/select.d.ts +42 -0
- package/dist/components/ui/skeleton.d.ts +6 -0
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/ui/tree.d.ts +37 -0
- package/dist/components/useAppCommands.d.ts +25 -0
- package/dist/data/DataProvider.d.ts +30 -0
- package/dist/data/index.d.ts +1 -0
- package/dist/databaseMapLeaflet-8LYcHcR6.js +87 -0
- package/dist/export/__tests__/chartNormalize.test.d.ts +1 -0
- package/dist/export/__tests__/export.test.d.ts +1 -0
- package/dist/export/__tests__/exportReactive.test.d.ts +1 -0
- package/dist/export/chartNormalize.d.ts +22 -0
- package/dist/export/chartSvg.d.ts +2 -0
- package/dist/export/documentModel.d.ts +136 -0
- package/dist/export/exportSite.d.ts +40 -0
- package/dist/export/format.d.ts +2 -0
- package/dist/export/kitChart.d.ts +21 -0
- package/dist/export/toHtml.d.ts +25 -0
- package/dist/export/toMarkdown.d.ts +7 -0
- package/dist/export/toPdf.d.ts +14 -0
- package/dist/exportBlocks-33D7P_8Q.js +987 -0
- package/dist/exportSite-DlRm4u7W.js +50 -0
- package/dist/format-CLQoRoYP.js +1646 -0
- package/dist/i18n/__tests__/i18n.test.d.ts +1 -0
- package/dist/i18n/index.d.ts +24 -0
- package/dist/i18n/messages/de.d.ts +2 -0
- package/dist/i18n/messages/en.d.ts +977 -0
- package/dist/i18n/messages/ja.d.ts +2 -0
- package/dist/i18n/messages/zh.d.ts +2 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +20915 -0
- package/dist/layouts/DefaultLayout.d.ts +4 -0
- package/dist/layouts/index.d.ts +1 -0
- package/dist/lib/__tests__/accountClient.test.d.ts +1 -0
- package/dist/lib/__tests__/backlinks.test.d.ts +1 -0
- package/dist/lib/__tests__/backupBundle.test.d.ts +1 -0
- package/dist/lib/__tests__/blockExport.test.d.ts +1 -0
- package/dist/lib/__tests__/blockModel.test.d.ts +1 -0
- package/dist/lib/__tests__/databaseFormula.test.d.ts +1 -0
- package/dist/lib/__tests__/databaseTypes.test.d.ts +1 -0
- package/dist/lib/__tests__/favorites.test.d.ts +1 -0
- package/dist/lib/__tests__/homePage.test.d.ts +1 -0
- package/dist/lib/__tests__/hud.test.d.ts +1 -0
- package/dist/lib/__tests__/icons.test.d.ts +1 -0
- package/dist/lib/__tests__/mixedContent.test.d.ts +1 -0
- package/dist/lib/__tests__/pageAppearance.test.d.ts +1 -0
- package/dist/lib/__tests__/pageIcon.test.d.ts +1 -0
- package/dist/lib/__tests__/pageLayout.test.d.ts +1 -0
- package/dist/lib/__tests__/pageSaveStatus.test.d.ts +1 -0
- package/dist/lib/__tests__/pageTheme.test.d.ts +1 -0
- package/dist/lib/__tests__/parentGrouping.test.d.ts +1 -0
- package/dist/lib/__tests__/pluginSdk.test.d.ts +1 -0
- package/dist/lib/__tests__/recents.test.d.ts +1 -0
- package/dist/lib/__tests__/relations.test.d.ts +1 -0
- package/dist/lib/__tests__/templates.test.d.ts +1 -0
- package/dist/lib/__tests__/textMerge.test.d.ts +1 -0
- package/dist/lib/__tests__/themes.test.d.ts +1 -0
- package/dist/lib/__tests__/treeMove.test.d.ts +1 -0
- package/dist/lib/aiBridge.d.ts +67 -0
- package/dist/lib/aiFeatures.d.ts +31 -0
- package/dist/lib/aiSettingsNav.d.ts +14 -0
- package/dist/lib/backupBundle.d.ts +23 -0
- package/dist/lib/bookFolderTransfer.d.ts +15 -0
- package/dist/lib/download.d.ts +10 -0
- package/dist/lib/editorChrome.d.ts +14 -0
- package/dist/lib/emoji.d.ts +10 -0
- package/dist/lib/emojiData.d.ts +21 -0
- package/dist/lib/emojiPicker.d.ts +31 -0
- package/dist/lib/favorites.d.ts +11 -0
- package/dist/lib/homePage.d.ts +53 -0
- package/dist/lib/hud.d.ts +70 -0
- package/dist/lib/iconRecents.d.ts +3 -0
- package/dist/lib/iconValue.d.ts +19 -0
- package/dist/lib/lucideIcons.d.ts +21 -0
- package/dist/lib/openDocs.d.ts +5 -0
- package/dist/lib/pageActions.d.ts +17 -0
- package/dist/lib/pageAppearance.d.ts +20 -0
- package/dist/lib/pageCover.d.ts +21 -0
- package/dist/lib/pageCustomise.d.ts +6 -0
- package/dist/lib/pageDocActions.d.ts +20 -0
- package/dist/lib/pageFont.d.ts +25 -0
- package/dist/lib/pageFullWidth.d.ts +10 -0
- package/dist/lib/pageIcon.d.ts +25 -0
- package/dist/lib/pageLinks.d.ts +41 -0
- package/dist/lib/pageSaveStatus.d.ts +14 -0
- package/dist/lib/pageTheme.d.ts +15 -0
- package/dist/lib/pageThemePresets.d.ts +23 -0
- package/dist/lib/recents.d.ts +9 -0
- package/dist/lib/reviewPane.d.ts +23 -0
- package/dist/lib/selection.d.ts +2 -0
- package/dist/lib/shortcuts.d.ts +79 -0
- package/dist/lib/sidebarStyles.d.ts +10 -0
- package/dist/lib/suggestBridge.d.ts +33 -0
- package/dist/lib/textMerge.d.ts +19 -0
- package/dist/lib/themes.d.ts +137 -0
- package/dist/lib/treeMove.d.ts +24 -0
- package/dist/lib/useModifierHeld.d.ts +1 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lucideIcons-B6pmC-WQ.js +5003 -0
- package/dist/model-CBxw8JNb.js +734 -0
- package/dist/pageIcon-BWTy7hAh.js +32 -0
- package/dist/plugins/__tests__/host.test.d.ts +1 -0
- package/dist/plugins/__tests__/loader.test.d.ts +1 -0
- package/dist/plugins/__tests__/pagePlugin.test.d.ts +1 -0
- package/dist/plugins/api.d.ts +67 -0
- package/dist/plugins/commandRegistry.d.ts +15 -0
- package/dist/plugins/host.d.ts +32 -0
- package/dist/plugins/index.d.ts +5 -0
- package/dist/plugins/loader.d.ts +19 -0
- package/dist/plugins/pagePlugin.d.ts +21 -0
- package/dist/providers/AccountProvider.d.ts +67 -0
- package/dist/providers/ConfirmProvider.d.ts +30 -0
- package/dist/providers/ForwardingProvider.d.ts +23 -0
- package/dist/providers/HudProvider.d.ts +9 -0
- package/dist/providers/I18nProvider.d.ts +23 -0
- package/dist/providers/NavigationProvider.d.ts +89 -0
- package/dist/providers/PlatformLibraryProvider.d.ts +107 -0
- package/dist/providers/PreferencesProvider.d.ts +47 -0
- package/dist/providers/ThemeProvider.d.ts +26 -0
- package/dist/providers/WorkspaceProvider.d.ts +40 -0
- package/dist/providers/__tests__/PreferencesProvider.test.d.ts +1 -0
- package/dist/providers/__tests__/extractToken.test.d.ts +1 -0
- package/dist/providers/__tests__/windowModel.test.d.ts +1 -0
- package/dist/providers/index.d.ts +10 -0
- package/dist/providers/windowModel.d.ts +69 -0
- package/dist/screens/BlockPageDocument.d.ts +4 -0
- package/dist/screens/ConnectedPageDocument.d.ts +14 -0
- package/dist/screens/DataflowView.d.ts +2 -0
- package/dist/screens/HomeScreen.d.ts +7 -0
- package/dist/screens/index.d.ts +3 -0
- package/dist/screens/pageChrome.d.ts +46 -0
- package/dist/style.css +3 -0
- package/dist/toHtml-BoPr8Ce4.js +394 -0
- package/dist/toPdf-DGtKQSRA.js +133 -0
- package/package.json +94 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { type RelationCardinality, type DatabasePropertyType, type DatabaseRow, type DatabaseSelectOption, type DatabaseView, type DatabaseViewType, type NumberDisplay, type NumberFormat, type PropertyGroup, type RollupConfig, type RowTemplate, type StoredDatabase } from '@book.dev/sdk';
|
|
2
|
+
export interface NewPropertyInput {
|
|
3
|
+
name: string;
|
|
4
|
+
type: DatabasePropertyType;
|
|
5
|
+
/** For `select`/`multi_select`: initial option labels. */
|
|
6
|
+
options?: string[];
|
|
7
|
+
/** For `expr`: the exported cell name to read. */
|
|
8
|
+
cellName?: string;
|
|
9
|
+
/** For `formula`: the expression source. */
|
|
10
|
+
formula?: string;
|
|
11
|
+
/** For `number`/`formula`: the display format. */
|
|
12
|
+
numberFormat?: NumberFormat;
|
|
13
|
+
/** For `date`: store a start→end range. */
|
|
14
|
+
dateRange?: boolean;
|
|
15
|
+
/** For `relation`: the target database whose rows this links to. */
|
|
16
|
+
relationDatabaseId?: string;
|
|
17
|
+
/** For `relation`: the cardinality (drives the single/many cap per side). */
|
|
18
|
+
relationCardinality?: RelationCardinality;
|
|
19
|
+
/** A short helper description. */
|
|
20
|
+
description?: string;
|
|
21
|
+
}
|
|
22
|
+
/** Fields editable on an existing property (any subset). */
|
|
23
|
+
export interface PropertyPatch {
|
|
24
|
+
name?: string;
|
|
25
|
+
type?: DatabasePropertyType;
|
|
26
|
+
options?: DatabaseSelectOption[];
|
|
27
|
+
cellName?: string;
|
|
28
|
+
formula?: string;
|
|
29
|
+
numberFormat?: NumberFormat;
|
|
30
|
+
numberDisplay?: NumberDisplay;
|
|
31
|
+
numberTarget?: number;
|
|
32
|
+
idPrefix?: string;
|
|
33
|
+
dateRange?: boolean;
|
|
34
|
+
includeTime?: boolean;
|
|
35
|
+
dateDisplay?: 'absolute' | 'relative';
|
|
36
|
+
description?: string;
|
|
37
|
+
groupId?: string | null;
|
|
38
|
+
pageHidden?: boolean;
|
|
39
|
+
rollup?: RollupConfig;
|
|
40
|
+
relationDatabaseId?: string;
|
|
41
|
+
relationSingle?: boolean;
|
|
42
|
+
relationCardinality?: RelationCardinality;
|
|
43
|
+
}
|
|
44
|
+
export interface UseDatabase {
|
|
45
|
+
database: StoredDatabase | null;
|
|
46
|
+
loading: boolean;
|
|
47
|
+
/** All rows (unfiltered), in manual order. */
|
|
48
|
+
rows: DatabaseRow[];
|
|
49
|
+
/** Rows after the active view's filters + sorts + the quick-search query. */
|
|
50
|
+
visibleRows: DatabaseRow[];
|
|
51
|
+
activeView: DatabaseView | null;
|
|
52
|
+
setActiveViewId: (viewId: string) => void;
|
|
53
|
+
/** The quick-search query applied across every column. */
|
|
54
|
+
search: string;
|
|
55
|
+
setSearch: (query: string) => void;
|
|
56
|
+
/** Create a row, optionally pre-setting property values. Returns the new id. */
|
|
57
|
+
addRow: (initial?: Record<string, unknown>) => Promise<string | undefined>;
|
|
58
|
+
/** Create a sub-item nested under `parentId`. Returns the new row id. */
|
|
59
|
+
addSubItem: (parentId: string) => Promise<string | undefined>;
|
|
60
|
+
/** Re-parent a row (`null` = top level). Reverts if the server refuses (e.g. a cycle). */
|
|
61
|
+
setRowParent: (rowId: string, parentId: string | null) => Promise<void>;
|
|
62
|
+
renameRow: (rowId: string, name: string) => Promise<void>;
|
|
63
|
+
setRowProperty: (rowId: string, propertyId: string, value: unknown) => Promise<void>;
|
|
64
|
+
/** Set several properties of one row atomically (single optimistic update + PATCH). */
|
|
65
|
+
setRowProperties: (rowId: string, patch: Record<string, unknown>) => Promise<void>;
|
|
66
|
+
/** Duplicate a row (its title, properties, and document), at the same nesting level. */
|
|
67
|
+
duplicateRow: (rowId: string) => Promise<void>;
|
|
68
|
+
/** Import CSV text: first column → title, others map to (or create) columns. Returns the row count. */
|
|
69
|
+
importCsv: (text: string) => Promise<number>;
|
|
70
|
+
/** Set the manual order of rows (full ordered id list). */
|
|
71
|
+
reorderRows: (orderedIds: string[]) => Promise<void>;
|
|
72
|
+
/** Create a row positioned immediately after `rowId` in the manual order. */
|
|
73
|
+
addRowAfter: (rowId: string) => Promise<void>;
|
|
74
|
+
/** Create a row positioned immediately before `rowId` in the manual order. */
|
|
75
|
+
addRowBefore: (rowId: string) => Promise<void>;
|
|
76
|
+
deleteRow: (rowId: string) => Promise<void>;
|
|
77
|
+
/** Open a row in the split pane for editing its document. */
|
|
78
|
+
openRow: (rowId: string) => void;
|
|
79
|
+
/** The database's saved row templates. */
|
|
80
|
+
templates: RowTemplate[];
|
|
81
|
+
/** Capture a row's current property values as a named, reusable template. */
|
|
82
|
+
saveAsTemplate: (rowId: string, name?: string) => Promise<void>;
|
|
83
|
+
/** Create a row pre-filled from a template. Returns the new row id. */
|
|
84
|
+
addRowFromTemplate: (templateId: string) => Promise<string | undefined>;
|
|
85
|
+
/** Remove a saved template. */
|
|
86
|
+
deleteTemplate: (templateId: string) => Promise<void>;
|
|
87
|
+
addProperty: (input: NewPropertyInput) => Promise<void>;
|
|
88
|
+
/** Clone a property (its full config) into a new column just after it. */
|
|
89
|
+
duplicateProperty: (propertyId: string) => Promise<void>;
|
|
90
|
+
updateProperty: (propertyId: string, patch: PropertyPatch) => Promise<void>;
|
|
91
|
+
/** Move a property left/right among the columns (delta -1 or +1). */
|
|
92
|
+
moveProperty: (propertyId: string, delta: number) => Promise<void>;
|
|
93
|
+
/** Move a property to sit just before `beforeId` (or to the end when null). */
|
|
94
|
+
reorderProperty: (propertyId: string, beforeId: string | null) => Promise<void>;
|
|
95
|
+
deleteProperty: (propertyId: string) => Promise<void>;
|
|
96
|
+
addSelectOption: (propertyId: string, label: string) => Promise<DatabaseSelectOption | null>;
|
|
97
|
+
/** Pair a `dependency` property with a new inverse column (two-way / synced links). */
|
|
98
|
+
makeDependencyTwoWay: (propertyId: string) => Promise<void>;
|
|
99
|
+
/** Pair a `relation` property with a new reverse column on its target database
|
|
100
|
+
* (a two-way, cross-database link). No-op if it isn't a relation or is already paired. */
|
|
101
|
+
pairRelation: (propertyId: string, opts?: {
|
|
102
|
+
name?: string;
|
|
103
|
+
reverseSingle?: boolean;
|
|
104
|
+
}) => Promise<void>;
|
|
105
|
+
addPropertyGroup: (name?: string) => Promise<string | undefined>;
|
|
106
|
+
updatePropertyGroup: (groupId: string, patch: Partial<PropertyGroup>) => Promise<void>;
|
|
107
|
+
deletePropertyGroup: (groupId: string) => Promise<void>;
|
|
108
|
+
updateView: (viewId: string, patch: Partial<DatabaseView>) => Promise<void>;
|
|
109
|
+
/** Add a view of a given type and switch to it. */
|
|
110
|
+
addView: (type: DatabaseViewType, name?: string) => Promise<void>;
|
|
111
|
+
renameView: (viewId: string, name: string) => Promise<void>;
|
|
112
|
+
duplicateView: (viewId: string) => Promise<void>;
|
|
113
|
+
deleteView: (viewId: string) => Promise<void>;
|
|
114
|
+
/** Move a view tab to sit just before `toId` (drag-to-reorder the tabs). */
|
|
115
|
+
reorderView: (fromId: string, toId: string) => Promise<void>;
|
|
116
|
+
/** Rename the database itself. */
|
|
117
|
+
renameDatabase: (name: string) => Promise<void>;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Loads the database hosted by `pageId` (if any), keeps its rows live, and
|
|
121
|
+
* exposes the row/schema mutations the database screen needs. Returns
|
|
122
|
+
* `database: null` for ordinary pages so the caller can render nothing.
|
|
123
|
+
*
|
|
124
|
+
* `databaseIdHint` lets the caller short-circuit the lookup: `null` means "this
|
|
125
|
+
* page hosts no database" (skip the request entirely — avoids a 404 probe on
|
|
126
|
+
* every ordinary page), a string fetches that database by id, and `undefined`
|
|
127
|
+
* falls back to looking it up by page.
|
|
128
|
+
*/
|
|
129
|
+
export declare function useDatabase(pageId: string, databaseIdHint?: string | null): UseDatabase;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './brand';
|
|
2
|
+
export { default as Drawer } from './Drawer';
|
|
3
|
+
export { default as NavBar } from './NavBar';
|
|
4
|
+
export { default as SideNav } from './SideNav';
|
|
5
|
+
export { default as TrashDialog } from './TrashDialog';
|
|
6
|
+
export { default as DocumentArea } from './DocumentArea';
|
|
7
|
+
export { default as TitlebarTabs } from './TitlebarTabs';
|
|
8
|
+
export { DatabaseView } from './database/DatabaseView';
|
|
9
|
+
export { useDatabase } from './database/useDatabase';
|
|
10
|
+
export { default as Settings } from './Settings';
|
|
11
|
+
export { default as SettingsPanel } from './SettingsPanel';
|
|
12
|
+
export { default as SettingsButton } from './SettingsButton';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inline review affordances: for every block that has an OPEN suggestion or a
|
|
3
|
+
* standalone comment, this adds a quiet highlight (a left border accent via the
|
|
4
|
+
* `ob-block-reviewed` class) to the block's `[data-block-row]` element and
|
|
5
|
+
* floats a small clickable indicator at the row's right edge. Clicking it opens
|
|
6
|
+
* the Review pane focused on that block/suggestion.
|
|
7
|
+
*
|
|
8
|
+
* The block editor renders its own React root outside the app providers, so we
|
|
9
|
+
* cannot decorate from within it; instead this component (rendered from
|
|
10
|
+
* `BlockPageDocument`, inside providers) reaches into the editor's DOM by id —
|
|
11
|
+
* the robust integration point, since block ids are stable across re-renders.
|
|
12
|
+
* Highlighting and the indicator are presentation-only; nothing mutates the
|
|
13
|
+
* CRDT, so concurrent edits are unaffected.
|
|
14
|
+
*/
|
|
15
|
+
export declare function BlockReviewMarkers({ pageId, containerRef }: {
|
|
16
|
+
pageId: string;
|
|
17
|
+
containerRef: React.RefObject<HTMLElement | null>;
|
|
18
|
+
}): import("react").ReactPortal | null;
|
|
19
|
+
export default BlockReviewMarkers;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CommentInput, StoredComment } from '@book.dev/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* A threaded rich-text discussion: the comments for a target (a suggestion's
|
|
4
|
+
* review thread, or a block's standalone comments) plus a composer. Comment
|
|
5
|
+
* bodies are rich text (bold/italic/underline/links) via the shared
|
|
6
|
+
* {@link RichTextEditor}. Posting and deleting bubble up to the host so it can
|
|
7
|
+
* persist through the data client and refetch.
|
|
8
|
+
*/
|
|
9
|
+
export interface CommentThreadProps {
|
|
10
|
+
comments: StoredComment[];
|
|
11
|
+
/** The new-comment skeleton minus body (pageId + suggestionId/blockId). */
|
|
12
|
+
newComment: Omit<CommentInput, 'body' | 'authorName'>;
|
|
13
|
+
authorName: string;
|
|
14
|
+
onPost: (input: CommentInput) => Promise<void> | void;
|
|
15
|
+
onDelete: (id: string) => Promise<void> | void;
|
|
16
|
+
/** Compact spacing when nested inside a suggestion card. */
|
|
17
|
+
compact?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function CommentThread({ comments, newComment, authorName, onPost, onDelete, compact }: CommentThreadProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export default CommentThread;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Review side-pane body: lists a page's open suggestions (each with a
|
|
3
|
+
* before→after diff, accept/reject, and its rich-text thread) and any
|
|
4
|
+
* standalone block comments. Reads the target page from the `reviewPane`
|
|
5
|
+
* bridge (set by the "Review" affordance / inline accept/reject / agent panel),
|
|
6
|
+
* mirroring how the Customise pane reads `pageCustomise`. Mounted by SplitPane
|
|
7
|
+
* for the {@link REVIEW_PANE_ID} pseudo-pane.
|
|
8
|
+
*/
|
|
9
|
+
/** The human author name for new suggestions/comments (profile → "You"). */
|
|
10
|
+
export declare function useAuthorName(): string;
|
|
11
|
+
export declare function ReviewPaneBody(): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default ReviewPaneBody;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bridges the (provider-less) block editor's inline "Suggest edit" / "Comment"
|
|
3
|
+
* affordances to the app's data client + Review pane. Rendered from
|
|
4
|
+
* `BlockPageDocument` (which sits inside the providers the editor's own React
|
|
5
|
+
* root does not), it registers handlers on the `suggestBridge` singleton:
|
|
6
|
+
*
|
|
7
|
+
* - Suggest edit → a small composer dialog; submitting persists a human
|
|
8
|
+
* `replace-text` suggestion (same model as an AI one) targeting the block,
|
|
9
|
+
* then opens the Review pane focused on it.
|
|
10
|
+
* - Comment → opens the Review pane focused on the block's comment thread.
|
|
11
|
+
*/
|
|
12
|
+
export declare function SuggestHost(): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default SuggestHost;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CommentInput, StoredComment, StoredSuggestion } from '@book.dev/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* One suggestion in the Review pane: a before→after diff, accept / reject
|
|
4
|
+
* controls, and its threaded rich-text discussion. Accepting applies the change
|
|
5
|
+
* to the document (via the editor bridge, in one CRDT transaction) and resolves
|
|
6
|
+
* the suggestion's status; rejecting just resolves it. Both flow up to the host.
|
|
7
|
+
*/
|
|
8
|
+
export interface SuggestionCardProps {
|
|
9
|
+
suggestion: StoredSuggestion;
|
|
10
|
+
comments: StoredComment[];
|
|
11
|
+
authorName: string;
|
|
12
|
+
/** Highlighted (e.g. focused from an inline affordance or the agent panel). */
|
|
13
|
+
focused?: boolean;
|
|
14
|
+
busy?: boolean;
|
|
15
|
+
onAccept: (s: StoredSuggestion) => Promise<void> | void;
|
|
16
|
+
onReject: (s: StoredSuggestion) => Promise<void> | void;
|
|
17
|
+
onPostComment: (input: CommentInput) => Promise<void> | void;
|
|
18
|
+
onDeleteComment: (id: string) => Promise<void> | void;
|
|
19
|
+
}
|
|
20
|
+
export declare function SuggestionCard({ suggestion: s, comments, authorName, focused, busy, onAccept, onReject, onPostComment, onDeleteComment, }: SuggestionCardProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export default SuggestionCard;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { CommentInput, StoredComment, StoredSuggestion } from '@book.dev/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* Loads and mutates a page's review layer (suggestions + comments) and keeps it
|
|
4
|
+
* in sync across surfaces. Suggestions/comments have no SSE channel, so every
|
|
5
|
+
* mutation pings a module-level signal (`pingReviewData`) that all `useReview`
|
|
6
|
+
* consumers listen to and refetch from — the inline indicators, the Review
|
|
7
|
+
* pane, and the agent panel stay consistent without a live stream.
|
|
8
|
+
*
|
|
9
|
+
* Accepting a suggestion applies the change through the editor bridge (one CRDT
|
|
10
|
+
* transaction when the editor is mounted; a savePage fallback otherwise), then
|
|
11
|
+
* marks it accepted. Rejecting only marks it rejected.
|
|
12
|
+
*/
|
|
13
|
+
export interface UseReview {
|
|
14
|
+
suggestions: StoredSuggestion[];
|
|
15
|
+
comments: StoredComment[];
|
|
16
|
+
loading: boolean;
|
|
17
|
+
/** Comments anchored to a specific suggestion (its review thread). */
|
|
18
|
+
commentsForSuggestion: (suggestionId: string) => StoredComment[];
|
|
19
|
+
/** Standalone comments anchored to a block (no suggestion). */
|
|
20
|
+
commentsForBlock: (blockId: string) => StoredComment[];
|
|
21
|
+
acceptSuggestion: (s: StoredSuggestion) => Promise<void>;
|
|
22
|
+
rejectSuggestion: (s: StoredSuggestion) => Promise<void>;
|
|
23
|
+
postComment: (input: CommentInput) => Promise<void>;
|
|
24
|
+
deleteComment: (id: string) => Promise<void>;
|
|
25
|
+
reload: () => Promise<void>;
|
|
26
|
+
}
|
|
27
|
+
export declare function useReview(pageId: string | null): UseReview;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Account & sync: connect this device to account.book.pub (the deep-link OAuth
|
|
3
|
+
* flow) and mirror preferences + the workspace list there. The data server is
|
|
4
|
+
* untouched — only settings sync through the account service.
|
|
5
|
+
*/
|
|
6
|
+
export default function AccountSettings(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server connection: connect to a remote server, or (on the desktop) manage the
|
|
3
|
+
* local server's network sharing. The desktop keeps its books in an always-on
|
|
4
|
+
* local server reached over IPC; connecting to a remote server reloads the app
|
|
5
|
+
* so the data client re-initializes against the new target.
|
|
6
|
+
*/
|
|
7
|
+
export default function ConnectionSettings(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type ComponentType, type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Shared layout for a settings sub-screen: a title, an optional lead paragraph,
|
|
4
|
+
* and a vertical stack of sections. Every screen opens with this so headings and
|
|
5
|
+
* spacing stay identical instead of each panel re-deriving them inline.
|
|
6
|
+
*/
|
|
7
|
+
export declare function SettingsScreen({ title, description, children, }: {
|
|
8
|
+
title: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
/** A labelled group within a screen — an optional heading + hint, then content. */
|
|
13
|
+
export declare function SettingsSection({ title, description, children, className, }: {
|
|
14
|
+
title?: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
className?: string;
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
/** A stacked label + hint + control, for inputs / selects / textareas. */
|
|
20
|
+
export declare function SettingsField({ label, hint, htmlFor, children, className, }: {
|
|
21
|
+
label: string;
|
|
22
|
+
hint?: string;
|
|
23
|
+
htmlFor?: string;
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
className?: string;
|
|
26
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
/** A horizontal row — label + hint on the left, a Switch on the right. */
|
|
28
|
+
export declare function SettingsToggle({ label, hint, checked, onCheckedChange, disabled, }: {
|
|
29
|
+
label: string;
|
|
30
|
+
hint?: string;
|
|
31
|
+
checked: boolean;
|
|
32
|
+
onCheckedChange: (checked: boolean) => void;
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
/**
|
|
36
|
+
* A placeholder for a sub-screen whose backend doesn't exist yet (the app is
|
|
37
|
+
* local-first — no accounts / payments / integrations). A calm, centered icon +
|
|
38
|
+
* copy, with an optional call to action, rather than a broken-looking empty tab.
|
|
39
|
+
*/
|
|
40
|
+
export declare function SettingsStub({ icon: Icon, title, description, action, }: {
|
|
41
|
+
icon: ComponentType<{
|
|
42
|
+
className?: string;
|
|
43
|
+
}>;
|
|
44
|
+
title: string;
|
|
45
|
+
description: string;
|
|
46
|
+
action?: ReactNode;
|
|
47
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Placeholder screens for capabilities that don't exist yet — OpenBook is
|
|
3
|
+
* local-first, with no accounts, payments, or integrations backend. Each is a
|
|
4
|
+
* calm "coming soon" panel rather than a misleading empty form.
|
|
5
|
+
*/
|
|
6
|
+
export declare function SignupSettings(): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function SupportSettings(): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function IntegrationsSettings(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
7
|
+
}
|
|
8
|
+
declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
|
+
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { DialogProps } from "@radix-ui/react-dialog";
|
|
3
|
+
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
6
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
7
|
+
} & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
10
|
+
label?: string;
|
|
11
|
+
shouldFilter?: boolean;
|
|
12
|
+
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
13
|
+
defaultValue?: string;
|
|
14
|
+
value?: string;
|
|
15
|
+
onValueChange?: (value: string) => void;
|
|
16
|
+
loop?: boolean;
|
|
17
|
+
disablePointerSelection?: boolean;
|
|
18
|
+
vimBindings?: boolean;
|
|
19
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
interface CommandDialogProps extends DialogProps {
|
|
21
|
+
/** Accessible name for the dialog (visually hidden). */
|
|
22
|
+
title?: string;
|
|
23
|
+
/** Accessible description for the dialog (visually hidden). */
|
|
24
|
+
description?: string;
|
|
25
|
+
}
|
|
26
|
+
declare const CommandDialog: ({ children, title, description, ...props }: CommandDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
|
|
28
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
29
|
+
} & {
|
|
30
|
+
asChild?: boolean;
|
|
31
|
+
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "value" | "type" | "onChange"> & {
|
|
32
|
+
value?: string;
|
|
33
|
+
onValueChange?: (search: string) => void;
|
|
34
|
+
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
35
|
+
declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
36
|
+
children?: React.ReactNode;
|
|
37
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
38
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
39
|
+
} & {
|
|
40
|
+
asChild?: boolean;
|
|
41
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
42
|
+
label?: string;
|
|
43
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
44
|
+
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
45
|
+
children?: React.ReactNode;
|
|
46
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
47
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
48
|
+
} & {
|
|
49
|
+
asChild?: boolean;
|
|
50
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
51
|
+
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
52
|
+
children?: React.ReactNode;
|
|
53
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
54
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
55
|
+
} & {
|
|
56
|
+
asChild?: boolean;
|
|
57
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "heading" | "value"> & {
|
|
58
|
+
heading?: React.ReactNode;
|
|
59
|
+
value?: string;
|
|
60
|
+
forceMount?: boolean;
|
|
61
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
62
|
+
declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
63
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
64
|
+
} & {
|
|
65
|
+
asChild?: boolean;
|
|
66
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
67
|
+
alwaysRender?: boolean;
|
|
68
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
69
|
+
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
70
|
+
children?: React.ReactNode;
|
|
71
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
72
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
73
|
+
} & {
|
|
74
|
+
asChild?: boolean;
|
|
75
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "disabled" | "value" | "onSelect"> & {
|
|
76
|
+
disabled?: boolean;
|
|
77
|
+
onSelect?: (value: string) => void;
|
|
78
|
+
value?: string;
|
|
79
|
+
keywords?: string[];
|
|
80
|
+
forceMount?: boolean;
|
|
81
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
82
|
+
declare const CommandShortcut: {
|
|
83
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
84
|
+
displayName: string;
|
|
85
|
+
};
|
|
86
|
+
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
3
|
+
declare const ContextMenu: React.FC<ContextMenuPrimitive.ContextMenuProps>;
|
|
4
|
+
declare const ContextMenuTrigger: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuTriggerProps & React.RefAttributes<HTMLSpanElement>>;
|
|
5
|
+
declare const ContextMenuGroup: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const ContextMenuPortal: React.FC<ContextMenuPrimitive.ContextMenuPortalProps>;
|
|
7
|
+
declare const ContextMenuSub: React.FC<ContextMenuPrimitive.ContextMenuSubProps>;
|
|
8
|
+
declare const ContextMenuSubTrigger: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
9
|
+
inset?: boolean;
|
|
10
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const ContextMenuSubContent: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const ContextMenuContent: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const ContextMenuItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
14
|
+
inset?: boolean;
|
|
15
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
declare const ContextMenuLabel: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
17
|
+
inset?: boolean;
|
|
18
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const ContextMenuSeparator: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
declare const ContextMenuShortcut: {
|
|
21
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubTrigger, ContextMenuSubContent, };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
4
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
6
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const DialogHeader: {
|
|
9
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
declare const DialogFooter: {
|
|
13
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
17
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
18
|
+
export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3
|
+
declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
4
|
+
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
7
|
+
declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
8
|
+
declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
10
|
+
inset?: boolean;
|
|
11
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
15
|
+
inset?: boolean;
|
|
16
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
20
|
+
inset?: boolean;
|
|
21
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const DropdownMenuShortcut: {
|
|
24
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
/**
|
|
4
|
+
* The muted ghost icon button used throughout the chrome (sidebar, toolbars,
|
|
5
|
+
* page actions, pane controls). One definition so every small icon control has
|
|
6
|
+
* the same hover, radius, focus ring, and muted-by-default color — instead of
|
|
7
|
+
* the `rounded p-1 … hover:bg-hover` snippet copy-pasted per call site.
|
|
8
|
+
*/
|
|
9
|
+
declare const iconButtonVariants: (props?: ({
|
|
10
|
+
size?: "sm" | "md" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof iconButtonVariants> {
|
|
13
|
+
asChild?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
16
|
+
export { IconButton, iconButtonVariants };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const inputVariants: (props?: ({
|
|
4
|
+
inputSize?: "default" | "sm" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">, VariantProps<typeof inputVariants> {
|
|
7
|
+
}
|
|
8
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
9
|
+
export { Input, inputVariants };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type ShortcutCombo } from '@/lib/shortcuts';
|
|
3
|
+
/**
|
|
4
|
+
* Platform flag for rendering. Initialised to `false` (Ctrl-style) so the first
|
|
5
|
+
* client render matches the server HTML, then adopts the real platform after
|
|
6
|
+
* mount — surfaces shown during SSR (the sidebar search/settings buttons) can
|
|
7
|
+
* use this without a hydration mismatch. See the SSR-hydration note in the docs.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useIsMac(): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* A keyboard-shortcut hint, styled as a subtle key cap. Hidden at rest to keep
|
|
12
|
+
* the UI quiet; it fades in only while ⌘/Ctrl is held (the space is reserved so
|
|
13
|
+
* nothing shifts). Decorative — `aria-hidden` so assistive tech reads the
|
|
14
|
+
* action label, not "Command K". The shortcut is also available on long hover
|
|
15
|
+
* via {@link ShortcutTooltip}.
|
|
16
|
+
*/
|
|
17
|
+
export declare function Kbd({ combo, className }: {
|
|
18
|
+
combo: ShortcutCombo;
|
|
19
|
+
className?: string;
|
|
20
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
/**
|
|
22
|
+
* Wrap a control to reveal its keyboard shortcut in a tooltip on long hover —
|
|
23
|
+
* the quiet way to discover a shortcut without a permanent badge. Self-contained
|
|
24
|
+
* provider with a deliberate delay so it only appears on a real, lingering hover.
|
|
25
|
+
*/
|
|
26
|
+
export declare function ShortcutTooltip({ combo, label, side, children, }: {
|
|
27
|
+
combo: ShortcutCombo;
|
|
28
|
+
label?: string;
|
|
29
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
+
import { type VariantProps } from "class-variance-authority";
|
|
4
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/types").ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
|
+
export { Label };
|