@mudlet/mudlet-web 0.3.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 +338 -0
- package/README.md +150 -0
- package/dist-lib/App.d.ts +1 -0
- package/dist-lib/MudletWebApp.d.ts +11 -0
- package/dist-lib/ProfileSession.d.ts +15 -0
- package/dist-lib/assets/mapParser.worker-t-3rd1zR.js +9 -0
- package/dist-lib/branding.d.ts +213 -0
- package/dist-lib/core/EventBus.d.ts +29 -0
- package/dist-lib/db/sqliteClient.d.ts +25 -0
- package/dist-lib/hooks/useEngines.d.ts +12 -0
- package/dist-lib/hooks/useMudSession.d.ts +10 -0
- package/dist-lib/hooks/useOutput.d.ts +17 -0
- package/dist-lib/hooks/useViewportMode.d.ts +14 -0
- package/dist-lib/import/applyMudletProfile.d.ts +57 -0
- package/dist-lib/import/collectProfileExport.d.ts +16 -0
- package/dist-lib/import/defaultPackages.d.ts +81 -0
- package/dist-lib/import/defaults/mudlet-mapper.xml +13023 -0
- package/dist-lib/import/defaults/run-lua-code.mpackage +0 -0
- package/dist-lib/import/mudletHost.d.ts +67 -0
- package/dist-lib/import/mudletLink.d.ts +34 -0
- package/dist-lib/import/mudletProfileExport.d.ts +49 -0
- package/dist-lib/import/mudletProfileImport.d.ts +71 -0
- package/dist-lib/import/mudletVariables.d.ts +49 -0
- package/dist-lib/import/mudletWriteback.d.ts +12 -0
- package/dist-lib/import/mudletXmlExport.d.ts +16 -0
- package/dist-lib/import/mudletXmlImport.d.ts +21 -0
- package/dist-lib/import/packageInstaller.d.ts +72 -0
- package/dist-lib/import/packageRepository.d.ts +54 -0
- package/dist-lib/import/remotePackageInstall.d.ts +52 -0
- package/dist-lib/index.d.ts +30 -0
- package/dist-lib/index.js +42307 -0
- package/dist-lib/logging/SessionLogger.d.ts +41 -0
- package/dist-lib/main.d.ts +2 -0
- package/dist-lib/map/MapSelectionOverlay.d.ts +15 -0
- package/dist-lib/map/MapStore.d.ts +1067 -0
- package/dist-lib/map/MudixMapReader.d.ts +90 -0
- package/dist-lib/map/MudletHighlightOverlay.d.ts +18 -0
- package/dist-lib/map/mapImageExport.d.ts +26 -0
- package/dist-lib/map/mapParser.worker.d.ts +1 -0
- package/dist-lib/map/mapParserClient.d.ts +35 -0
- package/dist-lib/map/pathfinding.d.ts +52 -0
- package/dist-lib/map/xmlMapImport.d.ts +28 -0
- package/dist-lib/mud/MudSession.d.ts +236 -0
- package/dist-lib/mud/PatternEngine.d.ts +28 -0
- package/dist-lib/mud/aliases/AliasEngine.d.ts +15 -0
- package/dist-lib/mud/connection/LineAssembler.d.ts +84 -0
- package/dist-lib/mud/connection/MudClient.d.ts +268 -0
- package/dist-lib/mud/connection/PingTracker.d.ts +28 -0
- package/dist-lib/mud/connection/TelnetNegotiator.d.ts +188 -0
- package/dist-lib/mud/connection/telnetDebug.d.ts +54 -0
- package/dist-lib/mud/events.d.ts +160 -0
- package/dist-lib/mud/keybindings/KeyEngine.d.ts +36 -0
- package/dist-lib/mud/keybindings/browserReservedKeys.d.ts +45 -0
- package/dist-lib/mud/keybindings/qtKeys.d.ts +33 -0
- package/dist-lib/mud/protocol/charset.d.ts +105 -0
- package/dist-lib/mud/protocol/constants.d.ts +116 -0
- package/dist-lib/mud/protocol/echo.d.ts +63 -0
- package/dist-lib/mud/protocol/gmcp.d.ts +28 -0
- package/dist-lib/mud/protocol/index.d.ts +11 -0
- package/dist-lib/mud/protocol/mccp.d.ts +18 -0
- package/dist-lib/mud/protocol/mnes.d.ts +83 -0
- package/dist-lib/mud/protocol/msdp.d.ts +19 -0
- package/dist-lib/mud/protocol/msp.d.ts +47 -0
- package/dist-lib/mud/protocol/mssp.d.ts +25 -0
- package/dist-lib/mud/protocol/mxp.d.ts +188 -0
- package/dist-lib/mud/protocol/naws.d.ts +7 -0
- package/dist-lib/mud/replay/ReplayPlayer.d.ts +31 -0
- package/dist-lib/mud/replay/ReplayRecorder.d.ts +18 -0
- package/dist-lib/mud/replay/replayFormat.d.ts +49 -0
- package/dist-lib/mud/text/Console.d.ts +183 -0
- package/dist-lib/mud/text/FormatState.d.ts +256 -0
- package/dist-lib/mud/text/ansiEscapes.d.ts +88 -0
- package/dist-lib/mud/text/cellRender.d.ts +21 -0
- package/dist-lib/mud/text/colorParsers.d.ts +54 -0
- package/dist-lib/mud/text/colors.d.ts +31 -0
- package/dist-lib/mud/text/controlCharacterMode.d.ts +13 -0
- package/dist-lib/mud/text/controlChars.d.ts +31 -0
- package/dist-lib/mud/text/hyperlinkConfig.d.ts +164 -0
- package/dist-lib/mud/text/hyperlinkVisibility.d.ts +37 -0
- package/dist-lib/mud/text/oscLinkManager.d.ts +35 -0
- package/dist-lib/mud/text/wcwidth.d.ts +44 -0
- package/dist-lib/mud/text/xterm256.d.ts +2 -0
- package/dist-lib/mud/timers/TimerEngine.d.ts +61 -0
- package/dist-lib/mud/triggers/ChunkProcessor.d.ts +11 -0
- package/dist-lib/mud/triggers/TriggerEngine.d.ts +188 -0
- package/dist-lib/mud/triggers/pcre/Pcre2.d.ts +26 -0
- package/dist-lib/scripting/EngineHost.d.ts +152 -0
- package/dist-lib/scripting/GlobalEventChannel.d.ts +36 -0
- package/dist-lib/scripting/IScriptingRuntime.d.ts +95 -0
- package/dist-lib/scripting/MapOpenNotifier.d.ts +19 -0
- package/dist-lib/scripting/ScriptingAPI.d.ts +1691 -0
- package/dist-lib/scripting/ScriptingEngine.d.ts +806 -0
- package/dist-lib/scripting/StopwatchManager.d.ts +94 -0
- package/dist-lib/scripting/heldModifiers.d.ts +3 -0
- package/dist-lib/scripting/http/HttpService.d.ts +23 -0
- package/dist-lib/scripting/lua/LuaRuntime.d.ts +190 -0
- package/dist-lib/scripting/lua/bindings/automation.d.ts +10 -0
- package/dist-lib/scripting/lua/bindings/commandLine.d.ts +11 -0
- package/dist-lib/scripting/lua/bindings/context.d.ts +87 -0
- package/dist-lib/scripting/lua/bindings/cursor.d.ts +10 -0
- package/dist-lib/scripting/lua/bindings/diagnostics.d.ts +9 -0
- package/dist-lib/scripting/lua/bindings/map.d.ts +14 -0
- package/dist-lib/scripting/lua/bindings/media.d.ts +24 -0
- package/dist-lib/scripting/lua/bindings/output.d.ts +10 -0
- package/dist-lib/scripting/lua/bindings/packages.d.ts +10 -0
- package/dist-lib/scripting/lua/bindings/session.d.ts +16 -0
- package/dist-lib/scripting/lua/bindings/textEdit.d.ts +9 -0
- package/dist-lib/scripting/lua/bindings/userWindows.d.ts +11 -0
- package/dist-lib/scripting/lua/bindings/window.d.ts +10 -0
- package/dist-lib/scripting/lua/imageSize.d.ts +4 -0
- package/dist-lib/scripting/lua/luaCompletions.d.ts +9 -0
- package/dist-lib/scripting/lua/mudlet-lua/generic-mapper/generic_mapper.mpackage +0 -0
- package/dist-lib/scripting/lua/rex.d.ts +3 -0
- package/dist-lib/scripting/lua/sqlRowEncoder.d.ts +1 -0
- package/dist-lib/scripting/lua/yajl.d.ts +11 -0
- package/dist-lib/scripting/profilesPresence.d.ts +50 -0
- package/dist-lib/scripting/vfs/ProfileVFS.d.ts +62 -0
- package/dist-lib/scripting/vfs/cssRewrite.d.ts +21 -0
- package/dist-lib/scripting/vfs/folderHandleStore.d.ts +16 -0
- package/dist-lib/scripting/vfs/folderSync.d.ts +59 -0
- package/dist-lib/scripting/vfs/htmlRewrite.d.ts +26 -0
- package/dist-lib/scripting/vfs/vfsBridge.d.ts +16 -0
- package/dist-lib/services/cloudflare.d.ts +54 -0
- package/dist-lib/storage/appStore.d.ts +132 -0
- package/dist-lib/storage/crossTabSync.d.ts +3 -0
- package/dist-lib/storage/debouncedStorage.d.ts +18 -0
- package/dist-lib/storage/hooks.d.ts +17 -0
- package/dist-lib/storage/index.d.ts +4 -0
- package/dist-lib/storage/logExport.d.ts +32 -0
- package/dist-lib/storage/logStorage.d.ts +45 -0
- package/dist-lib/storage/mapStorage.d.ts +2 -0
- package/dist-lib/storage/profileVfsData.d.ts +47 -0
- package/dist-lib/storage/schema.d.ts +638 -0
- package/dist-lib/styles.css +2 -0
- package/dist-lib/ui/AboutModal.d.ts +8 -0
- package/dist-lib/ui/BrandLoginFields.d.ts +25 -0
- package/dist-lib/ui/BrandLoginScreen.d.ts +11 -0
- package/dist-lib/ui/CharLoginModal.d.ts +32 -0
- package/dist-lib/ui/CmdLineMenuRegistry.d.ts +27 -0
- package/dist-lib/ui/CodeEditorPreview.d.ts +19 -0
- package/dist-lib/ui/CommandBar.d.ts +17 -0
- package/dist-lib/ui/ConnectionFormModal.d.ts +13 -0
- package/dist-lib/ui/ConnectionGrid.d.ts +18 -0
- package/dist-lib/ui/ConnectionScreen.d.ts +14 -0
- package/dist-lib/ui/FileBrowserModal.d.ts +20 -0
- package/dist-lib/ui/FilePickerModal.d.ts +21 -0
- package/dist-lib/ui/FolderPermissionScreen.d.ts +16 -0
- package/dist-lib/ui/JsonPreview.d.ts +15 -0
- package/dist-lib/ui/LogBrowserModal.d.ts +7 -0
- package/dist-lib/ui/MapEditorModal.d.ts +9 -0
- package/dist-lib/ui/MarkdownPreview.d.ts +15 -0
- package/dist-lib/ui/MergeConflictModal.d.ts +17 -0
- package/dist-lib/ui/ModuleResolveModal.d.ts +22 -0
- package/dist-lib/ui/MouseEventRegistry.d.ts +31 -0
- package/dist-lib/ui/ProfileBusyScreen.d.ts +12 -0
- package/dist-lib/ui/ProfileExportModal.d.ts +7 -0
- package/dist-lib/ui/ProxyInfoModal.d.ts +6 -0
- package/dist-lib/ui/ProxyWhyModal.d.ts +6 -0
- package/dist-lib/ui/ProxyWizardModal.d.ts +6 -0
- package/dist-lib/ui/QuickOpenPalette.d.ts +8 -0
- package/dist-lib/ui/ResizableModal.d.ts +17 -0
- package/dist-lib/ui/ScriptingDocsModal.d.ts +12 -0
- package/dist-lib/ui/SettingsModal.d.ts +9 -0
- package/dist-lib/ui/Toolbar.d.ts +29 -0
- package/dist-lib/ui/bufferWords.d.ts +38 -0
- package/dist-lib/ui/buttons/ButtonsBar.d.ts +21 -0
- package/dist-lib/ui/cmdline/CommandLineManager.d.ts +97 -0
- package/dist-lib/ui/cmdline/CommandLineOverlay.d.ts +8 -0
- package/dist-lib/ui/codemirror/theme.d.ts +5 -0
- package/dist-lib/ui/commandHistory.d.ts +31 -0
- package/dist-lib/ui/components/Button.d.ts +9 -0
- package/dist-lib/ui/components/ConfirmDialog.d.ts +29 -0
- package/dist-lib/ui/components/ContextMenu.d.ts +9 -0
- package/dist-lib/ui/components/FontPicker.d.ts +9 -0
- package/dist-lib/ui/components/FormField.d.ts +16 -0
- package/dist-lib/ui/components/HelpTip.d.ts +7 -0
- package/dist-lib/ui/components/Input.d.ts +6 -0
- package/dist-lib/ui/components/Toggle.d.ts +10 -0
- package/dist-lib/ui/components/index.d.ts +9 -0
- package/dist-lib/ui/components/useModalFocus.d.ts +18 -0
- package/dist-lib/ui/labels/LabelManager.d.ts +220 -0
- package/dist-lib/ui/labels/LabelOverlay.d.ts +9 -0
- package/dist-lib/ui/labels/backgroundImageSize.d.ts +10 -0
- package/dist-lib/ui/labels/cursorShapes.d.ts +6 -0
- package/dist-lib/ui/labels/gifMovie.d.ts +100 -0
- package/dist-lib/ui/labels/qtCss.d.ts +57 -0
- package/dist-lib/ui/layout/ContentLayout.d.ts +19 -0
- package/dist-lib/ui/layout/DockArea.d.ts +14 -0
- package/dist-lib/ui/layout/DockedPanel.d.ts +13 -0
- package/dist-lib/ui/layout/FloatingWindowLayer.d.ts +10 -0
- package/dist-lib/ui/layout/MobileLayout.d.ts +22 -0
- package/dist-lib/ui/layout/PopoutWindow.d.ts +35 -0
- package/dist-lib/ui/layout/ScriptWindow.d.ts +29 -0
- package/dist-lib/ui/layout/SplitGroupPanel.d.ts +17 -0
- package/dist-lib/ui/layout/TabGroupPanel.d.ts +12 -0
- package/dist-lib/ui/layout/WindowContextMenu.d.ts +11 -0
- package/dist-lib/ui/layout/dockDetect.d.ts +26 -0
- package/dist-lib/ui/layout/overlayLayerOrder.d.ts +71 -0
- package/dist-lib/ui/markdown.d.ts +1 -0
- package/dist-lib/ui/output/CaretReviewPanel.d.ts +22 -0
- package/dist-lib/ui/output/OutputArea.d.ts +9 -0
- package/dist-lib/ui/output/OutputContextMenu.d.ts +23 -0
- package/dist-lib/ui/output/OutputRenderer.d.ts +64 -0
- package/dist-lib/ui/output/ScreenReaderLog.d.ts +23 -0
- package/dist-lib/ui/output/StickyOutputPanel.d.ts +28 -0
- package/dist-lib/ui/output/backgroundImageStyle.d.ts +17 -0
- package/dist-lib/ui/output/caretMode.d.ts +40 -0
- package/dist-lib/ui/output/linkNavigation.d.ts +29 -0
- package/dist-lib/ui/output/osc8Menu.d.ts +16 -0
- package/dist-lib/ui/output/outputCopy.d.ts +15 -0
- package/dist-lib/ui/preventPinchZoom.d.ts +1 -0
- package/dist-lib/ui/scrollbox/ScrollBoxManager.d.ts +62 -0
- package/dist-lib/ui/scrollbox/ScrollBoxOverlay.d.ts +25 -0
- package/dist-lib/ui/sound/SoundManager.d.ts +149 -0
- package/dist-lib/ui/sound/closedCaption.d.ts +37 -0
- package/dist-lib/ui/textedit/TextEditManager.d.ts +56 -0
- package/dist-lib/ui/tts/TtsManager.d.ts +68 -0
- package/dist-lib/ui/useBrandLogin.d.ts +19 -0
- package/dist-lib/ui/useCommandHistory.d.ts +7 -0
- package/dist-lib/ui/video/VideoManager.d.ts +56 -0
- package/dist-lib/ui/windows/ScriptEditorModal.d.ts +13 -0
- package/dist-lib/ui/windows/WindowManager.d.ts +694 -0
- package/dist-lib/ui/windows/panels/HtmlPanel.d.ts +27 -0
- package/dist-lib/ui/windows/panels/LuaEditor.d.ts +14 -0
- package/dist-lib/ui/windows/panels/MapPanel.d.ts +8 -0
- package/dist-lib/ui/windows/panels/PackageRepositoryModal.d.ts +18 -0
- package/dist-lib/ui/windows/panels/ScriptEditorPanel.d.ts +24 -0
- package/dist-lib/ui/windows/panels/ScriptSearch.d.ts +12 -0
- package/dist-lib/ui/windows/panels/TextPanel.d.ts +35 -0
- package/dist-lib/ui/windows/panels/VariablesView.d.ts +21 -0
- package/dist-lib/ui/windows/panels/VfsModulePickerModal.d.ts +8 -0
- package/dist-lib/ui/windows/panels/WindowCmdLine.d.ts +23 -0
- package/dist-lib/ui/windows/types.d.ts +145 -0
- package/dist-lib/utils/documentTitle.d.ts +33 -0
- package/dist-lib/utils/fontLoader.d.ts +52 -0
- package/dist-lib/utils/profileLock.d.ts +26 -0
- package/dist-lib/utils/sessionCredentials.d.ts +16 -0
- package/dist-lib/version.d.ts +39 -0
- package/dist-lib/vfs-sw.js +131 -0
- package/dist-lib/vite.d.ts +2 -0
- package/dist-lib/vite.js +154 -0
- package/package.json +93 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
onClose: () => void;
|
|
3
|
+
}
|
|
4
|
+
/** Small "About" dialog reachable from the connection screen — wordmark,
|
|
5
|
+
* tagline and description come from the active brand (stock mudix by
|
|
6
|
+
* default) plus a link to the source repository when the brand sets one. */
|
|
7
|
+
export declare function AboutModal({ onClose }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { LandingProps } from '../branding';
|
|
2
|
+
export interface BrandLoginFieldsProps extends Pick<LandingProps, 'openProfile' | 'ensureBrandProfile'> {
|
|
3
|
+
/** Show the password field (default true). Set false for brands that only
|
|
4
|
+
* need a character/profile name — e.g. an offline-only demo. */
|
|
5
|
+
showPassword?: boolean;
|
|
6
|
+
/** Show the "open offline" button (default true). */
|
|
7
|
+
showOffline?: boolean;
|
|
8
|
+
accountLabel?: string;
|
|
9
|
+
passwordLabel?: string;
|
|
10
|
+
connectLabel?: string;
|
|
11
|
+
offlineLabel?: string;
|
|
12
|
+
accountPlaceholder?: string;
|
|
13
|
+
passwordPlaceholder?: string;
|
|
14
|
+
/** Extra class appended to the root `<form>`. */
|
|
15
|
+
className?: string;
|
|
16
|
+
autoFocus?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Unstyled login form for custom branded landings: account (+ optional
|
|
20
|
+
* password) input, Connect submit, optional Open-offline button. No CSS is
|
|
21
|
+
* applied — every element carries a stable `mudix-login-*` class for the
|
|
22
|
+
* brand's own stylesheet to target. Wraps `useBrandLogin`; for full control
|
|
23
|
+
* over markup, call that hook directly instead of using this component.
|
|
24
|
+
*/
|
|
25
|
+
export declare function BrandLoginFields({ openProfile, ensureBrandProfile, showPassword, showOffline, accountLabel, passwordLabel, connectLabel, offlineLabel, accountPlaceholder, passwordPlaceholder, className, autoFocus, }: BrandLoginFieldsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type LandingProps } from '../branding';
|
|
2
|
+
/**
|
|
3
|
+
* Built-in landing for branded builds: no profile creation or selection —
|
|
4
|
+
* just a login form for the brand's MUD. Used when the brand doesn't supply
|
|
5
|
+
* its own `Landing` component. Credentials are held in memory only (never
|
|
6
|
+
* persisted): they feed the same auto-login path as the connection editor
|
|
7
|
+
* (GMCP Char.Login, or typed at text-login prompts) for this page's lifetime,
|
|
8
|
+
* so a reload starts back at an empty form. See `useBrandLogin`/
|
|
9
|
+
* `BrandLoginFields` to reuse this behavior in a custom `Landing`.
|
|
10
|
+
*/
|
|
11
|
+
export declare function BrandLoginScreen({ openProfile, ensureBrandProfile, openSettings }: LandingProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
interface CharLoginModalProps {
|
|
2
|
+
/** Connection name, shown in the title for context. */
|
|
3
|
+
connectionName?: string;
|
|
4
|
+
/** Error from a previous failed attempt (Char.Login.Result success=false). */
|
|
5
|
+
error?: string;
|
|
6
|
+
/** Account/username to prefill (saved per-profile credential). */
|
|
7
|
+
initialAccount?: string;
|
|
8
|
+
/** Password to prefill (saved per-profile credential — plaintext). */
|
|
9
|
+
initialPassword?: string;
|
|
10
|
+
/** Initial state of the "remember on this device" checkbox. */
|
|
11
|
+
initialRemember?: boolean;
|
|
12
|
+
/** Show the "remember on this device" checkbox (default true). Branded
|
|
13
|
+
* builds hide it — credentials are never persisted there, so `onSubmit`
|
|
14
|
+
* always receives `remember=false`. */
|
|
15
|
+
allowRemember?: boolean;
|
|
16
|
+
/** Send `account` + `password` to the server (Char.Login.Credentials).
|
|
17
|
+
* `remember` tells the caller whether to persist them for next time. */
|
|
18
|
+
onSubmit: (account: string, password: string, remember: boolean) => void;
|
|
19
|
+
/** Decline GMCP login — sends the empty reply so the server falls back to
|
|
20
|
+
* its text login prompt. */
|
|
21
|
+
onCancel: () => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Credentials popup for GMCP `Char.Login` authentication. Rendered as a real
|
|
25
|
+
* `<form>` with `autocomplete="username"` / `autocomplete="current-password"`
|
|
26
|
+
* inputs so browser password managers offer to fill and save. Optionally
|
|
27
|
+
* remembers the account + password per profile (plaintext localStorage — see
|
|
28
|
+
* the inline warning); the password is otherwise handed straight to `onSubmit`
|
|
29
|
+
* and relayed to the server, never stored. Cancelling falls back to text login.
|
|
30
|
+
*/
|
|
31
|
+
export declare function CharLoginModal({ connectionName, error, initialAccount, initialPassword, initialRemember, allowRemember, onSubmit, onCancel, }: CharLoginModalProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface CmdLineMenuEntry {
|
|
2
|
+
/** Stable id used by removeCommandLineMenuEvent. */
|
|
3
|
+
uniqueName: string;
|
|
4
|
+
/** Event name passed to raiseEvent on click. */
|
|
5
|
+
eventName: string;
|
|
6
|
+
/** Label rendered in the context menu. Defaults to uniqueName. */
|
|
7
|
+
displayName: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Backs Mudlet's addCommandLineMenuEvent / removeCommandLineMenuEvent /
|
|
11
|
+
* getCommandLineMenuEvents. Right-clicking the command bar shows entries from
|
|
12
|
+
* this registry; clicking one raises the registered event with the current
|
|
13
|
+
* command-line text as the first argument.
|
|
14
|
+
*/
|
|
15
|
+
export declare class CmdLineMenuRegistry {
|
|
16
|
+
private entries;
|
|
17
|
+
private subscribers;
|
|
18
|
+
private dispatcher;
|
|
19
|
+
subscribe(cb: () => void): () => void;
|
|
20
|
+
private notify;
|
|
21
|
+
setDispatcher(fn: ((eventName: string, args: unknown[]) => void) | null): void;
|
|
22
|
+
add(uniqueName: string, eventName: string, displayName?: string): boolean;
|
|
23
|
+
remove(uniqueName: string): boolean;
|
|
24
|
+
list(): CmdLineMenuEntry[];
|
|
25
|
+
/** Raise the entry's event, passing the current command-line text. */
|
|
26
|
+
dispatch(uniqueName: string, cmdLineText: string): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ProfileVFS } from '../scripting/vfs/ProfileVFS';
|
|
2
|
+
export declare const EDITABLE_EXTENSIONS: Set<string>;
|
|
3
|
+
interface Props {
|
|
4
|
+
content: string;
|
|
5
|
+
filename: string;
|
|
6
|
+
path: string;
|
|
7
|
+
vfs: ProfileVFS;
|
|
8
|
+
onDirtyChange?: (dirty: boolean) => void;
|
|
9
|
+
onSaved?: () => void;
|
|
10
|
+
/** Jump request. Bump `revision` to re-trigger on the same line. */
|
|
11
|
+
gotoLine?: {
|
|
12
|
+
line: number;
|
|
13
|
+
revision: number;
|
|
14
|
+
} | null;
|
|
15
|
+
/** Extra controls rendered inside the toolbar actions area (left of Revert/Save). */
|
|
16
|
+
toolbarExtra?: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export declare function CodeEditorPreview({ content, filename, path, vfs, onDirtyChange, onSaved, gotoLine, toolbarExtra }: Props): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type BufferWordIndex } from './bufferWords';
|
|
2
|
+
import type { CmdLineMenuRegistry } from './CmdLineMenuRegistry';
|
|
3
|
+
interface CommandBarProps {
|
|
4
|
+
command: string;
|
|
5
|
+
onCommandChange: (command: string) => void;
|
|
6
|
+
passwordMode?: boolean;
|
|
7
|
+
commandInputRef: React.RefObject<HTMLInputElement | HTMLTextAreaElement | null>;
|
|
8
|
+
onSubmit: () => void;
|
|
9
|
+
cmdLineMenu: CmdLineMenuRegistry;
|
|
10
|
+
/** Tab-completion suggestions added via Mudlet's addCmdLineSuggestion API.
|
|
11
|
+
* Merged ahead of command history (dedup, case-insensitive). */
|
|
12
|
+
suggestions?: string[];
|
|
13
|
+
/** Recency-ordered words seen in output, for argument-word Tab completion. */
|
|
14
|
+
bufferWords?: BufferWordIndex | null;
|
|
15
|
+
}
|
|
16
|
+
export declare function CommandBar({ command, onCommandChange, passwordMode, commandInputRef, onSubmit, cmdLineMenu, suggestions, bufferWords }: CommandBarProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type MudConnection } from '../storage';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** The connection to edit, or null to add a new one. */
|
|
4
|
+
connection: MudConnection | null;
|
|
5
|
+
/** Whether this is the very first connection (drives the title copy). */
|
|
6
|
+
firstConnection: boolean;
|
|
7
|
+
busy: boolean;
|
|
8
|
+
onAdd: (data: Omit<MudConnection, 'id'>) => string;
|
|
9
|
+
onUpdate: (id: string, data: Omit<MudConnection, 'id'>) => void;
|
|
10
|
+
onClose: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function ConnectionFormModal({ connection, firstConnection, busy, onAdd, onUpdate, onClose }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type MudConnection } from '../storage';
|
|
2
|
+
interface Props {
|
|
3
|
+
connections: MudConnection[];
|
|
4
|
+
connecting: boolean;
|
|
5
|
+
connectingId: string | null;
|
|
6
|
+
editingId: string | null;
|
|
7
|
+
onConnect: (c: MudConnection) => void;
|
|
8
|
+
onOpen: (c: MudConnection) => void;
|
|
9
|
+
onEdit: (c: MudConnection) => void;
|
|
10
|
+
onDelete: (c: MudConnection) => void;
|
|
11
|
+
onReorder: (orderedIds: string[]) => void;
|
|
12
|
+
onAddClick: () => void;
|
|
13
|
+
}
|
|
14
|
+
/** Draggable, animated grid of profile cards. Reordering lifts the dragged tile
|
|
15
|
+
* into a floating clone, opens a dashed placeholder at the target slot, and
|
|
16
|
+
* slides the remaining tiles into their new positions with a FLIP animation. */
|
|
17
|
+
export declare function ConnectionGrid({ connections, connecting, connectingId, editingId, onConnect, onOpen, onEdit, onDelete, onReorder, onAddClick, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type MudConnection } from '../storage';
|
|
2
|
+
interface Props {
|
|
3
|
+
connections: MudConnection[];
|
|
4
|
+
connecting: boolean;
|
|
5
|
+
connectingId: string | null;
|
|
6
|
+
onConnect: (connection: MudConnection) => void;
|
|
7
|
+
onOpen: (connection: MudConnection) => void;
|
|
8
|
+
onAdd: (data: Omit<MudConnection, 'id'>) => string;
|
|
9
|
+
onUpdate: (id: string, data: Omit<MudConnection, 'id'>) => void;
|
|
10
|
+
onDelete: (id: string) => void;
|
|
11
|
+
onOpenSettings: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function ConnectionScreen({ connections, connecting, connectingId, onConnect, onOpen, onAdd, onUpdate, onDelete, onOpenSettings }: Props): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ProfileVFS } from '../scripting/vfs/ProfileVFS';
|
|
2
|
+
export interface VFSNode {
|
|
3
|
+
name: string;
|
|
4
|
+
path: string;
|
|
5
|
+
type: 'file' | 'dir';
|
|
6
|
+
children?: VFSNode[];
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function buildTree(vfs: ProfileVFS, dirPath: string, depth?: number): VFSNode[];
|
|
10
|
+
interface FileBrowserModalProps {
|
|
11
|
+
connectionId: string;
|
|
12
|
+
vfs: ProfileVFS | null;
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
initialPath?: string | null;
|
|
15
|
+
initialPathTick?: number;
|
|
16
|
+
initialLine?: number;
|
|
17
|
+
onPlayReplay?: (path: string) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare function FileBrowserModal({ connectionId, vfs, onClose, initialPath, initialPathTick, initialLine, onPlayReplay }: FileBrowserModalProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ProfileVFS } from '../scripting/vfs/ProfileVFS';
|
|
2
|
+
/**
|
|
3
|
+
* The Lua `invokeFileDialog(...)` picker. The calling Lua handler is parked on
|
|
4
|
+
* its coroutine until this resolves, so every exit path (Select, Cancel, the
|
|
5
|
+
* header ✕) must call `onDone` — with the picked absolute VFS path, or '' for
|
|
6
|
+
* cancel (Mudlet's return value for a dismissed dialog).
|
|
7
|
+
*
|
|
8
|
+
* `mode === 'file'` picks a file; `mode === 'folder'` picks a directory and
|
|
9
|
+
* hides files entirely, mirroring QFileDialog::getOpenFileName vs
|
|
10
|
+
* getExistingDirectory in Mudlet.
|
|
11
|
+
*/
|
|
12
|
+
interface FilePickerModalProps {
|
|
13
|
+
vfs: ProfileVFS | null;
|
|
14
|
+
mode: 'file' | 'folder';
|
|
15
|
+
title: string;
|
|
16
|
+
/** VFS path to reveal on open; '' or invalid falls back to the root. */
|
|
17
|
+
location: string;
|
|
18
|
+
onDone: (path: string) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare function FilePickerModal({ vfs, mode, title, location, onDone }: FilePickerModalProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
name: string;
|
|
3
|
+
/** Re-request folder access (must run from this click — a user gesture). */
|
|
4
|
+
onGrant: () => void;
|
|
5
|
+
/** Drop the folder link; the profile opens from local storage instead. */
|
|
6
|
+
onUnlink: () => void;
|
|
7
|
+
onBack: () => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Shown when a linked Mudlet profile is opened but the browser hasn't granted
|
|
11
|
+
* access to its folder (typically on a fresh page load via a deep link, where
|
|
12
|
+
* there's no user gesture to prompt with). The user must decide — grant access
|
|
13
|
+
* or unlink — rather than silently falling through to an empty local copy.
|
|
14
|
+
*/
|
|
15
|
+
export declare function FolderPermissionScreen({ name, onGrant, onUnlink, onBack }: Props): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ProfileVFS } from '../scripting/vfs/ProfileVFS';
|
|
2
|
+
interface Props {
|
|
3
|
+
content: string;
|
|
4
|
+
filename: string;
|
|
5
|
+
path: string;
|
|
6
|
+
vfs: ProfileVFS;
|
|
7
|
+
onDirtyChange?: (dirty: boolean) => void;
|
|
8
|
+
onSaved?: () => void;
|
|
9
|
+
gotoLine?: {
|
|
10
|
+
line: number;
|
|
11
|
+
revision: number;
|
|
12
|
+
} | null;
|
|
13
|
+
}
|
|
14
|
+
export declare function JsonPreview({ content, filename, path, vfs, onDirtyChange, onSaved, gotoLine }: Props): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface LogBrowserModalProps {
|
|
2
|
+
connectionId: string;
|
|
3
|
+
connectionName: string;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function LogBrowserModal({ connectionId, connectionName, onClose }: LogBrowserModalProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { WindowManager } from './windows/WindowManager';
|
|
2
|
+
interface MapEditorModalProps {
|
|
3
|
+
connectionId: string;
|
|
4
|
+
connectionName: string;
|
|
5
|
+
manager: WindowManager;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function MapEditorModal({ connectionId, connectionName, manager, onClose }: MapEditorModalProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ProfileVFS } from '../scripting/vfs/ProfileVFS';
|
|
2
|
+
interface Props {
|
|
3
|
+
content: string;
|
|
4
|
+
filename: string;
|
|
5
|
+
path: string;
|
|
6
|
+
vfs: ProfileVFS;
|
|
7
|
+
onDirtyChange?: (dirty: boolean) => void;
|
|
8
|
+
onSaved?: () => void;
|
|
9
|
+
gotoLine?: {
|
|
10
|
+
line: number;
|
|
11
|
+
revision: number;
|
|
12
|
+
} | null;
|
|
13
|
+
}
|
|
14
|
+
export declare function MarkdownPreview({ content, filename, path, vfs, onDirtyChange, onSaved, gotoLine }: Props): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { DiffResult, SideKind } from '../scripting/vfs/folderSync';
|
|
2
|
+
interface MergeConflictModalProps {
|
|
3
|
+
/** Diff between the currently-mounted profile (local/IDB) and the linked folder. */
|
|
4
|
+
diff: DiffResult;
|
|
5
|
+
/** Display name shown in headers, e.g. the folder.name. */
|
|
6
|
+
folderName: string;
|
|
7
|
+
/** Cancel the link operation entirely. */
|
|
8
|
+
onCancel: () => void;
|
|
9
|
+
/**
|
|
10
|
+
* User confirmed. `resolutions` maps each conflicting path to the winning
|
|
11
|
+
* side. The caller copies winners into the folder (folder is the next
|
|
12
|
+
* mount's source of truth). Files in onlyLocal are unioned in automatically.
|
|
13
|
+
*/
|
|
14
|
+
onApply: (resolutions: Map<string, SideKind>) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function MergeConflictModal({ diff, folderName, onCancel, onApply }: MergeConflictModalProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { MudletModuleRef } from '../import/mudletHost';
|
|
2
|
+
export interface ModuleUpload {
|
|
3
|
+
key: string;
|
|
4
|
+
bytes: Uint8Array;
|
|
5
|
+
}
|
|
6
|
+
interface Props {
|
|
7
|
+
/** Modules whose external XML file couldn't be found in the imported tree. */
|
|
8
|
+
modules: MudletModuleRef[];
|
|
9
|
+
/** Called when every module has been decided — uploaded modules are folded
|
|
10
|
+
* in, the rest dropped. */
|
|
11
|
+
onComplete: (uploads: ModuleUpload[]) => void;
|
|
12
|
+
/** Abort the whole import. */
|
|
13
|
+
onCancel: () => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* After a Mudlet-profile import, modules that load from an external local XML
|
|
17
|
+
* file (which a browser can't read, and that wasn't found inside the profile)
|
|
18
|
+
* are listed here. For each, the user uploads its `.xml` or drops it. The import
|
|
19
|
+
* only proceeds once every module is decided.
|
|
20
|
+
*/
|
|
21
|
+
export declare function ModuleResolveModal({ modules, onComplete, onCancel }: Props): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface MouseEventEntry {
|
|
2
|
+
/** Stable id used by removeMouseEvent and as the map key for getMouseEvents. */
|
|
3
|
+
uniqueName: string;
|
|
4
|
+
/** Event raised (via raiseEvent) when the menu item is clicked. */
|
|
5
|
+
eventName: string;
|
|
6
|
+
/** Label rendered in the context menu. Defaults to uniqueName. */
|
|
7
|
+
displayName: string;
|
|
8
|
+
/** Tooltip shown on hover. Empty string when none was given. */
|
|
9
|
+
tooltip: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Backs Mudlet's addMouseEvent / removeMouseEvent / getMouseEvents
|
|
13
|
+
* (Host::mConsoleActions). Right-clicking the main output area shows entries
|
|
14
|
+
* from this registry; clicking one raises the registered event. addMouseEvent
|
|
15
|
+
* refuses a duplicate uniqueName (matching Mudlet's warn-and-return-nil).
|
|
16
|
+
*/
|
|
17
|
+
export declare class MouseEventRegistry {
|
|
18
|
+
private entries;
|
|
19
|
+
private subscribers;
|
|
20
|
+
private dispatcher;
|
|
21
|
+
subscribe(cb: () => void): () => void;
|
|
22
|
+
private notify;
|
|
23
|
+
setDispatcher(fn: ((eventName: string, args: unknown[]) => void) | null): void;
|
|
24
|
+
/** Mudlet addMouseEvent — false when uniqueName/eventName is empty or the
|
|
25
|
+
* uniqueName is already registered. */
|
|
26
|
+
add(uniqueName: string, eventName: string, displayName?: string, tooltip?: string): boolean;
|
|
27
|
+
remove(uniqueName: string): boolean;
|
|
28
|
+
list(): MouseEventEntry[];
|
|
29
|
+
/** Raise the entry's event. Mudlet passes the originating window name. */
|
|
30
|
+
dispatch(uniqueName: string): void;
|
|
31
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
name: string;
|
|
3
|
+
/** true = another tab owns the profile and we're queued behind it;
|
|
4
|
+
* false = we're just acquiring a free lock (a brief, usually invisible moment). */
|
|
5
|
+
waiting: boolean;
|
|
6
|
+
onBack: () => void;
|
|
7
|
+
}
|
|
8
|
+
/** Shown while a profile can't yet be mounted because another browser tab holds
|
|
9
|
+
* its single-owner lock. Auto-dismisses (the parent swaps in the session) the
|
|
10
|
+
* moment the other tab releases it. */
|
|
11
|
+
export declare function ProfileBusyScreen({ name, waiting, onBack }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ProfileVFS } from '../scripting/vfs/ProfileVFS';
|
|
2
|
+
interface QuickOpenPaletteProps {
|
|
3
|
+
vfs: ProfileVFS;
|
|
4
|
+
onPick: (path: string) => void;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function QuickOpenPalette({ vfs, onPick, onClose }: QuickOpenPaletteProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ModalBounds } from '../storage/schema';
|
|
2
|
+
interface ResizableModalProps {
|
|
3
|
+
title: string;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
savedBounds?: ModalBounds | null;
|
|
6
|
+
onBoundsChange?: (bounds: ModalBounds) => void;
|
|
7
|
+
minW?: number;
|
|
8
|
+
minH?: number;
|
|
9
|
+
defaultW: number;
|
|
10
|
+
defaultH: number;
|
|
11
|
+
headerExtra?: React.ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
bodyClassName?: string;
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export declare function ResizableModal({ title, onClose, savedBounds, onBoundsChange, minW, minH, defaultW, defaultH, headerExtra, className, bodyClassName, children, }: ResizableModalProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import './ScriptingDocsModal.css';
|
|
2
|
+
interface ScriptingDocsModalProps {
|
|
3
|
+
connectionId: string;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* A read-only browser for the Lua scripting API, sourced from the same
|
|
8
|
+
* REFERENCE_GROUPS catalogue that backs editor autocomplete — so the docs
|
|
9
|
+
* never drift from what the runtime actually exposes.
|
|
10
|
+
*/
|
|
11
|
+
export declare function ScriptingDocsModal({ connectionId, onClose }: ScriptingDocsModalProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ProfileVFS } from '../scripting/vfs/ProfileVFS';
|
|
2
|
+
interface SettingsModalProps {
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
/** Active profile id; null on the connection screen (only theme is editable). */
|
|
5
|
+
connectionId: string | null;
|
|
6
|
+
vfs?: ProfileVFS | null;
|
|
7
|
+
}
|
|
8
|
+
export declare function SettingsModal({ onClose, connectionId, vfs }: SettingsModalProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type BrandToolbarContext } from '../branding';
|
|
2
|
+
import type { SessionStatus } from '../mud/events';
|
|
3
|
+
interface ToolbarProps {
|
|
4
|
+
connectionName: string;
|
|
5
|
+
status: SessionStatus;
|
|
6
|
+
ping: number | null;
|
|
7
|
+
onDisconnect: () => void;
|
|
8
|
+
onReconnect: () => void;
|
|
9
|
+
onNewConnection: () => void;
|
|
10
|
+
onOpenMap: () => void;
|
|
11
|
+
onOpenScripts: () => void;
|
|
12
|
+
onOpenFiles: () => void;
|
|
13
|
+
onOpenLogs: () => void;
|
|
14
|
+
onOpenDocs: () => void;
|
|
15
|
+
onOpenSettings: () => void;
|
|
16
|
+
/** Mudlet-format replay recording toggle state + handler. */
|
|
17
|
+
replayRecording: boolean;
|
|
18
|
+
onToggleReplayRecording: () => void;
|
|
19
|
+
/** Playback speed of the active replay, or null when none is playing —
|
|
20
|
+
* the speed/stop controls only render mid-replay. */
|
|
21
|
+
replaySpeed: number | null;
|
|
22
|
+
onReplaySpeedChange: (direction: 1 | -1) => void;
|
|
23
|
+
onReplayStop: () => void;
|
|
24
|
+
onContextMenu?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
25
|
+
/** Capabilities handed to brand toolbar buttons (send / raiseEvent). */
|
|
26
|
+
brandContext?: BrandToolbarContext;
|
|
27
|
+
}
|
|
28
|
+
export declare function Toolbar({ connectionName, status, ping, onDisconnect, onReconnect, onNewConnection, onOpenMap, onOpenScripts, onOpenFiles, onOpenLogs, onOpenDocs, onOpenSettings, replayRecording, onToggleReplayRecording, replaySpeed, onReplaySpeedChange, onReplayStop, onContextMenu, brandContext }: ToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { MudSession } from '../mud/MudSession';
|
|
2
|
+
/**
|
|
3
|
+
* Maintains a bounded, recency-ordered set of words seen in session output.
|
|
4
|
+
* Subscribes to the `message` event — the single choke point every output line
|
|
5
|
+
* passes through (the same tap SessionLogger uses) — so it captures MUD text,
|
|
6
|
+
* script echoes, and trigger output alike. One instance per session.
|
|
7
|
+
*/
|
|
8
|
+
export declare class BufferWordIndex {
|
|
9
|
+
private readonly session;
|
|
10
|
+
private readonly words;
|
|
11
|
+
private unsubscribe;
|
|
12
|
+
constructor(session: MudSession);
|
|
13
|
+
start(): void;
|
|
14
|
+
stop(): void;
|
|
15
|
+
private ingest;
|
|
16
|
+
/** Words in recency order, newest first. */
|
|
17
|
+
getWords(): string[];
|
|
18
|
+
}
|
|
19
|
+
export interface ActiveWord {
|
|
20
|
+
/** Everything before the trailing word (unchanged by completion). */
|
|
21
|
+
prefix: string;
|
|
22
|
+
/** The trailing word the user is typing. */
|
|
23
|
+
word: string;
|
|
24
|
+
}
|
|
25
|
+
/** Splits the trailing word being typed from its leading text. Returns null when
|
|
26
|
+
* the command is empty or ends in whitespace/punctuation (nothing to complete). */
|
|
27
|
+
export declare function splitTrailingWord(command: string): ActiveWord | null;
|
|
28
|
+
/** True when the trailing word is an *argument* (something precedes it), not the
|
|
29
|
+
* command name. This is what routes Tab to buffer completion vs. history. */
|
|
30
|
+
export declare function hasPrecedingWord(prefix: string): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Prefix-matches `word` against several candidate lists, tried in priority order
|
|
33
|
+
* (e.g. suggestions, then history, then buffer words). Case-insensitive,
|
|
34
|
+
* de-duplicated across all lists, excludes the exact word already typed. Matching
|
|
35
|
+
* is **prefix-only** — never subsequence — so a completion always literally starts
|
|
36
|
+
* with what was typed. The returned order is the Tab cycle order.
|
|
37
|
+
*/
|
|
38
|
+
export declare function matchWordCandidates(word: string, lists: string[][], limit?: number): string[];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import type { ScriptingEngine } from '../../scripting/ScriptingEngine';
|
|
3
|
+
import type { ProfileVFS } from '../../scripting/vfs/ProfileVFS';
|
|
4
|
+
import './ButtonsBar.css';
|
|
5
|
+
interface ButtonsLayerProps {
|
|
6
|
+
connectionId: string;
|
|
7
|
+
engineRef: RefObject<ScriptingEngine | null>;
|
|
8
|
+
vfs: ProfileVFS | null;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Returns the four edge strips of toolbars (top/bottom/left/right). The caller
|
|
12
|
+
* places each strip in the appropriate spot inside ContentLayout.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useButtonStrips({ connectionId, engineRef, vfs }: ButtonsLayerProps): {
|
|
15
|
+
top: import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
bottom: import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
left: import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
right: import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
floating: import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
};
|
|
21
|
+
export {};
|