@mudlet/mudlet-web 0.5.0 → 1.0.1
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/README.md +1 -1
- package/dist-lib/analytics.d.ts +27 -0
- package/dist-lib/assets/fonts/Vera.woff2 +0 -0
- package/dist-lib/assets/fonts/VeraBI.woff2 +0 -0
- package/dist-lib/assets/fonts/VeraBd.woff2 +0 -0
- package/dist-lib/assets/fonts/VeraIt.woff2 +0 -0
- package/dist-lib/assets/mapParser.worker-DrVZ3wg_.js +9 -0
- package/dist-lib/backupImport-wt8r7JXI.js +233 -0
- package/dist-lib/branding.d.ts +111 -13
- package/dist-lib/db/sqliteClient.d.ts +195 -7
- package/dist-lib/hooks/useAutoReconnect.d.ts +61 -0
- package/dist-lib/hooks/useDocumentFullscreen.d.ts +23 -0
- package/dist-lib/hooks/useKeyboardShortcuts.d.ts +37 -0
- package/dist-lib/hooks/useRecordLastPlayed.d.ts +10 -0
- package/dist-lib/import/applyMudletProfile.d.ts +35 -9
- package/dist-lib/import/backupImport.d.ts +118 -0
- package/dist-lib/import/collectProfileExport.d.ts +33 -2
- package/dist-lib/import/defaultPackages.d.ts +57 -14
- package/dist-lib/import/defaults/CF-loader/CF-loader.mpackage +0 -0
- package/dist-lib/import/defaults/MedBootstrap/MedBootstrap.mpackage +0 -0
- package/dist-lib/import/defaults/deleteOldProfiles/deleteOldProfiles.mpackage +0 -0
- package/dist-lib/import/defaults/echo/echo.mpackage +0 -0
- package/dist-lib/import/defaults/enable-accessibility/enable-accessibility.mpackage +0 -0
- package/dist-lib/import/defaults/generic_mapper/generic_mapper.mpackage +0 -0
- package/dist-lib/import/defaults/gui-drop/gui-drop.mpackage +0 -0
- package/dist-lib/import/defaults/icesus-loader/icesus-loader.mpackage +0 -0
- package/dist-lib/import/defaults/mg-loader/mg-loader.mpackage +0 -0
- package/dist-lib/import/defaults/mudlet-base-ui/mudlet-base-ui.mpackage +0 -0
- package/dist-lib/import/defaults/mudlet-mapper.xml +1215 -389
- package/dist-lib/import/mudletControlChars.d.ts +14 -0
- package/dist-lib/import/mudletHost.d.ts +73 -10
- package/dist-lib/import/mudletLink.d.ts +53 -2
- package/dist-lib/import/mudletProfileExport.d.ts +38 -5
- package/dist-lib/import/mudletProfileImport.d.ts +110 -12
- package/dist-lib/import/mudletVariables.d.ts +4 -3
- package/dist-lib/import/mudletWriteback.d.ts +15 -1
- package/dist-lib/import/mudletXmlImport.d.ts +46 -0
- package/dist-lib/import/packageFonts.d.ts +33 -0
- package/dist-lib/import/packageInstaller.d.ts +111 -7
- package/dist-lib/import/qtProfileData.d.ts +10 -0
- package/dist-lib/import/remotePackageInstall.d.ts +23 -7
- package/dist-lib/import/zipEntries.d.ts +45 -0
- package/dist-lib/index.d.ts +7 -3
- package/dist-lib/index.js +50508 -29836
- package/dist-lib/logging/SessionLogger.d.ts +75 -15
- package/dist-lib/map/MapSelectionOverlay.d.ts +2 -2
- package/dist-lib/map/MapStore.d.ts +387 -60
- package/dist-lib/map/MudletHighlightOverlay.d.ts +2 -2
- package/dist-lib/map/{MudixMapReader.d.ts → MudletMapReader.d.ts} +2 -2
- package/dist-lib/map/areaGraph.d.ts +120 -0
- package/dist-lib/map/environmentKit.d.ts +36 -0
- package/dist-lib/map/labelPixmap.d.ts +90 -0
- package/dist-lib/map/mapImageExport.d.ts +36 -2
- package/dist-lib/map/mapStyle.d.ts +11 -0
- package/dist-lib/map/mapVersion.d.ts +66 -0
- package/dist-lib/map/pathfinding.d.ts +2 -2
- package/dist-lib/mud/CharLoginController.d.ts +230 -0
- package/dist-lib/mud/ItemIdSequence.d.ts +1 -1
- package/dist-lib/mud/MudSession.d.ts +279 -22
- package/dist-lib/mud/PatternEngine.d.ts +153 -14
- package/dist-lib/mud/aliases/AliasEngine.d.ts +55 -9
- package/dist-lib/mud/autoLogin.d.ts +59 -0
- package/dist-lib/mud/commandSplit.d.ts +9 -0
- package/dist-lib/mud/connection/LineAssembler.d.ts +38 -11
- package/dist-lib/mud/connection/MudClient.d.ts +291 -53
- package/dist-lib/mud/connection/SubnegotiationRepair.d.ts +24 -0
- package/dist-lib/mud/connection/TelnetNegotiator.d.ts +208 -68
- package/dist-lib/mud/connection/telnetDebug.d.ts +8 -8
- package/dist-lib/mud/events.d.ts +102 -23
- package/dist-lib/mud/games/bundledGames.d.ts +12 -7
- package/dist-lib/mud/games/gameLinks.d.ts +40 -0
- package/dist-lib/mud/games/icons/3Kingdoms.png +0 -0
- package/dist-lib/mud/games/icons/3Scapes.png +0 -0
- package/dist-lib/mud/games/icons/achaea.png +0 -0
- package/dist-lib/mud/games/icons/aetolia.png +0 -0
- package/dist-lib/mud/games/icons/banner_astaria.png +0 -0
- package/dist-lib/mud/games/icons/banner_darkmists.png +0 -0
- package/dist-lib/mud/games/icons/banner_dreamland.png +0 -0
- package/dist-lib/mud/games/icons/banner_petria.jpg +0 -0
- package/dist-lib/mud/games/icons/banner_ropmud.png +0 -0
- package/dist-lib/mud/games/icons/blackmud.png +0 -0
- package/dist-lib/mud/games/icons/carrionfields.png +0 -0
- package/dist-lib/mud/games/icons/dragonfire_icon.png +0 -0
- package/dist-lib/mud/games/icons/fed2-logo.png +0 -0
- package/dist-lib/mud/games/icons/icesus_480x120.png +0 -0
- package/dist-lib/mud/games/icons/imperian.png +0 -0
- package/dist-lib/mud/games/icons/infinity_480x120.png +0 -0
- package/dist-lib/mud/games/icons/lusternia.png +0 -0
- package/dist-lib/mud/games/icons/morgengrauen_480x120.png +0 -0
- package/dist-lib/mud/games/icons/mudlet-tutorial.png +0 -0
- package/dist-lib/mud/games/icons/phoenixmud_480x120.png +0 -0
- package/dist-lib/mud/games/icons/starmourn.png +0 -0
- package/dist-lib/mud/games/icons/voidmud_icon.png +0 -0
- package/dist-lib/mud/games/icons/wotmudicon.png +0 -0
- package/dist-lib/mud/games/websiteLinks.d.ts +21 -0
- package/dist-lib/mud/keybindings/KeyEngine.d.ts +110 -4
- package/dist-lib/mud/keybindings/browserReservedKeys.d.ts +2 -2
- package/dist-lib/mud/keybindings/keyEventTarget.d.ts +61 -0
- package/dist-lib/mud/keybindings/qtKeys.d.ts +91 -12
- package/dist-lib/mud/protocol/atcp.d.ts +19 -0
- package/dist-lib/mud/protocol/byteString.d.ts +24 -0
- package/dist-lib/mud/protocol/charLoginFlow.d.ts +243 -16
- package/dist-lib/mud/protocol/charset.d.ts +111 -46
- package/dist-lib/mud/protocol/codePages.d.ts +10 -0
- package/dist-lib/mud/protocol/constants.d.ts +17 -10
- package/dist-lib/mud/protocol/echo.d.ts +23 -27
- package/dist-lib/mud/protocol/gmcp.d.ts +36 -6
- package/dist-lib/mud/protocol/index.d.ts +3 -2
- package/dist-lib/mud/protocol/luaLiteral.d.ts +12 -0
- package/dist-lib/mud/protocol/mccp.d.ts +83 -1
- package/dist-lib/mud/protocol/mnes.d.ts +41 -58
- package/dist-lib/mud/protocol/msdp.d.ts +11 -4
- package/dist-lib/mud/protocol/msp.d.ts +3 -2
- package/dist-lib/mud/protocol/mssp.d.ts +9 -4
- package/dist-lib/mud/protocol/multiByte.d.ts +51 -0
- package/dist-lib/mud/protocol/multiByteEncode.d.ts +42 -0
- package/dist-lib/mud/protocol/mxp.d.ts +193 -14
- package/dist-lib/mud/protocol/oauthClientFlow.d.ts +128 -0
- package/dist-lib/mud/protocol/qtCodePages.generated.d.ts +1 -0
- package/dist-lib/mud/protocol/tlsCodes.d.ts +40 -3
- package/dist-lib/mud/replay/ReplayPlayer.d.ts +16 -1
- package/dist-lib/mud/replay/replayFormat.d.ts +29 -2
- package/dist-lib/mud/text/Console.d.ts +255 -49
- package/dist-lib/mud/text/FormatState.d.ts +137 -14
- package/dist-lib/mud/text/ansiEscapes.d.ts +32 -16
- package/dist-lib/mud/text/colorParsers.d.ts +14 -2
- package/dist-lib/mud/text/colorSpaceId.d.ts +2 -0
- package/dist-lib/mud/text/colors.d.ts +17 -10
- package/dist-lib/mud/text/controlCharacterMode.d.ts +1 -1
- package/dist-lib/mud/text/hyperlinkVisibility.d.ts +1 -1
- package/dist-lib/mud/text/lineBreak.d.ts +5 -0
- package/dist-lib/mud/text/serverWrap.d.ts +2 -2
- package/dist-lib/mud/text/textAnalyzer.d.ts +79 -0
- package/dist-lib/mud/text/unicodeRuns.d.ts +11 -0
- package/dist-lib/mud/text/unicodeTables.generated.d.ts +3 -0
- package/dist-lib/mud/text/wcwidth.d.ts +27 -22
- package/dist-lib/mud/timers/TimerEngine.d.ts +163 -11
- package/dist-lib/mud/timers/workerClock.d.ts +67 -0
- package/dist-lib/mud/triggers/TriggerEngine.d.ts +449 -47
- package/dist-lib/mud/triggers/legacyColorPatterns.d.ts +58 -0
- package/dist-lib/mud/triggers/pcre/Pcre2.d.ts +83 -1
- package/dist-lib/oauth-callback.html +94 -0
- package/dist-lib/pcre2Wasm.d.ts +54 -0
- package/dist-lib/pcre2Wasm.js +241 -0
- package/dist-lib/scripting/EngineHost.d.ts +45 -21
- package/dist-lib/scripting/IScriptingRuntime.d.ts +103 -27
- package/dist-lib/scripting/MxpFrameManager.d.ts +10 -1
- package/dist-lib/scripting/ScriptingAPI.d.ts +1030 -213
- package/dist-lib/scripting/ScriptingEngine.d.ts +727 -106
- package/dist-lib/scripting/StopwatchManager.d.ts +97 -36
- package/dist-lib/scripting/http/HttpService.d.ts +9 -1
- package/dist-lib/scripting/http/userUrl.d.ts +41 -0
- package/dist-lib/scripting/lua/LuaRuntime.d.ts +352 -77
- package/dist-lib/scripting/lua/argContracts.d.ts +71 -0
- package/dist-lib/scripting/lua/bindings/automation.d.ts +1 -1
- package/dist-lib/scripting/lua/bindings/commands.d.ts +13 -0
- package/dist-lib/scripting/lua/bindings/context.d.ts +20 -2
- package/dist-lib/scripting/lua/bindings/diagnostics.d.ts +1 -1
- package/dist-lib/scripting/lua/bindings/map.d.ts +1 -1
- package/dist-lib/scripting/lua/bindings/media.d.ts +2 -2
- package/dist-lib/scripting/lua/bindings/output.d.ts +1 -1
- package/dist-lib/scripting/lua/bindings/session.d.ts +2 -2
- package/dist-lib/scripting/lua/bindings/textEdit.d.ts +1 -1
- package/dist-lib/scripting/lua/bindings/userWindows.d.ts +1 -1
- package/dist-lib/scripting/lua/byteArmor.d.ts +36 -0
- package/dist-lib/scripting/lua/imageSize.d.ts +7 -0
- package/dist-lib/scripting/lua/rex.d.ts +4 -2
- package/dist-lib/scripting/lua/sqlRowEncoder.d.ts +6 -1
- package/dist-lib/scripting/lua/utf8CaseMap.d.ts +1 -0
- package/dist-lib/scripting/lua/utf8Patterns.d.ts +21 -1
- package/dist-lib/scripting/lua/wellFormedStrings.d.ts +40 -0
- package/dist-lib/scripting/lua/yajl.d.ts +43 -5
- package/dist-lib/scripting/profilesPresence.d.ts +20 -2
- package/dist-lib/scripting/vfs/ProfileVFS.d.ts +164 -10
- package/dist-lib/scripting/vfs/fsErrors.d.ts +28 -0
- package/dist-lib/scripting/vfs/idbCommit.d.ts +20 -0
- package/dist-lib/storage/appStore.d.ts +24 -9
- package/dist-lib/storage/hooks.d.ts +5 -1
- package/dist-lib/storage/index.d.ts +2 -2
- package/dist-lib/storage/mapStorage.d.ts +2 -0
- package/dist-lib/storage/persistentStorage.d.ts +3 -1
- package/dist-lib/storage/profileStorage.d.ts +15 -0
- package/dist-lib/storage/profileVfsData.d.ts +3 -3
- package/dist-lib/storage/schema.d.ts +512 -40
- package/dist-lib/storage/storageMigration.d.ts +82 -0
- package/dist-lib/storage-g5V1b-c1.js +2039 -0
- package/dist-lib/styles.css +1 -1
- package/dist-lib/ui/AboutModal.d.ts +1 -1
- package/dist-lib/ui/BrandLoginFields.d.ts +1 -1
- package/dist-lib/ui/BrowserSignInModal.d.ts +23 -0
- package/dist-lib/ui/CmdLineMenuRegistry.d.ts +14 -5
- package/dist-lib/ui/CommandBar.d.ts +8 -8
- package/dist-lib/ui/ConnectionFormModal.d.ts +20 -1
- package/dist-lib/ui/ConnectionScreen.d.ts +9 -1
- package/dist-lib/ui/GameLinkPrompt.d.ts +28 -0
- package/dist-lib/ui/HelpModal.d.ts +5 -1
- package/dist-lib/ui/MapSymbolUsageModal.d.ts +32 -0
- package/dist-lib/ui/MouseEventRegistry.d.ts +31 -4
- package/dist-lib/ui/NotepadModal.d.ts +22 -0
- package/dist-lib/ui/ResizableModal.d.ts +16 -1
- package/dist-lib/ui/SettingsModal.d.ts +10 -1
- package/dist-lib/ui/TlsAlertBanner.d.ts +3 -1
- package/dist-lib/ui/Toolbar.d.ts +22 -1
- package/dist-lib/ui/VaultManageButton.d.ts +10 -5
- package/dist-lib/ui/VaultModal.d.ts +3 -0
- package/dist-lib/ui/buttons/ButtonsBar.d.ts +3 -1
- package/dist-lib/ui/buttons/inactiveButtons.d.ts +25 -0
- package/dist-lib/ui/cmdline/CommandLineManager.d.ts +19 -0
- package/dist-lib/ui/cmdline/plainText.d.ts +16 -0
- package/dist-lib/ui/cmdline/subCommandLine.d.ts +78 -0
- package/dist-lib/ui/cmdline/useCmdLineSelection.d.ts +26 -0
- package/dist-lib/ui/cmdline/useSubCommandLineKeys.d.ts +33 -0
- package/dist-lib/ui/codemirror/lineParagraphMarks.d.ts +19 -0
- package/dist-lib/ui/codemirror/luaHover.d.ts +7 -0
- package/dist-lib/ui/codemirror/options.d.ts +33 -0
- package/dist-lib/ui/codemirror/theme.d.ts +29 -5
- package/dist-lib/ui/commands/addonCommands.d.ts +134 -0
- package/dist-lib/ui/commands/appShortcuts.d.ts +86 -0
- package/dist-lib/ui/commands/hostCommands.d.ts +88 -0
- package/dist-lib/ui/commands/keyMatch.d.ts +20 -0
- package/dist-lib/ui/commands/keySequence.d.ts +57 -0
- package/dist-lib/ui/components/ContextMenu.d.ts +21 -1
- package/dist-lib/ui/components/FontPicker.d.ts +5 -1
- package/dist-lib/ui/components/useModalFocus.d.ts +13 -1
- package/dist-lib/ui/helpTopics.d.ts +15 -0
- package/dist-lib/ui/labels/LabelManager.d.ts +172 -9
- package/dist-lib/ui/labels/LabelOverlay.d.ts +19 -0
- package/dist-lib/ui/labels/backgroundImageSize.d.ts +19 -0
- package/dist-lib/ui/labels/labelModel.d.ts +64 -0
- package/dist-lib/ui/labels/qColor.d.ts +13 -0
- package/dist-lib/ui/labels/qtCss.d.ts +12 -4
- package/dist-lib/ui/landmarks.d.ts +9 -0
- package/dist-lib/ui/launcher/ActionMenu.d.ts +19 -0
- package/dist-lib/ui/launcher/GameDetails.d.ts +21 -0
- package/dist-lib/ui/launcher/GameSection.d.ts +18 -0
- package/dist-lib/ui/launcher/LauncherSearch.d.ts +23 -0
- package/dist-lib/ui/launcher/ProfileArt.d.ts +20 -0
- package/dist-lib/ui/launcher/ProfileSection.d.ts +43 -0
- package/dist-lib/ui/launcher/launcherModel.d.ts +72 -0
- package/dist-lib/ui/layout/overlayLayerOrder.d.ts +2 -2
- package/dist-lib/ui/menu/MenuBar.d.ts +31 -0
- package/dist-lib/ui/menu/SplitButton.d.ts +39 -0
- package/dist-lib/ui/menu/anchoredPopup.d.ts +74 -0
- package/dist-lib/ui/menu/appMenus.d.ts +65 -0
- package/dist-lib/ui/menu/menuModel.d.ts +88 -0
- package/dist-lib/ui/menu/toolbarModel.d.ts +56 -0
- package/dist-lib/ui/notepad.d.ts +76 -0
- package/dist-lib/ui/openSignInPage.d.ts +14 -0
- package/dist-lib/ui/output/OutputContextMenu.d.ts +14 -1
- package/dist-lib/ui/output/OutputRenderer.d.ts +5 -0
- package/dist-lib/ui/output/OutputSearchBar.d.ts +5 -1
- package/dist-lib/ui/output/StickyOutputPanel.d.ts +17 -3
- package/dist-lib/ui/output/TextAnalyzerModal.d.ts +25 -0
- package/dist-lib/ui/output/caretMode.d.ts +3 -2
- package/dist-lib/ui/output/clearSplit.d.ts +11 -0
- package/dist-lib/ui/output/outputCopy.d.ts +41 -2
- package/dist-lib/ui/output/outputRows.d.ts +43 -0
- package/dist-lib/ui/output/selectionGesture.d.ts +35 -0
- package/dist-lib/ui/output/wordSelection.d.ts +33 -0
- package/dist-lib/ui/search/matcher.d.ts +14 -4
- package/dist-lib/ui/settings/SettingsShell.d.ts +91 -0
- package/dist-lib/ui/settings/ShortcutEditor.d.ts +13 -0
- package/dist-lib/ui/sound/SoundManager.d.ts +210 -44
- package/dist-lib/ui/sound/closedCaption.d.ts +4 -1
- package/dist-lib/ui/sound/mediaDirection.d.ts +35 -0
- package/dist-lib/ui/tabCompletion.d.ts +53 -0
- package/dist-lib/ui/textedit/TextEditManager.d.ts +11 -2
- package/dist-lib/ui/useOpenProfiles.d.ts +1 -1
- package/dist-lib/ui/video/VideoManager.d.ts +7 -0
- package/dist-lib/ui/windows/WindowManager.d.ts +452 -37
- package/dist-lib/ui/windows/panels/ScriptEditorPanel.d.ts +14 -0
- package/dist-lib/ui/windows/panels/ScriptSearch.d.ts +6 -1
- package/dist-lib/ui/windows/panels/TextPanel.d.ts +4 -1
- package/dist-lib/ui/windows/panels/VariablesView.d.ts +37 -7
- package/dist-lib/ui/windows/panels/WindowCmdLine.d.ts +4 -2
- package/dist-lib/ui/windows/panels/aliasLoop.d.ts +24 -0
- package/dist-lib/ui/windows/panels/editorClipboard.d.ts +45 -0
- package/dist-lib/ui/windows/panels/editorUndo.d.ts +79 -0
- package/dist-lib/ui/windows/panels/mapAreaChange.d.ts +10 -0
- package/dist-lib/utils/appShellCache.d.ts +25 -0
- package/dist-lib/utils/fontFamilyName.d.ts +13 -0
- package/dist-lib/utils/fontLoader.d.ts +31 -0
- package/dist-lib/utils/formatBytes.d.ts +4 -0
- package/dist-lib/utils/mustBeOneOf.d.ts +9 -0
- package/dist-lib/utils/profileLock.d.ts +1 -1
- package/dist-lib/utils/systemTheme.d.ts +24 -0
- package/dist-lib/utils/timeZone.d.ts +10 -0
- package/dist-lib/vault/CredentialVault.d.ts +51 -5
- package/dist-lib/vault/deviceUnlock.d.ts +47 -0
- package/dist-lib/vault/vaultAccess.d.ts +24 -2
- package/dist-lib/vault/vaultHelpTopic.d.ts +9 -0
- package/dist-lib/vault/vaultRecord.d.ts +33 -1
- package/dist-lib/vfs-sw.js +220 -11
- package/dist-lib/vite.d.ts +1 -1
- package/dist-lib/vite.js +66 -43
- package/package.json +23 -15
- package/dist-lib/assets/mapParser.worker-t-3rd1zR.js +0 -9
- package/dist-lib/mud/connection/PingTracker.d.ts +0 -41
- package/dist-lib/ui/BundledGameGrid.d.ts +0 -21
- package/dist-lib/ui/ConnectionGrid.d.ts +0 -21
- package/dist-lib/ui/bufferWords.d.ts +0 -38
|
@@ -2,6 +2,15 @@ import { type AppSchema, type MudConnection, type AliasNode, type ButtonNode, ty
|
|
|
2
2
|
import type { MudletVariable } from '../import/mudletVariables';
|
|
3
3
|
import type { MudletImportResult } from '../import/mudletXmlImport';
|
|
4
4
|
import type { WindowOpenOptions } from '../ui/windows/types';
|
|
5
|
+
import { MIGRATION_BACKUP_KEY } from './profileStorage';
|
|
6
|
+
/** One node lifted out of a per-connection list, with the position it occupied.
|
|
7
|
+
* Positions are indices into the flat array, which is what carries sibling
|
|
8
|
+
* order in this schema — so putting them back at those indices reinstates the
|
|
9
|
+
* tree exactly, subtree included. */
|
|
10
|
+
export interface RestoredNode<T> {
|
|
11
|
+
index: number;
|
|
12
|
+
node: T;
|
|
13
|
+
}
|
|
5
14
|
interface AppStore extends AppSchema {
|
|
6
15
|
/** Adds a connection and returns its newly generated id (so callers can
|
|
7
16
|
* immediately attach per-profile data like saved login credentials). */
|
|
@@ -26,6 +35,7 @@ interface AppStore extends AppSchema {
|
|
|
26
35
|
/** Replace the set of global names flagged to persist (Mudlet save-list).
|
|
27
36
|
* Edited from the Variables view; triggers a profile-data save. */
|
|
28
37
|
setVariableSaveList: (connectionId: string, saveList: string[]) => void;
|
|
38
|
+
setVariableHidden: (connectionId: string, hidden: string[]) => void;
|
|
29
39
|
/** Replace the captured variable values without disturbing the save-list
|
|
30
40
|
* reference — so the engine can refresh them on save without re-triggering
|
|
31
41
|
* the save subscription (which keys on the save-list, not values). */
|
|
@@ -65,6 +75,14 @@ interface AppStore extends AppSchema {
|
|
|
65
75
|
addButton: (connectionId: string, data: Omit<ButtonNode, 'id'>) => string;
|
|
66
76
|
updateButton: (connectionId: string, id: string, patch: Partial<Omit<ButtonNode, 'id'>>) => void;
|
|
67
77
|
removeButton: (connectionId: string, id: string) => void;
|
|
78
|
+
/** Put deleted nodes back where they were — the undo half of the six
|
|
79
|
+
* `removeX` actions above. See `spliceBack`. */
|
|
80
|
+
restoreScripts: (connectionId: string, entries: ReadonlyArray<RestoredNode<ScriptNode>>) => void;
|
|
81
|
+
restoreAliases: (connectionId: string, entries: ReadonlyArray<RestoredNode<AliasNode>>) => void;
|
|
82
|
+
restoreTriggers: (connectionId: string, entries: ReadonlyArray<RestoredNode<TriggerNode>>) => void;
|
|
83
|
+
restoreTimers: (connectionId: string, entries: ReadonlyArray<RestoredNode<TimerNode>>) => void;
|
|
84
|
+
restoreKeybindings: (connectionId: string, entries: ReadonlyArray<RestoredNode<KeyNode>>) => void;
|
|
85
|
+
restoreButtons: (connectionId: string, entries: ReadonlyArray<RestoredNode<ButtonNode>>) => void;
|
|
68
86
|
moveScript: (connectionId: string, id: string, newParentId: string | null, insertBeforeId: string | null) => void;
|
|
69
87
|
moveAlias: (connectionId: string, id: string, newParentId: string | null, insertBeforeId: string | null) => void;
|
|
70
88
|
moveTrigger: (connectionId: string, id: string, newParentId: string | null, insertBeforeId: string | null) => void;
|
|
@@ -98,18 +116,16 @@ interface PersistedConnectionData {
|
|
|
98
116
|
layoutSnapshot?: WindowLayoutSnapshot;
|
|
99
117
|
variables?: ProfileVariables;
|
|
100
118
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
* reject writes from a different schema version. */
|
|
104
|
-
export declare const MUDIX_STORE_NAME = "mudix_v1";
|
|
105
|
-
export declare const MUDIX_STORE_VERSION = 21;
|
|
119
|
+
export declare const MUDLET_STORE_NAME = "mudlet_v1";
|
|
120
|
+
export declare const MUDLET_STORE_VERSION = 21;
|
|
106
121
|
/** One-time localStorage key holding pre-v21 per-profile UI/layout/settings
|
|
107
122
|
* slices, stashed by the v21 migration so they can be moved into each profile's
|
|
108
|
-
* VFS (.
|
|
123
|
+
* VFS (.mudlet/profile.json) the first time it's opened. Kept separate from the
|
|
109
124
|
* persisted store blob so editing the connections list (which rewrites the
|
|
110
125
|
* blob) can't drop un-migrated profiles' data. Consumed per-profile by
|
|
111
|
-
* loadProfileData, then removed when empty.
|
|
112
|
-
|
|
126
|
+
* loadProfileData, then removed when empty. Defined next to the rest of the
|
|
127
|
+
* per-profile storage inventory so profile deletion can sweep it. */
|
|
128
|
+
export { MIGRATION_BACKUP_KEY };
|
|
113
129
|
export declare const useAppStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<AppStore>, "setState" | "persist"> & {
|
|
114
130
|
setState(partial: AppStore | Partial<AppStore> | ((state: AppStore) => AppStore | Partial<AppStore>), replace?: false | undefined): unknown;
|
|
115
131
|
setState(state: AppStore | ((state: AppStore) => AppStore), replace: true): unknown;
|
|
@@ -129,4 +145,3 @@ export declare const useAppStore: import("zustand").UseBoundStore<Omit<import("z
|
|
|
129
145
|
}, unknown>>;
|
|
130
146
|
};
|
|
131
147
|
}>;
|
|
132
|
-
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ClientSettings, type ProfileSettings, type Theme } from './schema';
|
|
1
|
+
import { type ClientSettings, type EditorSettings, type ProfileSettings, type Theme } from './schema';
|
|
2
2
|
/**
|
|
3
3
|
* Active profile id, provided by ProfileSession. `null` outside a profile
|
|
4
4
|
* (e.g. on the connection screen) — settings consumers fall through to
|
|
@@ -15,3 +15,7 @@ export declare function useClientField<K extends keyof ClientSettings>(key: K):
|
|
|
15
15
|
* current theme (e.g. CodeMirror editors). Outside a profile (no context) it
|
|
16
16
|
* resolves to the launcher theme. */
|
|
17
17
|
export declare function useEffectiveTheme(): Theme;
|
|
18
|
+
/** The script editor's display options, each falling back to its default.
|
|
19
|
+
* Returns a stable-shaped object, so read the individual fields in a
|
|
20
|
+
* dependency array rather than the object itself. */
|
|
21
|
+
export declare function useEditorSettings(): Required<EditorSettings>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { type AppSchema, type MudConnection, type ConnectionMode, type ClientSettings, type ProfileSettings, type MapperSettings, type PlayerMarkerSettings, type MapInfoBgColor, type ProtocolSettings, type BooleanProtocolKey, type Theme, type OutputFontSource, APP_DEFAULTS, PROFILE_DEFAULTS, MAPPER_DEFAULTS, PLAYER_MARKER_DEFAULTS, MAP_INFO_BG_DEFAULT, PROTOCOL_DEFAULTS, WS_SUBPROTOCOL_CHOICES, DEFAULT_PROXY_URL, connectionUrl, connectionDisplayAddr,
|
|
1
|
+
export { type AppSchema, type MudConnection, type ConnectionMode, type ClientSettings, type ProfileSettings, type MapperSettings, type EditorSettings, type PlayerMarkerSettings, type MapInfoBgColor, type ProtocolSettings, type BooleanProtocolKey, type Theme, type OutputFontSource, APP_DEFAULTS, PROFILE_DEFAULTS, MAPPER_DEFAULTS, symbolFontSource, PLAYER_MARKER_DEFAULTS, MAP_INFO_BG_DEFAULT, PROTOCOL_DEFAULTS, WS_SUBPROTOCOL_CHOICES, SEARCH_ENGINES, DEFAULT_SEARCH_ENGINE, resolveSearchEngine, DEFAULT_PROXY_URL, connectionUrl, connectionDisplayAddr, connectionNameTaken, uniqueConnectionName, type PortValidation, validatePort, DEFAULT_MUD_PORT, type HostValidation, validateHost, type UrlValidation, validateWsUrl, type ProxyValidation, validateProxyUrl, withProxyParams, effectiveProxyUrl, proxyCanInspectCertificates, selectProfileField } from './schema';
|
|
2
2
|
export { useAppStore } from './appStore';
|
|
3
3
|
export { initCrossTabSync } from './crossTabSync';
|
|
4
|
-
export { ConnectionIdContext, useConnectionId, useProfileField, useClientField, useEffectiveTheme } from './hooks';
|
|
4
|
+
export { ConnectionIdContext, useConnectionId, useProfileField, useClientField, useEffectiveTheme, useEditorSettings } from './hooks';
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export declare function saveMap(connectionId: string, data: ArrayBuffer): Promise<void>;
|
|
2
|
+
/** Drop one profile's map. Keyed by connection id, so it can't reach another's. */
|
|
3
|
+
export declare function deleteMap(connectionId: string): Promise<void>;
|
|
2
4
|
export declare function loadMap(connectionId: string): Promise<ArrayBuffer | null>;
|
|
@@ -4,7 +4,9 @@ export declare function persistenceSupported(): boolean;
|
|
|
4
4
|
export declare function isPersisted(): Promise<boolean>;
|
|
5
5
|
/** Ask the browser to exempt this origin's storage from eviction, at most once
|
|
6
6
|
* per page session. Resolves to whether storage is persistent afterwards —
|
|
7
|
-
* `false` on refusal or on a browser without the API. Never throws.
|
|
7
|
+
* `false` on refusal or on a browser without the API. Never throws. When the
|
|
8
|
+
* brand opts out (`requestPersistentStorage: false`) nothing is requested and
|
|
9
|
+
* this only reports the current state. */
|
|
8
10
|
export declare function ensurePersistentStorage(): Promise<boolean>;
|
|
9
11
|
/** Test seam: forget the one-per-session attempt. */
|
|
10
12
|
export declare function resetPersistenceRequest(): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** localStorage key holding the one-time v21 profile-data migration backup,
|
|
2
|
+
* a `{ [connectionId]: slices }` map consumed on each profile's next open. */
|
|
3
|
+
export declare const MIGRATION_BACKUP_KEY = "mudlet_profile_migration_v21";
|
|
4
|
+
/** Name of the IndexedDB database backing a profile's ZenFS mount. Must match
|
|
5
|
+
* the `storeName` ProfileVFS.doMount passes to the IndexedDB backend. */
|
|
6
|
+
export declare function profileVfsDatabaseName(connectionId: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* Erase everything stored for one profile outside the app store: its VFS
|
|
9
|
+
* database, its map, its linked-folder handle, its logs and its per-profile
|
|
10
|
+
* localStorage keys. See the inventory at the top of this file.
|
|
11
|
+
*
|
|
12
|
+
* Best-effort throughout — a store that fails to open must not stop the rest,
|
|
13
|
+
* and the caller (removeConnection) is synchronous and does not await this.
|
|
14
|
+
*/
|
|
15
|
+
export declare function deleteProfileStorage(connectionId: string): Promise<void>;
|
|
@@ -11,9 +11,9 @@ import type { ProfileVFS } from '../scripting/vfs/ProfileVFS';
|
|
|
11
11
|
* eliminating the multi-tab clobber the shared blob suffered.
|
|
12
12
|
*
|
|
13
13
|
* The file is dot-prefixed so it stays out of the way in the user-browsable
|
|
14
|
-
* file area. `ProfileVFS.writeFile` creates the `.
|
|
14
|
+
* file area. `ProfileVFS.writeFile` creates the `.mudlet/` parent dir for us.
|
|
15
15
|
*/
|
|
16
|
-
export declare const PROFILE_DATA_PATH = ".
|
|
16
|
+
export declare const PROFILE_DATA_PATH = ".mudlet/profile.json";
|
|
17
17
|
export interface PersistedProfileData {
|
|
18
18
|
version: number;
|
|
19
19
|
scripts: ScriptNode[];
|
|
@@ -34,7 +34,7 @@ export interface PersistedProfileData {
|
|
|
34
34
|
layoutSnapshot?: WindowLayoutSnapshot;
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
* Read `.
|
|
37
|
+
* Read `.mudlet/profile.json` from the profile VFS and push it into the store
|
|
38
38
|
* for `connectionId`. Also completes the one-time v21 migration: if this
|
|
39
39
|
* profile's UI/settings/layout slices haven't moved into the VFS yet, they're
|
|
40
40
|
* pulled from the migration backup, hydrated, written to the VFS, and dropped
|