adnbn 0.10.0 → 0.11.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/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 +16 -6
- 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/plugins/build-assets-map/BuildAssetsMapPlugin.d.ts +14 -0
- package/dist/cli/bundler/plugins/build-assets-map/BuildAssetsMapPlugin.js +523 -0
- package/dist/cli/bundler/plugins/build-assets-map/BuildAssetsMapPlugin.js.map +1 -0
- package/dist/cli/bundler/plugins/build-assets-map/entrypoint-module.d.ts +13 -0
- package/dist/cli/bundler/plugins/build-assets-map/entrypoint-module.js +16 -0
- package/dist/cli/bundler/plugins/build-assets-map/entrypoint-module.js.map +1 -0
- package/dist/cli/bundler/plugins/build-assets-map/index.d.ts +3 -0
- package/dist/cli/bundler/plugins/build-assets-map/index.js +8 -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 +12 -0
- package/dist/cli/bundler/plugins/build-assets-map/usage.js +28 -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 +32 -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/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 +55 -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 +4 -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/index.d.ts +3 -0
- package/dist/cli/bundler/plugins/utils/index.js +9 -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-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/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 -0
- package/dist/cli/bundler/utils/index.js +2 -0
- package/dist/cli/bundler/utils/index.js.map +1 -1
- package/dist/cli/bundler/utils/layers.d.ts +4 -0
- package/dist/cli/bundler/utils/layers.js +10 -0
- package/dist/cli/bundler/utils/layers.js.map +1 -0
- package/dist/cli/bundler/utils/output.d.ts +6 -2
- package/dist/cli/bundler/utils/output.js +165 -7
- package/dist/cli/bundler/utils/output.js.map +1 -1
- package/dist/cli/bundler/utils/styles.d.ts +5 -0
- package/dist/cli/bundler/utils/styles.js +30 -0
- package/dist/cli/bundler/utils/styles.js.map +1 -0
- 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/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 +5 -1
- package/dist/cli/entrypoint/parser/ContentParser.js +55 -3
- 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 +4 -0
- package/dist/cli/entrypoint/parser/RelayParser.js.map +1 -1
- 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 +1 -1
- package/dist/cli/plugins/content/Content.js +3 -2
- package/dist/cli/plugins/content/Content.js.map +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 +1 -1
- 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 +1 -1
- package/dist/cli/plugins/content/Relay.js +3 -2
- package/dist/cli/plugins/content/Relay.js.map +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 +1 -1
- package/dist/cli/plugins/content/utils.d.ts +2 -0
- 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/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.js +33 -3
- package/dist/cli/plugins/output.js.map +1 -1
- 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 +8 -10
- package/dist/entry/content/adapters/react/Builder.js +1 -1
- package/dist/entry/content/adapters/react/Builder.js.map +1 -1
- package/dist/entry/content/adapters/react/Node.d.ts +2 -0
- package/dist/entry/content/adapters/react/Node.js +10 -2
- package/dist/entry/content/adapters/react/Node.js.map +1 -1
- package/dist/entry/content/adapters/vanilla/Builder.js +1 -1
- package/dist/entry/content/adapters/vanilla/Builder.js.map +1 -1
- package/dist/entry/content/adapters/vanilla/Node.d.ts +2 -1
- package/dist/entry/content/adapters/vanilla/Node.js +10 -7
- package/dist/entry/content/adapters/vanilla/Node.js.map +1 -1
- package/dist/entry/content/core/Builder.d.ts +1 -2
- package/dist/entry/content/core/Builder.js +9 -5
- package/dist/entry/content/core/Builder.js.map +1 -1
- package/dist/entry/content/core/MountBuilder.js +14 -6
- package/dist/entry/content/core/MountBuilder.js.map +1 -1
- package/dist/entry/content/core/{Context.d.ts → context/Context.d.ts} +2 -1
- package/dist/entry/content/core/{Context.js → context/Context.js} +7 -0
- package/dist/entry/content/core/context/Context.js.map +1 -0
- package/dist/entry/content/core/{EventEmitter.d.ts → context/EventEmitter.d.ts} +1 -1
- package/dist/entry/content/core/{EventEmitter.js → context/EventEmitter.js} +1 -1
- package/dist/entry/content/core/context/EventEmitter.js.map +1 -0
- package/dist/entry/content/core/{ManagedContext.d.ts → context/ManagedContext.d.ts} +1 -1
- package/dist/entry/content/core/context/ManagedContext.js.map +1 -0
- package/dist/entry/content/core/context/index.d.ts +3 -0
- package/dist/entry/content/core/context/index.js +9 -0
- package/dist/entry/content/core/context/index.js.map +1 -0
- package/dist/entry/content/core/{AbstractMarker.d.ts → markers/AbstractMarker.d.ts} +1 -1
- package/dist/entry/content/core/{AbstractMarker.js → markers/AbstractMarker.js} +1 -1
- package/dist/entry/content/core/markers/AbstractMarker.js.map +1 -0
- package/dist/entry/content/core/{AttributeMarker.d.ts → markers/AttributeMarker.d.ts} +1 -1
- package/dist/entry/content/core/markers/AttributeMarker.js.map +1 -0
- package/dist/entry/content/core/{WeakMarker.d.ts → markers/WeakMarker.d.ts} +1 -1
- package/dist/entry/content/core/markers/WeakMarker.js.map +1 -0
- package/dist/entry/content/core/markers/index.d.ts +3 -0
- package/dist/entry/content/core/markers/index.js +9 -0
- package/dist/entry/content/core/markers/index.js.map +1 -0
- package/dist/entry/content/core/{EventNode.d.ts → nodes/EventNode.d.ts} +2 -1
- package/dist/entry/content/core/{EventNode.js → nodes/EventNode.js} +3 -0
- package/dist/entry/content/core/nodes/EventNode.js.map +1 -0
- package/dist/entry/content/core/nodes/FrameNode.d.ts +23 -0
- package/dist/entry/content/core/nodes/FrameNode.js +125 -0
- package/dist/entry/content/core/nodes/FrameNode.js.map +1 -0
- package/dist/entry/content/core/{MarkerNode.d.ts → nodes/MarkerNode.d.ts} +2 -1
- package/dist/entry/content/core/{MarkerNode.js → nodes/MarkerNode.js} +3 -0
- package/dist/entry/content/core/nodes/MarkerNode.js.map +1 -0
- package/dist/entry/content/core/{MountNode.d.ts → nodes/MountNode.d.ts} +2 -1
- package/dist/entry/content/core/{MountNode.js → nodes/MountNode.js} +3 -0
- package/dist/entry/content/core/nodes/MountNode.js.map +1 -0
- package/dist/entry/content/core/{Node.d.ts → nodes/Node.d.ts} +2 -1
- package/dist/entry/content/core/{Node.js → nodes/Node.js} +3 -0
- package/dist/entry/content/core/nodes/Node.js.map +1 -0
- package/dist/entry/content/core/nodes/ShadowNode.d.ts +14 -0
- package/dist/entry/content/core/nodes/ShadowNode.js +67 -0
- package/dist/entry/content/core/nodes/ShadowNode.js.map +1 -0
- package/dist/entry/content/core/nodes/index.d.ts +6 -0
- package/dist/entry/content/core/nodes/index.js +15 -0
- package/dist/entry/content/core/nodes/index.js.map +1 -0
- package/dist/entry/content/core/nodes/isolated-styles.d.ts +2 -0
- package/dist/entry/content/core/nodes/isolated-styles.js +14 -0
- package/dist/entry/content/core/nodes/isolated-styles.js.map +1 -0
- package/dist/entry/content/core/resolvers/watch.js +1 -1
- package/dist/entry/content/core/resolvers/watch.js.map +1 -1
- package/dist/entry/content/frame/Builder.d.ts +7 -0
- package/dist/entry/content/frame/Builder.js +14 -0
- package/dist/entry/content/frame/Builder.js.map +1 -0
- package/dist/entry/content/frame/index.d.ts +4 -0
- package/dist/entry/content/frame/index.js +7 -0
- package/dist/entry/content/frame/index.js.map +1 -0
- package/dist/entry/relay/Builder.js +5 -1
- package/dist/entry/relay/Builder.js.map +1 -1
- package/dist/entry/relay/index.d.ts +1 -1
- 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/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 +1 -2
- 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/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 +70 -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.d.ts +120 -31
- package/dist/types/content.js +22 -1
- package/dist/types/content.js.map +1 -1
- 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 +10 -7
- 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 +16 -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/entrypoint.d.ts +5 -0
- package/dist/virtual/entrypoint.js +7 -0
- package/dist/virtual/entrypoint.js.map +1 -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 +40 -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/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 +31 -10
- package/scripts/clean-dist.js +7 -0
- package/scripts/copy-dts.js +11 -1
- 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/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/entry/content/core/AbstractMarker.js.map +0 -1
- package/dist/entry/content/core/AttributeMarker.js.map +0 -1
- 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.js.map +0 -1
- package/dist/entry/content/core/MarkerNode.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/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/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
- /package/dist/entry/content/core/{ManagedContext.js → context/ManagedContext.js} +0 -0
- /package/dist/entry/content/core/{AttributeMarker.js → markers/AttributeMarker.js} +0 -0
- /package/dist/entry/content/core/{WeakMarker.js → markers/WeakMarker.js} +0 -0
package/dist/types/relay.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { EntrypointOptions } from "./entrypoint.js";
|
|
2
|
-
import { ContentScriptConfig, ContentScriptContext, ContentScriptDefinition } from "./content.js";
|
|
3
|
-
import { TransportConfig, TransportDefinition, TransportType, type TransportProxyTarget } from "./transport.js";
|
|
2
|
+
import { ContentScriptConfig, ContentScriptContext, ContentScriptDefinition, ContentScriptEntrypointOptions } from "./content.js";
|
|
3
|
+
import { TransportConfig, TransportDefinition, TransportType, type TransportProxyTarget, type TransportTarget } from "./transport.js";
|
|
4
4
|
import { Awaiter } from "./helpers.js";
|
|
5
5
|
import type { MessageError } from "./message.js";
|
|
6
|
-
import type { RelayRegistry } from "../relay/index.js";
|
|
7
6
|
export declare const RelayGlobalKey = "adnbnRelay";
|
|
8
7
|
export declare enum RelayMethod {
|
|
9
8
|
Scripting = "scripting",
|
|
@@ -28,6 +27,13 @@ export declare enum RelayFrameErrorKind {
|
|
|
28
27
|
TargetGone = "target-gone",
|
|
29
28
|
Unobservable = "unobservable"
|
|
30
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Empty because relay names and contracts belong to the consuming application.
|
|
32
|
+
* Generated `.adnbn/relay.d.ts` declarations populate it by augmenting `adnbn/relay`.
|
|
33
|
+
*/
|
|
34
|
+
export interface RelayRegistry {
|
|
35
|
+
}
|
|
36
|
+
export type RelayName = Extract<keyof RelayRegistry, string>;
|
|
31
37
|
export type RelayNonEmptyReadonlyArray<T> = readonly [T, ...T[]];
|
|
32
38
|
export interface RelayExecutionOptions {
|
|
33
39
|
/** Maximum execution time per addressed Messaging frame or for the Inject Script operation. */
|
|
@@ -130,6 +136,7 @@ export type RelayBatchRpcProxy<T> = {
|
|
|
130
136
|
[K in keyof T]: T[K] extends (...args: any[]) => any ? (...args: Parameters<T[K]>) => Promise<RelayFramesResult<Awaited<ReturnType<T[K]>>>> : T[K] extends object ? RelayBatchRpcProxyObject<T[K]> : () => Promise<RelayFramesResult<Awaited<T[K]>>>;
|
|
131
137
|
};
|
|
132
138
|
export type RelayBatchRpcProxyObject<T> = (() => Promise<RelayFramesResult<Awaited<T>>>) & RelayBatchRpcProxy<T>;
|
|
139
|
+
export type RelayTarget<N extends keyof RelayRegistry> = TransportTarget<RelayRegistry, N>;
|
|
133
140
|
export type RelayProxyTarget<N extends keyof RelayRegistry> = TransportProxyTarget<RelayRegistry, N>;
|
|
134
141
|
export type RelayBatchProxyTarget<N extends keyof RelayRegistry> = RelayBatchRpcProxy<RelayRegistry[N]>;
|
|
135
142
|
export interface RelayConfig extends TransportConfig, Omit<ContentScriptConfig, "allFrames"> {
|
|
@@ -138,10 +145,12 @@ export interface RelayConfig extends TransportConfig, Omit<ContentScriptConfig,
|
|
|
138
145
|
}
|
|
139
146
|
export type RelayOptions = RelayConfig & EntrypointOptions;
|
|
140
147
|
export type RelayOptionsMap = Map<string, RelayOptions>;
|
|
141
|
-
export type RelayEntrypointOptions = Partial<RelayOptions>;
|
|
148
|
+
export type RelayEntrypointOptions = Partial<RelayOptions> & Pick<ContentScriptEntrypointOptions, "isolation">;
|
|
142
149
|
export type RelayMainHandler<T extends TransportType> = (relay: T, context: ContentScriptContext, options: RelayEntrypointOptions) => Awaiter<void>;
|
|
143
|
-
|
|
150
|
+
type RelayContentDefinition<T = ContentScriptDefinition> = T extends unknown ? Omit<T, "main" | "allFrames"> : never;
|
|
151
|
+
export type RelayDefinition<T extends TransportType> = Omit<TransportDefinition<RelayOptions, T>, "main"> & RelayContentDefinition & Partial<RelayOptions> & {
|
|
144
152
|
main?: RelayMainHandler<T>;
|
|
145
|
-
}
|
|
146
|
-
|
|
153
|
+
};
|
|
154
|
+
/** Internal, merged runtime input. The public definition retains its discriminated union. */
|
|
155
|
+
export type RelayUnresolvedDefinition<T extends TransportType> = Partial<Omit<RelayDefinition<T>, never>>;
|
|
147
156
|
export {};
|
package/dist/types/relay.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/relay.ts"],"sourcesContent":["import {EntrypointOptions} from \"@typing/entrypoint\";\nimport {ContentScriptConfig
|
|
1
|
+
{"version":3,"sources":["../../src/types/relay.ts"],"sourcesContent":["import {EntrypointOptions} from \"@typing/entrypoint\";\nimport {\n ContentScriptConfig,\n ContentScriptContext,\n ContentScriptDefinition,\n ContentScriptEntrypointOptions,\n} from \"@typing/content\";\nimport {\n TransportConfig,\n TransportDefinition,\n TransportType,\n type TransportProxyTarget,\n type TransportTarget,\n} from \"@typing/transport\";\nimport {Awaiter} from \"@typing/helpers\";\nimport type {MessageError} from \"@typing/message\";\n\nexport const RelayGlobalKey = \"adnbnRelay\";\n\nexport enum RelayMethod {\n Scripting = \"scripting\",\n Messaging = \"messaging\",\n}\n\nexport enum RelayAllFrames {\n /**\n * Executes the method in every frame reached by the selected transport and returns one outcome:\n * Scripting prefers a fulfilled result, while Messaging returns the first response.\n *\n * Warning: mutating methods can execute in multiple frames even though only one outcome is returned.\n */\n Any = \"any\",\n\n /** Executes the method in every discovered frame and returns an outcome for each frame. */\n All = \"all\",\n}\n\nexport enum RelayFrameErrorKind {\n Remote = \"remote\",\n Execution = \"execution\",\n Delivery = \"delivery\",\n Timeout = \"timeout\",\n TargetGone = \"target-gone\",\n Unobservable = \"unobservable\",\n}\n\n/**\n * Empty because relay names and contracts belong to the consuming application.\n * Generated `.adnbn/relay.d.ts` declarations populate it by augmenting `adnbn/relay`.\n */\nexport interface RelayRegistry {}\n\nexport type RelayName = Extract<keyof RelayRegistry, string>;\n\nexport type RelayNonEmptyReadonlyArray<T> = readonly [T, ...T[]];\n\nexport interface RelayExecutionOptions {\n /** Maximum execution time per addressed Messaging frame or for the Inject Script operation. */\n timeoutMs?: number;\n}\n\ninterface RelayTargetBase extends RelayExecutionOptions {\n tabId: number;\n}\n\nexport interface RelayTopFrameOptions extends RelayTargetBase {\n allFrames?: false;\n frameId?: never;\n frameIds?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport interface RelayFrameOptions extends RelayTargetBase {\n frameId: number;\n allFrames?: never;\n frameIds?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport interface RelayFramesOptions extends RelayTargetBase {\n frameIds: RelayNonEmptyReadonlyArray<number>;\n allFrames?: never;\n frameId?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport interface RelayDocumentOptions extends RelayTargetBase {\n documentId: string;\n allFrames?: never;\n frameId?: never;\n frameIds?: never;\n documentIds?: never;\n}\n\nexport interface RelayDocumentsOptions extends RelayTargetBase {\n documentIds: RelayNonEmptyReadonlyArray<string>;\n allFrames?: never;\n frameId?: never;\n frameIds?: never;\n documentId?: never;\n}\n\n/**\n * Broadcasts the call to all frames without requiring an exhaustive frame list and returns one outcome.\n * `true` is an alias for `RelayAllFrames.Any`.\n *\n * Warning: mutating methods can execute in multiple frames even though only one outcome is returned.\n */\nexport interface RelayAnyFramesOptions extends RelayTargetBase {\n allFrames: true | RelayAllFrames.Any;\n frameId?: never;\n frameIds?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport interface RelayEveryFrameOptions extends RelayTargetBase {\n allFrames: RelayAllFrames.All;\n frameId?: never;\n frameIds?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport type RelayAllFramesOptions = RelayAnyFramesOptions | RelayEveryFrameOptions;\n\nexport type RelayScalarOptions = RelayTopFrameOptions | RelayFrameOptions | RelayDocumentOptions;\n\nexport type RelayBatchOptions = RelayFramesOptions | RelayDocumentsOptions | RelayAllFramesOptions;\n\nexport type RelayCallOptions = RelayScalarOptions | RelayBatchOptions;\n\nexport type RelayAddressTarget =\n | {\n tabId: number;\n frameId: number;\n documentId?: string;\n allFrames?: never;\n }\n | {\n tabId: number;\n frameId?: never;\n documentId: string;\n allFrames?: never;\n };\n\nexport type RelayOperationTarget = {\n tabId: number;\n allFrames: RelayAllFrames;\n frameId?: never;\n documentId?: never;\n};\n\nexport type RelayResultTarget = RelayAddressTarget | RelayOperationTarget;\n\nexport interface RelayFrameError extends MessageError {\n kind: RelayFrameErrorKind;\n}\n\nexport type RelayFrameResult<T> =\n | {\n target: RelayResultTarget;\n status: \"fulfilled\";\n result: T;\n }\n | {\n target: RelayResultTarget;\n status: \"rejected\";\n error: RelayFrameError;\n };\n\nexport type RelayFramesResult<T> = readonly RelayFrameResult<T>[];\n\nexport type RelayBatchRpcProxy<T> = {\n [K in keyof T]: T[K] extends (...args: any[]) => any\n ? (...args: Parameters<T[K]>) => Promise<RelayFramesResult<Awaited<ReturnType<T[K]>>>>\n : T[K] extends object\n ? RelayBatchRpcProxyObject<T[K]>\n : () => Promise<RelayFramesResult<Awaited<T[K]>>>;\n};\n\nexport type RelayBatchRpcProxyObject<T> = (() => Promise<RelayFramesResult<Awaited<T>>>) & RelayBatchRpcProxy<T>;\n\nexport type RelayTarget<N extends keyof RelayRegistry> = TransportTarget<RelayRegistry, N>;\n\nexport type RelayProxyTarget<N extends keyof RelayRegistry> = TransportProxyTarget<RelayRegistry, N>;\n\nexport type RelayBatchProxyTarget<N extends keyof RelayRegistry> = RelayBatchRpcProxy<RelayRegistry[N]>;\n\nexport interface RelayConfig extends TransportConfig, Omit<ContentScriptConfig, \"allFrames\"> {\n allFrames?: boolean | RelayAllFrames;\n method?: RelayMethod;\n}\n\nexport type RelayOptions = RelayConfig & EntrypointOptions;\n\nexport type RelayOptionsMap = Map<string, RelayOptions>;\n\nexport type RelayEntrypointOptions = Partial<RelayOptions> & Pick<ContentScriptEntrypointOptions, \"isolation\">;\n\nexport type RelayMainHandler<T extends TransportType> = (\n relay: T,\n context: ContentScriptContext,\n options: RelayEntrypointOptions\n) => Awaiter<void>;\n\ntype RelayContentDefinition<T = ContentScriptDefinition> = T extends unknown ? Omit<T, \"main\" | \"allFrames\"> : never;\n\nexport type RelayDefinition<T extends TransportType> = Omit<TransportDefinition<RelayOptions, T>, \"main\"> &\n RelayContentDefinition &\n Partial<RelayOptions> & {\n main?: RelayMainHandler<T>;\n };\n\n/** Internal, merged runtime input. The public definition retains its discriminated union. */\nexport type RelayUnresolvedDefinition<T extends TransportType> = Partial<Omit<RelayDefinition<T>, never>>;\n"],"mappings":"AAiBO,MAAM,iBAAiB;AAEvB,IAAK,cAAL,kBAAKA,iBAAL;AACH,EAAAA,aAAA,eAAY;AACZ,EAAAA,aAAA,eAAY;AAFJ,SAAAA;AAAA,GAAA;AAKL,IAAK,iBAAL,kBAAKC,oBAAL;AAOH,EAAAA,gBAAA,SAAM;AAGN,EAAAA,gBAAA,SAAM;AAVE,SAAAA;AAAA,GAAA;AAaL,IAAK,sBAAL,kBAAKC,yBAAL;AACH,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,eAAY;AACZ,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,aAAU;AACV,EAAAA,qBAAA,gBAAa;AACb,EAAAA,qBAAA,kBAAe;AANP,SAAAA;AAAA,GAAA;","names":["RelayMethod","RelayAllFrames","RelayFrameErrorKind"]}
|
package/dist/types/sandbox.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { TransportConfig, TransportDefinition, TransportType } from "./transport
|
|
|
2
2
|
import { ViewOptions } from "./view.js";
|
|
3
3
|
import { Awaiter } from "./helpers.js";
|
|
4
4
|
import { MessageError, MessageSender } from "./message.js";
|
|
5
|
+
import type { RpcAsyncProxy } from "./rpc.js";
|
|
5
6
|
export declare const SandboxGlobalKey = "adnbnSandbox";
|
|
6
7
|
export declare const SandboxGlobalAccess = "adnbnSandboxAccess";
|
|
7
8
|
export declare const SandboxNamespace = "adnbn:sandbox";
|
|
@@ -23,6 +24,16 @@ export declare enum SandboxSource {
|
|
|
23
24
|
Blob = "blob:",
|
|
24
25
|
UnsafeInline = "'unsafe-inline'"
|
|
25
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Empty because sandbox names and contracts belong to the consuming application.
|
|
29
|
+
* Generated `.adnbn/sandbox.d.ts` declarations populate it by augmenting `adnbn/sandbox`.
|
|
30
|
+
*/
|
|
31
|
+
export interface SandboxRegistry {
|
|
32
|
+
}
|
|
33
|
+
export type SandboxName = Extract<keyof SandboxRegistry, string>;
|
|
34
|
+
export type SandboxProxyTarget<N extends keyof SandboxRegistry> = RpcAsyncProxy<SandboxRegistry[N]>;
|
|
35
|
+
export type SandboxAlias = string;
|
|
36
|
+
export type SandboxMap = Map<SandboxAlias, SandboxParameters>;
|
|
26
37
|
export interface SandboxCspSources {
|
|
27
38
|
connect?: Array<SandboxSource | `${SandboxSource}`>;
|
|
28
39
|
image?: Array<SandboxSource | `${SandboxSource}`>;
|
|
@@ -56,6 +67,7 @@ export type SandboxUnresolvedDefinition<T extends TransportType> = Partial<Sandb
|
|
|
56
67
|
export type SandboxParameters = {
|
|
57
68
|
url: string;
|
|
58
69
|
} & Pick<SandboxConfig, "readyTimeout" | "requestTimeout" | "removeOnRequestTimeout">;
|
|
70
|
+
export type SandboxParametersMap = Record<string, SandboxParameters>;
|
|
59
71
|
export interface SandboxReadyMessage {
|
|
60
72
|
type: typeof SandboxReadyMessageType;
|
|
61
73
|
channel: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/sandbox.ts"],"sourcesContent":["import {TransportConfig, TransportDefinition, TransportType} from \"@typing/transport\";\nimport {ViewOptions} from \"@typing/view\";\nimport {Awaiter} from \"@typing/helpers\";\nimport {MessageError, MessageSender} from \"@typing/message\";\n\nexport const SandboxGlobalKey = \"adnbnSandbox\";\nexport const SandboxGlobalAccess = \"adnbnSandboxAccess\";\nexport const SandboxNamespace = \"adnbn:sandbox\";\nexport const SandboxReadyMessageType = `${SandboxNamespace}:ready`;\nexport const SandboxRequestMessageType = `${SandboxNamespace}:request`;\nexport const SandboxResponseMessageType = `${SandboxNamespace}:response`;\n\nexport enum SandboxAllow {\n Forms = \"forms\",\n Popups = \"popups\",\n Modals = \"modals\",\n Downloads = \"downloads\",\n PointerLock = \"pointer-lock\",\n TopNavigationByUserActivation = \"top-navigation-by-user-activation\",\n}\n\nexport enum SandboxSource {\n Self = \"'self'\",\n None = \"'none'\",\n Data = \"data:\",\n Blob = \"blob:\",\n UnsafeInline = \"'unsafe-inline'\",\n}\n\nexport interface SandboxCspSources {\n connect?: Array<SandboxSource | `${SandboxSource}`>;\n image?: Array<SandboxSource | `${SandboxSource}`>;\n style?: Array<SandboxSource | `${SandboxSource}`>;\n font?: Array<SandboxSource | `${SandboxSource}`>;\n media?: Array<SandboxSource | `${SandboxSource}`>;\n worker?: Array<SandboxSource | `${SandboxSource}`>;\n child?: Array<SandboxSource | `${SandboxSource}`>;\n}\n\nexport interface SandboxCspConfig {\n eval?: boolean;\n inline?: boolean;\n allow?: Array<SandboxAllow | `${SandboxAllow}`>;\n sources?: SandboxCspSources;\n}\n\nexport interface SandboxCspOptions {\n csp?: SandboxCspConfig;\n}\n\nexport interface SandboxConfig extends TransportConfig {\n readyTimeout?: number;\n requestTimeout?: number;\n removeOnRequestTimeout?: boolean;\n}\n\nexport type SandboxOptions = SandboxConfig & SandboxCspOptions & ViewOptions;\n\nexport type SandboxEntrypointOptions = Partial<SandboxOptions>;\n\nexport type SandboxMainHandler<T extends TransportType> = (\n sandbox: T,\n options: SandboxEntrypointOptions\n) => Awaiter<void>;\n\nexport interface SandboxDefinition<T extends TransportType>\n extends TransportDefinition<SandboxOptions, T>, SandboxEntrypointOptions {\n main?: SandboxMainHandler<T>;\n}\n\nexport type SandboxUnresolvedDefinition<T extends TransportType> = Partial<SandboxDefinition<T>>;\n\nexport type SandboxParameters = {url: string} & Pick<\n SandboxConfig,\n \"readyTimeout\" | \"requestTimeout\" | \"removeOnRequestTimeout\"\n>;\n\nexport interface SandboxReadyMessage {\n type: typeof SandboxReadyMessageType;\n channel: string;\n name: string;\n}\n\nexport interface SandboxRequestMessage {\n type: typeof SandboxRequestMessageType;\n channel: string;\n name: string;\n requestId: string;\n path?: string;\n args: any[];\n}\n\nexport interface SandboxResponseMessage {\n type: typeof SandboxResponseMessageType;\n channel: string;\n name: string;\n requestId: string;\n ok: boolean;\n payload?: any;\n error?: MessageError;\n}\n\nexport type SandboxEnvelope = SandboxRequestMessage | SandboxResponseMessage;\n\n/**\n * Internal seam for the sandbox wire. Lives below `SandboxMessage`, invisible to callers.\n *\n * - `connect` establishes the channel (host: create the iframe and await the ready\n * handshake; sandbox/in-memory: resolves immediately). Must be idempotent — concurrent\n * callers share one connection.\n * - `post` sends one already-built envelope to the peer.\n * - `subscribe` attaches exactly one underlying listener and returns its remover.\n * - `dispose` tears the channel down (remove listener, drop the iframe).\n */\nexport interface SandboxPort {\n connect(): Promise<void>;\n\n post(message: SandboxEnvelope): void;\n\n subscribe(onMessage: (message: SandboxEnvelope, sender: MessageSender) => void): () => void;\n\n dispose(): void;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/types/sandbox.ts"],"sourcesContent":["import {TransportConfig, TransportDefinition, TransportType} from \"@typing/transport\";\nimport {ViewOptions} from \"@typing/view\";\nimport {Awaiter} from \"@typing/helpers\";\nimport {MessageError, MessageSender} from \"@typing/message\";\nimport type {RpcAsyncProxy} from \"@typing/rpc\";\n\nexport const SandboxGlobalKey = \"adnbnSandbox\";\n\nexport const SandboxGlobalAccess = \"adnbnSandboxAccess\";\n\nexport const SandboxNamespace = \"adnbn:sandbox\";\n\nexport const SandboxReadyMessageType = `${SandboxNamespace}:ready`;\n\nexport const SandboxRequestMessageType = `${SandboxNamespace}:request`;\n\nexport const SandboxResponseMessageType = `${SandboxNamespace}:response`;\n\nexport enum SandboxAllow {\n Forms = \"forms\",\n Popups = \"popups\",\n Modals = \"modals\",\n Downloads = \"downloads\",\n PointerLock = \"pointer-lock\",\n TopNavigationByUserActivation = \"top-navigation-by-user-activation\",\n}\n\nexport enum SandboxSource {\n Self = \"'self'\",\n None = \"'none'\",\n Data = \"data:\",\n Blob = \"blob:\",\n UnsafeInline = \"'unsafe-inline'\",\n}\n\n/**\n * Empty because sandbox names and contracts belong to the consuming application.\n * Generated `.adnbn/sandbox.d.ts` declarations populate it by augmenting `adnbn/sandbox`.\n */\nexport interface SandboxRegistry {}\n\nexport type SandboxName = Extract<keyof SandboxRegistry, string>;\n\nexport type SandboxProxyTarget<N extends keyof SandboxRegistry> = RpcAsyncProxy<SandboxRegistry[N]>;\n\nexport type SandboxAlias = string;\n\nexport type SandboxMap = Map<SandboxAlias, SandboxParameters>;\n\nexport interface SandboxCspSources {\n connect?: Array<SandboxSource | `${SandboxSource}`>;\n image?: Array<SandboxSource | `${SandboxSource}`>;\n style?: Array<SandboxSource | `${SandboxSource}`>;\n font?: Array<SandboxSource | `${SandboxSource}`>;\n media?: Array<SandboxSource | `${SandboxSource}`>;\n worker?: Array<SandboxSource | `${SandboxSource}`>;\n child?: Array<SandboxSource | `${SandboxSource}`>;\n}\n\nexport interface SandboxCspConfig {\n eval?: boolean;\n inline?: boolean;\n allow?: Array<SandboxAllow | `${SandboxAllow}`>;\n sources?: SandboxCspSources;\n}\n\nexport interface SandboxCspOptions {\n csp?: SandboxCspConfig;\n}\n\nexport interface SandboxConfig extends TransportConfig {\n readyTimeout?: number;\n requestTimeout?: number;\n removeOnRequestTimeout?: boolean;\n}\n\nexport type SandboxOptions = SandboxConfig & SandboxCspOptions & ViewOptions;\n\nexport type SandboxEntrypointOptions = Partial<SandboxOptions>;\n\nexport type SandboxMainHandler<T extends TransportType> = (\n sandbox: T,\n options: SandboxEntrypointOptions\n) => Awaiter<void>;\n\nexport interface SandboxDefinition<T extends TransportType>\n extends TransportDefinition<SandboxOptions, T>, SandboxEntrypointOptions {\n main?: SandboxMainHandler<T>;\n}\n\nexport type SandboxUnresolvedDefinition<T extends TransportType> = Partial<SandboxDefinition<T>>;\n\nexport type SandboxParameters = {url: string} & Pick<\n SandboxConfig,\n \"readyTimeout\" | \"requestTimeout\" | \"removeOnRequestTimeout\"\n>;\n\nexport type SandboxParametersMap = Record<string, SandboxParameters>;\n\nexport interface SandboxReadyMessage {\n type: typeof SandboxReadyMessageType;\n channel: string;\n name: string;\n}\n\nexport interface SandboxRequestMessage {\n type: typeof SandboxRequestMessageType;\n channel: string;\n name: string;\n requestId: string;\n path?: string;\n args: any[];\n}\n\nexport interface SandboxResponseMessage {\n type: typeof SandboxResponseMessageType;\n channel: string;\n name: string;\n requestId: string;\n ok: boolean;\n payload?: any;\n error?: MessageError;\n}\n\nexport type SandboxEnvelope = SandboxRequestMessage | SandboxResponseMessage;\n\n/**\n * Internal seam for the sandbox wire. Lives below `SandboxMessage`, invisible to callers.\n *\n * - `connect` establishes the channel (host: create the iframe and await the ready\n * handshake; sandbox/in-memory: resolves immediately). Must be idempotent — concurrent\n * callers share one connection.\n * - `post` sends one already-built envelope to the peer.\n * - `subscribe` attaches exactly one underlying listener and returns its remover.\n * - `dispose` tears the channel down (remove listener, drop the iframe).\n */\nexport interface SandboxPort {\n connect(): Promise<void>;\n\n post(message: SandboxEnvelope): void;\n\n subscribe(onMessage: (message: SandboxEnvelope, sender: MessageSender) => void): () => void;\n\n dispose(): void;\n}\n"],"mappings":"AAMO,MAAM,mBAAmB;AAEzB,MAAM,sBAAsB;AAE5B,MAAM,mBAAmB;AAEzB,MAAM,0BAA0B,GAAG,gBAAgB;AAEnD,MAAM,4BAA4B,GAAG,gBAAgB;AAErD,MAAM,6BAA6B,GAAG,gBAAgB;AAEtD,IAAK,eAAL,kBAAKA,kBAAL;AACH,EAAAA,cAAA,WAAQ;AACR,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,eAAY;AACZ,EAAAA,cAAA,iBAAc;AACd,EAAAA,cAAA,mCAAgC;AANxB,SAAAA;AAAA,GAAA;AASL,IAAK,gBAAL,kBAAKC,mBAAL;AACH,EAAAA,eAAA,UAAO;AACP,EAAAA,eAAA,UAAO;AACP,EAAAA,eAAA,UAAO;AACP,EAAAA,eAAA,UAAO;AACP,EAAAA,eAAA,kBAAe;AALP,SAAAA;AAAA,GAAA;","names":["SandboxAllow","SandboxSource"]}
|
package/dist/types/service.d.ts
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { BackgroundConfig } from "./background.js";
|
|
2
2
|
import { EntrypointOptions } from "./entrypoint.js";
|
|
3
|
-
import { TransportConfig, TransportDefinition, TransportType } from "./transport.js";
|
|
3
|
+
import { TransportConfig, TransportDefinition, TransportProxyTarget, TransportTarget, TransportType } from "./transport.js";
|
|
4
4
|
export declare const ServiceGlobalKey = "adnbnService";
|
|
5
|
+
/**
|
|
6
|
+
* Empty because service names and contracts belong to the consuming application.
|
|
7
|
+
* Generated `.adnbn/service.d.ts` declarations populate it by augmenting `adnbn/service`.
|
|
8
|
+
*/
|
|
9
|
+
export interface ServiceRegistry {
|
|
10
|
+
}
|
|
11
|
+
export type ServiceName = Extract<keyof ServiceRegistry, string>;
|
|
12
|
+
export type ServiceTarget<N extends keyof ServiceRegistry> = TransportTarget<ServiceRegistry, N>;
|
|
13
|
+
export type ServiceProxyTarget<N extends keyof ServiceRegistry> = TransportProxyTarget<ServiceRegistry, N>;
|
|
5
14
|
export type ServiceConfig = TransportConfig & BackgroundConfig;
|
|
6
15
|
export type ServiceOptions = ServiceConfig & EntrypointOptions;
|
|
7
16
|
export type ServiceEntrypointOptions = Partial<ServiceOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/service.ts"],"sourcesContent":["import {BackgroundConfig} from \"@typing/background\";\nimport {EntrypointOptions} from \"@typing/entrypoint\";\nimport {TransportConfig
|
|
1
|
+
{"version":3,"sources":["../../src/types/service.ts"],"sourcesContent":["import {BackgroundConfig} from \"@typing/background\";\nimport {EntrypointOptions} from \"@typing/entrypoint\";\nimport {\n TransportConfig,\n TransportDefinition,\n TransportProxyTarget,\n TransportTarget,\n TransportType,\n} from \"@typing/transport\";\n\nexport const ServiceGlobalKey = \"adnbnService\";\n\n/**\n * Empty because service names and contracts belong to the consuming application.\n * Generated `.adnbn/service.d.ts` declarations populate it by augmenting `adnbn/service`.\n */\nexport interface ServiceRegistry {}\n\nexport type ServiceName = Extract<keyof ServiceRegistry, string>;\n\nexport type ServiceTarget<N extends keyof ServiceRegistry> = TransportTarget<ServiceRegistry, N>;\n\nexport type ServiceProxyTarget<N extends keyof ServiceRegistry> = TransportProxyTarget<ServiceRegistry, N>;\n\nexport type ServiceConfig = TransportConfig & BackgroundConfig;\n\nexport type ServiceOptions = ServiceConfig & EntrypointOptions;\n\nexport type ServiceEntrypointOptions = Partial<ServiceOptions>;\n\nexport type ServiceDefinition<T extends TransportType> = TransportDefinition<ServiceOptions, T> &\n ServiceEntrypointOptions;\n\nexport type ServiceUnresolvedDefinition<T extends TransportType> = Partial<ServiceDefinition<T>>;\n"],"mappings":"AAUO,MAAM,mBAAmB;","names":[]}
|
package/dist/types/sidebar.d.ts
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { ViewDefinition, ViewOptions } from "./view.js";
|
|
2
2
|
import { Browser } from "./browser.js";
|
|
3
3
|
import { CspOptions } from "./csp.js";
|
|
4
|
+
import type { ManifestSidebar } from "./manifest.js";
|
|
4
5
|
export declare const SidebarAlternativeBrowsers: ReadonlySet<Browser>;
|
|
6
|
+
/**
|
|
7
|
+
* Empty because sidebar aliases depend on the consuming application's entrypoints.
|
|
8
|
+
* Generated `.adnbn/sidebar.d.ts` declarations augment `adnbn`, adding discovered aliases as keys with value `true`.
|
|
9
|
+
*/
|
|
10
|
+
export interface SidebarAliasRegistry {
|
|
11
|
+
}
|
|
12
|
+
export type SidebarAlias = keyof SidebarAliasRegistry extends never ? string : Extract<keyof SidebarAliasRegistry, string>;
|
|
13
|
+
export type SidebarMap = Map<SidebarAlias, ManifestSidebar>;
|
|
5
14
|
export interface SidebarConfig {
|
|
6
15
|
icon?: string;
|
|
7
16
|
apply?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/sidebar.ts"],"sourcesContent":["import {ViewDefinition, ViewOptions} from \"@typing/view\";\nimport {Browser} from \"@typing/browser\";\nimport {CspOptions} from \"@typing/csp\";\n\nexport const SidebarAlternativeBrowsers: ReadonlySet<Browser> = new Set([Browser.Opera, Browser.Firefox]);\n\nexport interface SidebarConfig {\n icon?: string;\n apply?: boolean;\n}\n\nexport type SidebarEntrypointOptions = SidebarConfig & CspOptions & ViewOptions;\n\nexport type SidebarProps = SidebarEntrypointOptions;\n\nexport type SidebarDefinition = SidebarEntrypointOptions & ViewDefinition<SidebarProps>;\n"],"mappings":"AACA,SAAQ,eAAc;
|
|
1
|
+
{"version":3,"sources":["../../src/types/sidebar.ts"],"sourcesContent":["import {ViewDefinition, ViewOptions} from \"@typing/view\";\nimport {Browser} from \"@typing/browser\";\nimport {CspOptions} from \"@typing/csp\";\nimport type {ManifestSidebar} from \"@typing/manifest\";\n\nexport const SidebarAlternativeBrowsers: ReadonlySet<Browser> = new Set([Browser.Opera, Browser.Firefox]);\n\n/**\n * Empty because sidebar aliases depend on the consuming application's entrypoints.\n * Generated `.adnbn/sidebar.d.ts` declarations augment `adnbn`, adding discovered aliases as keys with value `true`.\n */\nexport interface SidebarAliasRegistry {}\n\nexport type SidebarAlias = keyof SidebarAliasRegistry extends never\n ? string\n : Extract<keyof SidebarAliasRegistry, string>;\n\nexport type SidebarMap = Map<SidebarAlias, ManifestSidebar>;\n\nexport interface SidebarConfig {\n icon?: string;\n apply?: boolean;\n}\n\nexport type SidebarEntrypointOptions = SidebarConfig & CspOptions & ViewOptions;\n\nexport type SidebarProps = SidebarEntrypointOptions;\n\nexport type SidebarDefinition = SidebarEntrypointOptions & ViewDefinition<SidebarProps>;\n"],"mappings":"AACA,SAAQ,eAAc;AAIf,MAAM,6BAAmD,oBAAI,IAAI,CAAC,QAAQ,OAAO,QAAQ,OAAO,CAAC;","names":[]}
|
|
@@ -29,6 +29,10 @@ export interface TransportReceiver {
|
|
|
29
29
|
export interface TransportSender {
|
|
30
30
|
send(data: TransportMessageData, options?: MessageSendOptions): any;
|
|
31
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Combines message sending and receiving without introducing additional members.
|
|
34
|
+
* Its members are inherited from TransportSender and TransportReceiver, rather than generated or augmented.
|
|
35
|
+
*/
|
|
32
36
|
export interface TransportMessage extends TransportSender, TransportReceiver {
|
|
33
37
|
}
|
|
34
38
|
export interface TransportProvider<T extends TransportType> {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { EntrypointAssets, EntrypointAssetsMap } from "../types/entrypoint.js";
|
|
2
|
+
/** Package fallback; extension builds provide access to their own bundler runtime. */
|
|
3
|
+
export declare const readAssets: () => EntrypointAssets | undefined;
|
|
4
|
+
/** Package fallback; the complete map is supplied only by a consuming background runtime. */
|
|
5
|
+
export declare const readAssetsMap: () => EntrypointAssetsMap | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/virtual/entrypoint.ts"],"sourcesContent":["import type {EntrypointAssets, EntrypointAssetsMap} from \"@typing/entrypoint\";\n\n/** Package fallback; extension builds provide access to their own bundler runtime. */\nexport const readAssets = (): EntrypointAssets | undefined => undefined;\n\n/** Package fallback; the complete map is supplied only by a consuming background runtime. */\nexport const readAssetsMap = (): EntrypointAssetsMap | undefined => undefined;\n"],"mappings":"AAGO,MAAM,aAAa,MAAoC;AAGvD,MAAM,gBAAgB,MAAuC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/virtual/icon.ts"],"sourcesContent":["/** Package fallback; extension builds supply #adnbn/icon as a generated module. */\nexport const groups: Record<string, Record<number, string>> = {};\n"],"mappings":"AACO,MAAM,SAAiD,CAAC;","names":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Language, type LocaleCatalogue } from "../types/locale.js";
|
|
2
|
+
/** Package fallback; extension builds supply #adnbn/locale as a generated module. */
|
|
3
|
+
declare const catalogue: LocaleCatalogue;
|
|
4
|
+
export declare const lang: Language;
|
|
5
|
+
export declare const keys: readonly string[];
|
|
6
|
+
export declare const languages: readonly Language[];
|
|
7
|
+
export default catalogue;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Language } from "./../types/locale.js";
|
|
2
|
+
const catalogue = {};
|
|
3
|
+
const lang = Language.English;
|
|
4
|
+
const keys = [];
|
|
5
|
+
const languages = [];
|
|
6
|
+
var locale_default = catalogue;
|
|
7
|
+
export {
|
|
8
|
+
locale_default as default,
|
|
9
|
+
keys,
|
|
10
|
+
lang,
|
|
11
|
+
languages
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=locale.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/virtual/locale.ts"],"sourcesContent":["import {Language, type LocaleCatalogue} from \"@typing/locale\";\n\n/** Package fallback; extension builds supply #adnbn/locale as a generated module. */\nconst catalogue: LocaleCatalogue = {};\n\nexport const lang: Language = Language.English;\nexport const keys: readonly string[] = [];\nexport const languages: readonly Language[] = [];\n\nexport default catalogue;\n"],"mappings":"AAAA,SAAQ,gBAAqC;AAG7C,MAAM,YAA6B,CAAC;AAE7B,MAAM,OAAiB,SAAS;AAChC,MAAM,OAA0B,CAAC;AACjC,MAAM,YAAiC,CAAC;AAE/C,IAAO,iBAAQ;","names":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
declare module "#adnbn/locale" {
|
|
2
|
+
const catalogue: typeof import("./locale.js").default;
|
|
3
|
+
export const lang: typeof import("./locale.js").lang;
|
|
4
|
+
export const keys: typeof import("./locale.js").keys;
|
|
5
|
+
export const languages: typeof import("./locale.js").languages;
|
|
6
|
+
export default catalogue;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare module "#adnbn/page" {
|
|
10
|
+
export const aliases: typeof import("./page.js").aliases;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare module "#adnbn/entrypoint" {
|
|
14
|
+
export const readAssets: typeof import("./entrypoint.js").readAssets;
|
|
15
|
+
export const readAssetsMap: typeof import("./entrypoint.js").readAssetsMap;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare module "#adnbn/relay" {
|
|
19
|
+
export const options: typeof import("./relay.js").options;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare module "#adnbn/popup" {
|
|
23
|
+
export const aliases: typeof import("./popup.js").aliases;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
declare module "#adnbn/sidebar" {
|
|
27
|
+
export const aliases: typeof import("./sidebar.js").aliases;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
declare module "#adnbn/offscreen" {
|
|
31
|
+
export const parameters: typeof import("./offscreen.js").parameters;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare module "#adnbn/sandbox" {
|
|
35
|
+
export const parameters: typeof import("./sandbox.js").parameters;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare module "#adnbn/icon" {
|
|
39
|
+
export const groups: typeof import("./icon.js").groups;
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/virtual/offscreen.ts"],"sourcesContent":["import type {OffscreenParametersMap} from \"@typing/offscreen\";\n\n/** Package fallback; extension builds supply #adnbn/offscreen as a generated module. */\nexport const parameters: OffscreenParametersMap = {};\n"],"mappings":"AAGO,MAAM,aAAqC,CAAC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/virtual/page.ts"],"sourcesContent":["/** Package fallback; extension builds supply #adnbn/page as a generated module. */\nexport const aliases: Record<string, string> = {};\n"],"mappings":"AACO,MAAM,UAAkC,CAAC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/virtual/popup.ts"],"sourcesContent":["import type {ManifestPopup} from \"@typing/manifest\";\n\n/** Package fallback; extension builds supply #adnbn/popup as a generated module. */\nexport const aliases: Record<string, ManifestPopup> = {};\n"],"mappings":"AAGO,MAAM,UAAyC,CAAC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/virtual/relay.ts"],"sourcesContent":["import type {RelayOptions} from \"@typing/relay\";\n\n/** Package fallback; extension builds supply #adnbn/relay as a generated module. */\nexport const options: Record<string, RelayOptions> = {};\n"],"mappings":"AAGO,MAAM,UAAwC,CAAC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/virtual/sandbox.ts"],"sourcesContent":["import type {SandboxParametersMap} from \"@typing/sandbox\";\n\n/** Package fallback; extension builds supply #adnbn/sandbox as a generated module. */\nexport const parameters: SandboxParametersMap = {};\n"],"mappings":"AAGO,MAAM,aAAmC,CAAC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/virtual/sidebar.ts"],"sourcesContent":["import type {ManifestSidebar} from \"@typing/manifest\";\n\n/** Package fallback; extension builds supply #adnbn/sidebar as a generated module. */\nexport const aliases: Record<string, ManifestSidebar> = {};\n"],"mappings":"AAGO,MAAM,UAA2C,CAAC;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adnbn",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.11.0",
|
|
5
5
|
"description": "Addon Bone - Cross-browser web extension framework with shared code base",
|
|
6
6
|
"homepage": "https://addonbone.com",
|
|
7
7
|
"author": "Anjey Tsibylskij (https://github.com/atldays)",
|
|
@@ -36,13 +36,16 @@
|
|
|
36
36
|
"scripts",
|
|
37
37
|
"types"
|
|
38
38
|
],
|
|
39
|
-
"sideEffects": false,
|
|
40
39
|
"engines": {
|
|
41
40
|
"node": ">=22.0.0"
|
|
42
41
|
},
|
|
43
42
|
"bin": {
|
|
44
43
|
"adnbn": "bin/adnbn.js"
|
|
45
44
|
},
|
|
45
|
+
"sideEffects": false,
|
|
46
|
+
"imports": {
|
|
47
|
+
"#adnbn/*": "./dist/virtual/*.js"
|
|
48
|
+
},
|
|
46
49
|
"exports": {
|
|
47
50
|
".": {
|
|
48
51
|
"types": "./dist/index.d.ts",
|
|
@@ -52,6 +55,10 @@
|
|
|
52
55
|
"types": "./dist/entry/*/index.d.ts",
|
|
53
56
|
"default": "./dist/entry/*/index.js"
|
|
54
57
|
},
|
|
58
|
+
"./entry/content/frame": {
|
|
59
|
+
"types": "./dist/entry/content/frame/index.d.ts",
|
|
60
|
+
"default": "./dist/entry/content/frame/index.js"
|
|
61
|
+
},
|
|
55
62
|
"./entry/content/*": {
|
|
56
63
|
"types": "./dist/entry/content/adapters/*/index.d.ts",
|
|
57
64
|
"default": "./dist/entry/content/adapters/*/index.js"
|
|
@@ -105,17 +112,21 @@
|
|
|
105
112
|
"prepare": "husky",
|
|
106
113
|
"preinstall": "npm run check:node-version",
|
|
107
114
|
"prepublishOnly": "npm run build",
|
|
108
|
-
"build": "tsup && tsc -p tsconfig.build.json && node ./scripts/copy-dts.js && tsc-alias -p tsconfig.build.json -f -fe .js",
|
|
115
|
+
"build": "node ./scripts/clean-dist.js && tsup && tsc -p tsconfig.build.json && node ./scripts/copy-dts.js && tsc-alias -p tsconfig.build.json -f -fe .js",
|
|
109
116
|
"format": "prettier --write .",
|
|
110
|
-
"typecheck": "tsc -p tsconfig.json --noEmit
|
|
111
|
-
"
|
|
117
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
118
|
+
"prepare:integration": "npm run build && tsx tests/integration/prepare.ts",
|
|
119
|
+
"typecheck:integration": "npm run prepare:integration && tsx tests/integration/typecheck.ts",
|
|
120
|
+
"test:integration": "npm run test -- --testPathPatterns=tests/integration --runInBand",
|
|
121
|
+
"test:integration:build": "npm run test -- --testPathPatterns=tests/integration/build --runInBand",
|
|
112
122
|
"check:node-version": "node ./scripts/check-node-version.js",
|
|
113
123
|
"test": "npm run build && jest",
|
|
114
124
|
"test:ci": "npm run test -- --ci --passWithNoTests --coverage",
|
|
115
125
|
"test:ci:non-browser": "npm run test -- --ci --passWithNoTests --coverage --testPathIgnorePatterns=tests/integration/browser",
|
|
116
126
|
"test:watch": "jest --watch --testPathIgnorePatterns=tests/integration/browser",
|
|
117
127
|
"test:offscreen": "jest --testPathPatterns=Offscreen",
|
|
118
|
-
"test:chrome": "npm run test -- --testPathPatterns=tests/integration/browser --runInBand",
|
|
128
|
+
"test:chrome": "npm run test -- --testPathPatterns=tests/integration/browser --testPathIgnorePatterns=firefox.integration.test --runInBand",
|
|
129
|
+
"test:firefox": "npm run test -- --testPathPatterns=firefox.integration.test --runInBand",
|
|
119
130
|
"test:message": "jest --testPathPatterns=src/message",
|
|
120
131
|
"test:service": "jest --testPathPatterns=Service",
|
|
121
132
|
"test:relay": "jest --testPathPatterns=Relay",
|
|
@@ -133,6 +144,7 @@
|
|
|
133
144
|
"@rsdoctor/rspack-plugin": "^1.5.1",
|
|
134
145
|
"@rspack/cli": "^1.7.5",
|
|
135
146
|
"@rspack/core": "^1.7.5",
|
|
147
|
+
"@rspack/lite-tapable": "^1.1.0",
|
|
136
148
|
"@svgr/webpack": "^8.1.0",
|
|
137
149
|
"await-lock": "^3.0.0",
|
|
138
150
|
"c12": "^3.3.2",
|
|
@@ -151,6 +163,7 @@
|
|
|
151
163
|
"pluralize": "^8.0.0",
|
|
152
164
|
"postcss": "^8.5.15",
|
|
153
165
|
"postcss-scss": "^4.0.9",
|
|
166
|
+
"postcss-value-parser": "^4.2.0",
|
|
154
167
|
"rspack-plugin-virtual-module": "^1.0.1",
|
|
155
168
|
"sass": "^1.83.4",
|
|
156
169
|
"sass-loader": "^16.0.4",
|
|
@@ -194,6 +207,8 @@
|
|
|
194
207
|
"jest-environment-jsdom": "^30.0.0",
|
|
195
208
|
"jest-webextension-mock": "^4.0.0",
|
|
196
209
|
"prettier": "^3.6.2",
|
|
210
|
+
"react": "^19.2.8",
|
|
211
|
+
"react-dom": "^19.2.8",
|
|
197
212
|
"release-it": "^19.2.3",
|
|
198
213
|
"ts-node": "10.9.2",
|
|
199
214
|
"tsc-alias": "^1.8.17",
|
|
@@ -207,10 +222,10 @@
|
|
|
207
222
|
},
|
|
208
223
|
"peerDependencies": {
|
|
209
224
|
"@types/chrome": "*",
|
|
210
|
-
"@types/react": "
|
|
211
|
-
"@types/react-dom": "
|
|
212
|
-
"react": "^
|
|
213
|
-
"react-dom": "^
|
|
225
|
+
"@types/react": "^18.0.0 || ^19.0.0",
|
|
226
|
+
"@types/react-dom": "^18.0.0 || ^19.0.0",
|
|
227
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
228
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
214
229
|
},
|
|
215
230
|
"peerDependenciesMeta": {
|
|
216
231
|
"@types/react": {
|
|
@@ -218,6 +233,12 @@
|
|
|
218
233
|
},
|
|
219
234
|
"@types/react-dom": {
|
|
220
235
|
"optional": true
|
|
236
|
+
},
|
|
237
|
+
"react": {
|
|
238
|
+
"optional": true
|
|
239
|
+
},
|
|
240
|
+
"react-dom": {
|
|
241
|
+
"optional": true
|
|
221
242
|
}
|
|
222
243
|
},
|
|
223
244
|
"overrides": {
|
package/scripts/copy-dts.js
CHANGED
|
@@ -7,7 +7,17 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
|
7
7
|
const root = join(__dirname, "..");
|
|
8
8
|
const distRoot = join(root, "dist");
|
|
9
9
|
|
|
10
|
-
const files = await globby(
|
|
10
|
+
const files = await globby(
|
|
11
|
+
[
|
|
12
|
+
"src/**/*.d.ts",
|
|
13
|
+
"!src/**/tests/**/*",
|
|
14
|
+
"!src/**/__tests__/**/*",
|
|
15
|
+
"!src/**/__mocks__/**/*",
|
|
16
|
+
"!src/**/*.test.d.ts",
|
|
17
|
+
"!src/**/*.spec.d.ts",
|
|
18
|
+
],
|
|
19
|
+
{cwd: root, dot: true}
|
|
20
|
+
);
|
|
11
21
|
|
|
12
22
|
for (const file of files) {
|
|
13
23
|
const rel = relative("src", file);
|
package/types/client.d.ts
CHANGED
|
@@ -309,3 +309,18 @@ declare module "*?asis" {
|
|
|
309
309
|
const src: string;
|
|
310
310
|
export default src;
|
|
311
311
|
}
|
|
312
|
+
|
|
313
|
+
declare module "*?isolation" {
|
|
314
|
+
const classes: Readonly<Record<string, string>>;
|
|
315
|
+
export default classes;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
declare module "*?isolation&asis" {
|
|
319
|
+
const src: string;
|
|
320
|
+
export default src;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
declare module "*?asis&isolation" {
|
|
324
|
+
const src: string;
|
|
325
|
+
export default src;
|
|
326
|
+
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { DataCollectionPermissions } from "../../../types/browser.js";
|
|
2
|
-
import { ManifestAccessibleResource } from "../../../types/manifest.js";
|
|
3
|
-
type ManifestPermissions = chrome.runtime.ManifestPermission;
|
|
4
|
-
type ManifestOptionalPermissions = chrome.runtime.ManifestOptionalPermission;
|
|
5
|
-
type Permission = ManifestPermissions | ManifestOptionalPermissions;
|
|
6
|
-
/**
|
|
7
|
-
* Filters and adapts permissions for Manifest V2 compatibility.
|
|
8
|
-
*
|
|
9
|
-
* @param permissions - Set of permissions to filter
|
|
10
|
-
* @returns New set of permissions adapted for Manifest V2
|
|
11
|
-
*/
|
|
12
|
-
export declare const filterPermissions: <T extends Permission>(permissions: Set<T>) => Set<T>;
|
|
13
|
-
export declare const filterPermissionsForMV2: <T extends Permission>(permissions: Set<T>) => Set<T>;
|
|
14
|
-
export declare const filterPermissionsForMV3: <T extends Permission>(permissions: Set<T>) => Set<T>;
|
|
15
|
-
export declare const filterOptionalPermissions: <O extends ManifestOptionalPermissions, R extends ManifestPermissions>(optional: Set<O>, required: Set<R>) => O[];
|
|
16
|
-
export declare const filterHostPatterns: (patterns: Set<string>) => Set<string>;
|
|
17
|
-
export declare const mergeWebAccessibleResources: (resources: ManifestAccessibleResource[]) => ManifestAccessibleResource[];
|
|
18
|
-
/**
|
|
19
|
-
* Normalizes data collection permissions for the manifest.
|
|
20
|
-
*
|
|
21
|
-
* - Removes duplicate permissions.
|
|
22
|
-
* - Filters out invalid permissions not present in DataCollectionPermission enum.
|
|
23
|
-
* - Sets "none" as default if required permissions are empty.
|
|
24
|
-
* - Removes "none" if real permissions are added to required.
|
|
25
|
-
* - Removes "none" from optional permissions.
|
|
26
|
-
* - Removes any permission from optional if it's already in required.
|
|
27
|
-
* - Sorts both required and optional permissions alphabetically.
|
|
28
|
-
*
|
|
29
|
-
* @param permissions - The permissions object to normalize.
|
|
30
|
-
*/
|
|
31
|
-
export declare const normalizeDataCollectionPermissions: (permissions?: DataCollectionPermissions) => DataCollectionPermissions;
|
|
32
|
-
export {};
|