waybetter 0.1.1 → 0.7.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/README.md +139 -6
- package/bin/waybetter.mjs +43 -0
- package/build/runtime.mjs +105 -0
- package/cli/buildenv.mjs +130 -0
- package/cli/dev.mjs +97 -0
- package/cli/i18n.mjs +382 -0
- package/cli/manifests.mjs +383 -0
- package/cli/release.mjs +437 -0
- package/cli/releasecheck.mjs +15 -0
- package/cli/remote.mjs +260 -0
- package/cli/store.mjs +378 -0
- package/cli/strings.mjs +123 -0
- package/dist/runtime/column.d.ts +93 -0
- package/dist/runtime/column.js +451 -0
- package/dist/runtime/column.js.map +1 -0
- package/dist/runtime/commandReport.d.ts +19 -0
- package/dist/runtime/commandReport.js +47 -0
- package/dist/runtime/commandReport.js.map +1 -0
- package/dist/runtime/commands.d.ts +72 -0
- package/dist/runtime/commands.js +214 -0
- package/dist/runtime/commands.js.map +1 -0
- package/dist/runtime/devErrors.d.ts +16 -0
- package/dist/runtime/devErrors.js +30 -0
- package/dist/runtime/devErrors.js.map +1 -0
- package/dist/runtime/domHub.d.ts +21 -0
- package/dist/runtime/domHub.js +139 -4
- package/dist/runtime/domHub.js.map +1 -1
- package/dist/runtime/featureModules.d.ts +157 -0
- package/dist/runtime/featureModules.js +484 -0
- package/dist/runtime/featureModules.js.map +1 -0
- package/dist/runtime/featureTable.d.ts +144 -0
- package/dist/runtime/featureTable.js +223 -0
- package/dist/runtime/featureTable.js.map +1 -0
- package/dist/runtime/fonts.d.ts +22 -0
- package/dist/runtime/fonts.js +72 -0
- package/dist/runtime/fonts.js.map +1 -0
- package/dist/runtime/i18n.d.ts +138 -0
- package/dist/runtime/i18n.js +614 -0
- package/dist/runtime/i18n.js.map +1 -0
- package/dist/runtime/i18nCheck.d.ts +30 -0
- package/dist/runtime/i18nCheck.js +224 -0
- package/dist/runtime/i18nCheck.js.map +1 -0
- package/dist/runtime/pageLang.d.ts +8 -0
- package/dist/runtime/pageLang.js +64 -0
- package/dist/runtime/pageLang.js.map +1 -0
- package/dist/runtime/pageStrings.d.ts +35 -0
- package/dist/runtime/pageStrings.js +76 -0
- package/dist/runtime/pageStrings.js.map +1 -0
- package/dist/runtime/panelButton.d.ts +33 -0
- package/dist/runtime/panelButton.js +83 -0
- package/dist/runtime/panelButton.js.map +1 -0
- package/dist/runtime/permissions.d.ts +47 -0
- package/dist/runtime/permissions.js +141 -0
- package/dist/runtime/permissions.js.map +1 -0
- package/dist/runtime/pluginApi.d.ts +51 -2
- package/dist/runtime/pluginApi.js +137 -22
- package/dist/runtime/pluginApi.js.map +1 -1
- package/dist/runtime/pluginI18n.d.ts +29 -0
- package/dist/runtime/pluginI18n.js +119 -0
- package/dist/runtime/pluginI18n.js.map +1 -0
- package/dist/runtime/settingsForm.d.ts +66 -0
- package/dist/runtime/settingsForm.js +114 -0
- package/dist/runtime/settingsForm.js.map +1 -0
- package/dist/runtime/site.d.ts +5 -0
- package/dist/runtime/site.js +1 -1
- package/dist/runtime/site.js.map +1 -1
- package/dist/runtime/siteRuntime.d.ts +144 -0
- package/dist/runtime/siteRuntime.js +175 -0
- package/dist/runtime/siteRuntime.js.map +1 -0
- package/dist/runtime/stringPackHook.d.ts +84 -0
- package/dist/runtime/stringPackHook.js +220 -0
- package/dist/runtime/stringPackHook.js.map +1 -0
- package/dist/runtime/stringPackTranslate.d.ts +61 -0
- package/dist/runtime/stringPackTranslate.js +267 -0
- package/dist/runtime/stringPackTranslate.js.map +1 -0
- package/dist/runtime/stringPacks.d.ts +248 -0
- package/dist/runtime/stringPacks.js +610 -0
- package/dist/runtime/stringPacks.js.map +1 -0
- package/dist/runtime/styles.d.ts +15 -0
- package/dist/runtime/styles.js +81 -0
- package/dist/runtime/styles.js.map +1 -0
- package/dist/runtime/textNet.d.ts +15 -0
- package/dist/runtime/textNet.js +131 -0
- package/dist/runtime/textNet.js.map +1 -0
- package/dist/runtime/themeApi.d.ts +121 -0
- package/dist/runtime/themeApi.js +220 -0
- package/dist/runtime/themeApi.js.map +1 -0
- package/dist/runtime/themeBar.d.ts +28 -0
- package/dist/runtime/themeBar.js +82 -0
- package/dist/runtime/themeBar.js.map +1 -0
- package/dist/runtime/themeChoice.d.ts +52 -0
- package/dist/runtime/themeChoice.js +69 -0
- package/dist/runtime/themeChoice.js.map +1 -0
- package/dist/runtime/themeComponents.d.ts +435 -0
- package/dist/runtime/themeComponents.js +476 -0
- package/dist/runtime/themeComponents.js.map +1 -0
- package/dist/runtime/themeDecor.d.ts +73 -0
- package/dist/runtime/themeDecor.js +133 -0
- package/dist/runtime/themeDecor.js.map +1 -0
- package/dist/runtime/themeDerive.d.ts +69 -0
- package/dist/runtime/themeDerive.js +117 -0
- package/dist/runtime/themeDerive.js.map +1 -0
- package/dist/runtime/themeDoctor.d.ts +52 -0
- package/dist/runtime/themeDoctor.js +112 -0
- package/dist/runtime/themeDoctor.js.map +1 -0
- package/dist/runtime/themeGuards.d.ts +60 -0
- package/dist/runtime/themeGuards.js +235 -0
- package/dist/runtime/themeGuards.js.map +1 -0
- package/dist/runtime/themeIcons.d.ts +130 -0
- package/dist/runtime/themeIcons.js +271 -0
- package/dist/runtime/themeIcons.js.map +1 -0
- package/dist/runtime/themeInk.d.ts +37 -0
- package/dist/runtime/themeInk.js +111 -0
- package/dist/runtime/themeInk.js.map +1 -0
- package/dist/runtime/themeInvariants.d.ts +39 -0
- package/dist/runtime/themeInvariants.js +273 -0
- package/dist/runtime/themeInvariants.js.map +1 -0
- package/dist/runtime/themeRuntime.d.ts +114 -0
- package/dist/runtime/themeRuntime.js +570 -0
- package/dist/runtime/themeRuntime.js.map +1 -0
- package/dist/runtime/themeSchema.d.ts +10 -0
- package/dist/runtime/themeSchema.js +150 -0
- package/dist/runtime/themeSchema.js.map +1 -0
- package/dist/runtime/themeSpec.d.ts +263 -0
- package/dist/runtime/themeSpec.js +435 -0
- package/dist/runtime/themeSpec.js.map +1 -0
- package/dist/runtime/themeTokens.d.ts +12 -0
- package/dist/runtime/themeTokens.js +14 -6
- package/dist/runtime/themeTokens.js.map +1 -1
- package/dist/runtime/themeVariants.d.ts +30 -0
- package/dist/runtime/themeVariants.js +53 -0
- package/dist/runtime/themeVariants.js.map +1 -0
- package/dist/runtime/ui.d.ts +192 -0
- package/dist/runtime/ui.js +926 -0
- package/dist/runtime/ui.js.map +1 -0
- package/dist/shell/InstallDialog.d.ts +40 -0
- package/dist/shell/InstallDialog.js +176 -0
- package/dist/shell/InstallDialog.js.map +1 -0
- package/dist/shell/StoreView.d.ts +78 -0
- package/dist/shell/StoreView.js +108 -0
- package/dist/shell/StoreView.js.map +1 -0
- package/dist/shell/addressModel.js.map +1 -1
- package/dist/shell/chrome.js.map +1 -1
- package/dist/shell/deckModel.d.ts +117 -0
- package/dist/shell/deckModel.js +267 -0
- package/dist/shell/deckModel.js.map +1 -0
- package/dist/shell/frame/AccountSwitcher.d.ts +42 -0
- package/dist/shell/frame/AccountSwitcher.js +243 -0
- package/dist/shell/frame/AccountSwitcher.js.map +1 -0
- package/dist/shell/frame/AddColumnDialog.d.ts +8 -0
- package/dist/shell/frame/AddColumnDialog.js +81 -0
- package/dist/shell/frame/AddColumnDialog.js.map +1 -0
- package/dist/shell/frame/AppMenu.d.ts +44 -0
- package/dist/shell/frame/AppMenu.js +721 -0
- package/dist/shell/frame/AppMenu.js.map +1 -0
- package/dist/shell/frame/CommandPalette.d.ts +7 -0
- package/dist/shell/frame/CommandPalette.js +118 -0
- package/dist/shell/frame/CommandPalette.js.map +1 -0
- package/dist/shell/frame/DeckView.d.ts +13 -0
- package/dist/shell/frame/DeckView.js +287 -0
- package/dist/shell/frame/DeckView.js.map +1 -0
- package/dist/shell/frame/FindBar.d.ts +10 -0
- package/dist/shell/frame/FindBar.js +108 -0
- package/dist/shell/frame/FindBar.js.map +1 -0
- package/dist/shell/frame/MediaPanel.d.ts +8 -0
- package/dist/shell/frame/MediaPanel.js +76 -0
- package/dist/shell/frame/MediaPanel.js.map +1 -0
- package/dist/shell/frame/NewTabPage.d.ts +9 -0
- package/dist/shell/frame/NewTabPage.js +71 -0
- package/dist/shell/frame/NewTabPage.js.map +1 -0
- package/dist/shell/frame/PaneTheme.d.ts +16 -0
- package/dist/shell/frame/PaneTheme.js +67 -0
- package/dist/shell/frame/PaneTheme.js.map +1 -0
- package/dist/shell/frame/ReportDialog.d.ts +3 -0
- package/dist/shell/frame/ReportDialog.js +95 -0
- package/dist/shell/frame/ReportDialog.js.map +1 -0
- package/dist/shell/frame/Shell.d.ts +9 -0
- package/dist/shell/frame/Shell.js +1139 -0
- package/dist/shell/frame/Shell.js.map +1 -0
- package/dist/shell/frame/Titlebar.d.ts +17 -0
- package/dist/shell/frame/Titlebar.js +79 -0
- package/dist/shell/frame/Titlebar.js.map +1 -0
- package/dist/shell/frame/TitlebarExtras.d.ts +4 -0
- package/dist/shell/frame/TitlebarExtras.js +202 -0
- package/dist/shell/frame/TitlebarExtras.js.map +1 -0
- package/dist/shell/frame/WebPanel.d.ts +4 -0
- package/dist/shell/frame/WebPanel.js +185 -0
- package/dist/shell/frame/WebPanel.js.map +1 -0
- package/dist/shell/frame/accountModel.d.ts +49 -0
- package/dist/shell/frame/accountModel.js +67 -0
- package/dist/shell/frame/accountModel.js.map +1 -0
- package/dist/shell/frame/accountSwitcher.css +91 -0
- package/dist/shell/frame/appI18n.d.ts +44 -0
- package/dist/shell/frame/appI18n.js +64 -0
- package/dist/shell/frame/appI18n.js.map +1 -0
- package/dist/shell/frame/appMenu.css +127 -0
- package/dist/shell/frame/backupModel.d.ts +38 -0
- package/dist/shell/frame/backupModel.js +192 -0
- package/dist/shell/frame/backupModel.js.map +1 -0
- package/dist/shell/frame/boot.d.ts +8 -0
- package/dist/shell/frame/boot.js +37 -0
- package/dist/shell/frame/boot.js.map +1 -0
- package/dist/shell/frame/brand.d.ts +1 -0
- package/dist/shell/frame/brand.js +4 -0
- package/dist/shell/frame/brand.js.map +1 -0
- package/dist/shell/frame/bridge.d.ts +35 -0
- package/dist/shell/frame/bridge.js +70 -0
- package/dist/shell/frame/bridge.js.map +1 -0
- package/dist/shell/frame/chromeTheme.d.ts +47 -0
- package/dist/shell/frame/chromeTheme.js +118 -0
- package/dist/shell/frame/chromeTheme.js.map +1 -0
- package/dist/shell/frame/deck.css +209 -0
- package/dist/shell/frame/deckStore.d.ts +89 -0
- package/dist/shell/frame/deckStore.js +239 -0
- package/dist/shell/frame/deckStore.js.map +1 -0
- package/dist/shell/frame/devHost.d.ts +35 -0
- package/dist/shell/frame/devHost.js +80 -0
- package/dist/shell/frame/devHost.js.map +1 -0
- package/dist/shell/frame/devModel.d.ts +7 -0
- package/dist/shell/frame/devModel.js +17 -0
- package/dist/shell/frame/devModel.js.map +1 -0
- package/dist/shell/frame/diag.d.ts +7 -0
- package/dist/shell/frame/diag.js +39 -0
- package/dist/shell/frame/diag.js.map +1 -0
- package/dist/shell/frame/edges.css +159 -0
- package/dist/shell/frame/findBar.css +14 -0
- package/dist/shell/frame/frameMessages.d.ts +248 -0
- package/dist/shell/frame/frameMessages.js +252 -0
- package/dist/shell/frame/frameMessages.js.map +1 -0
- package/dist/shell/frame/hooks.d.ts +39 -0
- package/dist/shell/frame/hooks.js +97 -0
- package/dist/shell/frame/hooks.js.map +1 -0
- package/dist/shell/frame/i18n.d.ts +27 -0
- package/dist/shell/frame/i18n.js +66 -0
- package/dist/shell/frame/i18n.js.map +1 -0
- package/dist/shell/frame/iconPack.d.ts +11 -0
- package/dist/shell/frame/iconPack.js +45 -0
- package/dist/shell/frame/iconPack.js.map +1 -0
- package/dist/shell/frame/icons.d.ts +71 -0
- package/dist/shell/frame/icons.js +75 -0
- package/dist/shell/frame/icons.js.map +1 -0
- package/dist/shell/frame/index.d.ts +34 -0
- package/dist/shell/frame/index.js +43 -0
- package/dist/shell/frame/index.js.map +1 -0
- package/dist/shell/frame/language.d.ts +58 -0
- package/dist/shell/frame/language.js +165 -0
- package/dist/shell/frame/language.js.map +1 -0
- package/dist/shell/frame/mediaModel.d.ts +47 -0
- package/dist/shell/frame/mediaModel.js +67 -0
- package/dist/shell/frame/mediaModel.js.map +1 -0
- package/dist/shell/frame/menuMessages.en.json +96 -0
- package/dist/shell/frame/menuModel.d.ts +319 -0
- package/dist/shell/frame/menuModel.js +301 -0
- package/dist/shell/frame/menuModel.js.map +1 -0
- package/dist/shell/frame/nativeMenu.d.ts +5 -0
- package/dist/shell/frame/nativeMenu.js +178 -0
- package/dist/shell/frame/nativeMenu.js.map +1 -0
- package/dist/shell/frame/nativeMenuModel.d.ts +102 -0
- package/dist/shell/frame/nativeMenuModel.js +186 -0
- package/dist/shell/frame/nativeMenuModel.js.map +1 -0
- package/dist/shell/frame/paletteModel.d.ts +139 -0
- package/dist/shell/frame/paletteModel.js +114 -0
- package/dist/shell/frame/paletteModel.js.map +1 -0
- package/dist/shell/frame/paneTheme.css +9 -0
- package/dist/shell/frame/pluginCommandStore.d.ts +23 -0
- package/dist/shell/frame/pluginCommandStore.js +70 -0
- package/dist/shell/frame/pluginCommandStore.js.map +1 -0
- package/dist/shell/frame/reportModel.d.ts +52 -0
- package/dist/shell/frame/reportModel.js +105 -0
- package/dist/shell/frame/reportModel.js.map +1 -0
- package/dist/shell/frame/safeStore.d.ts +7 -0
- package/dist/shell/frame/safeStore.js +40 -0
- package/dist/shell/frame/safeStore.js.map +1 -0
- package/dist/shell/frame/searchInput.d.ts +2 -0
- package/dist/shell/frame/searchInput.js +11 -0
- package/dist/shell/frame/searchInput.js.map +1 -0
- package/dist/shell/frame/shell.css +634 -0
- package/dist/shell/frame/site.d.ts +206 -0
- package/dist/shell/frame/site.js +22 -0
- package/dist/shell/frame/site.js.map +1 -0
- package/dist/shell/frame/state.d.ts +101 -0
- package/dist/shell/frame/state.js +286 -0
- package/dist/shell/frame/state.js.map +1 -0
- package/dist/shell/frame/syncGate.d.ts +10 -0
- package/dist/shell/frame/syncGate.js +36 -0
- package/dist/shell/frame/syncGate.js.map +1 -0
- package/dist/shell/frame/syncHost.d.ts +35 -0
- package/dist/shell/frame/syncHost.js +85 -0
- package/dist/shell/frame/syncHost.js.map +1 -0
- package/dist/shell/frame/tabStill.d.ts +2 -0
- package/dist/shell/frame/tabStill.js +62 -0
- package/dist/shell/frame/tabStill.js.map +1 -0
- package/dist/shell/frame/themeScopes.d.ts +29 -0
- package/dist/shell/frame/themeScopes.js +61 -0
- package/dist/shell/frame/themeScopes.js.map +1 -0
- package/dist/shell/frame/themeStore.d.ts +99 -0
- package/dist/shell/frame/themeStore.js +267 -0
- package/dist/shell/frame/themeStore.js.map +1 -0
- package/dist/shell/frame/windowBinding.d.ts +2 -0
- package/dist/shell/frame/windowBinding.js +7 -0
- package/dist/shell/frame/windowBinding.js.map +1 -0
- package/dist/shell/frame/workspaceModel.d.ts +82 -0
- package/dist/shell/frame/workspaceModel.js +250 -0
- package/dist/shell/frame/workspaceModel.js.map +1 -0
- package/dist/shell/frame/workspaces.css +84 -0
- package/dist/shell/frame/workspaces.d.ts +22 -0
- package/dist/shell/frame/workspaces.js +125 -0
- package/dist/shell/frame/workspaces.js.map +1 -0
- package/dist/shell/frame/zoomStore.d.ts +10 -0
- package/dist/shell/frame/zoomStore.js +65 -0
- package/dist/shell/frame/zoomStore.js.map +1 -0
- package/dist/shell/installController.d.ts +137 -0
- package/dist/shell/installController.js +172 -0
- package/dist/shell/installController.js.map +1 -0
- package/dist/shell/installerMessages.d.ts +30 -0
- package/dist/shell/installerMessages.js +36 -0
- package/dist/shell/installerMessages.js.map +1 -0
- package/dist/shell/linkDrop.js.map +1 -1
- package/dist/shell/messages.d.ts +16 -0
- package/dist/shell/messages.js +27 -0
- package/dist/shell/messages.js.map +1 -0
- package/dist/shell/palette.js.map +1 -1
- package/dist/shell/paneModel.d.ts +22 -0
- package/dist/shell/paneModel.js +24 -1
- package/dist/shell/paneModel.js.map +1 -1
- package/dist/shell/panel/Appearance.d.ts +8 -0
- package/dist/shell/panel/Appearance.js +265 -0
- package/dist/shell/panel/Appearance.js.map +1 -0
- package/dist/shell/panel/BackupPanel.d.ts +5 -0
- package/dist/shell/panel/BackupPanel.js +198 -0
- package/dist/shell/panel/BackupPanel.js.map +1 -0
- package/dist/shell/panel/DeveloperPanel.d.ts +4 -0
- package/dist/shell/panel/DeveloperPanel.js +51 -0
- package/dist/shell/panel/DeveloperPanel.js.map +1 -0
- package/dist/shell/panel/FeatureToggles.d.ts +13 -0
- package/dist/shell/panel/FeatureToggles.js +42 -0
- package/dist/shell/panel/FeatureToggles.js.map +1 -0
- package/dist/shell/panel/Home.d.ts +3 -0
- package/dist/shell/panel/Home.js +23 -0
- package/dist/shell/panel/Home.js.map +1 -0
- package/dist/shell/panel/IconPackInstall.d.ts +15 -0
- package/dist/shell/panel/IconPackInstall.js +41 -0
- package/dist/shell/panel/IconPackInstall.js.map +1 -0
- package/dist/shell/panel/LanguageSettings.d.ts +1 -0
- package/dist/shell/panel/LanguageSettings.js +54 -0
- package/dist/shell/panel/LanguageSettings.js.map +1 -0
- package/dist/shell/panel/MakePanel.d.ts +3 -0
- package/dist/shell/panel/MakePanel.js +237 -0
- package/dist/shell/panel/MakePanel.js.map +1 -0
- package/dist/shell/panel/MarkdownDoc.d.ts +6 -0
- package/dist/shell/panel/MarkdownDoc.js +35 -0
- package/dist/shell/panel/MarkdownDoc.js.map +1 -0
- package/dist/shell/panel/Modes.d.ts +40 -0
- package/dist/shell/panel/Modes.js +270 -0
- package/dist/shell/panel/Modes.js.map +1 -0
- package/dist/shell/panel/NavIcon.d.ts +4 -0
- package/dist/shell/panel/NavIcon.js +6 -0
- package/dist/shell/panel/NavIcon.js.map +1 -0
- package/dist/shell/panel/Panel.d.ts +7 -0
- package/dist/shell/panel/Panel.js +139 -0
- package/dist/shell/panel/Panel.js.map +1 -0
- package/dist/shell/panel/PluginFeatures.d.ts +24 -0
- package/dist/shell/panel/PluginFeatures.js +165 -0
- package/dist/shell/panel/PluginFeatures.js.map +1 -0
- package/dist/shell/panel/Plugins.d.ts +33 -0
- package/dist/shell/panel/Plugins.js +112 -0
- package/dist/shell/panel/Plugins.js.map +1 -0
- package/dist/shell/panel/PowerSettings.d.ts +4 -0
- package/dist/shell/panel/PowerSettings.js +52 -0
- package/dist/shell/panel/PowerSettings.js.map +1 -0
- package/dist/shell/panel/Settings.d.ts +23 -0
- package/dist/shell/panel/Settings.js +117 -0
- package/dist/shell/panel/Settings.js.map +1 -0
- package/dist/shell/panel/ShareSetup.d.ts +8 -0
- package/dist/shell/panel/ShareSetup.js +130 -0
- package/dist/shell/panel/ShareSetup.js.map +1 -0
- package/dist/shell/panel/StoreSection.d.ts +7 -0
- package/dist/shell/panel/StoreSection.js +78 -0
- package/dist/shell/panel/StoreSection.js.map +1 -0
- package/dist/shell/panel/StringPacks.d.ts +20 -0
- package/dist/shell/panel/StringPacks.js +131 -0
- package/dist/shell/panel/StringPacks.js.map +1 -0
- package/dist/shell/panel/ThemeBuilder.d.ts +5 -0
- package/dist/shell/panel/ThemeBuilder.js +205 -0
- package/dist/shell/panel/ThemeBuilder.js.map +1 -0
- package/dist/shell/panel/backup.css +34 -0
- package/dist/shell/panel/builder.css +240 -0
- package/dist/shell/panel/builderModel.d.ts +55 -0
- package/dist/shell/panel/builderModel.js +95 -0
- package/dist/shell/panel/builderModel.js.map +1 -0
- package/dist/shell/panel/compare.d.ts +10 -0
- package/dist/shell/panel/compare.js +51 -0
- package/dist/shell/panel/compare.js.map +1 -0
- package/dist/shell/panel/controls.d.ts +135 -0
- package/dist/shell/panel/controls.js +213 -0
- package/dist/shell/panel/controls.js.map +1 -0
- package/dist/shell/panel/featureModel.d.ts +69 -0
- package/dist/shell/panel/featureModel.js +79 -0
- package/dist/shell/panel/featureModel.js.map +1 -0
- package/dist/shell/panel/fonts/FontBrowser.d.ts +10 -0
- package/dist/shell/panel/fonts/FontBrowser.js +189 -0
- package/dist/shell/panel/fonts/FontBrowser.js.map +1 -0
- package/dist/shell/panel/fonts/FontRoles.d.ts +20 -0
- package/dist/shell/panel/fonts/FontRoles.js +77 -0
- package/dist/shell/panel/fonts/FontRoles.js.map +1 -0
- package/dist/shell/panel/fonts/catalog.d.ts +37 -0
- package/dist/shell/panel/fonts/catalog.js +68 -0
- package/dist/shell/panel/fonts/catalog.js.map +1 -0
- package/dist/shell/panel/fonts/googleFontsCatalog.json +1 -0
- package/dist/shell/panel/index.d.ts +20 -0
- package/dist/shell/panel/index.js +34 -0
- package/dist/shell/panel/index.js.map +1 -0
- package/dist/shell/panel/languageModel.d.ts +5 -0
- package/dist/shell/panel/languageModel.js +7 -0
- package/dist/shell/panel/languageModel.js.map +1 -0
- package/dist/shell/panel/make.css +73 -0
- package/dist/shell/panel/makeModel.d.ts +32 -0
- package/dist/shell/panel/makeModel.js +84 -0
- package/dist/shell/panel/makeModel.js.map +1 -0
- package/dist/shell/panel/markdown.d.ts +46 -0
- package/dist/shell/panel/markdown.js +100 -0
- package/dist/shell/panel/markdown.js.map +1 -0
- package/dist/shell/panel/nav.d.ts +12 -0
- package/dist/shell/panel/nav.js +50 -0
- package/dist/shell/panel/nav.js.map +1 -0
- package/dist/shell/panel/panel.css +401 -0
- package/dist/shell/panel/panelMessages.d.ts +803 -0
- package/dist/shell/panel/panelMessages.js +779 -0
- package/dist/shell/panel/panelMessages.js.map +1 -0
- package/dist/shell/panel/plugins.css +59 -0
- package/dist/shell/panel/setupModel.d.ts +87 -0
- package/dist/shell/panel/setupModel.js +152 -0
- package/dist/shell/panel/setupModel.js.map +1 -0
- package/dist/shell/panel/site.d.ts +259 -0
- package/dist/shell/panel/site.js +25 -0
- package/dist/shell/panel/site.js.map +1 -0
- package/dist/shell/panel/strings.css +7 -0
- package/dist/shell/panel/themes.d.ts +10 -0
- package/dist/shell/panel/themes.js +8 -0
- package/dist/shell/panel/themes.js.map +1 -0
- package/dist/shell/profileModel.d.ts +3 -2
- package/dist/shell/profileModel.js +7 -5
- package/dist/shell/profileModel.js.map +1 -1
- package/dist/shell/store.css +250 -0
- package/dist/shell/storeMessages.d.ts +193 -0
- package/dist/shell/storeMessages.js +196 -0
- package/dist/shell/storeMessages.js.map +1 -0
- package/dist/shell/storeModel.d.ts +205 -0
- package/dist/shell/storeModel.js +146 -0
- package/dist/shell/storeModel.js.map +1 -0
- package/dist/shell/stringPacksModel.d.ts +44 -0
- package/dist/shell/stringPacksModel.js +99 -0
- package/dist/shell/stringPacksModel.js.map +1 -0
- package/dist/shell/updateModel.d.ts +2 -1
- package/dist/shell/updateModel.js +5 -4
- package/dist/shell/updateModel.js.map +1 -1
- package/dist/shell/windowControls.d.ts +4 -0
- package/dist/shell/windowControls.js +5 -0
- package/dist/shell/windowControls.js.map +1 -1
- package/i18n-config.schema.json +29 -0
- package/i18n-meta.schema.json +26 -0
- package/i18n.schema.json +42 -0
- package/icons.schema.json +655 -0
- package/languages.schema.json +23 -0
- package/locales/ar-x-fm.json +11 -0
- package/locales/ar.json +1388 -0
- package/locales/bg.json +1387 -0
- package/locales/bn.json +1387 -0
- package/locales/ca.json +1387 -0
- package/locales/cs.json +1387 -0
- package/locales/da.json +1387 -0
- package/locales/de.json +1387 -0
- package/locales/el.json +1387 -0
- package/locales/en-GB.json +27 -0
- package/locales/en.json +1386 -0
- package/locales/en.meta.json +51 -0
- package/locales/es.json +1387 -0
- package/locales/eu.json +1387 -0
- package/locales/fa.json +1388 -0
- package/locales/fi.json +1387 -0
- package/locales/fil.json +1387 -0
- package/locales/fr.json +1387 -0
- package/locales/ga.json +1387 -0
- package/locales/gl.json +1387 -0
- package/locales/gu.json +1387 -0
- package/locales/ha.json +1387 -0
- package/locales/he.json +1388 -0
- package/locales/hi.json +1387 -0
- package/locales/hr.json +1387 -0
- package/locales/hu.json +1387 -0
- package/locales/id.json +1387 -0
- package/locales/ig.json +1387 -0
- package/locales/it.json +1387 -0
- package/locales/ja.json +1387 -0
- package/locales/kn.json +1387 -0
- package/locales/ko.json +1387 -0
- package/locales/mr.json +1387 -0
- package/locales/ms.json +1387 -0
- package/locales/nb.json +1387 -0
- package/locales/nl.json +1387 -0
- package/locales/pl.json +1387 -0
- package/locales/pt.json +1387 -0
- package/locales/ro.json +1387 -0
- package/locales/ru.json +1387 -0
- package/locales/sk.json +1387 -0
- package/locales/sr.json +1387 -0
- package/locales/sv.json +1387 -0
- package/locales/ta.json +1387 -0
- package/locales/th.json +1387 -0
- package/locales/tr.json +1387 -0
- package/locales/uk.json +1387 -0
- package/locales/ur.json +1388 -0
- package/locales/vi.json +1387 -0
- package/locales/yo.json +1387 -0
- package/locales/zh-Hans.json +1387 -0
- package/locales/zh-Hant.json +1387 -0
- package/package.json +138 -5
- package/store-catalog.schema.json +78 -0
- package/theme.schema.json +4668 -0
- package/windows/installer.nsi +946 -0
- package/windows/languages/Basque.nsh +28 -0
- package/windows/languages/Catalan.nsh +28 -0
- package/windows/languages/Croatian.nsh +28 -0
- package/windows/languages/Czech.nsh +28 -0
- package/windows/languages/Danish.nsh +28 -0
- package/windows/languages/Finnish.nsh +28 -0
- package/windows/languages/Galician.nsh +28 -0
- package/windows/languages/Greek.nsh +28 -0
- package/windows/languages/Hungarian.nsh +28 -0
- package/windows/languages/Indonesian.nsh +28 -0
- package/windows/languages/Irish.nsh +28 -0
- package/windows/languages/Malay.nsh +28 -0
- package/windows/languages/Polish.nsh +28 -0
- package/windows/languages/Romanian.nsh +28 -0
- package/windows/languages/Serbian.nsh +28 -0
- package/windows/languages/Slovak.nsh +28 -0
- package/windows/languages/Thai.nsh +28 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export type GalleryImage = {
|
|
2
|
+
path: string;
|
|
3
|
+
name: string;
|
|
4
|
+
folder: string;
|
|
5
|
+
modifiedMs: number;
|
|
6
|
+
size: number;
|
|
7
|
+
};
|
|
8
|
+
export type ClipItem = {
|
|
9
|
+
id: string;
|
|
10
|
+
kind: 'text' | 'image';
|
|
11
|
+
text?: string;
|
|
12
|
+
file?: string;
|
|
13
|
+
hash: string;
|
|
14
|
+
at: number;
|
|
15
|
+
};
|
|
16
|
+
export type MediaSettings = {
|
|
17
|
+
folders: string[];
|
|
18
|
+
clipboardEnabled: boolean;
|
|
19
|
+
clipboardMax: number;
|
|
20
|
+
};
|
|
21
|
+
export type TabInfo = {
|
|
22
|
+
id: string;
|
|
23
|
+
url: string;
|
|
24
|
+
};
|
|
25
|
+
export declare const CLIP_MAX_LIMIT = 100;
|
|
26
|
+
/**
|
|
27
|
+
* The Media panel's key: Ctrl+Shift+G on Windows and Linux; Cmd+Shift+M on macOS, where Cmd+Shift+G
|
|
28
|
+
* is the system's Find Previous (the native Edit menu owns it).
|
|
29
|
+
*/
|
|
30
|
+
export declare function isMediaShortcut(event: {
|
|
31
|
+
key: string;
|
|
32
|
+
shiftKey: boolean;
|
|
33
|
+
ctrlKey: boolean;
|
|
34
|
+
metaKey: boolean;
|
|
35
|
+
altKey: boolean;
|
|
36
|
+
}, os: string): boolean;
|
|
37
|
+
/** The Media panel's key as shown in hints and lists. */
|
|
38
|
+
export declare const mediaShortcutLabel: (os: string) => string;
|
|
39
|
+
/** The tab an attachment goes to: the active tab if it can take one, else the most recent one that can. */
|
|
40
|
+
export declare function attachTarget(tabs: TabInfo[], activeId: string | undefined, canAttach: (url: string) => boolean, recent?: string[]): TabInfo | null;
|
|
41
|
+
/** Gallery folders shown as their last path segment (Windows or POSIX separators). */
|
|
42
|
+
export declare function folderLabel(folder: string): string;
|
|
43
|
+
export declare function clampClipMax(value: number): number;
|
|
44
|
+
/** Removing a folder is the only folder change the shell can make; adding goes through the native dialog. */
|
|
45
|
+
export declare function withoutFolder(settings: MediaSettings, folder: string): MediaSettings;
|
|
46
|
+
export declare function clipPreview(item: ClipItem, max?: number): string;
|
|
47
|
+
export declare function relativeTime(ms: number, now?: number): string;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// Pure model for the Media side panel (gallery folders + clipboard history). No Tauri/DOM
|
|
2
|
+
// imports, so it is unit-tested under node. The panel never posts: it only asks native code to
|
|
3
|
+
// attach an image to, or insert text into, one site tab's composer (`site.media.canAttach` says
|
|
4
|
+
// which pages have one).
|
|
5
|
+
import { formatNumber, t } from "./i18n.js";
|
|
6
|
+
export const CLIP_MAX_LIMIT = 100;
|
|
7
|
+
/**
|
|
8
|
+
* The Media panel's key: Ctrl+Shift+G on Windows and Linux; Cmd+Shift+M on macOS, where Cmd+Shift+G
|
|
9
|
+
* is the system's Find Previous (the native Edit menu owns it).
|
|
10
|
+
*/
|
|
11
|
+
export function isMediaShortcut(event, os) {
|
|
12
|
+
if (!event.shiftKey || event.altKey)
|
|
13
|
+
return false;
|
|
14
|
+
const key = event.key.toLowerCase();
|
|
15
|
+
if (os === 'macos')
|
|
16
|
+
return event.metaKey && !event.ctrlKey && key === 'm';
|
|
17
|
+
return (event.ctrlKey || event.metaKey) && key === 'g';
|
|
18
|
+
}
|
|
19
|
+
/** The Media panel's key as shown in hints and lists. */
|
|
20
|
+
export const mediaShortcutLabel = (os) => (os === 'macos' ? 'Cmd+Shift+M' : 'Ctrl+Shift+G');
|
|
21
|
+
/** The tab an attachment goes to: the active tab if it can take one, else the most recent one that can. */
|
|
22
|
+
export function attachTarget(tabs, activeId, canAttach, recent = []) {
|
|
23
|
+
const active = tabs.find(tab => tab.id === activeId);
|
|
24
|
+
if (active && canAttach(active.url))
|
|
25
|
+
return active;
|
|
26
|
+
for (const id of recent) {
|
|
27
|
+
const tab = tabs.find(candidate => candidate.id === id);
|
|
28
|
+
if (tab && canAttach(tab.url))
|
|
29
|
+
return tab;
|
|
30
|
+
}
|
|
31
|
+
return tabs.find(tab => canAttach(tab.url)) ?? null;
|
|
32
|
+
}
|
|
33
|
+
/** Gallery folders shown as their last path segment (Windows or POSIX separators). */
|
|
34
|
+
export function folderLabel(folder) {
|
|
35
|
+
const parts = folder.split(/[\\/]+/).filter(Boolean);
|
|
36
|
+
return parts[parts.length - 1] ?? folder;
|
|
37
|
+
}
|
|
38
|
+
export function clampClipMax(value) {
|
|
39
|
+
if (!Number.isFinite(value))
|
|
40
|
+
return 30;
|
|
41
|
+
return Math.min(CLIP_MAX_LIMIT, Math.max(1, Math.round(value)));
|
|
42
|
+
}
|
|
43
|
+
/** Removing a folder is the only folder change the shell can make; adding goes through the native dialog. */
|
|
44
|
+
export function withoutFolder(settings, folder) {
|
|
45
|
+
return { ...settings, folders: settings.folders.filter(f => f !== folder) };
|
|
46
|
+
}
|
|
47
|
+
export function clipPreview(item, max = 80) {
|
|
48
|
+
if (item.kind === 'image')
|
|
49
|
+
return t('wb.media.image');
|
|
50
|
+
const flat = (item.text ?? '').replace(/\s+/g, ' ').trim();
|
|
51
|
+
return flat.length > max ? `${flat.slice(0, max - 1)}…` : flat;
|
|
52
|
+
}
|
|
53
|
+
export function relativeTime(ms, now = Date.now()) {
|
|
54
|
+
const seconds = Math.max(0, Math.round((now - ms) / 1000));
|
|
55
|
+
if (seconds < 60)
|
|
56
|
+
return t('wb.media.now');
|
|
57
|
+
// Compact units in the active language ("5m", "5 dk", "5分").
|
|
58
|
+
const unit = (value, name) => formatNumber(value, { style: 'unit', unit: name, unitDisplay: 'narrow' });
|
|
59
|
+
const minutes = Math.round(seconds / 60);
|
|
60
|
+
if (minutes < 60)
|
|
61
|
+
return unit(minutes, 'minute');
|
|
62
|
+
const hours = Math.round(minutes / 60);
|
|
63
|
+
if (hours < 24)
|
|
64
|
+
return unit(hours, 'hour');
|
|
65
|
+
return unit(Math.round(hours / 24), 'day');
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=mediaModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mediaModel.js","sourceRoot":"","sources":["../../../../../../shell/src/frame/mediaModel.ts"],"names":[],"mappings":"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","sourcesContent":["// Pure model for the Media side panel (gallery folders + clipboard history). No Tauri/DOM\n// imports, so it is unit-tested under node. The panel never posts: it only asks native code to\n// attach an image to, or insert text into, one site tab's composer (`site.media.canAttach` says\n// which pages have one).\n\nimport { formatNumber, t } from './i18n.ts';\n\nexport type GalleryImage = { path: string; name: string; folder: string; modifiedMs: number; size: number };\nexport type ClipItem = { id: string; kind: 'text' | 'image'; text?: string; file?: string; hash: string; at: number };\nexport type MediaSettings = { folders: string[]; clipboardEnabled: boolean; clipboardMax: number };\nexport type TabInfo = { id: string; url: string };\n\nexport const CLIP_MAX_LIMIT = 100;\n\n/**\n * The Media panel's key: Ctrl+Shift+G on Windows and Linux; Cmd+Shift+M on macOS, where Cmd+Shift+G\n * is the system's Find Previous (the native Edit menu owns it).\n */\nexport function isMediaShortcut(event: { key: string; shiftKey: boolean; ctrlKey: boolean; metaKey: boolean; altKey: boolean }, os: string): boolean {\n if (!event.shiftKey || event.altKey) return false;\n const key = event.key.toLowerCase();\n if (os === 'macos') return event.metaKey && !event.ctrlKey && key === 'm';\n return (event.ctrlKey || event.metaKey) && key === 'g';\n}\n\n/** The Media panel's key as shown in hints and lists. */\nexport const mediaShortcutLabel = (os: string): string => (os === 'macos' ? 'Cmd+Shift+M' : 'Ctrl+Shift+G');\n\n/** The tab an attachment goes to: the active tab if it can take one, else the most recent one that can. */\nexport function attachTarget(tabs: TabInfo[], activeId: string | undefined, canAttach: (url: string) => boolean, recent: string[] = []): TabInfo | null {\n const active = tabs.find(tab => tab.id === activeId);\n if (active && canAttach(active.url)) return active;\n for (const id of recent) {\n const tab = tabs.find(candidate => candidate.id === id);\n if (tab && canAttach(tab.url)) return tab;\n }\n return tabs.find(tab => canAttach(tab.url)) ?? null;\n}\n\n/** Gallery folders shown as their last path segment (Windows or POSIX separators). */\nexport function folderLabel(folder: string): string {\n const parts = folder.split(/[\\\\/]+/).filter(Boolean);\n return parts[parts.length - 1] ?? folder;\n}\n\nexport function clampClipMax(value: number): number {\n if (!Number.isFinite(value)) return 30;\n return Math.min(CLIP_MAX_LIMIT, Math.max(1, Math.round(value)));\n}\n\n/** Removing a folder is the only folder change the shell can make; adding goes through the native dialog. */\nexport function withoutFolder(settings: MediaSettings, folder: string): MediaSettings {\n return { ...settings, folders: settings.folders.filter(f => f !== folder) };\n}\n\nexport function clipPreview(item: ClipItem, max = 80): string {\n if (item.kind === 'image') return t('wb.media.image');\n const flat = (item.text ?? '').replace(/\\s+/g, ' ').trim();\n return flat.length > max ? `${flat.slice(0, max - 1)}…` : flat;\n}\n\nexport function relativeTime(ms: number, now = Date.now()): string {\n const seconds = Math.max(0, Math.round((now - ms) / 1000));\n if (seconds < 60) return t('wb.media.now');\n // Compact units in the active language (\"5m\", \"5 dk\", \"5分\").\n const unit = (value: number, name: 'minute' | 'hour' | 'day') => formatNumber(value, { style: 'unit', unit: name, unitDisplay: 'narrow' });\n const minutes = Math.round(seconds / 60);\n if (minutes < 60) return unit(minutes, 'minute');\n const hours = Math.round(minutes / 60);\n if (hours < 24) return unit(hours, 'hour');\n return unit(Math.round(hours / 24), 'day');\n}\n"]}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"wb.menu.label": "Settings and more",
|
|
3
|
+
"wb.menu.accountsRow": "Settings and more…",
|
|
4
|
+
"wb.menu.newColumn": "New deck column",
|
|
5
|
+
"wb.menu.theme": "Theme",
|
|
6
|
+
"wb.menu.moreAppearance": "More in Appearance…",
|
|
7
|
+
"wb.menu.moreLanguages": "More languages…",
|
|
8
|
+
"wb.menu.zoom": "Zoom",
|
|
9
|
+
"wb.menu.zoomIn": "Zoom in",
|
|
10
|
+
"wb.menu.zoomOut": "Zoom out",
|
|
11
|
+
"wb.menu.zoomReset": "Reset zoom",
|
|
12
|
+
"wb.menu.zoomNone": "This tab has no page to zoom",
|
|
13
|
+
"wb.menu.zoomChip": "Zoom {percent}. Click to reset.",
|
|
14
|
+
"wb.menu.saveLayout": "Save layout…",
|
|
15
|
+
"wb.menu.noWorkspaces": "No saved workspaces yet",
|
|
16
|
+
"wb.menu.shortcuts": "Keyboard shortcuts…",
|
|
17
|
+
"wb.menu.palette": "Command palette",
|
|
18
|
+
"wb.menu.developer": "Developer",
|
|
19
|
+
"wb.menu.pluginsFolder": "Open plugins folder",
|
|
20
|
+
"wb.menu.about": "About {product}",
|
|
21
|
+
"wb.menu.section": "{section}…",
|
|
22
|
+
"wb.menu.find": "Find in page…",
|
|
23
|
+
"wb.menu.findField": "Find in page",
|
|
24
|
+
"wb.menu.findHint": "Finds what this page has loaded so far",
|
|
25
|
+
"wb.menu.findCount": "{index}/{count}",
|
|
26
|
+
"wb.menu.findTotal": "{count, plural, one {# match} other {# matches}}",
|
|
27
|
+
"wb.menu.findNone": "No matches",
|
|
28
|
+
"wb.menu.findNext": "Next match",
|
|
29
|
+
"wb.menu.findPrevious": "Previous match",
|
|
30
|
+
"wb.menu.findClose": "Close find bar",
|
|
31
|
+
"wb.menu.updateCheck": "Check for updates",
|
|
32
|
+
"wb.menu.updateChecking": "Checking…",
|
|
33
|
+
"wb.menu.updateUpToDate": "Up to date",
|
|
34
|
+
"wb.menu.updateUpToDateVersion": "Up to date · {version}",
|
|
35
|
+
"wb.menu.updateDownloading": "Downloading {version}…",
|
|
36
|
+
"wb.menu.updateInstalling": "Installing {version}…",
|
|
37
|
+
"wb.menu.updateRestart": "Restart to update",
|
|
38
|
+
"wb.menu.updateFailed": "Could not check",
|
|
39
|
+
"wb.menu.updateFailedHint": "The update server did not answer. Nothing is wrong with the app; it checks again later on its own.",
|
|
40
|
+
"wb.menu.safe": "Safe mode",
|
|
41
|
+
"wb.menu.safeRestart": "Restart in safe mode…",
|
|
42
|
+
"wb.menu.safeQuestion": "Restart the tabs in safe mode?",
|
|
43
|
+
"wb.menu.safeExplain": "Every tab loads again with plugins, themes, custom CSS and page features off, for this run only. Your setup is back the next time you start the app.",
|
|
44
|
+
"wb.menu.safeConfirm": "Restart tabs in safe mode",
|
|
45
|
+
"wb.menu.safeLeave": "Leave safe mode",
|
|
46
|
+
"wb.menu.safeLeaveShort": "Leave",
|
|
47
|
+
"wb.menu.safeChip": "Safe mode is on: plugins, themes, custom CSS and page features are off for this run. Click to leave; the tabs load again with your setup.",
|
|
48
|
+
"wb.menu.report": "Report a problem…",
|
|
49
|
+
"wb.menu.reportTitle": "Report a problem",
|
|
50
|
+
"wb.menu.reportLede": "This is everything the report contains: versions and what is switched on. No account, no address, nothing from the pages you have open. Copy it, then paste it into your report.",
|
|
51
|
+
"wb.menu.reportOpen": "Open the issue page",
|
|
52
|
+
"wb.menu.reportNoPage": "This app has no public issue page yet. Copy the text and send it to the developer.",
|
|
53
|
+
"wb.menu.strings": "Languages",
|
|
54
|
+
"wb.menu.barFile": "File",
|
|
55
|
+
"wb.menu.barEdit": "Edit",
|
|
56
|
+
"wb.menu.barView": "View",
|
|
57
|
+
"wb.menu.barAccount": "Account",
|
|
58
|
+
"wb.menu.barPlugins": "Plugins",
|
|
59
|
+
"wb.menu.barWindow": "Window",
|
|
60
|
+
"wb.menu.barHelp": "Help",
|
|
61
|
+
"wb.menu.appHide": "Hide {product}",
|
|
62
|
+
"wb.menu.appHideOthers": "Hide Others",
|
|
63
|
+
"wb.menu.appShowAll": "Show All",
|
|
64
|
+
"wb.menu.appQuit": "Quit {product}",
|
|
65
|
+
"wb.menu.appServices": "Services",
|
|
66
|
+
"wb.menu.appUpdates": "Check for Updates…",
|
|
67
|
+
"wb.menu.appSettings": "Settings…",
|
|
68
|
+
"wb.menu.appSafe": "Safe Mode",
|
|
69
|
+
"wb.menu.fileClose": "Close Tab",
|
|
70
|
+
"wb.menu.fileInstall": "Install from File…",
|
|
71
|
+
"wb.menu.fileShare": "Share My Setup…",
|
|
72
|
+
"wb.menu.editUndo": "Undo",
|
|
73
|
+
"wb.menu.editRedo": "Redo",
|
|
74
|
+
"wb.menu.editCut": "Cut",
|
|
75
|
+
"wb.menu.editCopy": "Copy",
|
|
76
|
+
"wb.menu.editPaste": "Paste",
|
|
77
|
+
"wb.menu.editSelectAll": "Select All",
|
|
78
|
+
"wb.menu.editFind": "Find…",
|
|
79
|
+
"wb.menu.editFindNext": "Find Next",
|
|
80
|
+
"wb.menu.editFindPrevious": "Find Previous",
|
|
81
|
+
"wb.menu.viewZoomIn": "Zoom In",
|
|
82
|
+
"wb.menu.viewZoomOut": "Zoom Out",
|
|
83
|
+
"wb.menu.viewActual": "Actual Size",
|
|
84
|
+
"wb.menu.viewIconPack": "Icon Pack",
|
|
85
|
+
"wb.menu.viewDeck": "Deck",
|
|
86
|
+
"wb.menu.viewFullScreen": "Enter Full Screen",
|
|
87
|
+
"wb.menu.acctNone": "No accounts yet",
|
|
88
|
+
"wb.menu.acctAdd": "Add Account…",
|
|
89
|
+
"wb.menu.plugStore": "Store…",
|
|
90
|
+
"wb.menu.plugFolder": "Open Plugins Folder…",
|
|
91
|
+
"wb.menu.winMinimize": "Minimize",
|
|
92
|
+
"wb.menu.winZoom": "Zoom",
|
|
93
|
+
"wb.menu.winWorkspaces": "Workspaces",
|
|
94
|
+
"wb.menu.helpDocs": "Docs",
|
|
95
|
+
"wb.menu.helpReport": "Report a Problem…"
|
|
96
|
+
}
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import type { UpdateStatus } from '../updateModel.ts';
|
|
2
|
+
import EN from './menuMessages.en.json';
|
|
3
|
+
import { type Params } from './i18n.ts';
|
|
4
|
+
import type { IconName } from './icons.tsx';
|
|
5
|
+
import type { Choice } from './nativeMenuModel.ts';
|
|
6
|
+
/** The menu's English (`wb.menu.*`), for the catalogs. */
|
|
7
|
+
export declare const MENU_MESSAGES: Readonly<Record<string, string>>;
|
|
8
|
+
type MenuKey = keyof typeof EN;
|
|
9
|
+
/** A menu message's name: its key without the `wb.menu.` prefix. */
|
|
10
|
+
export type MenuWord = MenuKey extends `wb.menu.${infer Name}` ? Name : never;
|
|
11
|
+
/** A menu message in the active language; English from menuMessages.en.json until a catalog has it. */
|
|
12
|
+
export declare function menuText(name: MenuWord, params?: Params): string;
|
|
13
|
+
/** The rows the frame brings. Each shows only when the app serves what it needs (`builtinAvailable`). */
|
|
14
|
+
export declare const MENU_BUILTINS: readonly ["new-tab", "split-right", "split-down", "new-column", "language", "theme", "mode", "zoom", "plugins", "store", "strings", "workspaces", "find", "shortcuts", "palette", "developer", "updates", "safe-mode", "report", "about", "settings"];
|
|
15
|
+
export type BuiltinMenuItem = typeof MENU_BUILTINS[number];
|
|
16
|
+
/** A row of the app's own. */
|
|
17
|
+
export type MenuItemSpec = {
|
|
18
|
+
/** Unique in the menu (never a built-in's name). */
|
|
19
|
+
id: string;
|
|
20
|
+
label(): string;
|
|
21
|
+
icon?: IconName;
|
|
22
|
+
/** Its keys, written like `Ctrl+Shift+D` (shown as the platform writes them; the app handles the keys). */
|
|
23
|
+
shortcut?: string;
|
|
24
|
+
/** Quiet text at the end of the row instead of a shortcut (a count, a version). */
|
|
25
|
+
hint?(): string;
|
|
26
|
+
/** Leave the row out while this is false. */
|
|
27
|
+
when?(): boolean;
|
|
28
|
+
/** A toggle: the row is a checkbox showing this state; `run` flips it. */
|
|
29
|
+
checked?(): boolean;
|
|
30
|
+
run?(): void | Promise<void>;
|
|
31
|
+
/** A submenu instead of an action (its rows may have submenus of their own). */
|
|
32
|
+
submenu?(): MenuItemSpec[];
|
|
33
|
+
/** Starts a new group (a rule above this row) inside a submenu. */
|
|
34
|
+
separated?: boolean;
|
|
35
|
+
/** The menu stays open after `run` (a toggle someone may flip back). */
|
|
36
|
+
keepOpen?: boolean;
|
|
37
|
+
};
|
|
38
|
+
export type MenuEntry = BuiltinMenuItem | MenuItemSpec;
|
|
39
|
+
/** Ordered groups; a rule is drawn between two groups. */
|
|
40
|
+
export type MenuGroups = ReadonlyArray<ReadonlyArray<MenuEntry>>;
|
|
41
|
+
/** One language of the app (a row of its `languages.json`). */
|
|
42
|
+
export type MenuLanguage = {
|
|
43
|
+
code: string;
|
|
44
|
+
name: string;
|
|
45
|
+
englishName: string;
|
|
46
|
+
dir: 'ltr' | 'rtl';
|
|
47
|
+
tier: 'supported' | 'community';
|
|
48
|
+
};
|
|
49
|
+
/** The app's language state (frame/language.ts `createLanguage`), as the panel's picker takes it. */
|
|
50
|
+
export type MenuLanguages = {
|
|
51
|
+
list: readonly MenuLanguage[];
|
|
52
|
+
state(): {
|
|
53
|
+
preference: string;
|
|
54
|
+
siteLang: string | null;
|
|
55
|
+
locale: string;
|
|
56
|
+
};
|
|
57
|
+
subscribe(listener: () => void): () => void;
|
|
58
|
+
set(preference: string): Promise<void>;
|
|
59
|
+
};
|
|
60
|
+
/** The app's modes (Basic / Advanced / Power User): the panel's `menuModes()` gives this. */
|
|
61
|
+
export type MenuModes = {
|
|
62
|
+
list(): ReadonlyArray<{
|
|
63
|
+
id: string;
|
|
64
|
+
label: string;
|
|
65
|
+
}>;
|
|
66
|
+
/** The mode in use (null: none chosen yet). */
|
|
67
|
+
current(): Promise<string | null>;
|
|
68
|
+
/** How many of the owner's own changes choosing `to` would replace (0: nothing to ask). */
|
|
69
|
+
changes(to: string): Promise<number>;
|
|
70
|
+
/** Applies `to`, keeping the owner's own changes or not. */
|
|
71
|
+
apply(to: string, keep: boolean): Promise<void>;
|
|
72
|
+
/** How the features relate to the mode in use (omit: the menu never says "custom"). */
|
|
73
|
+
status?(): Promise<MenuModeStatus>;
|
|
74
|
+
/** Applies the mode in use again as it is now: exactly what `status()` listed. */
|
|
75
|
+
reapply?(): Promise<void>;
|
|
76
|
+
/** The "new features" note was looked at; it is not shown again. */
|
|
77
|
+
seen?(): Promise<void>;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* A mode is a starting point. `custom`: the features are no longer what the mode starts from;
|
|
81
|
+
* `on` / `off`: the names of what applying it again would turn on and off; `added`: how many of
|
|
82
|
+
* those the mode gained in an update since it was applied.
|
|
83
|
+
*/
|
|
84
|
+
export type MenuModeStatus = {
|
|
85
|
+
custom: boolean;
|
|
86
|
+
on: string[];
|
|
87
|
+
off: string[];
|
|
88
|
+
added: number;
|
|
89
|
+
};
|
|
90
|
+
/** Lines an app adds to the "Report a problem" summary (reportModel.ts): ids only, never anything about the person. */
|
|
91
|
+
export type ReportDetails = ReadonlyArray<{
|
|
92
|
+
label: string;
|
|
93
|
+
values: readonly string[];
|
|
94
|
+
}>;
|
|
95
|
+
/** Where the app menu's trigger is (`ShellMenu.trigger`). */
|
|
96
|
+
export type AppMenuTrigger = 'pane' | 'button' | 'logo';
|
|
97
|
+
/** The trigger in use: `AppMenu`'s own `trigger` (`true` / `false` are the older `button` / `logo`), else the app's, else `pane`. */
|
|
98
|
+
export declare function resolveTrigger(trigger: AppMenuTrigger | boolean | undefined, configured: AppMenuTrigger | undefined): AppMenuTrigger;
|
|
99
|
+
/**
|
|
100
|
+
* What an app adds to the native menu bar (macOS; nativeMenu.ts): lists the frame cannot know, and the
|
|
101
|
+
* actions only the app can run. Whatever is omitted leaves its item out of the bar.
|
|
102
|
+
*/
|
|
103
|
+
export type NativeMenuApp = {
|
|
104
|
+
/** The Plugins menu's checked rows (the app's plugin or area switches) and what flipping one does. */
|
|
105
|
+
plugins?: {
|
|
106
|
+
list(): Choice[] | Promise<Choice[]>;
|
|
107
|
+
set(id: string, on: boolean): Promise<void> | void;
|
|
108
|
+
subscribe?(listener: () => void): () => void;
|
|
109
|
+
};
|
|
110
|
+
/** View > Icon Pack: the packs and picking one. */
|
|
111
|
+
iconPacks?: {
|
|
112
|
+
list(): Choice[];
|
|
113
|
+
set(id: string): Promise<void> | void;
|
|
114
|
+
subscribe?(listener: () => void): () => void;
|
|
115
|
+
};
|
|
116
|
+
/** File > Install from File…: asks for a file and stages it on the normal install screen. */
|
|
117
|
+
installFromFile?(): void;
|
|
118
|
+
/** File > Share My Setup…. */
|
|
119
|
+
shareSetup?(): void;
|
|
120
|
+
/** Help > Docs. */
|
|
121
|
+
docs?(): void;
|
|
122
|
+
/** Help > the project's site: the label shown (a host name) and the https address opened in the browser. */
|
|
123
|
+
website?: {
|
|
124
|
+
label: string;
|
|
125
|
+
url: string;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
/** `ShellSite.menu`: the app menu's rows and what the built-in ones need from the app. */
|
|
129
|
+
export type ShellMenu = {
|
|
130
|
+
/**
|
|
131
|
+
* What opens the menu with a click: `pane` (default), each pane's wayBetter button at the end of
|
|
132
|
+
* its toolbar (the menu hangs under the button that was clicked); `button`, a "⋮" button at the
|
|
133
|
+
* end of the titlebar; `logo`, the titlebar's logo. Keys and other requests open it at the same place.
|
|
134
|
+
*/
|
|
135
|
+
trigger?: AppMenuTrigger;
|
|
136
|
+
/** The rows, in order. A string is a built-in row, an object one of the app's. Default: `DEFAULT_MENU`. */
|
|
137
|
+
groups?: MenuGroups;
|
|
138
|
+
/** The Language submenu; omit for an app in one language. */
|
|
139
|
+
languages?: MenuLanguages;
|
|
140
|
+
/** The Mode submenu; omit for an app without modes. */
|
|
141
|
+
modes?: MenuModes;
|
|
142
|
+
/** The app's version, shown on the Updates row. */
|
|
143
|
+
version?(): Promise<string>;
|
|
144
|
+
/**
|
|
145
|
+
* "Report a problem": the project's new-issue page (https; opened bare in the system browser, the
|
|
146
|
+
* summary is never put in the URL) and lines the app adds to the summary (a fixed English label
|
|
147
|
+
* and ids: what paused itself, which areas are on). Without `issueUrl` the dialog still shows and
|
|
148
|
+
* copies the summary; its button is off and says there is no public page yet.
|
|
149
|
+
*/
|
|
150
|
+
report?: {
|
|
151
|
+
issueUrl?: string;
|
|
152
|
+
details?(): ReportDetails | Promise<ReportDetails>;
|
|
153
|
+
};
|
|
154
|
+
/** Opens the app's shortcuts sheet ("Keyboard shortcuts…"); without one the row opens the command palette. */
|
|
155
|
+
shortcuts?(): void;
|
|
156
|
+
/** The native menu bar (macOS): the app's lists and actions. */
|
|
157
|
+
native?: NativeMenuApp;
|
|
158
|
+
};
|
|
159
|
+
/** The menu an app gets without saying anything: every built-in row it can serve. */
|
|
160
|
+
export declare const DEFAULT_MENU: MenuGroups;
|
|
161
|
+
/** `groups` with the app's `items` put next to the row `anchor` (after it, or before). Without that row they form a last group. */
|
|
162
|
+
export declare function menuWith(groups: MenuGroups, anchor: string, items: readonly MenuEntry[], where?: 'after' | 'before'): MenuGroups;
|
|
163
|
+
/** `groups` without the rows named. */
|
|
164
|
+
export declare function menuWithout(groups: MenuGroups, ...ids: string[]): MenuGroups;
|
|
165
|
+
/** What the app serves, as far as the built-in rows care. */
|
|
166
|
+
export type MenuEnv = {
|
|
167
|
+
/** Decks of site columns (`site.deck`). */
|
|
168
|
+
decks: boolean;
|
|
169
|
+
/** `menu.languages`. */
|
|
170
|
+
languages: boolean;
|
|
171
|
+
/** `site.themes`. */
|
|
172
|
+
themes: boolean;
|
|
173
|
+
/** `menu.modes` with at least one mode. */
|
|
174
|
+
modes: boolean;
|
|
175
|
+
/** `features`: native page zoom (`tab_zoom`), find in page (`tab_find`), the Store, workspaces, developer mode, the updater. */
|
|
176
|
+
zoom: boolean;
|
|
177
|
+
find: boolean;
|
|
178
|
+
/** `features.safeMode`: safe mode for one run (`safe_mode_get/set`, the host's own). */
|
|
179
|
+
safeMode: boolean;
|
|
180
|
+
store: boolean;
|
|
181
|
+
/** `features.strings`: the panel has the Languages section (string packs). */
|
|
182
|
+
strings: boolean;
|
|
183
|
+
workspaces: boolean;
|
|
184
|
+
developer: boolean;
|
|
185
|
+
updates: boolean;
|
|
186
|
+
};
|
|
187
|
+
/** Whether the app can serve a built-in row: a row that would do nothing is never shown. */
|
|
188
|
+
export declare function builtinAvailable(id: BuiltinMenuItem, env: MenuEnv): boolean;
|
|
189
|
+
/**
|
|
190
|
+
* The entries the menu shows, group by group: built-in rows the app cannot serve and rows whose
|
|
191
|
+
* `when()` says no are left out, a row listed twice shows once, a group left empty goes (so no
|
|
192
|
+
* rule is ever doubled), and an unknown name is ignored.
|
|
193
|
+
*/
|
|
194
|
+
export declare function planMenu(groups: MenuGroups, env: MenuEnv): MenuEntry[][];
|
|
195
|
+
export type MenuItemRow = {
|
|
196
|
+
kind: 'item';
|
|
197
|
+
id: string;
|
|
198
|
+
label: string;
|
|
199
|
+
icon?: IconName;
|
|
200
|
+
shortcut?: string;
|
|
201
|
+
hint?: string;
|
|
202
|
+
disabled?: boolean;
|
|
203
|
+
/** A choice among its neighbours (radio) or a toggle (checkbox), with `checked`. */
|
|
204
|
+
check?: 'radio' | 'checkbox';
|
|
205
|
+
checked?: boolean;
|
|
206
|
+
/** Opens a submenu (its rows come from the menu, by this row's id). */
|
|
207
|
+
submenu?: boolean;
|
|
208
|
+
keepOpen?: boolean;
|
|
209
|
+
/** The label's own language and direction (a language's native name). */
|
|
210
|
+
lang?: string;
|
|
211
|
+
dir?: 'ltr' | 'rtl';
|
|
212
|
+
/** The row's tooltip (a plain sentence that does not fit the row). */
|
|
213
|
+
title?: string;
|
|
214
|
+
/** A theme's colors, drawn as three dots (`ThemeAdapter.dots`). */
|
|
215
|
+
swatch?: {
|
|
216
|
+
page: string;
|
|
217
|
+
bg: string;
|
|
218
|
+
border: string;
|
|
219
|
+
text: string;
|
|
220
|
+
accent: string;
|
|
221
|
+
};
|
|
222
|
+
run?(): unknown;
|
|
223
|
+
};
|
|
224
|
+
export type MenuRow = MenuItemRow | {
|
|
225
|
+
kind: 'separator';
|
|
226
|
+
}
|
|
227
|
+
/** Words that are not a choice: a question above its answers, an empty list, an error. */
|
|
228
|
+
| {
|
|
229
|
+
kind: 'note';
|
|
230
|
+
id: string;
|
|
231
|
+
title: string;
|
|
232
|
+
text?: string;
|
|
233
|
+
tone?: 'error';
|
|
234
|
+
}
|
|
235
|
+
/** The zoom row: − 100% + and a reset, in one line. */
|
|
236
|
+
| {
|
|
237
|
+
kind: 'zoom';
|
|
238
|
+
id: 'zoom';
|
|
239
|
+
};
|
|
240
|
+
/** Groups of rows as one list with a rule between two groups. */
|
|
241
|
+
export declare function joinGroups(groups: ReadonlyArray<readonly MenuRow[]>): MenuRow[];
|
|
242
|
+
/** The app's own entries as rows (`submenu` rows are looked up again when they open). */
|
|
243
|
+
export declare function specRows(specs: readonly MenuItemSpec[]): MenuRow[];
|
|
244
|
+
/** The app's entry with this id, anywhere in its groups or their submenus. */
|
|
245
|
+
export declare function findSpec(groups: MenuGroups, id: string): MenuItemSpec | null;
|
|
246
|
+
/** Arrow keys, Home and End over `count` stops; wraps around. -1 (nothing focused) enters at an end. */
|
|
247
|
+
export declare function moveStop(index: number, key: string, count: number): number;
|
|
248
|
+
/**
|
|
249
|
+
* Type-ahead: the next stop after `from` whose label starts with what was typed (accents and case
|
|
250
|
+
* ignored). One letter typed again cycles through the labels that start with it. -1: none.
|
|
251
|
+
*/
|
|
252
|
+
export declare function typeahead(labels: readonly string[], from: number, typed: string): number;
|
|
253
|
+
/** The keys that open and close a submenu: they follow the reading direction. */
|
|
254
|
+
export declare function submenuKeys(rtl: boolean): {
|
|
255
|
+
open: string;
|
|
256
|
+
close: string;
|
|
257
|
+
};
|
|
258
|
+
/**
|
|
259
|
+
* The left edge of a submenu `width` wide beside its menu (`parent`), in a window `viewport` wide.
|
|
260
|
+
* The menu hangs at one edge of the window (under its button at the end, under the logo at the
|
|
261
|
+
* start): the submenu opens toward the middle, else on the other side, else over the menu, and
|
|
262
|
+
* always stays `edge` pixels inside the window.
|
|
263
|
+
*/
|
|
264
|
+
export declare function submenuLeft(parent: {
|
|
265
|
+
left: number;
|
|
266
|
+
right: number;
|
|
267
|
+
}, width: number, viewport: number, edge?: number): number;
|
|
268
|
+
/** A shortcut as the platform writes it: `Ctrl+Shift+T` on Windows and Linux, `⇧⌘T` on macOS. */
|
|
269
|
+
export declare function shortcutText(shortcut: string, mac: boolean): string;
|
|
270
|
+
/**
|
|
271
|
+
* The Language submenu: follow the site, follow the system, then the supported languages by their
|
|
272
|
+
* own names (the one chosen is checked; a community language in use is listed too, so the check is
|
|
273
|
+
* never missing), then the way to the full list in Settings.
|
|
274
|
+
*/
|
|
275
|
+
export declare function languageRows(list: readonly MenuLanguage[], state: {
|
|
276
|
+
preference: string;
|
|
277
|
+
siteLang: string | null;
|
|
278
|
+
locale: string;
|
|
279
|
+
}, words: {
|
|
280
|
+
site: string;
|
|
281
|
+
system: string;
|
|
282
|
+
more: string;
|
|
283
|
+
}): MenuRow[];
|
|
284
|
+
/** The preference a Language row stands for (`lang:tr` → `tr`), or null for "More languages…". */
|
|
285
|
+
export declare function languageChoice(id: string): string | null;
|
|
286
|
+
/** Page zoom limits, as native code clamps them (waybetter-host `zoom.rs`). */
|
|
287
|
+
export declare const ZOOM_MIN = 0.25;
|
|
288
|
+
export declare const ZOOM_MAX = 5;
|
|
289
|
+
/** The steps − and + move through (a browser's). */
|
|
290
|
+
export declare const ZOOM_STEPS: readonly [0.25, 0.33, 0.5, 0.67, 0.75, 0.8, 0.9, 1, 1.1, 1.25, 1.5, 1.75, 2, 2.5, 3, 4, 5];
|
|
291
|
+
/** The next step up (`1`) or down (`-1`) from `factor`, or 100% (`0`). Stays inside the limits. */
|
|
292
|
+
export declare function zoomStep(factor: number, direction: 1 | -1 | 0): number;
|
|
293
|
+
/** The Updates row: what it says and what choosing it does. */
|
|
294
|
+
export type UpdateRow = {
|
|
295
|
+
label: string;
|
|
296
|
+
/** Quiet text at the end of the row: the state, or the version while nothing is happening. */
|
|
297
|
+
hint?: string;
|
|
298
|
+
/** A plain sentence for the row's tooltip (why a check did not get through). */
|
|
299
|
+
title?: string;
|
|
300
|
+
/** `check`: ask the updater now. `restart`: install the downloaded update. `open`: the Updates section. `wait`: nothing, a step is running. */
|
|
301
|
+
action: 'check' | 'restart' | 'open' | 'wait';
|
|
302
|
+
};
|
|
303
|
+
/**
|
|
304
|
+
* The Updates row for the updater's status. `asked`: the owner asked for a check in this menu;
|
|
305
|
+
* only then does a check that did not get through say so (the timer's own failures stay quiet),
|
|
306
|
+
* and it says it calmly: a short state, never the error text.
|
|
307
|
+
*/
|
|
308
|
+
export declare function updateRow(status: UpdateStatus, asked: boolean, version: string): UpdateRow;
|
|
309
|
+
/**
|
|
310
|
+
* What the find bar says about a search: "3/17" (the active match of the total), the total alone
|
|
311
|
+
* while no match is active, "No matches" for none. `number` writes a number in the active language.
|
|
312
|
+
*/
|
|
313
|
+
export declare function findLabel(counts: {
|
|
314
|
+
count: number;
|
|
315
|
+
index: number;
|
|
316
|
+
}, number?: (value: number) => string): string;
|
|
317
|
+
/** Whole percent of a factor (1.1 → 110). */
|
|
318
|
+
export declare const zoomPercent: (factor: number) => number;
|
|
319
|
+
export {};
|