adnbn 0.5.6 → 0.6.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/app/command.d.ts +3 -6
- package/dist/cli/builders/app/index.d.ts +2 -14
- package/dist/cli/builders/locale/FirefoxLocaleValidator.d.ts +4 -7
- package/dist/cli/builders/locale/LocaleBuilder.d.ts +3 -6
- package/dist/cli/builders/locale/LocaleBuilder.js +3 -1
- package/dist/cli/builders/locale/LocaleBuilder.js.map +1 -1
- package/dist/cli/builders/locale/LocaleStructureValidator.d.ts +8 -0
- package/dist/cli/builders/locale/LocaleStructureValidator.js +64 -0
- package/dist/cli/builders/locale/LocaleStructureValidator.js.map +1 -0
- package/dist/cli/builders/locale/LocaleValidator.d.ts +4 -7
- package/dist/cli/builders/locale/LocaleValidator.js +2 -0
- package/dist/cli/builders/locale/LocaleValidator.js.map +1 -1
- package/dist/cli/builders/locale/OperaLocaleValidator.d.ts +4 -7
- package/dist/cli/builders/locale/index.d.ts +10 -19
- package/dist/cli/builders/locale/index.js +2 -0
- package/dist/cli/builders/locale/index.js.map +1 -1
- package/dist/cli/builders/manifest/ManifestBase.d.ts +30 -18
- package/dist/cli/builders/manifest/ManifestBase.js +212 -70
- package/dist/cli/builders/manifest/ManifestBase.js.map +1 -1
- package/dist/cli/builders/manifest/ManifestV2.d.ts +5 -12
- package/dist/cli/builders/manifest/ManifestV2.js +8 -7
- package/dist/cli/builders/manifest/ManifestV2.js.map +1 -1
- package/dist/cli/builders/manifest/ManifestV3.d.ts +5 -12
- package/dist/cli/builders/manifest/ManifestV3.js +9 -6
- package/dist/cli/builders/manifest/ManifestV3.js.map +1 -1
- package/dist/cli/builders/manifest/index.d.ts +3 -14
- package/dist/cli/builders/manifest/utils.d.ts +10 -15
- package/dist/cli/builders/manifest/utils.js +14 -2
- package/dist/cli/builders/manifest/utils.js.map +1 -1
- package/dist/cli/bundler/index.d.ts +2 -16
- package/dist/cli/bundler/plugins/EntrypointPlugin.d.ts +10 -19
- package/dist/cli/bundler/plugins/EntrypointPlugin.js +1 -0
- package/dist/cli/bundler/plugins/EntrypointPlugin.js.map +1 -1
- package/dist/cli/bundler/plugins/GenerateJsonPlugin.d.ts +5 -7
- package/dist/cli/bundler/plugins/GenerateJsonPlugin.js +1 -0
- package/dist/cli/bundler/plugins/GenerateJsonPlugin.js.map +1 -1
- package/dist/cli/bundler/plugins/ManifestPlugin.d.ts +3 -11
- package/dist/cli/bundler/plugins/ManifestPlugin.js +1 -0
- package/dist/cli/bundler/plugins/ManifestPlugin.js.map +1 -1
- package/dist/cli/bundler/plugins/ReplacePlugin.d.ts +3 -5
- package/dist/cli/bundler/plugins/ReplacePlugin.js +1 -0
- package/dist/cli/bundler/plugins/ReplacePlugin.js.map +1 -1
- package/dist/cli/bundler/plugins/WatchPlugin.d.ts +3 -6
- package/dist/cli/bundler/plugins/WatchPlugin.js +1 -0
- package/dist/cli/bundler/plugins/WatchPlugin.js.map +1 -1
- package/dist/cli/bundler/plugins/index.d.ts +5 -14
- package/dist/cli/bundler/utils/index.d.ts +2 -3
- package/dist/cli/bundler/utils/optimization.d.ts +2 -6
- package/dist/cli/bundler/utils/optimization.js +10 -98
- package/dist/cli/bundler/utils/optimization.js.map +1 -1
- package/dist/cli/bundler/utils/output.d.ts +2 -5
- package/dist/cli/entrypoint/file/ExpressionFile.d.ts +4 -10
- package/dist/cli/entrypoint/file/OptionFile.d.ts +3 -9
- package/dist/cli/entrypoint/file/SourceFile.d.ts +7 -11
- package/dist/cli/entrypoint/file/SourceFile.js +1 -0
- package/dist/cli/entrypoint/file/SourceFile.js.map +1 -1
- package/dist/cli/entrypoint/file/index.d.ts +4 -8
- package/dist/cli/entrypoint/file/injectors/core.d.ts +2 -4
- package/dist/cli/entrypoint/file/injectors/index.d.ts +2 -4
- package/dist/cli/entrypoint/file/parsers/AbstractParser.d.ts +6 -12
- package/dist/cli/entrypoint/file/parsers/AbstractParser.js +1 -0
- package/dist/cli/entrypoint/file/parsers/AbstractParser.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/ClassParser.d.ts +9 -15
- package/dist/cli/entrypoint/file/parsers/ClassParser.js +3 -0
- package/dist/cli/entrypoint/file/parsers/ClassParser.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/FunctionParser.d.ts +9 -17
- package/dist/cli/entrypoint/file/parsers/FunctionParser.js +3 -0
- package/dist/cli/entrypoint/file/parsers/FunctionParser.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/JSDocParser.d.ts +2 -5
- package/dist/cli/entrypoint/file/parsers/NodeFinder.d.ts +4 -10
- package/dist/cli/entrypoint/file/parsers/NodeFinder.js +1 -0
- package/dist/cli/entrypoint/file/parsers/NodeFinder.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/ObjectParser.d.ts +7 -15
- package/dist/cli/entrypoint/file/parsers/ObjectParser.js +1 -0
- package/dist/cli/entrypoint/file/parsers/ObjectParser.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/SignatureBuilder.d.ts +4 -12
- package/dist/cli/entrypoint/file/parsers/SignatureBuilder.js +5 -4
- package/dist/cli/entrypoint/file/parsers/SignatureBuilder.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/TypeResolver.d.ts +5 -11
- package/dist/cli/entrypoint/file/parsers/TypeResolver.js +2 -0
- package/dist/cli/entrypoint/file/parsers/TypeResolver.js.map +1 -1
- package/dist/cli/entrypoint/file/parsers/helpers/memberFilters.d.ts +1 -3
- package/dist/cli/entrypoint/file/parsers/index.d.ts +7 -14
- package/dist/cli/entrypoint/file/parsers/types.d.ts +4 -6
- package/dist/cli/entrypoint/file/resolvers/ImportResolver.d.ts +2 -6
- package/dist/cli/entrypoint/file/resolvers/ImportResolver.js +1 -0
- package/dist/cli/entrypoint/file/resolvers/ImportResolver.js.map +1 -1
- package/dist/cli/entrypoint/file/resolvers/TsResolver.d.ts +2 -5
- package/dist/cli/entrypoint/file/resolvers/index.d.ts +2 -3
- package/dist/cli/entrypoint/file/types.d.ts +5 -7
- package/dist/cli/entrypoint/finder/AbstractAssetFinder.d.ts +3 -16
- package/dist/cli/entrypoint/finder/AbstractEntrypointFinder.d.ts +4 -17
- package/dist/cli/entrypoint/finder/AbstractEntrypointFinder.js +22 -17
- package/dist/cli/entrypoint/finder/AbstractEntrypointFinder.js.map +1 -1
- package/dist/cli/entrypoint/finder/AbstractFinder.d.ts +4 -15
- package/dist/cli/entrypoint/finder/AbstractFinder.js +7 -2
- package/dist/cli/entrypoint/finder/AbstractFinder.js.map +1 -1
- package/dist/cli/entrypoint/finder/AbstractOptionsFinder.d.ts +3 -16
- package/dist/cli/entrypoint/finder/AbstractPluginFinder.d.ts +3 -18
- package/dist/cli/entrypoint/finder/AbstractTransportFinder.d.ts +9 -26
- package/dist/cli/entrypoint/finder/AbstractViewFinder.d.ts +9 -24
- package/dist/cli/entrypoint/finder/AssetPluginFinder.d.ts +8 -19
- package/dist/cli/entrypoint/finder/AssetPluginFinder.js +2 -0
- package/dist/cli/entrypoint/finder/AssetPluginFinder.js.map +1 -1
- package/dist/cli/entrypoint/finder/BackgroundFinder.d.ts +5 -19
- package/dist/cli/entrypoint/finder/CommandFinder.d.ts +7 -22
- package/dist/cli/entrypoint/finder/ContentFinder.d.ts +5 -19
- package/dist/cli/entrypoint/finder/IconFinder.d.ts +12 -25
- package/dist/cli/entrypoint/finder/LocaleFinder.d.ts +14 -22
- package/dist/cli/entrypoint/finder/LocaleFinder.js +23 -9
- package/dist/cli/entrypoint/finder/LocaleFinder.js.map +1 -1
- package/dist/cli/entrypoint/finder/OffscreenFinder.d.ts +5 -26
- package/dist/cli/entrypoint/finder/OffscreenViewFinder.d.ts +8 -29
- package/dist/cli/entrypoint/finder/OffscreenViewFinder.js +1 -0
- package/dist/cli/entrypoint/finder/OffscreenViewFinder.js.map +1 -1
- package/dist/cli/entrypoint/finder/PageFinder.d.ts +5 -22
- package/dist/cli/entrypoint/finder/PluginFinder.d.ts +7 -19
- package/dist/cli/entrypoint/finder/PluginFinder.js +2 -0
- package/dist/cli/entrypoint/finder/PluginFinder.js.map +1 -1
- package/dist/cli/entrypoint/finder/PopupFinder.d.ts +5 -22
- package/dist/cli/entrypoint/finder/RelayFinder.d.ts +5 -25
- package/dist/cli/entrypoint/finder/ServiceFinder.d.ts +5 -25
- package/dist/cli/entrypoint/finder/SidebarFinder.d.ts +5 -22
- package/dist/cli/entrypoint/finder/index.d.ts +18 -43
- package/dist/cli/entrypoint/index.d.ts +4 -64
- package/dist/cli/entrypoint/name/InlineNameGenerator.d.ts +2 -12
- package/dist/cli/entrypoint/name/NameGenerator.d.ts +2 -11
- package/dist/cli/entrypoint/name/NameGenerator.js +1 -0
- package/dist/cli/entrypoint/name/NameGenerator.js.map +1 -1
- package/dist/cli/entrypoint/name/index.d.ts +2 -9
- package/dist/cli/entrypoint/parser/AbstractParser.d.ts +14 -29
- package/dist/cli/entrypoint/parser/AbstractParser.js +1 -0
- package/dist/cli/entrypoint/parser/AbstractParser.js.map +1 -1
- package/dist/cli/entrypoint/parser/BackgroundParser.d.ts +3 -23
- package/dist/cli/entrypoint/parser/CommandParser.d.ts +4 -24
- package/dist/cli/entrypoint/parser/CommandParser.js +20 -5
- package/dist/cli/entrypoint/parser/CommandParser.js.map +1 -1
- package/dist/cli/entrypoint/parser/ContentParser.d.ts +4 -23
- package/dist/cli/entrypoint/parser/OffscreenParser.d.ts +3 -28
- package/dist/cli/entrypoint/parser/PageParser.d.ts +3 -26
- package/dist/cli/entrypoint/parser/PopupParser.d.ts +3 -26
- package/dist/cli/entrypoint/parser/RelayParser.d.ts +4 -27
- package/dist/cli/entrypoint/parser/ServiceParser.d.ts +3 -27
- package/dist/cli/entrypoint/parser/SidebarParser.d.ts +3 -26
- package/dist/cli/entrypoint/parser/ViewParser.d.ts +60 -80
- package/dist/cli/entrypoint/parser/index.d.ts +9 -38
- package/dist/cli/entrypoint/utils/framework.d.ts +3 -12
- package/dist/cli/entrypoint/utils/index.d.ts +2 -10
- package/dist/cli/entrypoint/utils/resolve.d.ts +3 -5
- package/dist/cli/index.d.ts +1 -2
- package/dist/cli/plugins/asset.d.ts +2 -15
- package/dist/cli/plugins/background/Background.d.ts +4 -21
- package/dist/cli/plugins/background/BackgroundEntry.d.ts +7 -21
- package/dist/cli/plugins/background/BackgroundEntry.js +1 -0
- package/dist/cli/plugins/background/BackgroundEntry.js.map +1 -1
- package/dist/cli/plugins/background/BackgroundManifest.d.ts +5 -21
- package/dist/cli/plugins/background/Command.d.ts +6 -23
- package/dist/cli/plugins/background/Service.d.ts +5 -27
- package/dist/cli/plugins/background/ServiceDeclaration.d.ts +3 -17
- package/dist/cli/plugins/background/index.d.ts +2 -15
- package/dist/cli/plugins/bundler.d.ts +2 -15
- package/dist/cli/plugins/content/Content.d.ts +9 -24
- package/dist/cli/plugins/content/ContentDriver.d.ts +7 -22
- package/dist/cli/plugins/content/ContentDriver.js +1 -0
- package/dist/cli/plugins/content/ContentDriver.js.map +1 -1
- package/dist/cli/plugins/content/ContentManager.d.ts +8 -19
- package/dist/cli/plugins/content/ContentName.d.ts +5 -17
- package/dist/cli/plugins/content/ContentName.js +1 -0
- package/dist/cli/plugins/content/ContentName.js.map +1 -1
- package/dist/cli/plugins/content/Relay.d.ts +9 -30
- package/dist/cli/plugins/content/RelayDeclaration.d.ts +3 -17
- package/dist/cli/plugins/content/index.d.ts +2 -15
- package/dist/cli/plugins/content/index.js +14 -3
- package/dist/cli/plugins/content/index.js.map +1 -1
- package/dist/cli/plugins/content/types.d.ts +8 -16
- package/dist/cli/plugins/content/utils.d.ts +2 -11
- package/dist/cli/plugins/dotenv/index.d.ts +3 -16
- package/dist/cli/plugins/dotenv/utils.d.ts +4 -7
- package/dist/cli/plugins/html.d.ts +2 -15
- package/dist/cli/plugins/icon/Icon.d.ts +6 -22
- package/dist/cli/plugins/icon/declaration/IconDeclaration.d.ts +3 -16
- package/dist/cli/plugins/icon/declaration/index.d.ts +1 -13
- package/dist/cli/plugins/icon/index.d.ts +4 -21
- package/dist/cli/plugins/index.d.ts +22 -58
- package/dist/cli/plugins/index.js +32 -30
- package/dist/cli/plugins/index.js.map +1 -1
- package/dist/cli/plugins/locale/Locale.d.ts +3 -20
- package/dist/cli/plugins/locale/declaration/LocaleDeclaration.d.ts +4 -16
- package/dist/cli/plugins/locale/declaration/index.d.ts +1 -13
- package/dist/cli/plugins/locale/declaration/locale.d.ts +61 -11
- package/dist/cli/plugins/locale/index.d.ts +2 -15
- package/dist/cli/plugins/locale/index.js +44 -49
- package/dist/cli/plugins/locale/index.js.map +1 -1
- package/dist/cli/plugins/manifest.d.ts +2 -0
- package/dist/cli/plugins/manifest.js +27 -0
- package/dist/cli/plugins/manifest.js.map +1 -0
- package/dist/cli/plugins/meta/AbstractMeta.d.ts +2 -15
- package/dist/cli/plugins/meta/AbstractMeta.js +1 -0
- package/dist/cli/plugins/meta/AbstractMeta.js.map +1 -1
- package/dist/cli/plugins/meta/Author.d.ts +3 -16
- package/dist/cli/plugins/meta/Homepage.d.ts +3 -16
- package/dist/cli/plugins/meta/Incognito.d.ts +4 -16
- package/dist/cli/plugins/meta/SpecificSettings.d.ts +4 -16
- package/dist/cli/plugins/meta/index.d.ts +7 -20
- package/dist/cli/plugins/offscreen/Offscreen.d.ts +11 -35
- package/dist/cli/plugins/offscreen/OffscreenDeclaration.d.ts +3 -17
- package/dist/cli/plugins/offscreen/index.d.ts +2 -15
- package/dist/cli/plugins/optimization.d.ts +2 -15
- package/dist/cli/plugins/optimization.js +42 -13
- package/dist/cli/plugins/optimization.js.map +1 -1
- package/dist/cli/plugins/output.d.ts +2 -15
- package/dist/cli/plugins/page/Page.d.ts +8 -26
- package/dist/cli/plugins/page/declaration/PageDeclaration.d.ts +3 -16
- package/dist/cli/plugins/page/declaration/index.d.ts +1 -13
- package/dist/cli/plugins/page/index.d.ts +2 -15
- package/dist/cli/plugins/popup/Popup.d.ts +9 -27
- package/dist/cli/plugins/popup/declaration/PopupDeclaration.d.ts +3 -16
- package/dist/cli/plugins/popup/declaration/index.d.ts +1 -13
- package/dist/cli/plugins/popup/index.d.ts +2 -15
- package/dist/cli/plugins/public.d.ts +2 -15
- package/dist/cli/plugins/react.d.ts +2 -15
- package/dist/cli/plugins/sidebar/Sidebar.d.ts +9 -27
- package/dist/cli/plugins/sidebar/declaration/SidebarDeclaration.d.ts +3 -16
- package/dist/cli/plugins/sidebar/declaration/index.d.ts +1 -13
- package/dist/cli/plugins/sidebar/index.d.ts +2 -15
- package/dist/cli/plugins/style.d.ts +2 -15
- package/dist/cli/plugins/typescript/FileBuilder.d.ts +2 -15
- package/dist/cli/plugins/typescript/FileBuilder.js +1 -0
- package/dist/cli/plugins/typescript/FileBuilder.js.map +1 -1
- package/dist/cli/plugins/typescript/TypescriptConfig.d.ts +4 -17
- package/dist/cli/plugins/typescript/declaration/index.d.ts +2 -14
- package/dist/cli/plugins/typescript/declaration/transport/TransportDeclaration.d.ts +4 -17
- package/dist/cli/plugins/typescript/declaration/transport/TransportDeclaration.js +1 -0
- package/dist/cli/plugins/typescript/declaration/transport/TransportDeclaration.js.map +1 -1
- package/dist/cli/plugins/typescript/declaration/transport/index.d.ts +1 -13
- package/dist/cli/plugins/typescript/declaration/vendor/VendorDeclaration.d.ts +3 -16
- package/dist/cli/plugins/typescript/declaration/vendor/index.d.ts +1 -13
- package/dist/cli/plugins/typescript/index.d.ts +6 -20
- package/dist/cli/plugins/version/AbstractVersion.d.ts +2 -15
- package/dist/cli/plugins/version/AbstractVersion.js +2 -1
- package/dist/cli/plugins/version/AbstractVersion.js.map +1 -1
- package/dist/cli/plugins/version/AddonVersion.d.ts +3 -16
- package/dist/cli/plugins/version/BrowserMinimumVersion.d.ts +3 -16
- package/dist/cli/plugins/version/index.d.ts +5 -18
- package/dist/cli/plugins/view/View.d.ts +10 -24
- package/dist/cli/plugins/view/View.js +2 -0
- package/dist/cli/plugins/view/View.js.map +1 -1
- package/dist/cli/plugins/view/index.d.ts +3 -22
- package/dist/cli/plugins/view/index.js +26 -12
- package/dist/cli/plugins/view/index.js.map +1 -1
- package/dist/cli/resolvers/bundler.d.ts +4 -15
- package/dist/cli/resolvers/config.d.ts +2 -14
- package/dist/cli/resolvers/config.js +46 -11
- package/dist/cli/resolvers/config.js.map +1 -1
- package/dist/cli/resolvers/path.d.ts +11 -24
- package/dist/cli/resolvers/plugin.d.ts +3 -16
- package/dist/cli/utils/fs.d.ts +3 -5
- package/dist/cli/utils/path.d.ts +3 -5
- package/dist/cli/utils/string.d.ts +2 -4
- package/dist/cli/virtual/background.d.ts +1 -0
- package/dist/cli/virtual/command.d.ts +1 -0
- package/dist/cli/virtual/content.d.ts +1 -0
- package/dist/cli/virtual/index.d.ts +9 -0
- package/dist/cli/virtual/index.js +2 -2
- package/dist/cli/virtual/offscreen.background.d.ts +1 -0
- package/dist/cli/virtual/offscreen.d.ts +1 -0
- package/dist/cli/virtual/relay.d.ts +1 -0
- package/dist/cli/virtual/transport.d.ts +1 -0
- package/dist/cli/virtual/view.d.ts +1 -0
- package/dist/cli/virtual/virtual.d.ts +38 -38
- package/dist/entry/background/Builder.d.ts +3 -12
- package/dist/entry/background/Builder.js +1 -0
- package/dist/entry/background/Builder.js.map +1 -1
- package/dist/entry/background/index.d.ts +3 -12
- package/dist/entry/background/resolvers/definition.d.ts +3 -12
- package/dist/entry/background/resolvers/index.d.ts +1 -8
- package/dist/entry/command/Builder.d.ts +4 -12
- package/dist/entry/command/index.d.ts +3 -12
- package/dist/entry/command/resolvers/definition.d.ts +4 -13
- package/dist/entry/command/resolvers/index.d.ts +1 -8
- package/dist/entry/content/adapters/react/Builder.d.ts +3 -17
- package/dist/entry/content/adapters/react/Node.d.ts +6 -14
- package/dist/entry/content/adapters/react/Node.js +2 -0
- package/dist/entry/content/adapters/react/Node.js.map +1 -1
- package/dist/entry/content/adapters/react/index.d.ts +4 -18
- package/dist/entry/content/adapters/react/resolvers/index.d.ts +1 -8
- package/dist/entry/content/adapters/react/resolvers/render.d.ts +2 -11
- package/dist/entry/content/adapters/vanilla/Builder.d.ts +3 -17
- package/dist/entry/content/adapters/vanilla/Node.d.ts +2 -11
- package/dist/entry/content/adapters/vanilla/Node.js +2 -0
- package/dist/entry/content/adapters/vanilla/Node.js.map +1 -1
- package/dist/entry/content/adapters/vanilla/index.d.ts +4 -18
- package/dist/entry/content/core/AbstractMarker.d.ts +2 -11
- package/dist/entry/content/core/AbstractMarker.js +1 -0
- package/dist/entry/content/core/AbstractMarker.js.map +1 -1
- package/dist/entry/content/core/AttributeMarker.d.ts +3 -12
- package/dist/entry/content/core/Builder.d.ts +8 -17
- package/dist/entry/content/core/Context.d.ts +2 -11
- package/dist/entry/content/core/Context.js +1 -0
- package/dist/entry/content/core/Context.js.map +1 -1
- package/dist/entry/content/core/EventEmitter.d.ts +2 -11
- package/dist/entry/content/core/EventNode.d.ts +2 -11
- package/dist/entry/content/core/EventNode.js +2 -0
- package/dist/entry/content/core/EventNode.js.map +1 -1
- package/dist/entry/content/core/ManagedContext.d.ts +3 -12
- package/dist/entry/content/core/MarkerNode.d.ts +2 -11
- package/dist/entry/content/core/MarkerNode.js +2 -0
- package/dist/entry/content/core/MarkerNode.js.map +1 -1
- package/dist/entry/content/core/MountBuilder.d.ts +3 -16
- package/dist/entry/content/core/MountNode.d.ts +2 -11
- package/dist/entry/content/core/MountNode.js +2 -0
- package/dist/entry/content/core/MountNode.js.map +1 -1
- package/dist/entry/content/core/Node.d.ts +2 -11
- package/dist/entry/content/core/Node.js +2 -0
- package/dist/entry/content/core/Node.js.map +1 -1
- package/dist/entry/content/core/WeakMarker.d.ts +3 -12
- package/dist/entry/content/core/resolvers/anchor.d.ts +2 -11
- package/dist/entry/content/core/resolvers/container.d.ts +2 -11
- package/dist/entry/content/core/resolvers/definition.d.ts +3 -12
- package/dist/entry/content/core/resolvers/index.d.ts +6 -13
- package/dist/entry/content/core/resolvers/mount.d.ts +2 -11
- package/dist/entry/content/core/resolvers/render.d.ts +3 -12
- package/dist/entry/content/core/resolvers/watch.d.ts +4 -13
- package/dist/entry/content/index.d.ts +1 -8
- package/dist/entry/core/Builder.d.ts +2 -11
- package/dist/entry/offscreen/Builder.d.ts +8 -25
- package/dist/entry/offscreen/Builder.js +8 -1
- package/dist/entry/offscreen/Builder.js.map +1 -1
- package/dist/entry/offscreen/TransportBuilder.d.ts +6 -24
- package/dist/entry/offscreen/index.d.ts +4 -25
- package/dist/entry/relay/Builder.d.ts +7 -21
- package/dist/entry/relay/Builder.js +1 -0
- package/dist/entry/relay/Builder.js.map +1 -1
- package/dist/entry/relay/TransportBuilder.d.ts +6 -20
- package/dist/entry/relay/index.d.ts +4 -21
- package/dist/entry/service/Builder.d.ts +6 -20
- package/dist/entry/service/index.d.ts +2 -14
- package/dist/entry/transport/AbstractBuilder.d.ts +4 -14
- package/dist/entry/transport/index.d.ts +1 -14
- package/dist/entry/transport/resolvers/definition.d.ts +7 -20
- package/dist/entry/transport/resolvers/index.d.ts +1 -14
- package/dist/entry/view/adapters/react/Builder.d.ts +4 -16
- package/dist/entry/view/adapters/react/index.d.ts +4 -17
- package/dist/entry/view/adapters/react/resolvers/render.d.ts +2 -13
- package/dist/entry/view/adapters/vanilla/Builder.d.ts +3 -15
- package/dist/entry/view/adapters/vanilla/index.d.ts +4 -16
- package/dist/entry/view/core/Builder.d.ts +3 -14
- package/dist/entry/view/core/resolvers/container.d.ts +2 -13
- package/dist/entry/view/core/resolvers/definition.d.ts +3 -14
- package/dist/entry/view/core/resolvers/render.d.ts +3 -14
- package/dist/entry/view/index.d.ts +1 -10
- package/dist/index.d.ts +1 -43
- package/dist/locale/adapters/react/LocaleProvider.d.ts +4 -6
- package/dist/locale/adapters/react/LocaleProvider.js +5 -5
- package/dist/locale/adapters/react/LocaleProvider.js.map +1 -1
- package/dist/locale/adapters/react/context.d.ts +8 -13
- package/dist/locale/adapters/react/context.js +2 -5
- package/dist/locale/adapters/react/context.js.map +1 -1
- package/dist/locale/adapters/react/index.d.ts +2 -6
- package/dist/locale/helpers.d.ts +60 -36
- package/dist/locale/helpers.js +14 -14
- package/dist/locale/helpers.js.map +1 -1
- package/dist/locale/index.d.ts +3 -7
- package/dist/locale/index.js.map +1 -1
- package/dist/locale/providers/AbstractLocale.d.ts +5 -8
- package/dist/locale/providers/AbstractLocale.js +9 -6
- package/dist/locale/providers/AbstractLocale.js.map +1 -1
- package/dist/locale/providers/CustomLocale.d.ts +5 -8
- package/dist/locale/providers/CustomLocale.js +3 -1
- package/dist/locale/providers/CustomLocale.js.map +1 -1
- package/dist/locale/providers/DynamicLocale.d.ts +7 -11
- package/dist/locale/providers/DynamicLocale.js +1 -1
- package/dist/locale/providers/DynamicLocale.js.map +1 -1
- package/dist/locale/providers/NativeLocale.d.ts +7 -10
- package/dist/locale/providers/NativeLocale.js.map +1 -1
- package/dist/locale/providers/index.d.ts +3 -6
- package/dist/locale/utils.d.ts +11 -14
- package/dist/main/app.d.ts +1 -1
- package/dist/main/app.js +3 -2
- package/dist/main/app.js.map +1 -1
- package/dist/main/background.d.ts +3 -12
- package/dist/main/browser.d.ts +1 -1
- package/dist/main/command.d.ts +4 -13
- package/dist/main/config.d.ts +3 -16
- package/dist/main/config.js.map +1 -1
- package/dist/main/content.d.ts +6 -18
- package/dist/main/env.d.ts +7 -15
- package/dist/main/icon.d.ts +6 -7
- package/dist/main/index.d.ts +17 -43
- package/dist/main/manifest.d.ts +1 -7
- package/dist/main/offscreen.d.ts +9 -22
- package/dist/main/offscreen.js +1 -1
- package/dist/main/offscreen.js.map +1 -1
- package/dist/main/page.d.ts +7 -19
- package/dist/main/plugin.d.ts +3 -16
- package/dist/main/popup.d.ts +8 -18
- package/dist/main/popup.js +2 -2
- package/dist/main/popup.js.map +1 -1
- package/dist/main/relay.d.ts +8 -21
- package/dist/main/service.d.ts +6 -15
- package/dist/main/sidebar.d.ts +8 -18
- package/dist/main/sidebar.js +2 -2
- package/dist/main/sidebar.js.map +1 -1
- package/dist/main/view.d.ts +1 -9
- package/dist/message/MessageManager.d.ts +2 -5
- package/dist/message/adapters/react/index.d.ts +1 -2
- package/dist/message/adapters/react/useMessageHandler.d.ts +2 -5
- package/dist/message/handlers/AbstractHandler.d.ts +2 -5
- package/dist/message/handlers/GeneralHandler.d.ts +3 -6
- package/dist/message/handlers/GeneralHandler.js +1 -0
- package/dist/message/handlers/GeneralHandler.js.map +1 -1
- package/dist/message/handlers/MapHandler.d.ts +3 -6
- package/dist/message/handlers/MapHandler.js +1 -0
- package/dist/message/handlers/MapHandler.js.map +1 -1
- package/dist/message/handlers/SingleHandler.d.ts +3 -6
- package/dist/message/handlers/SingleHandler.js +2 -0
- package/dist/message/handlers/SingleHandler.js.map +1 -1
- package/dist/message/handlers/index.d.ts +3 -5
- package/dist/message/index.d.ts +9 -13
- package/dist/message/providers/AbstractMessage.d.ts +2 -5
- package/dist/message/providers/Message.d.ts +4 -7
- package/dist/message/providers/index.d.ts +1 -4
- package/dist/offscreen/OffscreenBackground.d.ts +2 -9
- package/dist/offscreen/OffscreenBridge.d.ts +8 -9
- package/dist/offscreen/OffscreenBridge.js +55 -7
- package/dist/offscreen/OffscreenBridge.js.map +1 -1
- package/dist/offscreen/OffscreenManager.d.ts +4 -15
- package/dist/offscreen/OffscreenMessage.d.ts +2 -14
- package/dist/offscreen/index.d.ts +5 -26
- package/dist/offscreen/providers/Offscreen.d.ts +3 -14
- package/dist/offscreen/providers/ProxyOffscreen.d.ts +7 -18
- package/dist/offscreen/providers/ProxyOffscreen.js +44 -23
- package/dist/offscreen/providers/ProxyOffscreen.js.map +1 -1
- package/dist/offscreen/providers/RegisterOffscreen.d.ts +5 -18
- package/dist/offscreen/providers/RegisterOffscreen.js +1 -0
- package/dist/offscreen/providers/RegisterOffscreen.js.map +1 -1
- package/dist/offscreen/providers/index.d.ts +3 -17
- package/dist/offscreen/utils.d.ts +1 -3
- package/dist/relay/RelayManager.d.ts +6 -16
- package/dist/relay/RelayMessage.d.ts +2 -14
- package/dist/relay/RelayPermission.d.ts +4 -15
- package/dist/relay/index.d.ts +4 -22
- package/dist/relay/providers/ProxyRelay.d.ts +8 -19
- package/dist/relay/providers/ProxyRelay.js +2 -0
- package/dist/relay/providers/ProxyRelay.js.map +1 -1
- package/dist/relay/providers/RegisterRelay.d.ts +4 -16
- package/dist/relay/providers/RegisterRelay.js +2 -0
- package/dist/relay/providers/RegisterRelay.js.map +1 -1
- package/dist/relay/providers/Relay.d.ts +3 -14
- package/dist/relay/providers/index.d.ts +3 -18
- package/dist/relay/utils.d.ts +3 -5
- package/dist/service/ServiceManager.d.ts +4 -15
- package/dist/service/ServiceMessage.d.ts +2 -14
- package/dist/service/index.d.ts +4 -19
- package/dist/service/providers/ProxyService.d.ts +4 -15
- package/dist/service/providers/RegisterService.d.ts +3 -15
- package/dist/service/providers/RegisterService.js +1 -0
- package/dist/service/providers/RegisterService.js.map +1 -1
- package/dist/service/providers/Service.d.ts +3 -14
- package/dist/service/providers/index.d.ts +3 -15
- package/dist/transport/BaseTransport.d.ts +2 -13
- package/dist/transport/BaseTransport.js +1 -0
- package/dist/transport/BaseTransport.js.map +1 -1
- package/dist/transport/ProxyTransport.d.ts +4 -14
- package/dist/transport/RegisterTransport.d.ts +4 -16
- package/dist/transport/RegisterTransport.js +13 -20
- package/dist/transport/RegisterTransport.js.map +1 -1
- package/dist/transport/TransportManager.d.ts +2 -13
- package/dist/transport/TransportMessage.d.ts +3 -13
- package/dist/transport/index.d.ts +1 -9
- package/dist/types/app.d.ts +8 -6
- package/dist/types/app.js +7 -1
- package/dist/types/app.js.map +1 -1
- package/dist/types/background.d.ts +20 -7
- package/dist/types/browser.d.ts +6 -8
- package/dist/types/command.d.ts +27 -7
- package/dist/types/config.d.ts +673 -11
- package/dist/types/content.d.ts +195 -7
- package/dist/types/entrypoint.d.ts +106 -7
- package/dist/types/entrypoint.js.map +1 -1
- package/dist/types/env.d.ts +4 -6
- package/dist/types/framework.d.ts +1 -3
- package/dist/types/helpers.d.ts +6 -7
- package/dist/types/icon.d.ts +3 -5
- package/dist/types/locale.d.ts +35 -29
- package/dist/types/locale.js.map +1 -1
- package/dist/types/manifest.d.ts +163 -7
- package/dist/types/manifest.js.map +1 -1
- package/dist/types/message.d.ts +17 -19
- package/dist/types/message.js +1 -1
- package/dist/types/message.js.map +1 -1
- package/dist/types/offscreen.d.ts +13 -23
- package/dist/types/offscreen.js +2 -0
- package/dist/types/offscreen.js.map +1 -1
- package/dist/types/page.d.ts +5 -16
- package/dist/types/plugin.d.ts +101 -11
- package/dist/types/popup.d.ts +5 -16
- package/dist/types/relay.d.ts +13 -21
- package/dist/types/service.d.ts +9 -18
- package/dist/types/sidebar.d.ts +7 -17
- package/dist/types/transport.d.ts +22 -29
- package/dist/types/view.d.ts +18 -24
- package/package.json +14 -16
- package/dist/config-BaSTGrd0.d.ts +0 -726
- package/dist/manifest-DKvERQ4d.d.ts +0 -503
package/dist/types/content.d.ts
CHANGED
|
@@ -1,7 +1,195 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import type { FC, ReactNode } from "react";
|
|
2
|
+
import { Optional } from "utility-types";
|
|
3
|
+
import { EntrypointBuilder, EntrypointOptions } from "./entrypoint.js";
|
|
4
|
+
import { Awaiter, PickNonFunctionProperties } from "./helpers.js";
|
|
5
|
+
type ExecutionWorld = chrome.scripting.ExecutionWorld;
|
|
6
|
+
type RunAt = chrome.extensionTypes.RunAt;
|
|
7
|
+
export declare const ContentScriptMatches: string[];
|
|
8
|
+
export declare enum ContentScriptDeclarative {
|
|
9
|
+
Required = "required",
|
|
10
|
+
Optional = "optional"
|
|
11
|
+
}
|
|
12
|
+
export interface ContentScriptConfig {
|
|
13
|
+
matches?: string[];
|
|
14
|
+
/**
|
|
15
|
+
* See https://developer.chrome.com/docs/extensions/mv3/content_scripts/
|
|
16
|
+
* @default []
|
|
17
|
+
*/
|
|
18
|
+
excludeMatches?: string[];
|
|
19
|
+
/**
|
|
20
|
+
* See https://developer.chrome.com/docs/extensions/mv3/content_scripts/
|
|
21
|
+
* @default []
|
|
22
|
+
*/
|
|
23
|
+
includeGlobs?: string[];
|
|
24
|
+
/**
|
|
25
|
+
* See https://developer.chrome.com/docs/extensions/mv3/content_scripts/
|
|
26
|
+
* @default []
|
|
27
|
+
*/
|
|
28
|
+
excludeGlobs?: string[];
|
|
29
|
+
/**
|
|
30
|
+
* See https://developer.chrome.com/docs/extensions/mv3/content_scripts/
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
allFrames?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* See https://developer.chrome.com/docs/extensions/mv3/content_scripts/
|
|
36
|
+
* @default "documentIdle"
|
|
37
|
+
*/
|
|
38
|
+
runAt?: RunAt;
|
|
39
|
+
/**
|
|
40
|
+
* See https://developer.chrome.com/docs/extensions/develop/concepts/content-scripts#isolated_world
|
|
41
|
+
*/
|
|
42
|
+
world?: ExecutionWorld;
|
|
43
|
+
/**
|
|
44
|
+
* See https://developer.chrome.com/docs/extensions/mv3/content_scripts/
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
47
|
+
matchAboutBlank?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* See https://developer.chrome.com/docs/extensions/mv3/content_scripts/
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
matchOriginAsFallback?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Whether this content script requires explicit host permission declaration in the extension manifest.
|
|
55
|
+
*
|
|
56
|
+
* Accepted values:
|
|
57
|
+
* - ContentScriptDeclarative.Required — adds the corresponding host patterns to manifest.host_permissions.
|
|
58
|
+
* - ContentScriptDeclarative.Optional — adds the corresponding host patterns to manifest.optional_host_permissions.
|
|
59
|
+
*
|
|
60
|
+
* Backward compatibility:
|
|
61
|
+
* - true ≡ ContentScriptDeclarative.Required
|
|
62
|
+
* - false ≡ undefined (as if the value is not set)
|
|
63
|
+
*
|
|
64
|
+
* @see https://developer.chrome.com/docs/extensions/mv3/declare_permissions/
|
|
65
|
+
*
|
|
66
|
+
* @default undefined
|
|
67
|
+
*/
|
|
68
|
+
declarative?: boolean | `${ContentScriptDeclarative}` | ContentScriptDeclarative;
|
|
69
|
+
}
|
|
70
|
+
export type ContentScriptOptions = ContentScriptConfig & EntrypointOptions;
|
|
71
|
+
export type ContentScriptEntrypointOptions = Partial<ContentScriptOptions>;
|
|
72
|
+
export declare enum ContentScriptAppend {
|
|
73
|
+
Last = "last",
|
|
74
|
+
First = "first",
|
|
75
|
+
Replace = "replace",
|
|
76
|
+
Before = "before",
|
|
77
|
+
After = "after"
|
|
78
|
+
}
|
|
79
|
+
export type ContentScriptMountFunction = (anchor: Element, container: Element) => void | (() => void);
|
|
80
|
+
export interface ContentScriptMount {
|
|
81
|
+
mount(): boolean | undefined | void;
|
|
82
|
+
unmount(): boolean | undefined | void;
|
|
83
|
+
}
|
|
84
|
+
export interface ContentScriptProps extends ContentScriptEntrypointOptions {
|
|
85
|
+
anchor: Element;
|
|
86
|
+
}
|
|
87
|
+
export type ContentScriptAnchor = string | Element | null | undefined;
|
|
88
|
+
export type ContentScriptAnchorGetter = () => Awaiter<ContentScriptAnchor>;
|
|
89
|
+
export declare enum ContentScriptMarker {
|
|
90
|
+
/** In-memory marking (no DOM mutations). */
|
|
91
|
+
Weak = "weak",
|
|
92
|
+
/** DOM attribute-based marking. */
|
|
93
|
+
Attribute = "attribute"
|
|
94
|
+
}
|
|
95
|
+
export declare enum ContentScriptMarkerValue {
|
|
96
|
+
Mounted = "1",
|
|
97
|
+
Unmounted = "0"
|
|
98
|
+
}
|
|
99
|
+
export interface ContentScriptMarkerContract {
|
|
100
|
+
for(anchor: ContentScriptAnchor): ContentScriptMarkerContract;
|
|
101
|
+
/**
|
|
102
|
+
* Returns elements that are not tracked yet (no marker attribute present).
|
|
103
|
+
* MUST NOT mutate marker state.
|
|
104
|
+
*/
|
|
105
|
+
unmarked(): Element[];
|
|
106
|
+
marked(): Element[];
|
|
107
|
+
mark(element: Element, value: ContentScriptMarkerValue): boolean;
|
|
108
|
+
unmark(element: Element): boolean;
|
|
109
|
+
isMarked(element: Element): boolean;
|
|
110
|
+
value(element: Element): ContentScriptMarkerValue | undefined;
|
|
111
|
+
mount(element: Element): boolean;
|
|
112
|
+
unmount(element: Element): boolean;
|
|
113
|
+
reset(): ContentScriptMarkerContract;
|
|
114
|
+
}
|
|
115
|
+
export type ContentScriptMarkerType = ContentScriptMarker | `${ContentScriptMarker}` | ContentScriptMarkerContract | undefined;
|
|
116
|
+
export type ContentScriptMarkerGetter = (options: ContentScriptOptions) => Awaiter<ContentScriptMarkerType>;
|
|
117
|
+
export type ContentScriptMarkerResolver = (options: ContentScriptOptions) => Awaiter<ContentScriptMarkerContract>;
|
|
118
|
+
export type ContentScriptRenderReactComponent = FC<ContentScriptProps>;
|
|
119
|
+
export type ContentScriptRenderValue = Element | ReactNode | ContentScriptRenderReactComponent;
|
|
120
|
+
export type ContentScriptRenderHandler = (props: ContentScriptProps) => Awaiter<undefined | ContentScriptRenderValue>;
|
|
121
|
+
export type ContentScriptContainerTag = Exclude<keyof HTMLElementTagNameMap, "html" | "body">;
|
|
122
|
+
export type ContentScriptContainerOptions = {
|
|
123
|
+
[Tag in ContentScriptContainerTag]: {
|
|
124
|
+
tagName: Tag;
|
|
125
|
+
} & Exclude<Optional<PickNonFunctionProperties<HTMLElementTagNameMap[Tag]>>, "id">;
|
|
126
|
+
}[ContentScriptContainerTag];
|
|
127
|
+
export type ContentScriptContainerFactory = (props: ContentScriptProps) => Awaiter<Element | ContentScriptContainerTag | ContentScriptContainerOptions>;
|
|
128
|
+
export type ContentScriptContainerCreator = (props: ContentScriptProps) => Awaiter<Element>;
|
|
129
|
+
export type ContentScriptWatchStrategy = (update: () => void, context: ContentScriptContext) => () => void;
|
|
130
|
+
export declare enum ContentScriptEvent {
|
|
131
|
+
Mount = "mount",
|
|
132
|
+
Unmount = "unmount",
|
|
133
|
+
Add = "add",
|
|
134
|
+
Remove = "remove"
|
|
135
|
+
}
|
|
136
|
+
export type ContentScriptEventCallback = (event: ContentScriptEvent, node: ContentScriptNode) => void;
|
|
137
|
+
export interface ContentScriptEventEmitter {
|
|
138
|
+
on(callback: ContentScriptEventCallback): void;
|
|
139
|
+
off(callback: ContentScriptEventCallback): void;
|
|
140
|
+
emit(event: ContentScriptEvent, node: ContentScriptNode): void;
|
|
141
|
+
emitMount(node: ContentScriptNode): void;
|
|
142
|
+
emitUnmount(node: ContentScriptNode): void;
|
|
143
|
+
emitAdd(node: ContentScriptNode): void;
|
|
144
|
+
emitRemove(node: ContentScriptNode): void;
|
|
145
|
+
removeAllListeners(): void;
|
|
146
|
+
listenerCount(): number;
|
|
147
|
+
hasListeners(): boolean;
|
|
148
|
+
}
|
|
149
|
+
export interface ContentScriptContext extends ContentScriptMount {
|
|
150
|
+
nodes: ReadonlySet<ContentScriptNode>;
|
|
151
|
+
/**
|
|
152
|
+
* Registers a callback function that will be invoked when a specific content script context event occurs.
|
|
153
|
+
*
|
|
154
|
+
* @param {ContentScriptEventCallback} callback - The function to be executed when the event is triggered. Receives event-related data as its argument.
|
|
155
|
+
* @return {Function} A function that can be called to unsubscribe the callback from the event.
|
|
156
|
+
*/
|
|
157
|
+
watch(callback: ContentScriptEventCallback): () => void;
|
|
158
|
+
/**
|
|
159
|
+
* Stops watching for changes or events that were previously being observed.
|
|
160
|
+
* Unsubscribes from all event listeners that were registered through the watch method.
|
|
161
|
+
*
|
|
162
|
+
* @return {void} No return value.
|
|
163
|
+
*/
|
|
164
|
+
unwatch(): void;
|
|
165
|
+
}
|
|
166
|
+
export type ContentScriptMainFunction = (context: ContentScriptContext, options: ContentScriptOptions) => Awaiter<void>;
|
|
167
|
+
export interface ContentScriptNode extends ContentScriptMount {
|
|
168
|
+
anchor: Element;
|
|
169
|
+
container?: Element;
|
|
170
|
+
}
|
|
171
|
+
export type ContentScriptNodeSet = Set<ContentScriptNode>;
|
|
172
|
+
export interface ContentScriptDefinition extends ContentScriptEntrypointOptions {
|
|
173
|
+
marker?: ContentScriptMarkerType | ContentScriptMarkerGetter;
|
|
174
|
+
anchor?: ContentScriptAnchor | ContentScriptAnchorGetter;
|
|
175
|
+
mount?: ContentScriptMountFunction;
|
|
176
|
+
render?: ContentScriptRenderValue | ContentScriptRenderHandler;
|
|
177
|
+
container?: ContentScriptContainerTag | ContentScriptContainerOptions | ContentScriptContainerFactory;
|
|
178
|
+
watch?: true | ContentScriptWatchStrategy;
|
|
179
|
+
main?: ContentScriptMainFunction;
|
|
180
|
+
}
|
|
181
|
+
export interface ContentScriptResolvedDefinition extends Omit<ContentScriptDefinition, "anchor" | "marker" | "mount" | "container" | "render" | "watch"> {
|
|
182
|
+
marker: ContentScriptMarkerResolver;
|
|
183
|
+
anchor: ContentScriptAnchorGetter;
|
|
184
|
+
mount: ContentScriptMountFunction;
|
|
185
|
+
render?: ContentScriptRenderHandler;
|
|
186
|
+
container: ContentScriptContainerCreator;
|
|
187
|
+
watch: ContentScriptWatchStrategy;
|
|
188
|
+
}
|
|
189
|
+
export interface ContentScriptAppendDefinition extends Omit<ContentScriptDefinition, "mount"> {
|
|
190
|
+
append?: ContentScriptAppend;
|
|
191
|
+
}
|
|
192
|
+
export interface ContentScriptBuilder extends EntrypointBuilder {
|
|
193
|
+
getContext(): ContentScriptContext;
|
|
194
|
+
}
|
|
195
|
+
export {};
|
|
@@ -1,7 +1,106 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { Mode } from "./app.js";
|
|
2
|
+
import { Browser } from "./browser.js";
|
|
3
|
+
import { ManifestVersion } from "./manifest.js";
|
|
4
|
+
export declare const EntrypointFileExtensions: ReadonlySet<string>;
|
|
5
|
+
export declare enum EntrypointType {
|
|
6
|
+
Background = "background",
|
|
7
|
+
Command = "command",
|
|
8
|
+
ContentScript = "content",
|
|
9
|
+
Page = "page",
|
|
10
|
+
Service = "service",
|
|
11
|
+
Relay = "relay",
|
|
12
|
+
Options = "options",
|
|
13
|
+
Popup = "popup",
|
|
14
|
+
Sidebar = "sidebar",
|
|
15
|
+
Offscreen = "offscreen"
|
|
16
|
+
}
|
|
17
|
+
export interface EntrypointOptions {
|
|
18
|
+
/**
|
|
19
|
+
* List of target browsers to include this entrypoint in. Defaults to being included in all
|
|
20
|
+
* builds.
|
|
21
|
+
*
|
|
22
|
+
* @default undefined
|
|
23
|
+
*/
|
|
24
|
+
includeBrowser?: `${Browser}`[] | Browser[];
|
|
25
|
+
/**
|
|
26
|
+
* List of target browsers to exclude this entrypoint from.
|
|
27
|
+
*
|
|
28
|
+
* @default undefined
|
|
29
|
+
*/
|
|
30
|
+
excludeBrowser?: `${Browser}`[] | Browser[];
|
|
31
|
+
/**
|
|
32
|
+
* List of target apps to include this entrypoint in. Defaults to being included in all builds.
|
|
33
|
+
*
|
|
34
|
+
* @default undefined
|
|
35
|
+
*/
|
|
36
|
+
excludeApp?: string[];
|
|
37
|
+
/**
|
|
38
|
+
* List of target apps to exclude this entrypoint from.
|
|
39
|
+
*
|
|
40
|
+
* @default undefined
|
|
41
|
+
*/
|
|
42
|
+
includeApp?: string[];
|
|
43
|
+
/**
|
|
44
|
+
* Build mode for filtering entry points. Entry point will be included only
|
|
45
|
+
* if it matches the current build mode (Production or Development).
|
|
46
|
+
*
|
|
47
|
+
* @default undefined
|
|
48
|
+
*/
|
|
49
|
+
mode?: `${Exclude<Mode, Mode.None>}` | Exclude<Mode, Mode.None>;
|
|
50
|
+
/**
|
|
51
|
+
* Manifest version constraint for this entry point. Entry point will be included
|
|
52
|
+
* only if it matches the target manifest version.
|
|
53
|
+
*
|
|
54
|
+
* @default undefined
|
|
55
|
+
*/
|
|
56
|
+
manifestVersion?: ManifestVersion;
|
|
57
|
+
/**
|
|
58
|
+
* Debug mode flag. If true, entry point will be included only when building
|
|
59
|
+
* with DEBUG flag enabled.
|
|
60
|
+
*
|
|
61
|
+
* @default undefined
|
|
62
|
+
*/
|
|
63
|
+
debug?: boolean;
|
|
64
|
+
}
|
|
65
|
+
export interface EntrypointFile {
|
|
66
|
+
file: string;
|
|
67
|
+
import: string;
|
|
68
|
+
external?: string;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Dictionary of entrypoint for the build configuration.
|
|
72
|
+
*
|
|
73
|
+
* @key {string} - The name of the entrypoint that will be used in the bundler configuration.
|
|
74
|
+
* @value {EntrypointFile[]} - Array of files that will be included in this entrypoint.
|
|
75
|
+
* These files will be compiled and bundled together as part of the specified entrypoint.
|
|
76
|
+
*/
|
|
77
|
+
export type EntrypointEntries = Map<string, Set<EntrypointFile>>;
|
|
78
|
+
export interface EntrypointParser<O extends EntrypointOptions> {
|
|
79
|
+
options(file: EntrypointFile): O;
|
|
80
|
+
contract(file: EntrypointFile): string | undefined;
|
|
81
|
+
}
|
|
82
|
+
export interface EntrypointFinder {
|
|
83
|
+
files(): Promise<Set<EntrypointFile>>;
|
|
84
|
+
empty(): Promise<boolean>;
|
|
85
|
+
exists(): Promise<boolean>;
|
|
86
|
+
clear(): this;
|
|
87
|
+
holds(file: EntrypointFile): boolean;
|
|
88
|
+
}
|
|
89
|
+
export interface EntrypointOptionsFinder<O extends EntrypointOptions> extends EntrypointFinder {
|
|
90
|
+
type(): EntrypointType;
|
|
91
|
+
options(): Promise<Map<EntrypointFile, O>>;
|
|
92
|
+
contracts(): Promise<Map<EntrypointFile, string | undefined>>;
|
|
93
|
+
}
|
|
94
|
+
export interface EntrypointNameGenerator {
|
|
95
|
+
reserve(name: string): this;
|
|
96
|
+
name(name: string): string;
|
|
97
|
+
file(file: EntrypointFile): string;
|
|
98
|
+
likely(name?: string): boolean;
|
|
99
|
+
has(name: string): boolean;
|
|
100
|
+
reset(): this;
|
|
101
|
+
}
|
|
102
|
+
export interface EntrypointBuilder {
|
|
103
|
+
build(): Promise<void>;
|
|
104
|
+
destroy(): Promise<void>;
|
|
105
|
+
}
|
|
106
|
+
export type EntrypointConstructorParameter<T> = T extends new (arg: infer P) => any ? P : never;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/entrypoint.ts"],"sourcesContent":["import {Mode} from \"@typing/app\";\nimport {Browser} from \"@typing/browser\";\nimport {ManifestVersion} from \"@typing/manifest\";\n\nexport const EntrypointFileExtensions: ReadonlySet<string> = new Set([\"ts\", \"tsx\", \"js\", \"jsx\", \"vue\", \"svelte\"]);\n\nexport enum EntrypointType {\n Background = \"background\",\n Command = \"command\",\n ContentScript = \"content\",\n Page = \"page\",\n Service = \"service\",\n Relay = \"relay\",\n Options = \"options\",\n Popup = \"popup\",\n Sidebar = \"sidebar\",\n Offscreen = \"offscreen\",\n}\n\nexport interface EntrypointOptions {\n /**\n * List of target browsers to include this entrypoint in. Defaults to being included in all\n * builds
|
|
1
|
+
{"version":3,"sources":["../../src/types/entrypoint.ts"],"sourcesContent":["import {Mode} from \"@typing/app\";\nimport {Browser} from \"@typing/browser\";\nimport {ManifestVersion} from \"@typing/manifest\";\n\nexport const EntrypointFileExtensions: ReadonlySet<string> = new Set([\"ts\", \"tsx\", \"js\", \"jsx\", \"vue\", \"svelte\"]);\n\nexport enum EntrypointType {\n Background = \"background\",\n Command = \"command\",\n ContentScript = \"content\",\n Page = \"page\",\n Service = \"service\",\n Relay = \"relay\",\n Options = \"options\",\n Popup = \"popup\",\n Sidebar = \"sidebar\",\n Offscreen = \"offscreen\",\n}\n\nexport interface EntrypointOptions {\n /**\n * List of target browsers to include this entrypoint in. Defaults to being included in all\n * builds.\n *\n * @default undefined\n */\n includeBrowser?: `${Browser}`[] | Browser[];\n\n /**\n * List of target browsers to exclude this entrypoint from.\n *\n * @default undefined\n */\n excludeBrowser?: `${Browser}`[] | Browser[];\n\n /**\n * List of target apps to include this entrypoint in. Defaults to being included in all builds.\n *\n * @default undefined\n */\n excludeApp?: string[];\n\n /**\n * List of target apps to exclude this entrypoint from.\n *\n * @default undefined\n */\n includeApp?: string[];\n\n /**\n * Build mode for filtering entry points. Entry point will be included only\n * if it matches the current build mode (Production or Development).\n *\n * @default undefined\n */\n mode?: `${Exclude<Mode, Mode.None>}` | Exclude<Mode, Mode.None>;\n\n /**\n * Manifest version constraint for this entry point. Entry point will be included\n * only if it matches the target manifest version.\n *\n * @default undefined\n */\n manifestVersion?: ManifestVersion;\n\n /**\n * Debug mode flag. If true, entry point will be included only when building\n * with DEBUG flag enabled.\n *\n * @default undefined\n */\n debug?: boolean;\n}\n\nexport interface EntrypointFile {\n file: string;\n import: string;\n external?: string;\n}\n\n/**\n * Dictionary of entrypoint for the build configuration.\n *\n * @key {string} - The name of the entrypoint that will be used in the bundler configuration.\n * @value {EntrypointFile[]} - Array of files that will be included in this entrypoint.\n * These files will be compiled and bundled together as part of the specified entrypoint.\n */\nexport type EntrypointEntries = Map<string, Set<EntrypointFile>>;\n\nexport interface EntrypointParser<O extends EntrypointOptions> {\n options(file: EntrypointFile): O;\n\n contract(file: EntrypointFile): string | undefined;\n}\n\nexport interface EntrypointFinder {\n files(): Promise<Set<EntrypointFile>>;\n\n empty(): Promise<boolean>;\n\n exists(): Promise<boolean>;\n\n clear(): this;\n\n holds(file: EntrypointFile): boolean;\n}\n\nexport interface EntrypointOptionsFinder<O extends EntrypointOptions> extends EntrypointFinder {\n type(): EntrypointType;\n\n options(): Promise<Map<EntrypointFile, O>>;\n\n contracts(): Promise<Map<EntrypointFile, string | undefined>>;\n}\n\nexport interface EntrypointNameGenerator {\n reserve(name: string): this;\n\n name(name: string): string;\n\n file(file: EntrypointFile): string;\n\n likely(name?: string): boolean;\n\n has(name: string): boolean;\n\n reset(): this;\n}\n\nexport interface EntrypointBuilder {\n build(): Promise<void>;\n\n destroy(): Promise<void>;\n}\n\nexport type EntrypointConstructorParameter<T> = T extends new (arg: infer P) => any ? P : never;\n"],"mappings":"AAIO,MAAM,2BAAgD,oBAAI,IAAI,CAAC,MAAM,OAAO,MAAM,OAAO,OAAO,QAAQ,CAAC;AAEzG,IAAK,iBAAL,kBAAKA,oBAAL;AACH,EAAAA,gBAAA,gBAAa;AACb,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,mBAAgB;AAChB,EAAAA,gBAAA,UAAO;AACP,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,WAAQ;AACR,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,WAAQ;AACR,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,eAAY;AAVJ,SAAAA;AAAA,GAAA;","names":["EntrypointType"]}
|
package/dist/types/env.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
declare const EnvReservedKeys: Set<string>;
|
|
2
|
-
type EnvFilterFunction = (value: string) => boolean;
|
|
3
|
-
type EnvFilterVariant = string | EnvFilterFunction;
|
|
4
|
-
type EnvFilterOptions = {
|
|
1
|
+
export declare const EnvReservedKeys: Set<string>;
|
|
2
|
+
export type EnvFilterFunction = (value: string) => boolean;
|
|
3
|
+
export type EnvFilterVariant = string | EnvFilterFunction;
|
|
4
|
+
export type EnvFilterOptions = {
|
|
5
5
|
filter: EnvFilterVariant;
|
|
6
6
|
};
|
|
7
|
-
|
|
8
|
-
export { type EnvFilterFunction, type EnvFilterOptions, type EnvFilterVariant, EnvReservedKeys };
|
package/dist/types/helpers.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
type ExcludeFunction<T> = T extends Function ? never : T;
|
|
2
|
-
type Awaiter<T> = T | Promise<T>;
|
|
3
|
-
type PickNonFunctionProperties<T> = {
|
|
2
|
+
export type Awaiter<T> = T | Promise<T>;
|
|
3
|
+
export type PickNonFunctionProperties<T> = {
|
|
4
4
|
[K in keyof T as T[K] extends Function ? never : K]: T[K];
|
|
5
5
|
};
|
|
6
|
-
type ExcludeFunctionsFromProperties<T> = {
|
|
6
|
+
export type ExcludeFunctionsFromProperties<T> = {
|
|
7
7
|
[K in keyof T]: ExcludeFunction<T[K]>;
|
|
8
8
|
};
|
|
9
|
-
type DeepAsyncProxy<T> = {
|
|
9
|
+
export type DeepAsyncProxy<T> = {
|
|
10
10
|
[K in keyof T]: T[K] extends (...args: any[]) => any ? (...args: Parameters<T[K]>) => Promise<Awaited<ReturnType<T[K]>>> : T[K] extends object ? DeepAsyncProxyObject<T[K]> : () => Promise<Awaited<T[K]>>;
|
|
11
11
|
};
|
|
12
|
-
type DeepAsyncProxyObject<T> = (() => Promise<DeepAsyncProxy<T>>) & DeepAsyncProxy<T>;
|
|
13
|
-
|
|
14
|
-
export type { Awaiter, DeepAsyncProxy, DeepAsyncProxyObject, ExcludeFunctionsFromProperties, PickNonFunctionProperties };
|
|
12
|
+
export type DeepAsyncProxyObject<T> = (() => Promise<DeepAsyncProxy<T>>) & DeepAsyncProxy<T>;
|
|
13
|
+
export {};
|
package/dist/types/icon.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
declare const DefaultIconGroupName = "default";
|
|
2
|
-
declare const IconFileExtensions: ReadonlySet<string>;
|
|
3
|
-
declare const IconSizes: ReadonlySet<number>;
|
|
4
|
-
|
|
5
|
-
export { DefaultIconGroupName, IconFileExtensions, IconSizes };
|
|
1
|
+
export declare const DefaultIconGroupName = "default";
|
|
2
|
+
export declare const IconFileExtensions: ReadonlySet<string>;
|
|
3
|
+
export declare const IconSizes: ReadonlySet<number>;
|
package/dist/types/locale.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare enum Language {
|
|
1
|
+
export declare enum Language {
|
|
2
2
|
Arabic = "ar",
|
|
3
3
|
Amharic = "am",
|
|
4
4
|
Bulgarian = "bg",
|
|
@@ -55,30 +55,30 @@ declare enum Language {
|
|
|
55
55
|
ChineseChina = "zh_CN",
|
|
56
56
|
ChineseTaiwan = "zh_TW"
|
|
57
57
|
}
|
|
58
|
-
declare enum LocaleDir {
|
|
58
|
+
export declare enum LocaleDir {
|
|
59
59
|
RightToLeft = "rtl",
|
|
60
60
|
LeftToRight = "ltr"
|
|
61
61
|
}
|
|
62
|
-
declare const RtlLanguages: ReadonlySet<Language>;
|
|
63
|
-
declare const LocaleNestedKeysSeparator = ".";
|
|
64
|
-
declare const LocaleKeysSeparator = "_";
|
|
65
|
-
declare const LocaleValuesSeparator = "|";
|
|
66
|
-
declare const LocaleCustomKeyForLanguage = "locale";
|
|
67
|
-
declare const LocaleKeyMarker = "@";
|
|
68
|
-
declare const LanguageCodes: ReadonlySet<string>;
|
|
69
|
-
declare const LocaleFileExtensions: ReadonlySet<string>;
|
|
70
|
-
type LocaleValue = string | number | string
|
|
71
|
-
type LocaleData = {
|
|
62
|
+
export declare const RtlLanguages: ReadonlySet<Language>;
|
|
63
|
+
export declare const LocaleNestedKeysSeparator = ".";
|
|
64
|
+
export declare const LocaleKeysSeparator = "_";
|
|
65
|
+
export declare const LocaleValuesSeparator = "|";
|
|
66
|
+
export declare const LocaleCustomKeyForLanguage = "locale";
|
|
67
|
+
export declare const LocaleKeyMarker = "@";
|
|
68
|
+
export declare const LanguageCodes: ReadonlySet<string>;
|
|
69
|
+
export declare const LocaleFileExtensions: ReadonlySet<string>;
|
|
70
|
+
export type LocaleValue = string | number | Array<string | number>;
|
|
71
|
+
export type LocaleData = {
|
|
72
72
|
[key: string]: LocaleValue | LocaleData;
|
|
73
73
|
};
|
|
74
|
-
type LocaleItems = Map<string, string>;
|
|
75
|
-
type LocaleKeys = ReadonlySet<string>;
|
|
76
|
-
type LocaleMessages = {
|
|
74
|
+
export type LocaleItems = Map<string, string>;
|
|
75
|
+
export type LocaleKeys = ReadonlySet<string>;
|
|
76
|
+
export type LocaleMessages = {
|
|
77
77
|
[key: string]: {
|
|
78
78
|
message: string;
|
|
79
79
|
};
|
|
80
80
|
};
|
|
81
|
-
interface LocaleBuilder {
|
|
81
|
+
export interface LocaleBuilder {
|
|
82
82
|
lang(): Language;
|
|
83
83
|
merge(data: LocaleData): this;
|
|
84
84
|
build(): LocaleMessages;
|
|
@@ -88,39 +88,45 @@ interface LocaleBuilder {
|
|
|
88
88
|
isValid(): boolean;
|
|
89
89
|
validate(): this;
|
|
90
90
|
}
|
|
91
|
-
|
|
91
|
+
export type LocaleBuilders = Map<Language, LocaleBuilder>;
|
|
92
|
+
export interface LocaleValidator {
|
|
92
93
|
isValid(locale: LocaleBuilder): boolean;
|
|
93
94
|
validate(locale: LocaleBuilder): this;
|
|
94
95
|
}
|
|
95
|
-
interface
|
|
96
|
+
export interface LocaleContractValidator {
|
|
97
|
+
isValid(builders: LocaleBuilders): boolean;
|
|
98
|
+
validate(builders: LocaleBuilders): this;
|
|
99
|
+
}
|
|
100
|
+
export interface LocaleFutures {
|
|
96
101
|
plural: boolean;
|
|
97
102
|
substitutions: readonly string[];
|
|
98
103
|
}
|
|
99
|
-
interface LocaleStructure {
|
|
104
|
+
export interface LocaleStructure {
|
|
100
105
|
[key: string]: LocaleFutures;
|
|
101
106
|
}
|
|
102
|
-
type LocaleNonPluralKeys<T
|
|
107
|
+
export type LocaleNonPluralKeys<T> = {
|
|
103
108
|
[K in keyof T]: T[K] extends {
|
|
104
109
|
plural: false;
|
|
105
110
|
} ? K : never;
|
|
106
111
|
}[keyof T] & string;
|
|
107
|
-
type LocalePluralKeys<T
|
|
112
|
+
export type LocalePluralKeys<T> = {
|
|
108
113
|
[K in keyof T]: T[K] extends {
|
|
109
114
|
plural: true;
|
|
110
115
|
} ? K : never;
|
|
111
116
|
}[keyof T] & string;
|
|
112
|
-
type
|
|
117
|
+
export type LocaleSubstitutionValue = string | number;
|
|
118
|
+
export type LocaleSubstitutionKeys<T, K extends keyof T> = T[K] extends {
|
|
113
119
|
substitutions: readonly (infer U)[];
|
|
114
|
-
} ?
|
|
115
|
-
|
|
120
|
+
} ? U & string : never;
|
|
121
|
+
export type LocaleSubstitutionsFor<T, K extends keyof T> = [LocaleSubstitutionKeys<T, K>] extends [never] ? never : Record<LocaleSubstitutionKeys<T, K>, LocaleSubstitutionValue>;
|
|
122
|
+
export type LocaleSubstitutionArgs<T, K extends keyof T> = string extends keyof T ? [substitutions?: Record<string, LocaleSubstitutionValue>] : [LocaleSubstitutionKeys<T, K>] extends [never] ? [] : [substitutions: LocaleSubstitutionsFor<T, K>];
|
|
123
|
+
export interface LocaleProvider<S> {
|
|
116
124
|
lang(): Language;
|
|
117
125
|
languages(): Set<Language>;
|
|
118
126
|
keys(): ReadonlySet<keyof S>;
|
|
119
|
-
trans<K extends LocaleNonPluralKeys<S>>(key: K,
|
|
120
|
-
choice<K extends LocalePluralKeys<S>>(key: K, count: number,
|
|
127
|
+
trans<K extends LocaleNonPluralKeys<S>>(key: K, ...args: LocaleSubstitutionArgs<S, K>): string;
|
|
128
|
+
choice<K extends LocalePluralKeys<S>>(key: K, count: number, ...args: LocaleSubstitutionArgs<S, K>): string;
|
|
121
129
|
}
|
|
122
|
-
interface LocaleDynamicProvider<S
|
|
130
|
+
export interface LocaleDynamicProvider<S> extends LocaleProvider<S> {
|
|
123
131
|
change(lang: Language): Promise<Language>;
|
|
124
132
|
}
|
|
125
|
-
|
|
126
|
-
export { Language, LanguageCodes, type LocaleBuilder, LocaleCustomKeyForLanguage, type LocaleData, LocaleDir, type LocaleDynamicProvider, LocaleFileExtensions, type LocaleFutures, type LocaleItems, LocaleKeyMarker, type LocaleKeys, LocaleKeysSeparator, type LocaleMessages, LocaleNestedKeysSeparator, type LocaleNonPluralKeys, type LocalePluralKeys, type LocaleProvider, type LocaleStructure, type LocaleSubstitutionsFor, type LocaleValidator, type LocaleValue, LocaleValuesSeparator, RtlLanguages };
|
package/dist/types/locale.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/locale.ts"],"sourcesContent":["export enum Language {\n Arabic = \"ar\",\n Amharic = \"am\",\n Bulgarian = \"bg\",\n Bengali = \"bn\",\n Catalan = \"ca\",\n Czech = \"cs\",\n Danish = \"da\",\n German = \"de\",\n Greek = \"el\",\n English = \"en\",\n EnglishAustralia = \"en_AU\",\n EnglishGreatBritain = \"en_GB\",\n EnglishUSA = \"en_US\",\n Spanish = \"es\",\n SpanishLatinAmericaAndCaribbean = \"es_419\",\n Estonian = \"et\",\n Persian = \"fa\",\n Finnish = \"fi\",\n Filipino = \"fil\",\n French = \"fr\",\n Gujarati = \"gu\",\n Hebrew = \"he\",\n Hindi = \"hi\",\n Croatian = \"hr\",\n Hungarian = \"hu\",\n Indonesian = \"id\",\n Italian = \"it\",\n Japanese = \"ja\",\n Kannada = \"kn\",\n Korean = \"ko\",\n Lithuanian = \"lt\",\n Latvian = \"lv\",\n Malayalam = \"ml\",\n Marathi = \"mr\",\n Malay = \"ms\",\n Dutch = \"nl\",\n Norwegian = \"no\",\n Polish = \"pl\",\n PortugueseBrazil = \"pt_BR\",\n PortuguesePortugal = \"pt_PT\",\n Romanian = \"ro\",\n Russian = \"ru\",\n Slovak = \"sk\",\n Slovenian = \"sl\",\n Serbian = \"sr\",\n Swedish = \"sv\",\n Swahili = \"sw\",\n Tamil = \"ta\",\n Telugu = \"te\",\n Thai = \"th\",\n Turkish = \"tr\",\n Ukrainian = \"uk\",\n Vietnamese = \"vi\",\n ChineseChina = \"zh_CN\",\n ChineseTaiwan = \"zh_TW\",\n}\n\nexport enum LocaleDir {\n RightToLeft = \"rtl\",\n LeftToRight = \"ltr\",\n}\n\nexport const RtlLanguages: ReadonlySet<Language> = new Set([Language.Arabic, Language.Persian, Language.Hebrew]);\n\nexport const LocaleNestedKeysSeparator = \".\";\n\nexport const LocaleKeysSeparator = \"_\";\n\nexport const LocaleValuesSeparator = \"|\";\n\nexport const LocaleCustomKeyForLanguage = \"locale\";\n\nexport const LocaleKeyMarker = \"@\";\n\nexport const LanguageCodes: ReadonlySet<string> = new Set(Object.values(Language));\n\nexport const LocaleFileExtensions: ReadonlySet<string> = new Set([\"yaml\", \"yml\", \"json\"]);\n\nexport type LocaleValue = string | number | string
|
|
1
|
+
{"version":3,"sources":["../../src/types/locale.ts"],"sourcesContent":["export enum Language {\n Arabic = \"ar\",\n Amharic = \"am\",\n Bulgarian = \"bg\",\n Bengali = \"bn\",\n Catalan = \"ca\",\n Czech = \"cs\",\n Danish = \"da\",\n German = \"de\",\n Greek = \"el\",\n English = \"en\",\n EnglishAustralia = \"en_AU\",\n EnglishGreatBritain = \"en_GB\",\n EnglishUSA = \"en_US\",\n Spanish = \"es\",\n SpanishLatinAmericaAndCaribbean = \"es_419\",\n Estonian = \"et\",\n Persian = \"fa\",\n Finnish = \"fi\",\n Filipino = \"fil\",\n French = \"fr\",\n Gujarati = \"gu\",\n Hebrew = \"he\",\n Hindi = \"hi\",\n Croatian = \"hr\",\n Hungarian = \"hu\",\n Indonesian = \"id\",\n Italian = \"it\",\n Japanese = \"ja\",\n Kannada = \"kn\",\n Korean = \"ko\",\n Lithuanian = \"lt\",\n Latvian = \"lv\",\n Malayalam = \"ml\",\n Marathi = \"mr\",\n Malay = \"ms\",\n Dutch = \"nl\",\n Norwegian = \"no\",\n Polish = \"pl\",\n PortugueseBrazil = \"pt_BR\",\n PortuguesePortugal = \"pt_PT\",\n Romanian = \"ro\",\n Russian = \"ru\",\n Slovak = \"sk\",\n Slovenian = \"sl\",\n Serbian = \"sr\",\n Swedish = \"sv\",\n Swahili = \"sw\",\n Tamil = \"ta\",\n Telugu = \"te\",\n Thai = \"th\",\n Turkish = \"tr\",\n Ukrainian = \"uk\",\n Vietnamese = \"vi\",\n ChineseChina = \"zh_CN\",\n ChineseTaiwan = \"zh_TW\",\n}\n\nexport enum LocaleDir {\n RightToLeft = \"rtl\",\n LeftToRight = \"ltr\",\n}\n\nexport const RtlLanguages: ReadonlySet<Language> = new Set([Language.Arabic, Language.Persian, Language.Hebrew]);\n\nexport const LocaleNestedKeysSeparator = \".\";\n\nexport const LocaleKeysSeparator = \"_\";\n\nexport const LocaleValuesSeparator = \"|\";\n\nexport const LocaleCustomKeyForLanguage = \"locale\";\n\nexport const LocaleKeyMarker = \"@\";\n\nexport const LanguageCodes: ReadonlySet<string> = new Set(Object.values(Language));\n\nexport const LocaleFileExtensions: ReadonlySet<string> = new Set([\"yaml\", \"yml\", \"json\"]);\n\nexport type LocaleValue = string | number | Array<string | number>;\n\nexport type LocaleData = {\n [key: string]: LocaleValue | LocaleData;\n};\n\nexport type LocaleItems = Map<string, string>;\n\nexport type LocaleKeys = ReadonlySet<string>;\n\nexport type LocaleMessages = {\n [key: string]: {\n message: string;\n };\n};\n\nexport interface LocaleBuilder {\n lang(): Language;\n\n merge(data: LocaleData): this;\n\n build(): LocaleMessages;\n\n get(): LocaleItems;\n\n keys(): LocaleKeys;\n\n structure(): LocaleStructure;\n\n isValid(): boolean;\n\n validate(): this;\n}\n\nexport type LocaleBuilders = Map<Language, LocaleBuilder>;\n\nexport interface LocaleValidator {\n isValid(locale: LocaleBuilder): boolean;\n\n validate(locale: LocaleBuilder): this;\n}\n\nexport interface LocaleContractValidator {\n isValid(builders: LocaleBuilders): boolean;\n\n validate(builders: LocaleBuilders): this;\n}\n\nexport interface LocaleFutures {\n plural: boolean;\n substitutions: readonly string[];\n}\n\nexport interface LocaleStructure {\n [key: string]: LocaleFutures;\n}\n\nexport type LocaleNonPluralKeys<T> = {\n [K in keyof T]: T[K] extends {plural: false} ? K : never;\n}[keyof T] &\n string;\n\nexport type LocalePluralKeys<T> = {\n [K in keyof T]: T[K] extends {plural: true} ? K : never;\n}[keyof T] &\n string;\n\nexport type LocaleSubstitutionValue = string | number;\n\nexport type LocaleSubstitutionKeys<T, K extends keyof T> = T[K] extends {substitutions: readonly (infer U)[]}\n ? U & string\n : never;\n\nexport type LocaleSubstitutionsFor<T, K extends keyof T> = [LocaleSubstitutionKeys<T, K>] extends [never]\n ? never\n : Record<LocaleSubstitutionKeys<T, K>, LocaleSubstitutionValue>;\n\nexport type LocaleSubstitutionArgs<T, K extends keyof T> = string extends keyof T\n ? [substitutions?: Record<string, LocaleSubstitutionValue>]\n : [LocaleSubstitutionKeys<T, K>] extends [never]\n ? []\n : [substitutions: LocaleSubstitutionsFor<T, K>];\n\nexport interface LocaleProvider<S> {\n lang(): Language;\n\n languages(): Set<Language>;\n\n keys(): ReadonlySet<keyof S>;\n\n // non-plural keys\n trans<K extends LocaleNonPluralKeys<S>>(key: K, ...args: LocaleSubstitutionArgs<S, K>): string;\n\n // plural keys\n choice<K extends LocalePluralKeys<S>>(key: K, count: number, ...args: LocaleSubstitutionArgs<S, K>): string;\n}\n\nexport interface LocaleDynamicProvider<S> extends LocaleProvider<S> {\n change(lang: Language): Promise<Language>;\n}\n"],"mappings":"AAAO,IAAK,WAAL,kBAAKA,cAAL;AACH,EAAAA,UAAA,YAAS;AACT,EAAAA,UAAA,aAAU;AACV,EAAAA,UAAA,eAAY;AACZ,EAAAA,UAAA,aAAU;AACV,EAAAA,UAAA,aAAU;AACV,EAAAA,UAAA,WAAQ;AACR,EAAAA,UAAA,YAAS;AACT,EAAAA,UAAA,YAAS;AACT,EAAAA,UAAA,WAAQ;AACR,EAAAA,UAAA,aAAU;AACV,EAAAA,UAAA,sBAAmB;AACnB,EAAAA,UAAA,yBAAsB;AACtB,EAAAA,UAAA,gBAAa;AACb,EAAAA,UAAA,aAAU;AACV,EAAAA,UAAA,qCAAkC;AAClC,EAAAA,UAAA,cAAW;AACX,EAAAA,UAAA,aAAU;AACV,EAAAA,UAAA,aAAU;AACV,EAAAA,UAAA,cAAW;AACX,EAAAA,UAAA,YAAS;AACT,EAAAA,UAAA,cAAW;AACX,EAAAA,UAAA,YAAS;AACT,EAAAA,UAAA,WAAQ;AACR,EAAAA,UAAA,cAAW;AACX,EAAAA,UAAA,eAAY;AACZ,EAAAA,UAAA,gBAAa;AACb,EAAAA,UAAA,aAAU;AACV,EAAAA,UAAA,cAAW;AACX,EAAAA,UAAA,aAAU;AACV,EAAAA,UAAA,YAAS;AACT,EAAAA,UAAA,gBAAa;AACb,EAAAA,UAAA,aAAU;AACV,EAAAA,UAAA,eAAY;AACZ,EAAAA,UAAA,aAAU;AACV,EAAAA,UAAA,WAAQ;AACR,EAAAA,UAAA,WAAQ;AACR,EAAAA,UAAA,eAAY;AACZ,EAAAA,UAAA,YAAS;AACT,EAAAA,UAAA,sBAAmB;AACnB,EAAAA,UAAA,wBAAqB;AACrB,EAAAA,UAAA,cAAW;AACX,EAAAA,UAAA,aAAU;AACV,EAAAA,UAAA,YAAS;AACT,EAAAA,UAAA,eAAY;AACZ,EAAAA,UAAA,aAAU;AACV,EAAAA,UAAA,aAAU;AACV,EAAAA,UAAA,aAAU;AACV,EAAAA,UAAA,WAAQ;AACR,EAAAA,UAAA,YAAS;AACT,EAAAA,UAAA,UAAO;AACP,EAAAA,UAAA,aAAU;AACV,EAAAA,UAAA,eAAY;AACZ,EAAAA,UAAA,gBAAa;AACb,EAAAA,UAAA,kBAAe;AACf,EAAAA,UAAA,mBAAgB;AAvDR,SAAAA;AAAA,GAAA;AA0DL,IAAK,YAAL,kBAAKC,eAAL;AACH,EAAAA,WAAA,iBAAc;AACd,EAAAA,WAAA,iBAAc;AAFN,SAAAA;AAAA,GAAA;AAKL,MAAM,eAAsC,oBAAI,IAAI,CAAC,mBAAiB,oBAAkB,iBAAe,CAAC;AAExG,MAAM,4BAA4B;AAElC,MAAM,sBAAsB;AAE5B,MAAM,wBAAwB;AAE9B,MAAM,6BAA6B;AAEnC,MAAM,kBAAkB;AAExB,MAAM,gBAAqC,IAAI,IAAI,OAAO,OAAO,QAAQ,CAAC;AAE1E,MAAM,uBAA4C,oBAAI,IAAI,CAAC,QAAQ,OAAO,MAAM,CAAC;","names":["Language","LocaleDir"]}
|