adnbn 0.5.7 → 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/dist/cli/builders/app/command.d.ts +3 -6
- package/dist/cli/builders/app/index.d.ts +2 -14
- package/dist/cli/builders/locale/FirefoxLocaleValidator.d.ts +4 -7
- package/dist/cli/builders/locale/LocaleBuilder.d.ts +3 -6
- package/dist/cli/builders/locale/LocaleBuilder.js +3 -1
- package/dist/cli/builders/locale/LocaleBuilder.js.map +1 -1
- package/dist/cli/builders/locale/LocaleStructureValidator.d.ts +8 -0
- package/dist/cli/builders/locale/LocaleStructureValidator.js +64 -0
- package/dist/cli/builders/locale/LocaleStructureValidator.js.map +1 -0
- package/dist/cli/builders/locale/LocaleValidator.d.ts +4 -7
- package/dist/cli/builders/locale/LocaleValidator.js +2 -0
- package/dist/cli/builders/locale/LocaleValidator.js.map +1 -1
- package/dist/cli/builders/locale/OperaLocaleValidator.d.ts +4 -7
- package/dist/cli/builders/locale/index.d.ts +10 -19
- package/dist/cli/builders/locale/index.js +2 -0
- package/dist/cli/builders/locale/index.js.map +1 -1
- package/dist/cli/builders/manifest/ManifestBase.d.ts +30 -18
- package/dist/cli/builders/manifest/ManifestBase.js +212 -70
- package/dist/cli/builders/manifest/ManifestBase.js.map +1 -1
- package/dist/cli/builders/manifest/ManifestV2.d.ts +5 -12
- package/dist/cli/builders/manifest/ManifestV2.js +8 -7
- package/dist/cli/builders/manifest/ManifestV2.js.map +1 -1
- package/dist/cli/builders/manifest/ManifestV3.d.ts +5 -12
- package/dist/cli/builders/manifest/ManifestV3.js +9 -6
- package/dist/cli/builders/manifest/ManifestV3.js.map +1 -1
- package/dist/cli/builders/manifest/index.d.ts +3 -14
- package/dist/cli/builders/manifest/utils.d.ts +10 -15
- package/dist/cli/builders/manifest/utils.js +14 -2
- package/dist/cli/builders/manifest/utils.js.map +1 -1
- package/dist/cli/bundler/index.d.ts +2 -16
- package/dist/cli/bundler/plugins/EntrypointPlugin.d.ts +10 -19
- package/dist/cli/bundler/plugins/EntrypointPlugin.js +1 -0
- package/dist/cli/bundler/plugins/EntrypointPlugin.js.map +1 -1
- package/dist/cli/bundler/plugins/GenerateJsonPlugin.d.ts +5 -7
- package/dist/cli/bundler/plugins/GenerateJsonPlugin.js +1 -0
- package/dist/cli/bundler/plugins/GenerateJsonPlugin.js.map +1 -1
- package/dist/cli/bundler/plugins/ManifestPlugin.d.ts +3 -11
- package/dist/cli/bundler/plugins/ManifestPlugin.js +1 -0
- package/dist/cli/bundler/plugins/ManifestPlugin.js.map +1 -1
- package/dist/cli/bundler/plugins/ReplacePlugin.d.ts +3 -5
- package/dist/cli/bundler/plugins/ReplacePlugin.js +1 -0
- package/dist/cli/bundler/plugins/ReplacePlugin.js.map +1 -1
- package/dist/cli/bundler/plugins/WatchPlugin.d.ts +3 -6
- package/dist/cli/bundler/plugins/WatchPlugin.js +1 -0
- package/dist/cli/bundler/plugins/WatchPlugin.js.map +1 -1
- package/dist/cli/bundler/plugins/index.d.ts +5 -14
- package/dist/cli/bundler/utils/index.d.ts +2 -3
- package/dist/cli/bundler/utils/optimization.d.ts +2 -5
- package/dist/cli/bundler/utils/output.d.ts +2 -5
- package/dist/cli/entrypoint/file/ExpressionFile.d.ts +4 -10
- package/dist/cli/entrypoint/file/OptionFile.d.ts +3 -9
- package/dist/cli/entrypoint/file/SourceFile.d.ts +7 -11
- package/dist/cli/entrypoint/file/SourceFile.js +1 -0
- package/dist/cli/entrypoint/file/SourceFile.js.map +1 -1
- package/dist/cli/entrypoint/file/index.d.ts +4 -8
- package/dist/cli/entrypoint/file/injectors/core.d.ts +2 -4
- package/dist/cli/entrypoint/file/injectors/index.d.ts +2 -4
- package/dist/cli/entrypoint/file/parsers/AbstractParser.d.ts +6 -12
- package/dist/cli/entrypoint/file/parsers/AbstractParser.js +1 -0
- package/dist/cli/entrypoint/file/parsers/AbstractParser.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/ClassParser.d.ts +9 -15
- package/dist/cli/entrypoint/file/parsers/ClassParser.js +3 -0
- package/dist/cli/entrypoint/file/parsers/ClassParser.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/FunctionParser.d.ts +9 -17
- package/dist/cli/entrypoint/file/parsers/FunctionParser.js +3 -0
- package/dist/cli/entrypoint/file/parsers/FunctionParser.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/JSDocParser.d.ts +2 -5
- package/dist/cli/entrypoint/file/parsers/NodeFinder.d.ts +4 -10
- package/dist/cli/entrypoint/file/parsers/NodeFinder.js +1 -0
- package/dist/cli/entrypoint/file/parsers/NodeFinder.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/ObjectParser.d.ts +7 -15
- package/dist/cli/entrypoint/file/parsers/ObjectParser.js +1 -0
- package/dist/cli/entrypoint/file/parsers/ObjectParser.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/SignatureBuilder.d.ts +4 -12
- package/dist/cli/entrypoint/file/parsers/SignatureBuilder.js +5 -4
- package/dist/cli/entrypoint/file/parsers/SignatureBuilder.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/TypeResolver.d.ts +5 -11
- package/dist/cli/entrypoint/file/parsers/TypeResolver.js +2 -0
- package/dist/cli/entrypoint/file/parsers/TypeResolver.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/helpers/memberFilters.d.ts +1 -3
- package/dist/cli/entrypoint/file/parsers/index.d.ts +7 -14
- package/dist/cli/entrypoint/file/parsers/types.d.ts +4 -6
- package/dist/cli/entrypoint/file/resolvers/ImportResolver.d.ts +2 -6
- package/dist/cli/entrypoint/file/resolvers/ImportResolver.js +1 -0
- package/dist/cli/entrypoint/file/resolvers/ImportResolver.js.map +1 -1
- package/dist/cli/entrypoint/file/resolvers/TsResolver.d.ts +2 -5
- package/dist/cli/entrypoint/file/resolvers/index.d.ts +2 -3
- package/dist/cli/entrypoint/file/types.d.ts +5 -7
- package/dist/cli/entrypoint/finder/AbstractAssetFinder.d.ts +3 -16
- package/dist/cli/entrypoint/finder/AbstractEntrypointFinder.d.ts +4 -17
- package/dist/cli/entrypoint/finder/AbstractEntrypointFinder.js +22 -17
- package/dist/cli/entrypoint/finder/AbstractEntrypointFinder.js.map +1 -1
- package/dist/cli/entrypoint/finder/AbstractFinder.d.ts +4 -15
- package/dist/cli/entrypoint/finder/AbstractFinder.js +7 -2
- package/dist/cli/entrypoint/finder/AbstractFinder.js.map +1 -1
- package/dist/cli/entrypoint/finder/AbstractOptionsFinder.d.ts +3 -16
- package/dist/cli/entrypoint/finder/AbstractPluginFinder.d.ts +3 -18
- package/dist/cli/entrypoint/finder/AbstractTransportFinder.d.ts +9 -26
- package/dist/cli/entrypoint/finder/AbstractViewFinder.d.ts +9 -24
- package/dist/cli/entrypoint/finder/AssetPluginFinder.d.ts +8 -19
- package/dist/cli/entrypoint/finder/AssetPluginFinder.js +2 -0
- package/dist/cli/entrypoint/finder/AssetPluginFinder.js.map +1 -1
- package/dist/cli/entrypoint/finder/BackgroundFinder.d.ts +5 -19
- package/dist/cli/entrypoint/finder/CommandFinder.d.ts +7 -22
- package/dist/cli/entrypoint/finder/ContentFinder.d.ts +5 -19
- package/dist/cli/entrypoint/finder/IconFinder.d.ts +12 -25
- package/dist/cli/entrypoint/finder/LocaleFinder.d.ts +14 -22
- package/dist/cli/entrypoint/finder/LocaleFinder.js +23 -9
- package/dist/cli/entrypoint/finder/LocaleFinder.js.map +1 -1
- package/dist/cli/entrypoint/finder/OffscreenFinder.d.ts +5 -26
- package/dist/cli/entrypoint/finder/OffscreenViewFinder.d.ts +8 -29
- package/dist/cli/entrypoint/finder/OffscreenViewFinder.js +1 -0
- package/dist/cli/entrypoint/finder/OffscreenViewFinder.js.map +1 -1
- package/dist/cli/entrypoint/finder/PageFinder.d.ts +5 -22
- package/dist/cli/entrypoint/finder/PluginFinder.d.ts +7 -19
- package/dist/cli/entrypoint/finder/PluginFinder.js +2 -0
- package/dist/cli/entrypoint/finder/PluginFinder.js.map +1 -1
- package/dist/cli/entrypoint/finder/PopupFinder.d.ts +5 -22
- package/dist/cli/entrypoint/finder/RelayFinder.d.ts +5 -25
- package/dist/cli/entrypoint/finder/ServiceFinder.d.ts +5 -25
- package/dist/cli/entrypoint/finder/SidebarFinder.d.ts +5 -22
- package/dist/cli/entrypoint/finder/index.d.ts +18 -43
- package/dist/cli/entrypoint/index.d.ts +4 -64
- package/dist/cli/entrypoint/name/InlineNameGenerator.d.ts +2 -12
- package/dist/cli/entrypoint/name/NameGenerator.d.ts +2 -11
- package/dist/cli/entrypoint/name/NameGenerator.js +1 -0
- package/dist/cli/entrypoint/name/NameGenerator.js.map +1 -1
- package/dist/cli/entrypoint/name/index.d.ts +2 -9
- package/dist/cli/entrypoint/parser/AbstractParser.d.ts +14 -29
- package/dist/cli/entrypoint/parser/AbstractParser.js +1 -0
- package/dist/cli/entrypoint/parser/AbstractParser.js.map +1 -1
- package/dist/cli/entrypoint/parser/BackgroundParser.d.ts +3 -23
- package/dist/cli/entrypoint/parser/CommandParser.d.ts +4 -24
- package/dist/cli/entrypoint/parser/CommandParser.js +20 -5
- package/dist/cli/entrypoint/parser/CommandParser.js.map +1 -1
- package/dist/cli/entrypoint/parser/ContentParser.d.ts +4 -23
- package/dist/cli/entrypoint/parser/OffscreenParser.d.ts +3 -28
- package/dist/cli/entrypoint/parser/PageParser.d.ts +3 -26
- package/dist/cli/entrypoint/parser/PopupParser.d.ts +3 -26
- package/dist/cli/entrypoint/parser/RelayParser.d.ts +4 -27
- package/dist/cli/entrypoint/parser/ServiceParser.d.ts +3 -27
- package/dist/cli/entrypoint/parser/SidebarParser.d.ts +3 -26
- package/dist/cli/entrypoint/parser/ViewParser.d.ts +60 -80
- package/dist/cli/entrypoint/parser/index.d.ts +9 -38
- package/dist/cli/entrypoint/utils/framework.d.ts +3 -12
- package/dist/cli/entrypoint/utils/index.d.ts +2 -10
- package/dist/cli/entrypoint/utils/resolve.d.ts +3 -5
- package/dist/cli/index.d.ts +1 -2
- package/dist/cli/plugins/asset.d.ts +2 -15
- package/dist/cli/plugins/background/Background.d.ts +4 -21
- package/dist/cli/plugins/background/BackgroundEntry.d.ts +7 -21
- package/dist/cli/plugins/background/BackgroundEntry.js +1 -0
- package/dist/cli/plugins/background/BackgroundEntry.js.map +1 -1
- package/dist/cli/plugins/background/BackgroundManifest.d.ts +5 -21
- package/dist/cli/plugins/background/Command.d.ts +6 -23
- package/dist/cli/plugins/background/Service.d.ts +5 -27
- package/dist/cli/plugins/background/ServiceDeclaration.d.ts +3 -17
- package/dist/cli/plugins/background/index.d.ts +2 -15
- package/dist/cli/plugins/bundler.d.ts +2 -15
- package/dist/cli/plugins/content/Content.d.ts +9 -24
- package/dist/cli/plugins/content/ContentDriver.d.ts +7 -22
- package/dist/cli/plugins/content/ContentDriver.js +1 -0
- package/dist/cli/plugins/content/ContentDriver.js.map +1 -1
- package/dist/cli/plugins/content/ContentManager.d.ts +8 -19
- package/dist/cli/plugins/content/ContentName.d.ts +5 -17
- package/dist/cli/plugins/content/ContentName.js +1 -0
- package/dist/cli/plugins/content/ContentName.js.map +1 -1
- package/dist/cli/plugins/content/Relay.d.ts +9 -30
- package/dist/cli/plugins/content/RelayDeclaration.d.ts +3 -17
- package/dist/cli/plugins/content/index.d.ts +2 -15
- package/dist/cli/plugins/content/types.d.ts +8 -16
- package/dist/cli/plugins/content/utils.d.ts +2 -11
- package/dist/cli/plugins/dotenv/index.d.ts +3 -16
- package/dist/cli/plugins/dotenv/utils.d.ts +4 -7
- package/dist/cli/plugins/html.d.ts +2 -15
- package/dist/cli/plugins/icon/Icon.d.ts +6 -22
- package/dist/cli/plugins/icon/declaration/IconDeclaration.d.ts +3 -16
- package/dist/cli/plugins/icon/declaration/index.d.ts +1 -13
- package/dist/cli/plugins/icon/index.d.ts +4 -21
- package/dist/cli/plugins/index.d.ts +22 -58
- package/dist/cli/plugins/index.js +32 -30
- package/dist/cli/plugins/index.js.map +1 -1
- package/dist/cli/plugins/locale/Locale.d.ts +3 -20
- package/dist/cli/plugins/locale/declaration/LocaleDeclaration.d.ts +4 -16
- package/dist/cli/plugins/locale/declaration/index.d.ts +1 -13
- package/dist/cli/plugins/locale/declaration/locale.d.ts +61 -11
- package/dist/cli/plugins/locale/index.d.ts +2 -15
- package/dist/cli/plugins/locale/index.js +44 -49
- package/dist/cli/plugins/locale/index.js.map +1 -1
- package/dist/cli/plugins/manifest.d.ts +2 -0
- package/dist/cli/plugins/manifest.js +27 -0
- package/dist/cli/plugins/manifest.js.map +1 -0
- package/dist/cli/plugins/meta/AbstractMeta.d.ts +2 -15
- package/dist/cli/plugins/meta/AbstractMeta.js +1 -0
- package/dist/cli/plugins/meta/AbstractMeta.js.map +1 -1
- package/dist/cli/plugins/meta/Author.d.ts +3 -16
- package/dist/cli/plugins/meta/Homepage.d.ts +3 -16
- package/dist/cli/plugins/meta/Incognito.d.ts +4 -16
- package/dist/cli/plugins/meta/SpecificSettings.d.ts +4 -16
- package/dist/cli/plugins/meta/index.d.ts +7 -20
- package/dist/cli/plugins/offscreen/Offscreen.d.ts +11 -35
- package/dist/cli/plugins/offscreen/OffscreenDeclaration.d.ts +3 -17
- package/dist/cli/plugins/offscreen/index.d.ts +2 -15
- package/dist/cli/plugins/optimization.d.ts +2 -15
- package/dist/cli/plugins/output.d.ts +2 -15
- package/dist/cli/plugins/page/Page.d.ts +8 -26
- package/dist/cli/plugins/page/declaration/PageDeclaration.d.ts +3 -16
- package/dist/cli/plugins/page/declaration/index.d.ts +1 -13
- package/dist/cli/plugins/page/index.d.ts +2 -15
- package/dist/cli/plugins/popup/Popup.d.ts +9 -27
- package/dist/cli/plugins/popup/declaration/PopupDeclaration.d.ts +3 -16
- package/dist/cli/plugins/popup/declaration/index.d.ts +1 -13
- package/dist/cli/plugins/popup/index.d.ts +2 -15
- package/dist/cli/plugins/public.d.ts +2 -15
- package/dist/cli/plugins/react.d.ts +2 -15
- package/dist/cli/plugins/sidebar/Sidebar.d.ts +9 -27
- package/dist/cli/plugins/sidebar/declaration/SidebarDeclaration.d.ts +3 -16
- package/dist/cli/plugins/sidebar/declaration/index.d.ts +1 -13
- package/dist/cli/plugins/sidebar/index.d.ts +2 -15
- package/dist/cli/plugins/style.d.ts +2 -15
- package/dist/cli/plugins/typescript/FileBuilder.d.ts +2 -15
- package/dist/cli/plugins/typescript/FileBuilder.js +1 -0
- package/dist/cli/plugins/typescript/FileBuilder.js.map +1 -1
- package/dist/cli/plugins/typescript/TypescriptConfig.d.ts +4 -17
- package/dist/cli/plugins/typescript/declaration/index.d.ts +2 -14
- package/dist/cli/plugins/typescript/declaration/transport/TransportDeclaration.d.ts +4 -17
- package/dist/cli/plugins/typescript/declaration/transport/TransportDeclaration.js +1 -0
- package/dist/cli/plugins/typescript/declaration/transport/TransportDeclaration.js.map +1 -1
- package/dist/cli/plugins/typescript/declaration/transport/index.d.ts +1 -13
- package/dist/cli/plugins/typescript/declaration/vendor/VendorDeclaration.d.ts +3 -16
- package/dist/cli/plugins/typescript/declaration/vendor/index.d.ts +1 -13
- package/dist/cli/plugins/typescript/index.d.ts +6 -20
- package/dist/cli/plugins/version/AbstractVersion.d.ts +2 -15
- package/dist/cli/plugins/version/AbstractVersion.js +2 -1
- package/dist/cli/plugins/version/AbstractVersion.js.map +1 -1
- package/dist/cli/plugins/version/AddonVersion.d.ts +3 -16
- package/dist/cli/plugins/version/BrowserMinimumVersion.d.ts +3 -16
- package/dist/cli/plugins/version/index.d.ts +5 -18
- package/dist/cli/plugins/view/View.d.ts +10 -24
- package/dist/cli/plugins/view/View.js +2 -0
- package/dist/cli/plugins/view/View.js.map +1 -1
- package/dist/cli/plugins/view/index.d.ts +3 -22
- package/dist/cli/resolvers/bundler.d.ts +4 -15
- package/dist/cli/resolvers/config.d.ts +2 -14
- package/dist/cli/resolvers/config.js +45 -6
- package/dist/cli/resolvers/config.js.map +1 -1
- package/dist/cli/resolvers/path.d.ts +11 -24
- package/dist/cli/resolvers/plugin.d.ts +3 -16
- package/dist/cli/utils/fs.d.ts +3 -5
- package/dist/cli/utils/path.d.ts +3 -5
- package/dist/cli/utils/string.d.ts +2 -4
- package/dist/cli/virtual/background.d.ts +1 -0
- package/dist/cli/virtual/command.d.ts +1 -0
- package/dist/cli/virtual/content.d.ts +1 -0
- package/dist/cli/virtual/index.d.ts +9 -0
- package/dist/cli/virtual/index.js +2 -2
- package/dist/cli/virtual/offscreen.background.d.ts +1 -0
- package/dist/cli/virtual/offscreen.d.ts +1 -0
- package/dist/cli/virtual/relay.d.ts +1 -0
- package/dist/cli/virtual/transport.d.ts +1 -0
- package/dist/cli/virtual/view.d.ts +1 -0
- package/dist/cli/virtual/virtual.d.ts +38 -38
- package/dist/entry/background/Builder.d.ts +3 -12
- package/dist/entry/background/Builder.js +1 -0
- package/dist/entry/background/Builder.js.map +1 -1
- package/dist/entry/background/index.d.ts +3 -12
- package/dist/entry/background/resolvers/definition.d.ts +3 -12
- package/dist/entry/background/resolvers/index.d.ts +1 -8
- package/dist/entry/command/Builder.d.ts +4 -12
- package/dist/entry/command/index.d.ts +3 -12
- package/dist/entry/command/resolvers/definition.d.ts +4 -13
- package/dist/entry/command/resolvers/index.d.ts +1 -8
- package/dist/entry/content/adapters/react/Builder.d.ts +3 -17
- package/dist/entry/content/adapters/react/Node.d.ts +6 -14
- package/dist/entry/content/adapters/react/Node.js +2 -0
- package/dist/entry/content/adapters/react/Node.js.map +1 -1
- package/dist/entry/content/adapters/react/index.d.ts +4 -18
- package/dist/entry/content/adapters/react/resolvers/index.d.ts +1 -8
- package/dist/entry/content/adapters/react/resolvers/render.d.ts +2 -11
- package/dist/entry/content/adapters/vanilla/Builder.d.ts +3 -17
- package/dist/entry/content/adapters/vanilla/Node.d.ts +2 -11
- package/dist/entry/content/adapters/vanilla/Node.js +2 -0
- package/dist/entry/content/adapters/vanilla/Node.js.map +1 -1
- package/dist/entry/content/adapters/vanilla/index.d.ts +4 -18
- package/dist/entry/content/core/AbstractMarker.d.ts +2 -11
- package/dist/entry/content/core/AbstractMarker.js +1 -0
- package/dist/entry/content/core/AbstractMarker.js.map +1 -1
- package/dist/entry/content/core/AttributeMarker.d.ts +3 -12
- package/dist/entry/content/core/Builder.d.ts +8 -17
- package/dist/entry/content/core/Context.d.ts +2 -11
- package/dist/entry/content/core/Context.js +1 -0
- package/dist/entry/content/core/Context.js.map +1 -1
- package/dist/entry/content/core/EventEmitter.d.ts +2 -11
- package/dist/entry/content/core/EventNode.d.ts +2 -11
- package/dist/entry/content/core/EventNode.js +2 -0
- package/dist/entry/content/core/EventNode.js.map +1 -1
- package/dist/entry/content/core/ManagedContext.d.ts +3 -12
- package/dist/entry/content/core/MarkerNode.d.ts +2 -11
- package/dist/entry/content/core/MarkerNode.js +2 -0
- package/dist/entry/content/core/MarkerNode.js.map +1 -1
- package/dist/entry/content/core/MountBuilder.d.ts +3 -16
- package/dist/entry/content/core/MountNode.d.ts +2 -11
- package/dist/entry/content/core/MountNode.js +2 -0
- package/dist/entry/content/core/MountNode.js.map +1 -1
- package/dist/entry/content/core/Node.d.ts +2 -11
- package/dist/entry/content/core/Node.js +2 -0
- package/dist/entry/content/core/Node.js.map +1 -1
- package/dist/entry/content/core/WeakMarker.d.ts +3 -12
- package/dist/entry/content/core/resolvers/anchor.d.ts +2 -11
- package/dist/entry/content/core/resolvers/container.d.ts +2 -11
- package/dist/entry/content/core/resolvers/definition.d.ts +3 -12
- package/dist/entry/content/core/resolvers/index.d.ts +6 -13
- package/dist/entry/content/core/resolvers/mount.d.ts +2 -11
- package/dist/entry/content/core/resolvers/render.d.ts +3 -12
- package/dist/entry/content/core/resolvers/watch.d.ts +4 -13
- package/dist/entry/content/index.d.ts +1 -8
- package/dist/entry/core/Builder.d.ts +2 -11
- package/dist/entry/offscreen/Builder.d.ts +8 -25
- package/dist/entry/offscreen/Builder.js +8 -1
- package/dist/entry/offscreen/Builder.js.map +1 -1
- package/dist/entry/offscreen/TransportBuilder.d.ts +6 -24
- package/dist/entry/offscreen/index.d.ts +4 -25
- package/dist/entry/relay/Builder.d.ts +7 -21
- package/dist/entry/relay/Builder.js +1 -0
- package/dist/entry/relay/Builder.js.map +1 -1
- package/dist/entry/relay/TransportBuilder.d.ts +6 -20
- package/dist/entry/relay/index.d.ts +4 -21
- package/dist/entry/service/Builder.d.ts +6 -20
- package/dist/entry/service/index.d.ts +2 -14
- package/dist/entry/transport/AbstractBuilder.d.ts +4 -14
- package/dist/entry/transport/index.d.ts +1 -14
- package/dist/entry/transport/resolvers/definition.d.ts +7 -20
- package/dist/entry/transport/resolvers/index.d.ts +1 -14
- package/dist/entry/view/adapters/react/Builder.d.ts +4 -16
- package/dist/entry/view/adapters/react/index.d.ts +4 -17
- package/dist/entry/view/adapters/react/resolvers/render.d.ts +2 -13
- package/dist/entry/view/adapters/vanilla/Builder.d.ts +3 -15
- package/dist/entry/view/adapters/vanilla/index.d.ts +4 -16
- package/dist/entry/view/core/Builder.d.ts +3 -14
- package/dist/entry/view/core/resolvers/container.d.ts +2 -13
- package/dist/entry/view/core/resolvers/definition.d.ts +3 -14
- package/dist/entry/view/core/resolvers/render.d.ts +3 -14
- package/dist/entry/view/index.d.ts +1 -10
- package/dist/index.d.ts +1 -43
- package/dist/locale/adapters/react/LocaleProvider.d.ts +4 -6
- package/dist/locale/adapters/react/LocaleProvider.js +5 -5
- package/dist/locale/adapters/react/LocaleProvider.js.map +1 -1
- package/dist/locale/adapters/react/context.d.ts +8 -13
- package/dist/locale/adapters/react/context.js +2 -5
- package/dist/locale/adapters/react/context.js.map +1 -1
- package/dist/locale/adapters/react/index.d.ts +2 -6
- package/dist/locale/helpers.d.ts +60 -36
- package/dist/locale/helpers.js +14 -14
- package/dist/locale/helpers.js.map +1 -1
- package/dist/locale/index.d.ts +3 -7
- package/dist/locale/index.js.map +1 -1
- package/dist/locale/providers/AbstractLocale.d.ts +5 -8
- package/dist/locale/providers/AbstractLocale.js +9 -6
- package/dist/locale/providers/AbstractLocale.js.map +1 -1
- package/dist/locale/providers/CustomLocale.d.ts +5 -8
- package/dist/locale/providers/CustomLocale.js +3 -1
- package/dist/locale/providers/CustomLocale.js.map +1 -1
- package/dist/locale/providers/DynamicLocale.d.ts +7 -11
- package/dist/locale/providers/DynamicLocale.js +1 -1
- package/dist/locale/providers/DynamicLocale.js.map +1 -1
- package/dist/locale/providers/NativeLocale.d.ts +7 -10
- package/dist/locale/providers/NativeLocale.js.map +1 -1
- package/dist/locale/providers/index.d.ts +3 -6
- package/dist/locale/utils.d.ts +11 -14
- package/dist/main/app.d.ts +1 -1
- package/dist/main/app.js +3 -2
- package/dist/main/app.js.map +1 -1
- package/dist/main/background.d.ts +3 -12
- package/dist/main/browser.d.ts +1 -1
- package/dist/main/command.d.ts +4 -13
- package/dist/main/config.d.ts +3 -16
- package/dist/main/config.js.map +1 -1
- package/dist/main/content.d.ts +6 -18
- package/dist/main/env.d.ts +7 -15
- package/dist/main/icon.d.ts +6 -7
- package/dist/main/index.d.ts +17 -43
- package/dist/main/manifest.d.ts +1 -7
- package/dist/main/offscreen.d.ts +9 -22
- package/dist/main/offscreen.js +1 -1
- package/dist/main/offscreen.js.map +1 -1
- package/dist/main/page.d.ts +7 -19
- package/dist/main/plugin.d.ts +3 -16
- package/dist/main/popup.d.ts +8 -18
- package/dist/main/popup.js +2 -2
- package/dist/main/popup.js.map +1 -1
- package/dist/main/relay.d.ts +8 -21
- package/dist/main/service.d.ts +6 -15
- package/dist/main/sidebar.d.ts +8 -18
- package/dist/main/sidebar.js +2 -2
- package/dist/main/sidebar.js.map +1 -1
- package/dist/main/view.d.ts +1 -9
- package/dist/message/MessageManager.d.ts +2 -5
- package/dist/message/adapters/react/index.d.ts +1 -2
- package/dist/message/adapters/react/useMessageHandler.d.ts +2 -5
- package/dist/message/handlers/AbstractHandler.d.ts +2 -5
- package/dist/message/handlers/GeneralHandler.d.ts +3 -6
- package/dist/message/handlers/GeneralHandler.js +1 -0
- package/dist/message/handlers/GeneralHandler.js.map +1 -1
- package/dist/message/handlers/MapHandler.d.ts +3 -6
- package/dist/message/handlers/MapHandler.js +1 -0
- package/dist/message/handlers/MapHandler.js.map +1 -1
- package/dist/message/handlers/SingleHandler.d.ts +3 -6
- package/dist/message/handlers/SingleHandler.js +2 -0
- package/dist/message/handlers/SingleHandler.js.map +1 -1
- package/dist/message/handlers/index.d.ts +3 -5
- package/dist/message/index.d.ts +9 -13
- package/dist/message/providers/AbstractMessage.d.ts +2 -5
- package/dist/message/providers/Message.d.ts +4 -7
- package/dist/message/providers/index.d.ts +1 -4
- package/dist/offscreen/OffscreenBackground.d.ts +2 -9
- package/dist/offscreen/OffscreenBridge.d.ts +8 -9
- package/dist/offscreen/OffscreenBridge.js +55 -7
- package/dist/offscreen/OffscreenBridge.js.map +1 -1
- package/dist/offscreen/OffscreenManager.d.ts +4 -15
- package/dist/offscreen/OffscreenMessage.d.ts +2 -14
- package/dist/offscreen/index.d.ts +5 -26
- package/dist/offscreen/providers/Offscreen.d.ts +3 -14
- package/dist/offscreen/providers/ProxyOffscreen.d.ts +7 -18
- package/dist/offscreen/providers/ProxyOffscreen.js +44 -23
- package/dist/offscreen/providers/ProxyOffscreen.js.map +1 -1
- package/dist/offscreen/providers/RegisterOffscreen.d.ts +5 -18
- package/dist/offscreen/providers/RegisterOffscreen.js +1 -0
- package/dist/offscreen/providers/RegisterOffscreen.js.map +1 -1
- package/dist/offscreen/providers/index.d.ts +3 -17
- package/dist/offscreen/utils.d.ts +1 -3
- package/dist/relay/RelayManager.d.ts +6 -16
- package/dist/relay/RelayMessage.d.ts +2 -14
- package/dist/relay/RelayPermission.d.ts +4 -15
- package/dist/relay/index.d.ts +4 -22
- package/dist/relay/providers/ProxyRelay.d.ts +8 -19
- package/dist/relay/providers/ProxyRelay.js +2 -0
- package/dist/relay/providers/ProxyRelay.js.map +1 -1
- package/dist/relay/providers/RegisterRelay.d.ts +4 -16
- package/dist/relay/providers/RegisterRelay.js +2 -0
- package/dist/relay/providers/RegisterRelay.js.map +1 -1
- package/dist/relay/providers/Relay.d.ts +3 -14
- package/dist/relay/providers/index.d.ts +3 -18
- package/dist/relay/utils.d.ts +3 -5
- package/dist/service/ServiceManager.d.ts +4 -15
- package/dist/service/ServiceMessage.d.ts +2 -14
- package/dist/service/index.d.ts +4 -19
- package/dist/service/providers/ProxyService.d.ts +4 -15
- package/dist/service/providers/RegisterService.d.ts +3 -15
- package/dist/service/providers/RegisterService.js +1 -0
- package/dist/service/providers/RegisterService.js.map +1 -1
- package/dist/service/providers/Service.d.ts +3 -14
- package/dist/service/providers/index.d.ts +3 -15
- package/dist/transport/BaseTransport.d.ts +2 -13
- package/dist/transport/BaseTransport.js +1 -0
- package/dist/transport/BaseTransport.js.map +1 -1
- package/dist/transport/ProxyTransport.d.ts +4 -14
- package/dist/transport/RegisterTransport.d.ts +4 -16
- package/dist/transport/RegisterTransport.js +13 -20
- package/dist/transport/RegisterTransport.js.map +1 -1
- package/dist/transport/TransportManager.d.ts +2 -13
- package/dist/transport/TransportMessage.d.ts +3 -13
- package/dist/transport/index.d.ts +1 -9
- package/dist/types/app.d.ts +8 -6
- package/dist/types/app.js +7 -1
- package/dist/types/app.js.map +1 -1
- package/dist/types/background.d.ts +20 -7
- package/dist/types/browser.d.ts +6 -8
- package/dist/types/command.d.ts +27 -7
- package/dist/types/config.d.ts +673 -11
- package/dist/types/content.d.ts +195 -7
- package/dist/types/entrypoint.d.ts +106 -7
- package/dist/types/entrypoint.js.map +1 -1
- package/dist/types/env.d.ts +4 -6
- package/dist/types/framework.d.ts +1 -3
- package/dist/types/helpers.d.ts +6 -7
- package/dist/types/icon.d.ts +3 -5
- package/dist/types/locale.d.ts +35 -29
- package/dist/types/locale.js.map +1 -1
- package/dist/types/manifest.d.ts +163 -7
- package/dist/types/manifest.js.map +1 -1
- package/dist/types/message.d.ts +17 -19
- package/dist/types/message.js +1 -1
- package/dist/types/message.js.map +1 -1
- package/dist/types/offscreen.d.ts +13 -23
- package/dist/types/offscreen.js +2 -0
- package/dist/types/offscreen.js.map +1 -1
- package/dist/types/page.d.ts +5 -16
- package/dist/types/plugin.d.ts +101 -11
- package/dist/types/popup.d.ts +5 -16
- package/dist/types/relay.d.ts +13 -21
- package/dist/types/service.d.ts +9 -18
- package/dist/types/sidebar.d.ts +7 -17
- package/dist/types/transport.d.ts +22 -29
- package/dist/types/view.d.ts +18 -24
- package/package.json +9 -11
- package/dist/config-B38J9WIM.d.ts +0 -743
- package/dist/manifest-DKvERQ4d.d.ts +0 -503
package/dist/types/manifest.d.ts
CHANGED
|
@@ -1,7 +1,163 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { ContentScriptConfig } from "./content.js";
|
|
2
|
+
import { BackgroundConfig } from "./background.js";
|
|
3
|
+
import { CommandConfig } from "./command.js";
|
|
4
|
+
import { Language } from "./locale.js";
|
|
5
|
+
import { BrowserSpecific, DataCollectionPermission } from "./browser.js";
|
|
6
|
+
type ManifestCommon = chrome.runtime.Manifest;
|
|
7
|
+
type ManifestBase = chrome.runtime.ManifestBase;
|
|
8
|
+
type ManifestPermission = chrome.runtime.ManifestPermission;
|
|
9
|
+
type ManifestOptionalPermission = chrome.runtime.ManifestOptionalPermission;
|
|
10
|
+
export declare const ManifestMatchSchemes: ReadonlySet<string>;
|
|
11
|
+
export declare const ManifestSpecialSchemes: ReadonlySet<string>;
|
|
12
|
+
type ManifestFixed<T extends ManifestBase> = Omit<T, "manifest_version"> & {
|
|
13
|
+
manifest_version: ManifestVersion;
|
|
14
|
+
};
|
|
15
|
+
interface ManifestUnstable {
|
|
16
|
+
permissions?: (ManifestPermission | (string & Record<never, never>))[];
|
|
17
|
+
web_accessible_resources?: string[] | chrome.runtime.ManifestV3["web_accessible_resources"];
|
|
18
|
+
}
|
|
19
|
+
export type ManifestVersion = 2 | 3;
|
|
20
|
+
export declare enum ManifestIncognito {
|
|
21
|
+
Spanning = "spanning",
|
|
22
|
+
Split = "split",
|
|
23
|
+
NotAllowed = "not_allowed"
|
|
24
|
+
}
|
|
25
|
+
export type ManifestIncognitoValue = ManifestIncognito | `${ManifestIncognito}`;
|
|
26
|
+
export type CoreManifest = ManifestFixed<ManifestBase>;
|
|
27
|
+
export type ChromeManifest = ManifestFixed<ManifestCommon>;
|
|
28
|
+
export type FirefoxManifest = ChromeManifest & {
|
|
29
|
+
action?: chrome.runtime.ManifestV3["action"] & {
|
|
30
|
+
browser_style?: boolean;
|
|
31
|
+
};
|
|
32
|
+
browser_action?: chrome.runtime.ManifestV2["browser_action"] & {
|
|
33
|
+
browser_style?: boolean;
|
|
34
|
+
};
|
|
35
|
+
page_action?: chrome.runtime.ManifestV2["page_action"] & {
|
|
36
|
+
browser_style?: boolean;
|
|
37
|
+
};
|
|
38
|
+
browser_specific_settings?: {
|
|
39
|
+
gecko?: {
|
|
40
|
+
id?: string;
|
|
41
|
+
strict_min_version?: string;
|
|
42
|
+
strict_max_version?: string;
|
|
43
|
+
update_url?: string;
|
|
44
|
+
data_collection_permissions?: {
|
|
45
|
+
required?: ["none"] | `${DataCollectionPermission}`[];
|
|
46
|
+
optional?: `${DataCollectionPermission}`[];
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
gecko_android?: {
|
|
50
|
+
strict_min_version?: string;
|
|
51
|
+
strict_max_version?: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
} & ManifestUnstable;
|
|
55
|
+
export type SafariManifest = ChromeManifest & {
|
|
56
|
+
browser_specific_settings?: {
|
|
57
|
+
safari?: {
|
|
58
|
+
strict_min_version?: string;
|
|
59
|
+
strict_max_version?: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
} & ManifestUnstable;
|
|
63
|
+
export type Manifest = ChromeManifest | FirefoxManifest | SafariManifest;
|
|
64
|
+
export type OptionalManifest = Partial<Omit<Manifest, "manifest_version">>;
|
|
65
|
+
export interface ManifestBuilder<T extends CoreManifest = Manifest> {
|
|
66
|
+
setName(name: string): this;
|
|
67
|
+
setShortName(shortName?: string): this;
|
|
68
|
+
setDescription(description?: string): this;
|
|
69
|
+
setAuthor(author?: string): this;
|
|
70
|
+
setHomepage(homepage?: string): this;
|
|
71
|
+
setVersion(version?: string): this;
|
|
72
|
+
setIncognito(incognito?: ManifestIncognitoValue): this;
|
|
73
|
+
setMinimumVersion(minimumVersion?: string): this;
|
|
74
|
+
setLocale(lang?: Language): this;
|
|
75
|
+
setSpecific(settings?: BrowserSpecific): this;
|
|
76
|
+
mergeSpecific(settings: BrowserSpecific): this;
|
|
77
|
+
setIcons(icons?: ManifestIcons): this;
|
|
78
|
+
setIcon(icon?: string): this;
|
|
79
|
+
setBackground(background?: ManifestBackground): this;
|
|
80
|
+
setCommands(commands?: ManifestCommands): this;
|
|
81
|
+
setContentScripts(contentScripts?: ManifestContentScripts): this;
|
|
82
|
+
setPopup(popup?: ManifestPopup): this;
|
|
83
|
+
setSidebar(sidebar?: ManifestSidebar): this;
|
|
84
|
+
setDependencies(dependencies: ManifestDependencies): this;
|
|
85
|
+
addPermission(permission: ManifestPermission): this;
|
|
86
|
+
setPermissions(permissions: ManifestPermissions): this;
|
|
87
|
+
appendPermissions(permissions: ManifestPermissions): this;
|
|
88
|
+
addOptionalPermission(permission: ManifestOptionalPermission): this;
|
|
89
|
+
setOptionalPermissions(permissions: ManifestOptionalPermissions): this;
|
|
90
|
+
appendOptionalPermissions(permissions: ManifestOptionalPermissions): this;
|
|
91
|
+
addHostPermission(permission: string): this;
|
|
92
|
+
setHostPermissions(permissions: ManifestHostPermissions): this;
|
|
93
|
+
appendHostPermissions(permissions: ManifestHostPermissions): this;
|
|
94
|
+
addOptionalHostPermission(permission: string): this;
|
|
95
|
+
setOptionalHostPermissions(permissions: ManifestHostPermissions): this;
|
|
96
|
+
appendOptionalHostPermissions(permissions: ManifestHostPermissions): this;
|
|
97
|
+
setAccessibleResource(accessibleResources: ManifestAccessibleResources): this;
|
|
98
|
+
appendAccessibleResources(accessibleResources: ManifestAccessibleResources): this;
|
|
99
|
+
addAccessibleResource(accessibleResource: ManifestAccessibleResource): this;
|
|
100
|
+
getWebAccessibleResources(): ManifestAccessibleResource[];
|
|
101
|
+
get(): T;
|
|
102
|
+
raw(manifest: OptionalManifest): this;
|
|
103
|
+
}
|
|
104
|
+
type Entry = string;
|
|
105
|
+
export interface ManifestEntry {
|
|
106
|
+
entry: Entry;
|
|
107
|
+
}
|
|
108
|
+
export type ManifestBackground = ManifestEntry & BackgroundConfig;
|
|
109
|
+
export type ManifestContentScript = ManifestEntry & ContentScriptConfig;
|
|
110
|
+
export type ManifestContentScripts = Set<ManifestContentScript>;
|
|
111
|
+
export type ManifestCommand = CommandConfig;
|
|
112
|
+
export type ManifestCommands = Set<ManifestCommand>;
|
|
113
|
+
export interface ManifestPopup {
|
|
114
|
+
/**
|
|
115
|
+
* Represents the group name of an icon that can be used in UI elements.
|
|
116
|
+
* This property is optional and, if defined, should typically refer to a string
|
|
117
|
+
* that matches the name of an icon resource available in the application or icon library.
|
|
118
|
+
*/
|
|
119
|
+
icon?: string;
|
|
120
|
+
/**
|
|
121
|
+
* Represents an optional title or name or locale key that can be assigned to an entity.
|
|
122
|
+
*/
|
|
123
|
+
title?: string;
|
|
124
|
+
/**
|
|
125
|
+
* Represents an optional HTML path.
|
|
126
|
+
*/
|
|
127
|
+
path?: string;
|
|
128
|
+
}
|
|
129
|
+
export interface ManifestSidebar {
|
|
130
|
+
/**
|
|
131
|
+
* Represents the group name of an icon that can be used in UI elements.
|
|
132
|
+
* This property is optional and, if defined, should typically refer to a string
|
|
133
|
+
* that matches the name of an icon resource available in the application or icon library.
|
|
134
|
+
*/
|
|
135
|
+
icon?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Represents an optional title or name or locale key that can be assigned to an entity.
|
|
138
|
+
*/
|
|
139
|
+
title?: string;
|
|
140
|
+
/**
|
|
141
|
+
* Represents an optional HTML path.
|
|
142
|
+
*/
|
|
143
|
+
path?: string;
|
|
144
|
+
}
|
|
145
|
+
export interface ManifestAccessibleResource {
|
|
146
|
+
resources: string[];
|
|
147
|
+
matches?: string[];
|
|
148
|
+
extensionIds?: string[];
|
|
149
|
+
useDynamicUrl?: boolean;
|
|
150
|
+
}
|
|
151
|
+
export type ManifestAccessibleResources = Set<ManifestAccessibleResource>;
|
|
152
|
+
export interface ManifestDependency {
|
|
153
|
+
js: Set<string>;
|
|
154
|
+
css: Set<string>;
|
|
155
|
+
assets: Set<string>;
|
|
156
|
+
}
|
|
157
|
+
export type ManifestIcon = Map<number, string>;
|
|
158
|
+
export type ManifestIcons = Map<string, ManifestIcon>;
|
|
159
|
+
export type ManifestDependencies = Map<Entry, ManifestDependency>;
|
|
160
|
+
export type ManifestPermissions = Set<ManifestPermission>;
|
|
161
|
+
export type ManifestOptionalPermissions = Set<ManifestOptionalPermission>;
|
|
162
|
+
export type ManifestHostPermissions = Set<string>;
|
|
163
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/manifest.ts"],"sourcesContent":["import {ContentScriptConfig} from \"@typing/content\";\nimport {BackgroundConfig} from \"@typing/background\";\nimport {CommandConfig} from \"@typing/command\";\nimport {Language} from \"@typing/locale\";\nimport {BrowserSpecific, DataCollectionPermission} from \"@typing/browser\";\n\ntype ManifestCommon = chrome.runtime.Manifest;\ntype ManifestBase = chrome.runtime.ManifestBase;\ntype ManifestPermission = chrome.runtime.ManifestPermission;\ntype ManifestOptionalPermission = chrome.runtime.ManifestOptionalPermission;\n\nexport const ManifestMatchSchemes: ReadonlySet<string> = new Set<string>([\"http\", \"https\", \"file\", \"ftp\", \"ws\", \"wss\"]);\n\nexport const ManifestSpecialSchemes: ReadonlySet<string> = new Set<string>([\n \"chrome-extension\",\n \"moz-extension\",\n \"data\",\n \"blob\",\n \"filesystem\",\n \"about\",\n \"chrome\",\n \"resource\",\n]);\n\ntype ManifestFixed<T extends ManifestBase> = Omit<T, \"manifest_version\"> & {\n manifest_version: ManifestVersion;\n};\n\ninterface ManifestUnstable {\n permissions?: (ManifestPermission | (string & Record<never, never>))[];\n web_accessible_resources?: string[] | chrome.runtime.ManifestV3[\"web_accessible_resources\"];\n}\n\nexport type ManifestVersion = 2 | 3;\n\nexport enum ManifestIncognito {\n Spanning = \"spanning\",\n Split = \"split\",\n NotAllowed = \"not_allowed\",\n}\n\nexport type ManifestIncognitoValue = ManifestIncognito | `${ManifestIncognito}`;\n\nexport type CoreManifest = ManifestFixed<ManifestBase>;\n\nexport type ChromeManifest = ManifestFixed<ManifestCommon>;\n\nexport type FirefoxManifest = ChromeManifest & {\n action?: chrome.runtime.ManifestV3[\"action\"] & {\n browser_style?: boolean;\n };\n browser_action?: chrome.runtime.ManifestV2[\"browser_action\"] & {\n browser_style?: boolean;\n };\n page_action?: chrome.runtime.ManifestV2[\"page_action\"] & {\n browser_style?: boolean;\n };\n browser_specific_settings?: {\n gecko?: {\n id?: string;\n strict_min_version?: string;\n strict_max_version?: string;\n update_url?: string;\n data_collection_permissions?: {\n required?: [\"none\"] | `${DataCollectionPermission}`[];\n optional?: `${DataCollectionPermission}`[];\n };\n };\n gecko_android?: {\n strict_min_version?: string;\n strict_max_version?: string;\n };\n };\n} & ManifestUnstable;\n\nexport type SafariManifest = ChromeManifest & {\n browser_specific_settings?: {\n safari?: {\n strict_min_version?: string;\n strict_max_version?: string;\n };\n };\n} & ManifestUnstable;\n\nexport type Manifest = ChromeManifest | FirefoxManifest | SafariManifest;\n\nexport interface ManifestBuilder<T extends CoreManifest = Manifest> {\n setName(name: string): this;\n\n setShortName(shortName?: string): this;\n\n setDescription(description?: string): this;\n\n setAuthor(author?: string): this;\n\n setHomepage(homepage?: string): this;\n\n setVersion(version?: string): this;\n\n setIncognito(incognito?: ManifestIncognitoValue): this;\n\n setMinimumVersion(minimumVersion?: string): this;\n\n setLocale(lang?: Language): this;\n\n // Specific settings\n setSpecific(settings?: BrowserSpecific): this;\n\n mergeSpecific(settings: BrowserSpecific): this;\n\n // Icons\n setIcons(icons?: ManifestIcons): this;\n\n setIcon(icon?: string): this; // name of an icon set for manifest.icons\n\n // Entry\n setBackground(background?: ManifestBackground): this;\n\n setCommands(commands?: ManifestCommands): this;\n\n setContentScripts(contentScripts?: ManifestContentScripts): this;\n\n setPopup(popup?: ManifestPopup): this;\n\n setSidebar(sidebar?: ManifestSidebar): this;\n\n // System\n setDependencies(dependencies: ManifestDependencies): this;\n\n // Permissions\n addPermission(permission: ManifestPermission): this;\n\n setPermissions(permissions: ManifestPermissions): this;\n\n appendPermissions(permissions: ManifestPermissions): this;\n\n // Optional Permissions\n addOptionalPermission(permission: ManifestOptionalPermission): this;\n\n setOptionalPermissions(permissions: ManifestOptionalPermissions): this;\n\n appendOptionalPermissions(permissions: ManifestOptionalPermissions): this;\n\n // Host Permissions\n addHostPermission(permission: string): this;\n\n setHostPermissions(permissions: ManifestHostPermissions): this;\n\n appendHostPermissions(permissions: ManifestHostPermissions): this;\n\n // Optional Host Permissions\n addOptionalHostPermission(permission: string): this;\n\n setOptionalHostPermissions(permissions: ManifestHostPermissions): this;\n\n appendOptionalHostPermissions(permissions: ManifestHostPermissions): this;\n\n // Web Accessible Resource\n
|
|
1
|
+
{"version":3,"sources":["../../src/types/manifest.ts"],"sourcesContent":["import {ContentScriptConfig} from \"@typing/content\";\nimport {BackgroundConfig} from \"@typing/background\";\nimport {CommandConfig} from \"@typing/command\";\nimport {Language} from \"@typing/locale\";\nimport {BrowserSpecific, DataCollectionPermission} from \"@typing/browser\";\n\ntype ManifestCommon = chrome.runtime.Manifest;\ntype ManifestBase = chrome.runtime.ManifestBase;\ntype ManifestPermission = chrome.runtime.ManifestPermission;\ntype ManifestOptionalPermission = chrome.runtime.ManifestOptionalPermission;\n\nexport const ManifestMatchSchemes: ReadonlySet<string> = new Set<string>([\"http\", \"https\", \"file\", \"ftp\", \"ws\", \"wss\"]);\n\nexport const ManifestSpecialSchemes: ReadonlySet<string> = new Set<string>([\n \"chrome-extension\",\n \"moz-extension\",\n \"data\",\n \"blob\",\n \"filesystem\",\n \"about\",\n \"chrome\",\n \"resource\",\n]);\n\ntype ManifestFixed<T extends ManifestBase> = Omit<T, \"manifest_version\"> & {\n manifest_version: ManifestVersion;\n};\n\ninterface ManifestUnstable {\n permissions?: (ManifestPermission | (string & Record<never, never>))[];\n web_accessible_resources?: string[] | chrome.runtime.ManifestV3[\"web_accessible_resources\"];\n}\n\nexport type ManifestVersion = 2 | 3;\n\nexport enum ManifestIncognito {\n Spanning = \"spanning\",\n Split = \"split\",\n NotAllowed = \"not_allowed\",\n}\n\nexport type ManifestIncognitoValue = ManifestIncognito | `${ManifestIncognito}`;\n\nexport type CoreManifest = ManifestFixed<ManifestBase>;\n\nexport type ChromeManifest = ManifestFixed<ManifestCommon>;\n\nexport type FirefoxManifest = ChromeManifest & {\n action?: chrome.runtime.ManifestV3[\"action\"] & {\n browser_style?: boolean;\n };\n browser_action?: chrome.runtime.ManifestV2[\"browser_action\"] & {\n browser_style?: boolean;\n };\n page_action?: chrome.runtime.ManifestV2[\"page_action\"] & {\n browser_style?: boolean;\n };\n browser_specific_settings?: {\n gecko?: {\n id?: string;\n strict_min_version?: string;\n strict_max_version?: string;\n update_url?: string;\n data_collection_permissions?: {\n required?: [\"none\"] | `${DataCollectionPermission}`[];\n optional?: `${DataCollectionPermission}`[];\n };\n };\n gecko_android?: {\n strict_min_version?: string;\n strict_max_version?: string;\n };\n };\n} & ManifestUnstable;\n\nexport type SafariManifest = ChromeManifest & {\n browser_specific_settings?: {\n safari?: {\n strict_min_version?: string;\n strict_max_version?: string;\n };\n };\n} & ManifestUnstable;\n\nexport type Manifest = ChromeManifest | FirefoxManifest | SafariManifest;\n\nexport type OptionalManifest = Partial<Omit<Manifest, \"manifest_version\">>;\n\nexport interface ManifestBuilder<T extends CoreManifest = Manifest> {\n setName(name: string): this;\n\n setShortName(shortName?: string): this;\n\n setDescription(description?: string): this;\n\n setAuthor(author?: string): this;\n\n setHomepage(homepage?: string): this;\n\n setVersion(version?: string): this;\n\n setIncognito(incognito?: ManifestIncognitoValue): this;\n\n setMinimumVersion(minimumVersion?: string): this;\n\n setLocale(lang?: Language): this;\n\n // Specific settings\n setSpecific(settings?: BrowserSpecific): this;\n\n mergeSpecific(settings: BrowserSpecific): this;\n\n // Icons\n setIcons(icons?: ManifestIcons): this;\n\n setIcon(icon?: string): this; // name of an icon set for manifest.icons\n\n // Entry\n setBackground(background?: ManifestBackground): this;\n\n setCommands(commands?: ManifestCommands): this;\n\n setContentScripts(contentScripts?: ManifestContentScripts): this;\n\n setPopup(popup?: ManifestPopup): this;\n\n setSidebar(sidebar?: ManifestSidebar): this;\n\n // System\n setDependencies(dependencies: ManifestDependencies): this;\n\n // Permissions\n addPermission(permission: ManifestPermission): this;\n\n setPermissions(permissions: ManifestPermissions): this;\n\n appendPermissions(permissions: ManifestPermissions): this;\n\n // Optional Permissions\n addOptionalPermission(permission: ManifestOptionalPermission): this;\n\n setOptionalPermissions(permissions: ManifestOptionalPermissions): this;\n\n appendOptionalPermissions(permissions: ManifestOptionalPermissions): this;\n\n // Host Permissions\n addHostPermission(permission: string): this;\n\n setHostPermissions(permissions: ManifestHostPermissions): this;\n\n appendHostPermissions(permissions: ManifestHostPermissions): this;\n\n // Optional Host Permissions\n addOptionalHostPermission(permission: string): this;\n\n setOptionalHostPermissions(permissions: ManifestHostPermissions): this;\n\n appendOptionalHostPermissions(permissions: ManifestHostPermissions): this;\n\n // Web Accessible Resource\n setAccessibleResource(accessibleResources: ManifestAccessibleResources): this;\n\n appendAccessibleResources(accessibleResources: ManifestAccessibleResources): this;\n\n addAccessibleResource(accessibleResource: ManifestAccessibleResource): this;\n\n getWebAccessibleResources(): ManifestAccessibleResource[];\n\n // Getter\n get(): T;\n\n raw(manifest: OptionalManifest): this;\n}\n\ntype Entry = string;\n\nexport interface ManifestEntry {\n entry: Entry;\n}\n\nexport type ManifestBackground = ManifestEntry & BackgroundConfig;\n\nexport type ManifestContentScript = ManifestEntry & ContentScriptConfig;\nexport type ManifestContentScripts = Set<ManifestContentScript>;\n\nexport type ManifestCommand = CommandConfig;\nexport type ManifestCommands = Set<ManifestCommand>;\n\nexport interface ManifestPopup {\n /**\n * Represents the group name of an icon that can be used in UI elements.\n * This property is optional and, if defined, should typically refer to a string\n * that matches the name of an icon resource available in the application or icon library.\n */\n icon?: string;\n /**\n * Represents an optional title or name or locale key that can be assigned to an entity.\n */\n title?: string;\n /**\n * Represents an optional HTML path.\n */\n path?: string;\n}\n\nexport interface ManifestSidebar {\n /**\n * Represents the group name of an icon that can be used in UI elements.\n * This property is optional and, if defined, should typically refer to a string\n * that matches the name of an icon resource available in the application or icon library.\n */\n icon?: string;\n /**\n * Represents an optional title or name or locale key that can be assigned to an entity.\n */\n title?: string;\n /**\n * Represents an optional HTML path.\n */\n path?: string;\n}\n\nexport interface ManifestAccessibleResource {\n resources: string[];\n matches?: string[];\n extensionIds?: string[];\n useDynamicUrl?: boolean;\n}\n\nexport type ManifestAccessibleResources = Set<ManifestAccessibleResource>;\n\nexport interface ManifestDependency {\n js: Set<string>;\n css: Set<string>;\n assets: Set<string>;\n}\n\nexport type ManifestIcon = Map<number, string>;\n\nexport type ManifestIcons = Map<string, ManifestIcon>;\n\nexport type ManifestDependencies = Map<Entry, ManifestDependency>;\n\nexport type ManifestPermissions = Set<ManifestPermission>;\n\nexport type ManifestOptionalPermissions = Set<ManifestOptionalPermission>;\n\nexport type ManifestHostPermissions = Set<string>;\n"],"mappings":"AAWO,MAAM,uBAA4C,oBAAI,IAAY,CAAC,QAAQ,SAAS,QAAQ,OAAO,MAAM,KAAK,CAAC;AAE/G,MAAM,yBAA8C,oBAAI,IAAY;AAAA,EACvE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ,CAAC;AAaM,IAAK,oBAAL,kBAAKA,uBAAL;AACH,EAAAA,mBAAA,cAAW;AACX,EAAAA,mBAAA,WAAQ;AACR,EAAAA,mBAAA,gBAAa;AAHL,SAAAA;AAAA,GAAA;","names":["ManifestIncognito"]}
|
package/dist/types/message.d.ts
CHANGED
|
@@ -1,40 +1,38 @@
|
|
|
1
|
-
declare const MessageGlobalKey = "adnbnMessage";
|
|
2
|
-
declare const MessageTypeSeparator = ":";
|
|
3
|
-
declare const MessageSenderProperty = "
|
|
4
|
-
type MessageSender = chrome.runtime.MessageSender;
|
|
5
|
-
type MessageSendOptions = number | {
|
|
1
|
+
export declare const MessageGlobalKey = "adnbnMessage";
|
|
2
|
+
export declare const MessageTypeSeparator = ":";
|
|
3
|
+
export declare const MessageSenderProperty = "$sender";
|
|
4
|
+
export type MessageSender = chrome.runtime.MessageSender;
|
|
5
|
+
export type MessageSendOptions = number | {
|
|
6
6
|
tabId: number;
|
|
7
7
|
frameId?: number;
|
|
8
8
|
documentId?: string;
|
|
9
9
|
};
|
|
10
|
-
interface MessageDictionary {
|
|
10
|
+
export interface MessageDictionary {
|
|
11
11
|
[key: string]: (data: any) => any;
|
|
12
12
|
}
|
|
13
|
-
interface MessageSenderAware {
|
|
14
|
-
[MessageSenderProperty]?: MessageSender;
|
|
13
|
+
export interface MessageSenderAware {
|
|
14
|
+
readonly [MessageSenderProperty]?: MessageSender;
|
|
15
15
|
}
|
|
16
|
-
type MessageType<T extends MessageDictionary> = Extract<keyof T, string>;
|
|
17
|
-
type MessageData<T extends MessageDictionary, K extends MessageType<T>> = Parameters<T[K]>[0];
|
|
18
|
-
type MessageResponse<T extends MessageDictionary, K extends MessageType<T>> = ReturnType<T[K]>;
|
|
19
|
-
type MessageTargetHandler<T extends MessageDictionary, K extends MessageType<T>> = (data: MessageData<T, K>, sender: MessageSender) => MessageResponse<T, K>;
|
|
20
|
-
type MessageMapHandler<T extends MessageDictionary> = {
|
|
16
|
+
export type MessageType<T extends MessageDictionary> = Extract<keyof T, string>;
|
|
17
|
+
export type MessageData<T extends MessageDictionary, K extends MessageType<T>> = Parameters<T[K]>[0];
|
|
18
|
+
export type MessageResponse<T extends MessageDictionary, K extends MessageType<T>> = ReturnType<T[K]>;
|
|
19
|
+
export type MessageTargetHandler<T extends MessageDictionary, K extends MessageType<T>> = (data: MessageData<T, K>, sender: MessageSender) => MessageResponse<T, K>;
|
|
20
|
+
export type MessageMapHandler<T extends MessageDictionary> = {
|
|
21
21
|
[K in MessageType<T>]?: MessageTargetHandler<T, K>;
|
|
22
22
|
};
|
|
23
|
-
type MessageGeneralHandler<T extends MessageDictionary, K extends MessageType<T>> = (type: K, data: MessageData<T, K>, sender: MessageSender) => any;
|
|
24
|
-
interface MessageBody<T extends MessageDictionary, K extends MessageType<T>> {
|
|
23
|
+
export type MessageGeneralHandler<T extends MessageDictionary, K extends MessageType<T>> = (type: K, data: MessageData<T, K>, sender: MessageSender) => any;
|
|
24
|
+
export interface MessageBody<T extends MessageDictionary, K extends MessageType<T>> {
|
|
25
25
|
id: string;
|
|
26
26
|
type: K;
|
|
27
27
|
data: MessageData<T, K>;
|
|
28
28
|
timestamp: number;
|
|
29
29
|
}
|
|
30
|
-
interface MessageProvider<T extends MessageDictionary, TOptions = void> {
|
|
30
|
+
export interface MessageProvider<T extends MessageDictionary, TOptions = void> {
|
|
31
31
|
send<K extends MessageType<T>>(type: K, data: MessageData<T, K>, options?: TOptions): Promise<MessageResponse<T, K>>;
|
|
32
32
|
watch<K extends MessageType<T>>(type: K, handler: MessageTargetHandler<T, K>): () => void;
|
|
33
33
|
watch(map: MessageMapHandler<T>): () => void;
|
|
34
34
|
watch<K extends MessageType<T>>(general: MessageGeneralHandler<T, K>): () => void;
|
|
35
35
|
}
|
|
36
|
-
interface MessageHandler<T extends MessageDictionary> {
|
|
36
|
+
export interface MessageHandler<T extends MessageDictionary> {
|
|
37
37
|
run(type: MessageType<T>, data: MessageData<T, MessageType<T>>, sender: MessageSender): MessageResponse<T, MessageType<T>> | undefined | null;
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
export { type MessageBody, type MessageData, type MessageDictionary, type MessageGeneralHandler, MessageGlobalKey, type MessageHandler, type MessageMapHandler, type MessageProvider, type MessageResponse, type MessageSendOptions, type MessageSender, type MessageSenderAware, MessageSenderProperty, type MessageTargetHandler, type MessageType, MessageTypeSeparator };
|
package/dist/types/message.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/message.ts"],"sourcesContent":["export const MessageGlobalKey = \"adnbnMessage\";\n\nexport const MessageTypeSeparator = \":\";\n\nexport const MessageSenderProperty = \"
|
|
1
|
+
{"version":3,"sources":["../../src/types/message.ts"],"sourcesContent":["export const MessageGlobalKey = \"adnbnMessage\";\n\nexport const MessageTypeSeparator = \":\";\n\nexport const MessageSenderProperty = \"$sender\";\n\nexport type MessageSender = chrome.runtime.MessageSender;\n\nexport type MessageSendOptions = number | {tabId: number; frameId?: number; documentId?: string};\n\nexport interface MessageDictionary {\n [key: string]: (data: any) => any;\n}\n\nexport interface MessageSenderAware {\n readonly [MessageSenderProperty]?: MessageSender;\n}\n\nexport type MessageType<T extends MessageDictionary> = Extract<keyof T, string>;\nexport type MessageData<T extends MessageDictionary, K extends MessageType<T>> = Parameters<T[K]>[0];\nexport type MessageResponse<T extends MessageDictionary, K extends MessageType<T>> = ReturnType<T[K]>;\n\nexport type MessageTargetHandler<T extends MessageDictionary, K extends MessageType<T>> = (\n data: MessageData<T, K>,\n sender: MessageSender\n) => MessageResponse<T, K>;\nexport type MessageMapHandler<T extends MessageDictionary> = {[K in MessageType<T>]?: MessageTargetHandler<T, K>};\nexport type MessageGeneralHandler<T extends MessageDictionary, K extends MessageType<T>> = (\n type: K,\n data: MessageData<T, K>,\n sender: MessageSender\n) => any;\n\nexport interface MessageBody<T extends MessageDictionary, K extends MessageType<T>> {\n id: string;\n type: K;\n data: MessageData<T, K>;\n timestamp: number;\n}\n\nexport interface MessageProvider<T extends MessageDictionary, TOptions = void> {\n send<K extends MessageType<T>>(\n type: K,\n data: MessageData<T, K>,\n options?: TOptions\n ): Promise<MessageResponse<T, K>>;\n\n watch<K extends MessageType<T>>(type: K, handler: MessageTargetHandler<T, K>): () => void;\n\n watch(map: MessageMapHandler<T>): () => void;\n\n watch<K extends MessageType<T>>(general: MessageGeneralHandler<T, K>): () => void;\n}\n\nexport interface MessageHandler<T extends MessageDictionary> {\n run(\n type: MessageType<T>,\n data: MessageData<T, MessageType<T>>,\n sender: MessageSender\n ): MessageResponse<T, MessageType<T>> | undefined | null;\n}\n"],"mappings":"AAAO,MAAM,mBAAmB;AAEzB,MAAM,uBAAuB;AAE7B,MAAM,wBAAwB;","names":[]}
|
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ViewOptions } from
|
|
3
|
-
import { Awaiter } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import './browser.js';
|
|
9
|
-
import './locale.js';
|
|
10
|
-
import './message.js';
|
|
11
|
-
import 'html-rspack-tags-plugin';
|
|
12
|
-
|
|
13
|
-
declare const OffscreenGlobalKey = "adnbnOffscreen";
|
|
14
|
-
declare const OffscreenGlobalAccess = "adnbnOffscreenAccess";
|
|
15
|
-
declare enum OffscreenReason {
|
|
1
|
+
import { TransportConfig, TransportDefinition, TransportType } from "./transport.js";
|
|
2
|
+
import { ViewOptions } from "./view.js";
|
|
3
|
+
import { Awaiter } from "./helpers.js";
|
|
4
|
+
export declare const OffscreenGlobalKey = "adnbnOffscreen";
|
|
5
|
+
export declare const OffscreenGlobalAccess = "adnbnOffscreenAccess";
|
|
6
|
+
export declare const OffscreenBridgeReadyMessageType = "adnbn:offscreen:ready";
|
|
7
|
+
export declare enum OffscreenReason {
|
|
16
8
|
/** A reason used for testing purposes only. */
|
|
17
9
|
Testing = "TESTING",
|
|
18
10
|
/** The offscreen document is responsible for playing audio. */
|
|
@@ -44,16 +36,14 @@ declare enum OffscreenReason {
|
|
|
44
36
|
/** Specifies that the offscreen document needs to use navigator.geolocation. */
|
|
45
37
|
Geolocation = "GEOLOCATION"
|
|
46
38
|
}
|
|
47
|
-
interface OffscreenConfig extends TransportConfig {
|
|
39
|
+
export interface OffscreenConfig extends TransportConfig {
|
|
48
40
|
reasons?: `${OffscreenReason}` | `${OffscreenReason}`[] | OffscreenReason | OffscreenReason[];
|
|
49
41
|
justification?: string;
|
|
50
42
|
}
|
|
51
|
-
type OffscreenOptions = OffscreenConfig & ViewOptions;
|
|
52
|
-
type OffscreenEntrypointOptions = Partial<OffscreenOptions>;
|
|
53
|
-
type OffscreenMainHandler<T extends TransportType> = (offscreen: T, options: OffscreenEntrypointOptions) => Awaiter<void>;
|
|
54
|
-
interface OffscreenDefinition<T extends TransportType> extends TransportDefinition<OffscreenOptions, T>, OffscreenEntrypointOptions {
|
|
43
|
+
export type OffscreenOptions = OffscreenConfig & ViewOptions;
|
|
44
|
+
export type OffscreenEntrypointOptions = Partial<OffscreenOptions>;
|
|
45
|
+
export type OffscreenMainHandler<T extends TransportType> = (offscreen: T, options: OffscreenEntrypointOptions) => Awaiter<void>;
|
|
46
|
+
export interface OffscreenDefinition<T extends TransportType> extends TransportDefinition<OffscreenOptions, T>, OffscreenEntrypointOptions {
|
|
55
47
|
main?: OffscreenMainHandler<T>;
|
|
56
48
|
}
|
|
57
|
-
type OffscreenUnresolvedDefinition<T extends TransportType> = Partial<OffscreenDefinition<T>>;
|
|
58
|
-
|
|
59
|
-
export { type OffscreenConfig, type OffscreenDefinition, type OffscreenEntrypointOptions, OffscreenGlobalAccess, OffscreenGlobalKey, type OffscreenMainHandler, type OffscreenOptions, OffscreenReason, type OffscreenUnresolvedDefinition };
|
|
49
|
+
export type OffscreenUnresolvedDefinition<T extends TransportType> = Partial<OffscreenDefinition<T>>;
|
package/dist/types/offscreen.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const OffscreenGlobalKey = "adnbnOffscreen";
|
|
2
2
|
const OffscreenGlobalAccess = "adnbnOffscreenAccess";
|
|
3
|
+
const OffscreenBridgeReadyMessageType = "adnbn:offscreen:ready";
|
|
3
4
|
var OffscreenReason = /* @__PURE__ */ ((OffscreenReason2) => {
|
|
4
5
|
OffscreenReason2["Testing"] = "TESTING";
|
|
5
6
|
OffscreenReason2["AudioPlayback"] = "AUDIO_PLAYBACK";
|
|
@@ -19,6 +20,7 @@ var OffscreenReason = /* @__PURE__ */ ((OffscreenReason2) => {
|
|
|
19
20
|
return OffscreenReason2;
|
|
20
21
|
})(OffscreenReason || {});
|
|
21
22
|
export {
|
|
23
|
+
OffscreenBridgeReadyMessageType,
|
|
22
24
|
OffscreenGlobalAccess,
|
|
23
25
|
OffscreenGlobalKey,
|
|
24
26
|
OffscreenReason
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/offscreen.ts"],"sourcesContent":["import {TransportConfig, TransportDefinition, TransportType} from \"@typing/transport\";\nimport {ViewOptions} from \"@typing/view\";\nimport {Awaiter} from \"@typing/helpers\";\n\nexport const OffscreenGlobalKey = \"adnbnOffscreen\";\nexport const OffscreenGlobalAccess = \"adnbnOffscreenAccess\";\n\nexport enum OffscreenReason {\n /** A reason used for testing purposes only. */\n Testing = \"TESTING\",\n /** The offscreen document is responsible for playing audio. */\n AudioPlayback = \"AUDIO_PLAYBACK\",\n /** The offscreen document needs to embed and script an iframe in order to modify the iframe's content. */\n IframeScripting = \"IFRAME_SCRIPTING\",\n /** The offscreen document needs to embed an iframe and scrape its DOM to extract information. */\n DOMScraping = \"DOM_SCRAPING\",\n /** The offscreen document needs to interact with Blob objects (including URL.createObjectURL()). */\n Blobs = \"BLOBS\",\n /** The offscreen document needs to use the DOMParser API. */\n DOMParser = \"DOM_PARSER\",\n /** The offscreen document needs to interact with media streams from user media (e.g. getUserMedia()). */\n UserMedia = \"USER_MEDIA\",\n /** The offscreen document needs to interact with media streams from display media (e.g. getDisplayMedia()). */\n DisplayMedia = \"DISPLAY_MEDIA\",\n /** The offscreen document needs to use WebRTC APIs. */\n WebRTC = \"WEB_RTC\",\n /** The offscreen document needs to interact with the clipboard APIs(e.g. Navigator.clipboard). */\n Clipboard = \"CLIPBOARD\",\n /** Specifies that the offscreen document needs access to localStorage. */\n LocalStorage = \"LOCAL_STORAGE\",\n /** Specifies that the offscreen document needs to spawn workers. */\n Workers = \"WORKERS\",\n /** Specifies that the offscreen document needs to use navigator.getBattery. */\n BatteryStatus = \"BATTERY_STATUS\",\n /** Specifies that the offscreen document needs to use window.matchMedia. */\n MatchMedia = \"MATCH_MEDIA\",\n /** Specifies that the offscreen document needs to use navigator.geolocation. */\n Geolocation = \"GEOLOCATION\",\n}\n\nexport interface OffscreenConfig extends TransportConfig {\n reasons?: `${OffscreenReason}` | `${OffscreenReason}`[] | OffscreenReason | OffscreenReason[];\n justification?: string;\n}\n\nexport type OffscreenOptions = OffscreenConfig & ViewOptions;\n\nexport type OffscreenEntrypointOptions = Partial<OffscreenOptions>;\n\nexport type OffscreenMainHandler<T extends TransportType> = (\n offscreen: T,\n options: OffscreenEntrypointOptions\n) => Awaiter<void>;\n\nexport interface OffscreenDefinition<T extends TransportType>\n extends TransportDefinition<OffscreenOptions, T>, OffscreenEntrypointOptions {\n main?: OffscreenMainHandler<T>;\n}\n\nexport type OffscreenUnresolvedDefinition<T extends TransportType> = Partial<OffscreenDefinition<T>>;\n"],"mappings":"AAIO,MAAM,qBAAqB;AAC3B,MAAM,wBAAwB;
|
|
1
|
+
{"version":3,"sources":["../../src/types/offscreen.ts"],"sourcesContent":["import {TransportConfig, TransportDefinition, TransportType} from \"@typing/transport\";\nimport {ViewOptions} from \"@typing/view\";\nimport {Awaiter} from \"@typing/helpers\";\n\nexport const OffscreenGlobalKey = \"adnbnOffscreen\";\nexport const OffscreenGlobalAccess = \"adnbnOffscreenAccess\";\nexport const OffscreenBridgeReadyMessageType = \"adnbn:offscreen:ready\";\n\nexport enum OffscreenReason {\n /** A reason used for testing purposes only. */\n Testing = \"TESTING\",\n /** The offscreen document is responsible for playing audio. */\n AudioPlayback = \"AUDIO_PLAYBACK\",\n /** The offscreen document needs to embed and script an iframe in order to modify the iframe's content. */\n IframeScripting = \"IFRAME_SCRIPTING\",\n /** The offscreen document needs to embed an iframe and scrape its DOM to extract information. */\n DOMScraping = \"DOM_SCRAPING\",\n /** The offscreen document needs to interact with Blob objects (including URL.createObjectURL()). */\n Blobs = \"BLOBS\",\n /** The offscreen document needs to use the DOMParser API. */\n DOMParser = \"DOM_PARSER\",\n /** The offscreen document needs to interact with media streams from user media (e.g. getUserMedia()). */\n UserMedia = \"USER_MEDIA\",\n /** The offscreen document needs to interact with media streams from display media (e.g. getDisplayMedia()). */\n DisplayMedia = \"DISPLAY_MEDIA\",\n /** The offscreen document needs to use WebRTC APIs. */\n WebRTC = \"WEB_RTC\",\n /** The offscreen document needs to interact with the clipboard APIs(e.g. Navigator.clipboard). */\n Clipboard = \"CLIPBOARD\",\n /** Specifies that the offscreen document needs access to localStorage. */\n LocalStorage = \"LOCAL_STORAGE\",\n /** Specifies that the offscreen document needs to spawn workers. */\n Workers = \"WORKERS\",\n /** Specifies that the offscreen document needs to use navigator.getBattery. */\n BatteryStatus = \"BATTERY_STATUS\",\n /** Specifies that the offscreen document needs to use window.matchMedia. */\n MatchMedia = \"MATCH_MEDIA\",\n /** Specifies that the offscreen document needs to use navigator.geolocation. */\n Geolocation = \"GEOLOCATION\",\n}\n\nexport interface OffscreenConfig extends TransportConfig {\n reasons?: `${OffscreenReason}` | `${OffscreenReason}`[] | OffscreenReason | OffscreenReason[];\n justification?: string;\n}\n\nexport type OffscreenOptions = OffscreenConfig & ViewOptions;\n\nexport type OffscreenEntrypointOptions = Partial<OffscreenOptions>;\n\nexport type OffscreenMainHandler<T extends TransportType> = (\n offscreen: T,\n options: OffscreenEntrypointOptions\n) => Awaiter<void>;\n\nexport interface OffscreenDefinition<T extends TransportType>\n extends TransportDefinition<OffscreenOptions, T>, OffscreenEntrypointOptions {\n main?: OffscreenMainHandler<T>;\n}\n\nexport type OffscreenUnresolvedDefinition<T extends TransportType> = Partial<OffscreenDefinition<T>>;\n"],"mappings":"AAIO,MAAM,qBAAqB;AAC3B,MAAM,wBAAwB;AAC9B,MAAM,kCAAkC;AAExC,IAAK,kBAAL,kBAAKA,qBAAL;AAEH,EAAAA,iBAAA,aAAU;AAEV,EAAAA,iBAAA,mBAAgB;AAEhB,EAAAA,iBAAA,qBAAkB;AAElB,EAAAA,iBAAA,iBAAc;AAEd,EAAAA,iBAAA,WAAQ;AAER,EAAAA,iBAAA,eAAY;AAEZ,EAAAA,iBAAA,eAAY;AAEZ,EAAAA,iBAAA,kBAAe;AAEf,EAAAA,iBAAA,YAAS;AAET,EAAAA,iBAAA,eAAY;AAEZ,EAAAA,iBAAA,kBAAe;AAEf,EAAAA,iBAAA,aAAU;AAEV,EAAAA,iBAAA,mBAAgB;AAEhB,EAAAA,iBAAA,gBAAa;AAEb,EAAAA,iBAAA,iBAAc;AA9BN,SAAAA;AAAA,GAAA;","names":["OffscreenReason"]}
|
package/dist/types/page.d.ts
CHANGED
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import 'utility-types';
|
|
4
|
-
import 'html-rspack-tags-plugin';
|
|
5
|
-
import './helpers.js';
|
|
6
|
-
import '../manifest-DKvERQ4d.js';
|
|
7
|
-
import './app.js';
|
|
8
|
-
import './browser.js';
|
|
9
|
-
import './locale.js';
|
|
10
|
-
|
|
11
|
-
interface PageConfig {
|
|
1
|
+
import { ViewDefinition, ViewOptions } from "./view.js";
|
|
2
|
+
export interface PageConfig {
|
|
12
3
|
name?: string;
|
|
13
4
|
matches?: string[];
|
|
14
5
|
}
|
|
15
|
-
type PageEntrypointOptions = PageConfig & ViewOptions;
|
|
16
|
-
type PageProps = PageEntrypointOptions;
|
|
17
|
-
type PageDefinition = PageEntrypointOptions & ViewDefinition<PageProps>;
|
|
18
|
-
|
|
19
|
-
export type { PageConfig, PageDefinition, PageEntrypointOptions, PageProps };
|
|
6
|
+
export type PageEntrypointOptions = PageConfig & ViewOptions;
|
|
7
|
+
export type PageProps = PageEntrypointOptions;
|
|
8
|
+
export type PageDefinition = PageEntrypointOptions & ViewDefinition<PageProps>;
|
package/dist/types/plugin.d.ts
CHANGED
|
@@ -1,11 +1,101 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { ManifestBuilder } from "./manifest.js";
|
|
2
|
+
import { Configuration as RspackConfig } from "@rspack/core";
|
|
3
|
+
import { ReadonlyConfig } from "./config.js";
|
|
4
|
+
import { EntrypointFile } from "./entrypoint.js";
|
|
5
|
+
import { Awaiter } from "./helpers.js";
|
|
6
|
+
/**
|
|
7
|
+
* The result of executing the `entrypoint` function in a plugin.
|
|
8
|
+
*
|
|
9
|
+
* Can be one of the following values:
|
|
10
|
+
*
|
|
11
|
+
* - `true` — the entrypoint is considered active, and the file path is automatically
|
|
12
|
+
* inferred based on the key name of the entrypoint. For example, if the key is `background`,
|
|
13
|
+
* the file named `background` will be used by default.
|
|
14
|
+
*
|
|
15
|
+
* - `string` — a path to a single **file**
|
|
16
|
+
*
|
|
17
|
+
* - `string[]` — an array of paths to **files**
|
|
18
|
+
*
|
|
19
|
+
* - `EntrypointFile` — an object describing a single entrypoint file.
|
|
20
|
+
*
|
|
21
|
+
* - `EntrypointFile[]` — an array of `EntrypointFile` objects.
|
|
22
|
+
*
|
|
23
|
+
* - `Set<EntrypointFile>` — a unique set of `EntrypointFile` objects.
|
|
24
|
+
*/
|
|
25
|
+
export type PluginEntrypointResult = true | string | string[] | EntrypointFile | EntrypointFile[] | Set<EntrypointFile>;
|
|
26
|
+
export interface PluginConfigOptions {
|
|
27
|
+
config: ReadonlyConfig;
|
|
28
|
+
}
|
|
29
|
+
export interface PluginManifestOptions extends PluginConfigOptions {
|
|
30
|
+
manifest: ManifestBuilder;
|
|
31
|
+
}
|
|
32
|
+
export interface PluginBundlerOptions extends PluginConfigOptions {
|
|
33
|
+
rspack: RspackConfig;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The result of executing the `locales` function in a plugin.
|
|
37
|
+
*
|
|
38
|
+
* Can be one of the following values:
|
|
39
|
+
*
|
|
40
|
+
* - `true` — the system will look for a directory named `locales` and treat all files inside
|
|
41
|
+
* it as localization files.
|
|
42
|
+
*
|
|
43
|
+
* - `string` — a path to a specific **directory**, and all files inside will be treated as localization files.
|
|
44
|
+
*
|
|
45
|
+
* - `string[]` — an array of paths to **files** will be treated as localization files.
|
|
46
|
+
*
|
|
47
|
+
* - `Set<string>` — a unique set of localization files.
|
|
48
|
+
*/
|
|
49
|
+
export type PluginLocaleResult = PluginEntrypointResult;
|
|
50
|
+
/**
|
|
51
|
+
* The result of executing the `icons` function in a plugin.
|
|
52
|
+
*
|
|
53
|
+
* Can be one of the following values:
|
|
54
|
+
*
|
|
55
|
+
* - `true` — the system will look for a directory named `icons` and treat all files inside
|
|
56
|
+
* it as image files.
|
|
57
|
+
*
|
|
58
|
+
* - `string` — a path to a specific **directory**, and all files inside will be treated as image files.
|
|
59
|
+
*
|
|
60
|
+
* - `string[]` — an array of paths to **files** will be treated as image files.
|
|
61
|
+
*
|
|
62
|
+
* - `Set<string>` — a unique set of image files.
|
|
63
|
+
*/
|
|
64
|
+
export type PluginIconResult = PluginEntrypointResult;
|
|
65
|
+
interface PluginName {
|
|
66
|
+
name: string;
|
|
67
|
+
}
|
|
68
|
+
export interface Plugin extends PluginName {
|
|
69
|
+
background?: PluginHandler<PluginConfigOptions, PluginEntrypointResult>;
|
|
70
|
+
bundler?: PluginHandler<PluginBundlerOptions, RspackConfig>;
|
|
71
|
+
command?: PluginHandler<PluginConfigOptions, PluginEntrypointResult>;
|
|
72
|
+
content?: PluginHandler<PluginConfigOptions, PluginEntrypointResult>;
|
|
73
|
+
page?: PluginHandler<PluginConfigOptions, PluginEntrypointResult>;
|
|
74
|
+
popup?: PluginHandler<PluginConfigOptions, PluginEntrypointResult>;
|
|
75
|
+
relay?: PluginHandler<PluginConfigOptions, PluginEntrypointResult>;
|
|
76
|
+
service?: PluginHandler<PluginConfigOptions, PluginEntrypointResult>;
|
|
77
|
+
sidebar?: PluginHandler<PluginConfigOptions, PluginEntrypointResult>;
|
|
78
|
+
offscreen?: PluginHandler<PluginConfigOptions, PluginEntrypointResult>;
|
|
79
|
+
locale?: PluginHandler<PluginConfigOptions, PluginLocaleResult>;
|
|
80
|
+
icon?: PluginHandler<PluginConfigOptions, PluginIconResult>;
|
|
81
|
+
manifest?: PluginHandlerCallback<PluginManifestOptions>;
|
|
82
|
+
startup?: PluginHandlerCallback<PluginConfigOptions>;
|
|
83
|
+
}
|
|
84
|
+
export type PluginHandler<O, T = void> = T | PluginHandlerCallback<O, T>;
|
|
85
|
+
export type PluginHandlerCallback<O, T = void> = {
|
|
86
|
+
(options: O): Awaiter<T>;
|
|
87
|
+
};
|
|
88
|
+
export type PluginHandlerKeys = keyof Omit<Plugin, "name">;
|
|
89
|
+
export type PluginEntrypointKeys = keyof Pick<Plugin, "background" | "command" | "content" | "page" | "popup" | "relay" | "service" | "sidebar" | "offscreen">;
|
|
90
|
+
export type PluginAssetKeys = keyof Pick<Plugin, "icon" | "locale">;
|
|
91
|
+
export type PluginHandlerType<T extends Plugin[PluginHandlerKeys]> = T extends PluginHandlerCallback<infer O, infer R> ? {
|
|
92
|
+
options: O;
|
|
93
|
+
result: R;
|
|
94
|
+
} : never;
|
|
95
|
+
export type PluginHandlerOptions<K extends PluginHandlerKeys> = PluginHandlerType<Plugin[K]>["options"];
|
|
96
|
+
export type PluginHandlerResult<K extends PluginHandlerKeys> = NonNullable<PluginHandlerType<Plugin[K]>["result"]>;
|
|
97
|
+
export interface PluginNameHandlerResult<K extends PluginHandlerKeys> extends PluginName {
|
|
98
|
+
result: PluginHandlerResult<K>;
|
|
99
|
+
}
|
|
100
|
+
export type PluginDefinition<T extends any[] = []> = (...args: T) => Plugin;
|
|
101
|
+
export {};
|
package/dist/types/popup.d.ts
CHANGED
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import 'utility-types';
|
|
4
|
-
import 'html-rspack-tags-plugin';
|
|
5
|
-
import './helpers.js';
|
|
6
|
-
import '../manifest-DKvERQ4d.js';
|
|
7
|
-
import './app.js';
|
|
8
|
-
import './browser.js';
|
|
9
|
-
import './locale.js';
|
|
10
|
-
|
|
11
|
-
interface PopupConfig {
|
|
1
|
+
import { ViewDefinition, ViewOptions } from "./view.js";
|
|
2
|
+
export interface PopupConfig {
|
|
12
3
|
icon?: string;
|
|
13
4
|
apply?: boolean;
|
|
14
5
|
}
|
|
15
|
-
type PopupEntrypointOptions = PopupConfig & ViewOptions;
|
|
16
|
-
type PopupProps = PopupEntrypointOptions;
|
|
17
|
-
type PopupDefinition = PopupEntrypointOptions & ViewDefinition<PopupProps>;
|
|
18
|
-
|
|
19
|
-
export type { PopupConfig, PopupDefinition, PopupEntrypointOptions, PopupProps };
|
|
6
|
+
export type PopupEntrypointOptions = PopupConfig & ViewOptions;
|
|
7
|
+
export type PopupProps = PopupEntrypointOptions;
|
|
8
|
+
export type PopupDefinition = PopupEntrypointOptions & ViewDefinition<PopupProps>;
|
package/dist/types/relay.d.ts
CHANGED
|
@@ -1,28 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import './browser.js';
|
|
8
|
-
import './locale.js';
|
|
9
|
-
import './message.js';
|
|
10
|
-
|
|
11
|
-
declare const RelayGlobalKey = "adnbnRelay";
|
|
12
|
-
declare enum RelayMethod {
|
|
1
|
+
import { EntrypointOptions } from "./entrypoint.js";
|
|
2
|
+
import { ContentScriptConfig, ContentScriptContext, ContentScriptDefinition } from "./content.js";
|
|
3
|
+
import { TransportConfig, TransportDefinition, TransportType } from "./transport.js";
|
|
4
|
+
import { Awaiter } from "./helpers.js";
|
|
5
|
+
export declare const RelayGlobalKey = "adnbnRelay";
|
|
6
|
+
export declare enum RelayMethod {
|
|
13
7
|
Scripting = "scripting",
|
|
14
8
|
Messaging = "messaging"
|
|
15
9
|
}
|
|
16
|
-
interface RelayConfig extends TransportConfig, ContentScriptConfig {
|
|
10
|
+
export interface RelayConfig extends TransportConfig, ContentScriptConfig {
|
|
17
11
|
method?: RelayMethod;
|
|
18
12
|
}
|
|
19
|
-
type RelayOptions = RelayConfig & EntrypointOptions;
|
|
20
|
-
type RelayOptionsMap = Map<string, RelayOptions>;
|
|
21
|
-
type RelayEntrypointOptions = Partial<RelayOptions>;
|
|
22
|
-
type RelayMainHandler<T extends TransportType> = (relay: T, context: ContentScriptContext, options: RelayEntrypointOptions) => Awaiter<void>;
|
|
23
|
-
interface RelayDefinition<T extends TransportType> extends Omit<TransportDefinition<RelayOptions, T>, "main">, Omit<ContentScriptDefinition, "main">, RelayEntrypointOptions {
|
|
13
|
+
export type RelayOptions = RelayConfig & EntrypointOptions;
|
|
14
|
+
export type RelayOptionsMap = Map<string, RelayOptions>;
|
|
15
|
+
export type RelayEntrypointOptions = Partial<RelayOptions>;
|
|
16
|
+
export type RelayMainHandler<T extends TransportType> = (relay: T, context: ContentScriptContext, options: RelayEntrypointOptions) => Awaiter<void>;
|
|
17
|
+
export interface RelayDefinition<T extends TransportType> extends Omit<TransportDefinition<RelayOptions, T>, "main">, Omit<ContentScriptDefinition, "main">, RelayEntrypointOptions {
|
|
24
18
|
main?: RelayMainHandler<T>;
|
|
25
19
|
}
|
|
26
|
-
type RelayUnresolvedDefinition<T extends TransportType> = Partial<RelayDefinition<T>>;
|
|
27
|
-
|
|
28
|
-
export { type RelayConfig, type RelayDefinition, type RelayEntrypointOptions, RelayGlobalKey, type RelayMainHandler, RelayMethod, type RelayOptions, type RelayOptionsMap, type RelayUnresolvedDefinition };
|
|
20
|
+
export type RelayUnresolvedDefinition<T extends TransportType> = Partial<RelayDefinition<T>>;
|
package/dist/types/service.d.ts
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
declare const ServiceGlobalKey = "adnbnService";
|
|
12
|
-
type ServiceConfig = TransportConfig & BackgroundConfig;
|
|
13
|
-
type ServiceOptions = ServiceConfig & EntrypointOptions;
|
|
14
|
-
type ServiceEntrypointOptions = Partial<ServiceOptions>;
|
|
15
|
-
type ServiceDefinition<T extends TransportType> = TransportDefinition<ServiceOptions, T> & ServiceEntrypointOptions;
|
|
16
|
-
type ServiceUnresolvedDefinition<T extends TransportType> = Partial<ServiceDefinition<T>>;
|
|
17
|
-
|
|
18
|
-
export { type ServiceConfig, type ServiceDefinition, type ServiceEntrypointOptions, ServiceGlobalKey, type ServiceOptions, type ServiceUnresolvedDefinition };
|
|
1
|
+
import { BackgroundConfig } from "./background.js";
|
|
2
|
+
import { EntrypointOptions } from "./entrypoint.js";
|
|
3
|
+
import { TransportConfig, TransportDefinition, TransportType } from "./transport.js";
|
|
4
|
+
export declare const ServiceGlobalKey = "adnbnService";
|
|
5
|
+
export type ServiceConfig = TransportConfig & BackgroundConfig;
|
|
6
|
+
export type ServiceOptions = ServiceConfig & EntrypointOptions;
|
|
7
|
+
export type ServiceEntrypointOptions = Partial<ServiceOptions>;
|
|
8
|
+
export type ServiceDefinition<T extends TransportType> = TransportDefinition<ServiceOptions, T> & ServiceEntrypointOptions;
|
|
9
|
+
export type ServiceUnresolvedDefinition<T extends TransportType> = Partial<ServiceDefinition<T>>;
|