adnbn 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/builders/locale/LocaleBuilder.js +2 -11
- package/dist/cli/builders/locale/LocaleBuilder.js.map +1 -1
- package/dist/cli/builders/locale/index.js +1 -1
- package/dist/cli/builders/locale/index.js.map +1 -1
- package/dist/cli/builders/manifest/ManifestBase.d.ts +4 -1
- package/dist/cli/builders/manifest/ManifestBase.js +35 -6
- package/dist/cli/builders/manifest/ManifestBase.js.map +1 -1
- package/dist/cli/builders/manifest/ManifestV2.js +1 -1
- package/dist/cli/builders/manifest/ManifestV3.js +12 -5
- package/dist/cli/builders/manifest/ManifestV3.js.map +1 -1
- package/dist/cli/builders/manifest/utils/data-collection-permissions.d.ts +15 -0
- package/dist/cli/builders/manifest/utils/data-collection-permissions.js +26 -0
- package/dist/cli/builders/manifest/utils/data-collection-permissions.js.map +1 -0
- package/dist/cli/builders/manifest/utils/host-patterns.d.ts +1 -0
- package/dist/cli/builders/manifest/utils/host-patterns.js +40 -0
- package/dist/cli/builders/manifest/utils/host-patterns.js.map +1 -0
- package/dist/cli/builders/manifest/utils/index.d.ts +4 -0
- package/dist/cli/builders/manifest/utils/index.js +19 -0
- package/dist/cli/builders/manifest/utils/index.js.map +1 -0
- package/dist/cli/builders/manifest/utils/permissions.d.ts +14 -0
- package/dist/cli/builders/manifest/utils/permissions.js +34 -0
- package/dist/cli/builders/manifest/utils/permissions.js.map +1 -0
- package/dist/cli/builders/manifest/utils/web-accessible-resources.d.ts +2 -0
- package/dist/cli/builders/manifest/utils/web-accessible-resources.js +92 -0
- package/dist/cli/builders/manifest/utils/web-accessible-resources.js.map +1 -0
- package/dist/cli/bundler/plugins/build-assets-map/BuildAssetsMapPlugin.d.ts +14 -0
- package/dist/cli/bundler/plugins/build-assets-map/BuildAssetsMapPlugin.js +523 -0
- package/dist/cli/bundler/plugins/build-assets-map/BuildAssetsMapPlugin.js.map +1 -0
- package/dist/cli/bundler/plugins/build-assets-map/entrypoint-module.d.ts +13 -0
- package/dist/cli/bundler/plugins/build-assets-map/entrypoint-module.js +16 -0
- package/dist/cli/bundler/plugins/build-assets-map/entrypoint-module.js.map +1 -0
- package/dist/cli/bundler/plugins/build-assets-map/index.d.ts +3 -0
- package/dist/cli/bundler/plugins/build-assets-map/index.js +8 -0
- package/dist/cli/bundler/plugins/build-assets-map/index.js.map +1 -0
- package/dist/cli/bundler/plugins/build-assets-map/usage.d.ts +12 -0
- package/dist/cli/bundler/plugins/build-assets-map/usage.js +28 -0
- package/dist/cli/bundler/plugins/build-assets-map/usage.js.map +1 -0
- package/dist/cli/bundler/plugins/chunk-loader/ChunkLoaderPlugin.d.ts +9 -0
- package/dist/cli/bundler/plugins/chunk-loader/ChunkLoaderPlugin.js +43 -0
- package/dist/cli/bundler/plugins/chunk-loader/ChunkLoaderPlugin.js.map +1 -0
- package/dist/cli/bundler/plugins/chunk-loader/index.d.ts +1 -0
- package/dist/cli/bundler/plugins/chunk-loader/index.js +5 -0
- package/dist/cli/bundler/plugins/chunk-loader/index.js.map +1 -0
- package/dist/cli/bundler/plugins/chunk-loader/templates/runtime.template.d.ts +2 -0
- package/dist/cli/bundler/plugins/chunk-loader/templates.d.ts +7 -0
- package/dist/cli/bundler/plugins/chunk-loader/templates.js +30 -0
- package/dist/cli/bundler/plugins/{EntrypointPlugin.d.ts → entrypoint/EntrypointPlugin.d.ts} +7 -2
- package/dist/cli/bundler/plugins/{EntrypointPlugin.js → entrypoint/EntrypointPlugin.js} +46 -26
- package/dist/cli/bundler/plugins/entrypoint/EntrypointPlugin.js.map +1 -0
- package/dist/cli/bundler/plugins/entrypoint/index.d.ts +1 -0
- package/dist/cli/bundler/plugins/entrypoint/index.js +7 -0
- package/dist/cli/bundler/plugins/entrypoint/index.js.map +1 -0
- package/dist/cli/bundler/plugins/{GenerateJsonPlugin.d.ts → generate-json/GenerateJsonPlugin.d.ts} +1 -0
- package/dist/cli/bundler/plugins/generate-json/GenerateJsonPlugin.js +73 -0
- package/dist/cli/bundler/plugins/generate-json/GenerateJsonPlugin.js.map +1 -0
- package/dist/cli/bundler/plugins/generate-json/index.d.ts +1 -0
- package/dist/cli/bundler/plugins/generate-json/index.js +5 -0
- package/dist/cli/bundler/plugins/generate-json/index.js.map +1 -0
- package/dist/cli/bundler/plugins/generate-module/GenerateModulePlugin.d.ts +23 -0
- package/dist/cli/bundler/plugins/generate-module/GenerateModulePlugin.js +88 -0
- package/dist/cli/bundler/plugins/generate-module/GenerateModulePlugin.js.map +1 -0
- package/dist/cli/bundler/plugins/generate-module/index.d.ts +1 -0
- package/dist/cli/bundler/plugins/generate-module/index.js +7 -0
- package/dist/cli/bundler/plugins/generate-module/index.js.map +1 -0
- package/dist/cli/bundler/plugins/index.d.ts +11 -5
- package/dist/cli/bundler/plugins/index.js +32 -10
- package/dist/cli/bundler/plugins/index.js.map +1 -1
- package/dist/cli/bundler/plugins/isolated-styles/IsolatedStylesPlugin.d.ts +21 -0
- package/dist/cli/bundler/plugins/isolated-styles/IsolatedStylesPlugin.js +174 -0
- package/dist/cli/bundler/plugins/isolated-styles/IsolatedStylesPlugin.js.map +1 -0
- package/dist/cli/bundler/plugins/isolated-styles/index.d.ts +1 -0
- package/dist/cli/bundler/plugins/isolated-styles/index.js +5 -0
- package/dist/cli/bundler/plugins/isolated-styles/index.js.map +1 -0
- package/dist/cli/bundler/plugins/isolated-styles/templates/css-loader.template.d.ts +1 -0
- package/dist/cli/bundler/plugins/isolated-styles/templates/runtime.template.d.ts +7 -0
- package/dist/cli/bundler/plugins/isolated-styles/templates.d.ts +18 -0
- package/dist/cli/bundler/plugins/isolated-styles/templates.js +174 -0
- package/dist/cli/bundler/plugins/manifest/ManifestPlugin.d.ts +10 -0
- package/dist/cli/bundler/plugins/manifest/ManifestPlugin.js +55 -0
- package/dist/cli/bundler/plugins/manifest/ManifestPlugin.js.map +1 -0
- package/dist/cli/bundler/plugins/manifest/index.d.ts +1 -0
- package/dist/cli/bundler/plugins/manifest/index.js +6 -0
- package/dist/cli/bundler/plugins/manifest/index.js.map +1 -0
- package/dist/cli/bundler/plugins/replace/ReplacePlugin.js.map +1 -0
- package/dist/cli/bundler/plugins/replace/index.d.ts +1 -0
- package/dist/cli/bundler/plugins/replace/index.js +5 -0
- package/dist/cli/bundler/plugins/replace/index.js.map +1 -0
- package/dist/cli/bundler/plugins/resource-access/ResourceAccessPlugin.d.ts +19 -0
- package/dist/cli/bundler/plugins/resource-access/ResourceAccessPlugin.js +20 -0
- package/dist/cli/bundler/plugins/resource-access/ResourceAccessPlugin.js.map +1 -0
- package/dist/cli/bundler/plugins/resource-access/index.d.ts +1 -0
- package/dist/cli/bundler/plugins/resource-access/index.js +5 -0
- package/dist/cli/bundler/plugins/resource-access/index.js.map +1 -0
- package/dist/cli/bundler/plugins/resource-access/utils.d.ts +8 -0
- package/dist/cli/bundler/plugins/resource-access/utils.js +42 -0
- package/dist/cli/bundler/plugins/resource-access/utils.js.map +1 -0
- package/dist/cli/bundler/plugins/types.d.ts +4 -0
- package/dist/cli/bundler/plugins/types.js +1 -0
- package/dist/cli/bundler/plugins/types.js.map +1 -0
- package/dist/cli/bundler/plugins/utils/index.d.ts +3 -0
- package/dist/cli/bundler/plugins/utils/index.js +9 -0
- package/dist/cli/bundler/plugins/utils/index.js.map +1 -0
- package/dist/cli/bundler/plugins/utils/manifest-hooks.d.ts +13 -0
- package/dist/cli/bundler/plugins/utils/manifest-hooks.js +17 -0
- package/dist/cli/bundler/plugins/utils/manifest-hooks.js.map +1 -0
- package/dist/cli/bundler/plugins/utils/runtime-template.d.ts +1 -0
- package/dist/cli/bundler/plugins/utils/runtime-template.js +18 -0
- package/dist/cli/bundler/plugins/utils/runtime-template.js.map +1 -0
- package/dist/cli/bundler/plugins/utils/watch-compilation.d.ts +3 -0
- package/dist/cli/bundler/plugins/utils/watch-compilation.js +18 -0
- package/dist/cli/bundler/plugins/utils/watch-compilation.js.map +1 -0
- package/dist/cli/bundler/plugins/watch/WatchPlugin.js +16 -0
- package/dist/cli/bundler/plugins/watch/WatchPlugin.js.map +1 -0
- package/dist/cli/bundler/plugins/watch/index.d.ts +1 -0
- package/dist/cli/bundler/plugins/watch/index.js +5 -0
- package/dist/cli/bundler/plugins/watch/index.js.map +1 -0
- package/dist/cli/bundler/utils/chunk-filename.d.ts +6 -0
- package/dist/cli/bundler/utils/chunk-filename.js +93 -0
- package/dist/cli/bundler/utils/chunk-filename.js.map +1 -0
- package/dist/cli/bundler/utils/index.d.ts +2 -0
- package/dist/cli/bundler/utils/index.js +2 -0
- package/dist/cli/bundler/utils/index.js.map +1 -1
- package/dist/cli/bundler/utils/layers.d.ts +4 -0
- package/dist/cli/bundler/utils/layers.js +10 -0
- package/dist/cli/bundler/utils/layers.js.map +1 -0
- package/dist/cli/bundler/utils/output.d.ts +6 -2
- package/dist/cli/bundler/utils/output.js +165 -7
- package/dist/cli/bundler/utils/output.js.map +1 -1
- package/dist/cli/bundler/utils/styles.d.ts +5 -0
- package/dist/cli/bundler/utils/styles.js +30 -0
- package/dist/cli/bundler/utils/styles.js.map +1 -0
- package/dist/cli/entrypoint/file/ExpressionFile.d.ts +4 -1
- package/dist/cli/entrypoint/file/ExpressionFile.js +11 -0
- package/dist/cli/entrypoint/file/ExpressionFile.js.map +1 -1
- package/dist/cli/entrypoint/file/OptionFile.d.ts +4 -2
- package/dist/cli/entrypoint/file/OptionFile.js +35 -31
- package/dist/cli/entrypoint/file/OptionFile.js.map +1 -1
- package/dist/cli/entrypoint/file/SourceFile.d.ts +18 -7
- package/dist/cli/entrypoint/file/SourceFile.js +260 -156
- package/dist/cli/entrypoint/file/SourceFile.js.map +1 -1
- package/dist/cli/entrypoint/file/index.d.ts +2 -0
- package/dist/cli/entrypoint/file/index.js +2 -0
- package/dist/cli/entrypoint/file/index.js.map +1 -1
- package/dist/cli/entrypoint/file/injectors/core.js +22 -1
- package/dist/cli/entrypoint/file/injectors/core.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/ExportParser.d.ts +14 -0
- package/dist/cli/entrypoint/file/parsers/ExportParser.js +71 -0
- package/dist/cli/entrypoint/file/parsers/ExportParser.js.map +1 -0
- package/dist/cli/entrypoint/file/parsers/NodeFinder.d.ts +2 -0
- package/dist/cli/entrypoint/file/parsers/NodeFinder.js +9 -0
- package/dist/cli/entrypoint/file/parsers/NodeFinder.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/ObjectParser.js +5 -1
- package/dist/cli/entrypoint/file/parsers/ObjectParser.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/index.d.ts +1 -0
- package/dist/cli/entrypoint/file/parsers/index.js +2 -0
- package/dist/cli/entrypoint/file/parsers/index.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/types.d.ts +16 -0
- package/dist/cli/entrypoint/file/parsers/types.js +13 -0
- package/dist/cli/entrypoint/file/parsers/types.js.map +1 -1
- package/dist/cli/entrypoint/file/resolvers/ImportResolver.d.ts +1 -0
- package/dist/cli/entrypoint/file/resolvers/ImportResolver.js +3 -0
- package/dist/cli/entrypoint/file/resolvers/ImportResolver.js.map +1 -1
- package/dist/cli/entrypoint/file/types.d.ts +26 -1
- package/dist/cli/entrypoint/finder/AbstractEntrypointFinder.d.ts +2 -2
- package/dist/cli/entrypoint/finder/AbstractEntrypointFinder.js +2 -2
- package/dist/cli/entrypoint/finder/AbstractEntrypointFinder.js.map +1 -1
- package/dist/cli/entrypoint/finder/{AbstractOptionsFinder.js → AbstractParsedFinder.js} +3 -3
- package/dist/cli/entrypoint/finder/AbstractParsedFinder.js.map +1 -0
- package/dist/cli/entrypoint/finder/OptionsFinder.d.ts +13 -0
- package/dist/cli/entrypoint/finder/OptionsFinder.js +33 -0
- package/dist/cli/entrypoint/finder/OptionsFinder.js.map +1 -0
- package/dist/cli/entrypoint/finder/PluginFinder.d.ts +4 -4
- package/dist/cli/entrypoint/finder/PluginFinder.js +2 -2
- package/dist/cli/entrypoint/finder/PluginFinder.js.map +1 -1
- package/dist/cli/entrypoint/finder/index.d.ts +2 -1
- package/dist/cli/entrypoint/finder/index.js +20 -18
- package/dist/cli/entrypoint/finder/index.js.map +1 -1
- package/dist/cli/entrypoint/parser/AbstractParser.d.ts +3 -2
- package/dist/cli/entrypoint/parser/AbstractParser.js +6 -3
- package/dist/cli/entrypoint/parser/AbstractParser.js.map +1 -1
- package/dist/cli/entrypoint/parser/CommandParser.js +1 -1
- package/dist/cli/entrypoint/parser/CommandParser.js.map +1 -1
- package/dist/cli/entrypoint/parser/ContentParser.d.ts +5 -1
- package/dist/cli/entrypoint/parser/ContentParser.js +55 -3
- package/dist/cli/entrypoint/parser/ContentParser.js.map +1 -1
- package/dist/cli/entrypoint/parser/OptionsParser.d.ts +6 -0
- package/dist/cli/entrypoint/parser/OptionsParser.js +16 -0
- package/dist/cli/entrypoint/parser/OptionsParser.js.map +1 -0
- package/dist/cli/entrypoint/parser/RelayParser.d.ts +21 -2
- package/dist/cli/entrypoint/parser/RelayParser.js +4 -0
- package/dist/cli/entrypoint/parser/RelayParser.js.map +1 -1
- package/dist/cli/entrypoint/parser/index.d.ts +1 -0
- package/dist/cli/entrypoint/parser/index.js +16 -14
- package/dist/cli/entrypoint/parser/index.js.map +1 -1
- package/dist/cli/plugins/asset.js +9 -4
- package/dist/cli/plugins/asset.js.map +1 -1
- package/dist/cli/plugins/background/index.js +1 -1
- package/dist/cli/plugins/background/index.js.map +1 -1
- package/dist/cli/plugins/content/Content.d.ts +1 -1
- package/dist/cli/plugins/content/Content.js +3 -2
- package/dist/cli/plugins/content/Content.js.map +1 -1
- package/dist/cli/plugins/content/ContentManager.d.ts +8 -5
- package/dist/cli/plugins/content/ContentManager.js +79 -28
- package/dist/cli/plugins/content/ContentManager.js.map +1 -1
- package/dist/cli/plugins/content/ContentName.d.ts +1 -1
- package/dist/cli/plugins/content/ContentName.js +8 -7
- package/dist/cli/plugins/content/ContentName.js.map +1 -1
- package/dist/cli/plugins/content/Relay.d.ts +1 -1
- package/dist/cli/plugins/content/Relay.js +3 -2
- package/dist/cli/plugins/content/Relay.js.map +1 -1
- package/dist/cli/plugins/content/bundler.d.ts +7 -0
- package/dist/cli/plugins/content/bundler.js +47 -0
- package/dist/cli/plugins/content/bundler.js.map +1 -0
- package/dist/cli/plugins/content/index.js +121 -62
- package/dist/cli/plugins/content/index.js.map +1 -1
- package/dist/cli/plugins/content/relay-module.d.ts +3 -0
- package/dist/cli/plugins/content/relay-module.js +11 -0
- package/dist/cli/plugins/content/relay-module.js.map +1 -0
- package/dist/cli/plugins/content/types.d.ts +1 -1
- package/dist/cli/plugins/content/utils.d.ts +2 -0
- package/dist/cli/plugins/content/utils.js +8 -1
- package/dist/cli/plugins/content/utils.js.map +1 -1
- package/dist/cli/plugins/icon/declaration/IconDeclaration.d.ts +1 -1
- package/dist/cli/plugins/icon/declaration/IconDeclaration.js +6 -6
- package/dist/cli/plugins/icon/declaration/IconDeclaration.js.map +1 -1
- package/dist/cli/plugins/icon/declaration/icon.d.ts +3 -5
- package/dist/cli/plugins/icon/icon-module.d.ts +2 -0
- package/dist/cli/plugins/icon/icon-module.js +11 -0
- package/dist/cli/plugins/icon/icon-module.js.map +1 -0
- package/dist/cli/plugins/icon/index.js +5 -3
- package/dist/cli/plugins/icon/index.js.map +1 -1
- package/dist/cli/plugins/index.d.ts +1 -0
- package/dist/cli/plugins/index.js +22 -20
- package/dist/cli/plugins/index.js.map +1 -1
- package/dist/cli/plugins/locale/Locale.d.ts +9 -2
- package/dist/cli/plugins/locale/Locale.js +37 -5
- package/dist/cli/plugins/locale/Locale.js.map +1 -1
- package/dist/cli/plugins/locale/declaration/locale.d.ts +1 -1
- package/dist/cli/plugins/locale/index.js +57 -22
- package/dist/cli/plugins/locale/index.js.map +1 -1
- package/dist/cli/plugins/locale/locale-module.d.ts +4 -0
- package/dist/cli/plugins/locale/locale-module.js +16 -0
- package/dist/cli/plugins/locale/locale-module.js.map +1 -0
- package/dist/cli/plugins/offscreen/Offscreen.d.ts +2 -3
- package/dist/cli/plugins/offscreen/Offscreen.js.map +1 -1
- package/dist/cli/plugins/offscreen/index.js +5 -4
- package/dist/cli/plugins/offscreen/index.js.map +1 -1
- package/dist/cli/plugins/offscreen/offscreen-module.d.ts +3 -0
- package/dist/cli/plugins/offscreen/offscreen-module.js +11 -0
- package/dist/cli/plugins/offscreen/offscreen-module.js.map +1 -0
- package/dist/cli/plugins/options/Options.d.ts +10 -0
- package/dist/cli/plugins/options/Options.js +24 -0
- package/dist/cli/plugins/options/Options.js.map +1 -0
- package/dist/cli/plugins/options/index.d.ts +2 -0
- package/dist/cli/plugins/options/index.js +41 -0
- package/dist/cli/plugins/options/index.js.map +1 -0
- package/dist/cli/plugins/output.js +33 -3
- package/dist/cli/plugins/output.js.map +1 -1
- package/dist/cli/plugins/page/declaration/PageDeclaration.js +4 -4
- package/dist/cli/plugins/page/declaration/PageDeclaration.js.map +1 -1
- package/dist/cli/plugins/page/declaration/page.d.ts +3 -3
- package/dist/cli/plugins/page/index.js +14 -10
- package/dist/cli/plugins/page/index.js.map +1 -1
- package/dist/cli/plugins/page/page-module.d.ts +2 -0
- package/dist/cli/plugins/page/page-module.js +11 -0
- package/dist/cli/plugins/page/page-module.js.map +1 -0
- package/dist/cli/plugins/popup/Popup.d.ts +1 -1
- package/dist/cli/plugins/popup/Popup.js +2 -2
- package/dist/cli/plugins/popup/Popup.js.map +1 -1
- package/dist/cli/plugins/popup/declaration/PopupDeclaration.d.ts +1 -1
- package/dist/cli/plugins/popup/declaration/PopupDeclaration.js +6 -6
- package/dist/cli/plugins/popup/declaration/PopupDeclaration.js.map +1 -1
- package/dist/cli/plugins/popup/declaration/popup.d.ts +3 -3
- package/dist/cli/plugins/popup/index.js +6 -5
- package/dist/cli/plugins/popup/index.js.map +1 -1
- package/dist/cli/plugins/popup/popup-module.d.ts +3 -0
- package/dist/cli/plugins/popup/popup-module.js +11 -0
- package/dist/cli/plugins/popup/popup-module.js.map +1 -0
- package/dist/cli/plugins/sandbox/Sandbox.d.ts +1 -2
- package/dist/cli/plugins/sandbox/Sandbox.js.map +1 -1
- package/dist/cli/plugins/sandbox/index.js +5 -4
- package/dist/cli/plugins/sandbox/index.js.map +1 -1
- package/dist/cli/plugins/sandbox/sandbox-module.d.ts +3 -0
- package/dist/cli/plugins/sandbox/sandbox-module.js +11 -0
- package/dist/cli/plugins/sandbox/sandbox-module.js.map +1 -0
- package/dist/cli/plugins/sidebar/Sidebar.d.ts +1 -1
- package/dist/cli/plugins/sidebar/Sidebar.js +2 -2
- package/dist/cli/plugins/sidebar/Sidebar.js.map +1 -1
- package/dist/cli/plugins/sidebar/declaration/SidebarDeclaration.d.ts +1 -1
- package/dist/cli/plugins/sidebar/declaration/SidebarDeclaration.js +6 -6
- package/dist/cli/plugins/sidebar/declaration/SidebarDeclaration.js.map +1 -1
- package/dist/cli/plugins/sidebar/declaration/sidebar.d.ts +3 -3
- package/dist/cli/plugins/sidebar/index.js +6 -5
- package/dist/cli/plugins/sidebar/index.js.map +1 -1
- package/dist/cli/plugins/sidebar/sidebar-module.d.ts +3 -0
- package/dist/cli/plugins/sidebar/sidebar-module.js +11 -0
- package/dist/cli/plugins/sidebar/sidebar-module.js.map +1 -0
- package/dist/cli/plugins/style/index.d.ts +2 -1
- package/dist/cli/plugins/style/index.js +52 -25
- package/dist/cli/plugins/style/index.js.map +1 -1
- package/dist/cli/plugins/style/types.d.ts +5 -0
- package/dist/cli/plugins/style/types.js +1 -0
- package/dist/cli/plugins/style/types.js.map +1 -0
- package/dist/cli/plugins/view/index.js +1 -1
- package/dist/cli/plugins/view/index.js.map +1 -1
- 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 +4 -1
- package/dist/cli/resolvers/config.js.map +1 -1
- package/dist/cli/virtual/index.d.ts +2 -2
- package/dist/cli/virtual/index.js +11 -8
- package/dist/cli/virtual/virtual.d.ts +8 -10
- package/dist/entry/content/adapters/react/Builder.js +1 -1
- package/dist/entry/content/adapters/react/Builder.js.map +1 -1
- package/dist/entry/content/adapters/react/Node.d.ts +2 -0
- package/dist/entry/content/adapters/react/Node.js +10 -2
- package/dist/entry/content/adapters/react/Node.js.map +1 -1
- package/dist/entry/content/adapters/vanilla/Builder.js +1 -1
- package/dist/entry/content/adapters/vanilla/Builder.js.map +1 -1
- package/dist/entry/content/adapters/vanilla/Node.d.ts +2 -1
- package/dist/entry/content/adapters/vanilla/Node.js +10 -7
- package/dist/entry/content/adapters/vanilla/Node.js.map +1 -1
- package/dist/entry/content/core/Builder.d.ts +1 -2
- package/dist/entry/content/core/Builder.js +9 -5
- package/dist/entry/content/core/Builder.js.map +1 -1
- package/dist/entry/content/core/MountBuilder.js +14 -6
- package/dist/entry/content/core/MountBuilder.js.map +1 -1
- package/dist/entry/content/core/{Context.d.ts → context/Context.d.ts} +2 -1
- package/dist/entry/content/core/{Context.js → context/Context.js} +7 -0
- package/dist/entry/content/core/context/Context.js.map +1 -0
- package/dist/entry/content/core/{EventEmitter.d.ts → context/EventEmitter.d.ts} +1 -1
- package/dist/entry/content/core/{EventEmitter.js → context/EventEmitter.js} +1 -1
- package/dist/entry/content/core/context/EventEmitter.js.map +1 -0
- package/dist/entry/content/core/{ManagedContext.d.ts → context/ManagedContext.d.ts} +1 -1
- package/dist/entry/content/core/context/ManagedContext.js.map +1 -0
- package/dist/entry/content/core/context/index.d.ts +3 -0
- package/dist/entry/content/core/context/index.js +9 -0
- package/dist/entry/content/core/context/index.js.map +1 -0
- package/dist/entry/content/core/{AbstractMarker.d.ts → markers/AbstractMarker.d.ts} +1 -1
- package/dist/entry/content/core/{AbstractMarker.js → markers/AbstractMarker.js} +1 -1
- package/dist/entry/content/core/markers/AbstractMarker.js.map +1 -0
- package/dist/entry/content/core/{AttributeMarker.d.ts → markers/AttributeMarker.d.ts} +1 -1
- package/dist/entry/content/core/markers/AttributeMarker.js.map +1 -0
- package/dist/entry/content/core/{WeakMarker.d.ts → markers/WeakMarker.d.ts} +1 -1
- package/dist/entry/content/core/markers/WeakMarker.js.map +1 -0
- package/dist/entry/content/core/markers/index.d.ts +3 -0
- package/dist/entry/content/core/markers/index.js +9 -0
- package/dist/entry/content/core/markers/index.js.map +1 -0
- package/dist/entry/content/core/{EventNode.d.ts → nodes/EventNode.d.ts} +2 -1
- package/dist/entry/content/core/{EventNode.js → nodes/EventNode.js} +3 -0
- package/dist/entry/content/core/nodes/EventNode.js.map +1 -0
- package/dist/entry/content/core/nodes/FrameNode.d.ts +23 -0
- package/dist/entry/content/core/nodes/FrameNode.js +125 -0
- package/dist/entry/content/core/nodes/FrameNode.js.map +1 -0
- package/dist/entry/content/core/{MarkerNode.d.ts → nodes/MarkerNode.d.ts} +2 -1
- package/dist/entry/content/core/{MarkerNode.js → nodes/MarkerNode.js} +3 -0
- package/dist/entry/content/core/nodes/MarkerNode.js.map +1 -0
- package/dist/entry/content/core/{MountNode.d.ts → nodes/MountNode.d.ts} +2 -1
- package/dist/entry/content/core/{MountNode.js → nodes/MountNode.js} +3 -0
- package/dist/entry/content/core/nodes/MountNode.js.map +1 -0
- package/dist/entry/content/core/{Node.d.ts → nodes/Node.d.ts} +2 -1
- package/dist/entry/content/core/{Node.js → nodes/Node.js} +3 -0
- package/dist/entry/content/core/nodes/Node.js.map +1 -0
- package/dist/entry/content/core/nodes/ShadowNode.d.ts +14 -0
- package/dist/entry/content/core/nodes/ShadowNode.js +67 -0
- package/dist/entry/content/core/nodes/ShadowNode.js.map +1 -0
- package/dist/entry/content/core/nodes/index.d.ts +6 -0
- package/dist/entry/content/core/nodes/index.js +15 -0
- package/dist/entry/content/core/nodes/index.js.map +1 -0
- package/dist/entry/content/core/nodes/isolated-styles.d.ts +2 -0
- package/dist/entry/content/core/nodes/isolated-styles.js +14 -0
- package/dist/entry/content/core/nodes/isolated-styles.js.map +1 -0
- package/dist/entry/content/core/resolvers/watch.js +1 -1
- package/dist/entry/content/core/resolvers/watch.js.map +1 -1
- package/dist/entry/content/frame/Builder.d.ts +7 -0
- package/dist/entry/content/frame/Builder.js +14 -0
- package/dist/entry/content/frame/Builder.js.map +1 -0
- package/dist/entry/content/frame/index.d.ts +4 -0
- package/dist/entry/content/frame/index.js +7 -0
- package/dist/entry/content/frame/index.js.map +1 -0
- package/dist/entry/relay/Builder.js +5 -1
- package/dist/entry/relay/Builder.js.map +1 -1
- package/dist/entry/relay/index.d.ts +1 -1
- package/dist/locale/adapters/react/ReactLocale.d.ts +18 -0
- package/dist/locale/adapters/react/ReactLocale.js +41 -0
- package/dist/locale/adapters/react/ReactLocale.js.map +1 -0
- package/dist/locale/adapters/react/hooks/use-locale-attributes.d.ts +7 -0
- package/dist/locale/adapters/react/hooks/use-locale-attributes.js +30 -0
- package/dist/locale/adapters/react/hooks/use-locale-attributes.js.map +1 -0
- package/dist/locale/adapters/react/hooks/use-locale.d.ts +3 -0
- package/dist/locale/adapters/react/hooks/use-locale.js +17 -0
- package/dist/locale/adapters/react/hooks/use-locale.js.map +1 -0
- package/dist/locale/adapters/react/hooks/use-native-locale.d.ts +3 -0
- package/dist/locale/adapters/react/hooks/use-native-locale.js +10 -0
- package/dist/locale/adapters/react/hooks/use-native-locale.js.map +1 -0
- package/dist/locale/adapters/react/index.d.ts +4 -2
- package/dist/locale/adapters/react/index.js +6 -4
- package/dist/locale/adapters/react/index.js.map +1 -1
- package/dist/locale/adapters/react/types.d.ts +22 -0
- package/dist/locale/adapters/react/types.js +1 -0
- package/dist/locale/adapters/react/types.js.map +1 -0
- package/dist/locale/helpers.d.ts +4 -5
- package/dist/locale/helpers.js +1 -1
- package/dist/locale/helpers.js.map +1 -1
- package/dist/locale/index.d.ts +2 -1
- package/dist/locale/index.js +1 -0
- package/dist/locale/index.js.map +1 -1
- package/dist/locale/providers/AbstractLocale.d.ts +4 -4
- package/dist/locale/providers/AbstractLocale.js +13 -94
- package/dist/locale/providers/AbstractLocale.js.map +1 -1
- package/dist/locale/providers/CustomLocale.d.ts +3 -3
- package/dist/locale/providers/CustomLocale.js +6 -5
- package/dist/locale/providers/CustomLocale.js.map +1 -1
- package/dist/locale/providers/DynamicLocale.d.ts +18 -11
- package/dist/locale/providers/DynamicLocale.js +60 -47
- package/dist/locale/providers/DynamicLocale.js.map +1 -1
- package/dist/locale/providers/NativeLocale.d.ts +4 -7
- package/dist/locale/providers/NativeLocale.js +5 -14
- package/dist/locale/providers/NativeLocale.js.map +1 -1
- package/dist/locale/providers/ObservableLocale.d.ts +35 -0
- package/dist/locale/providers/ObservableLocale.js +179 -0
- package/dist/locale/providers/ObservableLocale.js.map +1 -0
- package/dist/locale/providers/index.d.ts +2 -1
- package/dist/locale/providers/index.js +3 -1
- package/dist/locale/providers/index.js.map +1 -1
- package/dist/locale/storage/LocaleStorage.d.ts +11 -0
- package/dist/locale/storage/LocaleStorage.js +40 -0
- package/dist/locale/storage/LocaleStorage.js.map +1 -0
- package/dist/locale/storage/index.d.ts +1 -0
- package/dist/locale/storage/index.js +5 -0
- package/dist/locale/storage/index.js.map +1 -0
- package/dist/main/entrypoint.d.ts +4 -0
- package/dist/main/entrypoint.js +20 -0
- package/dist/main/entrypoint.js.map +1 -0
- package/dist/main/icon.d.ts +2 -3
- package/dist/main/icon.js +2 -1
- package/dist/main/icon.js.map +1 -1
- package/dist/main/index.d.ts +2 -0
- package/dist/main/index.js +2 -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/options.d.ts +3 -0
- package/dist/main/options.js +7 -0
- package/dist/main/options.js.map +1 -0
- package/dist/main/page.d.ts +2 -4
- package/dist/main/page.js +2 -1
- package/dist/main/page.js.map +1 -1
- package/dist/main/popup.d.ts +2 -5
- package/dist/main/popup.js +3 -3
- package/dist/main/popup.js.map +1 -1
- package/dist/main/relay.d.ts +1 -2
- package/dist/main/relay.js +2 -1
- package/dist/main/relay.js.map +1 -1
- package/dist/main/sandbox.d.ts +1 -4
- package/dist/main/sandbox.js +2 -1
- package/dist/main/sandbox.js.map +1 -1
- package/dist/main/service.d.ts +1 -2
- package/dist/main/service.js.map +1 -1
- package/dist/main/sidebar.d.ts +2 -5
- package/dist/main/sidebar.js +3 -3
- package/dist/main/sidebar.js.map +1 -1
- package/dist/message/index.d.ts +2 -4
- package/dist/message/index.js.map +1 -1
- package/dist/offscreen/index.d.ts +2 -6
- package/dist/offscreen/index.js.map +1 -1
- package/dist/relay/index.d.ts +2 -5
- package/dist/relay/index.js.map +1 -1
- package/dist/sandbox/index.d.ts +1 -5
- package/dist/sandbox/index.js.map +1 -1
- package/dist/service/index.d.ts +2 -6
- package/dist/service/index.js.map +1 -1
- package/dist/shared/content/index.d.ts +1 -0
- package/dist/shared/content/index.js +6 -0
- package/dist/shared/content/index.js.map +1 -0
- package/dist/shared/content/isolation.d.ts +4 -0
- package/dist/shared/content/isolation.js +70 -0
- package/dist/shared/content/isolation.js.map +1 -0
- package/dist/shared/locale/index.d.ts +5 -0
- package/dist/shared/locale/index.js +21 -0
- package/dist/shared/locale/index.js.map +1 -0
- package/dist/shared/locale/keys.d.ts +5 -0
- package/dist/shared/locale/keys.js +33 -0
- package/dist/shared/locale/keys.js.map +1 -0
- package/dist/shared/locale/language.d.ts +4 -0
- package/dist/shared/locale/language.js +23 -0
- package/dist/shared/locale/language.js.map +1 -0
- package/dist/shared/locale/messages.d.ts +3 -0
- package/dist/shared/locale/messages.js +9 -0
- package/dist/shared/locale/messages.js.map +1 -0
- package/dist/shared/locale/plural.d.ts +2 -0
- package/dist/shared/locale/plural.js +81 -0
- package/dist/shared/locale/plural.js.map +1 -0
- package/dist/shared/locale/substitutions.d.ts +10 -0
- package/dist/shared/locale/substitutions.js +32 -0
- package/dist/shared/locale/substitutions.js.map +1 -0
- package/dist/types/background.d.ts +1 -1
- package/dist/types/background.js.map +1 -1
- package/dist/types/command.d.ts +1 -1
- package/dist/types/command.js.map +1 -1
- package/dist/types/content.d.ts +120 -31
- package/dist/types/content.js +22 -1
- package/dist/types/content.js.map +1 -1
- package/dist/types/entrypoint.d.ts +20 -0
- package/dist/types/entrypoint.js +4 -0
- package/dist/types/entrypoint.js.map +1 -1
- package/dist/types/icon.d.ts +8 -0
- package/dist/types/icon.js.map +1 -1
- package/dist/types/language.d.ts +57 -0
- package/dist/types/language.js +62 -0
- package/dist/types/language.js.map +1 -0
- package/dist/types/locale.d.ts +34 -63
- package/dist/types/locale.js +62 -119
- package/dist/types/locale.js.map +1 -1
- package/dist/types/manifest.d.ts +24 -7
- package/dist/types/manifest.js.map +1 -1
- package/dist/types/message.d.ts +7 -0
- package/dist/types/message.js.map +1 -1
- package/dist/types/offscreen.d.ts +14 -1
- package/dist/types/offscreen.js.map +1 -1
- package/dist/types/options.d.ts +9 -0
- package/dist/types/options.js +1 -0
- package/dist/types/options.js.map +1 -0
- package/dist/types/page.d.ts +8 -0
- package/dist/types/plugin.d.ts +2 -1
- package/dist/types/popup.d.ts +9 -0
- package/dist/types/relay.d.ts +16 -7
- package/dist/types/relay.js.map +1 -1
- package/dist/types/sandbox.d.ts +12 -0
- package/dist/types/sandbox.js.map +1 -1
- package/dist/types/service.d.ts +10 -1
- package/dist/types/service.js.map +1 -1
- package/dist/types/sidebar.d.ts +9 -0
- package/dist/types/sidebar.js.map +1 -1
- package/dist/types/transport.d.ts +4 -0
- package/dist/virtual/entrypoint.d.ts +5 -0
- package/dist/virtual/entrypoint.js +7 -0
- package/dist/virtual/entrypoint.js.map +1 -0
- package/dist/virtual/icon.d.ts +2 -0
- package/dist/virtual/icon.js +5 -0
- package/dist/virtual/icon.js.map +1 -0
- package/dist/virtual/locale.d.ts +7 -0
- package/dist/virtual/locale.js +13 -0
- package/dist/virtual/locale.js.map +1 -0
- package/dist/virtual/modules.d.ts +40 -0
- package/dist/virtual/offscreen.d.ts +3 -0
- package/dist/virtual/offscreen.js +5 -0
- package/dist/virtual/offscreen.js.map +1 -0
- package/dist/virtual/page.d.ts +2 -0
- package/dist/virtual/page.js +5 -0
- package/dist/virtual/page.js.map +1 -0
- package/dist/virtual/popup.d.ts +3 -0
- package/dist/virtual/popup.js +5 -0
- package/dist/virtual/popup.js.map +1 -0
- package/dist/virtual/relay.d.ts +3 -0
- package/dist/virtual/relay.js +5 -0
- package/dist/virtual/relay.js.map +1 -0
- package/dist/virtual/sandbox.d.ts +3 -0
- package/dist/virtual/sandbox.js +5 -0
- package/dist/virtual/sandbox.js.map +1 -0
- package/dist/virtual/sidebar.d.ts +3 -0
- package/dist/virtual/sidebar.js +5 -0
- package/dist/virtual/sidebar.js.map +1 -0
- package/package.json +31 -10
- package/scripts/clean-dist.js +7 -0
- package/scripts/copy-dts.js +11 -1
- package/types/client.d.ts +15 -0
- package/dist/cli/builders/manifest/utils.d.ts +0 -32
- package/dist/cli/builders/manifest/utils.js +0 -209
- package/dist/cli/builders/manifest/utils.js.map +0 -1
- package/dist/cli/bundler/plugins/EntrypointPlugin.js.map +0 -1
- package/dist/cli/bundler/plugins/GenerateJsonPlugin.js +0 -40
- package/dist/cli/bundler/plugins/GenerateJsonPlugin.js.map +0 -1
- package/dist/cli/bundler/plugins/ManifestPlugin.d.ts +0 -10
- package/dist/cli/bundler/plugins/ManifestPlugin.js +0 -78
- package/dist/cli/bundler/plugins/ManifestPlugin.js.map +0 -1
- package/dist/cli/bundler/plugins/ReplacePlugin.js.map +0 -1
- package/dist/cli/bundler/plugins/WatchPlugin.js +0 -21
- package/dist/cli/bundler/plugins/WatchPlugin.js.map +0 -1
- package/dist/cli/entrypoint/finder/AbstractOptionsFinder.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/Context.js.map +0 -1
- package/dist/entry/content/core/EventEmitter.js.map +0 -1
- package/dist/entry/content/core/EventNode.js.map +0 -1
- package/dist/entry/content/core/ManagedContext.js.map +0 -1
- package/dist/entry/content/core/MarkerNode.js.map +0 -1
- package/dist/entry/content/core/MountNode.js.map +0 -1
- package/dist/entry/content/core/Node.js.map +0 -1
- package/dist/entry/content/core/WeakMarker.js.map +0 -1
- package/dist/locale/adapters/react/LocaleProvider.d.ts +0 -7
- package/dist/locale/adapters/react/LocaleProvider.js +0 -58
- package/dist/locale/adapters/react/LocaleProvider.js.map +0 -1
- package/dist/locale/adapters/react/context.d.ts +0 -14
- package/dist/locale/adapters/react/context.js +0 -25
- package/dist/locale/adapters/react/context.js.map +0 -1
- package/dist/locale/utils.d.ts +0 -11
- package/dist/locale/utils.js +0 -67
- package/dist/locale/utils.js.map +0 -1
- /package/dist/cli/bundler/plugins/{ReplacePlugin.d.ts → replace/ReplacePlugin.d.ts} +0 -0
- /package/dist/cli/bundler/plugins/{ReplacePlugin.js → replace/ReplacePlugin.js} +0 -0
- /package/dist/cli/bundler/plugins/{WatchPlugin.d.ts → watch/WatchPlugin.d.ts} +0 -0
- /package/dist/cli/entrypoint/finder/{AbstractOptionsFinder.d.ts → AbstractParsedFinder.d.ts} +0 -0
- /package/dist/entry/content/core/{ManagedContext.js → context/ManagedContext.js} +0 -0
- /package/dist/entry/content/core/{AttributeMarker.js → markers/AttributeMarker.js} +0 -0
- /package/dist/entry/content/core/{WeakMarker.js → markers/WeakMarker.js} +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const PageModuleName = "#adnbn/page";
|
|
2
|
+
const createPageModule = (aliases) => (
|
|
3
|
+
// Preserve own __proto__ keys and allow unused data to be removed from optimized bundles.
|
|
4
|
+
`export const aliases = /*#__PURE__*/ JSON.parse(${JSON.stringify(JSON.stringify(aliases))});
|
|
5
|
+
`
|
|
6
|
+
);
|
|
7
|
+
export {
|
|
8
|
+
PageModuleName,
|
|
9
|
+
createPageModule
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=page-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/cli/plugins/page/page-module.ts"],"sourcesContent":["export const PageModuleName = \"#adnbn/page\";\n\nexport const createPageModule = (aliases: Record<string, string>): string =>\n // Preserve own __proto__ keys and allow unused data to be removed from optimized bundles.\n `export const aliases = /*#__PURE__*/ JSON.parse(${JSON.stringify(JSON.stringify(aliases))});\\n`;\n"],"mappings":"AAAO,MAAM,iBAAiB;AAEvB,MAAM,mBAAmB,CAAC;AAAA;AAAA,EAE7B,mDAAmD,KAAK,UAAU,KAAK,UAAU,OAAO,CAAC,CAAC;AAAA;AAAA;","names":[]}
|
|
@@ -3,7 +3,7 @@ import { PopupFinder } from "../../entrypoint/index.js";
|
|
|
3
3
|
import { ReadonlyConfig } from "../../../types/config.js";
|
|
4
4
|
import { PopupEntrypointOptions } from "../../../types/popup.js";
|
|
5
5
|
import { ManifestPopup } from "../../../types/manifest.js";
|
|
6
|
-
export type PopupNameToManifest =
|
|
6
|
+
export type PopupNameToManifest = Record<string, ManifestPopup>;
|
|
7
7
|
export default class extends PopupFinder {
|
|
8
8
|
protected _view?: View<PopupEntrypointOptions>;
|
|
9
9
|
constructor(config: ReadonlyConfig);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { View } from "../view/index.js";
|
|
2
|
-
import { modifyLocaleMessageKey } from "./../../../locale/
|
|
2
|
+
import { modifyLocaleMessageKey } from "./../../../shared/locale/index.js";
|
|
3
3
|
import { PopupFinder } from "./../../../cli/entrypoint/index.js";
|
|
4
4
|
class Popup_default extends PopupFinder {
|
|
5
5
|
_view;
|
|
@@ -34,7 +34,7 @@ class Popup_default extends PopupFinder {
|
|
|
34
34
|
icon
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
-
},
|
|
37
|
+
}, {});
|
|
38
38
|
}
|
|
39
39
|
clear() {
|
|
40
40
|
this._view = void 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/cli/plugins/popup/Popup.ts"],"sourcesContent":["import {View} from \"../view\";\n\nimport {modifyLocaleMessageKey} from \"@locale
|
|
1
|
+
{"version":3,"sources":["../../../../src/cli/plugins/popup/Popup.ts"],"sourcesContent":["import {View} from \"../view\";\n\nimport {modifyLocaleMessageKey} from \"@shared/locale\";\n\nimport {PopupFinder} from \"@cli/entrypoint/index.js\";\n\nimport {ReadonlyConfig} from \"@typing/config\";\nimport {PopupEntrypointOptions} from \"@typing/popup\";\nimport {ManifestPopup} from \"@typing/manifest\";\n\nexport type PopupNameToManifest = Record<string, ManifestPopup>;\n\nexport default class extends PopupFinder {\n protected _view?: View<PopupEntrypointOptions>;\n\n public constructor(config: ReadonlyConfig) {\n super(config);\n }\n\n public view(): View<PopupEntrypointOptions> {\n return (this._view ??= new View(this.config, this));\n }\n\n public async manifest(): Promise<ManifestPopup | undefined> {\n const views = await this.views();\n\n for (const {filename, options} of views.values()) {\n const {apply = true, title, icon} = options;\n\n if (apply) {\n return {\n path: filename,\n title: modifyLocaleMessageKey(title),\n icon,\n };\n }\n }\n }\n\n public async manifestByAlias(): Promise<PopupNameToManifest> {\n return Array.from(await this.views()).reduce((aliases, [_, item]) => {\n const {options, filename} = item;\n const {title, icon} = options;\n\n return {\n ...aliases,\n [item.alias]: {\n path: filename,\n title,\n icon,\n },\n };\n }, {} as PopupNameToManifest);\n }\n\n public clear(): this {\n this._view = undefined;\n\n return super.clear();\n }\n}\n"],"mappings":"AAAA,SAAQ,YAAW;AAEnB,SAAQ,8BAA6B;AAErC,SAAQ,mBAAkB;AAQ1B,MAAO,sBAAsB,YAAY;AAAA,EAC3B;AAAA,EAEH,YAAY,QAAwB;AACvC,UAAM,MAAM;AAAA,EAChB;AAAA,EAEO,OAAqC;AACxC,WAAQ,KAAK,UAAL,KAAK,QAAU,IAAI,KAAK,KAAK,QAAQ,IAAI;AAAA,EACrD;AAAA,EAEA,MAAa,WAA+C;AACxD,UAAM,QAAQ,MAAM,KAAK,MAAM;AAE/B,eAAW,EAAC,UAAU,QAAO,KAAK,MAAM,OAAO,GAAG;AAC9C,YAAM,EAAC,QAAQ,MAAM,OAAO,KAAI,IAAI;AAEpC,UAAI,OAAO;AACP,eAAO;AAAA,UACH,MAAM;AAAA,UACN,OAAO,uBAAuB,KAAK;AAAA,UACnC;AAAA,QACJ;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AAAA,EAEA,MAAa,kBAAgD;AACzD,WAAO,MAAM,KAAK,MAAM,KAAK,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,IAAI,MAAM;AACjE,YAAM,EAAC,SAAS,SAAQ,IAAI;AAC5B,YAAM,EAAC,OAAO,KAAI,IAAI;AAEtB,aAAO;AAAA,QACH,GAAG;AAAA,QACH,CAAC,KAAK,KAAK,GAAG;AAAA,UACV,MAAM;AAAA,UACN;AAAA,UACA;AAAA,QACJ;AAAA,MACJ;AAAA,IACJ,GAAG,CAAC,CAAwB;AAAA,EAChC;AAAA,EAEO,QAAc;AACjB,SAAK,QAAQ;AAEb,WAAO,MAAM,MAAM;AAAA,EACvB;AACJ;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FileBuilder } from "../../../plugins/typescript/index.js";
|
|
2
2
|
import { ReadonlyConfig } from "../../../../types/config.js";
|
|
3
|
-
export default class extends FileBuilder {
|
|
3
|
+
export default class PopupDeclaration extends FileBuilder {
|
|
4
4
|
protected alias: Set<string>;
|
|
5
5
|
constructor(config: ReadonlyConfig);
|
|
6
6
|
protected filename(): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FileBuilder } from "./../../../../cli/plugins/typescript/index.js";
|
|
2
|
-
class
|
|
2
|
+
class PopupDeclaration extends FileBuilder {
|
|
3
3
|
alias = /* @__PURE__ */ new Set();
|
|
4
4
|
constructor(config) {
|
|
5
5
|
super(config);
|
|
@@ -12,10 +12,10 @@ class PopupDeclaration_default extends FileBuilder {
|
|
|
12
12
|
}
|
|
13
13
|
template() {
|
|
14
14
|
let content = this.readFile();
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
content = content.replace(
|
|
16
|
+
"// :popup-aliases",
|
|
17
|
+
Array.from(this.alias, (alias) => `${JSON.stringify(alias)}: true;`).join("\n ")
|
|
18
|
+
);
|
|
19
19
|
return content;
|
|
20
20
|
}
|
|
21
21
|
setAlias(alias) {
|
|
@@ -24,6 +24,6 @@ class PopupDeclaration_default extends FileBuilder {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
PopupDeclaration as default
|
|
28
28
|
};
|
|
29
29
|
//# sourceMappingURL=PopupDeclaration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/cli/plugins/popup/declaration/PopupDeclaration.ts"],"sourcesContent":["import {FileBuilder} from \"@cli/plugins/typescript\";\n\nimport {ReadonlyConfig} from \"@typing/config\";\n\nexport default class extends FileBuilder {\n protected alias = new Set<string>();\n\n constructor(config: ReadonlyConfig) {\n super(config);\n }\n\n protected filename(): string {\n return \"popup.d.ts\";\n }\n\n protected url(): string {\n return import.meta.url;\n }\n\n protected template(): string {\n let content = this.readFile();\n\n
|
|
1
|
+
{"version":3,"sources":["../../../../../src/cli/plugins/popup/declaration/PopupDeclaration.ts"],"sourcesContent":["import {FileBuilder} from \"@cli/plugins/typescript\";\n\nimport {ReadonlyConfig} from \"@typing/config\";\n\nexport default class PopupDeclaration extends FileBuilder {\n protected alias = new Set<string>();\n\n constructor(config: ReadonlyConfig) {\n super(config);\n }\n\n protected filename(): string {\n return \"popup.d.ts\";\n }\n\n protected url(): string {\n return import.meta.url;\n }\n\n protected template(): string {\n let content = this.readFile();\n\n content = content.replace(\n \"// :popup-aliases\",\n Array.from(this.alias, alias => `${JSON.stringify(alias)}: true;`).join(\"\\n \")\n );\n\n return content;\n }\n\n public setAlias(alias: Set<string>): this {\n this.alias = alias;\n\n return this;\n }\n}\n"],"mappings":"AAAA,SAAQ,mBAAkB;AAI1B,MAAO,yBAAuC,YAAY;AAAA,EAC5C,QAAQ,oBAAI,IAAY;AAAA,EAElC,YAAY,QAAwB;AAChC,UAAM,MAAM;AAAA,EAChB;AAAA,EAEU,WAAmB;AACzB,WAAO;AAAA,EACX;AAAA,EAEU,MAAc;AACpB,WAAO,YAAY;AAAA,EACvB;AAAA,EAEU,WAAmB;AACzB,QAAI,UAAU,KAAK,SAAS;AAE5B,cAAU,QAAQ;AAAA,MACd;AAAA,MACA,MAAM,KAAK,KAAK,OAAO,WAAS,GAAG,KAAK,UAAU,KAAK,CAAC,SAAS,EAAE,KAAK,YAAY;AAAA,IACxF;AAEA,WAAO;AAAA,EACX;AAAA,EAEO,SAAS,OAA0B;AACtC,SAAK,QAAQ;AAEb,WAAO;AAAA,EACX;AACJ;","names":[]}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HtmlRspackPlugin } from "@rspack/core";
|
|
2
2
|
import HtmlRspackTagsPlugin from "html-rspack-tags-plugin";
|
|
3
3
|
import { definePlugin } from "./../../../main/plugin.js";
|
|
4
|
-
import { EntrypointPlugin } from "./../../../cli/bundler/index.js";
|
|
4
|
+
import { EntrypointPlugin, GenerateModulePlugin } from "./../../../cli/bundler/index.js";
|
|
5
5
|
import { virtualViewModule } from "./../../../cli/virtual/index.js";
|
|
6
6
|
import Popup from "./Popup.js";
|
|
7
|
+
import { createPopupModule, PopupModuleName } from "./popup-module.js";
|
|
7
8
|
import { PopupDeclaration } from "./declaration/index.js";
|
|
8
9
|
import { Command } from "./../../../types/app.js";
|
|
9
10
|
var popup_default = definePlugin(() => {
|
|
@@ -19,7 +20,7 @@ var popup_default = definePlugin(() => {
|
|
|
19
20
|
bundler: async ({ config }) => {
|
|
20
21
|
declaration.setAlias(await popup.getAlias()).build();
|
|
21
22
|
const plugins = [];
|
|
22
|
-
let alias =
|
|
23
|
+
let alias = {};
|
|
23
24
|
if (await popup.empty()) {
|
|
24
25
|
if (config.debug) {
|
|
25
26
|
console.info("Popup entries not found");
|
|
@@ -39,8 +40,8 @@ var popup_default = definePlugin(() => {
|
|
|
39
40
|
}
|
|
40
41
|
return {
|
|
41
42
|
plugins: [
|
|
42
|
-
new
|
|
43
|
-
|
|
43
|
+
new GenerateModulePlugin({
|
|
44
|
+
[PopupModuleName]: createPopupModule(alias)
|
|
44
45
|
}),
|
|
45
46
|
...plugins
|
|
46
47
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/cli/plugins/popup/index.ts"],"sourcesContent":["import {Configuration as RspackConfig,
|
|
1
|
+
{"version":3,"sources":["../../../../src/cli/plugins/popup/index.ts"],"sourcesContent":["import {Configuration as RspackConfig, HtmlRspackPlugin, Plugins} from \"@rspack/core\";\nimport HtmlRspackTagsPlugin from \"html-rspack-tags-plugin\";\n\nimport {definePlugin} from \"@main/plugin\";\n\nimport {EntrypointPlugin, GenerateModulePlugin} from \"@cli/bundler\";\nimport {virtualViewModule} from \"@cli/virtual/index.js\";\n\nimport Popup, {PopupNameToManifest} from \"./Popup\";\nimport {createPopupModule, PopupModuleName} from \"./popup-module\";\n\nimport {PopupDeclaration} from \"./declaration\";\n\nimport {Command} from \"@typing/app\";\n\nexport default definePlugin(() => {\n let popup: Popup;\n let declaration: PopupDeclaration;\n\n return {\n name: \"adnbn:popup\",\n startup: ({config}) => {\n popup = new Popup(config);\n declaration = new PopupDeclaration(config);\n },\n popup: () => popup.files(),\n bundler: async ({config}) => {\n declaration.setAlias(await popup.getAlias()).build();\n\n const plugins: Plugins = [];\n\n let alias: PopupNameToManifest = {};\n\n if (await popup.empty()) {\n if (config.debug) {\n console.info(\"Popup entries not found\");\n }\n } else {\n alias = await popup.manifestByAlias();\n\n // prettier-ignore\n const plugin = EntrypointPlugin.from(await popup.view().entries())\n .virtual(file => virtualViewModule(file));\n\n if (config.command === Command.Watch) {\n plugin.watch(async () => {\n declaration.setAlias(await popup.clear().getAlias()).build();\n\n return popup.view().entries();\n });\n }\n\n const htmlPlugins = (await popup.view().html()).map(options => new HtmlRspackPlugin(options));\n const tagsPlugins = (await popup.view().tags()).map(options => new HtmlRspackTagsPlugin(options));\n\n plugins.push(plugin, ...htmlPlugins, ...tagsPlugins);\n }\n\n return {\n plugins: [\n new GenerateModulePlugin({\n [PopupModuleName]: createPopupModule(alias),\n }),\n ...plugins,\n ],\n } as RspackConfig;\n },\n manifest: async ({manifest}) => {\n manifest.setPopup(await popup.manifest()).appendCsp(await popup.csp());\n },\n };\n});\n"],"mappings":"AAAA,SAAuC,wBAAgC;AACvE,OAAO,0BAA0B;AAEjC,SAAQ,oBAAmB;AAE3B,SAAQ,kBAAkB,4BAA2B;AACrD,SAAQ,yBAAwB;AAEhC,OAAO,WAAkC;AACzC,SAAQ,mBAAmB,uBAAsB;AAEjD,SAAQ,wBAAuB;AAE/B,SAAQ,eAAc;AAEtB,IAAO,gBAAQ,aAAa,MAAM;AAC9B,MAAI;AACJ,MAAI;AAEJ,SAAO;AAAA,IACH,MAAM;AAAA,IACN,SAAS,CAAC,EAAC,OAAM,MAAM;AACnB,cAAQ,IAAI,MAAM,MAAM;AACxB,oBAAc,IAAI,iBAAiB,MAAM;AAAA,IAC7C;AAAA,IACA,OAAO,MAAM,MAAM,MAAM;AAAA,IACzB,SAAS,OAAO,EAAC,OAAM,MAAM;AACzB,kBAAY,SAAS,MAAM,MAAM,SAAS,CAAC,EAAE,MAAM;AAEnD,YAAM,UAAmB,CAAC;AAE1B,UAAI,QAA6B,CAAC;AAElC,UAAI,MAAM,MAAM,MAAM,GAAG;AACrB,YAAI,OAAO,OAAO;AACd,kBAAQ,KAAK,yBAAyB;AAAA,QAC1C;AAAA,MACJ,OAAO;AACH,gBAAQ,MAAM,MAAM,gBAAgB;AAGpC,cAAM,SAAS,iBAAiB,KAAK,MAAM,MAAM,KAAK,EAAE,QAAQ,CAAC,EAC5D,QAAQ,UAAQ,kBAAkB,IAAI,CAAC;AAE5C,YAAI,OAAO,YAAY,QAAQ,OAAO;AAClC,iBAAO,MAAM,YAAY;AACrB,wBAAY,SAAS,MAAM,MAAM,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM;AAE3D,mBAAO,MAAM,KAAK,EAAE,QAAQ;AAAA,UAChC,CAAC;AAAA,QACL;AAEA,cAAM,eAAe,MAAM,MAAM,KAAK,EAAE,KAAK,GAAG,IAAI,aAAW,IAAI,iBAAiB,OAAO,CAAC;AAC5F,cAAM,eAAe,MAAM,MAAM,KAAK,EAAE,KAAK,GAAG,IAAI,aAAW,IAAI,qBAAqB,OAAO,CAAC;AAEhG,gBAAQ,KAAK,QAAQ,GAAG,aAAa,GAAG,WAAW;AAAA,MACvD;AAEA,aAAO;AAAA,QACH,SAAS;AAAA,UACL,IAAI,qBAAqB;AAAA,YACrB,CAAC,eAAe,GAAG,kBAAkB,KAAK;AAAA,UAC9C,CAAC;AAAA,UACD,GAAG;AAAA,QACP;AAAA,MACJ;AAAA,IACJ;AAAA,IACA,UAAU,OAAO,EAAC,SAAQ,MAAM;AAC5B,eAAS,SAAS,MAAM,MAAM,SAAS,CAAC,EAAE,UAAU,MAAM,MAAM,IAAI,CAAC;AAAA,IACzE;AAAA,EACJ;AACJ,CAAC;","names":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const PopupModuleName = "#adnbn/popup";
|
|
2
|
+
const createPopupModule = (aliases) => (
|
|
3
|
+
// Preserve own __proto__ keys and allow unused data to be removed from optimized bundles.
|
|
4
|
+
`export const aliases = /*#__PURE__*/ JSON.parse(${JSON.stringify(JSON.stringify(aliases))});
|
|
5
|
+
`
|
|
6
|
+
);
|
|
7
|
+
export {
|
|
8
|
+
PopupModuleName,
|
|
9
|
+
createPopupModule
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=popup-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/cli/plugins/popup/popup-module.ts"],"sourcesContent":["import type {ManifestPopup} from \"@typing/manifest\";\n\nexport const PopupModuleName = \"#adnbn/popup\";\n\nexport const createPopupModule = (aliases: Record<string, ManifestPopup>): string =>\n // Preserve own __proto__ keys and allow unused data to be removed from optimized bundles.\n `export const aliases = /*#__PURE__*/ JSON.parse(${JSON.stringify(JSON.stringify(aliases))});\\n`;\n"],"mappings":"AAEO,MAAM,kBAAkB;AAExB,MAAM,oBAAoB,CAAC;AAAA;AAAA,EAE9B,mDAAmD,KAAK,UAAU,KAAK,UAAU,OAAO,CAAC,CAAC;AAAA;AAAA;","names":[]}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { View } from "../view/index.js";
|
|
2
2
|
import { SandboxFinder, SandboxViewFinder } from "../../entrypoint/index.js";
|
|
3
3
|
import { EntrypointFile } from "../../../types/entrypoint.js";
|
|
4
|
-
import { SandboxEntrypointOptions,
|
|
5
|
-
export type SandboxParametersMap = Record<string, SandboxParameters>;
|
|
4
|
+
import { SandboxEntrypointOptions, SandboxParametersMap } from "../../../types/sandbox.js";
|
|
6
5
|
export default class extends SandboxFinder {
|
|
7
6
|
protected _view?: View<SandboxEntrypointOptions>;
|
|
8
7
|
protected _views?: SandboxViewFinder;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/cli/plugins/sandbox/Sandbox.ts"],"sourcesContent":["import {View} from \"../view\";\n\nimport {SandboxFinder, SandboxViewFinder} from \"@cli/entrypoint/index.js\";\nimport {virtualSandboxModule} from \"@cli/virtual/index.js\";\n\nimport {EntrypointFile} from \"@typing/entrypoint\";\nimport {SandboxEntrypointOptions,
|
|
1
|
+
{"version":3,"sources":["../../../../src/cli/plugins/sandbox/Sandbox.ts"],"sourcesContent":["import {View} from \"../view\";\n\nimport {SandboxFinder, SandboxViewFinder} from \"@cli/entrypoint/index.js\";\nimport {virtualSandboxModule} from \"@cli/virtual/index.js\";\n\nimport {EntrypointFile} from \"@typing/entrypoint\";\nimport {SandboxEntrypointOptions, SandboxParametersMap} from \"@typing/sandbox\";\n\nexport default class extends SandboxFinder {\n protected _view?: View<SandboxEntrypointOptions>;\n\n protected _views?: SandboxViewFinder;\n\n public view(): View<SandboxEntrypointOptions> {\n return (this._view ??= new View(this.config, this.views()));\n }\n\n public views(): SandboxViewFinder {\n return (this._views ??= new SandboxViewFinder(this.config, this));\n }\n\n public virtual(file: EntrypointFile): string {\n const options = this._transport?.get(file)?.options;\n\n if (!options) {\n throw new Error(`Sandbox options not found for \"${file.file}\"`);\n }\n\n return virtualSandboxModule(file, options.name);\n }\n\n public async parameters(): Promise<SandboxParametersMap> {\n const sandboxes: SandboxParametersMap = {};\n const files = await this.transport();\n const filenames = await this.views().getFilenames();\n\n for (const [file, transport] of files) {\n const {name, readyTimeout, requestTimeout, removeOnRequestTimeout} = transport.options;\n const url = filenames.get(file);\n\n if (!url) {\n throw new Error(`Sandbox filename not found for \"${file.file}\"`);\n }\n\n sandboxes[name] = {\n url,\n readyTimeout,\n requestTimeout,\n removeOnRequestTimeout,\n };\n }\n\n return sandboxes;\n }\n\n public async sandboxes(): Promise<string[]> {\n return Object.values(await this.parameters()).map(({url}) => url);\n }\n\n public clear(): this {\n this._view = undefined;\n this._views = undefined;\n\n return super.clear();\n }\n}\n"],"mappings":"AAAA,SAAQ,YAAW;AAEnB,SAAQ,eAAe,yBAAwB;AAC/C,SAAQ,4BAA2B;AAKnC,MAAO,wBAAsB,cAAc;AAAA,EAC7B;AAAA,EAEA;AAAA,EAEH,OAAuC;AAC1C,WAAQ,KAAK,UAAL,KAAK,QAAU,IAAI,KAAK,KAAK,QAAQ,KAAK,MAAM,CAAC;AAAA,EAC7D;AAAA,EAEO,QAA2B;AAC9B,WAAQ,KAAK,WAAL,KAAK,SAAW,IAAI,kBAAkB,KAAK,QAAQ,IAAI;AAAA,EACnE;AAAA,EAEO,QAAQ,MAA8B;AArBjD;AAsBQ,UAAM,WAAU,gBAAK,eAAL,mBAAiB,IAAI,UAArB,mBAA4B;AAE5C,QAAI,CAAC,SAAS;AACV,YAAM,IAAI,MAAM,kCAAkC,KAAK,IAAI,GAAG;AAAA,IAClE;AAEA,WAAO,qBAAqB,MAAM,QAAQ,IAAI;AAAA,EAClD;AAAA,EAEA,MAAa,aAA4C;AACrD,UAAM,YAAkC,CAAC;AACzC,UAAM,QAAQ,MAAM,KAAK,UAAU;AACnC,UAAM,YAAY,MAAM,KAAK,MAAM,EAAE,aAAa;AAElD,eAAW,CAAC,MAAM,SAAS,KAAK,OAAO;AACnC,YAAM,EAAC,MAAM,cAAc,gBAAgB,uBAAsB,IAAI,UAAU;AAC/E,YAAM,MAAM,UAAU,IAAI,IAAI;AAE9B,UAAI,CAAC,KAAK;AACN,cAAM,IAAI,MAAM,mCAAmC,KAAK,IAAI,GAAG;AAAA,MACnE;AAEA,gBAAU,IAAI,IAAI;AAAA,QACd;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACJ;AAAA,IACJ;AAEA,WAAO;AAAA,EACX;AAAA,EAEA,MAAa,YAA+B;AACxC,WAAO,OAAO,OAAO,MAAM,KAAK,WAAW,CAAC,EAAE,IAAI,CAAC,EAAC,IAAG,MAAM,GAAG;AAAA,EACpE;AAAA,EAEO,QAAc;AACjB,SAAK,QAAQ;AACb,SAAK,SAAS;AAEd,WAAO,MAAM,MAAM;AAAA,EACvB;AACJ;","names":[]}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HtmlRspackPlugin } from "@rspack/core";
|
|
2
2
|
import HtmlRspackTagsPlugin from "html-rspack-tags-plugin";
|
|
3
3
|
import { definePlugin } from "./../../../main/plugin.js";
|
|
4
|
-
import { EntrypointPlugin } from "./../../../cli/bundler/index.js";
|
|
4
|
+
import { EntrypointPlugin, GenerateModulePlugin } from "./../../../cli/bundler/index.js";
|
|
5
5
|
import Sandbox from "./Sandbox.js";
|
|
6
6
|
import SandboxDeclaration from "./SandboxDeclaration.js";
|
|
7
|
+
import { createSandboxModule, SandboxModuleName } from "./sandbox-module.js";
|
|
7
8
|
import { Command } from "./../../../types/app.js";
|
|
8
9
|
var sandbox_default = definePlugin(() => {
|
|
9
10
|
let sandbox;
|
|
@@ -43,8 +44,8 @@ var sandbox_default = definePlugin(() => {
|
|
|
43
44
|
}
|
|
44
45
|
return {
|
|
45
46
|
plugins: [
|
|
46
|
-
new
|
|
47
|
-
|
|
47
|
+
new GenerateModulePlugin({
|
|
48
|
+
[SandboxModuleName]: createSandboxModule(parameters)
|
|
48
49
|
}),
|
|
49
50
|
...plugins
|
|
50
51
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/cli/plugins/sandbox/index.ts"],"sourcesContent":["import {Configuration as RspackConfig,
|
|
1
|
+
{"version":3,"sources":["../../../../src/cli/plugins/sandbox/index.ts"],"sourcesContent":["import {Configuration as RspackConfig, HtmlRspackPlugin, Plugins} from \"@rspack/core\";\nimport HtmlRspackTagsPlugin from \"html-rspack-tags-plugin\";\n\nimport {definePlugin} from \"@main/plugin\";\nimport {EntrypointPlugin, GenerateModulePlugin} from \"@cli/bundler\";\n\nimport Sandbox from \"./Sandbox\";\nimport SandboxDeclaration from \"./SandboxDeclaration\";\nimport {createSandboxModule, SandboxModuleName} from \"./sandbox-module\";\n\nimport {Command} from \"@typing/app\";\nimport type {SandboxParametersMap} from \"@typing/sandbox\";\n\nexport default definePlugin(() => {\n let sandbox: Sandbox;\n let declaration: SandboxDeclaration;\n\n return {\n name: \"adnbn:sandbox\",\n startup: ({config}) => {\n sandbox = new Sandbox(config);\n declaration = new SandboxDeclaration(config);\n },\n sandbox: () => sandbox.files(),\n bundler: async ({config}) => {\n declaration.dictionary(await sandbox.dictionary()).build();\n\n let build = true;\n\n if (await sandbox.empty()) {\n if (config.debug) {\n console.info(\"Sandbox entries not found\");\n }\n\n build = false;\n }\n\n const plugins: Plugins = [];\n let parameters: SandboxParametersMap = {};\n\n if (build) {\n parameters = await sandbox.parameters();\n\n const plugin = EntrypointPlugin.from(await sandbox.view().entries()).virtual(file =>\n sandbox.virtual(file)\n );\n\n if (config.command === Command.Watch) {\n plugin.watch(async () => {\n declaration.dictionary(await sandbox.clear().dictionary()).build();\n\n return sandbox.view().entries();\n });\n }\n\n const htmlPlugins = (await sandbox.view().html()).map(options => new HtmlRspackPlugin(options));\n const tagsPlugins = (await sandbox.view().tags()).map(options => new HtmlRspackTagsPlugin(options));\n\n plugins.push(plugin, ...htmlPlugins, ...tagsPlugins);\n }\n\n return {\n plugins: [\n new GenerateModulePlugin({\n [SandboxModuleName]: createSandboxModule(parameters),\n }),\n ...plugins,\n ],\n } satisfies RspackConfig;\n },\n manifest: async ({manifest}) => {\n if (await sandbox.exists()) {\n manifest.appendSandboxes(await sandbox.sandboxes()).appendSandboxCsp(await sandbox.views().csp());\n }\n },\n };\n});\n"],"mappings":"AAAA,SAAuC,wBAAgC;AACvE,OAAO,0BAA0B;AAEjC,SAAQ,oBAAmB;AAC3B,SAAQ,kBAAkB,4BAA2B;AAErD,OAAO,aAAa;AACpB,OAAO,wBAAwB;AAC/B,SAAQ,qBAAqB,yBAAwB;AAErD,SAAQ,eAAc;AAGtB,IAAO,kBAAQ,aAAa,MAAM;AAC9B,MAAI;AACJ,MAAI;AAEJ,SAAO;AAAA,IACH,MAAM;AAAA,IACN,SAAS,CAAC,EAAC,OAAM,MAAM;AACnB,gBAAU,IAAI,QAAQ,MAAM;AAC5B,oBAAc,IAAI,mBAAmB,MAAM;AAAA,IAC/C;AAAA,IACA,SAAS,MAAM,QAAQ,MAAM;AAAA,IAC7B,SAAS,OAAO,EAAC,OAAM,MAAM;AACzB,kBAAY,WAAW,MAAM,QAAQ,WAAW,CAAC,EAAE,MAAM;AAEzD,UAAI,QAAQ;AAEZ,UAAI,MAAM,QAAQ,MAAM,GAAG;AACvB,YAAI,OAAO,OAAO;AACd,kBAAQ,KAAK,2BAA2B;AAAA,QAC5C;AAEA,gBAAQ;AAAA,MACZ;AAEA,YAAM,UAAmB,CAAC;AAC1B,UAAI,aAAmC,CAAC;AAExC,UAAI,OAAO;AACP,qBAAa,MAAM,QAAQ,WAAW;AAEtC,cAAM,SAAS,iBAAiB,KAAK,MAAM,QAAQ,KAAK,EAAE,QAAQ,CAAC,EAAE;AAAA,UAAQ,UACzE,QAAQ,QAAQ,IAAI;AAAA,QACxB;AAEA,YAAI,OAAO,YAAY,QAAQ,OAAO;AAClC,iBAAO,MAAM,YAAY;AACrB,wBAAY,WAAW,MAAM,QAAQ,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM;AAEjE,mBAAO,QAAQ,KAAK,EAAE,QAAQ;AAAA,UAClC,CAAC;AAAA,QACL;AAEA,cAAM,eAAe,MAAM,QAAQ,KAAK,EAAE,KAAK,GAAG,IAAI,aAAW,IAAI,iBAAiB,OAAO,CAAC;AAC9F,cAAM,eAAe,MAAM,QAAQ,KAAK,EAAE,KAAK,GAAG,IAAI,aAAW,IAAI,qBAAqB,OAAO,CAAC;AAElG,gBAAQ,KAAK,QAAQ,GAAG,aAAa,GAAG,WAAW;AAAA,MACvD;AAEA,aAAO;AAAA,QACH,SAAS;AAAA,UACL,IAAI,qBAAqB;AAAA,YACrB,CAAC,iBAAiB,GAAG,oBAAoB,UAAU;AAAA,UACvD,CAAC;AAAA,UACD,GAAG;AAAA,QACP;AAAA,MACJ;AAAA,IACJ;AAAA,IACA,UAAU,OAAO,EAAC,SAAQ,MAAM;AAC5B,UAAI,MAAM,QAAQ,OAAO,GAAG;AACxB,iBAAS,gBAAgB,MAAM,QAAQ,UAAU,CAAC,EAAE,iBAAiB,MAAM,QAAQ,MAAM,EAAE,IAAI,CAAC;AAAA,MACpG;AAAA,IACJ;AAAA,EACJ;AACJ,CAAC;","names":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const SandboxModuleName = "#adnbn/sandbox";
|
|
2
|
+
const createSandboxModule = (parameters) => (
|
|
3
|
+
// Preserve omitted optional values and allow unused data to be removed from optimized bundles.
|
|
4
|
+
`export const parameters = /*#__PURE__*/ JSON.parse(${JSON.stringify(JSON.stringify(parameters))});
|
|
5
|
+
`
|
|
6
|
+
);
|
|
7
|
+
export {
|
|
8
|
+
SandboxModuleName,
|
|
9
|
+
createSandboxModule
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=sandbox-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/cli/plugins/sandbox/sandbox-module.ts"],"sourcesContent":["import type {SandboxParametersMap} from \"@typing/sandbox\";\n\nexport const SandboxModuleName = \"#adnbn/sandbox\";\n\nexport const createSandboxModule = (parameters: SandboxParametersMap): string =>\n // Preserve omitted optional values and allow unused data to be removed from optimized bundles.\n `export const parameters = /*#__PURE__*/ JSON.parse(${JSON.stringify(JSON.stringify(parameters))});\\n`;\n"],"mappings":"AAEO,MAAM,oBAAoB;AAE1B,MAAM,sBAAsB,CAAC;AAAA;AAAA,EAEhC,sDAAsD,KAAK,UAAU,KAAK,UAAU,UAAU,CAAC,CAAC;AAAA;AAAA;","names":[]}
|
|
@@ -3,7 +3,7 @@ import { SidebarFinder } from "../../entrypoint/index.js";
|
|
|
3
3
|
import { ReadonlyConfig } from "../../../types/config.js";
|
|
4
4
|
import { SidebarEntrypointOptions } from "../../../types/sidebar.js";
|
|
5
5
|
import { ManifestSidebar } from "../../../types/manifest.js";
|
|
6
|
-
export type SidebarNameToManifest =
|
|
6
|
+
export type SidebarNameToManifest = Record<string, ManifestSidebar>;
|
|
7
7
|
export default class extends SidebarFinder {
|
|
8
8
|
protected _view?: View<SidebarEntrypointOptions>;
|
|
9
9
|
constructor(config: ReadonlyConfig);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { View } from "../view/index.js";
|
|
2
|
-
import { modifyLocaleMessageKey } from "./../../../locale/
|
|
2
|
+
import { modifyLocaleMessageKey } from "./../../../shared/locale/index.js";
|
|
3
3
|
import { SidebarFinder } from "./../../../cli/entrypoint/index.js";
|
|
4
4
|
class Sidebar_default extends SidebarFinder {
|
|
5
5
|
_view;
|
|
@@ -34,7 +34,7 @@ class Sidebar_default extends SidebarFinder {
|
|
|
34
34
|
icon
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
-
},
|
|
37
|
+
}, {});
|
|
38
38
|
}
|
|
39
39
|
clear() {
|
|
40
40
|
this._view = void 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/cli/plugins/sidebar/Sidebar.ts"],"sourcesContent":["import {View} from \"../view\";\n\nimport {modifyLocaleMessageKey} from \"@locale
|
|
1
|
+
{"version":3,"sources":["../../../../src/cli/plugins/sidebar/Sidebar.ts"],"sourcesContent":["import {View} from \"../view\";\n\nimport {modifyLocaleMessageKey} from \"@shared/locale\";\n\nimport {SidebarFinder} from \"@cli/entrypoint/index.js\";\n\nimport {ReadonlyConfig} from \"@typing/config\";\nimport {SidebarEntrypointOptions} from \"@typing/sidebar\";\nimport {ManifestSidebar} from \"@typing/manifest\";\n\nexport type SidebarNameToManifest = Record<string, ManifestSidebar>;\n\nexport default class extends SidebarFinder {\n protected _view?: View<SidebarEntrypointOptions>;\n\n public constructor(config: ReadonlyConfig) {\n super(config);\n }\n\n public view(): View<SidebarEntrypointOptions> {\n return (this._view ??= new View(this.config, this));\n }\n\n public async manifest(): Promise<ManifestSidebar | undefined> {\n const views = await this.views();\n\n for (const {filename, options} of views.values()) {\n const {apply = true, title, icon} = options;\n\n if (apply) {\n return {\n path: filename,\n title: modifyLocaleMessageKey(title),\n icon,\n };\n }\n }\n }\n\n public async manifestByAlias(): Promise<SidebarNameToManifest> {\n return Array.from(await this.views()).reduce((aliases, [_, item]) => {\n const {options, filename} = item;\n const {title, icon} = options;\n\n return {\n ...aliases,\n [item.alias]: {\n path: filename,\n title,\n icon,\n },\n };\n }, {} as SidebarNameToManifest);\n }\n\n public clear(): this {\n this._view = undefined;\n\n return super.clear();\n }\n}\n"],"mappings":"AAAA,SAAQ,YAAW;AAEnB,SAAQ,8BAA6B;AAErC,SAAQ,qBAAoB;AAQ5B,MAAO,wBAAsB,cAAc;AAAA,EAC7B;AAAA,EAEH,YAAY,QAAwB;AACvC,UAAM,MAAM;AAAA,EAChB;AAAA,EAEO,OAAuC;AAC1C,WAAQ,KAAK,UAAL,KAAK,QAAU,IAAI,KAAK,KAAK,QAAQ,IAAI;AAAA,EACrD;AAAA,EAEA,MAAa,WAAiD;AAC1D,UAAM,QAAQ,MAAM,KAAK,MAAM;AAE/B,eAAW,EAAC,UAAU,QAAO,KAAK,MAAM,OAAO,GAAG;AAC9C,YAAM,EAAC,QAAQ,MAAM,OAAO,KAAI,IAAI;AAEpC,UAAI,OAAO;AACP,eAAO;AAAA,UACH,MAAM;AAAA,UACN,OAAO,uBAAuB,KAAK;AAAA,UACnC;AAAA,QACJ;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AAAA,EAEA,MAAa,kBAAkD;AAC3D,WAAO,MAAM,KAAK,MAAM,KAAK,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,IAAI,MAAM;AACjE,YAAM,EAAC,SAAS,SAAQ,IAAI;AAC5B,YAAM,EAAC,OAAO,KAAI,IAAI;AAEtB,aAAO;AAAA,QACH,GAAG;AAAA,QACH,CAAC,KAAK,KAAK,GAAG;AAAA,UACV,MAAM;AAAA,UACN;AAAA,UACA;AAAA,QACJ;AAAA,MACJ;AAAA,IACJ,GAAG,CAAC,CAA0B;AAAA,EAClC;AAAA,EAEO,QAAc;AACjB,SAAK,QAAQ;AAEb,WAAO,MAAM,MAAM;AAAA,EACvB;AACJ;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FileBuilder } from "../../../plugins/typescript/index.js";
|
|
2
2
|
import { ReadonlyConfig } from "../../../../types/config.js";
|
|
3
|
-
export default class extends FileBuilder {
|
|
3
|
+
export default class SidebarDeclaration extends FileBuilder {
|
|
4
4
|
protected alias: Set<string>;
|
|
5
5
|
constructor(config: ReadonlyConfig);
|
|
6
6
|
protected filename(): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FileBuilder } from "./../../../../cli/plugins/typescript/index.js";
|
|
2
|
-
class
|
|
2
|
+
class SidebarDeclaration extends FileBuilder {
|
|
3
3
|
alias = /* @__PURE__ */ new Set();
|
|
4
4
|
constructor(config) {
|
|
5
5
|
super(config);
|
|
@@ -12,10 +12,10 @@ class SidebarDeclaration_default extends FileBuilder {
|
|
|
12
12
|
}
|
|
13
13
|
template() {
|
|
14
14
|
let content = this.readFile();
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
content = content.replace(
|
|
16
|
+
"// :sidebar-aliases",
|
|
17
|
+
Array.from(this.alias, (alias) => `${JSON.stringify(alias)}: true;`).join("\n ")
|
|
18
|
+
);
|
|
19
19
|
return content;
|
|
20
20
|
}
|
|
21
21
|
setAlias(alias) {
|
|
@@ -24,6 +24,6 @@ class SidebarDeclaration_default extends FileBuilder {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
SidebarDeclaration as default
|
|
28
28
|
};
|
|
29
29
|
//# sourceMappingURL=SidebarDeclaration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/cli/plugins/sidebar/declaration/SidebarDeclaration.ts"],"sourcesContent":["import {FileBuilder} from \"@cli/plugins/typescript\";\n\nimport {ReadonlyConfig} from \"@typing/config\";\n\nexport default class extends FileBuilder {\n protected alias = new Set<string>();\n\n constructor(config: ReadonlyConfig) {\n super(config);\n }\n\n protected filename(): string {\n return \"sidebar.d.ts\";\n }\n\n protected url(): string {\n return import.meta.url;\n }\n\n protected template(): string {\n let content = this.readFile();\n\n
|
|
1
|
+
{"version":3,"sources":["../../../../../src/cli/plugins/sidebar/declaration/SidebarDeclaration.ts"],"sourcesContent":["import {FileBuilder} from \"@cli/plugins/typescript\";\n\nimport {ReadonlyConfig} from \"@typing/config\";\n\nexport default class SidebarDeclaration extends FileBuilder {\n protected alias = new Set<string>();\n\n constructor(config: ReadonlyConfig) {\n super(config);\n }\n\n protected filename(): string {\n return \"sidebar.d.ts\";\n }\n\n protected url(): string {\n return import.meta.url;\n }\n\n protected template(): string {\n let content = this.readFile();\n\n content = content.replace(\n \"// :sidebar-aliases\",\n Array.from(this.alias, alias => `${JSON.stringify(alias)}: true;`).join(\"\\n \")\n );\n\n return content;\n }\n\n public setAlias(alias: Set<string>): this {\n this.alias = alias;\n\n return this;\n }\n}\n"],"mappings":"AAAA,SAAQ,mBAAkB;AAI1B,MAAO,2BAAyC,YAAY;AAAA,EAC9C,QAAQ,oBAAI,IAAY;AAAA,EAElC,YAAY,QAAwB;AAChC,UAAM,MAAM;AAAA,EAChB;AAAA,EAEU,WAAmB;AACzB,WAAO;AAAA,EACX;AAAA,EAEU,MAAc;AACpB,WAAO,YAAY;AAAA,EACvB;AAAA,EAEU,WAAmB;AACzB,QAAI,UAAU,KAAK,SAAS;AAE5B,cAAU,QAAQ;AAAA,MACd;AAAA,MACA,MAAM,KAAK,KAAK,OAAO,WAAS,GAAG,KAAK,UAAU,KAAK,CAAC,SAAS,EAAE,KAAK,YAAY;AAAA,IACxF;AAEA,WAAO;AAAA,EACX;AAAA,EAEO,SAAS,OAA0B;AACtC,SAAK,QAAQ;AAEb,WAAO;AAAA,EACX;AACJ;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ":package";
|
|
2
2
|
|
|
3
3
|
declare module ":package" {
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export interface SidebarAliasRegistry {
|
|
5
|
+
// :sidebar-aliases
|
|
6
|
+
}
|
|
7
7
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HtmlRspackPlugin } from "@rspack/core";
|
|
2
2
|
import HtmlRspackTagsPlugin from "html-rspack-tags-plugin";
|
|
3
3
|
import { definePlugin } from "./../../../main/plugin.js";
|
|
4
|
-
import { EntrypointPlugin } from "./../../../cli/bundler/index.js";
|
|
4
|
+
import { EntrypointPlugin, GenerateModulePlugin } from "./../../../cli/bundler/index.js";
|
|
5
5
|
import { virtualViewModule } from "./../../../cli/virtual/index.js";
|
|
6
6
|
import Sidebar from "./Sidebar.js";
|
|
7
|
+
import { createSidebarModule, SidebarModuleName } from "./sidebar-module.js";
|
|
7
8
|
import { SidebarDeclaration } from "./declaration/index.js";
|
|
8
9
|
import { Command } from "./../../../types/app.js";
|
|
9
10
|
import { SidebarAlternativeBrowsers } from "./../../../types/sidebar.js";
|
|
@@ -34,7 +35,7 @@ var sidebar_default = definePlugin(() => {
|
|
|
34
35
|
build = false;
|
|
35
36
|
}
|
|
36
37
|
const plugins = [];
|
|
37
|
-
let alias =
|
|
38
|
+
let alias = {};
|
|
38
39
|
if (build) {
|
|
39
40
|
alias = await sidebar.manifestByAlias();
|
|
40
41
|
const plugin = EntrypointPlugin.from(await sidebar.view().entries()).virtual((file) => virtualViewModule(file));
|
|
@@ -50,8 +51,8 @@ var sidebar_default = definePlugin(() => {
|
|
|
50
51
|
}
|
|
51
52
|
return {
|
|
52
53
|
plugins: [
|
|
53
|
-
new
|
|
54
|
-
|
|
54
|
+
new GenerateModulePlugin({
|
|
55
|
+
[SidebarModuleName]: createSidebarModule(alias)
|
|
55
56
|
}),
|
|
56
57
|
...plugins
|
|
57
58
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/cli/plugins/sidebar/index.ts"],"sourcesContent":["import {Configuration as RspackConfig,
|
|
1
|
+
{"version":3,"sources":["../../../../src/cli/plugins/sidebar/index.ts"],"sourcesContent":["import {Configuration as RspackConfig, HtmlRspackPlugin, Plugins} from \"@rspack/core\";\nimport HtmlRspackTagsPlugin from \"html-rspack-tags-plugin\";\n\nimport {definePlugin} from \"@main/plugin\";\n\nimport {EntrypointPlugin, GenerateModulePlugin} from \"@cli/bundler\";\nimport {virtualViewModule} from \"@cli/virtual/index.js\";\n\nimport Sidebar, {SidebarNameToManifest} from \"./Sidebar\";\nimport {createSidebarModule, SidebarModuleName} from \"./sidebar-module\";\n\nimport {SidebarDeclaration} from \"./declaration\";\n\nimport {Command} from \"@typing/app\";\nimport {SidebarAlternativeBrowsers} from \"@typing/sidebar\";\n\nexport default definePlugin(() => {\n let sidebar: Sidebar;\n let declaration: SidebarDeclaration;\n\n let sidebarAvailable: boolean = false;\n\n return {\n name: \"adnbn:sidebar\",\n startup: ({config}) => {\n sidebar = new Sidebar(config);\n declaration = new SidebarDeclaration(config);\n\n sidebarAvailable = SidebarAlternativeBrowsers.has(config.browser) || config.manifestVersion !== 2;\n },\n sidebar: () => sidebar.files(),\n bundler: async ({config}) => {\n declaration.setAlias(await sidebar.getAlias()).build();\n\n let build: boolean = true;\n\n if (await sidebar.empty()) {\n if (config.debug) {\n console.info(\"Sidebar entries not found\");\n }\n\n build = false;\n } else if (!sidebarAvailable) {\n if (config.debug) {\n console.warn(\"Sidebar not supported for manifest version 2\");\n }\n\n build = false;\n }\n\n const plugins: Plugins = [];\n\n let alias: SidebarNameToManifest = {};\n\n if (build) {\n alias = await sidebar.manifestByAlias();\n\n // prettier-ignore\n const plugin = EntrypointPlugin.from(await sidebar.view().entries())\n .virtual(file => virtualViewModule(file));\n\n if (config.command === Command.Watch) {\n plugin.watch(async () => {\n declaration.setAlias(await sidebar.clear().getAlias()).build();\n\n return sidebar.view().entries();\n });\n }\n\n const htmlPlugins = (await sidebar.view().html()).map(options => new HtmlRspackPlugin(options));\n const tagsPlugins = (await sidebar.view().tags()).map(options => new HtmlRspackTagsPlugin(options));\n\n plugins.push(plugin, ...htmlPlugins, ...tagsPlugins);\n }\n\n return {\n plugins: [\n new GenerateModulePlugin({\n [SidebarModuleName]: createSidebarModule(alias),\n }),\n ...plugins,\n ],\n } as RspackConfig;\n },\n manifest: async ({manifest, config}) => {\n if (!sidebarAvailable) {\n return;\n }\n\n manifest.setSidebar(await sidebar.manifest());\n manifest.appendCsp(await sidebar.csp());\n\n if ((await sidebar.exists()) && !SidebarAlternativeBrowsers.has(config.browser)) {\n manifest.addPermission(\"sidePanel\");\n }\n },\n };\n});\n"],"mappings":"AAAA,SAAuC,wBAAgC;AACvE,OAAO,0BAA0B;AAEjC,SAAQ,oBAAmB;AAE3B,SAAQ,kBAAkB,4BAA2B;AACrD,SAAQ,yBAAwB;AAEhC,OAAO,aAAsC;AAC7C,SAAQ,qBAAqB,yBAAwB;AAErD,SAAQ,0BAAyB;AAEjC,SAAQ,eAAc;AACtB,SAAQ,kCAAiC;AAEzC,IAAO,kBAAQ,aAAa,MAAM;AAC9B,MAAI;AACJ,MAAI;AAEJ,MAAI,mBAA4B;AAEhC,SAAO;AAAA,IACH,MAAM;AAAA,IACN,SAAS,CAAC,EAAC,OAAM,MAAM;AACnB,gBAAU,IAAI,QAAQ,MAAM;AAC5B,oBAAc,IAAI,mBAAmB,MAAM;AAE3C,yBAAmB,2BAA2B,IAAI,OAAO,OAAO,KAAK,OAAO,oBAAoB;AAAA,IACpG;AAAA,IACA,SAAS,MAAM,QAAQ,MAAM;AAAA,IAC7B,SAAS,OAAO,EAAC,OAAM,MAAM;AACzB,kBAAY,SAAS,MAAM,QAAQ,SAAS,CAAC,EAAE,MAAM;AAErD,UAAI,QAAiB;AAErB,UAAI,MAAM,QAAQ,MAAM,GAAG;AACvB,YAAI,OAAO,OAAO;AACd,kBAAQ,KAAK,2BAA2B;AAAA,QAC5C;AAEA,gBAAQ;AAAA,MACZ,WAAW,CAAC,kBAAkB;AAC1B,YAAI,OAAO,OAAO;AACd,kBAAQ,KAAK,8CAA8C;AAAA,QAC/D;AAEA,gBAAQ;AAAA,MACZ;AAEA,YAAM,UAAmB,CAAC;AAE1B,UAAI,QAA+B,CAAC;AAEpC,UAAI,OAAO;AACP,gBAAQ,MAAM,QAAQ,gBAAgB;AAGtC,cAAM,SAAS,iBAAiB,KAAK,MAAM,QAAQ,KAAK,EAAE,QAAQ,CAAC,EAC9D,QAAQ,UAAQ,kBAAkB,IAAI,CAAC;AAE5C,YAAI,OAAO,YAAY,QAAQ,OAAO;AAClC,iBAAO,MAAM,YAAY;AACrB,wBAAY,SAAS,MAAM,QAAQ,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM;AAE7D,mBAAO,QAAQ,KAAK,EAAE,QAAQ;AAAA,UAClC,CAAC;AAAA,QACL;AAEA,cAAM,eAAe,MAAM,QAAQ,KAAK,EAAE,KAAK,GAAG,IAAI,aAAW,IAAI,iBAAiB,OAAO,CAAC;AAC9F,cAAM,eAAe,MAAM,QAAQ,KAAK,EAAE,KAAK,GAAG,IAAI,aAAW,IAAI,qBAAqB,OAAO,CAAC;AAElG,gBAAQ,KAAK,QAAQ,GAAG,aAAa,GAAG,WAAW;AAAA,MACvD;AAEA,aAAO;AAAA,QACH,SAAS;AAAA,UACL,IAAI,qBAAqB;AAAA,YACrB,CAAC,iBAAiB,GAAG,oBAAoB,KAAK;AAAA,UAClD,CAAC;AAAA,UACD,GAAG;AAAA,QACP;AAAA,MACJ;AAAA,IACJ;AAAA,IACA,UAAU,OAAO,EAAC,UAAU,OAAM,MAAM;AACpC,UAAI,CAAC,kBAAkB;AACnB;AAAA,MACJ;AAEA,eAAS,WAAW,MAAM,QAAQ,SAAS,CAAC;AAC5C,eAAS,UAAU,MAAM,QAAQ,IAAI,CAAC;AAEtC,UAAK,MAAM,QAAQ,OAAO,KAAM,CAAC,2BAA2B,IAAI,OAAO,OAAO,GAAG;AAC7E,iBAAS,cAAc,WAAW;AAAA,MACtC;AAAA,IACJ;AAAA,EACJ;AACJ,CAAC;","names":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const SidebarModuleName = "#adnbn/sidebar";
|
|
2
|
+
const createSidebarModule = (aliases) => (
|
|
3
|
+
// Preserve own __proto__ keys and allow unused data to be removed from optimized bundles.
|
|
4
|
+
`export const aliases = /*#__PURE__*/ JSON.parse(${JSON.stringify(JSON.stringify(aliases))});
|
|
5
|
+
`
|
|
6
|
+
);
|
|
7
|
+
export {
|
|
8
|
+
SidebarModuleName,
|
|
9
|
+
createSidebarModule
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=sidebar-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/cli/plugins/sidebar/sidebar-module.ts"],"sourcesContent":["import type {ManifestSidebar} from \"@typing/manifest\";\n\nexport const SidebarModuleName = \"#adnbn/sidebar\";\n\nexport const createSidebarModule = (aliases: Record<string, ManifestSidebar>): string =>\n // Preserve own __proto__ keys and allow unused data to be removed from optimized bundles.\n `export const aliases = /*#__PURE__*/ JSON.parse(${JSON.stringify(JSON.stringify(aliases))});\\n`;\n"],"mappings":"AAEO,MAAM,oBAAoB;AAE1B,MAAM,sBAAsB,CAAC;AAAA;AAAA,EAEhC,mDAAmD,KAAK,UAAU,KAAK,UAAU,OAAO,CAAC,CAAC;AAAA;AAAA;","names":[]}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { StylePluginOptions } from "./types.js";
|
|
2
|
+
declare const _default: import("../../../main/plugin.js").PluginDefinition<[(StylePluginOptions | undefined)?]>;
|
|
2
3
|
export default _default;
|