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,9 +1,3 @@
|
|
|
1
|
-
// Only placeholders belong here; real adnbn imports resolve to their source modules via tsconfig.json.
|
|
2
|
-
declare module "*?raw" {
|
|
3
|
-
const content: string;
|
|
4
|
-
export default content;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
1
|
declare module "virtual:background-entrypoint" {
|
|
8
2
|
type BackgroundDefinition = import("../../types/background.js").BackgroundDefinition;
|
|
9
3
|
|
|
@@ -27,9 +21,10 @@ declare module "virtual:command-entrypoint" {
|
|
|
27
21
|
}
|
|
28
22
|
|
|
29
23
|
declare module "virtual:content-entrypoint" {
|
|
30
|
-
type ContentScriptDefinition = import("../../types/content.js").ContentScriptDefinition;
|
|
24
|
+
type ContentScriptDefinition = import("../../types/content/index.js").ContentScriptDefinition;
|
|
31
25
|
|
|
32
|
-
interface ModuleType
|
|
26
|
+
interface ModuleType {
|
|
27
|
+
[name: string]: unknown;
|
|
33
28
|
default: ContentScriptDefinition | ContentScriptDefinition["render"] | undefined;
|
|
34
29
|
}
|
|
35
30
|
|
|
@@ -37,14 +32,18 @@ declare module "virtual:content-entrypoint" {
|
|
|
37
32
|
export = module;
|
|
38
33
|
}
|
|
39
34
|
|
|
40
|
-
declare module "virtual:content-
|
|
35
|
+
declare module "virtual:content-builder" {
|
|
36
|
+
export const resolveDefinition: (module: object) => import("../../types/content/index.js").ContentScriptDefinition;
|
|
37
|
+
|
|
41
38
|
export const Builder:
|
|
42
39
|
| typeof import("../../entry/content/adapters/vanilla/index.js").Builder
|
|
43
|
-
| typeof import("../../entry/content/adapters/react/index.js").Builder
|
|
40
|
+
| typeof import("../../entry/content/adapters/react/index.js").Builder
|
|
41
|
+
| typeof import("../../entry/content/index.js").Builder;
|
|
44
42
|
|
|
45
43
|
const content:
|
|
46
44
|
| typeof import("../../entry/content/adapters/vanilla/index.js").default
|
|
47
|
-
| typeof import("../../entry/content/adapters/react/index.js").default
|
|
45
|
+
| typeof import("../../entry/content/adapters/react/index.js").default
|
|
46
|
+
| typeof import("../../entry/content/index.js").default;
|
|
48
47
|
export default content;
|
|
49
48
|
}
|
|
50
49
|
|
|
@@ -69,6 +68,7 @@ declare module "virtual:relay-entrypoint" {
|
|
|
69
68
|
main,
|
|
70
69
|
name,
|
|
71
70
|
method,
|
|
71
|
+
isolation,
|
|
72
72
|
allFrames,
|
|
73
73
|
matches,
|
|
74
74
|
excludeMatches,
|
|
@@ -82,8 +82,11 @@ declare module "virtual:relay-entrypoint" {
|
|
|
82
82
|
marker,
|
|
83
83
|
anchor,
|
|
84
84
|
mount,
|
|
85
|
+
prepare,
|
|
85
86
|
render,
|
|
86
87
|
container,
|
|
88
|
+
boundary,
|
|
89
|
+
target,
|
|
87
90
|
watch,
|
|
88
91
|
includeBrowser,
|
|
89
92
|
excludeBrowser,
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { createMutationObserverStrategy, createAwaitFirstStrategy } from "../entry/content/resolvers/watch.js";
|
|
2
|
+
export { ContentScriptEvent } from "../types/content/index.js";
|
|
3
|
+
export type { ContentScriptWatchStrategy, ContentScriptContext, ContentScriptEventCallback, ContentScriptNode, } from "../types/content/index.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createMutationObserverStrategy, createAwaitFirstStrategy } from "./../entry/content/resolvers/watch.js";
|
|
2
|
+
import { ContentScriptEvent } from "./../types/content/index.js";
|
|
3
|
+
export {
|
|
4
|
+
ContentScriptEvent,
|
|
5
|
+
createAwaitFirstStrategy,
|
|
6
|
+
createMutationObserverStrategy
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/content/index.ts"],"sourcesContent":["export {createMutationObserverStrategy, createAwaitFirstStrategy} from \"@entry/content/resolvers/watch\";\n\nexport {ContentScriptEvent} from \"@typing/content\";\nexport type {\n ContentScriptWatchStrategy,\n ContentScriptContext,\n ContentScriptEventCallback,\n ContentScriptNode,\n} from \"@typing/content\";\n"],"mappings":"AAAA,SAAQ,gCAAgC,gCAA+B;AAEvE,SAAQ,0BAAyB;","names":[]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import MountBuilder from "../../
|
|
2
|
-
import {
|
|
3
|
-
export default class extends MountBuilder {
|
|
4
|
-
|
|
5
|
-
protected
|
|
6
|
-
protected createNode(anchor: Element): Promise<ContentScriptNode>;
|
|
1
|
+
import MountBuilder from "../../lifecycle/MountBuilder.js";
|
|
2
|
+
import type { ContentScriptNode, ContentScriptIsolation, ContentScriptProps, ContentScriptRenderHandler, ContentScriptRenderValue } from "../../../../types/content/index.js";
|
|
3
|
+
export default class Builder<Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> extends MountBuilder<Data, Isolation> {
|
|
4
|
+
protected resolveRender(render?: ContentScriptRenderValue<Data> | ContentScriptRenderHandler<Data>): ContentScriptRenderHandler<Data> | undefined;
|
|
5
|
+
protected createRenderer(node: ContentScriptNode, render: ContentScriptRenderHandler<Data>, props: () => ContentScriptProps<Data>): ContentScriptNode;
|
|
7
6
|
}
|
|
@@ -1,28 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import { contentScriptReactRenderResolver } from "./resolvers/index.js";
|
|
6
|
-
class Builder_default extends MountBuilder {
|
|
7
|
-
constructor(definition) {
|
|
8
|
-
super(definition);
|
|
9
|
-
}
|
|
1
|
+
import MountBuilder from "../../lifecycle/MountBuilder.js";
|
|
2
|
+
import RenderNode from "./Node.js";
|
|
3
|
+
import { createRenderResolver } from "./resolvers/render.js";
|
|
4
|
+
class Builder extends MountBuilder {
|
|
10
5
|
resolveRender(render) {
|
|
11
|
-
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
return contentScriptReactRenderResolver(render);
|
|
6
|
+
return render === void 0 ? void 0 : createRenderResolver(render);
|
|
15
7
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (!isValidElement(value)) {
|
|
19
|
-
value = void 0;
|
|
20
|
-
console.warn("Content script react value is not a valid React element");
|
|
21
|
-
}
|
|
22
|
-
return new EventNode(new ReactNode(await super.createNode(anchor), value), this.emitter);
|
|
8
|
+
createRenderer(node, render, props) {
|
|
9
|
+
return new RenderNode(node, render, props);
|
|
23
10
|
}
|
|
24
11
|
}
|
|
25
12
|
export {
|
|
26
|
-
|
|
13
|
+
Builder as default
|
|
27
14
|
};
|
|
28
15
|
//# sourceMappingURL=Builder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/entry/content/adapters/react/Builder.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["../../../../../src/entry/content/adapters/react/Builder.ts"],"sourcesContent":["import MountBuilder from \"../../lifecycle/MountBuilder\";\nimport RenderNode from \"./Node\";\nimport {createRenderResolver} from \"./resolvers/render\";\n\nimport type {\n ContentScriptNode,\n ContentScriptIsolation,\n ContentScriptProps,\n ContentScriptRenderHandler,\n ContentScriptRenderValue,\n} from \"@typing/content\";\n\nexport default class Builder<\n Data = unknown,\n Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`,\n> extends MountBuilder<Data, Isolation> {\n protected resolveRender(\n render?: ContentScriptRenderValue<Data> | ContentScriptRenderHandler<Data>\n ): ContentScriptRenderHandler<Data> | undefined {\n return render === undefined ? undefined : createRenderResolver(render);\n }\n\n protected createRenderer(\n node: ContentScriptNode,\n render: ContentScriptRenderHandler<Data>,\n props: () => ContentScriptProps<Data>\n ): ContentScriptNode {\n return new RenderNode(node, render, props);\n }\n}\n"],"mappings":"AAAA,OAAO,kBAAkB;AACzB,OAAO,gBAAgB;AACvB,SAAQ,4BAA2B;AAUnC,MAAO,gBAGG,aAA8B;AAAA,EAC1B,cACN,QAC4C;AAC5C,WAAO,WAAW,SAAY,SAAY,qBAAqB,MAAM;AAAA,EACzE;AAAA,EAEU,eACN,MACA,QACA,OACiB;AACjB,WAAO,IAAI,WAAW,MAAM,QAAQ,KAAK;AAAA,EAC7C;AACJ;","names":[]}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
protected
|
|
6
|
-
protected
|
|
7
|
-
protected root?: Root;
|
|
8
|
-
constructor(node: ContentScriptNode, component?: ReactComponent);
|
|
9
|
-
get anchor(): Element;
|
|
10
|
-
get container(): Element | undefined;
|
|
11
|
-
mount(): boolean;
|
|
12
|
-
unmount(): boolean;
|
|
1
|
+
import { RenderNode } from "../../lifecycle/nodes/index.js";
|
|
2
|
+
import type { ContentScriptRenderValue } from "../../../../types/content/index.js";
|
|
3
|
+
export default class Node<Data = unknown> extends RenderNode<Data> {
|
|
4
|
+
private root?;
|
|
5
|
+
protected render(value: ContentScriptRenderValue<Data> | undefined, target: Element): boolean;
|
|
6
|
+
protected clear(): void;
|
|
13
7
|
}
|
|
@@ -1,39 +1,23 @@
|
|
|
1
|
+
import { isValidElement } from "react";
|
|
1
2
|
import { createRoot } from "react-dom/client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
this.node = node;
|
|
5
|
-
this.component = component;
|
|
6
|
-
}
|
|
7
|
-
node;
|
|
8
|
-
component;
|
|
3
|
+
import { RenderNode } from "../../lifecycle/nodes/index.js";
|
|
4
|
+
class Node extends RenderNode {
|
|
9
5
|
root;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
get container() {
|
|
14
|
-
return this.node.container;
|
|
15
|
-
}
|
|
16
|
-
mount() {
|
|
17
|
-
this.node.mount();
|
|
18
|
-
if (!this.container || this.root) {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
if (!this.component) {
|
|
22
|
-
console.warn("Content script react component is empty");
|
|
6
|
+
render(value, target) {
|
|
7
|
+
if (!isValidElement(value)) {
|
|
23
8
|
return false;
|
|
24
9
|
}
|
|
25
|
-
this.root = createRoot(
|
|
26
|
-
this.root.render(
|
|
10
|
+
this.root = createRoot(target);
|
|
11
|
+
this.root.render(value);
|
|
27
12
|
return true;
|
|
28
13
|
}
|
|
29
|
-
|
|
14
|
+
clear() {
|
|
30
15
|
var _a;
|
|
31
16
|
(_a = this.root) == null ? void 0 : _a.unmount();
|
|
32
17
|
this.root = void 0;
|
|
33
|
-
return !!this.node.unmount();
|
|
34
18
|
}
|
|
35
19
|
}
|
|
36
20
|
export {
|
|
37
|
-
|
|
21
|
+
Node as default
|
|
38
22
|
};
|
|
39
23
|
//# sourceMappingURL=Node.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/entry/content/adapters/react/Node.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../../../../src/entry/content/adapters/react/Node.ts"],"sourcesContent":["import {isValidElement} from \"react\";\nimport {createRoot, type Root} from \"react-dom/client\";\n\nimport {RenderNode} from \"../../lifecycle/nodes\";\n\nimport type {ContentScriptRenderValue} from \"@typing/content\";\n\nexport default class Node<Data = unknown> extends RenderNode<Data> {\n private root?: Root;\n\n protected render(value: ContentScriptRenderValue<Data> | undefined, target: Element): boolean {\n if (!isValidElement(value)) {\n return false;\n }\n\n this.root = createRoot(target);\n this.root.render(value);\n\n return true;\n }\n\n protected clear(): void {\n this.root?.unmount();\n this.root = undefined;\n }\n}\n"],"mappings":"AAAA,SAAQ,sBAAqB;AAC7B,SAAQ,kBAA4B;AAEpC,SAAQ,kBAAiB;AAIzB,MAAO,aAA2C,WAAiB;AAAA,EACvD;AAAA,EAEE,OAAO,OAAmD,QAA0B;AAC1F,QAAI,CAAC,eAAe,KAAK,GAAG;AACxB,aAAO;AAAA,IACX;AAEA,SAAK,OAAO,WAAW,MAAM;AAC7B,SAAK,KAAK,OAAO,KAAK;AAEtB,WAAO;AAAA,EACX;AAAA,EAEU,QAAc;AArB5B;AAsBQ,eAAK,SAAL,mBAAW;AACX,SAAK,OAAO;AAAA,EAChB;AACJ;","names":[]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Builder from "./Builder.js";
|
|
2
2
|
export { Builder };
|
|
3
|
-
|
|
3
|
+
export { resolveDefinition } from "./resolvers/definition.js";
|
|
4
|
+
declare const _default: (definition: import("../../../../index.js").ContentScriptDefinition<unknown, "none" | "shadow" | "iframe">) => void;
|
|
4
5
|
export default _default;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import Builder from "./Builder.js";
|
|
2
|
+
import { resolveDefinition } from "./resolvers/definition.js";
|
|
2
3
|
var react_default = Builder.resolver();
|
|
3
4
|
export {
|
|
4
5
|
Builder,
|
|
5
|
-
react_default as default
|
|
6
|
+
react_default as default,
|
|
7
|
+
resolveDefinition
|
|
6
8
|
};
|
|
7
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/entry/content/adapters/react/index.ts"],"sourcesContent":["import Builder from \"./Builder\";\n\nexport {Builder};\n\nexport default Builder.resolver();\n"],"mappings":"AAAA,OAAO,aAAa;
|
|
1
|
+
{"version":3,"sources":["../../../../../src/entry/content/adapters/react/index.ts"],"sourcesContent":["import Builder from \"./Builder\";\n\nexport {Builder};\nexport {resolveDefinition} from \"./resolvers/definition\";\n\nexport default Builder.resolver();\n"],"mappings":"AAAA,OAAO,aAAa;AAGpB,SAAQ,yBAAwB;AAEhC,IAAO,gBAAQ,QAAQ,SAAS;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { isValidElement } from "react";
|
|
2
|
+
import { mergeDefinition } from "../../../resolvers/definition.js";
|
|
3
|
+
const resolveDefinition = (module) => {
|
|
4
|
+
return mergeDefinition(
|
|
5
|
+
module,
|
|
6
|
+
(value) => typeof value === "function" || isValidElement(value) || typeof value === "number" || typeof value === "string" && value.length > 0 || value instanceof Element
|
|
7
|
+
);
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
resolveDefinition
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/entry/content/adapters/react/resolvers/definition.ts"],"sourcesContent":["import {isValidElement} from \"react\";\nimport {mergeDefinition} from \"../../../resolvers/definition\";\n\nimport type {ContentScriptDefinition} from \"@typing/content\";\n\nexport const resolveDefinition = (module: object): ContentScriptDefinition => {\n return mergeDefinition(\n module,\n value =>\n typeof value === \"function\" ||\n isValidElement(value) ||\n typeof value === \"number\" ||\n (typeof value === \"string\" && value.length > 0) ||\n value instanceof Element\n );\n};\n"],"mappings":"AAAA,SAAQ,sBAAqB;AAC7B,SAAQ,uBAAsB;AAIvB,MAAM,oBAAoB,CAAC,WAA4C;AAC1E,SAAO;AAAA,IACH;AAAA,IACA,WACI,OAAO,UAAU,cACjB,eAAe,KAAK,KACpB,OAAO,UAAU,YAChB,OAAO,UAAU,YAAY,MAAM,SAAS,KAC7C,iBAAiB;AAAA,EACzB;AACJ;","names":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ContentScriptRenderHandler, ContentScriptRenderValue } from "../../../../../types/content.js";
|
|
2
|
-
export declare const
|
|
1
|
+
import type { ContentScriptRenderHandler, ContentScriptRenderValue } from "../../../../../types/content/index.js";
|
|
2
|
+
export declare const createRenderResolver: <Data = unknown>(render?: ContentScriptRenderValue<Data> | ContentScriptRenderHandler<Data>) => ContentScriptRenderHandler<Data>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { createElement, isValidElement } from "react";
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return resolvedRender;
|
|
6
|
-
}
|
|
2
|
+
const createRenderResolver = (render) => (props) => {
|
|
3
|
+
const value = typeof render === "function" ? createElement(render, props) : render;
|
|
4
|
+
return isValidElement(value) ? value : void 0;
|
|
7
5
|
};
|
|
8
6
|
export {
|
|
9
|
-
|
|
7
|
+
createRenderResolver
|
|
10
8
|
};
|
|
11
9
|
//# sourceMappingURL=render.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/entry/content/adapters/react/resolvers/render.ts"],"sourcesContent":["import {createElement, isValidElement} from \"react\";\n\nimport {ContentScriptRenderHandler
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/entry/content/adapters/react/resolvers/render.ts"],"sourcesContent":["import {createElement, isValidElement} from \"react\";\n\nimport type {\n ContentScriptRenderHandler,\n ContentScriptRenderValue,\n ContentScriptRenderReactComponent,\n} from \"@typing/content\";\n\nexport const createRenderResolver =\n <Data = unknown>(\n render?: ContentScriptRenderValue<Data> | ContentScriptRenderHandler<Data>\n ): ContentScriptRenderHandler<Data> =>\n props => {\n // Functions in React entrypoints are components; React owns their invocation and hooks.\n const value =\n typeof render === \"function\"\n ? createElement(render as ContentScriptRenderReactComponent<Data>, props)\n : render;\n\n return isValidElement(value) ? value : undefined;\n };\n"],"mappings":"AAAA,SAAQ,eAAe,sBAAqB;AAQrC,MAAM,uBACT,CACI,WAEJ,WAAS;AAEL,QAAM,QACF,OAAO,WAAW,aACZ,cAAc,QAAmD,KAAK,IACtE;AAEV,SAAO,eAAe,KAAK,IAAI,QAAQ;AAC3C;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import MountBuilder from "../../
|
|
2
|
-
import {
|
|
3
|
-
export default class extends MountBuilder {
|
|
4
|
-
|
|
5
|
-
protected
|
|
1
|
+
import MountBuilder from "../../lifecycle/MountBuilder.js";
|
|
2
|
+
import type { ContentScriptNode, ContentScriptIsolation, ContentScriptProps, ContentScriptRenderHandler, ContentScriptRenderValue } from "../../../../types/content/index.js";
|
|
3
|
+
export default class Builder<Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> extends MountBuilder<Data, Isolation> {
|
|
4
|
+
protected resolveRender(render?: ContentScriptRenderValue<Data> | ContentScriptRenderHandler<Data>): ContentScriptRenderHandler<Data> | undefined;
|
|
5
|
+
protected createRenderer(node: ContentScriptNode, render: ContentScriptRenderHandler<Data>, props: () => ContentScriptProps<Data>): ContentScriptNode;
|
|
6
6
|
}
|
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
super(definition);
|
|
1
|
+
import MountBuilder from "../../lifecycle/MountBuilder.js";
|
|
2
|
+
import RenderNode from "./Node.js";
|
|
3
|
+
import { createRenderResolver } from "./resolvers/render.js";
|
|
4
|
+
class Builder extends MountBuilder {
|
|
5
|
+
resolveRender(render) {
|
|
6
|
+
return render === void 0 ? void 0 : createRenderResolver(render);
|
|
8
7
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
if (value !== true && !isValidContentScriptRenderValue(value)) {
|
|
12
|
-
value = void 0;
|
|
13
|
-
console.warn("Content script vanilla value is not a valid render value");
|
|
14
|
-
}
|
|
15
|
-
return new EventNode(new VanillaNode(await super.createNode(anchor), value), this.emitter);
|
|
8
|
+
createRenderer(node, render, props) {
|
|
9
|
+
return new RenderNode(node, render, props);
|
|
16
10
|
}
|
|
17
11
|
}
|
|
18
12
|
export {
|
|
19
|
-
|
|
13
|
+
Builder as default
|
|
20
14
|
};
|
|
21
15
|
//# sourceMappingURL=Builder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/entry/content/adapters/vanilla/Builder.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["../../../../../src/entry/content/adapters/vanilla/Builder.ts"],"sourcesContent":["import MountBuilder from \"../../lifecycle/MountBuilder\";\nimport RenderNode from \"./Node\";\nimport {createRenderResolver} from \"./resolvers/render\";\n\nimport type {\n ContentScriptNode,\n ContentScriptIsolation,\n ContentScriptProps,\n ContentScriptRenderHandler,\n ContentScriptRenderValue,\n} from \"@typing/content\";\n\nexport default class Builder<\n Data = unknown,\n Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`,\n> extends MountBuilder<Data, Isolation> {\n protected resolveRender(\n render?: ContentScriptRenderValue<Data> | ContentScriptRenderHandler<Data>\n ): ContentScriptRenderHandler<Data> | undefined {\n return render === undefined ? undefined : createRenderResolver(render);\n }\n\n protected createRenderer(\n node: ContentScriptNode,\n render: ContentScriptRenderHandler<Data>,\n props: () => ContentScriptProps<Data>\n ): ContentScriptNode {\n return new RenderNode(node, render, props);\n }\n}\n"],"mappings":"AAAA,OAAO,kBAAkB;AACzB,OAAO,gBAAgB;AACvB,SAAQ,4BAA2B;AAUnC,MAAO,gBAGG,aAA8B;AAAA,EAC1B,cACN,QAC4C;AAC5C,WAAO,WAAW,SAAY,SAAY,qBAAqB,MAAM;AAAA,EACzE;AAAA,EAEU,eACN,MACA,QACA,OACiB;AACjB,WAAO,IAAI,WAAW,MAAM,QAAQ,KAAK;AAAA,EAC7C;AACJ;","names":[]}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
protected
|
|
5
|
-
|
|
6
|
-
constructor(node: ContentScriptNode, value?: (null | boolean | string | number | Element) | undefined);
|
|
7
|
-
get anchor(): Element;
|
|
8
|
-
get container(): Element | undefined;
|
|
9
|
-
mount(): boolean;
|
|
10
|
-
unmount(): boolean;
|
|
1
|
+
import { RenderNode } from "../../lifecycle/nodes/index.js";
|
|
2
|
+
import type { ContentScriptRenderValue } from "../../../../types/content/index.js";
|
|
3
|
+
export default class Node<Data = unknown> extends RenderNode<Data> {
|
|
4
|
+
protected render(value: ContentScriptRenderValue<Data> | undefined, target: Element): boolean;
|
|
5
|
+
protected clear(): void;
|
|
11
6
|
}
|
|
@@ -1,42 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
get anchor() {
|
|
10
|
-
return this.node.anchor;
|
|
11
|
-
}
|
|
12
|
-
get container() {
|
|
13
|
-
return this.node.container;
|
|
14
|
-
}
|
|
15
|
-
mount() {
|
|
16
|
-
this.node.mount();
|
|
17
|
-
if (!this.container || this.mounted) {
|
|
1
|
+
import { RenderNode } from "../../lifecycle/nodes/index.js";
|
|
2
|
+
class Node extends RenderNode {
|
|
3
|
+
render(value, target) {
|
|
4
|
+
if (value && typeof value === "object" && "nodeType" in value && value.nodeType === 1) {
|
|
5
|
+
target.appendChild(value);
|
|
6
|
+
} else if (typeof value === "string" || typeof value === "number") {
|
|
7
|
+
target.textContent = String(value);
|
|
8
|
+
} else {
|
|
18
9
|
return false;
|
|
19
10
|
}
|
|
20
|
-
|
|
21
|
-
if (this.value instanceof Element) {
|
|
22
|
-
this.container.appendChild(this.value);
|
|
23
|
-
} else if (typeof this.value === "string" || typeof this.value === "number") {
|
|
24
|
-
this.container.textContent = String(this.value);
|
|
25
|
-
} else if (this.value === null || this.value === void 0 || this.value === false) {
|
|
26
|
-
result = false;
|
|
27
|
-
console.warn("Content script vanilla value is empty");
|
|
28
|
-
} else if (this.value === true) {
|
|
29
|
-
result = false;
|
|
30
|
-
}
|
|
31
|
-
this.mounted = true;
|
|
32
|
-
return result;
|
|
11
|
+
return true;
|
|
33
12
|
}
|
|
34
|
-
|
|
35
|
-
this.mounted = false;
|
|
36
|
-
return !!this.node.unmount();
|
|
13
|
+
clear() {
|
|
37
14
|
}
|
|
38
15
|
}
|
|
39
16
|
export {
|
|
40
|
-
|
|
17
|
+
Node as default
|
|
41
18
|
};
|
|
42
19
|
//# sourceMappingURL=Node.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/entry/content/adapters/vanilla/Node.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../../../../src/entry/content/adapters/vanilla/Node.ts"],"sourcesContent":["import {RenderNode} from \"../../lifecycle/nodes\";\nimport type {ContentScriptRenderValue} from \"@typing/content\";\n\nexport default class Node<Data = unknown> extends RenderNode<Data> {\n protected render(value: ContentScriptRenderValue<Data> | undefined, target: Element): boolean {\n if (value && typeof value === \"object\" && \"nodeType\" in value && value.nodeType === 1) {\n target.appendChild(value as Element);\n } else if (typeof value === \"string\" || typeof value === \"number\") {\n target.textContent = String(value);\n } else {\n return false;\n }\n\n return true;\n }\n\n protected clear(): void {}\n}\n"],"mappings":"AAAA,SAAQ,kBAAiB;AAGzB,MAAO,aAA2C,WAAiB;AAAA,EACrD,OAAO,OAAmD,QAA0B;AAC1F,QAAI,SAAS,OAAO,UAAU,YAAY,cAAc,SAAS,MAAM,aAAa,GAAG;AACnF,aAAO,YAAY,KAAgB;AAAA,IACvC,WAAW,OAAO,UAAU,YAAY,OAAO,UAAU,UAAU;AAC/D,aAAO,cAAc,OAAO,KAAK;AAAA,IACrC,OAAO;AACH,aAAO;AAAA,IACX;AAEA,WAAO;AAAA,EACX;AAAA,EAEU,QAAc;AAAA,EAAC;AAC7B;","names":[]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Builder from "./Builder.js";
|
|
2
2
|
export { Builder };
|
|
3
|
-
|
|
3
|
+
export { resolveDefinition } from "./resolvers/definition.js";
|
|
4
|
+
declare const _default: (definition: import("../../../../index.js").ContentScriptDefinition<unknown, "none" | "shadow" | "iframe">) => void;
|
|
4
5
|
export default _default;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import Builder from "./Builder.js";
|
|
2
|
+
import { resolveDefinition } from "./resolvers/definition.js";
|
|
2
3
|
var vanilla_default = Builder.resolver();
|
|
3
4
|
export {
|
|
4
5
|
Builder,
|
|
5
|
-
vanilla_default as default
|
|
6
|
+
vanilla_default as default,
|
|
7
|
+
resolveDefinition
|
|
6
8
|
};
|
|
7
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/entry/content/adapters/vanilla/index.ts"],"sourcesContent":["import Builder from \"./Builder\";\n\nexport {Builder};\n\nexport default Builder.resolver();\n"],"mappings":"AAAA,OAAO,aAAa;
|
|
1
|
+
{"version":3,"sources":["../../../../../src/entry/content/adapters/vanilla/index.ts"],"sourcesContent":["import Builder from \"./Builder\";\n\nexport {Builder};\nexport {resolveDefinition} from \"./resolvers/definition\";\n\nexport default Builder.resolver();\n"],"mappings":"AAAA,OAAO,aAAa;AAGpB,SAAQ,yBAAwB;AAEhC,IAAO,kBAAQ,QAAQ,SAAS;","names":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { mergeDefinition } from "../../../resolvers/definition.js";
|
|
2
|
+
import { isValidRenderValue } from "./render.js";
|
|
3
|
+
const resolveDefinition = (module) => {
|
|
4
|
+
return mergeDefinition(module, (value) => typeof value === "function" || isValidRenderValue(value));
|
|
5
|
+
};
|
|
6
|
+
export {
|
|
7
|
+
resolveDefinition
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/entry/content/adapters/vanilla/resolvers/definition.ts"],"sourcesContent":["import {mergeDefinition} from \"../../../resolvers/definition\";\nimport {isValidRenderValue} from \"./render\";\n\nimport type {ContentScriptDefinition} from \"@typing/content\";\n\nexport const resolveDefinition = (module: object): ContentScriptDefinition => {\n return mergeDefinition(module, value => typeof value === \"function\" || isValidRenderValue(value));\n};\n"],"mappings":"AAAA,SAAQ,uBAAsB;AAC9B,SAAQ,0BAAyB;AAI1B,MAAM,oBAAoB,CAAC,WAA4C;AAC1E,SAAO,gBAAgB,QAAQ,WAAS,OAAO,UAAU,cAAc,mBAAmB,KAAK,CAAC;AACpG;","names":[]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ContentScriptRenderHandler, ContentScriptRenderValue } from "../../../../../types/content/index.js";
|
|
2
|
+
export declare const isValidRenderValue: (value: unknown) => value is string | number | Element;
|
|
3
|
+
export declare const createRenderResolver: <Data = unknown>(render?: ContentScriptRenderValue<Data> | ContentScriptRenderHandler<Data>) => ContentScriptRenderHandler<Data>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const isValidRenderValue = (value) => {
|
|
2
|
+
return typeof value === "string" && value.length > 0 || typeof value === "number" || value instanceof Element;
|
|
3
|
+
};
|
|
4
|
+
const createRenderResolver = (render) => (props) => {
|
|
5
|
+
const resolvedRender = typeof render === "function" ? render(props) : render;
|
|
6
|
+
if (!isValidRenderValue(resolvedRender)) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
return resolvedRender;
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
createRenderResolver,
|
|
13
|
+
isValidRenderValue
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=render.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/entry/content/adapters/vanilla/resolvers/render.ts"],"sourcesContent":["import type {ContentScriptRenderHandler, ContentScriptRenderValue} from \"@typing/content\";\n\nexport const isValidRenderValue = (value: unknown): value is string | number | Element => {\n return (typeof value === \"string\" && value.length > 0) || typeof value === \"number\" || value instanceof Element;\n};\n\n// prettier-ignore\nexport const createRenderResolver =\n <Data = unknown>(render?: ContentScriptRenderValue<Data> | ContentScriptRenderHandler<Data>): ContentScriptRenderHandler<Data> =>\n props => {\n const resolvedRender = typeof render === \"function\" ? render(props) : render;\n\n if (!isValidRenderValue(resolvedRender)) {\n return;\n }\n\n return resolvedRender;\n };\n"],"mappings":"AAEO,MAAM,qBAAqB,CAAC,UAAuD;AACtF,SAAQ,OAAO,UAAU,YAAY,MAAM,SAAS,KAAM,OAAO,UAAU,YAAY,iBAAiB;AAC5G;AAGO,MAAM,uBACT,CAAiB,WACb,WAAS;AACL,QAAM,iBAAiB,OAAO,WAAW,aAAa,OAAO,KAAK,IAAI;AAEtE,MAAI,CAAC,mBAAmB,cAAc,GAAG;AACrC;AAAA,EACJ;AAEA,SAAO;AACX;","names":[]}
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import MountBuilder from "./lifecycle/MountBuilder.js";
|
|
2
|
+
export { MountBuilder as Builder };
|
|
3
|
+
export { resolveDefinition } from "./resolvers/definition.js";
|
|
4
|
+
declare const _default: (definition: import("../../index.js").ContentScriptDefinition<unknown, "none" | "shadow" | "iframe">) => void;
|
|
5
|
+
export default _default;
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import MountBuilder from "./lifecycle/MountBuilder.js";
|
|
2
|
+
import { resolveDefinition } from "./resolvers/definition.js";
|
|
3
|
+
var content_default = MountBuilder.resolver();
|
|
4
|
+
export {
|
|
5
|
+
MountBuilder as Builder,
|
|
6
|
+
content_default as default,
|
|
7
|
+
resolveDefinition
|
|
8
|
+
};
|
|
2
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/entry/content/index.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../../src/entry/content/index.ts"],"sourcesContent":["import MountBuilder from \"./lifecycle/MountBuilder\";\n\nexport {MountBuilder as Builder};\nexport {resolveDefinition} from \"./resolvers/definition\";\n\nexport default MountBuilder.resolver();\n"],"mappings":"AAAA,OAAO,kBAAkB;AAGzB,SAAQ,yBAAwB;AAEhC,IAAO,kBAAQ,aAAa,SAAS;","names":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import EntrypointBuilder from "../../core/Builder.js";
|
|
2
|
+
import { ManagedContext, EventEmitter } from "./context/index.js";
|
|
3
|
+
import { ContentScriptAnchor, ContentScriptAnchorGetter, ContentScriptBuilder, ContentScriptContainerCreator, ContentScriptContainerFactory, ContentScriptContainerOptions, ContentScriptContainerTag, ContentScriptContext, ContentScriptDefinition, ContentScriptIsolation, ContentScriptMarkerContract, ContentScriptMarkerGetter, ContentScriptMarkerResolver, ContentScriptMarkerType, ContentScriptMountFunction, ContentScriptNode, ContentScriptPrepareProps, ContentScriptRenderHandler, ContentScriptRenderValue, ContentScriptResolvedDefinition, ContentScriptWatchStrategy } from "../../../types/content/index.js";
|
|
4
|
+
export default abstract class Builder<Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> extends EntrypointBuilder implements ContentScriptBuilder {
|
|
5
|
+
private lock;
|
|
6
|
+
protected generation: number;
|
|
7
|
+
protected readonly definition: ContentScriptResolvedDefinition<Data>;
|
|
8
|
+
protected readonly emitter: EventEmitter;
|
|
9
|
+
protected readonly context: ManagedContext;
|
|
10
|
+
protected marker: ContentScriptMarkerContract;
|
|
11
|
+
protected unwatch?: () => void;
|
|
12
|
+
protected abstract createNode(anchor: Element, data: Data, enabled: boolean): Promise<ContentScriptNode>;
|
|
13
|
+
protected constructor(input: ContentScriptDefinition<Data, Isolation>);
|
|
14
|
+
protected resolveMarker(marker: ContentScriptMarkerType | ContentScriptMarkerGetter): ContentScriptMarkerResolver;
|
|
15
|
+
protected resolveAnchor(anchor?: ContentScriptAnchor | ContentScriptAnchorGetter): ContentScriptAnchorGetter;
|
|
16
|
+
protected resolveMount(mount?: ContentScriptMountFunction): ContentScriptMountFunction;
|
|
17
|
+
protected resolveContainer(container?: ContentScriptContainerTag | ContentScriptContainerOptions | ContentScriptContainerFactory<Data>): ContentScriptContainerCreator<Data>;
|
|
18
|
+
protected resolveRender(render?: ContentScriptRenderValue<Data> | ContentScriptRenderHandler<Data>): ContentScriptRenderHandler<Data> | undefined;
|
|
19
|
+
protected resolveWatch(watch?: true | ContentScriptWatchStrategy): ContentScriptWatchStrategy;
|
|
20
|
+
getContext(): ContentScriptContext;
|
|
21
|
+
build(): Promise<void>;
|
|
22
|
+
destroy(): Promise<void>;
|
|
23
|
+
protected getPrepareProps(anchor: Element): ContentScriptPrepareProps;
|
|
24
|
+
protected processing(generation: number): Promise<void>;
|
|
25
|
+
protected processAnchor(anchor: Element, generation: number): Promise<void>;
|
|
26
|
+
}
|