@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,15 @@
|
|
|
1
|
+
/** True when the current selection touches any line inside `container`. */
|
|
2
|
+
export declare function hasSelectionIn(container: HTMLElement): boolean;
|
|
3
|
+
/** Select every line in the container (Range over its contents). */
|
|
4
|
+
export declare function selectAll(container: HTMLElement): void;
|
|
5
|
+
/** Copy the native selection text verbatim (character-precise). */
|
|
6
|
+
export declare function copySelectionText(): Promise<void>;
|
|
7
|
+
/**
|
|
8
|
+
* Copy the selected lines as a complete, self-contained HTML document. The full
|
|
9
|
+
* document source goes on the clipboard as both `text/html` (so rich targets
|
|
10
|
+
* paste it rendered) and `text/plain` (so plain targets paste the HTML markup
|
|
11
|
+
* itself), with a `writeText` fallback for browsers without ClipboardItem.
|
|
12
|
+
*/
|
|
13
|
+
export declare function copySelectionAsHtml(container: HTMLElement): Promise<void>;
|
|
14
|
+
/** Copy the selected lines to the clipboard as a PNG image. */
|
|
15
|
+
export declare function copySelectionAsImage(container: HTMLElement): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function installPinchZoomGuard(): void;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { OverlayLayerOrder } from '../layout/overlayLayerOrder';
|
|
2
|
+
export interface ScrollBoxCreateOptions {
|
|
3
|
+
/** Parent window id ('main' for the main viewport, or a userwindow / another
|
|
4
|
+
* scroll box name for nesting). */
|
|
5
|
+
parent?: string;
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
}
|
|
11
|
+
export interface ScrollBoxState {
|
|
12
|
+
name: string;
|
|
13
|
+
parent: string;
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
visible: boolean;
|
|
19
|
+
/** Raw Qt-style CSS string from a future setScrollBoxStyleSheet — stored for
|
|
20
|
+
* parity; Geyser.ScrollBox:setStyleSheet is itself unimplemented upstream. */
|
|
21
|
+
styleSheet?: string;
|
|
22
|
+
}
|
|
23
|
+
type Listener = (scrollBoxes: ScrollBoxState[]) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Registry for overlay scroll-box widgets (Mudlet createScrollBox). A scroll box
|
|
26
|
+
* is an absolutely-positioned, scrollable container on top of a parent viewport
|
|
27
|
+
* that other overlay widgets (labels, command lines, nested scroll boxes) can be
|
|
28
|
+
* created *inside* by passing the box's name as their parent — mirroring
|
|
29
|
+
* Mudlet's Geyser.ScrollBox, which treats the box as its own "window".
|
|
30
|
+
*
|
|
31
|
+
* Shares the per-parent subscriber shape of {@link CommandLineManager} /
|
|
32
|
+
* {@link LabelManager}; the React {@link ScrollBoxOverlay} renders each box and
|
|
33
|
+
* mounts the child overlays scoped to the box's name within its scroll area.
|
|
34
|
+
*/
|
|
35
|
+
export declare class ScrollBoxManager {
|
|
36
|
+
readonly overlayZ: OverlayLayerOrder;
|
|
37
|
+
private readonly boxes;
|
|
38
|
+
private readonly listeners;
|
|
39
|
+
constructor(overlayZ?: OverlayLayerOrder);
|
|
40
|
+
/** Mudlet createScrollBox([parent,] name, x, y, w, h) — false when a scroll
|
|
41
|
+
* box with that name already exists. */
|
|
42
|
+
create(name: string, opts: ScrollBoxCreateOptions): boolean;
|
|
43
|
+
has(name: string): boolean;
|
|
44
|
+
get(name: string): ScrollBoxState | undefined;
|
|
45
|
+
destroy(name: string): boolean;
|
|
46
|
+
move(name: string, x: number, y: number): boolean;
|
|
47
|
+
resize(name: string, width: number, height: number): boolean;
|
|
48
|
+
/** Mudlet setWindow — reparent a scroll box into another window's
|
|
49
|
+
* overlay. Both the old and the new parent's overlays re-render.
|
|
50
|
+
* Cycle prevention is the caller's job (ScriptingAPI.setWindow). */
|
|
51
|
+
setParent(name: string, parent: string): boolean;
|
|
52
|
+
show(name: string): boolean;
|
|
53
|
+
hide(name: string): boolean;
|
|
54
|
+
raise(name: string): boolean;
|
|
55
|
+
lower(name: string): boolean;
|
|
56
|
+
setStyleSheet(name: string, css: string): boolean;
|
|
57
|
+
list(parent: string): ScrollBoxState[];
|
|
58
|
+
subscribe(parent: string, fn: Listener): () => void;
|
|
59
|
+
clearAll(): void;
|
|
60
|
+
private notify;
|
|
61
|
+
}
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ScrollBoxManager } from './ScrollBoxManager';
|
|
2
|
+
import type { LabelManager } from '../labels/LabelManager';
|
|
3
|
+
import type { CommandLineManager } from '../cmdline/CommandLineManager';
|
|
4
|
+
import './ScrollBoxOverlay.css';
|
|
5
|
+
interface ScrollBoxOverlayProps {
|
|
6
|
+
manager: ScrollBoxManager;
|
|
7
|
+
labels: LabelManager;
|
|
8
|
+
cmdLines: CommandLineManager;
|
|
9
|
+
/** Viewport whose scroll boxes this overlay renders ('main', a userwindow
|
|
10
|
+
* id, or — when nested — another scroll box's name). */
|
|
11
|
+
parent: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Renders the {@link ScrollBoxManager}'s boxes for a given parent viewport as
|
|
15
|
+
* absolutely-positioned scrollable containers. Each box hosts the child overlays
|
|
16
|
+
* (labels, command lines, and nested scroll boxes) scoped to the box's own name,
|
|
17
|
+
* so widgets created with `parent = boxName` render inside it.
|
|
18
|
+
*
|
|
19
|
+
* Scrolling: the children are absolutely positioned and don't expand their
|
|
20
|
+
* containers on their own, so each box wraps them in a content div sized to the
|
|
21
|
+
* extent of its children (the furthest child edge). When that extent exceeds the
|
|
22
|
+
* box, the box's `overflow:auto` produces real scrollbars.
|
|
23
|
+
*/
|
|
24
|
+
export declare function ScrollBoxOverlay({ manager, labels, cmdLines, parent }: ScrollBoxOverlayProps): import("react/jsx-runtime").JSX.Element | null;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import type { MediaCaptionInfo } from './closedCaption';
|
|
2
|
+
type LoaderFn = (path: string) => Promise<ArrayBuffer | null>;
|
|
3
|
+
/** Which mute gate a playback belongs to. `api` = triggered by a Lua script
|
|
4
|
+
* (playSoundFile / playMusicFile); `game` = triggered by the server (MSP, and
|
|
5
|
+
* GMCP media). Mirrors Mudlet's muteMediaAPI / muteMediaGame split, where API
|
|
6
|
+
* media maps to MediaProtocolAPI and game media to MSP/GMCP. */
|
|
7
|
+
export type MediaOrigin = 'api' | 'game';
|
|
8
|
+
export interface PlaySoundOptions {
|
|
9
|
+
name: string;
|
|
10
|
+
/** 0..100 — Mudlet scale. Default 50. */
|
|
11
|
+
volume?: number;
|
|
12
|
+
/** Fade-in duration in milliseconds. */
|
|
13
|
+
fadein?: number;
|
|
14
|
+
/** Fade-out duration in milliseconds (on natural end or stop). */
|
|
15
|
+
fadeout?: number;
|
|
16
|
+
/** Start offset within the buffer, in milliseconds. */
|
|
17
|
+
start?: number;
|
|
18
|
+
/** Loop count. 1 = play once (default). -1 = infinite. N>1 = N total plays. */
|
|
19
|
+
loops?: number;
|
|
20
|
+
/** Dedupe key — calling again with same key replaces the previous one. */
|
|
21
|
+
key?: string;
|
|
22
|
+
/** Group tag — stopMusic({tag=...}) and stopSounds() filter on this. */
|
|
23
|
+
tag?: string;
|
|
24
|
+
/** Which mute gate governs this playback. Default 'api'. */
|
|
25
|
+
origin?: MediaOrigin;
|
|
26
|
+
/** Optional closed-caption text (Mudlet's media `caption`). Shown verbatim
|
|
27
|
+
* when closed captions are on; absent → a caption is synthesized from the
|
|
28
|
+
* kind + filename. */
|
|
29
|
+
caption?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface PlayMusicOptions extends PlaySoundOptions {
|
|
32
|
+
/** If true and a music track with the same name+key is already playing, do nothing. */
|
|
33
|
+
continue?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface StopMusicOptions {
|
|
36
|
+
name?: string;
|
|
37
|
+
key?: string;
|
|
38
|
+
tag?: string;
|
|
39
|
+
/** Fade-out duration in milliseconds. Overrides the source's own fadeout. */
|
|
40
|
+
fadeout?: number;
|
|
41
|
+
}
|
|
42
|
+
export declare class SoundManager {
|
|
43
|
+
private nextId;
|
|
44
|
+
private active;
|
|
45
|
+
private loader;
|
|
46
|
+
/** 0..1, applied as an extra multiplier on every source's gain. */
|
|
47
|
+
private masterVolume;
|
|
48
|
+
/**
|
|
49
|
+
* Persistent per-origin mute gates — Mudlet's muteMediaAPI / muteMediaGame.
|
|
50
|
+
* A muted origin's sources keep playing (their position advances) but their
|
|
51
|
+
* gain is pinned to 0, and new sources of that origin start silent; nothing
|
|
52
|
+
* is stopped, so unmuting restores audibility mid-track. This mirrors Mudlet
|
|
53
|
+
* toggling QAudioOutput::setMuted on the live players by protocol rather than
|
|
54
|
+
* tearing them down.
|
|
55
|
+
*/
|
|
56
|
+
private muted;
|
|
57
|
+
/**
|
|
58
|
+
* Raised when a tracked source ends — whether it played out naturally or
|
|
59
|
+
* was stopped. ScriptingEngine wires this to raise Mudlet's
|
|
60
|
+
* `sysMediaFinished(name, path)`. `stopAll()` nulls each source's onended
|
|
61
|
+
* before stopping, so engine teardown never fires it.
|
|
62
|
+
*/
|
|
63
|
+
onMediaFinished?: (name: string, path: string) => void;
|
|
64
|
+
/**
|
|
65
|
+
* Raised when a tracked source starts ('plays') or ends ('stops'), so the
|
|
66
|
+
* engine can print a closed caption (Mudlet's enableClosedCaption). Fires
|
|
67
|
+
* regardless of the caption setting — the consumer decides whether to show
|
|
68
|
+
* it. Not fired by `stopAll()` (teardown nulls each onended first).
|
|
69
|
+
*/
|
|
70
|
+
onMediaCaption?: (info: MediaCaptionInfo) => void;
|
|
71
|
+
setLoader(fn: LoaderFn | null): void;
|
|
72
|
+
setMasterVolume(value: number): void;
|
|
73
|
+
/**
|
|
74
|
+
* Mudlet `muteMediaAPI` / `muteMediaGame`. Sets the persistent mute gate for
|
|
75
|
+
* a playback origin. While muted, that origin's currently-playing sources are
|
|
76
|
+
* silenced in place (gain → 0, position keeps advancing) and any new ones
|
|
77
|
+
* start silent — but nothing is stopped, so unmuting restores audibility
|
|
78
|
+
* mid-track. `api` gates script playback (playSoundFile/playMusicFile);
|
|
79
|
+
* `game` gates server-driven media (MSP / GMCP).
|
|
80
|
+
*/
|
|
81
|
+
setOriginMuted(origin: MediaOrigin, muted: boolean): void;
|
|
82
|
+
isOriginMuted(origin: MediaOrigin): boolean;
|
|
83
|
+
/** Output gain for a source: its own volume scaled by the master volume,
|
|
84
|
+
* pinned to 0 while its origin is muted. */
|
|
85
|
+
private effectiveGain;
|
|
86
|
+
playSound(opts: PlaySoundOptions): Promise<number>;
|
|
87
|
+
playMusic(opts: PlayMusicOptions): Promise<number>;
|
|
88
|
+
stopSounds(): void;
|
|
89
|
+
/**
|
|
90
|
+
* Mudlet `pauseSounds([channel])`. Web Audio source nodes can be
|
|
91
|
+
* scheduled to start but not paused once playing — they're transient by
|
|
92
|
+
* design, with no equivalent of QMediaPlayer::pause(). We approximate
|
|
93
|
+
* Mudlet's contract by stopping the matching sources outright (so the
|
|
94
|
+
* mute happens immediately) and let the player retrigger them with
|
|
95
|
+
* `playSoundFile` to resume. The optional `channel` filters by the
|
|
96
|
+
* source's `tag` (matches Mudlet's "channel" semantics: a Tag string
|
|
97
|
+
* passed to playSoundFile). Music sources are untouched — they have a
|
|
98
|
+
* separate `stopMusic` codepath.
|
|
99
|
+
*/
|
|
100
|
+
pauseSounds(channel?: string): void;
|
|
101
|
+
/**
|
|
102
|
+
* Mudlet `pauseMusic([settings])`. Web Audio source nodes can't truly
|
|
103
|
+
* pause once started (same constraint as {@link pauseSounds}), so this is
|
|
104
|
+
* an immediate fade-out + stop of the matching music sources — re-trigger
|
|
105
|
+
* `playMusicFile` to "resume". The optional `channel`/tag filters which
|
|
106
|
+
* music tracks are affected; sound effects are untouched.
|
|
107
|
+
*/
|
|
108
|
+
pauseMusic(channel?: string): void;
|
|
109
|
+
stopMusic(opts?: StopMusicOptions): void;
|
|
110
|
+
/**
|
|
111
|
+
* Mudlet getPlayingSounds / getPlayingMusic. Returns the currently-playing
|
|
112
|
+
* sources of the requested `kind` (default 'sound' — music is reported
|
|
113
|
+
* separately by getPlayingMusic) optionally filtered by name/key/tag.
|
|
114
|
+
* Volume is reported on Mudlet's 0..100 scale.
|
|
115
|
+
*/
|
|
116
|
+
getPlaying(filter?: {
|
|
117
|
+
name?: string;
|
|
118
|
+
key?: string;
|
|
119
|
+
tag?: string;
|
|
120
|
+
}, kind?: 'sound' | 'music'): Array<{
|
|
121
|
+
name: string;
|
|
122
|
+
key?: string;
|
|
123
|
+
tag?: string;
|
|
124
|
+
volume: number;
|
|
125
|
+
}>;
|
|
126
|
+
/**
|
|
127
|
+
* Mudlet loadSoundFile. Preloads (decodes + caches) a sound so the first
|
|
128
|
+
* playSoundFile has no decode latency. Fire-and-forget: warms `decodeCache`
|
|
129
|
+
* via the same path playSound uses, so a later play of the same name hits
|
|
130
|
+
* the cache. Returns false when no AudioContext is available yet.
|
|
131
|
+
*/
|
|
132
|
+
preload(name: string): boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Mudlet `purgeMediaCache()` — drop every decoded-audio buffer so the next
|
|
135
|
+
* play of any file re-fetches and re-decodes it. Active playback is
|
|
136
|
+
* untouched (the cache only fronts the decode step). Always returns true.
|
|
137
|
+
*/
|
|
138
|
+
purgeCache(): boolean;
|
|
139
|
+
/** Stop everything this manager owns. Call on engine teardown. */
|
|
140
|
+
stopAll(): void;
|
|
141
|
+
destroy(): void;
|
|
142
|
+
private play;
|
|
143
|
+
private fadeAndStop;
|
|
144
|
+
private isMusicPlaying;
|
|
145
|
+
private stopMusicMatching;
|
|
146
|
+
private updateMediaSessionState;
|
|
147
|
+
private firstActiveMusicName;
|
|
148
|
+
}
|
|
149
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Closed captions for media (Mudlet's `enableClosedCaption`). When enabled,
|
|
3
|
+
* each sound / music / video that starts or stops prints a short text line into
|
|
4
|
+
* the main output so deaf / hard-of-hearing players know audio fired — and, via
|
|
5
|
+
* the normal output path, screen-reader users hear it announced.
|
|
6
|
+
*
|
|
7
|
+
* Faithful to Mudlet `TMedia::printClosedCaption` (TMedia.cpp:2084-2110):
|
|
8
|
+
* captions cover audio + video ONLY — there is no image media type, so images
|
|
9
|
+
* are never captioned. This module holds the pure formatter; the SoundManager /
|
|
10
|
+
* VideoManager raise the lifecycle events and ScriptingEngine prints the line.
|
|
11
|
+
*/
|
|
12
|
+
/** Media families Mudlet captions. Notably no `image` — images never flow
|
|
13
|
+
* through the media player and so are never captioned. */
|
|
14
|
+
export type MediaKind = 'sound' | 'music' | 'video';
|
|
15
|
+
/** The player-lifecycle verb shown in the caption. Mudlet also has pauses/fades,
|
|
16
|
+
* but mudix's Web Audio model collapses those into a stop, so we expose the two
|
|
17
|
+
* transitions that map cleanly. */
|
|
18
|
+
export type CaptionAction = 'plays' | 'stops';
|
|
19
|
+
export interface MediaCaptionInfo {
|
|
20
|
+
kind: MediaKind;
|
|
21
|
+
/** The path or name handed to the player; the trailing segment is shown. */
|
|
22
|
+
name: string;
|
|
23
|
+
/** Media key, when one was supplied. */
|
|
24
|
+
key?: string;
|
|
25
|
+
/** Explicit caption from the media packet / Lua `caption` arg, if any. */
|
|
26
|
+
caption?: string;
|
|
27
|
+
action: CaptionAction;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Format one caption line, mirroring Mudlet's text exactly:
|
|
31
|
+
* - with an explicit caption: `[<caption> <action>]`
|
|
32
|
+
* - else, with a key: `[<kind> <key> "<file>" <action>]`
|
|
33
|
+
* - else: `[<kind> "<file>" <action>]`
|
|
34
|
+
* `<file>` is the trailing path segment of `name` (Mudlet shows the bare
|
|
35
|
+
* filename, not the resolved path).
|
|
36
|
+
*/
|
|
37
|
+
export declare function formatClosedCaption(info: MediaCaptionInfo): string;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registry for Mudlet `createTextEdit` widgets — a multi-line text editor pane.
|
|
3
|
+
*
|
|
4
|
+
* This is the data model behind the `*TextEdit*` Lua API (text content, the
|
|
5
|
+
* editor properties scripts set, and geometry/visibility). The on-screen
|
|
6
|
+
* QPlainTextEdit-equivalent rendering is not wired yet; scripts can create
|
|
7
|
+
* editors and round-trip their text/properties, which is what the Mudlet API
|
|
8
|
+
* surface (and the busted TextEdit spec) exercises.
|
|
9
|
+
*/
|
|
10
|
+
export interface TextEditState {
|
|
11
|
+
parent: string;
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
text: string;
|
|
17
|
+
readOnly: boolean;
|
|
18
|
+
placeholder: string;
|
|
19
|
+
styleSheet: string;
|
|
20
|
+
font: string;
|
|
21
|
+
fontSize: number;
|
|
22
|
+
tabMovesFocus: boolean;
|
|
23
|
+
visible: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare class TextEditManager {
|
|
26
|
+
private edits;
|
|
27
|
+
has(name: string): boolean;
|
|
28
|
+
/** Read-only handle on a text edit's stored state, for the geometry and
|
|
29
|
+
* visibility getters (getWindowGeometry, windowVisible). */
|
|
30
|
+
get(name: string): Readonly<TextEditState> | undefined;
|
|
31
|
+
/** Create (or replace) a text edit. Returns true (Mudlet always succeeds). */
|
|
32
|
+
create(name: string, opts: {
|
|
33
|
+
parent: string;
|
|
34
|
+
x: number;
|
|
35
|
+
y: number;
|
|
36
|
+
width: number;
|
|
37
|
+
height: number;
|
|
38
|
+
}): boolean;
|
|
39
|
+
destroy(name: string): boolean;
|
|
40
|
+
/** Returns the editor's text, or null when no editor of that name exists. */
|
|
41
|
+
getText(name: string): string | null;
|
|
42
|
+
setText(name: string, text: string): boolean;
|
|
43
|
+
clear(name: string): boolean;
|
|
44
|
+
setReadOnly(name: string, value: boolean): boolean;
|
|
45
|
+
setPlaceholder(name: string, text: string): boolean;
|
|
46
|
+
setStyleSheet(name: string, css: string): boolean;
|
|
47
|
+
setFont(name: string, font: string): boolean;
|
|
48
|
+
setFontSize(name: string, size: number): boolean;
|
|
49
|
+
setTabMovesFocus(name: string, value: boolean): boolean;
|
|
50
|
+
show(name: string): boolean;
|
|
51
|
+
hide(name: string): boolean;
|
|
52
|
+
move(name: string, x: number, y: number): boolean;
|
|
53
|
+
/** Mudlet setWindow — reparent a text edit into another window. */
|
|
54
|
+
setParent(name: string, parent: string): boolean;
|
|
55
|
+
resize(name: string, width: number, height: number): boolean;
|
|
56
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export type TtsState = 'ttsSpeechReady' | 'ttsSpeechStarted' | 'ttsSpeechPaused' | 'ttsSpeechError' | 'ttsUnknownState';
|
|
2
|
+
type EmitFn = (event: string, args: unknown[]) => void;
|
|
3
|
+
export declare class TtsManager {
|
|
4
|
+
private readonly emit;
|
|
5
|
+
private readonly synth;
|
|
6
|
+
private pending;
|
|
7
|
+
private current;
|
|
8
|
+
private state;
|
|
9
|
+
private rate;
|
|
10
|
+
private pitch;
|
|
11
|
+
private volume;
|
|
12
|
+
private voiceName;
|
|
13
|
+
private gen;
|
|
14
|
+
private destroyed;
|
|
15
|
+
private readonly onVoicesChanged;
|
|
16
|
+
constructor(emit: EmitFn);
|
|
17
|
+
/** Mudlet ttsSpeak — speak `text` immediately, interrupting anything in
|
|
18
|
+
* progress. The queue is untouched and resumes once `text` finishes. */
|
|
19
|
+
speak(text: string): void;
|
|
20
|
+
/** Mudlet ttsQueue — append `text` to the queue (or insert at 1-based
|
|
21
|
+
* `index`). Starts playback if nothing is currently speaking. */
|
|
22
|
+
queue(text: string, index?: number): void;
|
|
23
|
+
/** Mudlet ttsSkip — stop the current utterance and move on to the next
|
|
24
|
+
* queued one (if any). */
|
|
25
|
+
skip(): void;
|
|
26
|
+
/** Mudlet ttsPause — pause the current utterance. */
|
|
27
|
+
pause(): void;
|
|
28
|
+
/** Mudlet ttsResume — resume a paused utterance. */
|
|
29
|
+
resume(): void;
|
|
30
|
+
/** Mudlet ttsClearQueue — drop the whole pending queue, or just the item at
|
|
31
|
+
* 1-based `index`. Returns false when `index` is out of bounds (the
|
|
32
|
+
* currently-speaking utterance is never in the queue and is unaffected). */
|
|
33
|
+
clearQueue(index?: number): boolean;
|
|
34
|
+
/** Mudlet ttsGetQueue — the pending texts (1-based index returns one item,
|
|
35
|
+
* or false if out of bounds; no index returns the whole list). */
|
|
36
|
+
getQueue(): string[];
|
|
37
|
+
getQueue(index: number): string | false;
|
|
38
|
+
/** Mudlet ttsGetState — one of the tts* state strings. */
|
|
39
|
+
getState(): TtsState;
|
|
40
|
+
/** Mudlet ttsGetCurrentLine — the text being spoken, or null when idle
|
|
41
|
+
* (Ready) / errored. The Lua wrapper maps null to (nil, reason). */
|
|
42
|
+
getCurrentLine(): string | null;
|
|
43
|
+
/** Mudlet ttsGetVoices — the available voice names. */
|
|
44
|
+
getVoices(): string[];
|
|
45
|
+
/** Mudlet ttsGetCurrentVoice — the selected voice name, falling back to the
|
|
46
|
+
* engine's first available voice when none was set. */
|
|
47
|
+
getCurrentVoice(): string;
|
|
48
|
+
getRate(): number;
|
|
49
|
+
getPitch(): number;
|
|
50
|
+
getVolume(): number;
|
|
51
|
+
/** Mudlet ttsSetRate — clamps to -1..1, stores it, raises ttsRateChanged. */
|
|
52
|
+
setRate(rate: number): void;
|
|
53
|
+
/** Mudlet ttsSetPitch — clamps to -1..1, stores it, raises ttsPitchChanged. */
|
|
54
|
+
setPitch(pitch: number): void;
|
|
55
|
+
/** Mudlet ttsSetVolume — clamps to 0..1, stores it, raises ttsVolumeChanged. */
|
|
56
|
+
setVolume(volume: number): void;
|
|
57
|
+
/** Mudlet ttsSetVoiceByName — selects a voice by name. Returns false when no
|
|
58
|
+
* voice matches; otherwise stores it and raises ttsVoiceChanged. */
|
|
59
|
+
setVoiceByName(name: string): boolean;
|
|
60
|
+
/** Mudlet ttsSetVoiceByIndex — selects a voice by 1-based index. Returns
|
|
61
|
+
* false when out of bounds. */
|
|
62
|
+
setVoiceByIndex(index: number): boolean;
|
|
63
|
+
destroy(): void;
|
|
64
|
+
private advance;
|
|
65
|
+
private beginUtterance;
|
|
66
|
+
private setState;
|
|
67
|
+
}
|
|
68
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { LandingProps } from '../branding';
|
|
2
|
+
export interface UseBrandLoginResult {
|
|
3
|
+
account: string;
|
|
4
|
+
setAccount: (value: string) => void;
|
|
5
|
+
password: string;
|
|
6
|
+
setPassword: (value: string) => void;
|
|
7
|
+
/** Find-or-create the profile, stash credentials in memory, and open it.
|
|
8
|
+
* `connect` dials immediately; false opens offline. */
|
|
9
|
+
enter: (connect: boolean) => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Shared login-form state for custom branded landings. Handles the
|
|
13
|
+
* find-or-create-profile + in-memory-credential-stash + open sequence common
|
|
14
|
+
* to every branded login screen, and prefills from the last credentials
|
|
15
|
+
* entered this page (e.g. after backing out of a profile) — nothing is ever
|
|
16
|
+
* read from or written to storage. Bring your own markup; for a ready-made
|
|
17
|
+
* form see `BrandLoginFields`.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useBrandLogin({ openProfile, ensureBrandProfile }: Pick<LandingProps, 'openProfile' | 'ensureBrandProfile'>): UseBrandLoginResult;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Reactive MRU command history wrapper around localStorage. History is scoped
|
|
2
|
+
* to `connectionId` so each profile keeps its own. `saveSize` caps how many
|
|
3
|
+
* entries are persisted (Mudlet's `commandLineHistorySaveSize`). */
|
|
4
|
+
export declare function useCommandHistory(connectionId: string | null, saveSize?: number): {
|
|
5
|
+
history: string[];
|
|
6
|
+
add: (item: string) => void;
|
|
7
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { MediaCaptionInfo } from '../sound/closedCaption';
|
|
2
|
+
type LoaderFn = (path: string) => Promise<ArrayBuffer | null>;
|
|
3
|
+
export interface PlayVideoOptions {
|
|
4
|
+
name: string;
|
|
5
|
+
/** 0..100 — Mudlet scale. Default 50. */
|
|
6
|
+
volume?: number;
|
|
7
|
+
/** Loop count. 1 = play once (default). -1 = infinite. */
|
|
8
|
+
loops?: number;
|
|
9
|
+
/** CSS units; default fills the viewport. */
|
|
10
|
+
width?: string;
|
|
11
|
+
height?: string;
|
|
12
|
+
/** Optional closed-caption text (Mudlet's media `caption`). */
|
|
13
|
+
caption?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare class VideoManager {
|
|
16
|
+
private loader;
|
|
17
|
+
/** Returns the DOM element that videos should be attached to. Set by
|
|
18
|
+
* WindowManager.observeMain so videos drop onto the main viewport. */
|
|
19
|
+
private getMount;
|
|
20
|
+
private active;
|
|
21
|
+
/** Buffers fetched ahead of play via loadVideoFile, keyed by VFS path. */
|
|
22
|
+
private prefetched;
|
|
23
|
+
/** Fires when a video ends naturally or is stopped — mirrors Mudlet's
|
|
24
|
+
* sysMediaFinished. */
|
|
25
|
+
onEnded: ((name: string, path: string) => void) | null;
|
|
26
|
+
/** Raised when a video starts ('plays') or finishes ('stops') so the engine
|
|
27
|
+
* can print a closed caption (Mudlet's enableClosedCaption). */
|
|
28
|
+
onMediaCaption: ((info: MediaCaptionInfo) => void) | null;
|
|
29
|
+
setLoader(fn: LoaderFn | null): void;
|
|
30
|
+
setMountPoint(fn: (() => HTMLElement | null) | null): void;
|
|
31
|
+
/**
|
|
32
|
+
* Mudlet `loadVideoFile`. Preloads (fetches + caches) a VFS-backed video so
|
|
33
|
+
* the first playVideoFile has no fetch latency. http(s)/data/blob URLs need
|
|
34
|
+
* no preloading (the element fetches them directly) and report success.
|
|
35
|
+
* Returns false when no loader is wired or the fetch fails.
|
|
36
|
+
*/
|
|
37
|
+
preload(path: string): Promise<boolean>;
|
|
38
|
+
play(path: string, opts: PlayVideoOptions): Promise<boolean>;
|
|
39
|
+
pauseAll(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Mudlet `getPlayingVideos([settings])` / `getPausedVideos([settings])`.
|
|
42
|
+
* Lists the videos currently in the requested play state, optionally
|
|
43
|
+
* filtered by name. Volume is reported on Mudlet's 0..100 scale.
|
|
44
|
+
*/
|
|
45
|
+
getByState(wantPaused: boolean, filter?: {
|
|
46
|
+
name?: string;
|
|
47
|
+
}): Array<{
|
|
48
|
+
name: string;
|
|
49
|
+
path: string;
|
|
50
|
+
volume: number;
|
|
51
|
+
}>;
|
|
52
|
+
stopAll(): void;
|
|
53
|
+
private stopByName;
|
|
54
|
+
destroy(): void;
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { MudSession } from '../../mud/MudSession';
|
|
2
|
+
import type { ProfileVFS } from '../../scripting/vfs/ProfileVFS';
|
|
3
|
+
import type { ScriptingEngine } from '../../scripting/ScriptingEngine';
|
|
4
|
+
interface Props {
|
|
5
|
+
connectionId: string;
|
|
6
|
+
session: MudSession;
|
|
7
|
+
vfs: ProfileVFS | null;
|
|
8
|
+
scriptingEngineRef?: React.RefObject<ScriptingEngine | null>;
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
onOpenVfsFile?: (path: string, line?: number) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function ScriptEditorModal({ connectionId, session, vfs, scriptingEngineRef, onClose, onOpenVfsFile }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|