adnbn 0.10.0 → 0.12.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 +3 -0
- package/dist/cli/builders/locale/LocaleBuilder.js +2 -11
- package/dist/cli/builders/locale/LocaleBuilder.js.map +1 -1
- package/dist/cli/builders/locale/index.js +1 -1
- package/dist/cli/builders/locale/index.js.map +1 -1
- package/dist/cli/builders/manifest/ManifestBase.js +17 -7
- package/dist/cli/builders/manifest/ManifestBase.js.map +1 -1
- package/dist/cli/builders/manifest/ManifestV2.js +1 -1
- package/dist/cli/builders/manifest/ManifestV3.js +12 -5
- package/dist/cli/builders/manifest/ManifestV3.js.map +1 -1
- package/dist/cli/builders/manifest/utils/data-collection-permissions.d.ts +15 -0
- package/dist/cli/builders/manifest/utils/data-collection-permissions.js +26 -0
- package/dist/cli/builders/manifest/utils/data-collection-permissions.js.map +1 -0
- package/dist/cli/builders/manifest/utils/host-patterns.d.ts +1 -0
- package/dist/cli/builders/manifest/utils/host-patterns.js +40 -0
- package/dist/cli/builders/manifest/utils/host-patterns.js.map +1 -0
- package/dist/cli/builders/manifest/utils/index.d.ts +4 -0
- package/dist/cli/builders/manifest/utils/index.js +19 -0
- package/dist/cli/builders/manifest/utils/index.js.map +1 -0
- package/dist/cli/builders/manifest/utils/permissions.d.ts +14 -0
- package/dist/cli/builders/manifest/utils/permissions.js +34 -0
- package/dist/cli/builders/manifest/utils/permissions.js.map +1 -0
- package/dist/cli/builders/manifest/utils/web-accessible-resources.d.ts +2 -0
- package/dist/cli/builders/manifest/utils/web-accessible-resources.js +92 -0
- package/dist/cli/builders/manifest/utils/web-accessible-resources.js.map +1 -0
- package/dist/cli/bundler/index.d.ts +1 -0
- package/dist/cli/bundler/index.js +1 -0
- package/dist/cli/bundler/index.js.map +1 -1
- package/dist/cli/bundler/layers.d.ts +5 -0
- package/dist/cli/bundler/layers.js +12 -0
- package/dist/cli/bundler/layers.js.map +1 -0
- package/dist/cli/bundler/plugins/build-assets-map/BuildAssetsMapPlugin.d.ts +14 -0
- package/dist/cli/bundler/plugins/build-assets-map/BuildAssetsMapPlugin.js +524 -0
- package/dist/cli/bundler/plugins/build-assets-map/BuildAssetsMapPlugin.js.map +1 -0
- package/dist/cli/bundler/plugins/build-assets-map/index.d.ts +2 -0
- package/dist/cli/bundler/plugins/build-assets-map/index.js +5 -0
- package/dist/cli/bundler/plugins/build-assets-map/index.js.map +1 -0
- package/dist/cli/bundler/plugins/build-assets-map/usage.d.ts +9 -0
- package/dist/cli/bundler/plugins/build-assets-map/usage.js +31 -0
- package/dist/cli/bundler/plugins/build-assets-map/usage.js.map +1 -0
- package/dist/cli/bundler/plugins/chunk-loader/ChunkLoaderPlugin.d.ts +9 -0
- package/dist/cli/bundler/plugins/chunk-loader/ChunkLoaderPlugin.js +43 -0
- package/dist/cli/bundler/plugins/chunk-loader/ChunkLoaderPlugin.js.map +1 -0
- package/dist/cli/bundler/plugins/chunk-loader/index.d.ts +1 -0
- package/dist/cli/bundler/plugins/chunk-loader/index.js +5 -0
- package/dist/cli/bundler/plugins/chunk-loader/index.js.map +1 -0
- package/dist/cli/bundler/plugins/chunk-loader/templates/runtime.template.d.ts +2 -0
- package/dist/cli/bundler/plugins/chunk-loader/templates.d.ts +7 -0
- package/dist/cli/bundler/plugins/chunk-loader/templates.js +30 -0
- package/dist/cli/bundler/plugins/{EntrypointPlugin.d.ts → entrypoint/EntrypointPlugin.d.ts} +7 -2
- package/dist/cli/bundler/plugins/{EntrypointPlugin.js → entrypoint/EntrypointPlugin.js} +46 -26
- package/dist/cli/bundler/plugins/entrypoint/EntrypointPlugin.js.map +1 -0
- package/dist/cli/bundler/plugins/entrypoint/index.d.ts +1 -0
- package/dist/cli/bundler/plugins/entrypoint/index.js +7 -0
- package/dist/cli/bundler/plugins/entrypoint/index.js.map +1 -0
- package/dist/cli/bundler/plugins/{GenerateJsonPlugin.d.ts → generate-json/GenerateJsonPlugin.d.ts} +1 -0
- package/dist/cli/bundler/plugins/generate-json/GenerateJsonPlugin.js +73 -0
- package/dist/cli/bundler/plugins/generate-json/GenerateJsonPlugin.js.map +1 -0
- package/dist/cli/bundler/plugins/generate-json/index.d.ts +1 -0
- package/dist/cli/bundler/plugins/generate-json/index.js +5 -0
- package/dist/cli/bundler/plugins/generate-json/index.js.map +1 -0
- package/dist/cli/bundler/plugins/generate-module/GenerateModulePlugin.d.ts +23 -0
- package/dist/cli/bundler/plugins/generate-module/GenerateModulePlugin.js +88 -0
- package/dist/cli/bundler/plugins/generate-module/GenerateModulePlugin.js.map +1 -0
- package/dist/cli/bundler/plugins/generate-module/index.d.ts +1 -0
- package/dist/cli/bundler/plugins/generate-module/index.js +7 -0
- package/dist/cli/bundler/plugins/generate-module/index.js.map +1 -0
- package/dist/cli/bundler/plugins/index.d.ts +11 -5
- package/dist/cli/bundler/plugins/index.js +28 -10
- package/dist/cli/bundler/plugins/index.js.map +1 -1
- package/dist/cli/bundler/plugins/isolated-styles/IsolatedStylesPlugin.d.ts +21 -0
- package/dist/cli/bundler/plugins/isolated-styles/IsolatedStylesPlugin.js +174 -0
- package/dist/cli/bundler/plugins/isolated-styles/IsolatedStylesPlugin.js.map +1 -0
- package/dist/cli/bundler/plugins/isolated-styles/chunks.d.ts +3 -0
- package/dist/cli/bundler/plugins/isolated-styles/chunks.js +32 -0
- package/dist/cli/bundler/plugins/isolated-styles/chunks.js.map +1 -0
- package/dist/cli/bundler/plugins/isolated-styles/index.d.ts +1 -0
- package/dist/cli/bundler/plugins/isolated-styles/index.js +5 -0
- package/dist/cli/bundler/plugins/isolated-styles/index.js.map +1 -0
- package/dist/cli/bundler/plugins/isolated-styles/templates/css-loader.template.d.ts +1 -0
- package/dist/cli/bundler/plugins/isolated-styles/templates/runtime.template.d.ts +7 -0
- package/dist/cli/bundler/plugins/isolated-styles/templates.d.ts +18 -0
- package/dist/cli/bundler/plugins/isolated-styles/templates.js +174 -0
- package/dist/cli/bundler/plugins/manifest/ManifestPlugin.d.ts +10 -0
- package/dist/cli/bundler/plugins/manifest/ManifestPlugin.js +54 -0
- package/dist/cli/bundler/plugins/manifest/ManifestPlugin.js.map +1 -0
- package/dist/cli/bundler/plugins/manifest/index.d.ts +1 -0
- package/dist/cli/bundler/plugins/manifest/index.js +6 -0
- package/dist/cli/bundler/plugins/manifest/index.js.map +1 -0
- package/dist/cli/bundler/plugins/replace/ReplacePlugin.js.map +1 -0
- package/dist/cli/bundler/plugins/replace/index.d.ts +1 -0
- package/dist/cli/bundler/plugins/replace/index.js +5 -0
- package/dist/cli/bundler/plugins/replace/index.js.map +1 -0
- package/dist/cli/bundler/plugins/resource-access/ResourceAccessPlugin.d.ts +19 -0
- package/dist/cli/bundler/plugins/resource-access/ResourceAccessPlugin.js +20 -0
- package/dist/cli/bundler/plugins/resource-access/ResourceAccessPlugin.js.map +1 -0
- package/dist/cli/bundler/plugins/resource-access/index.d.ts +1 -0
- package/dist/cli/bundler/plugins/resource-access/index.js +5 -0
- package/dist/cli/bundler/plugins/resource-access/index.js.map +1 -0
- package/dist/cli/bundler/plugins/resource-access/utils.d.ts +8 -0
- package/dist/cli/bundler/plugins/resource-access/utils.js +42 -0
- package/dist/cli/bundler/plugins/resource-access/utils.js.map +1 -0
- package/dist/cli/bundler/plugins/types.d.ts +8 -0
- package/dist/cli/bundler/plugins/types.js +1 -0
- package/dist/cli/bundler/plugins/types.js.map +1 -0
- package/dist/cli/bundler/plugins/utils/compilation-assets.d.ts +4 -0
- package/dist/cli/bundler/plugins/utils/compilation-assets.js +12 -0
- package/dist/cli/bundler/plugins/utils/compilation-assets.js.map +1 -0
- package/dist/cli/bundler/plugins/utils/index.d.ts +5 -0
- package/dist/cli/bundler/plugins/utils/index.js +14 -0
- package/dist/cli/bundler/plugins/utils/index.js.map +1 -0
- package/dist/cli/bundler/plugins/utils/manifest-hooks.d.ts +13 -0
- package/dist/cli/bundler/plugins/utils/manifest-hooks.js +17 -0
- package/dist/cli/bundler/plugins/utils/manifest-hooks.js.map +1 -0
- package/dist/cli/bundler/plugins/utils/runtime-module.d.ts +3 -0
- package/dist/cli/bundler/plugins/utils/runtime-module.js +11 -0
- package/dist/cli/bundler/plugins/utils/runtime-module.js.map +1 -0
- package/dist/cli/bundler/plugins/utils/runtime-template.d.ts +1 -0
- package/dist/cli/bundler/plugins/utils/runtime-template.js +18 -0
- package/dist/cli/bundler/plugins/utils/runtime-template.js.map +1 -0
- package/dist/cli/bundler/plugins/utils/watch-compilation.d.ts +3 -0
- package/dist/cli/bundler/plugins/utils/watch-compilation.js +18 -0
- package/dist/cli/bundler/plugins/utils/watch-compilation.js.map +1 -0
- package/dist/cli/bundler/plugins/watch/WatchPlugin.js +16 -0
- package/dist/cli/bundler/plugins/watch/WatchPlugin.js.map +1 -0
- package/dist/cli/bundler/plugins/watch/index.d.ts +1 -0
- package/dist/cli/bundler/plugins/watch/index.js +5 -0
- package/dist/cli/bundler/plugins/watch/index.js.map +1 -0
- package/dist/cli/bundler/utils/app-filename.d.ts +2 -0
- package/dist/cli/bundler/utils/app-filename.js +19 -0
- package/dist/cli/bundler/utils/app-filename.js.map +1 -0
- package/dist/cli/bundler/utils/assets.d.ts +3 -0
- package/dist/cli/bundler/utils/assets.js +162 -0
- package/dist/cli/bundler/utils/assets.js.map +1 -0
- package/dist/cli/bundler/utils/chunk-filename.d.ts +6 -0
- package/dist/cli/bundler/utils/chunk-filename.js +93 -0
- package/dist/cli/bundler/utils/chunk-filename.js.map +1 -0
- package/dist/cli/bundler/utils/index.d.ts +2 -1
- package/dist/cli/bundler/utils/index.js +2 -1
- package/dist/cli/bundler/utils/index.js.map +1 -1
- package/dist/cli/entrypoint/file/ExpressionFile.d.ts +4 -1
- package/dist/cli/entrypoint/file/ExpressionFile.js +11 -0
- package/dist/cli/entrypoint/file/ExpressionFile.js.map +1 -1
- package/dist/cli/entrypoint/file/OptionFile.d.ts +4 -2
- package/dist/cli/entrypoint/file/OptionFile.js +35 -31
- package/dist/cli/entrypoint/file/OptionFile.js.map +1 -1
- package/dist/cli/entrypoint/file/SourceFile.d.ts +18 -7
- package/dist/cli/entrypoint/file/SourceFile.js +260 -156
- package/dist/cli/entrypoint/file/SourceFile.js.map +1 -1
- package/dist/cli/entrypoint/file/index.d.ts +2 -0
- package/dist/cli/entrypoint/file/index.js +2 -0
- package/dist/cli/entrypoint/file/index.js.map +1 -1
- package/dist/cli/entrypoint/file/injectors/core.js +22 -1
- package/dist/cli/entrypoint/file/injectors/core.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/ExportParser.d.ts +14 -0
- package/dist/cli/entrypoint/file/parsers/ExportParser.js +71 -0
- package/dist/cli/entrypoint/file/parsers/ExportParser.js.map +1 -0
- package/dist/cli/entrypoint/file/parsers/NodeFinder.d.ts +2 -0
- package/dist/cli/entrypoint/file/parsers/NodeFinder.js +9 -0
- package/dist/cli/entrypoint/file/parsers/NodeFinder.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/ObjectParser.js +5 -1
- package/dist/cli/entrypoint/file/parsers/ObjectParser.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/index.d.ts +1 -0
- package/dist/cli/entrypoint/file/parsers/index.js +2 -0
- package/dist/cli/entrypoint/file/parsers/index.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/types.d.ts +16 -0
- package/dist/cli/entrypoint/file/parsers/types.js +13 -0
- package/dist/cli/entrypoint/file/parsers/types.js.map +1 -1
- package/dist/cli/entrypoint/file/resolvers/ImportResolver.d.ts +1 -0
- package/dist/cli/entrypoint/file/resolvers/ImportResolver.js +3 -0
- package/dist/cli/entrypoint/file/resolvers/ImportResolver.js.map +1 -1
- package/dist/cli/entrypoint/file/types.d.ts +26 -1
- package/dist/cli/entrypoint/finder/AbstractEntrypointFinder.js.map +1 -1
- package/dist/cli/entrypoint/finder/ContentFinder.d.ts +1 -1
- package/dist/cli/entrypoint/parser/AbstractParser.d.ts +3 -2
- package/dist/cli/entrypoint/parser/AbstractParser.js +6 -3
- package/dist/cli/entrypoint/parser/AbstractParser.js.map +1 -1
- package/dist/cli/entrypoint/parser/CommandParser.js +1 -1
- package/dist/cli/entrypoint/parser/CommandParser.js.map +1 -1
- package/dist/cli/entrypoint/parser/ContentParser.d.ts +7 -3
- package/dist/cli/entrypoint/parser/ContentParser.js +42 -6
- package/dist/cli/entrypoint/parser/ContentParser.js.map +1 -1
- package/dist/cli/entrypoint/parser/RelayParser.d.ts +21 -2
- package/dist/cli/entrypoint/parser/RelayParser.js +5 -1
- package/dist/cli/entrypoint/parser/RelayParser.js.map +1 -1
- package/dist/cli/entrypoint/parser/utils/content/default-render.d.ts +3 -0
- package/dist/cli/entrypoint/parser/utils/content/default-render.js +21 -0
- package/dist/cli/entrypoint/parser/utils/content/default-render.js.map +1 -0
- package/dist/cli/plugins/asset.js +9 -4
- package/dist/cli/plugins/asset.js.map +1 -1
- package/dist/cli/plugins/background/index.js +1 -1
- package/dist/cli/plugins/background/index.js.map +1 -1
- package/dist/cli/plugins/content/Content.d.ts +2 -2
- package/dist/cli/plugins/content/Content.js +3 -2
- package/dist/cli/plugins/content/Content.js.map +1 -1
- package/dist/cli/plugins/content/ContentDriver.d.ts +1 -1
- package/dist/cli/plugins/content/ContentManager.d.ts +8 -5
- package/dist/cli/plugins/content/ContentManager.js +79 -28
- package/dist/cli/plugins/content/ContentManager.js.map +1 -1
- package/dist/cli/plugins/content/ContentName.d.ts +2 -2
- package/dist/cli/plugins/content/ContentName.js +8 -7
- package/dist/cli/plugins/content/ContentName.js.map +1 -1
- package/dist/cli/plugins/content/Relay.d.ts +2 -2
- package/dist/cli/plugins/content/Relay.js +3 -2
- package/dist/cli/plugins/content/Relay.js.map +1 -1
- package/dist/cli/plugins/content/RelayDriver.d.ts +1 -1
- package/dist/cli/plugins/content/RelayDriver.js +1 -1
- package/dist/cli/plugins/content/bundler.d.ts +7 -0
- package/dist/cli/plugins/content/bundler.js +47 -0
- package/dist/cli/plugins/content/bundler.js.map +1 -0
- package/dist/cli/plugins/content/index.js +121 -62
- package/dist/cli/plugins/content/index.js.map +1 -1
- package/dist/cli/plugins/content/relay-module.d.ts +3 -0
- package/dist/cli/plugins/content/relay-module.js +11 -0
- package/dist/cli/plugins/content/relay-module.js.map +1 -0
- package/dist/cli/plugins/content/types.d.ts +2 -2
- package/dist/cli/plugins/content/utils.d.ts +3 -1
- package/dist/cli/plugins/content/utils.js +8 -1
- package/dist/cli/plugins/content/utils.js.map +1 -1
- package/dist/cli/plugins/icon/declaration/IconDeclaration.d.ts +1 -1
- package/dist/cli/plugins/icon/declaration/IconDeclaration.js +6 -6
- package/dist/cli/plugins/icon/declaration/IconDeclaration.js.map +1 -1
- package/dist/cli/plugins/icon/declaration/icon.d.ts +3 -5
- package/dist/cli/plugins/icon/icon-module.d.ts +2 -0
- package/dist/cli/plugins/icon/icon-module.js +11 -0
- package/dist/cli/plugins/icon/icon-module.js.map +1 -0
- package/dist/cli/plugins/icon/index.js +5 -3
- package/dist/cli/plugins/icon/index.js.map +1 -1
- package/dist/cli/plugins/index.d.ts +1 -1
- package/dist/cli/plugins/index.js +1 -1
- package/dist/cli/plugins/locale/Locale.d.ts +9 -2
- package/dist/cli/plugins/locale/Locale.js +37 -5
- package/dist/cli/plugins/locale/Locale.js.map +1 -1
- package/dist/cli/plugins/locale/declaration/locale.d.ts +1 -1
- package/dist/cli/plugins/locale/index.js +57 -22
- package/dist/cli/plugins/locale/index.js.map +1 -1
- package/dist/cli/plugins/locale/locale-module.d.ts +4 -0
- package/dist/cli/plugins/locale/locale-module.js +16 -0
- package/dist/cli/plugins/locale/locale-module.js.map +1 -0
- package/dist/cli/plugins/offscreen/Offscreen.d.ts +2 -3
- package/dist/cli/plugins/offscreen/Offscreen.js.map +1 -1
- package/dist/cli/plugins/offscreen/index.js +5 -4
- package/dist/cli/plugins/offscreen/index.js.map +1 -1
- package/dist/cli/plugins/offscreen/offscreen-module.d.ts +3 -0
- package/dist/cli/plugins/offscreen/offscreen-module.js +11 -0
- package/dist/cli/plugins/offscreen/offscreen-module.js.map +1 -0
- package/dist/cli/plugins/output/index.d.ts +2 -0
- package/dist/cli/plugins/output/index.js +60 -0
- package/dist/cli/plugins/output/index.js.map +1 -0
- package/dist/cli/plugins/output/runtime.d.ts +26 -0
- package/dist/cli/plugins/output/runtime.js +19 -0
- package/dist/cli/plugins/output/runtime.js.map +1 -0
- package/dist/cli/plugins/page/declaration/PageDeclaration.js +4 -4
- package/dist/cli/plugins/page/declaration/PageDeclaration.js.map +1 -1
- package/dist/cli/plugins/page/declaration/page.d.ts +3 -3
- package/dist/cli/plugins/page/index.js +14 -10
- package/dist/cli/plugins/page/index.js.map +1 -1
- package/dist/cli/plugins/page/page-module.d.ts +2 -0
- package/dist/cli/plugins/page/page-module.js +11 -0
- package/dist/cli/plugins/page/page-module.js.map +1 -0
- package/dist/cli/plugins/popup/Popup.d.ts +1 -1
- package/dist/cli/plugins/popup/Popup.js +2 -2
- package/dist/cli/plugins/popup/Popup.js.map +1 -1
- package/dist/cli/plugins/popup/declaration/PopupDeclaration.d.ts +1 -1
- package/dist/cli/plugins/popup/declaration/PopupDeclaration.js +6 -6
- package/dist/cli/plugins/popup/declaration/PopupDeclaration.js.map +1 -1
- package/dist/cli/plugins/popup/declaration/popup.d.ts +3 -3
- package/dist/cli/plugins/popup/index.js +6 -5
- package/dist/cli/plugins/popup/index.js.map +1 -1
- package/dist/cli/plugins/popup/popup-module.d.ts +3 -0
- package/dist/cli/plugins/popup/popup-module.js +11 -0
- package/dist/cli/plugins/popup/popup-module.js.map +1 -0
- package/dist/cli/plugins/sandbox/Sandbox.d.ts +1 -2
- package/dist/cli/plugins/sandbox/Sandbox.js.map +1 -1
- package/dist/cli/plugins/sandbox/index.js +5 -4
- package/dist/cli/plugins/sandbox/index.js.map +1 -1
- package/dist/cli/plugins/sandbox/sandbox-module.d.ts +3 -0
- package/dist/cli/plugins/sandbox/sandbox-module.js +11 -0
- package/dist/cli/plugins/sandbox/sandbox-module.js.map +1 -0
- package/dist/cli/plugins/sidebar/Sidebar.d.ts +1 -1
- package/dist/cli/plugins/sidebar/Sidebar.js +2 -2
- package/dist/cli/plugins/sidebar/Sidebar.js.map +1 -1
- package/dist/cli/plugins/sidebar/declaration/SidebarDeclaration.d.ts +1 -1
- package/dist/cli/plugins/sidebar/declaration/SidebarDeclaration.js +6 -6
- package/dist/cli/plugins/sidebar/declaration/SidebarDeclaration.js.map +1 -1
- package/dist/cli/plugins/sidebar/declaration/sidebar.d.ts +3 -3
- package/dist/cli/plugins/sidebar/index.js +6 -5
- package/dist/cli/plugins/sidebar/index.js.map +1 -1
- package/dist/cli/plugins/sidebar/sidebar-module.d.ts +3 -0
- package/dist/cli/plugins/sidebar/sidebar-module.js +11 -0
- package/dist/cli/plugins/sidebar/sidebar-module.js.map +1 -0
- package/dist/cli/plugins/style/index.d.ts +2 -1
- package/dist/cli/plugins/style/index.js +52 -25
- package/dist/cli/plugins/style/index.js.map +1 -1
- package/dist/cli/plugins/style/types.d.ts +5 -0
- package/dist/cli/plugins/style/types.js +1 -0
- package/dist/cli/plugins/style/types.js.map +1 -0
- package/dist/cli/raw.d.ts +4 -0
- package/dist/cli/resolvers/bundler.js +9 -7
- package/dist/cli/resolvers/bundler.js.map +1 -1
- package/dist/cli/resolvers/config.js +2 -1
- package/dist/cli/resolvers/config.js.map +1 -1
- package/dist/cli/virtual/index.d.ts +2 -2
- package/dist/cli/virtual/index.js +11 -8
- package/dist/cli/virtual/virtual.d.ts +14 -11
- package/dist/content/index.d.ts +3 -0
- package/dist/content/index.js +8 -0
- package/dist/content/index.js.map +1 -0
- package/dist/entry/content/adapters/react/Builder.d.ts +5 -6
- package/dist/entry/content/adapters/react/Builder.js +8 -21
- package/dist/entry/content/adapters/react/Builder.js.map +1 -1
- package/dist/entry/content/adapters/react/Node.d.ts +6 -12
- package/dist/entry/content/adapters/react/Node.js +9 -25
- package/dist/entry/content/adapters/react/Node.js.map +1 -1
- package/dist/entry/content/adapters/react/index.d.ts +2 -1
- package/dist/entry/content/adapters/react/index.js +3 -1
- package/dist/entry/content/adapters/react/index.js.map +1 -1
- package/dist/entry/content/adapters/react/resolvers/definition.d.ts +2 -0
- package/dist/entry/content/adapters/react/resolvers/definition.js +12 -0
- package/dist/entry/content/adapters/react/resolvers/definition.js.map +1 -0
- package/dist/entry/content/adapters/react/resolvers/render.d.ts +2 -2
- package/dist/entry/content/adapters/react/resolvers/render.js +4 -6
- package/dist/entry/content/adapters/react/resolvers/render.js.map +1 -1
- package/dist/entry/content/adapters/vanilla/Builder.d.ts +5 -5
- package/dist/entry/content/adapters/vanilla/Builder.js +9 -15
- package/dist/entry/content/adapters/vanilla/Builder.js.map +1 -1
- package/dist/entry/content/adapters/vanilla/Node.d.ts +5 -10
- package/dist/entry/content/adapters/vanilla/Node.js +11 -34
- package/dist/entry/content/adapters/vanilla/Node.js.map +1 -1
- package/dist/entry/content/adapters/vanilla/index.d.ts +2 -1
- package/dist/entry/content/adapters/vanilla/index.js +3 -1
- package/dist/entry/content/adapters/vanilla/index.js.map +1 -1
- package/dist/entry/content/adapters/vanilla/resolvers/definition.d.ts +2 -0
- package/dist/entry/content/adapters/vanilla/resolvers/definition.js +9 -0
- package/dist/entry/content/adapters/vanilla/resolvers/definition.js.map +1 -0
- package/dist/entry/content/adapters/vanilla/resolvers/render.d.ts +3 -0
- package/dist/entry/content/adapters/vanilla/resolvers/render.js +15 -0
- package/dist/entry/content/adapters/vanilla/resolvers/render.js.map +1 -0
- package/dist/entry/content/index.d.ts +5 -1
- package/dist/entry/content/index.js +8 -1
- package/dist/entry/content/index.js.map +1 -1
- package/dist/entry/content/lifecycle/Builder.d.ts +26 -0
- package/dist/entry/content/lifecycle/Builder.js +212 -0
- package/dist/entry/content/lifecycle/Builder.js.map +1 -0
- package/dist/entry/content/lifecycle/IsolationSetup.d.ts +16 -0
- package/dist/entry/content/lifecycle/IsolationSetup.js +37 -0
- package/dist/entry/content/lifecycle/IsolationSetup.js.map +1 -0
- package/dist/entry/content/lifecycle/MountBuilder.d.ts +8 -0
- package/dist/entry/content/lifecycle/MountBuilder.js +57 -0
- package/dist/entry/content/lifecycle/MountBuilder.js.map +1 -0
- package/dist/entry/content/{core → lifecycle/context}/Context.d.ts +5 -2
- package/dist/entry/content/lifecycle/context/Context.js +73 -0
- package/dist/entry/content/lifecycle/context/Context.js.map +1 -0
- package/dist/entry/content/{core → lifecycle/context}/EventEmitter.d.ts +2 -2
- package/dist/entry/content/{core → lifecycle/context}/EventEmitter.js +3 -3
- package/dist/entry/content/lifecycle/context/EventEmitter.js.map +1 -0
- package/dist/entry/content/lifecycle/context/ManagedContext.d.ts +5 -0
- package/dist/entry/content/{core → lifecycle/context}/ManagedContext.js +2 -2
- package/dist/entry/content/lifecycle/context/ManagedContext.js.map +1 -0
- package/dist/entry/content/lifecycle/context/index.d.ts +3 -0
- package/dist/entry/content/lifecycle/context/index.js +9 -0
- package/dist/entry/content/lifecycle/context/index.js.map +1 -0
- package/dist/entry/content/{core → lifecycle/markers}/AbstractMarker.d.ts +2 -2
- package/dist/entry/content/{core → lifecycle/markers}/AbstractMarker.js +3 -3
- package/dist/entry/content/lifecycle/markers/AbstractMarker.js.map +1 -0
- package/dist/entry/content/{core → lifecycle/markers}/AttributeMarker.d.ts +2 -2
- package/dist/entry/content/{core → lifecycle/markers}/AttributeMarker.js +2 -2
- package/dist/entry/content/lifecycle/markers/AttributeMarker.js.map +1 -0
- package/dist/entry/content/{core → lifecycle/markers}/WeakMarker.d.ts +2 -2
- package/dist/entry/content/{core → lifecycle/markers}/WeakMarker.js +2 -2
- package/dist/entry/content/lifecycle/markers/WeakMarker.js.map +1 -0
- package/dist/entry/content/lifecycle/markers/index.d.ts +3 -0
- package/dist/entry/content/lifecycle/markers/index.js +9 -0
- package/dist/entry/content/lifecycle/markers/index.js.map +1 -0
- package/dist/entry/content/{core → lifecycle/nodes}/EventNode.d.ts +5 -2
- package/dist/entry/content/{core → lifecycle/nodes}/EventNode.js +14 -2
- package/dist/entry/content/lifecycle/nodes/EventNode.js.map +1 -0
- package/dist/entry/content/lifecycle/nodes/FrameNode.d.ts +29 -0
- package/dist/entry/content/lifecycle/nodes/FrameNode.js +187 -0
- package/dist/entry/content/lifecycle/nodes/FrameNode.js.map +1 -0
- package/dist/entry/content/{core → lifecycle/nodes}/MarkerNode.d.ts +4 -2
- package/dist/entry/content/{core → lifecycle/nodes}/MarkerNode.js +8 -2
- package/dist/entry/content/lifecycle/nodes/MarkerNode.js.map +1 -0
- package/dist/entry/content/{core → lifecycle/nodes}/MountNode.d.ts +4 -2
- package/dist/entry/content/{core → lifecycle/nodes}/MountNode.js +8 -2
- package/dist/entry/content/lifecycle/nodes/MountNode.js.map +1 -0
- package/dist/entry/content/{core → lifecycle/nodes}/Node.d.ts +3 -2
- package/dist/entry/content/{core → lifecycle/nodes}/Node.js +5 -2
- package/dist/entry/content/lifecycle/nodes/Node.js.map +1 -0
- package/dist/entry/content/lifecycle/nodes/RenderNode.d.ts +19 -0
- package/dist/entry/content/lifecycle/nodes/RenderNode.js +75 -0
- package/dist/entry/content/lifecycle/nodes/RenderNode.js.map +1 -0
- package/dist/entry/content/lifecycle/nodes/ShadowNode.d.ts +21 -0
- package/dist/entry/content/lifecycle/nodes/ShadowNode.js +121 -0
- package/dist/entry/content/lifecycle/nodes/ShadowNode.js.map +1 -0
- package/dist/entry/content/lifecycle/nodes/index.d.ts +7 -0
- package/dist/entry/content/lifecycle/nodes/index.js +17 -0
- package/dist/entry/content/lifecycle/nodes/index.js.map +1 -0
- package/dist/entry/content/lifecycle/nodes/isolated-styles.d.ts +2 -0
- package/dist/entry/content/lifecycle/nodes/isolated-styles.js +14 -0
- package/dist/entry/content/lifecycle/nodes/isolated-styles.js.map +1 -0
- package/dist/entry/content/resolvers/anchor.d.ts +2 -0
- package/dist/entry/content/{core/resolvers → resolvers}/anchor.js +2 -2
- package/dist/entry/content/resolvers/anchor.js.map +1 -0
- package/dist/entry/content/resolvers/container.d.ts +2 -0
- package/dist/entry/content/{core/resolvers → resolvers}/container.js +2 -2
- package/dist/entry/content/resolvers/container.js.map +1 -0
- package/dist/entry/content/resolvers/definition.d.ts +5 -0
- package/dist/entry/content/resolvers/definition.js +24 -0
- package/dist/entry/content/resolvers/definition.js.map +1 -0
- package/dist/entry/content/{core/resolvers → resolvers}/index.d.ts +1 -1
- package/dist/entry/content/{core/resolvers → resolvers}/index.js +1 -1
- package/dist/entry/content/resolvers/index.js.map +1 -0
- package/dist/entry/content/resolvers/mount.d.ts +2 -0
- package/dist/entry/content/{core/resolvers → resolvers}/mount.js +3 -3
- package/dist/entry/content/resolvers/mount.js.map +1 -0
- package/dist/entry/content/resolvers/target.d.ts +3 -0
- package/dist/entry/content/resolvers/target.js +34 -0
- package/dist/entry/content/resolvers/target.js.map +1 -0
- package/dist/entry/content/resolvers/watch.d.ts +6 -0
- package/dist/entry/content/{core/resolvers → resolvers}/watch.js +15 -11
- package/dist/entry/content/resolvers/watch.js.map +1 -0
- package/dist/entry/relay/Builder.d.ts +8 -8
- package/dist/entry/relay/Builder.js +32 -19
- package/dist/entry/relay/Builder.js.map +1 -1
- package/dist/entry/relay/TransportBuilder.d.ts +3 -2
- package/dist/entry/relay/TransportBuilder.js +3 -3
- package/dist/entry/relay/TransportBuilder.js.map +1 -1
- package/dist/entry/relay/index.d.ts +5 -2
- package/dist/entry/relay/index.js +8 -2
- package/dist/entry/relay/index.js.map +1 -1
- package/dist/entry/relay/resolvers/definition.d.ts +4 -0
- package/dist/entry/relay/resolvers/definition.js +16 -0
- package/dist/entry/relay/resolvers/definition.js.map +1 -0
- package/dist/locale/adapters/react/ReactLocale.d.ts +18 -0
- package/dist/locale/adapters/react/ReactLocale.js +41 -0
- package/dist/locale/adapters/react/ReactLocale.js.map +1 -0
- package/dist/locale/adapters/react/hooks/use-locale-attributes.d.ts +7 -0
- package/dist/locale/adapters/react/hooks/use-locale-attributes.js +30 -0
- package/dist/locale/adapters/react/hooks/use-locale-attributes.js.map +1 -0
- package/dist/locale/adapters/react/hooks/use-locale.d.ts +3 -0
- package/dist/locale/adapters/react/hooks/use-locale.js +17 -0
- package/dist/locale/adapters/react/hooks/use-locale.js.map +1 -0
- package/dist/locale/adapters/react/hooks/use-native-locale.d.ts +3 -0
- package/dist/locale/adapters/react/hooks/use-native-locale.js +10 -0
- package/dist/locale/adapters/react/hooks/use-native-locale.js.map +1 -0
- package/dist/locale/adapters/react/index.d.ts +4 -2
- package/dist/locale/adapters/react/index.js +6 -4
- package/dist/locale/adapters/react/index.js.map +1 -1
- package/dist/locale/adapters/react/types.d.ts +22 -0
- package/dist/locale/adapters/react/types.js +1 -0
- package/dist/locale/adapters/react/types.js.map +1 -0
- package/dist/locale/helpers.d.ts +4 -5
- package/dist/locale/helpers.js +1 -1
- package/dist/locale/helpers.js.map +1 -1
- package/dist/locale/index.d.ts +2 -1
- package/dist/locale/index.js +1 -0
- package/dist/locale/index.js.map +1 -1
- package/dist/locale/providers/AbstractLocale.d.ts +4 -4
- package/dist/locale/providers/AbstractLocale.js +13 -94
- package/dist/locale/providers/AbstractLocale.js.map +1 -1
- package/dist/locale/providers/CustomLocale.d.ts +3 -3
- package/dist/locale/providers/CustomLocale.js +6 -5
- package/dist/locale/providers/CustomLocale.js.map +1 -1
- package/dist/locale/providers/DynamicLocale.d.ts +18 -11
- package/dist/locale/providers/DynamicLocale.js +60 -47
- package/dist/locale/providers/DynamicLocale.js.map +1 -1
- package/dist/locale/providers/NativeLocale.d.ts +4 -7
- package/dist/locale/providers/NativeLocale.js +5 -14
- package/dist/locale/providers/NativeLocale.js.map +1 -1
- package/dist/locale/providers/ObservableLocale.d.ts +35 -0
- package/dist/locale/providers/ObservableLocale.js +179 -0
- package/dist/locale/providers/ObservableLocale.js.map +1 -0
- package/dist/locale/providers/index.d.ts +2 -1
- package/dist/locale/providers/index.js +3 -1
- package/dist/locale/providers/index.js.map +1 -1
- package/dist/locale/storage/LocaleStorage.d.ts +11 -0
- package/dist/locale/storage/LocaleStorage.js +40 -0
- package/dist/locale/storage/LocaleStorage.js.map +1 -0
- package/dist/locale/storage/index.d.ts +1 -0
- package/dist/locale/storage/index.js +5 -0
- package/dist/locale/storage/index.js.map +1 -0
- package/dist/main/content.d.ts +4 -6
- package/dist/main/content.js +3 -16
- package/dist/main/content.js.map +1 -1
- package/dist/main/entrypoint.d.ts +4 -0
- package/dist/main/entrypoint.js +20 -0
- package/dist/main/entrypoint.js.map +1 -0
- package/dist/main/icon.d.ts +2 -3
- package/dist/main/icon.js +2 -1
- package/dist/main/icon.js.map +1 -1
- package/dist/main/index.d.ts +1 -0
- package/dist/main/index.js +1 -0
- package/dist/main/index.js.map +1 -1
- package/dist/main/offscreen.d.ts +2 -5
- package/dist/main/offscreen.js +5 -2
- package/dist/main/offscreen.js.map +1 -1
- package/dist/main/page.d.ts +2 -4
- package/dist/main/page.js +2 -1
- package/dist/main/page.js.map +1 -1
- package/dist/main/popup.d.ts +2 -5
- package/dist/main/popup.js +3 -3
- package/dist/main/popup.js.map +1 -1
- package/dist/main/relay.d.ts +3 -3
- package/dist/main/relay.js +2 -1
- package/dist/main/relay.js.map +1 -1
- package/dist/main/sandbox.d.ts +1 -4
- package/dist/main/sandbox.js +2 -1
- package/dist/main/sandbox.js.map +1 -1
- package/dist/main/service.d.ts +1 -2
- package/dist/main/service.js.map +1 -1
- package/dist/main/sidebar.d.ts +2 -5
- package/dist/main/sidebar.js +3 -3
- package/dist/main/sidebar.js.map +1 -1
- package/dist/message/index.d.ts +2 -4
- package/dist/message/index.js.map +1 -1
- package/dist/offscreen/index.d.ts +2 -6
- package/dist/offscreen/index.js.map +1 -1
- package/dist/relay/RelayPermission.js +1 -1
- package/dist/relay/index.d.ts +2 -5
- package/dist/relay/index.js.map +1 -1
- package/dist/sandbox/index.d.ts +1 -5
- package/dist/sandbox/index.js.map +1 -1
- package/dist/service/index.d.ts +2 -6
- package/dist/service/index.js.map +1 -1
- package/dist/shared/content/index.d.ts +1 -0
- package/dist/shared/content/index.js +6 -0
- package/dist/shared/content/index.js.map +1 -0
- package/dist/shared/content/isolation.d.ts +4 -0
- package/dist/shared/content/isolation.js +63 -0
- package/dist/shared/content/isolation.js.map +1 -0
- package/dist/shared/locale/index.d.ts +5 -0
- package/dist/shared/locale/index.js +21 -0
- package/dist/shared/locale/index.js.map +1 -0
- package/dist/shared/locale/keys.d.ts +5 -0
- package/dist/shared/locale/keys.js +33 -0
- package/dist/shared/locale/keys.js.map +1 -0
- package/dist/shared/locale/language.d.ts +4 -0
- package/dist/shared/locale/language.js +23 -0
- package/dist/shared/locale/language.js.map +1 -0
- package/dist/shared/locale/messages.d.ts +3 -0
- package/dist/shared/locale/messages.js +9 -0
- package/dist/shared/locale/messages.js.map +1 -0
- package/dist/shared/locale/plural.d.ts +2 -0
- package/dist/shared/locale/plural.js +81 -0
- package/dist/shared/locale/plural.js.map +1 -0
- package/dist/shared/locale/substitutions.d.ts +10 -0
- package/dist/shared/locale/substitutions.js +32 -0
- package/dist/shared/locale/substitutions.js.map +1 -0
- package/dist/types/background.d.ts +1 -1
- package/dist/types/background.js.map +1 -1
- package/dist/types/command.d.ts +1 -1
- package/dist/types/command.js.map +1 -1
- package/dist/types/content/adapters/index.d.ts +2 -0
- package/dist/types/content/adapters/index.js +1 -0
- package/dist/types/content/adapters/index.js.map +1 -0
- package/dist/types/content/adapters/react.d.ts +4 -0
- package/dist/types/content/adapters/react.js +1 -0
- package/dist/types/content/adapters/react.js.map +1 -0
- package/dist/types/content/adapters/vanilla.d.ts +1 -0
- package/dist/types/content/adapters/vanilla.js +1 -0
- package/dist/types/content/adapters/vanilla.js.map +1 -0
- package/dist/types/content/boundary.d.ts +17 -0
- package/dist/types/content/boundary.js +1 -0
- package/dist/types/content/boundary.js.map +1 -0
- package/dist/types/{content.d.ts → content/common.d.ts} +119 -59
- package/dist/types/{content.js → content/common.js} +23 -2
- package/dist/types/content/common.js.map +1 -0
- package/dist/types/content/definition.d.ts +61 -0
- package/dist/types/content/definition.js +1 -0
- package/dist/types/content/definition.js.map +1 -0
- package/dist/types/content/index.d.ts +7 -0
- package/dist/types/content/index.js +2 -0
- package/dist/types/content/index.js.map +1 -0
- package/dist/types/content/prepare.d.ts +9 -0
- package/dist/types/content/prepare.js +1 -0
- package/dist/types/content/prepare.js.map +1 -0
- package/dist/types/content/render.d.ts +6 -0
- package/dist/types/content/render.js +1 -0
- package/dist/types/content/render.js.map +1 -0
- package/dist/types/content/target.d.ts +13 -0
- package/dist/types/content/target.js +1 -0
- package/dist/types/content/target.js.map +1 -0
- package/dist/types/entrypoint.d.ts +20 -0
- package/dist/types/entrypoint.js +4 -0
- package/dist/types/entrypoint.js.map +1 -1
- package/dist/types/icon.d.ts +8 -0
- package/dist/types/icon.js.map +1 -1
- package/dist/types/language.d.ts +57 -0
- package/dist/types/language.js +62 -0
- package/dist/types/language.js.map +1 -0
- package/dist/types/locale.d.ts +34 -63
- package/dist/types/locale.js +62 -119
- package/dist/types/locale.js.map +1 -1
- package/dist/types/manifest.d.ts +11 -8
- package/dist/types/manifest.js.map +1 -1
- package/dist/types/message.d.ts +7 -0
- package/dist/types/message.js.map +1 -1
- package/dist/types/offscreen.d.ts +14 -1
- package/dist/types/offscreen.js.map +1 -1
- package/dist/types/page.d.ts +8 -0
- package/dist/types/popup.d.ts +9 -0
- package/dist/types/relay.d.ts +15 -7
- package/dist/types/relay.js.map +1 -1
- package/dist/types/sandbox.d.ts +12 -0
- package/dist/types/sandbox.js.map +1 -1
- package/dist/types/service.d.ts +10 -1
- package/dist/types/service.js.map +1 -1
- package/dist/types/sidebar.d.ts +9 -0
- package/dist/types/sidebar.js.map +1 -1
- package/dist/types/transport.d.ts +4 -0
- package/dist/virtual/icon.d.ts +2 -0
- package/dist/virtual/icon.js +5 -0
- package/dist/virtual/icon.js.map +1 -0
- package/dist/virtual/locale.d.ts +7 -0
- package/dist/virtual/locale.js +13 -0
- package/dist/virtual/locale.js.map +1 -0
- package/dist/virtual/modules.d.ts +41 -0
- package/dist/virtual/offscreen.d.ts +3 -0
- package/dist/virtual/offscreen.js +5 -0
- package/dist/virtual/offscreen.js.map +1 -0
- package/dist/virtual/page.d.ts +2 -0
- package/dist/virtual/page.js +5 -0
- package/dist/virtual/page.js.map +1 -0
- package/dist/virtual/popup.d.ts +3 -0
- package/dist/virtual/popup.js +5 -0
- package/dist/virtual/popup.js.map +1 -0
- package/dist/virtual/relay.d.ts +3 -0
- package/dist/virtual/relay.js +5 -0
- package/dist/virtual/relay.js.map +1 -0
- package/dist/virtual/runtime.d.ts +8 -0
- package/dist/virtual/runtime.js +9 -0
- package/dist/virtual/runtime.js.map +1 -0
- package/dist/virtual/sandbox.d.ts +3 -0
- package/dist/virtual/sandbox.js +5 -0
- package/dist/virtual/sandbox.js.map +1 -0
- package/dist/virtual/sidebar.d.ts +3 -0
- package/dist/virtual/sidebar.js +5 -0
- package/dist/virtual/sidebar.js.map +1 -0
- package/package.json +53 -23
- package/scripts/clean-dist.js +7 -0
- package/scripts/copy-dts.js +11 -1
- package/scripts/merge-coverage.mjs +12 -0
- package/scripts/pre-commit.mjs +22 -0
- package/scripts/test-inventory.mjs +38 -0
- package/scripts/test-run.mjs +25 -0
- package/types/client.d.ts +15 -0
- package/dist/cli/builders/manifest/utils.d.ts +0 -32
- package/dist/cli/builders/manifest/utils.js +0 -209
- package/dist/cli/builders/manifest/utils.js.map +0 -1
- package/dist/cli/bundler/plugins/EntrypointPlugin.js.map +0 -1
- package/dist/cli/bundler/plugins/GenerateJsonPlugin.js +0 -40
- package/dist/cli/bundler/plugins/GenerateJsonPlugin.js.map +0 -1
- package/dist/cli/bundler/plugins/ManifestPlugin.d.ts +0 -10
- package/dist/cli/bundler/plugins/ManifestPlugin.js +0 -78
- package/dist/cli/bundler/plugins/ManifestPlugin.js.map +0 -1
- package/dist/cli/bundler/plugins/ReplacePlugin.js.map +0 -1
- package/dist/cli/bundler/plugins/WatchPlugin.js +0 -21
- package/dist/cli/bundler/plugins/WatchPlugin.js.map +0 -1
- package/dist/cli/bundler/utils/output.d.ts +0 -2
- package/dist/cli/bundler/utils/output.js +0 -15
- package/dist/cli/bundler/utils/output.js.map +0 -1
- package/dist/cli/entrypoint/finder/tests/fixtures/options/discovery/account.options.d.ts +0 -1
- package/dist/cli/entrypoint/finder/tests/fixtures/options/discovery/advanced.options/index.d.ts +0 -1
- package/dist/cli/plugins/output.d.ts +0 -2
- package/dist/cli/plugins/output.js +0 -32
- package/dist/cli/plugins/output.js.map +0 -1
- package/dist/entry/content/adapters/react/resolvers/index.d.ts +0 -1
- package/dist/entry/content/adapters/react/resolvers/index.js +0 -2
- package/dist/entry/content/adapters/react/resolvers/index.js.map +0 -1
- package/dist/entry/content/core/AbstractMarker.js.map +0 -1
- package/dist/entry/content/core/AttributeMarker.js.map +0 -1
- package/dist/entry/content/core/Builder.d.ts +0 -27
- package/dist/entry/content/core/Builder.js +0 -124
- package/dist/entry/content/core/Builder.js.map +0 -1
- package/dist/entry/content/core/Context.js +0 -43
- package/dist/entry/content/core/Context.js.map +0 -1
- package/dist/entry/content/core/EventEmitter.js.map +0 -1
- package/dist/entry/content/core/EventNode.js.map +0 -1
- package/dist/entry/content/core/ManagedContext.d.ts +0 -5
- package/dist/entry/content/core/ManagedContext.js.map +0 -1
- package/dist/entry/content/core/MarkerNode.js.map +0 -1
- package/dist/entry/content/core/MountBuilder.d.ts +0 -10
- package/dist/entry/content/core/MountBuilder.js +0 -40
- package/dist/entry/content/core/MountBuilder.js.map +0 -1
- package/dist/entry/content/core/MountNode.js.map +0 -1
- package/dist/entry/content/core/Node.js.map +0 -1
- package/dist/entry/content/core/WeakMarker.js.map +0 -1
- package/dist/entry/content/core/resolvers/anchor.d.ts +0 -2
- package/dist/entry/content/core/resolvers/anchor.js.map +0 -1
- package/dist/entry/content/core/resolvers/container.d.ts +0 -2
- package/dist/entry/content/core/resolvers/container.js.map +0 -1
- package/dist/entry/content/core/resolvers/definition.d.ts +0 -3
- package/dist/entry/content/core/resolvers/definition.js +0 -12
- package/dist/entry/content/core/resolvers/definition.js.map +0 -1
- package/dist/entry/content/core/resolvers/index.js.map +0 -1
- package/dist/entry/content/core/resolvers/mount.d.ts +0 -2
- package/dist/entry/content/core/resolvers/mount.js.map +0 -1
- package/dist/entry/content/core/resolvers/render.d.ts +0 -3
- package/dist/entry/content/core/resolvers/render.js +0 -18
- package/dist/entry/content/core/resolvers/render.js.map +0 -1
- package/dist/entry/content/core/resolvers/watch.d.ts +0 -4
- package/dist/entry/content/core/resolvers/watch.js.map +0 -1
- package/dist/locale/adapters/react/LocaleProvider.d.ts +0 -7
- package/dist/locale/adapters/react/LocaleProvider.js +0 -58
- package/dist/locale/adapters/react/LocaleProvider.js.map +0 -1
- package/dist/locale/adapters/react/context.d.ts +0 -14
- package/dist/locale/adapters/react/context.js +0 -25
- package/dist/locale/adapters/react/context.js.map +0 -1
- package/dist/locale/utils.d.ts +0 -11
- package/dist/locale/utils.js +0 -67
- package/dist/locale/utils.js.map +0 -1
- package/dist/types/content.js.map +0 -1
- /package/dist/cli/bundler/plugins/{ReplacePlugin.d.ts → replace/ReplacePlugin.d.ts} +0 -0
- /package/dist/cli/bundler/plugins/{ReplacePlugin.js → replace/ReplacePlugin.js} +0 -0
- /package/dist/cli/bundler/plugins/{WatchPlugin.d.ts → watch/WatchPlugin.d.ts} +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Storage } from "@addon-core/storage";
|
|
2
|
+
import { PackageName } from "./../../types/app.js";
|
|
3
|
+
import { LanguageCodes } from "./../../types/locale.js";
|
|
4
|
+
class LocaleStorage {
|
|
5
|
+
constructor(key = "locale") {
|
|
6
|
+
this.key = key;
|
|
7
|
+
}
|
|
8
|
+
key;
|
|
9
|
+
storage = Storage.Local({ namespace: PackageName });
|
|
10
|
+
async get() {
|
|
11
|
+
return this.parse(await this.storage.get(this.key));
|
|
12
|
+
}
|
|
13
|
+
set(lang) {
|
|
14
|
+
return this.storage.set(this.key, lang);
|
|
15
|
+
}
|
|
16
|
+
watch(handler) {
|
|
17
|
+
return this.storage.watch({
|
|
18
|
+
[this.key]: (value) => {
|
|
19
|
+
const lang = this.parse(value);
|
|
20
|
+
if (lang !== void 0) {
|
|
21
|
+
handler(lang);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
parse(value) {
|
|
27
|
+
if (value === void 0) {
|
|
28
|
+
return void 0;
|
|
29
|
+
}
|
|
30
|
+
if (typeof value === "string" && LanguageCodes.has(value)) {
|
|
31
|
+
return value;
|
|
32
|
+
}
|
|
33
|
+
console.warn("[LocaleStorage] Invalid language code in storage:", value);
|
|
34
|
+
return void 0;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
LocaleStorage as default
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=LocaleStorage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/locale/storage/LocaleStorage.ts"],"sourcesContent":["import {Storage} from \"@addon-core/storage\";\n\nimport {PackageName} from \"@typing/app\";\nimport {Language, LanguageCodes, type LocaleStorageDriver} from \"@typing/locale\";\n\n/** Stores the selected language in extension local storage under the framework namespace. */\nexport default class LocaleStorage implements LocaleStorageDriver {\n private readonly storage = Storage.Local<Record<string, Language>>({namespace: PackageName});\n\n constructor(protected key: string = \"locale\") {}\n\n public async get(): Promise<Language | undefined> {\n return this.parse(await this.storage.get(this.key));\n }\n\n public set(lang: Language): Promise<void> {\n return this.storage.set(this.key, lang);\n }\n\n public watch(handler: (lang: Language) => void): () => void {\n return this.storage.watch({\n [this.key]: value => {\n const lang = this.parse(value);\n\n if (lang !== undefined) {\n handler(lang);\n }\n },\n });\n }\n\n private parse(value: unknown): Language | undefined {\n if (value === undefined) {\n return undefined;\n }\n\n if (typeof value === \"string\" && LanguageCodes.has(value)) {\n return value as Language;\n }\n\n console.warn(\"[LocaleStorage] Invalid language code in storage:\", value);\n\n return undefined;\n }\n}\n"],"mappings":"AAAA,SAAQ,eAAc;AAEtB,SAAQ,mBAAkB;AAC1B,SAAkB,qBAA8C;AAGhE,MAAO,cAA2D;AAAA,EAG9D,YAAsB,MAAc,UAAU;AAAxB;AAAA,EAAyB;AAAA,EAAzB;AAAA,EAFL,UAAU,QAAQ,MAAgC,EAAC,WAAW,YAAW,CAAC;AAAA,EAI3F,MAAa,MAAqC;AAC9C,WAAO,KAAK,MAAM,MAAM,KAAK,QAAQ,IAAI,KAAK,GAAG,CAAC;AAAA,EACtD;AAAA,EAEO,IAAI,MAA+B;AACtC,WAAO,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;AAAA,EAC1C;AAAA,EAEO,MAAM,SAA+C;AACxD,WAAO,KAAK,QAAQ,MAAM;AAAA,MACtB,CAAC,KAAK,GAAG,GAAG,WAAS;AACjB,cAAM,OAAO,KAAK,MAAM,KAAK;AAE7B,YAAI,SAAS,QAAW;AACpB,kBAAQ,IAAI;AAAA,QAChB;AAAA,MACJ;AAAA,IACJ,CAAC;AAAA,EACL;AAAA,EAEQ,MAAM,OAAsC;AAChD,QAAI,UAAU,QAAW;AACrB,aAAO;AAAA,IACX;AAEA,QAAI,OAAO,UAAU,YAAY,cAAc,IAAI,KAAK,GAAG;AACvD,aAAO;AAAA,IACX;AAEA,YAAQ,KAAK,qDAAqD,KAAK;AAEvE,WAAO;AAAA,EACX;AACJ;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as LocaleStorage } from "./LocaleStorage.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/locale/storage/index.ts"],"sourcesContent":["export {default as LocaleStorage} from \"./LocaleStorage\";\n"],"mappings":"AAAA,SAAmB,WAAXA,gBAA+B;","names":["default"]}
|
package/dist/main/content.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export declare const defineContentScript: (options: ContentScriptDefinition) => ContentScriptDefinition;
|
|
6
|
-
export declare const defineContentScriptAppend: (options: ContentScriptAppendDefinition) => ContentScriptDefinition;
|
|
1
|
+
import { ContentScriptAppendDefinition, ContentScriptDefinition, ContentScriptIsolation } from "../types/content/index.js";
|
|
2
|
+
export * from "../types/content/index.js";
|
|
3
|
+
export declare const defineContentScript: <Data = undefined, const Isolation extends `${ContentScriptIsolation}` = "none">(options: ContentScriptDefinition<Data, Isolation>) => ContentScriptDefinition<Data, Isolation>;
|
|
4
|
+
export declare const defineContentScriptAppend: <Data = undefined, const Isolation extends `${ContentScriptIsolation}` = "none">(options: ContentScriptAppendDefinition<Data, Isolation>) => ContentScriptDefinition<Data, Isolation>;
|
package/dist/main/content.js
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
contentScriptAnchorResolver,
|
|
4
|
-
contentScriptAwaitFirstResolver,
|
|
5
|
-
contentScriptMutationObserverResolver,
|
|
6
|
-
contentScriptRenderResolver,
|
|
7
|
-
contentScriptContainerResolver
|
|
8
|
-
} from "./../entry/content/core/resolvers/index.js";
|
|
9
|
-
export * from "./../types/content.js";
|
|
1
|
+
import { createAppendMountHandler } from "./../entry/content/resolvers/mount.js";
|
|
2
|
+
export * from "./../types/content/index.js";
|
|
10
3
|
const defineContentScript = (options) => {
|
|
11
4
|
return options;
|
|
12
5
|
};
|
|
@@ -14,16 +7,10 @@ const defineContentScriptAppend = (options) => {
|
|
|
14
7
|
const { append, ...definition } = options;
|
|
15
8
|
return {
|
|
16
9
|
...definition,
|
|
17
|
-
mount:
|
|
10
|
+
mount: createAppendMountHandler(append)
|
|
18
11
|
};
|
|
19
12
|
};
|
|
20
13
|
export {
|
|
21
|
-
contentScriptAnchorResolver,
|
|
22
|
-
contentScriptAwaitFirstResolver,
|
|
23
|
-
contentScriptContainerResolver,
|
|
24
|
-
contentScriptMountAppendResolver,
|
|
25
|
-
contentScriptMutationObserverResolver,
|
|
26
|
-
contentScriptRenderResolver,
|
|
27
14
|
defineContentScript,
|
|
28
15
|
defineContentScriptAppend
|
|
29
16
|
};
|
package/dist/main/content.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/main/content.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/main/content.ts"],"sourcesContent":["import {createAppendMountHandler} from \"@entry/content/resolvers/mount\";\n\nimport {ContentScriptAppendDefinition, ContentScriptDefinition, ContentScriptIsolation} from \"@typing/content\";\n\nexport * from \"@typing/content\";\n\nexport const defineContentScript = <Data = undefined, const Isolation extends `${ContentScriptIsolation}` = \"none\">(\n options: ContentScriptDefinition<Data, Isolation>\n): ContentScriptDefinition<Data, Isolation> => {\n return options;\n};\n\nexport const defineContentScriptAppend = <\n Data = undefined,\n const Isolation extends `${ContentScriptIsolation}` = \"none\",\n>(\n options: ContentScriptAppendDefinition<Data, Isolation>\n): ContentScriptDefinition<Data, Isolation> => {\n const {append, ...definition} = options;\n\n return {\n ...definition,\n mount: createAppendMountHandler(append),\n } as ContentScriptDefinition<Data, Isolation>;\n};\n"],"mappings":"AAAA,SAAQ,gCAA+B;AAIvC,cAAc;AAEP,MAAM,sBAAsB,CAC/B,YAC2C;AAC3C,SAAO;AACX;AAEO,MAAM,4BAA4B,CAIrC,YAC2C;AAC3C,QAAM,EAAC,QAAQ,GAAG,WAAU,IAAI;AAEhC,SAAO;AAAA,IACH,GAAG;AAAA,IACH,OAAO,yBAAyB,MAAM;AAAA,EAC1C;AACJ;","names":[]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EntrypointAssets, EntrypointAssetsMap } from "../types/entrypoint.js";
|
|
2
|
+
export type { EntrypointAssets, EntrypointAssetsFiles, EntrypointAssetsMap, EntrypointAssetsMapEntry, } from "../types/entrypoint.js";
|
|
3
|
+
export declare const getEntrypointAssetsMap: () => EntrypointAssetsMap;
|
|
4
|
+
export declare const getEntrypointAssets: () => EntrypointAssets;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { readAssets, readAssetsMap } from "#adnbn/runtime";
|
|
2
|
+
const getEntrypointAssetsMap = () => {
|
|
3
|
+
const assets = readAssetsMap();
|
|
4
|
+
if (!assets) {
|
|
5
|
+
throw new Error("getEntrypointAssetsMap() is available only in the background entrypoint");
|
|
6
|
+
}
|
|
7
|
+
return assets;
|
|
8
|
+
};
|
|
9
|
+
const getEntrypointAssets = () => {
|
|
10
|
+
const assets = readAssets();
|
|
11
|
+
if (!assets) {
|
|
12
|
+
throw new Error("Current entrypoint assets are unavailable in this runtime");
|
|
13
|
+
}
|
|
14
|
+
return assets;
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
getEntrypointAssets,
|
|
18
|
+
getEntrypointAssetsMap
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=entrypoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/main/entrypoint.ts"],"sourcesContent":["import {readAssets, readAssetsMap} from \"#adnbn/runtime\";\n\nimport type {EntrypointAssets, EntrypointAssetsMap} from \"@typing/entrypoint\";\n\nexport type {\n EntrypointAssets,\n EntrypointAssetsFiles,\n EntrypointAssetsMap,\n EntrypointAssetsMapEntry,\n} from \"@typing/entrypoint\";\n\nexport const getEntrypointAssetsMap = (): EntrypointAssetsMap => {\n const assets = readAssetsMap();\n\n if (!assets) {\n throw new Error(\"getEntrypointAssetsMap() is available only in the background entrypoint\");\n }\n\n return assets;\n};\n\nexport const getEntrypointAssets = (): EntrypointAssets => {\n const assets = readAssets();\n\n if (!assets) {\n throw new Error(\"Current entrypoint assets are unavailable in this runtime\");\n }\n\n return assets;\n};\n"],"mappings":"AAAA,SAAQ,YAAY,qBAAoB;AAWjC,MAAM,yBAAyB,MAA2B;AAC7D,QAAM,SAAS,cAAc;AAE7B,MAAI,CAAC,QAAQ;AACT,UAAM,IAAI,MAAM,yEAAyE;AAAA,EAC7F;AAEA,SAAO;AACX;AAEO,MAAM,sBAAsB,MAAwB;AACvD,QAAM,SAAS,WAAW;AAE1B,MAAI,CAAC,QAAQ;AACT,UAAM,IAAI,MAAM,2DAA2D;AAAA,EAC/E;AAEA,SAAO;AACX;","names":[]}
|
package/dist/main/icon.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import { type IconName, type IconsMap } from "../types/icon.js";
|
|
1
2
|
type Tab = chrome.tabs.Tab;
|
|
2
|
-
export type IconName
|
|
3
|
-
export type IconsMap = Map<IconName, Record<number, string>>;
|
|
3
|
+
export type { IconNameRegistry, IconName, IconsMap } from "../types/icon.js";
|
|
4
4
|
export declare const getIcons: () => IconsMap;
|
|
5
5
|
export declare const changeActionIcon: (icon?: IconName, tab?: number | Tab) => Promise<void>;
|
|
6
6
|
export declare const changeSidebarIcon: (icon?: IconName, tab?: number | Tab) => Promise<void>;
|
|
7
|
-
export {};
|
package/dist/main/icon.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { setActionIcon, setSidebarIcon } from "@addon-core/browser";
|
|
2
|
+
import { groups } from "#adnbn/icon";
|
|
2
3
|
import { DefaultIconGroupName } from "./../types/icon.js";
|
|
3
4
|
const getIcons = () => {
|
|
4
5
|
const icons = /* @__PURE__ */ new Map();
|
|
5
6
|
try {
|
|
6
|
-
Object.entries(
|
|
7
|
+
Object.entries(groups).forEach(([key, value]) => {
|
|
7
8
|
icons.set(key, value);
|
|
8
9
|
});
|
|
9
10
|
} catch (e) {
|
package/dist/main/icon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/main/icon.ts"],"sourcesContent":["import {setActionIcon, setSidebarIcon} from \"@addon-core/browser\";\n\nimport {DefaultIconGroupName} from \"@typing/icon\";\n\ntype Tab = chrome.tabs.Tab;\n\nexport type IconName
|
|
1
|
+
{"version":3,"sources":["../../src/main/icon.ts"],"sourcesContent":["import {setActionIcon, setSidebarIcon} from \"@addon-core/browser\";\nimport {groups} from \"#adnbn/icon\";\n\nimport {DefaultIconGroupName, type IconName, type IconsMap} from \"@typing/icon\";\n\ntype Tab = chrome.tabs.Tab;\n\nexport type {IconNameRegistry, IconName, IconsMap} from \"@typing/icon\";\n\nexport const getIcons = (): IconsMap => {\n const icons: IconsMap = new Map();\n\n try {\n Object.entries(groups).forEach(([key, value]) => {\n icons.set(key as IconName, value);\n });\n } catch (e) {\n console.error(\"Failed getting icons: \", e);\n }\n\n return icons;\n};\n\nexport const changeActionIcon = async (icon?: IconName, tab?: number | Tab): Promise<void> => {\n if (!icon) {\n icon = DefaultIconGroupName as IconName;\n }\n\n const icons = getIcons().get(icon);\n\n if (!icons) {\n throw new Error(`Icon group name \"${icon}\" not found for action icon.`);\n }\n\n if (tab && typeof tab === \"object\") {\n tab = tab.id;\n }\n\n await setActionIcon({path: icons, tabId: tab});\n};\n\nexport const changeSidebarIcon = async (icon?: IconName, tab?: number | Tab): Promise<void> => {\n if (!icon) {\n icon = DefaultIconGroupName as IconName;\n }\n\n const icons = getIcons().get(icon);\n\n if (!icons) {\n throw new Error(`Icon group name \"${icon}\" not found for sidebar icon.`);\n }\n\n if (tab && typeof tab === \"object\") {\n tab = tab.id;\n }\n\n await setSidebarIcon({path: icons, tabId: tab});\n};\n"],"mappings":"AAAA,SAAQ,eAAe,sBAAqB;AAC5C,SAAQ,cAAa;AAErB,SAAQ,4BAAyD;AAM1D,MAAM,WAAW,MAAgB;AACpC,QAAM,QAAkB,oBAAI,IAAI;AAEhC,MAAI;AACA,WAAO,QAAQ,MAAM,EAAE,QAAQ,CAAC,CAAC,KAAK,KAAK,MAAM;AAC7C,YAAM,IAAI,KAAiB,KAAK;AAAA,IACpC,CAAC;AAAA,EACL,SAAS,GAAG;AACR,YAAQ,MAAM,0BAA0B,CAAC;AAAA,EAC7C;AAEA,SAAO;AACX;AAEO,MAAM,mBAAmB,OAAO,MAAiB,QAAsC;AAC1F,MAAI,CAAC,MAAM;AACP,WAAO;AAAA,EACX;AAEA,QAAM,QAAQ,SAAS,EAAE,IAAI,IAAI;AAEjC,MAAI,CAAC,OAAO;AACR,UAAM,IAAI,MAAM,oBAAoB,IAAI,8BAA8B;AAAA,EAC1E;AAEA,MAAI,OAAO,OAAO,QAAQ,UAAU;AAChC,UAAM,IAAI;AAAA,EACd;AAEA,QAAM,cAAc,EAAC,MAAM,OAAO,OAAO,IAAG,CAAC;AACjD;AAEO,MAAM,oBAAoB,OAAO,MAAiB,QAAsC;AAC3F,MAAI,CAAC,MAAM;AACP,WAAO;AAAA,EACX;AAEA,QAAM,QAAQ,SAAS,EAAE,IAAI,IAAI;AAEjC,MAAI,CAAC,OAAO;AACR,UAAM,IAAI,MAAM,oBAAoB,IAAI,+BAA+B;AAAA,EAC3E;AAEA,MAAI,OAAO,OAAO,QAAQ,UAAU;AAChC,UAAM,IAAI;AAAA,EACd;AAEA,QAAM,eAAe,EAAC,MAAM,OAAO,OAAO,IAAG,CAAC;AAClD;","names":[]}
|
package/dist/main/index.d.ts
CHANGED
package/dist/main/index.js
CHANGED
package/dist/main/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/main/index.ts"],"sourcesContent":["export * from \"./app\";\nexport * from \"./background\";\nexport * from \"./browser\";\nexport * from \"./command\";\nexport * from \"./config\";\nexport * from \"./content\";\nexport * from \"./csp\";\nexport * from \"./env\";\nexport * from \"./icon\";\nexport * from \"./manifest\";\nexport * from \"./offscreen\";\nexport * from \"./options\";\nexport * from \"./page\";\nexport * from \"./plugin\";\nexport * from \"./popup\";\nexport * from \"./relay\";\nexport * from \"./sandbox\";\nexport * from \"./service\";\nexport * from \"./sidebar\";\nexport * from \"./view\";\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/main/index.ts"],"sourcesContent":["export * from \"./app\";\nexport * from \"./background\";\nexport * from \"./browser\";\nexport * from \"./command\";\nexport * from \"./config\";\nexport * from \"./content\";\nexport * from \"./csp\";\nexport * from \"./entrypoint\";\nexport * from \"./env\";\nexport * from \"./icon\";\nexport * from \"./manifest\";\nexport * from \"./offscreen\";\nexport * from \"./options\";\nexport * from \"./page\";\nexport * from \"./plugin\";\nexport * from \"./popup\";\nexport * from \"./relay\";\nexport * from \"./sandbox\";\nexport * from \"./service\";\nexport * from \"./sidebar\";\nexport * from \"./view\";\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
package/dist/main/offscreen.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { type OffscreenDefinition, OffscreenReason, type OffscreenUnresolvedDefinition } from "../types/offscreen.js";
|
|
2
|
-
import type { OffscreenName, OffscreenProxyTarget } from "../offscreen/index.js";
|
|
1
|
+
import { type OffscreenDefinition, type OffscreenMap, type OffscreenName, type OffscreenProxyTarget, OffscreenReason, type OffscreenUnresolvedDefinition } from "../types/offscreen.js";
|
|
3
2
|
import type { TransportType } from "../types/transport.js";
|
|
4
|
-
type OffscreenParameters = chrome.offscreen.CreateParameters;
|
|
5
3
|
export { OffscreenReason, OffscreenDefinition, OffscreenUnresolvedDefinition };
|
|
6
|
-
export type OffscreenAlias
|
|
7
|
-
export type OffscreenMap = Map<OffscreenAlias, OffscreenParameters>;
|
|
4
|
+
export type { OffscreenAlias, OffscreenMap } from "../types/offscreen.js";
|
|
8
5
|
export declare const defineOffscreen: <T extends TransportType>(options: OffscreenDefinition<T>) => OffscreenDefinition<T>;
|
|
9
6
|
export declare const getOffscreens: () => OffscreenMap;
|
|
10
7
|
export declare const getOffscreen: <N extends OffscreenName>(name: N) => OffscreenProxyTarget<N>;
|
package/dist/main/offscreen.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import ProxyOffscreen from "./../offscreen/providers/ProxyOffscreen.js";
|
|
2
|
-
import {
|
|
2
|
+
import { parameters as offscreenParameters } from "#adnbn/offscreen";
|
|
3
|
+
import {
|
|
4
|
+
OffscreenReason
|
|
5
|
+
} from "./../types/offscreen.js";
|
|
3
6
|
const defineOffscreen = (options) => {
|
|
4
7
|
return options;
|
|
5
8
|
};
|
|
6
9
|
const getOffscreens = () => {
|
|
7
10
|
const offscreens = /* @__PURE__ */ new Map();
|
|
8
11
|
try {
|
|
9
|
-
Object.entries(
|
|
12
|
+
Object.entries(offscreenParameters).forEach(([key, value]) => {
|
|
10
13
|
offscreens.set(key, value);
|
|
11
14
|
});
|
|
12
15
|
} catch (e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/main/offscreen.ts"],"sourcesContent":["import ProxyOffscreen from \"@offscreen/providers/ProxyOffscreen\";\
|
|
1
|
+
{"version":3,"sources":["../../src/main/offscreen.ts"],"sourcesContent":["import ProxyOffscreen from \"@offscreen/providers/ProxyOffscreen\";\nimport {parameters as offscreenParameters} from \"#adnbn/offscreen\";\n\nimport {\n type OffscreenDefinition,\n type OffscreenMap,\n type OffscreenName,\n type OffscreenProxyTarget,\n OffscreenReason,\n type OffscreenUnresolvedDefinition,\n} from \"@typing/offscreen\";\nimport type {TransportType} from \"@typing/transport\";\n\nexport {OffscreenReason, OffscreenDefinition, OffscreenUnresolvedDefinition};\n\nexport type {OffscreenAlias, OffscreenMap} from \"@typing/offscreen\";\n\nexport const defineOffscreen = <T extends TransportType>(options: OffscreenDefinition<T>): OffscreenDefinition<T> => {\n return options;\n};\n\nexport const getOffscreens = (): OffscreenMap => {\n const offscreens: OffscreenMap = new Map();\n\n try {\n Object.entries(offscreenParameters).forEach(([key, value]) => {\n offscreens.set(key, value);\n });\n } catch (e) {\n console.error(\"Failed getting offscreens: \", e);\n }\n\n return offscreens;\n};\n\nexport const getOffscreen = <N extends OffscreenName>(name: N): OffscreenProxyTarget<N> => {\n const parameters = getOffscreens().get(name);\n\n if (!parameters) {\n throw new Error(`Unable to get offscreen: ${name}`);\n }\n\n return new ProxyOffscreen(name, parameters).get();\n};\n"],"mappings":"AAAA,OAAO,oBAAoB;AAC3B,SAAQ,cAAc,2BAA0B;AAEhD;AAAA,EAKI;AAAA,OAEG;AAOA,MAAM,kBAAkB,CAA0B,YAA4D;AACjH,SAAO;AACX;AAEO,MAAM,gBAAgB,MAAoB;AAC7C,QAAM,aAA2B,oBAAI,IAAI;AAEzC,MAAI;AACA,WAAO,QAAQ,mBAAmB,EAAE,QAAQ,CAAC,CAAC,KAAK,KAAK,MAAM;AAC1D,iBAAW,IAAI,KAAK,KAAK;AAAA,IAC7B,CAAC;AAAA,EACL,SAAS,GAAG;AACR,YAAQ,MAAM,+BAA+B,CAAC;AAAA,EAClD;AAEA,SAAO;AACX;AAEO,MAAM,eAAe,CAA0B,SAAqC;AACvF,QAAM,aAAa,cAAc,EAAE,IAAI,IAAI;AAE3C,MAAI,CAAC,YAAY;AACb,UAAM,IAAI,MAAM,4BAA4B,IAAI,EAAE;AAAA,EACtD;AAEA,SAAO,IAAI,eAAe,MAAM,UAAU,EAAE,IAAI;AACpD;","names":[]}
|
package/dist/main/page.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type { PageDefinition, PageProps, PageConfig };
|
|
3
|
-
export type PageAlias = string;
|
|
4
|
-
export type PageMap = Map<PageAlias, string>;
|
|
1
|
+
import type { PageAlias, PageDefinition, PageMap } from "../types/page.js";
|
|
2
|
+
export type { PageDefinition, PageProps, PageConfig, PageAliasRegistry, PageAlias, PageMap } from "../types/page.js";
|
|
5
3
|
export declare const definePage: (options: PageDefinition) => PageDefinition;
|
|
6
4
|
export declare const getPages: () => PageMap;
|
|
7
5
|
export declare const getPageUrl: (alias: PageAlias) => string;
|
package/dist/main/page.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { getUrl } from "@addon-core/browser";
|
|
2
|
+
import { aliases } from "#adnbn/page";
|
|
2
3
|
const definePage = (options) => {
|
|
3
4
|
return options;
|
|
4
5
|
};
|
|
5
6
|
const getPages = () => {
|
|
6
7
|
const pages = /* @__PURE__ */ new Map();
|
|
7
8
|
try {
|
|
8
|
-
Object.entries(
|
|
9
|
+
Object.entries(aliases).forEach(([key, value]) => {
|
|
9
10
|
pages.set(key, value);
|
|
10
11
|
});
|
|
11
12
|
} catch (e) {
|
package/dist/main/page.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/main/page.ts"],"sourcesContent":["import {getUrl} from \"@addon-core/browser\";\n\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/main/page.ts"],"sourcesContent":["import {getUrl} from \"@addon-core/browser\";\nimport {aliases} from \"#adnbn/page\";\n\nimport type {PageAlias, PageDefinition, PageMap} from \"@typing/page\";\n\nexport type {PageDefinition, PageProps, PageConfig, PageAliasRegistry, PageAlias, PageMap} from \"@typing/page\";\n\nexport const definePage = (options: PageDefinition): PageDefinition => {\n return options;\n};\n\nexport const getPages = (): PageMap => {\n const pages: PageMap = new Map();\n\n try {\n Object.entries(aliases).forEach(([key, value]) => {\n pages.set(key, value);\n });\n } catch (e) {\n console.error(\"Failed getting pages: \", e);\n }\n\n return pages;\n};\n\nexport const getPageUrl = (alias: PageAlias): string => {\n let path = getPages().get(alias);\n\n if (!path) {\n console.warn(`Cannot find page: ${alias}`);\n\n path = alias;\n }\n\n return getUrl(path);\n};\n"],"mappings":"AAAA,SAAQ,cAAa;AACrB,SAAQ,eAAc;AAMf,MAAM,aAAa,CAAC,YAA4C;AACnE,SAAO;AACX;AAEO,MAAM,WAAW,MAAe;AACnC,QAAM,QAAiB,oBAAI,IAAI;AAE/B,MAAI;AACA,WAAO,QAAQ,OAAO,EAAE,QAAQ,CAAC,CAAC,KAAK,KAAK,MAAM;AAC9C,YAAM,IAAI,KAAK,KAAK;AAAA,IACxB,CAAC;AAAA,EACL,SAAS,GAAG;AACR,YAAQ,MAAM,0BAA0B,CAAC;AAAA,EAC7C;AAEA,SAAO;AACX;AAEO,MAAM,aAAa,CAAC,UAA6B;AACpD,MAAI,OAAO,SAAS,EAAE,IAAI,KAAK;AAE/B,MAAI,CAAC,MAAM;AACP,YAAQ,KAAK,qBAAqB,KAAK,EAAE;AAEzC,WAAO;AAAA,EACX;AAEA,SAAO,OAAO,IAAI;AACtB;","names":[]}
|
package/dist/main/popup.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { PopupDefinition } from "../types/popup.js";
|
|
2
|
-
import { ManifestPopup } from "../types/manifest.js";
|
|
1
|
+
import type { PopupAlias, PopupDefinition, PopupMap } from "../types/popup.js";
|
|
3
2
|
type Tab = chrome.tabs.Tab;
|
|
4
|
-
export type PopupAlias
|
|
5
|
-
export type PopupMap = Map<PopupAlias, ManifestPopup>;
|
|
3
|
+
export type { PopupAliasRegistry, PopupAlias, PopupMap } from "../types/popup.js";
|
|
6
4
|
export declare const definePopup: (options: PopupDefinition) => PopupDefinition;
|
|
7
5
|
export declare const getPopups: () => PopupMap;
|
|
8
6
|
export declare const changePopup: (alias: PopupAlias, tab?: number | Tab) => Promise<void>;
|
|
9
|
-
export {};
|
package/dist/main/popup.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { setActionPopup, setActionTitle } from "@addon-core/browser";
|
|
2
|
-
import {
|
|
2
|
+
import { aliases } from "#adnbn/popup";
|
|
3
3
|
import { changeActionIcon } from "./icon.js";
|
|
4
4
|
const definePopup = (options) => {
|
|
5
5
|
return options;
|
|
@@ -7,7 +7,7 @@ const definePopup = (options) => {
|
|
|
7
7
|
const getPopups = () => {
|
|
8
8
|
const popups = /* @__PURE__ */ new Map();
|
|
9
9
|
try {
|
|
10
|
-
Object.entries(
|
|
10
|
+
Object.entries(aliases).forEach(([key, value]) => {
|
|
11
11
|
popups.set(key, value);
|
|
12
12
|
});
|
|
13
13
|
} catch (e) {
|
|
@@ -29,7 +29,7 @@ const changePopup = async (alias, tab) => {
|
|
|
29
29
|
}
|
|
30
30
|
await setActionPopup(path, tab);
|
|
31
31
|
if (title) {
|
|
32
|
-
await setActionTitle(
|
|
32
|
+
await setActionTitle(title, tab);
|
|
33
33
|
}
|
|
34
34
|
if (icon) {
|
|
35
35
|
await changeActionIcon(icon, tab);
|
package/dist/main/popup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/main/popup.ts"],"sourcesContent":["import {setActionPopup, setActionTitle} from \"@addon-core/browser\";\
|
|
1
|
+
{"version":3,"sources":["../../src/main/popup.ts"],"sourcesContent":["import {setActionPopup, setActionTitle} from \"@addon-core/browser\";\nimport {aliases} from \"#adnbn/popup\";\n\nimport {changeActionIcon} from \"./icon\";\n\nimport type {PopupAlias, PopupDefinition, PopupMap} from \"@typing/popup\";\nimport type {IconName} from \"@typing/icon\";\n\ntype Tab = chrome.tabs.Tab;\n\nexport type {PopupAliasRegistry, PopupAlias, PopupMap} from \"@typing/popup\";\n\nexport const definePopup = (options: PopupDefinition): PopupDefinition => {\n return options;\n};\n\nexport const getPopups = (): PopupMap => {\n const popups: PopupMap = new Map();\n\n try {\n Object.entries(aliases).forEach(([key, value]) => {\n popups.set(key as PopupAlias, value);\n });\n } catch (e) {\n console.error(\"Failed getting popups: \", e);\n }\n\n return popups;\n};\n\nexport const changePopup = async (alias: PopupAlias, tab?: number | Tab): Promise<void> => {\n const popup = getPopups().get(alias);\n\n if (!popup) {\n throw new Error(`Not found popup: \"${alias}\"`);\n }\n\n if (tab && typeof tab === \"object\") {\n tab = tab.id;\n }\n\n const {path, title, icon} = popup;\n\n if (!path) {\n throw new Error(`Not found popup path: \"${alias}\"`);\n }\n\n await setActionPopup(path, tab);\n\n if (title) {\n await setActionTitle(title, tab);\n }\n\n if (icon) {\n await changeActionIcon(icon as IconName, tab);\n }\n};\n"],"mappings":"AAAA,SAAQ,gBAAgB,sBAAqB;AAC7C,SAAQ,eAAc;AAEtB,SAAQ,wBAAuB;AASxB,MAAM,cAAc,CAAC,YAA8C;AACtE,SAAO;AACX;AAEO,MAAM,YAAY,MAAgB;AACrC,QAAM,SAAmB,oBAAI,IAAI;AAEjC,MAAI;AACA,WAAO,QAAQ,OAAO,EAAE,QAAQ,CAAC,CAAC,KAAK,KAAK,MAAM;AAC9C,aAAO,IAAI,KAAmB,KAAK;AAAA,IACvC,CAAC;AAAA,EACL,SAAS,GAAG;AACR,YAAQ,MAAM,2BAA2B,CAAC;AAAA,EAC9C;AAEA,SAAO;AACX;AAEO,MAAM,cAAc,OAAO,OAAmB,QAAsC;AACvF,QAAM,QAAQ,UAAU,EAAE,IAAI,KAAK;AAEnC,MAAI,CAAC,OAAO;AACR,UAAM,IAAI,MAAM,qBAAqB,KAAK,GAAG;AAAA,EACjD;AAEA,MAAI,OAAO,OAAO,QAAQ,UAAU;AAChC,UAAM,IAAI;AAAA,EACd;AAEA,QAAM,EAAC,MAAM,OAAO,KAAI,IAAI;AAE5B,MAAI,CAAC,MAAM;AACP,UAAM,IAAI,MAAM,0BAA0B,KAAK,GAAG;AAAA,EACtD;AAEA,QAAM,eAAe,MAAM,GAAG;AAE9B,MAAI,OAAO;AACP,UAAM,eAAe,OAAO,GAAG;AAAA,EACnC;AAEA,MAAI,MAAM;AACN,UAAM,iBAAiB,MAAkB,GAAG;AAAA,EAChD;AACJ;","names":[]}
|
package/dist/main/relay.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { RelayName } from "../relay/index.js";
|
|
2
1
|
import type { TransportType } from "../types/transport.js";
|
|
3
|
-
import
|
|
2
|
+
import type { ContentScriptIsolation } from "../types/content/index.js";
|
|
3
|
+
import { RelayDefinition, RelayAllFrames, RelayFrameErrorKind, RelayMethod, type RelayBatchOptions, type RelayBatchProxyTarget, type RelayName, type RelayProxyTarget, type RelayScalarOptions } from "../types/relay.js";
|
|
4
4
|
export { RelayAllFrames, RelayFrameErrorKind, RelayMethod };
|
|
5
5
|
export { RelayDiscoveryError } from "../relay/discovery/RelayDiscovery.js";
|
|
6
6
|
export type { RelayAllFramesOptions, RelayAnyFramesOptions, RelayBatchOptions, RelayBatchProxyTarget, RelayBatchRpcProxy, RelayCallOptions, RelayDocumentOptions, RelayDocumentsOptions, RelayExecutionOptions, RelayEveryFrameOptions, RelayFrameError, RelayFrameOptions, RelayFrameResult, RelayFramesOptions, RelayFramesResult, RelayNonEmptyReadonlyArray, RelayProxyTarget, RelayResultTarget, RelayScalarOptions, RelayTopFrameOptions, RelayDefinition, } from "../types/relay.js";
|
|
7
|
-
export declare const defineRelay: <T extends TransportType>(options: RelayDefinition<T>) => RelayDefinition<T>;
|
|
7
|
+
export declare const defineRelay: <T extends TransportType, Data = undefined, const Isolation extends `${ContentScriptIsolation}` = "none">(options: RelayDefinition<T, Data, Isolation>) => RelayDefinition<T, Data, Isolation>;
|
|
8
8
|
export declare function getRelay<N extends RelayName>(name: N, params: number | RelayScalarOptions): RelayProxyTarget<N>;
|
|
9
9
|
export declare function getRelay<N extends RelayName>(name: N, params: RelayBatchOptions): RelayBatchProxyTarget<N>;
|
package/dist/main/relay.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import RelayPermission from "./../relay/RelayPermission.js";
|
|
2
2
|
import { ProxyRelay } from "./../relay/providers/index.js";
|
|
3
|
+
import { options as relayOptions } from "#adnbn/relay";
|
|
3
4
|
import {
|
|
4
5
|
RelayAllFrames,
|
|
5
6
|
RelayFrameErrorKind,
|
|
@@ -12,7 +13,7 @@ const defineRelay = (options) => {
|
|
|
12
13
|
const getRelayOptionsMap = () => {
|
|
13
14
|
const relays = /* @__PURE__ */ new Map();
|
|
14
15
|
try {
|
|
15
|
-
Object.entries(
|
|
16
|
+
Object.entries(relayOptions).forEach(([name, options]) => relays.set(name, options));
|
|
16
17
|
} catch (e) {
|
|
17
18
|
console.error("Failed getting relays: ", e);
|
|
18
19
|
}
|
package/dist/main/relay.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/main/relay.ts"],"sourcesContent":["import RelayPermission from \"@relay/RelayPermission\";\nimport {ProxyRelay, type ProxyRelayParams} from \"@relay/providers\";\n\nimport type {
|
|
1
|
+
{"version":3,"sources":["../../src/main/relay.ts"],"sourcesContent":["import RelayPermission from \"@relay/RelayPermission\";\nimport {ProxyRelay, type ProxyRelayParams} from \"@relay/providers\";\nimport {options as relayOptions} from \"#adnbn/relay\";\n\nimport type {TransportType} from \"@typing/transport\";\nimport type {ContentScriptIsolation} from \"@typing/content\";\n\nimport {\n RelayDefinition,\n RelayAllFrames,\n RelayFrameErrorKind,\n RelayMethod,\n RelayOptionsMap,\n type RelayBatchOptions,\n type RelayBatchProxyTarget,\n type RelayName,\n type RelayProxyTarget,\n type RelayScalarOptions,\n} from \"@typing/relay\";\n\nexport {RelayAllFrames, RelayFrameErrorKind, RelayMethod};\nexport {RelayDiscoveryError} from \"@relay/discovery/RelayDiscovery\";\n\nexport type {\n RelayAllFramesOptions,\n RelayAnyFramesOptions,\n RelayBatchOptions,\n RelayBatchProxyTarget,\n RelayBatchRpcProxy,\n RelayCallOptions,\n RelayDocumentOptions,\n RelayDocumentsOptions,\n RelayExecutionOptions,\n RelayEveryFrameOptions,\n RelayFrameError,\n RelayFrameOptions,\n RelayFrameResult,\n RelayFramesOptions,\n RelayFramesResult,\n RelayNonEmptyReadonlyArray,\n RelayProxyTarget,\n RelayResultTarget,\n RelayScalarOptions,\n RelayTopFrameOptions,\n RelayDefinition,\n} from \"@typing/relay\";\n\nexport const defineRelay = <\n T extends TransportType,\n Data = undefined,\n const Isolation extends `${ContentScriptIsolation}` = \"none\",\n>(\n options: RelayDefinition<T, Data, Isolation>\n): RelayDefinition<T, Data, Isolation> => {\n return options;\n};\n\nconst getRelayOptionsMap = (): RelayOptionsMap => {\n const relays: RelayOptionsMap = new Map();\n\n try {\n Object.entries(relayOptions).forEach(([name, options]) => relays.set(name, options));\n } catch (e) {\n console.error(\"Failed getting relays: \", e);\n }\n\n return relays;\n};\n\nexport function getRelay<N extends RelayName>(name: N, params: number | RelayScalarOptions): RelayProxyTarget<N>;\n\nexport function getRelay<N extends RelayName>(name: N, params: RelayBatchOptions): RelayBatchProxyTarget<N>;\n\nexport function getRelay<N extends RelayName>(\n name: N,\n params: ProxyRelayParams\n): RelayProxyTarget<N> | RelayBatchProxyTarget<N> {\n const relays = getRelayOptionsMap();\n const options = relays.get(name);\n\n if (!options) {\n throw new Error(`Failed to get relay \"${name}\"`);\n }\n\n return new ProxyRelay(name, options, params, RelayPermission.getInstance(relays)).get() as\n | RelayProxyTarget<N>\n | RelayBatchProxyTarget<N>;\n}\n"],"mappings":"AAAA,OAAO,qBAAqB;AAC5B,SAAQ,kBAAwC;AAChD,SAAQ,WAAW,oBAAmB;AAKtC;AAAA,EAEI;AAAA,EACA;AAAA,EACA;AAAA,OAOG;AAGP,SAAQ,2BAA0B;AA0B3B,MAAM,cAAc,CAKvB,YACsC;AACtC,SAAO;AACX;AAEA,MAAM,qBAAqB,MAAuB;AAC9C,QAAM,SAA0B,oBAAI,IAAI;AAExC,MAAI;AACA,WAAO,QAAQ,YAAY,EAAE,QAAQ,CAAC,CAAC,MAAM,OAAO,MAAM,OAAO,IAAI,MAAM,OAAO,CAAC;AAAA,EACvF,SAAS,GAAG;AACR,YAAQ,MAAM,2BAA2B,CAAC;AAAA,EAC9C;AAEA,SAAO;AACX;AAMO,SAAS,SACZ,MACA,QAC8C;AAC9C,QAAM,SAAS,mBAAmB;AAClC,QAAM,UAAU,OAAO,IAAI,IAAI;AAE/B,MAAI,CAAC,SAAS;AACV,UAAM,IAAI,MAAM,wBAAwB,IAAI,GAAG;AAAA,EACnD;AAEA,SAAO,IAAI,WAAW,MAAM,SAAS,QAAQ,gBAAgB,YAAY,MAAM,CAAC,EAAE,IAAI;AAG1F;","names":[]}
|
package/dist/main/sandbox.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { SandboxDefinition,
|
|
2
|
-
import type { SandboxName, SandboxProxyTarget } from "../sandbox/index.js";
|
|
1
|
+
import type { SandboxDefinition, SandboxMap, SandboxName, SandboxProxyTarget } from "../types/sandbox.js";
|
|
3
2
|
import type { TransportType } from "../types/transport.js";
|
|
4
3
|
export * from "../types/sandbox.js";
|
|
5
|
-
export type SandboxAlias = string;
|
|
6
|
-
export type SandboxMap = Map<SandboxAlias, SandboxParameters>;
|
|
7
4
|
export declare const defineSandbox: <T extends TransportType>(options: SandboxDefinition<T>) => SandboxDefinition<T>;
|
|
8
5
|
export declare const getSandboxes: () => SandboxMap;
|
|
9
6
|
export declare const getSandbox: <N extends SandboxName>(name: N) => SandboxProxyTarget<N>;
|
package/dist/main/sandbox.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ProxySandbox } from "./../sandbox/providers/index.js";
|
|
2
|
+
import { parameters as sandboxParameters } from "#adnbn/sandbox";
|
|
2
3
|
export * from "./../types/sandbox.js";
|
|
3
4
|
const defineSandbox = (options) => {
|
|
4
5
|
return options;
|
|
@@ -6,7 +7,7 @@ const defineSandbox = (options) => {
|
|
|
6
7
|
const getSandboxes = () => {
|
|
7
8
|
const sandboxes = /* @__PURE__ */ new Map();
|
|
8
9
|
try {
|
|
9
|
-
Object.entries(
|
|
10
|
+
Object.entries(sandboxParameters).forEach(([key, value]) => {
|
|
10
11
|
sandboxes.set(key, value);
|
|
11
12
|
});
|
|
12
13
|
} catch (e) {
|
package/dist/main/sandbox.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/main/sandbox.ts"],"sourcesContent":["import {ProxySandbox} from \"@sandbox/providers\";\
|
|
1
|
+
{"version":3,"sources":["../../src/main/sandbox.ts"],"sourcesContent":["import {ProxySandbox} from \"@sandbox/providers\";\nimport {parameters as sandboxParameters} from \"#adnbn/sandbox\";\n\nimport type {SandboxDefinition, SandboxMap, SandboxName, SandboxProxyTarget} from \"@typing/sandbox\";\nimport type {TransportType} from \"@typing/transport\";\n\nexport * from \"@typing/sandbox\";\n\nexport const defineSandbox = <T extends TransportType>(options: SandboxDefinition<T>): SandboxDefinition<T> => {\n return options;\n};\n\nexport const getSandboxes = (): SandboxMap => {\n const sandboxes: SandboxMap = new Map();\n\n try {\n Object.entries(sandboxParameters).forEach(([key, value]) => {\n sandboxes.set(key, value);\n });\n } catch (e) {\n console.error(\"Failed getting sandboxes: \", e);\n }\n\n return sandboxes;\n};\n\nexport const getSandbox = <N extends SandboxName>(name: N): SandboxProxyTarget<N> => {\n const parameters = getSandboxes().get(name);\n\n if (!parameters) {\n throw new Error(`Unable to get sandbox: ${name}`);\n }\n\n return new ProxySandbox(name, parameters).get() as SandboxProxyTarget<N>;\n};\n"],"mappings":"AAAA,SAAQ,oBAAmB;AAC3B,SAAQ,cAAc,yBAAwB;AAK9C,cAAc;AAEP,MAAM,gBAAgB,CAA0B,YAAwD;AAC3G,SAAO;AACX;AAEO,MAAM,eAAe,MAAkB;AAC1C,QAAM,YAAwB,oBAAI,IAAI;AAEtC,MAAI;AACA,WAAO,QAAQ,iBAAiB,EAAE,QAAQ,CAAC,CAAC,KAAK,KAAK,MAAM;AACxD,gBAAU,IAAI,KAAK,KAAK;AAAA,IAC5B,CAAC;AAAA,EACL,SAAS,GAAG;AACR,YAAQ,MAAM,8BAA8B,CAAC;AAAA,EACjD;AAEA,SAAO;AACX;AAEO,MAAM,aAAa,CAAwB,SAAmC;AACjF,QAAM,aAAa,aAAa,EAAE,IAAI,IAAI;AAE1C,MAAI,CAAC,YAAY;AACb,UAAM,IAAI,MAAM,0BAA0B,IAAI,EAAE;AAAA,EACpD;AAEA,SAAO,IAAI,aAAa,MAAM,UAAU,EAAE,IAAI;AAClD;","names":[]}
|
package/dist/main/service.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { ServiceName, ServiceProxyTarget } from "../service
|
|
1
|
+
import type { ServiceDefinition, ServiceName, ServiceProxyTarget } from "../types/service.js";
|
|
2
2
|
import type { TransportType } from "../types/transport.js";
|
|
3
|
-
import { ServiceDefinition } from "../types/service.js";
|
|
4
3
|
export type { ServiceDefinition };
|
|
5
4
|
export declare const defineService: <T extends TransportType>(options: ServiceDefinition<T>) => ServiceDefinition<T>;
|
|
6
5
|
export declare const getService: <N extends ServiceName>(name: N) => ServiceProxyTarget<N>;
|
package/dist/main/service.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/main/service.ts"],"sourcesContent":["import {ProxyService} from \"@service/providers\";\n\nimport type {ServiceName, ServiceProxyTarget} from \"@service
|
|
1
|
+
{"version":3,"sources":["../../src/main/service.ts"],"sourcesContent":["import {ProxyService} from \"@service/providers\";\n\nimport type {ServiceDefinition, ServiceName, ServiceProxyTarget} from \"@typing/service\";\nimport type {TransportType} from \"@typing/transport\";\n\nexport type {ServiceDefinition};\n\nexport const defineService = <T extends TransportType>(options: ServiceDefinition<T>): ServiceDefinition<T> => {\n return options;\n};\n\nexport const getService = <N extends ServiceName>(name: N): ServiceProxyTarget<N> => {\n return new ProxyService(name).get();\n};\n"],"mappings":"AAAA,SAAQ,oBAAmB;AAOpB,MAAM,gBAAgB,CAA0B,YAAwD;AAC3G,SAAO;AACX;AAEO,MAAM,aAAa,CAAwB,SAAmC;AACjF,SAAO,IAAI,aAAa,IAAI,EAAE,IAAI;AACtC;","names":[]}
|
package/dist/main/sidebar.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import type { SidebarDefinition } from "../types/sidebar.js";
|
|
2
|
-
import type { ManifestSidebar } from "../types/manifest.js";
|
|
1
|
+
import type { SidebarAlias, SidebarDefinition, SidebarMap } from "../types/sidebar.js";
|
|
3
2
|
type Tab = chrome.tabs.Tab;
|
|
4
|
-
export type SidebarAlias
|
|
5
|
-
export type SidebarMap = Map<SidebarAlias, ManifestSidebar>;
|
|
3
|
+
export type { SidebarAliasRegistry, SidebarAlias, SidebarMap } from "../types/sidebar.js";
|
|
6
4
|
export declare const defineSidebar: (options: SidebarDefinition) => SidebarDefinition;
|
|
7
5
|
export declare const getSidebars: () => SidebarMap;
|
|
8
6
|
export declare const changeSidebar: (alias: SidebarAlias, tab?: number | Tab) => Promise<void>;
|
|
9
|
-
export {};
|
package/dist/main/sidebar.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { setSidebarPath, setSidebarTitle } from "@addon-core/browser";
|
|
2
|
-
import {
|
|
2
|
+
import { aliases } from "#adnbn/sidebar";
|
|
3
3
|
const defineSidebar = (options) => {
|
|
4
4
|
return options;
|
|
5
5
|
};
|
|
6
6
|
const getSidebars = () => {
|
|
7
7
|
const sidebars = /* @__PURE__ */ new Map();
|
|
8
8
|
try {
|
|
9
|
-
Object.entries(
|
|
9
|
+
Object.entries(aliases).forEach(([key, value]) => {
|
|
10
10
|
sidebars.set(key, value);
|
|
11
11
|
});
|
|
12
12
|
} catch (e) {
|
|
@@ -28,7 +28,7 @@ const changeSidebar = async (alias, tab) => {
|
|
|
28
28
|
}
|
|
29
29
|
await setSidebarPath(path, tab);
|
|
30
30
|
if (title) {
|
|
31
|
-
await setSidebarTitle(
|
|
31
|
+
await setSidebarTitle(title, tab);
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
export {
|
package/dist/main/sidebar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/main/sidebar.ts"],"sourcesContent":["import {setSidebarPath, setSidebarTitle} from \"@addon-core/browser\";\
|
|
1
|
+
{"version":3,"sources":["../../src/main/sidebar.ts"],"sourcesContent":["import {setSidebarPath, setSidebarTitle} from \"@addon-core/browser\";\nimport {aliases} from \"#adnbn/sidebar\";\n\nimport type {SidebarAlias, SidebarDefinition, SidebarMap} from \"@typing/sidebar\";\n\ntype Tab = chrome.tabs.Tab;\n\nexport type {SidebarAliasRegistry, SidebarAlias, SidebarMap} from \"@typing/sidebar\";\n\nexport const defineSidebar = (options: SidebarDefinition): SidebarDefinition => {\n return options;\n};\n\nexport const getSidebars = (): SidebarMap => {\n const sidebars: SidebarMap = new Map();\n\n try {\n Object.entries(aliases).forEach(([key, value]) => {\n sidebars.set(key as SidebarAlias, value);\n });\n } catch (e) {\n console.error(\"Failed getting sidebars: \", e);\n }\n\n return sidebars;\n};\n\nexport const changeSidebar = async (alias: SidebarAlias, tab?: number | Tab): Promise<void> => {\n const sidebar = getSidebars().get(alias);\n\n if (!sidebar) {\n throw new Error(`Not found sidebar: \"${alias}\"`);\n }\n\n if (tab && typeof tab === \"object\") {\n tab = tab.id;\n }\n\n const {path, title} = sidebar;\n\n if (!path) {\n throw new Error(`Not found sidebar path: \"${alias}\"`);\n }\n\n await setSidebarPath(path, tab);\n\n if (title) {\n await setSidebarTitle(title, tab);\n }\n};\n"],"mappings":"AAAA,SAAQ,gBAAgB,uBAAsB;AAC9C,SAAQ,eAAc;AAQf,MAAM,gBAAgB,CAAC,YAAkD;AAC5E,SAAO;AACX;AAEO,MAAM,cAAc,MAAkB;AACzC,QAAM,WAAuB,oBAAI,IAAI;AAErC,MAAI;AACA,WAAO,QAAQ,OAAO,EAAE,QAAQ,CAAC,CAAC,KAAK,KAAK,MAAM;AAC9C,eAAS,IAAI,KAAqB,KAAK;AAAA,IAC3C,CAAC;AAAA,EACL,SAAS,GAAG;AACR,YAAQ,MAAM,6BAA6B,CAAC;AAAA,EAChD;AAEA,SAAO;AACX;AAEO,MAAM,gBAAgB,OAAO,OAAqB,QAAsC;AAC3F,QAAM,UAAU,YAAY,EAAE,IAAI,KAAK;AAEvC,MAAI,CAAC,SAAS;AACV,UAAM,IAAI,MAAM,uBAAuB,KAAK,GAAG;AAAA,EACnD;AAEA,MAAI,OAAO,OAAO,QAAQ,UAAU;AAChC,UAAM,IAAI;AAAA,EACd;AAEA,QAAM,EAAC,MAAM,MAAK,IAAI;AAEtB,MAAI,CAAC,MAAM;AACP,UAAM,IAAI,MAAM,4BAA4B,KAAK,GAAG;AAAA,EACxD;AAEA,QAAM,eAAe,MAAM,GAAG;AAE9B,MAAI,OAAO;AACP,UAAM,gBAAgB,OAAO,GAAG;AAAA,EACpC;AACJ;","names":[]}
|
package/dist/message/index.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { Message } from "./providers/index.js";
|
|
2
2
|
import { UnsupportedMessageTargetError } from "./error.js";
|
|
3
|
-
import { MessageData, MessageDictionary, MessageGeneralHandler, MessageMapHandler, MessageResponse, MessageSenderAware, MessageTargetHandler, MessageType, MessageSender, MessageSendOptions } from "../types/message.js";
|
|
4
|
-
export type { MessageData, MessageDictionary, MessageGeneralHandler, MessageMapHandler, MessageResponse, MessageTargetHandler, MessageType, MessageSendOptions, MessageSenderAware, MessageSender, };
|
|
3
|
+
import { MessageData, MessageDictionary, MessageRegistry, MessageGeneralHandler, MessageMapHandler, MessageResponse, MessageSenderAware, MessageTargetHandler, MessageType, MessageSender, MessageSendOptions } from "../types/message.js";
|
|
4
|
+
export type { MessageRegistry, MessageData, MessageDictionary, MessageGeneralHandler, MessageMapHandler, MessageResponse, MessageTargetHandler, MessageType, MessageSendOptions, MessageSenderAware, MessageSender, };
|
|
5
5
|
export { Message, UnsupportedMessageTargetError };
|
|
6
|
-
export interface MessageRegistry extends MessageDictionary {
|
|
7
|
-
}
|
|
8
6
|
export declare function sendMessage<K extends MessageType<MessageRegistry>>(type: K, data: MessageData<MessageRegistry, K>, options?: MessageSendOptions): Promise<MessageResponse<MessageRegistry, K>>;
|
|
9
7
|
export declare function onMessage<K extends MessageType<MessageRegistry>>(type: K, handler: MessageTargetHandler<MessageRegistry, K>): () => void;
|
|
10
8
|
export declare function onMessage<K extends MessageType<MessageRegistry>>(handler: MessageGeneralHandler<MessageRegistry, K>): () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/message/index.ts"],"sourcesContent":["import {Message} from \"@message/providers\";\nimport {UnsupportedMessageTargetError} from \"@message/error\";\n\nimport {\n MessageData,\n MessageDictionary,\n MessageGeneralHandler,\n MessageMapHandler,\n MessageResponse,\n MessageSenderAware,\n MessageTargetHandler,\n MessageType,\n MessageSender,\n MessageSendOptions,\n} from \"@typing/message\";\n\nexport type {\n MessageData,\n MessageDictionary,\n MessageGeneralHandler,\n MessageMapHandler,\n MessageResponse,\n MessageTargetHandler,\n MessageType,\n MessageSendOptions,\n MessageSenderAware,\n MessageSender,\n};\n\nexport {Message, UnsupportedMessageTargetError};\n\nexport
|
|
1
|
+
{"version":3,"sources":["../../src/message/index.ts"],"sourcesContent":["import {Message} from \"@message/providers\";\nimport {UnsupportedMessageTargetError} from \"@message/error\";\n\nimport {\n MessageData,\n MessageDictionary,\n MessageRegistry,\n MessageGeneralHandler,\n MessageMapHandler,\n MessageResponse,\n MessageSenderAware,\n MessageTargetHandler,\n MessageType,\n MessageSender,\n MessageSendOptions,\n} from \"@typing/message\";\n\nexport type {\n MessageRegistry,\n MessageData,\n MessageDictionary,\n MessageGeneralHandler,\n MessageMapHandler,\n MessageResponse,\n MessageTargetHandler,\n MessageType,\n MessageSendOptions,\n MessageSenderAware,\n MessageSender,\n};\n\nexport {Message, UnsupportedMessageTargetError};\n\nexport function sendMessage<K extends MessageType<MessageRegistry>>(\n type: K,\n data: MessageData<MessageRegistry, K>,\n options?: MessageSendOptions\n): Promise<MessageResponse<MessageRegistry, K>> {\n return Message.getInstance<MessageRegistry>().send(type, data, options);\n}\n\nexport function onMessage<K extends MessageType<MessageRegistry>>(\n type: K,\n handler: MessageTargetHandler<MessageRegistry, K>\n): () => void;\n\nexport function onMessage<K extends MessageType<MessageRegistry>>(\n handler: MessageGeneralHandler<MessageRegistry, K>\n): () => void;\n\nexport function onMessage(map: MessageMapHandler<MessageRegistry>): () => void;\n\nexport function onMessage<K extends MessageType<MessageRegistry>>(\n arg1: K | MessageMapHandler<MessageRegistry> | MessageGeneralHandler<MessageRegistry, K>,\n arg2?: MessageTargetHandler<MessageRegistry, K>\n): () => void {\n return Message.getInstance<MessageRegistry>().watch(arg1, arg2);\n}\n"],"mappings":"AAAA,SAAQ,eAAc;AACtB,SAAQ,qCAAoC;AAgCrC,SAAS,YACZ,MACA,MACA,SAC4C;AAC5C,SAAO,QAAQ,YAA6B,EAAE,KAAK,MAAM,MAAM,OAAO;AAC1E;AAaO,SAAS,UACZ,MACA,MACU;AACV,SAAO,QAAQ,YAA6B,EAAE,MAAM,MAAM,IAAI;AAClE;","names":[]}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { ProxyOffscreen, RegisterOffscreen } from "./providers/index.js";
|
|
2
2
|
import OffscreenBackground from "./OffscreenBackground.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { OffscreenName, OffscreenTarget } from "../types/offscreen.js";
|
|
4
4
|
export { ProxyOffscreen, RegisterOffscreen, OffscreenBackground };
|
|
5
|
-
export
|
|
6
|
-
}
|
|
7
|
-
export type OffscreenName = Extract<keyof OffscreenRegistry, string>;
|
|
8
|
-
export type OffscreenTarget<N extends keyof OffscreenRegistry> = TransportTarget<OffscreenRegistry, N>;
|
|
9
|
-
export type OffscreenProxyTarget<N extends keyof OffscreenRegistry> = TransportProxyTarget<OffscreenRegistry, N>;
|
|
5
|
+
export type { OffscreenRegistry, OffscreenName, OffscreenTarget, OffscreenProxyTarget } from "../types/offscreen.js";
|
|
10
6
|
export declare const getOffscreen: <N extends OffscreenName>(name: N) => OffscreenTarget<N>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/offscreen/index.ts"],"sourcesContent":["import {Offscreen, ProxyOffscreen, RegisterOffscreen} from \"./providers\";\nimport OffscreenBackground from \"./OffscreenBackground\";\n\nimport type {
|
|
1
|
+
{"version":3,"sources":["../../src/offscreen/index.ts"],"sourcesContent":["import {Offscreen, ProxyOffscreen, RegisterOffscreen} from \"./providers\";\nimport OffscreenBackground from \"./OffscreenBackground\";\n\nimport type {OffscreenName, OffscreenTarget} from \"@typing/offscreen\";\n\nexport {ProxyOffscreen, RegisterOffscreen, OffscreenBackground};\n\nexport type {OffscreenRegistry, OffscreenName, OffscreenTarget, OffscreenProxyTarget} from \"@typing/offscreen\";\n\nexport const getOffscreen = <N extends OffscreenName>(name: N): OffscreenTarget<N> => {\n return new Offscreen<N>(name).get();\n};\n"],"mappings":"AAAA,SAAQ,WAAW,gBAAgB,yBAAwB;AAC3D,OAAO,yBAAyB;AAQzB,MAAM,eAAe,CAA0B,SAAgC;AAClF,SAAO,IAAI,UAAa,IAAI,EAAE,IAAI;AACtC;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { containsPermissions, onPermissionsAdded, onPermissionsRemoved, requestPermissions } from "@addon-core/browser";
|
|
2
2
|
import { RelayMethod } from "./../types/relay.js";
|
|
3
|
-
import { ContentScriptDeclarative } from "./../types/content.js";
|
|
3
|
+
import { ContentScriptDeclarative } from "./../types/content/index.js";
|
|
4
4
|
const RelayPermissionGlobalKey = "adnbnRelayPermission";
|
|
5
5
|
class RelayPermission {
|
|
6
6
|
permissions = /* @__PURE__ */ new Map();
|
package/dist/relay/index.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export
|
|
3
|
-
}
|
|
4
|
-
export type RelayName = Extract<keyof RelayRegistry, string>;
|
|
5
|
-
export type RelayTarget<N extends keyof RelayRegistry> = TransportTarget<RelayRegistry, N>;
|
|
1
|
+
import type { RelayName, RelayTarget } from "../types/relay.js";
|
|
2
|
+
export type { RelayRegistry, RelayName, RelayTarget } from "../types/relay.js";
|
|
6
3
|
export declare const getRelay: <N extends RelayName>(name: N) => RelayTarget<N>;
|