waybetter 0.1.1 → 0.6.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 +140 -6
- package/bin/waybetter.mjs +46 -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/privacy.mjs +768 -0
- package/cli/release.mjs +444 -0
- package/cli/remote.mjs +260 -0
- package/cli/store.mjs +326 -0
- package/cli/strings.mjs +121 -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 +59 -0
- package/dist/runtime/stringPackTranslate.js +264 -0
- package/dist/runtime/stringPackTranslate.js.map +1 -0
- package/dist/runtime/stringPacks.d.ts +200 -0
- package/dist/runtime/stringPacks.js +474 -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/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 +463 -0
- package/dist/runtime/themeComponents.js.map +1 -0
- package/dist/runtime/themeDecor.d.ts +73 -0
- package/dist/runtime/themeDecor.js +131 -0
- package/dist/runtime/themeDecor.js.map +1 -0
- package/dist/runtime/themeDoctor.d.ts +11 -0
- package/dist/runtime/themeDoctor.js +51 -0
- package/dist/runtime/themeDoctor.js.map +1 -0
- package/dist/runtime/themeIcons.d.ts +130 -0
- package/dist/runtime/themeIcons.js +263 -0
- package/dist/runtime/themeIcons.js.map +1 -0
- package/dist/runtime/themeRuntime.d.ts +100 -0
- package/dist/runtime/themeRuntime.js +497 -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 +259 -0
- package/dist/runtime/themeSpec.js +439 -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 +170 -0
- package/dist/shell/InstallDialog.js.map +1 -0
- package/dist/shell/StoreView.d.ts +66 -0
- package/dist/shell/StoreView.js +103 -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 +21 -0
- package/dist/shell/frame/AppMenu.js +642 -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 +8 -0
- package/dist/shell/frame/Shell.js +1131 -0
- package/dist/shell/frame/Shell.js.map +1 -0
- package/dist/shell/frame/Titlebar.d.ts +16 -0
- package/dist/shell/frame/Titlebar.js +77 -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 +182 -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 +121 -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 +35 -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 +29 -0
- package/dist/shell/frame/chromeTheme.js +81 -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/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 +34 -0
- package/dist/shell/frame/mediaModel.js +53 -0
- package/dist/shell/frame/mediaModel.js.map +1 -0
- package/dist/shell/frame/menuMessages.en.json +54 -0
- package/dist/shell/frame/menuModel.d.ts +277 -0
- package/dist/shell/frame/menuModel.js +293 -0
- package/dist/shell/frame/menuModel.js.map +1 -0
- package/dist/shell/frame/paletteModel.d.ts +139 -0
- package/dist/shell/frame/paletteModel.js +112 -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 +629 -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 +99 -0
- package/dist/shell/frame/state.js +284 -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 +252 -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 +122 -0
- package/dist/shell/installController.js +146 -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 +256 -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 +116 -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 +6 -0
- package/dist/shell/panel/StoreSection.js +48 -0
- package/dist/shell/panel/StoreSection.js.map +1 -0
- package/dist/shell/panel/StringPacks.d.ts +11 -0
- package/dist/shell/panel/StringPacks.js +106 -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 +232 -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 +72 -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 +763 -0
- package/dist/shell/panel/panelMessages.js +767 -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 +230 -0
- package/dist/shell/storeMessages.d.ts +169 -0
- package/dist/shell/storeMessages.js +172 -0
- package/dist/shell/storeMessages.js.map +1 -0
- package/dist/shell/storeModel.d.ts +181 -0
- package/dist/shell/storeModel.js +133 -0
- package/dist/shell/storeModel.js.map +1 -0
- package/dist/shell/stringPacksModel.d.ts +44 -0
- package/dist/shell/stringPacksModel.js +94 -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 +646 -0
- package/languages.schema.json +23 -0
- package/locales/ar-x-fm.json +11 -0
- package/locales/ar.json +1281 -0
- package/locales/bg.json +1280 -0
- package/locales/bn.json +1280 -0
- package/locales/ca.json +1280 -0
- package/locales/cs.json +1280 -0
- package/locales/da.json +1280 -0
- package/locales/de.json +1280 -0
- package/locales/el.json +1280 -0
- package/locales/en-GB.json +27 -0
- package/locales/en.json +1280 -0
- package/locales/en.meta.json +51 -0
- package/locales/es.json +1280 -0
- package/locales/eu.json +1280 -0
- package/locales/fa.json +1281 -0
- package/locales/fi.json +1280 -0
- package/locales/fil.json +1280 -0
- package/locales/fr.json +1280 -0
- package/locales/ga.json +1280 -0
- package/locales/gl.json +1280 -0
- package/locales/gu.json +1280 -0
- package/locales/ha.json +1280 -0
- package/locales/he.json +1281 -0
- package/locales/hi.json +1280 -0
- package/locales/hr.json +1280 -0
- package/locales/hu.json +1279 -0
- package/locales/id.json +1280 -0
- package/locales/ig.json +1280 -0
- package/locales/it.json +1280 -0
- package/locales/ja.json +1280 -0
- package/locales/kn.json +1280 -0
- package/locales/ko.json +1280 -0
- package/locales/mr.json +1280 -0
- package/locales/ms.json +1280 -0
- package/locales/nb.json +1280 -0
- package/locales/nl.json +1280 -0
- package/locales/pl.json +1280 -0
- package/locales/pt.json +1280 -0
- package/locales/ro.json +1280 -0
- package/locales/ru.json +1280 -0
- package/locales/sk.json +1280 -0
- package/locales/sr.json +1280 -0
- package/locales/sv.json +1280 -0
- package/locales/ta.json +1280 -0
- package/locales/th.json +1280 -0
- package/locales/tr.json +1280 -0
- package/locales/uk.json +1280 -0
- package/locales/ur.json +1281 -0
- package/locales/vi.json +1280 -0
- package/locales/yo.json +1280 -0
- package/locales/zh-Hans.json +1280 -0
- package/locales/zh-Hant.json +1280 -0
- package/package.json +139 -5
- package/store-catalog.schema.json +65 -0
- package/theme.schema.json +4659 -0
- package/windows/installer.nsi +926 -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,239 @@
|
|
|
1
|
+
// Decks in the shell: the decks (localStorage `bt.shell.decks.v1`), the deck settings
|
|
2
|
+
// (`bt.shell.deck-settings.v1`), and what each column's webview last reported (unread, address,
|
|
3
|
+
// loading). Columns are real site tab webviews: state.ts lays them out through `columnBoxes()`,
|
|
4
|
+
// and each column's config reaches its page through the shell-only `column_configure` command
|
|
5
|
+
// (validated natively: waybetter-host `tabs::ColumnConfig`). The kinds of columns, their pages and
|
|
6
|
+
// flags are the site's (`site.deck`). Nothing here talks to the site.
|
|
7
|
+
import { DEFAULT_COLUMN_WIDTH, DEFAULT_MAX_VISIBLE, clampWidth, columnUrl, emptyFilters, moveColumn, normalizeDecks, } from "../deckModel.js";
|
|
8
|
+
import { invoke } from "./bridge.js";
|
|
9
|
+
import { site } from "./site.js";
|
|
10
|
+
const DECKS_KEY = 'bt.shell.decks.v1';
|
|
11
|
+
const SETTINGS_KEY = 'bt.shell.deck-settings.v1';
|
|
12
|
+
/** The site's deck, or an empty one (no kinds, no flags) for an app without decks. */
|
|
13
|
+
const deckSite = () => site().deck ?? { kinds: [], urlFor: () => null, title: () => ({ title: '' }), parseValue: () => null, invalid: () => '', flags: [], defaultFlags: {} };
|
|
14
|
+
/** Flags a column may carry: the listed ones and the site's unlisted ones (native code checks them again). */
|
|
15
|
+
export const columnFlagKeys = () => [...deckSite().flags.map(option => option.key), ...(deckSite().extraFlags ?? [])];
|
|
16
|
+
const columnKinds = () => deckSite().kinds.map(kind => kind.kind);
|
|
17
|
+
export const defaultDeckSettings = () => ({
|
|
18
|
+
width: DEFAULT_COLUMN_WIDTH,
|
|
19
|
+
density: 'compact',
|
|
20
|
+
flags: { ...deckSite().defaultFlags },
|
|
21
|
+
maxVisible: DEFAULT_MAX_VISIBLE,
|
|
22
|
+
parkOffPage: true,
|
|
23
|
+
});
|
|
24
|
+
function read(key) {
|
|
25
|
+
try {
|
|
26
|
+
return JSON.parse(localStorage.getItem(key) || 'null');
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function write(key, value) {
|
|
33
|
+
try {
|
|
34
|
+
localStorage.setItem(key, JSON.stringify(value));
|
|
35
|
+
}
|
|
36
|
+
catch { /* best effort */ }
|
|
37
|
+
}
|
|
38
|
+
export function normalizeDeckSettings(value) {
|
|
39
|
+
const defaults = defaultDeckSettings();
|
|
40
|
+
const raw = (value && typeof value === 'object' ? value : {});
|
|
41
|
+
const allowed = columnFlagKeys();
|
|
42
|
+
const flags = {};
|
|
43
|
+
for (const [key, flag] of Object.entries(raw.flags && typeof raw.flags === 'object' ? raw.flags : defaults.flags)) {
|
|
44
|
+
if (allowed.includes(key) && typeof flag === 'boolean')
|
|
45
|
+
flags[key] = flag;
|
|
46
|
+
}
|
|
47
|
+
const maxVisible = typeof raw.maxVisible === 'number' && Number.isFinite(raw.maxVisible) ? Math.round(Math.min(12, Math.max(1, raw.maxVisible))) : defaults.maxVisible;
|
|
48
|
+
return {
|
|
49
|
+
width: raw.width === undefined ? defaults.width : clampWidth(raw.width),
|
|
50
|
+
density: raw.density === 'comfortable' ? 'comfortable' : 'compact',
|
|
51
|
+
flags,
|
|
52
|
+
maxVisible,
|
|
53
|
+
parkOffPage: raw.parkOffPage !== false,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export const decks = {
|
|
57
|
+
list: [],
|
|
58
|
+
/** `defaultDeckSettings()` once the site is set (createShell), then the saved ones (loadDecks). */
|
|
59
|
+
settings: { width: DEFAULT_COLUMN_WIDTH, density: 'compact', flags: {}, maxVisible: DEFAULT_MAX_VISIBLE, parkOffPage: true },
|
|
60
|
+
/** Per column tab: what its webview last reported. */
|
|
61
|
+
runtime: new Map(),
|
|
62
|
+
/** Focused column per deck. */
|
|
63
|
+
focus: new Map(),
|
|
64
|
+
page: new Map(),
|
|
65
|
+
/** Mark-read / jump requests per column tab (the page acts when the number changes). */
|
|
66
|
+
seq: new Map(),
|
|
67
|
+
/** Compose dock per deck: open and in which profile. */
|
|
68
|
+
compose: new Map(),
|
|
69
|
+
/** Last config sent per column tab (JSON), so unchanged configs are not re-sent. */
|
|
70
|
+
sent: new Map(),
|
|
71
|
+
/** Column tabs whose config native code has: only these are laid out (their webview then starts
|
|
72
|
+
* with the site's chrome already hidden). */
|
|
73
|
+
ready: new Set(),
|
|
74
|
+
loaded: false,
|
|
75
|
+
};
|
|
76
|
+
const emit = () => window.dispatchEvent(new CustomEvent('bt-decks'));
|
|
77
|
+
export function loadDecks(profiles, fallbackProfile = 'default') {
|
|
78
|
+
decks.settings = normalizeDeckSettings(read(SETTINGS_KEY));
|
|
79
|
+
decks.list = normalizeDecks(read(DECKS_KEY), { kinds: columnKinds(), profiles, fallbackProfile, flags: columnFlagKeys() });
|
|
80
|
+
decks.loaded = true;
|
|
81
|
+
}
|
|
82
|
+
export function saveDecks() {
|
|
83
|
+
write(DECKS_KEY, decks.list);
|
|
84
|
+
emit();
|
|
85
|
+
}
|
|
86
|
+
export function setDeckSettings(next) {
|
|
87
|
+
decks.settings = normalizeDeckSettings(next);
|
|
88
|
+
write(SETTINGS_KEY, decks.settings);
|
|
89
|
+
// Density and default flags are part of every column's config.
|
|
90
|
+
for (const deck of decks.list)
|
|
91
|
+
for (const column of deck.columns)
|
|
92
|
+
configureColumn(column);
|
|
93
|
+
emit();
|
|
94
|
+
}
|
|
95
|
+
export const deckById = (id) => decks.list.find(deck => deck.id === id);
|
|
96
|
+
export const newId = (prefix) => `${prefix}${Date.now().toString(36)}${Math.random().toString(36).slice(2, 7)}`;
|
|
97
|
+
export function updateDeck(id, change) {
|
|
98
|
+
decks.list = decks.list.map(deck => (deck.id === id ? change(deck) : deck));
|
|
99
|
+
saveDecks();
|
|
100
|
+
}
|
|
101
|
+
export function createDeck(name, columns = []) {
|
|
102
|
+
const deck = { id: newId('d'), name, columns: columns.map(column => makeColumn(column)) };
|
|
103
|
+
decks.list = [...decks.list, deck];
|
|
104
|
+
saveDecks();
|
|
105
|
+
return deck;
|
|
106
|
+
}
|
|
107
|
+
export function makeColumn(input) {
|
|
108
|
+
return {
|
|
109
|
+
id: newId('c'),
|
|
110
|
+
tabId: newId('k'),
|
|
111
|
+
width: decks.settings.width,
|
|
112
|
+
flags: {},
|
|
113
|
+
filters: emptyFilters(),
|
|
114
|
+
...input,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
export function addColumn(deckId, input, after) {
|
|
118
|
+
const column = makeColumn(input);
|
|
119
|
+
updateDeck(deckId, deck => {
|
|
120
|
+
const index = after ? deck.columns.findIndex(c => c.id === after) : -1;
|
|
121
|
+
const columns = [...deck.columns];
|
|
122
|
+
columns.splice(index >= 0 ? index + 1 : columns.length, 0, column);
|
|
123
|
+
return { ...deck, columns };
|
|
124
|
+
});
|
|
125
|
+
decks.focus.set(deckId, column.id);
|
|
126
|
+
return column;
|
|
127
|
+
}
|
|
128
|
+
export function removeColumn(deckId, columnId) {
|
|
129
|
+
const deck = deckById(deckId);
|
|
130
|
+
const column = deck?.columns.find(c => c.id === columnId);
|
|
131
|
+
if (!deck || !column)
|
|
132
|
+
return;
|
|
133
|
+
updateDeck(deckId, d => ({ ...d, columns: d.columns.filter(c => c.id !== columnId) }));
|
|
134
|
+
forgetColumn(column.tabId);
|
|
135
|
+
}
|
|
136
|
+
export function patchColumn(deckId, columnId, patch) {
|
|
137
|
+
updateDeck(deckId, deck => ({ ...deck, columns: deck.columns.map(c => (c.id === columnId ? { ...c, ...patch } : c)) }));
|
|
138
|
+
const column = deckById(deckId)?.columns.find(c => c.id === columnId);
|
|
139
|
+
if (column)
|
|
140
|
+
configureColumn(column);
|
|
141
|
+
}
|
|
142
|
+
export function shiftColumn(deckId, columnId, delta) {
|
|
143
|
+
updateDeck(deckId, deck => ({ ...deck, columns: moveColumn(deck.columns, columnId, delta) }));
|
|
144
|
+
}
|
|
145
|
+
export function forgetColumn(tabId) {
|
|
146
|
+
decks.runtime.delete(tabId);
|
|
147
|
+
decks.seq.delete(tabId);
|
|
148
|
+
decks.sent.delete(tabId);
|
|
149
|
+
decks.ready.delete(tabId);
|
|
150
|
+
invoke('column_configure', { id: tabId, config: null }).catch(() => { });
|
|
151
|
+
}
|
|
152
|
+
export const columnSourceUrl = (source) => columnUrl(source, deckSite().urlFor);
|
|
153
|
+
/** The config a column's page gets (validated natively). */
|
|
154
|
+
export function columnConfig(column) {
|
|
155
|
+
const url = columnSourceUrl(column.source);
|
|
156
|
+
if (!url)
|
|
157
|
+
return null;
|
|
158
|
+
const seq = decks.seq.get(column.tabId) ?? { read: 0, jump: 0 };
|
|
159
|
+
const flags = { ...decks.settings.flags, ...column.flags, ...deckSite().kindFlags?.(column.source) };
|
|
160
|
+
return {
|
|
161
|
+
url,
|
|
162
|
+
kind: column.source.kind,
|
|
163
|
+
density: decks.settings.density,
|
|
164
|
+
filters: column.filters,
|
|
165
|
+
flags,
|
|
166
|
+
unread: true,
|
|
167
|
+
readSeq: seq.read,
|
|
168
|
+
jumpSeq: seq.jump,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
/** Sends a column its config when it changed (or always with `force`, e.g. on mount). */
|
|
172
|
+
export function configureColumn(column, force = false) {
|
|
173
|
+
const config = columnConfig(column);
|
|
174
|
+
const json = JSON.stringify(config);
|
|
175
|
+
if (!force && decks.sent.get(column.tabId) === json)
|
|
176
|
+
return Promise.resolve();
|
|
177
|
+
decks.sent.set(column.tabId, json);
|
|
178
|
+
return invoke('column_configure', { id: column.tabId, config }).then(() => { decks.ready.add(column.tabId); }, error => {
|
|
179
|
+
decks.sent.delete(column.tabId);
|
|
180
|
+
console.error('[deck] column_configure', error);
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
/** The compose dock (`site.deck.compose`) is a column-like webview on the site's compose page. */
|
|
184
|
+
export const composeTabId = (deckId) => `${deckId}-compose`;
|
|
185
|
+
export function configureCompose(deckId) {
|
|
186
|
+
const url = deckSite().compose?.url;
|
|
187
|
+
if (!url)
|
|
188
|
+
return Promise.resolve();
|
|
189
|
+
const id = composeTabId(deckId);
|
|
190
|
+
const config = { url, kind: 'compose', density: decks.settings.density, filters: emptyFilters(), flags: {}, unread: false, readSeq: 0, jumpSeq: 0 };
|
|
191
|
+
const json = JSON.stringify(config);
|
|
192
|
+
if (decks.sent.get(id) === json)
|
|
193
|
+
return Promise.resolve();
|
|
194
|
+
decks.sent.set(id, json);
|
|
195
|
+
return invoke('column_configure', { id, config }).then(() => { decks.ready.add(id); }, () => { decks.sent.delete(id); });
|
|
196
|
+
}
|
|
197
|
+
export function bump(column, which) {
|
|
198
|
+
const seq = decks.seq.get(column.tabId) ?? { read: 0, jump: 0 };
|
|
199
|
+
decks.seq.set(column.tabId, { ...seq, [which]: seq[which] + 1 });
|
|
200
|
+
if (which === 'read')
|
|
201
|
+
setRuntime(column.tabId, { unread: 0 });
|
|
202
|
+
void configureColumn(column);
|
|
203
|
+
}
|
|
204
|
+
export function setRuntime(tabId, patch) {
|
|
205
|
+
const current = decks.runtime.get(tabId) ?? { unread: 0 };
|
|
206
|
+
const next = { ...current, ...Object.fromEntries(Object.entries(patch).filter(([, value]) => value !== undefined)) };
|
|
207
|
+
if (JSON.stringify(next) === JSON.stringify(current))
|
|
208
|
+
return false;
|
|
209
|
+
decks.runtime.set(tabId, next);
|
|
210
|
+
emit();
|
|
211
|
+
return true;
|
|
212
|
+
}
|
|
213
|
+
/** The deck and column a tab webview id belongs to (columns and compose docks), if any. */
|
|
214
|
+
export function findColumnTab(tabId) {
|
|
215
|
+
for (const deck of decks.list) {
|
|
216
|
+
if (composeTabId(deck.id) === tabId)
|
|
217
|
+
return { deck, compose: true };
|
|
218
|
+
const column = deck.columns.find(c => c.tabId === tabId);
|
|
219
|
+
if (column)
|
|
220
|
+
return { deck, column };
|
|
221
|
+
}
|
|
222
|
+
return null;
|
|
223
|
+
}
|
|
224
|
+
/** Workspaces: decks a restored workspace shows that are no longer here come back (by id). */
|
|
225
|
+
export function ensureDecks(list) {
|
|
226
|
+
const incoming = normalizeDecks(list, { kinds: columnKinds(), fallbackProfile: 'default', flags: columnFlagKeys() });
|
|
227
|
+
const missing = incoming.filter(deck => !deckById(deck.id));
|
|
228
|
+
if (!missing.length)
|
|
229
|
+
return;
|
|
230
|
+
decks.list = normalizeDecks([...decks.list, ...missing], { kinds: columnKinds(), fallbackProfile: 'default', flags: columnFlagKeys() });
|
|
231
|
+
saveDecks();
|
|
232
|
+
}
|
|
233
|
+
/** Settings import: the backup's decks and deck settings replace the ones here. */
|
|
234
|
+
export function replaceDecks(list, settings) {
|
|
235
|
+
decks.list = normalizeDecks(list, { kinds: columnKinds(), fallbackProfile: 'default', flags: columnFlagKeys() });
|
|
236
|
+
saveDecks();
|
|
237
|
+
setDeckSettings(normalizeDeckSettings(settings));
|
|
238
|
+
}
|
|
239
|
+
//# sourceMappingURL=deckStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deckStore.js","sourceRoot":"","sources":["../../../../../../shell/src/frame/deckStore.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,gGAAgG;AAChG,gGAAgG;AAChG,8FAA8F;AAC9F,mGAAmG;AACnG,sEAAsE;AAEtE,OAAO,EACL,oBAAoB,EAAE,mBAAmB,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,GAE3G,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,IAAI,EAAiB,MAAM,WAAW,CAAC;AAIhD,MAAM,SAAS,GAAG,mBAAmB,CAAC;AACtC,MAAM,YAAY,GAAG,2BAA2B,CAAC;AAEjD,sFAAsF;AACtF,MAAM,QAA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,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,eAAe,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,CAAC,CAAC;IACjH,SAAS,EAAE,CAAC;IACZ,eAAe,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC,CAAC;AACnD,CAAC","sourcesContent":["// Decks in the shell: the decks (localStorage `bt.shell.decks.v1`), the deck settings\n// (`bt.shell.deck-settings.v1`), and what each column's webview last reported (unread, address,\n// loading). Columns are real site tab webviews: state.ts lays them out through `columnBoxes()`,\n// and each column's config reaches its page through the shell-only `column_configure` command\n// (validated natively: waybetter-host `tabs::ColumnConfig`). The kinds of columns, their pages and\n// flags are the site's (`site.deck`). Nothing here talks to the site.\n\nimport {\n DEFAULT_COLUMN_WIDTH, DEFAULT_MAX_VISIBLE, clampWidth, columnUrl, emptyFilters, moveColumn, normalizeDecks,\n type ColumnFilters, type ColumnSource, type Deck, type DeckColumn,\n} from '../deckModel.ts';\nimport { invoke } from './bridge.ts';\nimport { site, type DeckSite } from './site.ts';\n\nexport type { Deck, DeckColumn, ColumnFilters, ColumnSource };\n\nconst DECKS_KEY = 'bt.shell.decks.v1';\nconst SETTINGS_KEY = 'bt.shell.deck-settings.v1';\n\n/** The site's deck, or an empty one (no kinds, no flags) for an app without decks. */\nconst deckSite = (): DeckSite => site().deck ?? { kinds: [], urlFor: () => null, title: () => ({ title: '' }), parseValue: () => null, invalid: () => '', flags: [], defaultFlags: {} };\n\n/** Flags a column may carry: the listed ones and the site's unlisted ones (native code checks them again). */\nexport const columnFlagKeys = () => [...deckSite().flags.map(option => option.key), ...(deckSite().extraFlags ?? [])];\nconst columnKinds = () => deckSite().kinds.map(kind => kind.kind);\n\nexport type DeckSettings = {\n width: number;\n density: 'compact' | 'comfortable';\n /** Default flags for new columns (and every column that does not override them). */\n flags: Record<string, boolean>;\n /** Visible columns per page; the memory guard warns above DEFAULT_MAX_VISIBLE. */\n maxVisible: number;\n /** Columns on other pages drop to WebView2's low memory target. */\n parkOffPage: boolean;\n};\n\nexport const defaultDeckSettings = (): DeckSettings => ({\n width: DEFAULT_COLUMN_WIDTH,\n density: 'compact',\n flags: { ...deckSite().defaultFlags },\n maxVisible: DEFAULT_MAX_VISIBLE,\n parkOffPage: true,\n});\n\nfunction read<T>(key: string): T | null {\n try { return JSON.parse(localStorage.getItem(key) || 'null') as T; } catch { return null; }\n}\nfunction write(key: string, value: unknown) {\n try { localStorage.setItem(key, JSON.stringify(value)); } catch { /* best effort */ }\n}\n\nexport function normalizeDeckSettings(value: unknown): DeckSettings {\n const defaults = defaultDeckSettings();\n const raw = (value && typeof value === 'object' ? value : {}) as Partial<DeckSettings>;\n const allowed = columnFlagKeys();\n const flags: Record<string, boolean> = {};\n for (const [key, flag] of Object.entries(raw.flags && typeof raw.flags === 'object' ? raw.flags : defaults.flags)) {\n if (allowed.includes(key) && typeof flag === 'boolean') flags[key] = flag;\n }\n const maxVisible = typeof raw.maxVisible === 'number' && Number.isFinite(raw.maxVisible) ? Math.round(Math.min(12, Math.max(1, raw.maxVisible))) : defaults.maxVisible;\n return {\n width: raw.width === undefined ? defaults.width : clampWidth(raw.width),\n density: raw.density === 'comfortable' ? 'comfortable' : 'compact',\n flags,\n maxVisible,\n parkOffPage: raw.parkOffPage !== false,\n };\n}\n\ntype ColumnRuntime = { url?: string; title?: string; loading?: boolean; unread: number };\n\nexport const decks = {\n list: [] as Deck[],\n /** `defaultDeckSettings()` once the site is set (createShell), then the saved ones (loadDecks). */\n settings: { width: DEFAULT_COLUMN_WIDTH, density: 'compact', flags: {}, maxVisible: DEFAULT_MAX_VISIBLE, parkOffPage: true } as DeckSettings,\n /** Per column tab: what its webview last reported. */\n runtime: new Map<string, ColumnRuntime>(),\n /** Focused column per deck. */\n focus: new Map<string, string>(),\n page: new Map<string, number>(),\n /** Mark-read / jump requests per column tab (the page acts when the number changes). */\n seq: new Map<string, { read: number; jump: number }>(),\n /** Compose dock per deck: open and in which profile. */\n compose: new Map<string, { profile: string }>(),\n /** Last config sent per column tab (JSON), so unchanged configs are not re-sent. */\n sent: new Map<string, string>(),\n /** Column tabs whose config native code has: only these are laid out (their webview then starts\n * with the site's chrome already hidden). */\n ready: new Set<string>(),\n loaded: false,\n};\n\nconst emit = () => window.dispatchEvent(new CustomEvent('bt-decks'));\n\nexport function loadDecks(profiles?: readonly string[], fallbackProfile = 'default') {\n decks.settings = normalizeDeckSettings(read(SETTINGS_KEY));\n decks.list = normalizeDecks(read(DECKS_KEY), { kinds: columnKinds(), profiles, fallbackProfile, flags: columnFlagKeys() });\n decks.loaded = true;\n}\n\nexport function saveDecks() {\n write(DECKS_KEY, decks.list);\n emit();\n}\n\nexport function setDeckSettings(next: DeckSettings) {\n decks.settings = normalizeDeckSettings(next);\n write(SETTINGS_KEY, decks.settings);\n // Density and default flags are part of every column's config.\n for (const deck of decks.list) for (const column of deck.columns) configureColumn(column);\n emit();\n}\n\nexport const deckById = (id: string) => decks.list.find(deck => deck.id === id);\nexport const newId = (prefix: string) => `${prefix}${Date.now().toString(36)}${Math.random().toString(36).slice(2, 7)}`;\n\nexport function updateDeck(id: string, change: (deck: Deck) => Deck) {\n decks.list = decks.list.map(deck => (deck.id === id ? change(deck) : deck));\n saveDecks();\n}\n\nexport function createDeck(name: string, columns: Array<Pick<DeckColumn, 'profile' | 'source'> & Partial<DeckColumn>> = []): Deck {\n const deck: Deck = { id: newId('d'), name, columns: columns.map(column => makeColumn(column)) };\n decks.list = [...decks.list, deck];\n saveDecks();\n return deck;\n}\n\nexport function makeColumn(input: Pick<DeckColumn, 'profile' | 'source'> & Partial<DeckColumn>): DeckColumn {\n return {\n id: newId('c'),\n tabId: newId('k'),\n width: decks.settings.width,\n flags: {},\n filters: emptyFilters(),\n ...input,\n };\n}\n\nexport function addColumn(deckId: string, input: Pick<DeckColumn, 'profile' | 'source'> & Partial<DeckColumn>, after?: string): DeckColumn {\n const column = makeColumn(input);\n updateDeck(deckId, deck => {\n const index = after ? deck.columns.findIndex(c => c.id === after) : -1;\n const columns = [...deck.columns];\n columns.splice(index >= 0 ? index + 1 : columns.length, 0, column);\n return { ...deck, columns };\n });\n decks.focus.set(deckId, column.id);\n return column;\n}\n\nexport function removeColumn(deckId: string, columnId: string) {\n const deck = deckById(deckId);\n const column = deck?.columns.find(c => c.id === columnId);\n if (!deck || !column) return;\n updateDeck(deckId, d => ({ ...d, columns: d.columns.filter(c => c.id !== columnId) }));\n forgetColumn(column.tabId);\n}\n\nexport function patchColumn(deckId: string, columnId: string, patch: Partial<DeckColumn>) {\n updateDeck(deckId, deck => ({ ...deck, columns: deck.columns.map(c => (c.id === columnId ? { ...c, ...patch } : c)) }));\n const column = deckById(deckId)?.columns.find(c => c.id === columnId);\n if (column) configureColumn(column);\n}\n\nexport function shiftColumn(deckId: string, columnId: string, delta: number) {\n updateDeck(deckId, deck => ({ ...deck, columns: moveColumn(deck.columns, columnId, delta) }));\n}\n\nexport function forgetColumn(tabId: string) {\n decks.runtime.delete(tabId);\n decks.seq.delete(tabId);\n decks.sent.delete(tabId);\n decks.ready.delete(tabId);\n invoke('column_configure', { id: tabId, config: null }).catch(() => {});\n}\n\nexport const columnSourceUrl = (source: ColumnSource) => columnUrl(source, deckSite().urlFor);\n\n/** The config a column's page gets (validated natively). */\nexport function columnConfig(column: DeckColumn) {\n const url = columnSourceUrl(column.source);\n if (!url) return null;\n const seq = decks.seq.get(column.tabId) ?? { read: 0, jump: 0 };\n const flags: Record<string, boolean> = { ...decks.settings.flags, ...column.flags, ...deckSite().kindFlags?.(column.source) };\n return {\n url,\n kind: column.source.kind,\n density: decks.settings.density,\n filters: column.filters,\n flags,\n unread: true,\n readSeq: seq.read,\n jumpSeq: seq.jump,\n };\n}\n\n/** Sends a column its config when it changed (or always with `force`, e.g. on mount). */\nexport function configureColumn(column: DeckColumn, force = false): Promise<void> {\n const config = columnConfig(column);\n const json = JSON.stringify(config);\n if (!force && decks.sent.get(column.tabId) === json) return Promise.resolve();\n decks.sent.set(column.tabId, json);\n return invoke('column_configure', { id: column.tabId, config }).then(() => { decks.ready.add(column.tabId); }, error => {\n decks.sent.delete(column.tabId);\n console.error('[deck] column_configure', error);\n });\n}\n\n/** The compose dock (`site.deck.compose`) is a column-like webview on the site's compose page. */\nexport const composeTabId = (deckId: string) => `${deckId}-compose`;\nexport function configureCompose(deckId: string): Promise<void> {\n const url = deckSite().compose?.url;\n if (!url) return Promise.resolve();\n const id = composeTabId(deckId);\n const config = { url, kind: 'compose', density: decks.settings.density, filters: emptyFilters(), flags: {}, unread: false, readSeq: 0, jumpSeq: 0 };\n const json = JSON.stringify(config);\n if (decks.sent.get(id) === json) return Promise.resolve();\n decks.sent.set(id, json);\n return invoke('column_configure', { id, config }).then(() => { decks.ready.add(id); }, () => { decks.sent.delete(id); });\n}\n\nexport function bump(column: DeckColumn, which: 'read' | 'jump') {\n const seq = decks.seq.get(column.tabId) ?? { read: 0, jump: 0 };\n decks.seq.set(column.tabId, { ...seq, [which]: seq[which] + 1 });\n if (which === 'read') setRuntime(column.tabId, { unread: 0 });\n void configureColumn(column);\n}\n\nexport function setRuntime(tabId: string, patch: Partial<ColumnRuntime>) {\n const current = decks.runtime.get(tabId) ?? { unread: 0 };\n const next = { ...current, ...Object.fromEntries(Object.entries(patch).filter(([, value]) => value !== undefined)) };\n if (JSON.stringify(next) === JSON.stringify(current)) return false;\n decks.runtime.set(tabId, next);\n emit();\n return true;\n}\n\n/** The deck and column a tab webview id belongs to (columns and compose docks), if any. */\nexport function findColumnTab(tabId: string): { deck: Deck; column?: DeckColumn; compose?: boolean } | null {\n for (const deck of decks.list) {\n if (composeTabId(deck.id) === tabId) return { deck, compose: true };\n const column = deck.columns.find(c => c.tabId === tabId);\n if (column) return { deck, column };\n }\n return null;\n}\n\n/** Workspaces: decks a restored workspace shows that are no longer here come back (by id). */\nexport function ensureDecks(list: unknown[]) {\n const incoming = normalizeDecks(list, { kinds: columnKinds(), fallbackProfile: 'default', flags: columnFlagKeys() });\n const missing = incoming.filter(deck => !deckById(deck.id));\n if (!missing.length) return;\n decks.list = normalizeDecks([...decks.list, ...missing], { kinds: columnKinds(), fallbackProfile: 'default', flags: columnFlagKeys() });\n saveDecks();\n}\n\n/** Settings import: the backup's decks and deck settings replace the ones here. */\nexport function replaceDecks(list: unknown, settings: unknown) {\n decks.list = normalizeDecks(list, { kinds: columnKinds(), fallbackProfile: 'default', flags: columnFlagKeys() });\n saveDecks();\n setDeckSettings(normalizeDeckSettings(settings));\n}\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export { checkPluginSyntax, type SyntaxProblem } from './devModel.ts';
|
|
2
|
+
export type DevErrorInfo = {
|
|
3
|
+
file: string;
|
|
4
|
+
line?: number | null;
|
|
5
|
+
column?: number | null;
|
|
6
|
+
message: string;
|
|
7
|
+
at?: string;
|
|
8
|
+
};
|
|
9
|
+
export type DevEventPayload = {
|
|
10
|
+
kind: 'check';
|
|
11
|
+
file: string;
|
|
12
|
+
source: string;
|
|
13
|
+
} | {
|
|
14
|
+
kind: 'reloaded';
|
|
15
|
+
target: 'plugin' | 'css' | 'theme';
|
|
16
|
+
file?: string | null;
|
|
17
|
+
} | {
|
|
18
|
+
kind: 'error';
|
|
19
|
+
error: DevErrorInfo;
|
|
20
|
+
} | {
|
|
21
|
+
kind: 'changed';
|
|
22
|
+
};
|
|
23
|
+
export declare const dev: {
|
|
24
|
+
enabled: boolean;
|
|
25
|
+
errors: DevErrorInfo[];
|
|
26
|
+
/** The last thing reloaded, for the titlebar chip ("Reloaded focus-mode.plugin.js"). */
|
|
27
|
+
last: {
|
|
28
|
+
text: string;
|
|
29
|
+
at: number;
|
|
30
|
+
} | null;
|
|
31
|
+
};
|
|
32
|
+
export declare function refreshDev(): Promise<void>;
|
|
33
|
+
export declare function installDevHost(): () => void;
|
|
34
|
+
export declare function setDevEnabled(enabled: boolean): void;
|
|
35
|
+
export declare function setDevErrors(errors: DevErrorInfo[]): void;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// Developer mode in the shell: native code watches the plugins folder, custom.css and the chosen
|
|
2
|
+
// theme file (waybetter-host `devmode`) and sends `dev-event`s. A changed plugin arrives as
|
|
3
|
+
// `check` with its source: the shell parses it (devModel.ts, never evaluated) and either asks
|
|
4
|
+
// native code to reload it in every site tab (`dev_reload_plugin`: stop, then start the new
|
|
5
|
+
// version) or reports the syntax error with file, line and column (`dev_report_error`: a toast in
|
|
6
|
+
// the site tabs, the list in the app's developer settings, the titlebar chip). Runtime errors of
|
|
7
|
+
// the new version show in the page.
|
|
8
|
+
import { invoke, listen } from "./bridge.js";
|
|
9
|
+
import { checkPluginSyntax } from "./devModel.js";
|
|
10
|
+
import { t } from "./i18n.js";
|
|
11
|
+
export { checkPluginSyntax } from "./devModel.js";
|
|
12
|
+
export const dev = {
|
|
13
|
+
enabled: false,
|
|
14
|
+
errors: [],
|
|
15
|
+
/** The last thing reloaded, for the titlebar chip ("Reloaded focus-mode.plugin.js"). */
|
|
16
|
+
last: null,
|
|
17
|
+
};
|
|
18
|
+
const emit = () => window.dispatchEvent(new CustomEvent('bt-dev'));
|
|
19
|
+
async function onCheck(file, source) {
|
|
20
|
+
const problem = await checkPluginSyntax(source);
|
|
21
|
+
if (problem) {
|
|
22
|
+
await invoke('dev_report_error', { file, line: problem.line, column: problem.column, message: problem.message }).catch(() => { });
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
await invoke('dev_reload_plugin', { file }).catch(error => {
|
|
26
|
+
dev.errors = [{ file, message: String(error) }, ...dev.errors].slice(0, 20);
|
|
27
|
+
emit();
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
export async function refreshDev() {
|
|
31
|
+
try {
|
|
32
|
+
const status = await invoke('dev_get');
|
|
33
|
+
dev.enabled = status.enabled;
|
|
34
|
+
dev.errors = status.errors ?? [];
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
dev.enabled = false;
|
|
38
|
+
}
|
|
39
|
+
emit();
|
|
40
|
+
}
|
|
41
|
+
export function installDevHost() {
|
|
42
|
+
void refreshDev();
|
|
43
|
+
const off = listen('dev-event', ({ payload }) => {
|
|
44
|
+
if (!payload)
|
|
45
|
+
return;
|
|
46
|
+
if (payload.kind === 'check') {
|
|
47
|
+
void onCheck(payload.file, payload.source);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
// Turned on or off (from the panel or elsewhere): read the state again.
|
|
51
|
+
if (payload.kind === 'changed') {
|
|
52
|
+
void refreshDev();
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
// Only a watching app sends these.
|
|
56
|
+
dev.enabled = true;
|
|
57
|
+
if (payload.kind === 'error') {
|
|
58
|
+
dev.errors = [{ ...payload.error, at: new Date().toISOString() }, ...dev.errors.filter(error => error.file !== payload.error.file)].slice(0, 20);
|
|
59
|
+
}
|
|
60
|
+
else if (payload.kind === 'reloaded') {
|
|
61
|
+
if (payload.file)
|
|
62
|
+
dev.errors = dev.errors.filter(error => error.file !== payload.file);
|
|
63
|
+
dev.last = { text: t('wb.dev.reloaded', { file: payload.file ?? payload.target ?? '' }), at: Date.now() };
|
|
64
|
+
}
|
|
65
|
+
emit();
|
|
66
|
+
window.dispatchEvent(new CustomEvent('bt-dev-event', { detail: payload }));
|
|
67
|
+
});
|
|
68
|
+
return () => { void off.then(dispose => dispose(), () => { }); };
|
|
69
|
+
}
|
|
70
|
+
export function setDevEnabled(enabled) {
|
|
71
|
+
dev.enabled = enabled;
|
|
72
|
+
if (!enabled)
|
|
73
|
+
dev.errors = [];
|
|
74
|
+
emit();
|
|
75
|
+
}
|
|
76
|
+
export function setDevErrors(errors) {
|
|
77
|
+
dev.errors = errors;
|
|
78
|
+
emit();
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=devHost.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devHost.js","sourceRoot":"","sources":["../../../../../../shell/src/frame/devHost.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,4FAA4F;AAC5F,8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AC,EAAE,EAAE,CAAC,CAAC;QACnJ,CAAC;aAAM,IAAI,OAAO,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;YACvC,IAAI,OAAO,CAAC,IAAI;gBAAE,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;YACvF,GAAG,CAAC,IAAI,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,MAAM,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC;QAC5G,CAAC;QACD,IAAI,EAAE,CAAC;QACP,MAAM,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,EAAE,GAAG,KAAK,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,OAAgB;IAC5C,GAAG,CAAC,OAAO,GAAG,OAAO,CAAC;IACtB,IAAI,CAAC,OAAO;QAAE,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC;IAC9B,IAAI,EAAE,CAAC;AACT,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,MAAsB;IACjD,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,EAAE,CAAC;AACT,CAAC","sourcesContent":["// Developer mode in the shell: native code watches the plugins folder, custom.css and the chosen\n// theme file (waybetter-host `devmode`) and sends `dev-event`s. A changed plugin arrives as\n// `check` with its source: the shell parses it (devModel.ts, never evaluated) and either asks\n// native code to reload it in every site tab (`dev_reload_plugin`: stop, then start the new\n// version) or reports the syntax error with file, line and column (`dev_report_error`: a toast in\n// the site tabs, the list in the app's developer settings, the titlebar chip). Runtime errors of\n// the new version show in the page.\n\nimport { invoke, listen } from './bridge.ts';\nimport { checkPluginSyntax } from './devModel.ts';\nimport { t } from './i18n.ts';\n\nexport { checkPluginSyntax, type SyntaxProblem } from './devModel.ts';\n\nexport type DevErrorInfo = { file: string; line?: number | null; column?: number | null; message: string; at?: string };\nexport type DevEventPayload =\n | { kind: 'check'; file: string; source: string }\n | { kind: 'reloaded'; target: 'plugin' | 'css' | 'theme'; file?: string | null }\n | { kind: 'error'; error: DevErrorInfo }\n | { kind: 'changed' };\n\nexport const dev = {\n enabled: false,\n errors: [] as DevErrorInfo[],\n /** The last thing reloaded, for the titlebar chip (\"Reloaded focus-mode.plugin.js\"). */\n last: null as { text: string; at: number } | null,\n};\n\nconst emit = () => window.dispatchEvent(new CustomEvent('bt-dev'));\n\nasync function onCheck(file: string, source: string) {\n const problem = await checkPluginSyntax(source);\n if (problem) {\n await invoke('dev_report_error', { file, line: problem.line, column: problem.column, message: problem.message }).catch(() => {});\n return;\n }\n await invoke('dev_reload_plugin', { file }).catch(error => {\n dev.errors = [{ file, message: String(error) }, ...dev.errors].slice(0, 20);\n emit();\n });\n}\n\nexport async function refreshDev(): Promise<void> {\n try {\n const status = await invoke<{ enabled: boolean; errors: DevErrorInfo[] }>('dev_get');\n dev.enabled = status.enabled;\n dev.errors = status.errors ?? [];\n } catch { dev.enabled = false; }\n emit();\n}\n\nexport function installDevHost(): () => void {\n void refreshDev();\n const off = listen<DevEventPayload>('dev-event', ({ payload }) => {\n if (!payload) return;\n if (payload.kind === 'check') { void onCheck(payload.file, payload.source); return; }\n // Turned on or off (from the panel or elsewhere): read the state again.\n if (payload.kind === 'changed') { void refreshDev(); return; }\n // Only a watching app sends these.\n dev.enabled = true;\n if (payload.kind === 'error') {\n dev.errors = [{ ...payload.error, at: new Date().toISOString() }, ...dev.errors.filter(error => error.file !== payload.error.file)].slice(0, 20);\n } else if (payload.kind === 'reloaded') {\n if (payload.file) dev.errors = dev.errors.filter(error => error.file !== payload.file);\n dev.last = { text: t('wb.dev.reloaded', { file: payload.file ?? payload.target ?? '' }), at: Date.now() };\n }\n emit();\n window.dispatchEvent(new CustomEvent('bt-dev-event', { detail: payload }));\n });\n return () => { void off.then(dispose => dispose(), () => {}); };\n}\n\nexport function setDevEnabled(enabled: boolean) {\n dev.enabled = enabled;\n if (!enabled) dev.errors = [];\n emit();\n}\n\nexport function setDevErrors(errors: DevErrorInfo[]) {\n dev.errors = errors;\n emit();\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Developer mode's syntax gate (pure; unit-tested under node): a changed plugin file is parsed the
|
|
2
|
+
// way the host evaluates it (the body of a CommonJS function), never run, before native code is
|
|
3
|
+
// asked to reload it. Uses acorn (an optional peer dependency of the shell frame).
|
|
4
|
+
/** Null when `source` parses. Line and column are 1-based, in the file. */
|
|
5
|
+
export async function checkPluginSyntax(source) {
|
|
6
|
+
const { parse } = await import('acorn');
|
|
7
|
+
try {
|
|
8
|
+
parse(source.replace(/^/, ''), { ecmaVersion: 'latest', sourceType: 'script', allowReturnOutsideFunction: true, allowHashBang: true, allowAwaitOutsideFunction: false });
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
catch (error) {
|
|
12
|
+
const loc = error.loc;
|
|
13
|
+
const message = (error instanceof Error ? error.message : String(error)).replace(/\s*\(\d+:\d+\)$/, '');
|
|
14
|
+
return { line: loc?.line ?? 1, column: (loc?.column ?? 0) + 1, message: `SyntaxError: ${message}` };
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=devModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devModel.js","sourceRoot":"","sources":["../../../../../../shell/src/frame/devModel.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,gGAAgG;AAChG,mFAAmF;AAInF,2EAA2E;AAC3E,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,MAAc;IACpD,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,CAAC;IACxC,IAAI,CAAC;QACH,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,0BAA0B,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,yBAAyB,EAAE,KAAK,EAAE,CAAC,CAAC;QAC1K,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,GAAG,GAAI,KAAoD,CAAC,GAAG,CAAC;QACtE,MAAM,OAAO,GAAG,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;QACxG,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,gBAAgB,OAAO,EAAE,EAAE,CAAC;IACtG,CAAC;AACH,CAAC","sourcesContent":["// Developer mode's syntax gate (pure; unit-tested under node): a changed plugin file is parsed the\n// way the host evaluates it (the body of a CommonJS function), never run, before native code is\n// asked to reload it. Uses acorn (an optional peer dependency of the shell frame).\n\nexport type SyntaxProblem = { line: number; column: number; message: string };\n\n/** Null when `source` parses. Line and column are 1-based, in the file. */\nexport async function checkPluginSyntax(source: string): Promise<SyntaxProblem | null> {\n const { parse } = await import('acorn');\n try {\n parse(source.replace(/^/, ''), { ecmaVersion: 'latest', sourceType: 'script', allowReturnOutsideFunction: true, allowHashBang: true, allowAwaitOutsideFunction: false });\n return null;\n } catch (error) {\n const loc = (error as { loc?: { line: number; column: number } }).loc;\n const message = (error instanceof Error ? error.message : String(error)).replace(/\\s*\\(\\d+:\\d+\\)$/, '');\n return { line: loc?.line ?? 1, column: (loc?.column ?? 0) + 1, message: `SyntaxError: ${message}` };\n }\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Asks native code once whether diagnostics are on, and starts following the document's focus. */
|
|
2
|
+
export declare function initDiag(): Promise<void>;
|
|
3
|
+
/** An element as a few plain words: its tag and first class (never its text). */
|
|
4
|
+
export declare function describe(element: Element | null): string;
|
|
5
|
+
/** One event line (nothing happens while diagnostics are off). */
|
|
6
|
+
export declare function diag(line: string): void;
|
|
7
|
+
export declare const diagOn: () => boolean;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Focus and layering diagnostics from the shell (waybetter-host `diag.rs`): off unless the app was
|
|
2
|
+
// started with `--diag` (or WAYBETTER_DIAG=1). While on, each event is one short line in the app's
|
|
3
|
+
// log folder (`diag.log`): menu requests and closes with their reason, overlays and raising, native
|
|
4
|
+
// focus calls and the shell document's focus, blur and visibility. Event names and states only;
|
|
5
|
+
// never a URL, a query or page text.
|
|
6
|
+
import { invoke } from "./bridge.js";
|
|
7
|
+
let enabled = false;
|
|
8
|
+
/** Asks native code once whether diagnostics are on, and starts following the document's focus. */
|
|
9
|
+
export async function initDiag() {
|
|
10
|
+
try {
|
|
11
|
+
enabled = await invoke('diag_get') === true;
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
enabled = false;
|
|
15
|
+
}
|
|
16
|
+
if (!enabled)
|
|
17
|
+
return;
|
|
18
|
+
const state = () => `hasFocus=${document.hasFocus()} visible=${document.visibilityState} active=${describe(document.activeElement)}`;
|
|
19
|
+
window.addEventListener('focus', () => diag(`window focus (${state()})`));
|
|
20
|
+
window.addEventListener('blur', () => diag(`window blur (${state()})`));
|
|
21
|
+
document.addEventListener('visibilitychange', () => diag(`visibility ${document.visibilityState}`));
|
|
22
|
+
diag(`diagnostics on (${state()})`);
|
|
23
|
+
}
|
|
24
|
+
/** An element as a few plain words: its tag and first class (never its text). */
|
|
25
|
+
export function describe(element) {
|
|
26
|
+
if (!element)
|
|
27
|
+
return 'none';
|
|
28
|
+
const name = element.tagName.toLowerCase();
|
|
29
|
+
const first = typeof element.className === 'string' ? element.className.split(/\s+/).filter(Boolean)[0] : '';
|
|
30
|
+
return first ? `${name}.${first}` : name;
|
|
31
|
+
}
|
|
32
|
+
/** One event line (nothing happens while diagnostics are off). */
|
|
33
|
+
export function diag(line) {
|
|
34
|
+
if (!enabled)
|
|
35
|
+
return;
|
|
36
|
+
invoke('diag_log', { line: line.slice(0, 280) }).catch(() => { });
|
|
37
|
+
}
|
|
38
|
+
export const diagOn = () => enabled;
|
|
39
|
+
//# sourceMappingURL=diag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diag.js","sourceRoot":"","sources":["../../../../../../shell/src/frame/diag.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,mGAAmG;AACnG,oGAAoG;AACpG,gGAAgG;AAChG,qCAAqC;AAErC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,IAAI,OAAO,GAAG,KAAK,CAAC;AAEpB,mGAAmG;AACnG,MAAM,CAAC,KAAK,UAAU,QAAQ;IAC5B,IAAI,CAAC;QAAC,OAAO,GAAG,MAAM,MAAM,CAAU,UAAU,CAAC,KAAK,IAAI,CAAC;IAAC,CAAC;IAAC,MAAM,CAAC;QAAC,OAAO,GAAG,KAAK,CAAC;IAAC,CAAC;IACxF,IAAI,CAAC,OAAO;QAAE,OAAO;IACrB,MAAM,KAAK,GAAG,GAAG,EAAE,CAAC,YAAY,QAAQ,CAAC,QAAQ,EAAE,YAAY,QAAQ,CAAC,eAAe,WAAW,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC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AAC,OAAO,CAAC","sourcesContent":["// Focus and layering diagnostics from the shell (waybetter-host `diag.rs`): off unless the app was\n// started with `--diag` (or WAYBETTER_DIAG=1). While on, each event is one short line in the app's\n// log folder (`diag.log`): menu requests and closes with their reason, overlays and raising, native\n// focus calls and the shell document's focus, blur and visibility. Event names and states only;\n// never a URL, a query or page text.\n\nimport { invoke } from './bridge.ts';\n\nlet enabled = false;\n\n/** Asks native code once whether diagnostics are on, and starts following the document's focus. */\nexport async function initDiag(): Promise<void> {\n try { enabled = await invoke<boolean>('diag_get') === true; } catch { enabled = false; }\n if (!enabled) return;\n const state = () => `hasFocus=${document.hasFocus()} visible=${document.visibilityState} active=${describe(document.activeElement)}`;\n window.addEventListener('focus', () => diag(`window focus (${state()})`));\n window.addEventListener('blur', () => diag(`window blur (${state()})`));\n document.addEventListener('visibilitychange', () => diag(`visibility ${document.visibilityState}`));\n diag(`diagnostics on (${state()})`);\n}\n\n/** An element as a few plain words: its tag and first class (never its text). */\nexport function describe(element: Element | null): string {\n if (!element) return 'none';\n const name = element.tagName.toLowerCase();\n const first = typeof element.className === 'string' ? element.className.split(/\\s+/).filter(Boolean)[0] : '';\n return first ? `${name}.${first}` : name;\n}\n\n/** One event line (nothing happens while diagnostics are off). */\nexport function diag(line: string): void {\n if (!enabled) return;\n invoke('diag_log', { line: line.slice(0, 280) }).catch(() => {});\n}\n\nexport const diagOn = () => enabled;\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* Find in page (FindBar.tsx): the find field takes the address field's place in its pane's toolbar,
|
|
2
|
+
so it borrows that field's shape (.bt-omni, shell.css) and only adds what is its own. */
|
|
3
|
+
.bt-omni.bt-find input { font: 400 13px/1 var(--bt-ui); }
|
|
4
|
+
.bt-omni.bt-find input::placeholder { color: var(--bt-faint); }
|
|
5
|
+
.bt-find-count { flex: none; padding-inline: 6px 4px; color: var(--bt-muted); font: 500 11.5px/1 var(--bt-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
6
|
+
.bt-find.is-none .bt-find-count { color: var(--bt-danger); }
|
|
7
|
+
.bt-find .bt-omni-action { color: var(--bt-muted); }
|
|
8
|
+
.bt-find .bt-omni-action:disabled { color: var(--bt-faint); opacity: .6; cursor: default; background: transparent; }
|
|
9
|
+
.bt-shell .bt-find .bt-omni-action svg { width: 15px; height: 15px; }
|
|
10
|
+
.bt-shell .bt-find .bt-find-up { transform: rotate(180deg); }
|
|
11
|
+
|
|
12
|
+
/* In a deck column the bar lies over the column's header (DeckView.tsx): same field, the column's width. */
|
|
13
|
+
.bt-col-find { position: absolute; inset: 0; z-index: 3; border-radius: inherit; display: flex; align-items: center; padding-inline: 8px; background: var(--bt-chrome); }
|
|
14
|
+
.bt-col-find .bt-find { flex: 1; min-width: 0; height: 32px; }
|