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
|
@@ -1,14 +1,62 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
type
|
|
6
|
-
type
|
|
1
|
+
import type { ContentScriptPrepareProps } from "./prepare.js";
|
|
2
|
+
import type { ContentScriptBoundary } from "./boundary.js";
|
|
3
|
+
import type { PageAlias } from "../page.js";
|
|
4
|
+
import type { Optional } from "utility-types";
|
|
5
|
+
import type { EntrypointBuilder, EntrypointOptions } from "../entrypoint.js";
|
|
6
|
+
import type { Awaiter, PickNonFunctionProperties } from "../helpers.js";
|
|
7
7
|
export declare const ContentScriptMatches: string[];
|
|
8
|
+
/** Shared property used by the bundler plugin and the content script's style runtime getter. */
|
|
9
|
+
export declare const ContentScriptStylesRuntimeProperty = "__adnbnIsolatedStyles";
|
|
10
|
+
export declare enum ContentScriptWorld {
|
|
11
|
+
Isolated = "ISOLATED",
|
|
12
|
+
Main = "MAIN"
|
|
13
|
+
}
|
|
8
14
|
export declare enum ContentScriptDeclarative {
|
|
9
15
|
Required = "required",
|
|
10
16
|
Optional = "optional"
|
|
11
17
|
}
|
|
18
|
+
export declare enum ContentScriptIsolation {
|
|
19
|
+
None = "none",
|
|
20
|
+
Shadow = "shadow",
|
|
21
|
+
Iframe = "iframe"
|
|
22
|
+
}
|
|
23
|
+
export declare enum ContentScriptShadowMode {
|
|
24
|
+
Open = "open",
|
|
25
|
+
Closed = "closed"
|
|
26
|
+
}
|
|
27
|
+
export declare enum ContentScriptAppend {
|
|
28
|
+
Last = "last",
|
|
29
|
+
First = "first",
|
|
30
|
+
Replace = "replace",
|
|
31
|
+
Before = "before",
|
|
32
|
+
After = "after"
|
|
33
|
+
}
|
|
34
|
+
export declare enum ContentScriptMarker {
|
|
35
|
+
/** In-memory marking (no DOM mutations). */
|
|
36
|
+
Weak = "weak",
|
|
37
|
+
/** DOM attribute-based marking. */
|
|
38
|
+
Attribute = "attribute"
|
|
39
|
+
}
|
|
40
|
+
export declare enum ContentScriptMarkerValue {
|
|
41
|
+
Mounted = "1",
|
|
42
|
+
Unmounted = "0"
|
|
43
|
+
}
|
|
44
|
+
export declare enum ContentScriptEvent {
|
|
45
|
+
Mount = "mount",
|
|
46
|
+
Unmount = "unmount",
|
|
47
|
+
Add = "add",
|
|
48
|
+
Remove = "remove"
|
|
49
|
+
}
|
|
50
|
+
type RunAt = chrome.extensionTypes.RunAt;
|
|
51
|
+
export interface ContentScriptStylesRuntime {
|
|
52
|
+
/** Resolves initial stylesheet URLs once, before the first root is registered. */
|
|
53
|
+
initialize(resolveUrl: (file: string) => string): void;
|
|
54
|
+
/** Retry restored styles once on load error; future loads keep the default failure behavior. */
|
|
55
|
+
add(root: ShadowRoot | HTMLElement, target: Element | null, retry?: boolean): void;
|
|
56
|
+
delete(root: ShadowRoot | HTMLElement): void;
|
|
57
|
+
load(url: string): Promise<void>;
|
|
58
|
+
}
|
|
59
|
+
export type ContentScriptWorldValue = ContentScriptWorld | `${chrome.scripting.ExecutionWorld}`;
|
|
12
60
|
export interface ContentScriptConfig {
|
|
13
61
|
matches?: string[];
|
|
14
62
|
/**
|
|
@@ -38,8 +86,13 @@ export interface ContentScriptConfig {
|
|
|
38
86
|
runAt?: RunAt;
|
|
39
87
|
/**
|
|
40
88
|
* See https://developer.chrome.com/docs/extensions/develop/concepts/content-scripts#isolated_world
|
|
89
|
+
*
|
|
90
|
+
* Dynamic imports keep physical async chunks in ISOLATED. MAIN keeps the same Promise-based
|
|
91
|
+
* execution semantics but includes dynamic dependencies in the initial entrypoint graph.
|
|
92
|
+
* Manifest V2 builds always use ISOLATED. Requesting MAIN emits a build warning and applies
|
|
93
|
+
* ISOLATED grouping and chunk loading rules before generating the manifest.
|
|
41
94
|
*/
|
|
42
|
-
world?:
|
|
95
|
+
world?: ContentScriptWorldValue;
|
|
43
96
|
/**
|
|
44
97
|
* See https://developer.chrome.com/docs/extensions/mv3/content_scripts/
|
|
45
98
|
* @default false
|
|
@@ -68,34 +121,66 @@ export interface ContentScriptConfig {
|
|
|
68
121
|
declarative?: boolean | `${ContentScriptDeclarative}` | ContentScriptDeclarative;
|
|
69
122
|
}
|
|
70
123
|
export type ContentScriptOptions = ContentScriptConfig & EntrypointOptions;
|
|
71
|
-
export
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
124
|
+
export interface ContentScriptShadowOptions {
|
|
125
|
+
/**
|
|
126
|
+
* Controls access through the host's shadowRoot property, not CSS isolation or UI visibility.
|
|
127
|
+
* @default ContentScriptShadowMode.Open
|
|
128
|
+
*/
|
|
129
|
+
mode?: ContentScriptShadowMode | `${ContentScriptShadowMode}`;
|
|
130
|
+
}
|
|
131
|
+
export interface ContentScriptFrameRenderOptions {
|
|
132
|
+
page?: never;
|
|
133
|
+
src?: never;
|
|
134
|
+
}
|
|
135
|
+
export interface ContentScriptFramePageOptions {
|
|
136
|
+
page: PageAlias;
|
|
137
|
+
src?: never;
|
|
138
|
+
}
|
|
139
|
+
export interface ContentScriptFrameSourceOptions {
|
|
140
|
+
src: string;
|
|
141
|
+
page?: never;
|
|
142
|
+
}
|
|
143
|
+
export type ContentScriptFrame = ContentScriptFrameRenderOptions | ContentScriptFramePageOptions | ContentScriptFrameSourceOptions;
|
|
144
|
+
export interface ContentScriptIsolationNoneOptions {
|
|
145
|
+
type: ContentScriptIsolation.None | "none";
|
|
146
|
+
mode?: never;
|
|
147
|
+
page?: never;
|
|
148
|
+
src?: never;
|
|
149
|
+
}
|
|
150
|
+
export interface ContentScriptIsolationShadowOptions extends ContentScriptShadowOptions {
|
|
151
|
+
type: ContentScriptIsolation.Shadow | "shadow";
|
|
152
|
+
page?: never;
|
|
153
|
+
src?: never;
|
|
154
|
+
}
|
|
155
|
+
export type ContentScriptIsolationFrameOptions = ContentScriptFrame & {
|
|
156
|
+
type: ContentScriptIsolation.Iframe | "iframe";
|
|
157
|
+
mode?: never;
|
|
158
|
+
};
|
|
159
|
+
/** Object form of isolation, also used after resolving shorthand values. */
|
|
160
|
+
export type ContentScriptIsolationOptions = ContentScriptIsolationNoneOptions | ContentScriptIsolationShadowOptions | ContentScriptIsolationFrameOptions;
|
|
161
|
+
export type ContentScriptIsolationValue = ContentScriptIsolation | `${ContentScriptIsolation}` | ContentScriptIsolationOptions;
|
|
162
|
+
/** Statically resolved configuration; runtime render values are never retained here. */
|
|
163
|
+
export type ContentScriptEntrypointOptions = Partial<ContentScriptOptions> & {
|
|
164
|
+
isolation?: ContentScriptIsolationOptions;
|
|
165
|
+
};
|
|
79
166
|
export type ContentScriptMountFunction = (anchor: Element, container: Element) => void | (() => void);
|
|
80
167
|
export interface ContentScriptMount {
|
|
81
168
|
mount(): boolean | undefined | void;
|
|
82
169
|
unmount(): boolean | undefined | void;
|
|
83
170
|
}
|
|
84
|
-
export interface
|
|
85
|
-
|
|
171
|
+
export interface ContentScriptContainerProps<Data = unknown> extends ContentScriptPrepareProps {
|
|
172
|
+
data: Data;
|
|
173
|
+
}
|
|
174
|
+
export interface ContentScriptProps<Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> extends ContentScriptContainerProps<Data> {
|
|
175
|
+
/** Outer mounted element; the Shadow host or iframe wrapper when isolated. */
|
|
176
|
+
container: Element;
|
|
177
|
+
/** Actual render destination. Use its root/document for portals and DOM operations. */
|
|
178
|
+
target: Element;
|
|
179
|
+
/** ShadowRoot or iframe for the active isolation; undefined without isolation. */
|
|
180
|
+
boundary: ContentScriptBoundary<Isolation>;
|
|
86
181
|
}
|
|
87
182
|
export type ContentScriptAnchor = string | Element | null | undefined;
|
|
88
183
|
export type ContentScriptAnchorGetter = () => Awaiter<ContentScriptAnchor>;
|
|
89
|
-
export declare enum ContentScriptMarker {
|
|
90
|
-
/** In-memory marking (no DOM mutations). */
|
|
91
|
-
Weak = "weak",
|
|
92
|
-
/** DOM attribute-based marking. */
|
|
93
|
-
Attribute = "attribute"
|
|
94
|
-
}
|
|
95
|
-
export declare enum ContentScriptMarkerValue {
|
|
96
|
-
Mounted = "1",
|
|
97
|
-
Unmounted = "0"
|
|
98
|
-
}
|
|
99
184
|
export interface ContentScriptMarkerContract {
|
|
100
185
|
for(anchor: ContentScriptAnchor): ContentScriptMarkerContract;
|
|
101
186
|
/**
|
|
@@ -115,24 +200,15 @@ export interface ContentScriptMarkerContract {
|
|
|
115
200
|
export type ContentScriptMarkerType = ContentScriptMarker | `${ContentScriptMarker}` | ContentScriptMarkerContract | undefined;
|
|
116
201
|
export type ContentScriptMarkerGetter = (options: ContentScriptOptions) => Awaiter<ContentScriptMarkerType>;
|
|
117
202
|
export type ContentScriptMarkerResolver = (options: ContentScriptOptions) => Awaiter<ContentScriptMarkerContract>;
|
|
118
|
-
export type ContentScriptRenderReactComponent = FC<ContentScriptProps>;
|
|
119
|
-
export type ContentScriptRenderValue = Element | ReactNode | ContentScriptRenderReactComponent;
|
|
120
|
-
export type ContentScriptRenderHandler = (props: ContentScriptProps) => Awaiter<undefined | ContentScriptRenderValue>;
|
|
121
203
|
export type ContentScriptContainerTag = Exclude<keyof HTMLElementTagNameMap, "html" | "body">;
|
|
122
204
|
export type ContentScriptContainerOptions = {
|
|
123
205
|
[Tag in ContentScriptContainerTag]: {
|
|
124
206
|
tagName: Tag;
|
|
125
207
|
} & Exclude<Optional<PickNonFunctionProperties<HTMLElementTagNameMap[Tag]>>, "id">;
|
|
126
208
|
}[ContentScriptContainerTag];
|
|
127
|
-
export type ContentScriptContainerFactory = (props:
|
|
128
|
-
export type ContentScriptContainerCreator = (props:
|
|
129
|
-
export type ContentScriptWatchStrategy = (update: () => void
|
|
130
|
-
export declare enum ContentScriptEvent {
|
|
131
|
-
Mount = "mount",
|
|
132
|
-
Unmount = "unmount",
|
|
133
|
-
Add = "add",
|
|
134
|
-
Remove = "remove"
|
|
135
|
-
}
|
|
209
|
+
export type ContentScriptContainerFactory<Data = unknown> = (props: ContentScriptContainerProps<Data>) => Awaiter<Element | ContentScriptContainerTag | ContentScriptContainerOptions>;
|
|
210
|
+
export type ContentScriptContainerCreator<Data = unknown> = (props: ContentScriptContainerProps<Data>) => Awaiter<Element>;
|
|
211
|
+
export type ContentScriptWatchStrategy = (update: () => Awaiter<void>, context: ContentScriptContext) => () => void;
|
|
136
212
|
export type ContentScriptEventCallback = (event: ContentScriptEvent, node: ContentScriptNode) => void;
|
|
137
213
|
export interface ContentScriptEventEmitter {
|
|
138
214
|
on(callback: ContentScriptEventCallback): void;
|
|
@@ -167,28 +243,12 @@ export type ContentScriptMainFunction = (context: ContentScriptContext, options:
|
|
|
167
243
|
export interface ContentScriptNode extends ContentScriptMount {
|
|
168
244
|
anchor: Element;
|
|
169
245
|
container?: Element;
|
|
246
|
+
/** Element used by the active adapter as the destination for rendered UI. */
|
|
247
|
+
target?: Element;
|
|
248
|
+
/** Present while isolation is mounted, including navigation-only iframes. */
|
|
249
|
+
boundary?: ContentScriptBoundary;
|
|
170
250
|
}
|
|
171
251
|
export type ContentScriptNodeSet = Set<ContentScriptNode>;
|
|
172
|
-
export interface ContentScriptDefinition extends ContentScriptEntrypointOptions {
|
|
173
|
-
marker?: ContentScriptMarkerType | ContentScriptMarkerGetter;
|
|
174
|
-
anchor?: ContentScriptAnchor | ContentScriptAnchorGetter;
|
|
175
|
-
mount?: ContentScriptMountFunction;
|
|
176
|
-
render?: ContentScriptRenderValue | ContentScriptRenderHandler;
|
|
177
|
-
container?: ContentScriptContainerTag | ContentScriptContainerOptions | ContentScriptContainerFactory;
|
|
178
|
-
watch?: true | ContentScriptWatchStrategy;
|
|
179
|
-
main?: ContentScriptMainFunction;
|
|
180
|
-
}
|
|
181
|
-
export interface ContentScriptResolvedDefinition extends Omit<ContentScriptDefinition, "anchor" | "marker" | "mount" | "container" | "render" | "watch"> {
|
|
182
|
-
marker: ContentScriptMarkerResolver;
|
|
183
|
-
anchor: ContentScriptAnchorGetter;
|
|
184
|
-
mount: ContentScriptMountFunction;
|
|
185
|
-
render?: ContentScriptRenderHandler;
|
|
186
|
-
container: ContentScriptContainerCreator;
|
|
187
|
-
watch: ContentScriptWatchStrategy;
|
|
188
|
-
}
|
|
189
|
-
export interface ContentScriptAppendDefinition extends Omit<ContentScriptDefinition, "mount"> {
|
|
190
|
-
append?: ContentScriptAppend;
|
|
191
|
-
}
|
|
192
252
|
export interface ContentScriptBuilder extends EntrypointBuilder {
|
|
193
253
|
getContext(): ContentScriptContext;
|
|
194
254
|
}
|
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
const ContentScriptMatches = ["http://*/*", "https://*/*"];
|
|
2
|
+
const ContentScriptStylesRuntimeProperty = "__adnbnIsolatedStyles";
|
|
3
|
+
var ContentScriptWorld = /* @__PURE__ */ ((ContentScriptWorld2) => {
|
|
4
|
+
ContentScriptWorld2["Isolated"] = "ISOLATED";
|
|
5
|
+
ContentScriptWorld2["Main"] = "MAIN";
|
|
6
|
+
return ContentScriptWorld2;
|
|
7
|
+
})(ContentScriptWorld || {});
|
|
2
8
|
var ContentScriptDeclarative = /* @__PURE__ */ ((ContentScriptDeclarative2) => {
|
|
3
9
|
ContentScriptDeclarative2["Required"] = "required";
|
|
4
10
|
ContentScriptDeclarative2["Optional"] = "optional";
|
|
5
11
|
return ContentScriptDeclarative2;
|
|
6
12
|
})(ContentScriptDeclarative || {});
|
|
13
|
+
var ContentScriptIsolation = /* @__PURE__ */ ((ContentScriptIsolation2) => {
|
|
14
|
+
ContentScriptIsolation2["None"] = "none";
|
|
15
|
+
ContentScriptIsolation2["Shadow"] = "shadow";
|
|
16
|
+
ContentScriptIsolation2["Iframe"] = "iframe";
|
|
17
|
+
return ContentScriptIsolation2;
|
|
18
|
+
})(ContentScriptIsolation || {});
|
|
19
|
+
var ContentScriptShadowMode = /* @__PURE__ */ ((ContentScriptShadowMode2) => {
|
|
20
|
+
ContentScriptShadowMode2["Open"] = "open";
|
|
21
|
+
ContentScriptShadowMode2["Closed"] = "closed";
|
|
22
|
+
return ContentScriptShadowMode2;
|
|
23
|
+
})(ContentScriptShadowMode || {});
|
|
7
24
|
var ContentScriptAppend = /* @__PURE__ */ ((ContentScriptAppend2) => {
|
|
8
25
|
ContentScriptAppend2["Last"] = "last";
|
|
9
26
|
ContentScriptAppend2["First"] = "first";
|
|
@@ -33,8 +50,12 @@ export {
|
|
|
33
50
|
ContentScriptAppend,
|
|
34
51
|
ContentScriptDeclarative,
|
|
35
52
|
ContentScriptEvent,
|
|
53
|
+
ContentScriptIsolation,
|
|
36
54
|
ContentScriptMarker,
|
|
37
55
|
ContentScriptMarkerValue,
|
|
38
|
-
ContentScriptMatches
|
|
56
|
+
ContentScriptMatches,
|
|
57
|
+
ContentScriptShadowMode,
|
|
58
|
+
ContentScriptStylesRuntimeProperty,
|
|
59
|
+
ContentScriptWorld
|
|
39
60
|
};
|
|
40
|
-
//# sourceMappingURL=
|
|
61
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/types/content/common.ts"],"sourcesContent":["import type {ContentScriptPrepareProps} from \"./prepare\";\nimport type {ContentScriptBoundary} from \"./boundary\";\n\nimport type {PageAlias} from \"@typing/page\";\nimport type {Optional} from \"utility-types\";\n\nimport type {EntrypointBuilder, EntrypointOptions} from \"@typing/entrypoint\";\nimport type {Awaiter, PickNonFunctionProperties} from \"@typing/helpers\";\n\nexport const ContentScriptMatches = [\"http://*/*\", \"https://*/*\"];\n\n/** Shared property used by the bundler plugin and the content script's style runtime getter. */\nexport const ContentScriptStylesRuntimeProperty = \"__adnbnIsolatedStyles\";\n\nexport enum ContentScriptWorld {\n Isolated = \"ISOLATED\",\n Main = \"MAIN\",\n}\n\nexport enum ContentScriptDeclarative {\n Required = \"required\",\n Optional = \"optional\",\n}\n\nexport enum ContentScriptIsolation {\n None = \"none\",\n Shadow = \"shadow\",\n Iframe = \"iframe\",\n}\n\nexport enum ContentScriptShadowMode {\n Open = \"open\",\n Closed = \"closed\",\n}\n\n// Append\nexport enum ContentScriptAppend {\n Last = \"last\",\n First = \"first\",\n Replace = \"replace\",\n Before = \"before\",\n After = \"after\",\n}\n\n// Marker\nexport enum ContentScriptMarker {\n /** In-memory marking (no DOM mutations). */\n Weak = \"weak\",\n /** DOM attribute-based marking. */\n Attribute = \"attribute\",\n}\n\nexport enum ContentScriptMarkerValue {\n Mounted = \"1\",\n Unmounted = \"0\",\n}\n\n// Event\nexport enum ContentScriptEvent {\n Mount = \"mount\",\n Unmount = \"unmount\",\n Add = \"add\",\n Remove = \"remove\",\n}\n\ntype RunAt = chrome.extensionTypes.RunAt;\n\nexport interface ContentScriptStylesRuntime {\n /** Resolves initial stylesheet URLs once, before the first root is registered. */\n initialize(resolveUrl: (file: string) => string): void;\n /** Retry restored styles once on load error; future loads keep the default failure behavior. */\n add(root: ShadowRoot | HTMLElement, target: Element | null, retry?: boolean): void;\n delete(root: ShadowRoot | HTMLElement): void;\n load(url: string): Promise<void>;\n}\n\nexport type ContentScriptWorldValue = ContentScriptWorld | `${chrome.scripting.ExecutionWorld}`;\n\nexport interface ContentScriptConfig {\n matches?: string[];\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default []\n */\n excludeMatches?: string[];\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default []\n */\n includeGlobs?: string[];\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default []\n */\n excludeGlobs?: string[];\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default false\n */\n allFrames?: boolean;\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default \"documentIdle\"\n */\n runAt?: RunAt;\n /**\n * See https://developer.chrome.com/docs/extensions/develop/concepts/content-scripts#isolated_world\n *\n * Dynamic imports keep physical async chunks in ISOLATED. MAIN keeps the same Promise-based\n * execution semantics but includes dynamic dependencies in the initial entrypoint graph.\n * Manifest V2 builds always use ISOLATED. Requesting MAIN emits a build warning and applies\n * ISOLATED grouping and chunk loading rules before generating the manifest.\n */\n world?: ContentScriptWorldValue;\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default false\n */\n matchAboutBlank?: boolean;\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default false\n */\n matchOriginAsFallback?: boolean;\n /**\n * Whether this content script requires explicit host permission declaration in the extension manifest.\n *\n * Accepted values:\n * - ContentScriptDeclarative.Required — adds the corresponding host patterns to manifest.host_permissions.\n * - ContentScriptDeclarative.Optional — adds the corresponding host patterns to manifest.optional_host_permissions.\n *\n * Backward compatibility:\n * - true ≡ ContentScriptDeclarative.Required\n * - false ≡ undefined (as if the value is not set)\n *\n * @see https://developer.chrome.com/docs/extensions/mv3/declare_permissions/\n *\n * @default undefined\n */\n declarative?: boolean | `${ContentScriptDeclarative}` | ContentScriptDeclarative;\n}\n\nexport type ContentScriptOptions = ContentScriptConfig & EntrypointOptions;\n\nexport interface ContentScriptShadowOptions {\n /**\n * Controls access through the host's shadowRoot property, not CSS isolation or UI visibility.\n * @default ContentScriptShadowMode.Open\n */\n mode?: ContentScriptShadowMode | `${ContentScriptShadowMode}`;\n}\n\nexport interface ContentScriptFrameRenderOptions {\n page?: never;\n src?: never;\n}\n\nexport interface ContentScriptFramePageOptions {\n page: PageAlias;\n src?: never;\n}\n\nexport interface ContentScriptFrameSourceOptions {\n src: string;\n page?: never;\n}\n\nexport type ContentScriptFrame =\n | ContentScriptFrameRenderOptions\n | ContentScriptFramePageOptions\n | ContentScriptFrameSourceOptions;\n\nexport interface ContentScriptIsolationNoneOptions {\n type: ContentScriptIsolation.None | \"none\";\n mode?: never;\n page?: never;\n src?: never;\n}\n\nexport interface ContentScriptIsolationShadowOptions extends ContentScriptShadowOptions {\n type: ContentScriptIsolation.Shadow | \"shadow\";\n page?: never;\n src?: never;\n}\n\nexport type ContentScriptIsolationFrameOptions = ContentScriptFrame & {\n type: ContentScriptIsolation.Iframe | \"iframe\";\n mode?: never;\n};\n\n/** Object form of isolation, also used after resolving shorthand values. */\nexport type ContentScriptIsolationOptions =\n | ContentScriptIsolationNoneOptions\n | ContentScriptIsolationShadowOptions\n | ContentScriptIsolationFrameOptions;\n\nexport type ContentScriptIsolationValue =\n | ContentScriptIsolation\n | `${ContentScriptIsolation}`\n | ContentScriptIsolationOptions;\n\n/** Statically resolved configuration; runtime render values are never retained here. */\nexport type ContentScriptEntrypointOptions = Partial<ContentScriptOptions> & {\n isolation?: ContentScriptIsolationOptions;\n};\n\n// Mount\nexport type ContentScriptMountFunction = (anchor: Element, container: Element) => void | (() => void);\n\nexport interface ContentScriptMount {\n mount(): boolean | undefined | void;\n\n unmount(): boolean | undefined | void;\n}\n\n// Props\nexport interface ContentScriptContainerProps<Data = unknown> extends ContentScriptPrepareProps {\n data: Data;\n}\n\nexport interface ContentScriptProps<\n Data = unknown,\n Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`,\n> extends ContentScriptContainerProps<Data> {\n /** Outer mounted element; the Shadow host or iframe wrapper when isolated. */\n container: Element;\n /** Actual render destination. Use its root/document for portals and DOM operations. */\n target: Element;\n /** ShadowRoot or iframe for the active isolation; undefined without isolation. */\n boundary: ContentScriptBoundary<Isolation>;\n}\n\n// Anchor\nexport type ContentScriptAnchor = string | Element | null | undefined;\n\nexport type ContentScriptAnchorGetter = () => Awaiter<ContentScriptAnchor>;\n\nexport interface ContentScriptMarkerContract {\n for(anchor: ContentScriptAnchor): ContentScriptMarkerContract;\n\n /**\n * Returns elements that are not tracked yet (no marker attribute present).\n * MUST NOT mutate marker state.\n */\n unmarked(): Element[];\n\n marked(): Element[];\n\n mark(element: Element, value: ContentScriptMarkerValue): boolean;\n\n unmark(element: Element): boolean;\n\n isMarked(element: Element): boolean;\n\n value(element: Element): ContentScriptMarkerValue | undefined;\n\n mount(element: Element): boolean;\n\n unmount(element: Element): boolean;\n\n reset(): ContentScriptMarkerContract;\n}\n\nexport type ContentScriptMarkerType =\n | ContentScriptMarker\n | `${ContentScriptMarker}`\n | ContentScriptMarkerContract\n | undefined;\n\nexport type ContentScriptMarkerGetter = (options: ContentScriptOptions) => Awaiter<ContentScriptMarkerType>;\n\nexport type ContentScriptMarkerResolver = (options: ContentScriptOptions) => Awaiter<ContentScriptMarkerContract>;\n\n// Container\nexport type ContentScriptContainerTag = Exclude<keyof HTMLElementTagNameMap, \"html\" | \"body\">;\n\nexport type ContentScriptContainerOptions = {\n [Tag in ContentScriptContainerTag]: {\n tagName: Tag;\n } & Exclude<Optional<PickNonFunctionProperties<HTMLElementTagNameMap[Tag]>>, \"id\">;\n}[ContentScriptContainerTag];\n\nexport type ContentScriptContainerFactory<Data = unknown> = (\n props: ContentScriptContainerProps<Data>\n) => Awaiter<Element | ContentScriptContainerTag | ContentScriptContainerOptions>;\n\nexport type ContentScriptContainerCreator<Data = unknown> = (\n props: ContentScriptContainerProps<Data>\n) => Awaiter<Element>;\n\n// Watch\nexport type ContentScriptWatchStrategy = (update: () => Awaiter<void>, context: ContentScriptContext) => () => void;\n\nexport type ContentScriptEventCallback = (event: ContentScriptEvent, node: ContentScriptNode) => void;\n\nexport interface ContentScriptEventEmitter {\n on(callback: ContentScriptEventCallback): void;\n\n off(callback: ContentScriptEventCallback): void;\n\n emit(event: ContentScriptEvent, node: ContentScriptNode): void;\n\n emitMount(node: ContentScriptNode): void;\n\n emitUnmount(node: ContentScriptNode): void;\n\n emitAdd(node: ContentScriptNode): void;\n\n emitRemove(node: ContentScriptNode): void;\n\n removeAllListeners(): void;\n\n listenerCount(): number;\n\n hasListeners(): boolean;\n}\n\n// Context\nexport interface ContentScriptContext extends ContentScriptMount {\n nodes: ReadonlySet<ContentScriptNode>;\n\n /**\n * Registers a callback function that will be invoked when a specific content script context event occurs.\n *\n * @param {ContentScriptEventCallback} callback - The function to be executed when the event is triggered. Receives event-related data as its argument.\n * @return {Function} A function that can be called to unsubscribe the callback from the event.\n */\n watch(callback: ContentScriptEventCallback): () => void;\n\n /**\n * Stops watching for changes or events that were previously being observed.\n * Unsubscribes from all event listeners that were registered through the watch method.\n *\n * @return {void} No return value.\n */\n unwatch(): void;\n}\n\n// Main\nexport type ContentScriptMainFunction = (context: ContentScriptContext, options: ContentScriptOptions) => Awaiter<void>;\n\n// Node\nexport interface ContentScriptNode extends ContentScriptMount {\n anchor: Element;\n container?: Element;\n\n /** Element used by the active adapter as the destination for rendered UI. */\n target?: Element;\n\n /** Present while isolation is mounted, including navigation-only iframes. */\n boundary?: ContentScriptBoundary;\n}\n\nexport type ContentScriptNodeSet = Set<ContentScriptNode>;\n\n// Builder\nexport interface ContentScriptBuilder extends EntrypointBuilder {\n getContext(): ContentScriptContext;\n}\n"],"mappings":"AASO,MAAM,uBAAuB,CAAC,cAAc,aAAa;AAGzD,MAAM,qCAAqC;AAE3C,IAAK,qBAAL,kBAAKA,wBAAL;AACH,EAAAA,oBAAA,cAAW;AACX,EAAAA,oBAAA,UAAO;AAFC,SAAAA;AAAA,GAAA;AAKL,IAAK,2BAAL,kBAAKC,8BAAL;AACH,EAAAA,0BAAA,cAAW;AACX,EAAAA,0BAAA,cAAW;AAFH,SAAAA;AAAA,GAAA;AAKL,IAAK,yBAAL,kBAAKC,4BAAL;AACH,EAAAA,wBAAA,UAAO;AACP,EAAAA,wBAAA,YAAS;AACT,EAAAA,wBAAA,YAAS;AAHD,SAAAA;AAAA,GAAA;AAML,IAAK,0BAAL,kBAAKC,6BAAL;AACH,EAAAA,yBAAA,UAAO;AACP,EAAAA,yBAAA,YAAS;AAFD,SAAAA;AAAA,GAAA;AAML,IAAK,sBAAL,kBAAKC,yBAAL;AACH,EAAAA,qBAAA,UAAO;AACP,EAAAA,qBAAA,WAAQ;AACR,EAAAA,qBAAA,aAAU;AACV,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,WAAQ;AALA,SAAAA;AAAA,GAAA;AASL,IAAK,sBAAL,kBAAKC,yBAAL;AAEH,EAAAA,qBAAA,UAAO;AAEP,EAAAA,qBAAA,eAAY;AAJJ,SAAAA;AAAA,GAAA;AAOL,IAAK,2BAAL,kBAAKC,8BAAL;AACH,EAAAA,0BAAA,aAAU;AACV,EAAAA,0BAAA,eAAY;AAFJ,SAAAA;AAAA,GAAA;AAML,IAAK,qBAAL,kBAAKC,wBAAL;AACH,EAAAA,oBAAA,WAAQ;AACR,EAAAA,oBAAA,aAAU;AACV,EAAAA,oBAAA,SAAM;AACN,EAAAA,oBAAA,YAAS;AAJD,SAAAA;AAAA,GAAA;","names":["ContentScriptWorld","ContentScriptDeclarative","ContentScriptIsolation","ContentScriptShadowMode","ContentScriptAppend","ContentScriptMarker","ContentScriptMarkerValue","ContentScriptEvent"]}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { ContentScriptPrepareHandler } from "./prepare.js";
|
|
2
|
+
import type { ContentScriptBoundaryHandler } from "./boundary.js";
|
|
3
|
+
import type { ContentScriptAnchor, ContentScriptAnchorGetter, ContentScriptAppend, ContentScriptContainerCreator, ContentScriptContainerFactory, ContentScriptContainerOptions, ContentScriptContainerTag, ContentScriptFramePageOptions, ContentScriptFrameRenderOptions, ContentScriptFrameSourceOptions, ContentScriptIsolation, ContentScriptIsolationFrameOptions, ContentScriptIsolationOptions, ContentScriptIsolationShadowOptions, ContentScriptMainFunction, ContentScriptMarkerGetter, ContentScriptMarkerResolver, ContentScriptMarkerType, ContentScriptMountFunction, ContentScriptOptions, ContentScriptWatchStrategy } from "./common.js";
|
|
4
|
+
import type { ContentScriptRenderHandler, ContentScriptRenderValue } from "./render.js";
|
|
5
|
+
import type { ContentScriptTarget, ContentScriptTargetCreator } from "./target.js";
|
|
6
|
+
export interface ContentScriptDefinitionBase<Data = unknown> extends Partial<ContentScriptOptions> {
|
|
7
|
+
marker?: ContentScriptMarkerType | ContentScriptMarkerGetter;
|
|
8
|
+
anchor?: ContentScriptAnchor | ContentScriptAnchorGetter;
|
|
9
|
+
mount?: ContentScriptMountFunction;
|
|
10
|
+
container?: ContentScriptContainerTag | ContentScriptContainerOptions | ContentScriptContainerFactory<NoInfer<Data>>;
|
|
11
|
+
prepare?: ContentScriptPrepareHandler<Data>;
|
|
12
|
+
watch?: true | ContentScriptWatchStrategy;
|
|
13
|
+
main?: ContentScriptMainFunction;
|
|
14
|
+
}
|
|
15
|
+
export type ContentScriptRenderDefinition<Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> = {
|
|
16
|
+
isolation?: Isolation | {
|
|
17
|
+
type: Isolation;
|
|
18
|
+
};
|
|
19
|
+
boundary?: ContentScriptBoundaryHandler<NoInfer<Data>, NoInfer<Isolation>>;
|
|
20
|
+
target?: ContentScriptTarget<NoInfer<Data>, NoInfer<Isolation>>;
|
|
21
|
+
render?: ContentScriptRenderValue<NoInfer<Data>, NoInfer<Isolation>> | ContentScriptRenderHandler<NoInfer<Data>, NoInfer<Isolation>>;
|
|
22
|
+
} & ({
|
|
23
|
+
isolation?: NoInfer<Isolation> | Extract<ContentScriptIsolationOptions, {
|
|
24
|
+
type: `${NoInfer<Isolation>}`;
|
|
25
|
+
page?: never;
|
|
26
|
+
src?: never;
|
|
27
|
+
}>;
|
|
28
|
+
boundary?: never;
|
|
29
|
+
target?: never;
|
|
30
|
+
} | {
|
|
31
|
+
isolation: Extract<NoInfer<Isolation>, "shadow"> | Extract<ContentScriptIsolationShadowOptions, {
|
|
32
|
+
type: `${NoInfer<Isolation>}`;
|
|
33
|
+
}>;
|
|
34
|
+
} | {
|
|
35
|
+
isolation: Extract<NoInfer<Isolation>, "iframe"> | Extract<ContentScriptIsolationFrameOptions & ContentScriptFrameRenderOptions, {
|
|
36
|
+
type: `${NoInfer<Isolation>}`;
|
|
37
|
+
}>;
|
|
38
|
+
} | {
|
|
39
|
+
isolation: Extract<ContentScriptIsolationFrameOptions & (ContentScriptFramePageOptions | ContentScriptFrameSourceOptions), {
|
|
40
|
+
type: `${NoInfer<Isolation>}`;
|
|
41
|
+
}>;
|
|
42
|
+
render?: never;
|
|
43
|
+
target?: never;
|
|
44
|
+
}) & ("none" extends `${NoInfer<Isolation>}` ? unknown : {
|
|
45
|
+
isolation: unknown;
|
|
46
|
+
});
|
|
47
|
+
export type ContentScriptDefinition<Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> = ContentScriptDefinitionBase<Data> & ContentScriptRenderDefinition<Data, Isolation>;
|
|
48
|
+
export interface ContentScriptResolvedDefinition<Data = unknown> extends Omit<ContentScriptDefinitionBase<Data>, "anchor" | "marker" | "mount" | "container" | "watch"> {
|
|
49
|
+
isolation: ContentScriptIsolationOptions;
|
|
50
|
+
boundary?: ContentScriptBoundaryHandler<Data>;
|
|
51
|
+
marker: ContentScriptMarkerResolver;
|
|
52
|
+
anchor: ContentScriptAnchorGetter;
|
|
53
|
+
mount: ContentScriptMountFunction;
|
|
54
|
+
render?: true | ContentScriptRenderHandler<Data>;
|
|
55
|
+
container: ContentScriptContainerCreator<Data>;
|
|
56
|
+
target: ContentScriptTargetCreator<Data>;
|
|
57
|
+
watch: ContentScriptWatchStrategy;
|
|
58
|
+
}
|
|
59
|
+
export type ContentScriptAppendDefinition<Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> = Omit<ContentScriptDefinitionBase<Data>, "mount"> & ContentScriptRenderDefinition<Data, Isolation> & {
|
|
60
|
+
append?: ContentScriptAppend;
|
|
61
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/types/content/index.ts"],"sourcesContent":["export * from \"./common\";\n\nexport type * from \"./definition\";\nexport type * from \"./render\";\n\nexport type * from \"./adapters\";\nexport type * from \"./prepare\";\nexport type * from \"./boundary\";\nexport type * from \"./target\";\n"],"mappings":"AAAA,cAAc;","names":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Awaiter } from "../helpers.js";
|
|
2
|
+
import type { ContentScriptEntrypointOptions } from "./common.js";
|
|
3
|
+
/** Per-anchor input available before a container or render target exists. */
|
|
4
|
+
export interface ContentScriptPrepareProps extends ContentScriptEntrypointOptions {
|
|
5
|
+
anchor: Element;
|
|
6
|
+
}
|
|
7
|
+
/** False tracks the anchor without creating UI. Other results become render props.data. */
|
|
8
|
+
export type ContentScriptPrepareResult<Data> = Data | false;
|
|
9
|
+
export type ContentScriptPrepareHandler<Data = unknown> = (props: ContentScriptPrepareProps) => Awaiter<ContentScriptPrepareResult<Data>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=prepare.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ContentScriptIsolation, ContentScriptProps } from "./common.js";
|
|
2
|
+
import type { ContentScriptVanillaRenderValue, ContentScriptReactRenderValue } from "./adapters/index.js";
|
|
3
|
+
/** All supported render values; the entrypoint's filename selects the runtime adapter. */
|
|
4
|
+
export type ContentScriptRenderValue<Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> = ContentScriptVanillaRenderValue | ContentScriptReactRenderValue<Data, Isolation>;
|
|
5
|
+
/** Synchronous rendering into prepared DOM. Await data and decide whether to render in prepare. */
|
|
6
|
+
export type ContentScriptRenderHandler<Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> = (props: ContentScriptProps<Data, Isolation>) => ContentScriptRenderValue<Data, Isolation>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=render.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ContentScriptContainerOptions, ContentScriptContainerTag, ContentScriptIsolation } from "./common.js";
|
|
2
|
+
import type { ContentScriptBoundaryProps } from "./boundary.js";
|
|
3
|
+
export type ContentScriptTargetTag = ContentScriptContainerTag;
|
|
4
|
+
export type ContentScriptTargetOptions = ContentScriptContainerOptions;
|
|
5
|
+
/** Available after isolation exists, before the target is created or rendering starts. */
|
|
6
|
+
export interface ContentScriptTargetProps<Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> extends ContentScriptBoundaryProps<Data, Isolation> {
|
|
7
|
+
/** Create elements in this document, including for an iframe's child document. */
|
|
8
|
+
document: Document;
|
|
9
|
+
}
|
|
10
|
+
export type ContentScriptTargetFactory<Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> = (props: ContentScriptTargetProps<Data, Isolation>) => Element | ContentScriptTargetTag | ContentScriptTargetOptions;
|
|
11
|
+
export type ContentScriptTarget<Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> = ContentScriptTargetTag | ContentScriptTargetOptions | ContentScriptTargetFactory<Data, Isolation>;
|
|
12
|
+
/** Synchronous DOM creation; asynchronous work belongs in prepare. */
|
|
13
|
+
export type ContentScriptTargetCreator<Data = unknown> = (props: ContentScriptTargetProps<Data>) => Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=target.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -2,6 +2,8 @@ import { Mode } from "./app.js";
|
|
|
2
2
|
import { Browser } from "./browser.js";
|
|
3
3
|
import { ManifestVersion } from "./manifest.js";
|
|
4
4
|
export declare const EntrypointFileExtensions: ReadonlySet<string>;
|
|
5
|
+
export declare const EntrypointAssetsRuntimeProperty = "__adnbnCurrentEntrypointAssets";
|
|
6
|
+
export declare const EntrypointAssetsMapRuntimeProperty = "__adnbnBuildAssets";
|
|
5
7
|
export declare enum EntrypointType {
|
|
6
8
|
Background = "background",
|
|
7
9
|
Command = "command",
|
|
@@ -76,6 +78,18 @@ export interface EntrypointFile {
|
|
|
76
78
|
* These files will be compiled and bundled together as part of the specified entrypoint.
|
|
77
79
|
*/
|
|
78
80
|
export type EntrypointEntries = Map<string, Set<EntrypointFile>>;
|
|
81
|
+
export interface EntrypointAssetsFiles {
|
|
82
|
+
readonly js: readonly string[];
|
|
83
|
+
readonly css: readonly string[];
|
|
84
|
+
}
|
|
85
|
+
export interface EntrypointAssets {
|
|
86
|
+
readonly initial: EntrypointAssetsFiles;
|
|
87
|
+
readonly async: EntrypointAssetsFiles;
|
|
88
|
+
}
|
|
89
|
+
export interface EntrypointAssetsMapEntry extends EntrypointAssets {
|
|
90
|
+
readonly assets: readonly string[];
|
|
91
|
+
}
|
|
92
|
+
export type EntrypointAssetsMap = Readonly<Record<string, EntrypointAssetsMapEntry>>;
|
|
79
93
|
export interface EntrypointParser<O extends EntrypointOptions> {
|
|
80
94
|
options(file: EntrypointFile): O;
|
|
81
95
|
contract(file: EntrypointFile): string | undefined;
|
|
@@ -85,6 +99,12 @@ export interface EntrypointFinder {
|
|
|
85
99
|
empty(): Promise<boolean>;
|
|
86
100
|
exists(): Promise<boolean>;
|
|
87
101
|
clear(): this;
|
|
102
|
+
/**
|
|
103
|
+
* Determines if the specified file exists within the current set of files.
|
|
104
|
+
*
|
|
105
|
+
* @param {EntrypointFile} file - The file to be checked for existence in the set of files.
|
|
106
|
+
* @return {boolean} Returns true if the file exists in the set, otherwise false.
|
|
107
|
+
*/
|
|
88
108
|
holds(file: EntrypointFile): boolean;
|
|
89
109
|
}
|
|
90
110
|
export interface EntrypointOptionsFinder<O extends EntrypointOptions> extends EntrypointFinder {
|
package/dist/types/entrypoint.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
const EntrypointFileExtensions = /* @__PURE__ */ new Set(["ts", "tsx", "js", "jsx", "vue", "svelte"]);
|
|
2
|
+
const EntrypointAssetsRuntimeProperty = "__adnbnCurrentEntrypointAssets";
|
|
3
|
+
const EntrypointAssetsMapRuntimeProperty = "__adnbnBuildAssets";
|
|
2
4
|
var EntrypointType = /* @__PURE__ */ ((EntrypointType2) => {
|
|
3
5
|
EntrypointType2["Background"] = "background";
|
|
4
6
|
EntrypointType2["Command"] = "command";
|
|
@@ -14,6 +16,8 @@ var EntrypointType = /* @__PURE__ */ ((EntrypointType2) => {
|
|
|
14
16
|
return EntrypointType2;
|
|
15
17
|
})(EntrypointType || {});
|
|
16
18
|
export {
|
|
19
|
+
EntrypointAssetsMapRuntimeProperty,
|
|
20
|
+
EntrypointAssetsRuntimeProperty,
|
|
17
21
|
EntrypointFileExtensions,
|
|
18
22
|
EntrypointType
|
|
19
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/entrypoint.ts"],"sourcesContent":["import {Mode} from \"@typing/app\";\nimport {Browser} from \"@typing/browser\";\nimport {ManifestVersion} from \"@typing/manifest\";\n\nexport const EntrypointFileExtensions: ReadonlySet<string> = new Set([\"ts\", \"tsx\", \"js\", \"jsx\", \"vue\", \"svelte\"]);\n\nexport enum EntrypointType {\n Background = \"background\",\n Command = \"command\",\n ContentScript = \"content\",\n Page = \"page\",\n Service = \"service\",\n Relay = \"relay\",\n Options = \"options\",\n Popup = \"popup\",\n Sidebar = \"sidebar\",\n Offscreen = \"offscreen\",\n Sandbox = \"sandbox\",\n}\n\nexport interface EntrypointOptions {\n /**\n * List of target browsers to include this entrypoint in. Defaults to being included in all\n * builds.\n *\n * @default undefined\n */\n includeBrowser?: `${Browser}`[] | Browser[];\n\n /**\n * List of target browsers to exclude this entrypoint from.\n *\n * @default undefined\n */\n excludeBrowser?: `${Browser}`[] | Browser[];\n\n /**\n * List of target apps to include this entrypoint in. Defaults to being included in all builds.\n *\n * @default undefined\n */\n excludeApp?: string[];\n\n /**\n * List of target apps to exclude this entrypoint from.\n *\n * @default undefined\n */\n includeApp?: string[];\n\n /**\n * Build mode for filtering entry points. Entry point will be included only\n * if it matches the current build mode (Production or Development).\n *\n * @default undefined\n */\n mode?: `${Exclude<Mode, Mode.None>}` | Exclude<Mode, Mode.None>;\n\n /**\n * Manifest version constraint for this entry point. Entry point will be included\n * only if it matches the target manifest version.\n *\n * @default undefined\n */\n manifestVersion?: ManifestVersion;\n\n /**\n * Debug mode flag. If true, entry point will be included only when building\n * with DEBUG flag enabled.\n *\n * @default undefined\n */\n debug?: boolean;\n}\n\nexport interface EntrypointFile {\n file: string;\n import: string;\n external?: string;\n}\n\n/**\n * Dictionary of entrypoint for the build configuration.\n *\n * @key {string} - The name of the entrypoint that will be used in the bundler configuration.\n * @value {EntrypointFile[]} - Array of files that will be included in this entrypoint.\n * These files will be compiled and bundled together as part of the specified entrypoint.\n */\nexport type EntrypointEntries = Map<string, Set<EntrypointFile>>;\n\nexport interface EntrypointParser<O extends EntrypointOptions> {\n options(file: EntrypointFile): O;\n\n contract(file: EntrypointFile): string | undefined;\n}\n\nexport interface EntrypointFinder {\n files(): Promise<Set<EntrypointFile>>;\n\n empty(): Promise<boolean>;\n\n exists(): Promise<boolean>;\n\n clear(): this;\n\n holds(file: EntrypointFile): boolean;\n}\n\nexport interface EntrypointOptionsFinder<O extends EntrypointOptions> extends EntrypointFinder {\n type(): EntrypointType;\n\n options(): Promise<Map<EntrypointFile, O>>;\n\n contracts(): Promise<Map<EntrypointFile, string | undefined>>;\n}\n\nexport interface EntrypointNameGenerator {\n reserve(name: string): this;\n\n name(name: string): string;\n\n file(file: EntrypointFile): string;\n\n likely(name?: string): boolean;\n\n has(name: string): boolean;\n\n reset(): this;\n}\n\nexport interface EntrypointBuilder {\n build(): Promise<void>;\n\n destroy(): Promise<void>;\n}\n\nexport type EntrypointConstructorParameter<T> = T extends new (arg: infer P) => any ? P : never;\n"],"mappings":"AAIO,MAAM,2BAAgD,oBAAI,IAAI,CAAC,MAAM,OAAO,MAAM,OAAO,OAAO,QAAQ,CAAC;AAEzG,IAAK,iBAAL,kBAAKA,oBAAL;AACH,EAAAA,gBAAA,gBAAa;AACb,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,mBAAgB;AAChB,EAAAA,gBAAA,UAAO;AACP,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,WAAQ;AACR,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,WAAQ;AACR,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,eAAY;AACZ,EAAAA,gBAAA,aAAU;AAXF,SAAAA;AAAA,GAAA;","names":["EntrypointType"]}
|
|
1
|
+
{"version":3,"sources":["../../src/types/entrypoint.ts"],"sourcesContent":["import {Mode} from \"@typing/app\";\nimport {Browser} from \"@typing/browser\";\nimport {ManifestVersion} from \"@typing/manifest\";\n\nexport const EntrypointFileExtensions: ReadonlySet<string> = new Set([\"ts\", \"tsx\", \"js\", \"jsx\", \"vue\", \"svelte\"]);\n\nexport const EntrypointAssetsRuntimeProperty = \"__adnbnCurrentEntrypointAssets\";\nexport const EntrypointAssetsMapRuntimeProperty = \"__adnbnBuildAssets\";\n\nexport enum EntrypointType {\n Background = \"background\",\n Command = \"command\",\n ContentScript = \"content\",\n Page = \"page\",\n Service = \"service\",\n Relay = \"relay\",\n Options = \"options\",\n Popup = \"popup\",\n Sidebar = \"sidebar\",\n Offscreen = \"offscreen\",\n Sandbox = \"sandbox\",\n}\n\nexport interface EntrypointOptions {\n /**\n * List of target browsers to include this entrypoint in. Defaults to being included in all\n * builds.\n *\n * @default undefined\n */\n includeBrowser?: `${Browser}`[] | Browser[];\n\n /**\n * List of target browsers to exclude this entrypoint from.\n *\n * @default undefined\n */\n excludeBrowser?: `${Browser}`[] | Browser[];\n\n /**\n * List of target apps to include this entrypoint in. Defaults to being included in all builds.\n *\n * @default undefined\n */\n excludeApp?: string[];\n\n /**\n * List of target apps to exclude this entrypoint from.\n *\n * @default undefined\n */\n includeApp?: string[];\n\n /**\n * Build mode for filtering entry points. Entry point will be included only\n * if it matches the current build mode (Production or Development).\n *\n * @default undefined\n */\n mode?: `${Exclude<Mode, Mode.None>}` | Exclude<Mode, Mode.None>;\n\n /**\n * Manifest version constraint for this entry point. Entry point will be included\n * only if it matches the target manifest version.\n *\n * @default undefined\n */\n manifestVersion?: ManifestVersion;\n\n /**\n * Debug mode flag. If true, entry point will be included only when building\n * with DEBUG flag enabled.\n *\n * @default undefined\n */\n debug?: boolean;\n}\n\nexport interface EntrypointFile {\n file: string;\n import: string;\n external?: string;\n}\n\n/**\n * Dictionary of entrypoint for the build configuration.\n *\n * @key {string} - The name of the entrypoint that will be used in the bundler configuration.\n * @value {EntrypointFile[]} - Array of files that will be included in this entrypoint.\n * These files will be compiled and bundled together as part of the specified entrypoint.\n */\nexport type EntrypointEntries = Map<string, Set<EntrypointFile>>;\n\nexport interface EntrypointAssetsFiles {\n readonly js: readonly string[];\n readonly css: readonly string[];\n}\n\nexport interface EntrypointAssets {\n readonly initial: EntrypointAssetsFiles;\n readonly async: EntrypointAssetsFiles;\n}\n\nexport interface EntrypointAssetsMapEntry extends EntrypointAssets {\n readonly assets: readonly string[];\n}\n\nexport type EntrypointAssetsMap = Readonly<Record<string, EntrypointAssetsMapEntry>>;\n\nexport interface EntrypointParser<O extends EntrypointOptions> {\n options(file: EntrypointFile): O;\n\n contract(file: EntrypointFile): string | undefined;\n}\n\nexport interface EntrypointFinder {\n files(): Promise<Set<EntrypointFile>>;\n\n empty(): Promise<boolean>;\n\n exists(): Promise<boolean>;\n\n clear(): this;\n\n /**\n * Determines if the specified file exists within the current set of files.\n *\n * @param {EntrypointFile} file - The file to be checked for existence in the set of files.\n * @return {boolean} Returns true if the file exists in the set, otherwise false.\n */\n holds(file: EntrypointFile): boolean;\n}\n\nexport interface EntrypointOptionsFinder<O extends EntrypointOptions> extends EntrypointFinder {\n type(): EntrypointType;\n\n options(): Promise<Map<EntrypointFile, O>>;\n\n contracts(): Promise<Map<EntrypointFile, string | undefined>>;\n}\n\nexport interface EntrypointNameGenerator {\n reserve(name: string): this;\n\n name(name: string): string;\n\n file(file: EntrypointFile): string;\n\n likely(name?: string): boolean;\n\n has(name: string): boolean;\n\n reset(): this;\n}\n\nexport interface EntrypointBuilder {\n build(): Promise<void>;\n\n destroy(): Promise<void>;\n}\n\nexport type EntrypointConstructorParameter<T> = T extends new (arg: infer P) => any ? P : never;\n"],"mappings":"AAIO,MAAM,2BAAgD,oBAAI,IAAI,CAAC,MAAM,OAAO,MAAM,OAAO,OAAO,QAAQ,CAAC;AAEzG,MAAM,kCAAkC;AACxC,MAAM,qCAAqC;AAE3C,IAAK,iBAAL,kBAAKA,oBAAL;AACH,EAAAA,gBAAA,gBAAa;AACb,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,mBAAgB;AAChB,EAAAA,gBAAA,UAAO;AACP,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,WAAQ;AACR,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,WAAQ;AACR,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,eAAY;AACZ,EAAAA,gBAAA,aAAU;AAXF,SAAAA;AAAA,GAAA;","names":["EntrypointType"]}
|
package/dist/types/icon.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
export declare const DefaultIconGroupName = "default";
|
|
2
2
|
export declare const IconFileExtensions: ReadonlySet<string>;
|
|
3
3
|
export declare const IconSizes: ReadonlySet<number>;
|
|
4
|
+
/**
|
|
5
|
+
* Empty because icon group names depend on the consuming application's icon files.
|
|
6
|
+
* Generated `.adnbn/icon.d.ts` declarations augment `adnbn`, adding discovered names as keys with value `true`.
|
|
7
|
+
*/
|
|
8
|
+
export interface IconNameRegistry {
|
|
9
|
+
}
|
|
10
|
+
export type IconName = keyof IconNameRegistry extends never ? string : Extract<keyof IconNameRegistry, string>;
|
|
11
|
+
export type IconsMap = Map<IconName, Record<number, string>>;
|
package/dist/types/icon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/icon.ts"],"sourcesContent":["export const DefaultIconGroupName = \"default\";\n\nexport const IconFileExtensions: ReadonlySet<string> = new Set([\"png\"]);\n\nexport const IconSizes: ReadonlySet<number> = new Set([16, 32, 48, 64, 128, 256, 512]);\n"],"mappings":"AAAO,MAAM,uBAAuB;AAE7B,MAAM,qBAA0C,oBAAI,IAAI,CAAC,KAAK,CAAC;AAE/D,MAAM,YAAiC,oBAAI,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,KAAK,KAAK,GAAG,CAAC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/types/icon.ts"],"sourcesContent":["export const DefaultIconGroupName = \"default\";\n\nexport const IconFileExtensions: ReadonlySet<string> = new Set([\"png\"]);\n\nexport const IconSizes: ReadonlySet<number> = new Set([16, 32, 48, 64, 128, 256, 512]);\n\n/**\n * Empty because icon group names depend on the consuming application's icon files.\n * Generated `.adnbn/icon.d.ts` declarations augment `adnbn`, adding discovered names as keys with value `true`.\n */\nexport interface IconNameRegistry {}\n\nexport type IconName = keyof IconNameRegistry extends never ? string : Extract<keyof IconNameRegistry, string>;\n\nexport type IconsMap = Map<IconName, Record<number, string>>;\n"],"mappings":"AAAO,MAAM,uBAAuB;AAE7B,MAAM,qBAA0C,oBAAI,IAAI,CAAC,KAAK,CAAC;AAE/D,MAAM,YAAiC,oBAAI,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,KAAK,KAAK,GAAG,CAAC;","names":[]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export declare enum Language {
|
|
2
|
+
Arabic = "ar",
|
|
3
|
+
Amharic = "am",
|
|
4
|
+
Bulgarian = "bg",
|
|
5
|
+
Bengali = "bn",
|
|
6
|
+
Catalan = "ca",
|
|
7
|
+
Czech = "cs",
|
|
8
|
+
Danish = "da",
|
|
9
|
+
German = "de",
|
|
10
|
+
Greek = "el",
|
|
11
|
+
English = "en",
|
|
12
|
+
EnglishAustralia = "en_AU",
|
|
13
|
+
EnglishGreatBritain = "en_GB",
|
|
14
|
+
EnglishUSA = "en_US",
|
|
15
|
+
Spanish = "es",
|
|
16
|
+
SpanishLatinAmericaAndCaribbean = "es_419",
|
|
17
|
+
Estonian = "et",
|
|
18
|
+
Persian = "fa",
|
|
19
|
+
Finnish = "fi",
|
|
20
|
+
Filipino = "fil",
|
|
21
|
+
French = "fr",
|
|
22
|
+
Gujarati = "gu",
|
|
23
|
+
Hebrew = "he",
|
|
24
|
+
Hindi = "hi",
|
|
25
|
+
Croatian = "hr",
|
|
26
|
+
Hungarian = "hu",
|
|
27
|
+
Indonesian = "id",
|
|
28
|
+
Italian = "it",
|
|
29
|
+
Japanese = "ja",
|
|
30
|
+
Kannada = "kn",
|
|
31
|
+
Korean = "ko",
|
|
32
|
+
Lithuanian = "lt",
|
|
33
|
+
Latvian = "lv",
|
|
34
|
+
Malayalam = "ml",
|
|
35
|
+
Marathi = "mr",
|
|
36
|
+
Malay = "ms",
|
|
37
|
+
Dutch = "nl",
|
|
38
|
+
Norwegian = "no",
|
|
39
|
+
Polish = "pl",
|
|
40
|
+
PortugueseBrazil = "pt_BR",
|
|
41
|
+
PortuguesePortugal = "pt_PT",
|
|
42
|
+
Romanian = "ro",
|
|
43
|
+
Russian = "ru",
|
|
44
|
+
Slovak = "sk",
|
|
45
|
+
Slovenian = "sl",
|
|
46
|
+
Serbian = "sr",
|
|
47
|
+
Swedish = "sv",
|
|
48
|
+
Swahili = "sw",
|
|
49
|
+
Tamil = "ta",
|
|
50
|
+
Telugu = "te",
|
|
51
|
+
Thai = "th",
|
|
52
|
+
Turkish = "tr",
|
|
53
|
+
Ukrainian = "uk",
|
|
54
|
+
Vietnamese = "vi",
|
|
55
|
+
ChineseChina = "zh_CN",
|
|
56
|
+
ChineseTaiwan = "zh_TW"
|
|
57
|
+
}
|