@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,95 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type BlockMap } from '../model';
|
|
3
|
+
import type { BlockEditorController } from '../useBlockEditor';
|
|
4
|
+
/**
|
|
5
|
+
* The shared chrome for every artifact-kit input: a quiet header (display name
|
|
6
|
+
* + optional description, decoupled from the reactive symbol), the control
|
|
7
|
+
* surface, and a ⚙ that opens a settings **popover** which expands into a
|
|
8
|
+
* docked **side panel** for roomier configuration.
|
|
9
|
+
*
|
|
10
|
+
* Inputs are full-width by default; a "Compact" toggle opts back into the
|
|
11
|
+
* inline single-row layout. The reactive symbol (`name`) is edited apart from
|
|
12
|
+
* the human-facing label, so renaming the variable never disturbs the caption.
|
|
13
|
+
*/
|
|
14
|
+
export declare const kitSet: (editor: BlockEditorController, block: BlockMap, key: string, value: unknown) => void;
|
|
15
|
+
/** Inputs read full-width unless explicitly set compact. */
|
|
16
|
+
export declare const kitWide: (block: BlockMap) => boolean;
|
|
17
|
+
/** A labelled config row used throughout the settings popover/panel. */
|
|
18
|
+
export declare const ConfigField: React.FC<{
|
|
19
|
+
label: string;
|
|
20
|
+
hint?: string;
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
}>;
|
|
23
|
+
export declare const ConfigInput: React.FC<React.InputHTMLAttributes<HTMLInputElement> & {
|
|
24
|
+
mono?: boolean;
|
|
25
|
+
}>;
|
|
26
|
+
export declare const ConfigTextarea: React.FC<React.TextareaHTMLAttributes<HTMLTextAreaElement>>;
|
|
27
|
+
/**
|
|
28
|
+
* A labelled on/off row for the settings panel — the same layout the built-in
|
|
29
|
+
* "Compact" / "Stays interactive when locked" toggles use, lifted out so the
|
|
30
|
+
* new blocks (multi-select, free-entry, gating…) can reuse it instead of
|
|
31
|
+
* re-laying-out a checkbox each time.
|
|
32
|
+
*/
|
|
33
|
+
export declare const ConfigToggle: React.FC<{
|
|
34
|
+
label: string;
|
|
35
|
+
hint?: string;
|
|
36
|
+
checked: boolean;
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
onChange: (next: boolean) => void;
|
|
39
|
+
}>;
|
|
40
|
+
/**
|
|
41
|
+
* A label that reads as plain text but is editable in place — the WYSIWYG way
|
|
42
|
+
* to set a block's display name (and titles) right on the canvas, without
|
|
43
|
+
* opening the settings popover. A borderless auto-sizing input (`field-sizing`)
|
|
44
|
+
* so it looks like the text it replaces; falls back to a static span when the
|
|
45
|
+
* editor is read-only (or the block's group is locked). `stopPropagation` keeps
|
|
46
|
+
* keystrokes out of the surrounding block editor's shortcuts.
|
|
47
|
+
*/
|
|
48
|
+
export declare const KitInlineText: React.FC<{
|
|
49
|
+
value: string;
|
|
50
|
+
placeholder?: string;
|
|
51
|
+
ariaLabel: string;
|
|
52
|
+
readOnly?: boolean;
|
|
53
|
+
className?: string;
|
|
54
|
+
onCommit: (value: string) => void;
|
|
55
|
+
}>;
|
|
56
|
+
/**
|
|
57
|
+
* The building block that pairs a **display name** with a **description** —
|
|
58
|
+
* shared by every configuration card (inputs, charts, cards) so the two always
|
|
59
|
+
* travel together. For input blocks (`symbol`) it also tucks in the
|
|
60
|
+
* de-emphasized {@link VariableNameField}.
|
|
61
|
+
*/
|
|
62
|
+
export declare const NameDescriptionFields: React.FC<{
|
|
63
|
+
block: BlockMap;
|
|
64
|
+
editor: BlockEditorController;
|
|
65
|
+
/** Prop holding the human display name (default `label`). */
|
|
66
|
+
nameKey?: string;
|
|
67
|
+
/** Placeholder for the display-name input. */
|
|
68
|
+
namePlaceholder?: string;
|
|
69
|
+
/** Prop holding the description (default `description`). */
|
|
70
|
+
descKey?: string;
|
|
71
|
+
/** Show the de-emphasized auto-derived variable name (input blocks only). */
|
|
72
|
+
symbol?: boolean;
|
|
73
|
+
/** Fallback symbol when the label is empty. */
|
|
74
|
+
defaultName?: string;
|
|
75
|
+
}>;
|
|
76
|
+
export interface KitFrameProps {
|
|
77
|
+
block: BlockMap;
|
|
78
|
+
editor: BlockEditorController;
|
|
79
|
+
/** Adds the `obe-kit-{kind}` class and is the block's value type. */
|
|
80
|
+
kind: string;
|
|
81
|
+
/** Fallback symbol shown in the header when no name is set. */
|
|
82
|
+
defaultName: string;
|
|
83
|
+
/** The control surface (pills, select, stepper…). */
|
|
84
|
+
control: React.ReactNode;
|
|
85
|
+
/** Extra, block-specific settings rendered below the common fields. */
|
|
86
|
+
config?: React.ReactNode;
|
|
87
|
+
/** Offer the full-width/compact toggle and apply the wide layout class. */
|
|
88
|
+
supportsWide?: boolean;
|
|
89
|
+
/** Hide the header label group (e.g. the action button labels itself). */
|
|
90
|
+
hideHeader?: boolean;
|
|
91
|
+
/** Whether this block publishes a named value (shows name/label/description).
|
|
92
|
+
* False for blocks like the action button that have no symbol of their own. */
|
|
93
|
+
symbol?: boolean;
|
|
94
|
+
}
|
|
95
|
+
export declare const KitFrame: React.FC<KitFrameProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The one settings affordance every interactive block shares: a gear at the
|
|
4
|
+
* block's top-right (hidden until hover/focus), opening a settings **popover**
|
|
5
|
+
* that can **expand into the side pane** for roomier editing. The gutter
|
|
6
|
+
* context menu's "Configure" item opens the same popover (via the `kitConfig`
|
|
7
|
+
* bridge). One component so inputs, charts and cards all behave alike — no more
|
|
8
|
+
* per-block show/hide panels.
|
|
9
|
+
*/
|
|
10
|
+
export declare const KitSettings: React.FC<{
|
|
11
|
+
/** Stable block id — drives the gutter bridge and the expand portal target. */
|
|
12
|
+
blockId: string;
|
|
13
|
+
/** Heading for the popover / side panel. */
|
|
14
|
+
title: string;
|
|
15
|
+
/** The configuration fields. */
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}>;
|
|
18
|
+
export default KitSettings;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CustomBlockProps } from '../registry';
|
|
3
|
+
export declare const CARD_BLOCKS: readonly [{
|
|
4
|
+
readonly type: "statuslight";
|
|
5
|
+
readonly render: React.FC<CustomBlockProps>;
|
|
6
|
+
readonly slash: {
|
|
7
|
+
readonly label: "Status light";
|
|
8
|
+
readonly hint: "Green / amber / red from a live value";
|
|
9
|
+
readonly keywords: "status light indicator traffic health ok warn red green";
|
|
10
|
+
readonly make: () => {
|
|
11
|
+
type: string;
|
|
12
|
+
props: {
|
|
13
|
+
label: string;
|
|
14
|
+
source: string;
|
|
15
|
+
okAt: number;
|
|
16
|
+
warnAt: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}, {
|
|
21
|
+
readonly type: "tooltipcard";
|
|
22
|
+
readonly render: React.FC<CustomBlockProps>;
|
|
23
|
+
readonly slash: {
|
|
24
|
+
readonly label: "Tooltip";
|
|
25
|
+
readonly hint: "A term that explains itself on hover";
|
|
26
|
+
readonly keywords: "tooltip hint term definition hover help";
|
|
27
|
+
readonly make: () => {
|
|
28
|
+
type: string;
|
|
29
|
+
props: {
|
|
30
|
+
term: string;
|
|
31
|
+
tip: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
}, {
|
|
36
|
+
readonly type: "linkcard";
|
|
37
|
+
readonly render: React.FC<CustomBlockProps>;
|
|
38
|
+
readonly slash: {
|
|
39
|
+
readonly label: "Link card";
|
|
40
|
+
readonly hint: "A titled card that opens a URL";
|
|
41
|
+
readonly keywords: "link card url bookmark website external";
|
|
42
|
+
readonly make: () => {
|
|
43
|
+
type: string;
|
|
44
|
+
props: {
|
|
45
|
+
title: string;
|
|
46
|
+
description: string;
|
|
47
|
+
url: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
}];
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure geometry for the kit's charts — no DOM, no deps, unit-testable. The
|
|
3
|
+
* chart block evaluates an expression into one of a few friendly shapes and
|
|
4
|
+
* these helpers turn it into coordinates; the block just draws SVG.
|
|
5
|
+
*
|
|
6
|
+
* Accepted data shapes:
|
|
7
|
+
* - `number[]` → one series
|
|
8
|
+
* - `{name: number[], …}` → named series (overlaid)
|
|
9
|
+
* - `[{x, y}, …]` → scatter points
|
|
10
|
+
* - `{label: number, …}` (pie/bar/funnel) → labelled values
|
|
11
|
+
*/
|
|
12
|
+
export interface Series {
|
|
13
|
+
name: string;
|
|
14
|
+
values: number[];
|
|
15
|
+
}
|
|
16
|
+
export interface LabelledValue {
|
|
17
|
+
label: string;
|
|
18
|
+
value: number;
|
|
19
|
+
}
|
|
20
|
+
/** Coerce an evaluated value into series for line/area/bar charts. Accepts
|
|
21
|
+
* the classic reactive shape `{series: [{name, data: number[]}]}` too. */
|
|
22
|
+
export declare function toSeries(value: unknown): Series[];
|
|
23
|
+
/** Coerce an evaluated value into labelled slices for pie/donut/funnel. */
|
|
24
|
+
export declare function toLabelled(value: unknown, labels: string[]): LabelledValue[];
|
|
25
|
+
/** Scatter points from the evaluated value ({x,y}[] or number[] by index). */
|
|
26
|
+
export declare function toPoints(value: unknown): Array<{
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
}>;
|
|
30
|
+
export interface Extent {
|
|
31
|
+
min: number;
|
|
32
|
+
max: number;
|
|
33
|
+
}
|
|
34
|
+
export declare function extent(values: number[]): Extent;
|
|
35
|
+
/** Map a value into pixel space (SVG y grows downward — pass flipped range). */
|
|
36
|
+
export declare const scale: (v: number, d: Extent, r0: number, r1: number) => number;
|
|
37
|
+
/** Polyline points attribute for one series across the plot area. */
|
|
38
|
+
export declare function linePoints(values: number[], d: Extent, w: number, h: number, pad: number): string;
|
|
39
|
+
export interface Arc {
|
|
40
|
+
path: string;
|
|
41
|
+
/** Mid-angle anchor for a label, on a circle of radius `at`. */
|
|
42
|
+
labelAt: (at: number) => {
|
|
43
|
+
x: number;
|
|
44
|
+
y: number;
|
|
45
|
+
};
|
|
46
|
+
fraction: number;
|
|
47
|
+
}
|
|
48
|
+
/** Pie/donut arcs (cx,cy centre; r outer radius; r0 inner radius for donuts). */
|
|
49
|
+
export declare function pieArcs(values: number[], cx: number, cy: number, r: number, r0?: number): Arc[];
|
|
50
|
+
export interface FunnelRow {
|
|
51
|
+
x: number;
|
|
52
|
+
width: number;
|
|
53
|
+
y: number;
|
|
54
|
+
height: number;
|
|
55
|
+
fraction: number;
|
|
56
|
+
}
|
|
57
|
+
/** Centered descending funnel rows in a w×h box. */
|
|
58
|
+
export declare function funnelRows(values: number[], w: number, h: number, gap?: number): FunnelRow[];
|
|
59
|
+
/** Nice round tick values across an extent (for the y axis grid). */
|
|
60
|
+
export declare function ticks(d: Extent, count?: number): number[];
|
|
61
|
+
/** The kit palette — readable on both themes, in series order. */
|
|
62
|
+
export declare const PALETTE: string[];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CustomBlockProps } from '../registry';
|
|
3
|
+
/**
|
|
4
|
+
* The kit's chart block: one block, many kinds (line, area, bar, pie, donut,
|
|
5
|
+
* scatter, funnel). Data comes from an expression over the document's named
|
|
6
|
+
* inputs, so a stepper click or radio pick redraws every chart that reads it
|
|
7
|
+
* — that's the artifact loop. Rendering is plain SVG: no chart library, both
|
|
8
|
+
* themes, and identical markup in the interactive HTML export.
|
|
9
|
+
*/
|
|
10
|
+
export declare const CHART_KINDS: readonly ["line", "area", "bar", "pie", "donut", "scatter", "funnel"];
|
|
11
|
+
export type ChartKind = (typeof CHART_KINDS)[number];
|
|
12
|
+
export declare const CHART_BLOCKS: readonly [{
|
|
13
|
+
readonly type: "kitchart";
|
|
14
|
+
readonly render: React.FC<CustomBlockProps>;
|
|
15
|
+
readonly slash: {
|
|
16
|
+
readonly label: "Chart";
|
|
17
|
+
readonly hint: "Line, bar, pie, scatter, funnel — live over inputs";
|
|
18
|
+
readonly keywords: "chart graph plot line bar pie donut scatter funnel visualization";
|
|
19
|
+
readonly make: () => {
|
|
20
|
+
type: string;
|
|
21
|
+
props: {
|
|
22
|
+
kind: string;
|
|
23
|
+
source: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
}];
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type * as Y from 'yjs';
|
|
2
|
+
import { type BlockMap } from '../model';
|
|
3
|
+
/**
|
|
4
|
+
* Auto-computed completion for the container blocks (accordion sections, tabs).
|
|
5
|
+
*
|
|
6
|
+
* A section/tab is "complete" when every input it contains is *filled* and
|
|
7
|
+
* every to-do it contains is checked. "Filled" depends on the value shape an
|
|
8
|
+
* input publishes (see {@link inputValue}): a non-empty string, a finite
|
|
9
|
+
* number that isn't the empty placeholder, `true` for a toggle, a non-empty
|
|
10
|
+
* selection for the multi/array inputs. Containers with no inputs and no
|
|
11
|
+
* to-dos are vacuously complete (so a purely informational section never
|
|
12
|
+
* blocks a wizard).
|
|
13
|
+
*
|
|
14
|
+
* The signal is a READ — containers and the progress bar consume it; nothing
|
|
15
|
+
* publishes a user-set "completion" value. Pure over the block tree so the
|
|
16
|
+
* renderer, the progress-bar expression scope, and tests all agree.
|
|
17
|
+
*/
|
|
18
|
+
export interface CompletionStat {
|
|
19
|
+
/** Inputs + to-dos that count toward completion. */
|
|
20
|
+
total: number;
|
|
21
|
+
/** Of those, how many are filled / checked. */
|
|
22
|
+
done: number;
|
|
23
|
+
/** `done === total` (vacuously true when total is 0). */
|
|
24
|
+
complete: boolean;
|
|
25
|
+
/** done / total, or 1 when there's nothing to complete. */
|
|
26
|
+
ratio: number;
|
|
27
|
+
}
|
|
28
|
+
/** Completion of the blocks directly held by `container` (a tab / section). */
|
|
29
|
+
export declare function sectionCompletion(container: BlockMap): CompletionStat;
|
|
30
|
+
/** Overall completion of a tabs/accordion block (sum across its sections). */
|
|
31
|
+
export declare function overallCompletion(block: BlockMap): CompletionStat;
|
|
32
|
+
/** The completion read a tabs/accordion publishes into the scope. Mirrors the
|
|
33
|
+
* overall stat plus a `sections` array of per-section stats — so a progress
|
|
34
|
+
* bar or formula can bind `setup.ratio`, `setup.complete`, or
|
|
35
|
+
* `setup.sections[0].ratio`. */
|
|
36
|
+
export interface CompletionRead extends CompletionStat {
|
|
37
|
+
sections: CompletionStat[];
|
|
38
|
+
}
|
|
39
|
+
export declare function completionRead(block: BlockMap): CompletionRead;
|
|
40
|
+
/**
|
|
41
|
+
* Every tabs/accordion container's completion read, keyed by the container's
|
|
42
|
+
* name (an identifier derived like a group's). Read-only — injected into the
|
|
43
|
+
* input scope so the progress bar / formulas can bind it; nothing user-set.
|
|
44
|
+
*/
|
|
45
|
+
export declare function containerCompletions(doc: Y.Doc): Record<string, CompletionRead>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type * as Y from 'yjs';
|
|
2
|
+
/**
|
|
3
|
+
* The page's reactive wiring as a graph: which blocks publish named values,
|
|
4
|
+
* which blocks read them, and what flows where. Pure extraction — the
|
|
5
|
+
* dataflow view renders it; tests assert on it.
|
|
6
|
+
*/
|
|
7
|
+
export type DataflowNodeKind = 'input' | 'code' | 'formula' | 'chart' | 'light' | 'button' | 'outlet';
|
|
8
|
+
export interface DataflowNode {
|
|
9
|
+
/** The block id — stable, used for edges and click-to-locate. */
|
|
10
|
+
id: string;
|
|
11
|
+
kind: DataflowNodeKind;
|
|
12
|
+
/** The block type ('slider', 'kitchart', …) for the kind badge. */
|
|
13
|
+
type: string;
|
|
14
|
+
/** The published name (publishers) or display label (consumers). */
|
|
15
|
+
label: string;
|
|
16
|
+
/** The current value (or error), formatted for display. */
|
|
17
|
+
value?: string;
|
|
18
|
+
error?: string;
|
|
19
|
+
/** A short preview of the expression/code the block evaluates. */
|
|
20
|
+
source?: string;
|
|
21
|
+
/** Secondary line (outlets: the parent page the value flows into). */
|
|
22
|
+
sub?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Where an exported name flows OUTSIDE the page: a parent database's expr
|
|
26
|
+
* column reading this page's published value. Composition made visible.
|
|
27
|
+
*/
|
|
28
|
+
export interface DataflowOutlet {
|
|
29
|
+
/** Node id (e.g. `outlet:<propertyId>`), stable per column. */
|
|
30
|
+
id: string;
|
|
31
|
+
/** The expr column's display name. */
|
|
32
|
+
label: string;
|
|
33
|
+
/** The parent page's title — where the value lands. */
|
|
34
|
+
sub: string;
|
|
35
|
+
/** The exported name the column reads. */
|
|
36
|
+
name: string;
|
|
37
|
+
}
|
|
38
|
+
export interface DataflowEdge {
|
|
39
|
+
/** `${from}->${to}` — react-flow needs stable unique ids. */
|
|
40
|
+
id: string;
|
|
41
|
+
from: string;
|
|
42
|
+
to: string;
|
|
43
|
+
/** The name carried along this edge. */
|
|
44
|
+
name: string;
|
|
45
|
+
}
|
|
46
|
+
export interface DataflowGraph {
|
|
47
|
+
nodes: DataflowNode[];
|
|
48
|
+
edges: DataflowEdge[];
|
|
49
|
+
}
|
|
50
|
+
/** Names a source references, limited to names that are actually published. */
|
|
51
|
+
export declare function referencedNames(source: string, published: ReadonlySet<string>): string[];
|
|
52
|
+
/**
|
|
53
|
+
* Build the dataflow graph for a document. Document order everywhere, so the
|
|
54
|
+
* layout reads like the page. Edges point from the block that PUBLISHES a
|
|
55
|
+
* name to the block that reads it; a button targeting an input points AT the
|
|
56
|
+
* input (it writes).
|
|
57
|
+
*/
|
|
58
|
+
export declare function dataflowGraph(doc: Y.Doc, outlets?: DataflowOutlet[]): DataflowGraph;
|
|
59
|
+
/** The names this document publishes (what composition can export). */
|
|
60
|
+
export declare function publishedNames(doc: Y.Doc): Set<string>;
|
|
61
|
+
/**
|
|
62
|
+
* A simple layered layout: each node's column is its dependency depth, its
|
|
63
|
+
* row the order within that column. Returns react-flow-ready positions.
|
|
64
|
+
*/
|
|
65
|
+
export declare function layeredLayout(graph: DataflowGraph): Map<string, {
|
|
66
|
+
x: number;
|
|
67
|
+
y: number;
|
|
68
|
+
}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cross-page group sync. Groups that share a `sync` key mirror their input
|
|
3
|
+
* values, so the same "settings" group placed on two pages stays in lockstep.
|
|
4
|
+
*
|
|
5
|
+
* v1 is a localStorage-backed value mirror with cross-tab `storage` events and
|
|
6
|
+
* in-tab subscribers (so the primary pane and the split pane sync too). It's
|
|
7
|
+
* same-browser; a server-backed sync that spans devices is the next step. The
|
|
8
|
+
* shape is deliberately small — `{field: value}` — and callers guard writes
|
|
9
|
+
* against no-ops, so a value adopted from the store never echoes back.
|
|
10
|
+
*/
|
|
11
|
+
type Values = Record<string, unknown>;
|
|
12
|
+
/** The values currently shared under a key (a copy). */
|
|
13
|
+
export declare const readGroupSync: (key: string) => Values;
|
|
14
|
+
/**
|
|
15
|
+
* Merge `values` into a sync key. Returns whether anything actually changed,
|
|
16
|
+
* so a caller adopting shared state doesn't echo it straight back. Notifies
|
|
17
|
+
* in-tab subscribers and (via localStorage) other tabs.
|
|
18
|
+
*/
|
|
19
|
+
export declare function writeGroupSync(key: string, values: Values): boolean;
|
|
20
|
+
export declare function subscribeGroupSync(key: string, cb: () => void): () => void;
|
|
21
|
+
/** Loose equality for the small value shapes inputs publish (scalars + arrays). */
|
|
22
|
+
export declare function valueEqual(a: unknown, b: unknown): boolean;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { evalExpr, formatValue, inputScope, INPUT_TYPES } from './scope';
|
|
2
|
+
export { CHART_KINDS } from './charts';
|
|
3
|
+
/**
|
|
4
|
+
* Register the artifact kit: interactive inputs (stepper, text field, radio,
|
|
5
|
+
* checklist, toggle, location, button), live charts, and display blocks
|
|
6
|
+
* (status light, tooltip, link card). Together with the slider + formula
|
|
7
|
+
* these make pages a place to BUILD small interactive artifacts — the kind
|
|
8
|
+
* of throwaway calculator/dashboard/picker an AI would otherwise hand-code —
|
|
9
|
+
* out of reusable, collaborative blocks.
|
|
10
|
+
*/
|
|
11
|
+
export declare function registerArtifactKit(): void;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CustomBlockProps } from '../registry';
|
|
3
|
+
/** Definitions consumed by kit/index.ts (type + renderer + slash entry). */
|
|
4
|
+
export declare const INPUT_BLOCKS: readonly [{
|
|
5
|
+
readonly type: "number";
|
|
6
|
+
readonly render: React.FC<CustomBlockProps>;
|
|
7
|
+
readonly slash: {
|
|
8
|
+
readonly label: "Number stepper";
|
|
9
|
+
readonly hint: "A named number with − / + buttons";
|
|
10
|
+
readonly keywords: "number stepper counter input increment buttons";
|
|
11
|
+
readonly make: () => {
|
|
12
|
+
type: string;
|
|
13
|
+
props: {
|
|
14
|
+
name: string;
|
|
15
|
+
value: number;
|
|
16
|
+
step: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}, {
|
|
21
|
+
readonly type: "textfield";
|
|
22
|
+
readonly render: React.FC<CustomBlockProps>;
|
|
23
|
+
readonly slash: {
|
|
24
|
+
readonly label: "Text field";
|
|
25
|
+
readonly hint: "A named text input";
|
|
26
|
+
readonly keywords: "text field input string form";
|
|
27
|
+
readonly make: () => {
|
|
28
|
+
type: string;
|
|
29
|
+
props: {
|
|
30
|
+
name: string;
|
|
31
|
+
value: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
}, {
|
|
36
|
+
readonly type: "radio";
|
|
37
|
+
readonly render: React.FC<CustomBlockProps>;
|
|
38
|
+
readonly slash: {
|
|
39
|
+
readonly label: "Radio group";
|
|
40
|
+
readonly hint: "Pick one of several options";
|
|
41
|
+
readonly keywords: "radio choice select option pick one form";
|
|
42
|
+
readonly make: () => {
|
|
43
|
+
type: string;
|
|
44
|
+
props: {
|
|
45
|
+
name: string;
|
|
46
|
+
opts: {
|
|
47
|
+
label: string;
|
|
48
|
+
}[];
|
|
49
|
+
value: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
}, {
|
|
54
|
+
readonly type: "checklist";
|
|
55
|
+
readonly render: React.FC<CustomBlockProps>;
|
|
56
|
+
readonly slash: {
|
|
57
|
+
readonly label: "Choice checklist";
|
|
58
|
+
readonly hint: "Pick any of several options";
|
|
59
|
+
readonly keywords: "checklist checkbox multi select options form";
|
|
60
|
+
readonly make: () => {
|
|
61
|
+
type: string;
|
|
62
|
+
props: {
|
|
63
|
+
name: string;
|
|
64
|
+
opts: {
|
|
65
|
+
label: string;
|
|
66
|
+
}[];
|
|
67
|
+
selected: never[];
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
}, {
|
|
72
|
+
readonly type: "dropdown";
|
|
73
|
+
readonly render: React.FC<CustomBlockProps>;
|
|
74
|
+
readonly slash: {
|
|
75
|
+
readonly label: "Dropdown";
|
|
76
|
+
readonly hint: "Pick one option from a select";
|
|
77
|
+
readonly keywords: "dropdown select choose option pick form menu";
|
|
78
|
+
readonly make: () => {
|
|
79
|
+
type: string;
|
|
80
|
+
props: {
|
|
81
|
+
name: string;
|
|
82
|
+
opts: {
|
|
83
|
+
label: string;
|
|
84
|
+
}[];
|
|
85
|
+
value: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
}, {
|
|
90
|
+
readonly type: "toggle";
|
|
91
|
+
readonly render: React.FC<CustomBlockProps>;
|
|
92
|
+
readonly slash: {
|
|
93
|
+
readonly label: "Toggle switch";
|
|
94
|
+
readonly hint: "A named on/off switch";
|
|
95
|
+
readonly keywords: "toggle switch boolean on off flag";
|
|
96
|
+
readonly make: () => {
|
|
97
|
+
type: string;
|
|
98
|
+
props: {
|
|
99
|
+
name: string;
|
|
100
|
+
value: boolean;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
}, {
|
|
105
|
+
readonly type: "location";
|
|
106
|
+
readonly render: React.FC<CustomBlockProps>;
|
|
107
|
+
readonly slash: {
|
|
108
|
+
readonly label: "Location";
|
|
109
|
+
readonly hint: "A place with coordinates";
|
|
110
|
+
readonly keywords: "location place map coordinates gps geo";
|
|
111
|
+
readonly make: () => {
|
|
112
|
+
type: string;
|
|
113
|
+
props: {
|
|
114
|
+
name: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
}, {
|
|
119
|
+
readonly type: "actionbutton";
|
|
120
|
+
readonly render: React.FC<CustomBlockProps>;
|
|
121
|
+
readonly slash: {
|
|
122
|
+
readonly label: "Button";
|
|
123
|
+
readonly hint: "Set, step, or toggle an input — or open a link";
|
|
124
|
+
readonly keywords: "button action click increment set link trigger";
|
|
125
|
+
readonly make: () => {
|
|
126
|
+
type: string;
|
|
127
|
+
props: {
|
|
128
|
+
btnlabel: string;
|
|
129
|
+
action: string;
|
|
130
|
+
target: string;
|
|
131
|
+
amount: number;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
}];
|