chromium/third_party/material_web_components/BUILD.gn

# Copyright 2022 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//third_party/closure_compiler/compile_js.gni")
import("//third_party/material_web_components/rewrite_imports.gni")
import("//tools/typescript/ts_library.gni")
import("//ui/webui/resources/tools/generate_grd.gni")
import("//ui/webui/resources/tools/optimize_webui.gni")

# Optimize webui assumes that all resources hosted on chrome://resources are
# in this directory and does not provide a way to override this assumption. To
# prevent downstream optimize_webui calls from breaking we output all of our
# files into the same path.
chrome_resources_dir = "${root_gen_dir}/ui/webui/resources/tsc/mwc"

material_files = [
# TAG(reproduce.sh) START_MATERIAL_FILES
  "@material/web/iconbutton/filled-tonal-icon-button.js",
  "@material/web/iconbutton/internal/filled-tonal-styles.js",
  "@material/web/iconbutton/internal/standard-styles.js",
  "@material/web/iconbutton/internal/outlined-styles.js",
  "@material/web/iconbutton/internal/filled-styles.js",
  "@material/web/iconbutton/internal/icon-button.js",
  "@material/web/iconbutton/internal/shared-styles.js",
  "@material/web/iconbutton/outlined-icon-button.js",
  "@material/web/iconbutton/icon-button.js",
  "@material/web/iconbutton/filled-icon-button.js",
  "@material/web/button/filled-tonal-button.js",
  "@material/web/button/elevated-button.js",
  "@material/web/button/internal/button.js",
  "@material/web/button/internal/filled-tonal-styles.js",
  "@material/web/button/internal/filled-tonal-button.js",
  "@material/web/button/internal/elevated-button.js",
  "@material/web/button/internal/text-styles.js",
  "@material/web/button/internal/outlined-styles.js",
  "@material/web/button/internal/text-button.js",
  "@material/web/button/internal/filled-button.js",
  "@material/web/button/internal/filled-styles.js",
  "@material/web/button/internal/elevated-styles.js",
  "@material/web/button/internal/shared-elevation-styles.js",
  "@material/web/button/internal/outlined-button.js",
  "@material/web/button/internal/shared-styles.js",
  "@material/web/button/text-button.js",
  "@material/web/button/filled-button.js",
  "@material/web/button/outlined-button.js",
  "@material/web/menu/internal/controllers/shared.js",
  "@material/web/menu/internal/controllers/typeaheadController.js",
  "@material/web/menu/internal/controllers/menuItemController.js",
  "@material/web/menu/internal/controllers/surfacePositionController.js",
  "@material/web/menu/internal/types.js",
  "@material/web/menu/internal/menu-styles.js",
  "@material/web/menu/internal/menuitem/menu-item-styles.js",
  "@material/web/menu/internal/menuitem/menu-item.js",
  "@material/web/menu/internal/menu.js",
  "@material/web/menu/internal/submenu/sub-menu-styles.js",
  "@material/web/menu/internal/submenu/sub-menu.js",
  "@material/web/menu/sub-menu.js",
  "@material/web/menu/menu-item.js",
  "@material/web/menu/menu.js",
  "@material/web/internal/motion/animation.js",
  "@material/web/internal/controller/form-submitter.js",
  "@material/web/internal/controller/string-converter.js",
  "@material/web/internal/controller/is-rtl.js",
  "@material/web/internal/controller/attachable-controller.js",
  "@material/web/internal/events/redispatch-event.js",
  "@material/web/internal/events/form-label-activation.js",
  "@material/web/internal/events/dispatch-hooks.js",
  "@material/web/internal/aria/aria.js",
  "@material/web/internal/aria/delegate.js",
  "@material/web/common.js",
  "@material/web/slider/internal/forced-colors-styles.js",
  "@material/web/slider/internal/slider.js",
  "@material/web/slider/internal/slider-styles.js",
  "@material/web/slider/slider.js",
  "@material/web/migrations/v2/query-selector-aria.js",
  "@material/web/chips/assist-chip.js",
  "@material/web/chips/suggestion-chip.js",
  "@material/web/chips/filter-chip.js",
  "@material/web/chips/internal/assist-chip.js",
  "@material/web/chips/internal/suggestion-chip.js",
  "@material/web/chips/internal/chip.js",
  "@material/web/chips/internal/filter-chip.js",
  "@material/web/chips/internal/trailing-icons.js",
  "@material/web/chips/internal/selectable-styles.js",
  "@material/web/chips/internal/trailing-icon-styles.js",
  "@material/web/chips/internal/suggestion-styles.js",
  "@material/web/chips/internal/multi-action-chip.js",
  "@material/web/chips/internal/elevated-styles.js",
  "@material/web/chips/internal/input-chip.js",
  "@material/web/chips/internal/chip-set.js",
  "@material/web/chips/internal/chip-set-styles.js",
  "@material/web/chips/internal/input-styles.js",
  "@material/web/chips/internal/assist-styles.js",
  "@material/web/chips/internal/filter-styles.js",
  "@material/web/chips/internal/shared-styles.js",
  "@material/web/chips/input-chip.js",
  "@material/web/chips/chip-set.js",
  "@material/web/field/internal/field.js",
  "@material/web/field/internal/outlined-field.js",
  "@material/web/field/internal/filled-field.js",
  "@material/web/field/internal/outlined-styles.js",
  "@material/web/field/internal/filled-styles.js",
  "@material/web/field/internal/shared-styles.js",
  "@material/web/field/outlined-field.js",
  "@material/web/field/filled-field.js",
  "@material/web/progress/internal/linear-progress.js",
  "@material/web/progress/internal/linear-progress-styles.js",
  "@material/web/progress/internal/circular-progress-styles.js",
  "@material/web/progress/internal/progress.js",
  "@material/web/progress/internal/circular-progress.js",
  "@material/web/progress/linear-progress.js",
  "@material/web/progress/circular-progress.js",
  "@material/web/select/outlined-select.js",
  "@material/web/select/internal/shared.js",
  "@material/web/select/internal/outlined-select.js",
  "@material/web/select/internal/selectoption/select-option.js",
  "@material/web/select/internal/selectoption/selectOptionController.js",
  "@material/web/select/internal/filled-select-styles.js",
  "@material/web/select/internal/select.js",
  "@material/web/select/internal/outlined-select-styles.js",
  "@material/web/select/internal/filled-select.js",
  "@material/web/select/internal/shared-styles.js",
  "@material/web/select/select-option.js",
  "@material/web/select/filled-select.js",
  "@material/web/labs/segmentedbutton/outlined-segmented-button.js",
  "@material/web/labs/segmentedbutton/internal/outlined-segmented-button.js",
  "@material/web/labs/segmentedbutton/internal/segmented-button.js",
  "@material/web/labs/segmentedbutton/internal/outlined-styles.js",
  "@material/web/labs/segmentedbutton/internal/shared-styles.js",
  "@material/web/labs/behaviors/constraint-validation.js",
  "@material/web/labs/behaviors/validators/select-validator.js",
  "@material/web/labs/behaviors/validators/checkbox-validator.js",
  "@material/web/labs/behaviors/validators/validator.js",
  "@material/web/labs/behaviors/validators/radio-validator.js",
  "@material/web/labs/behaviors/validators/text-field-validator.js",
  "@material/web/labs/behaviors/on-report-validity.js",
  "@material/web/labs/behaviors/focusable.js",
  "@material/web/labs/behaviors/element-internals.js",
  "@material/web/labs/behaviors/form-associated.js",
  "@material/web/labs/behaviors/mixin.js",
  "@material/web/labs/card/internal/outlined-styles.js",
  "@material/web/labs/card/internal/filled-styles.js",
  "@material/web/labs/card/internal/elevated-styles.js",
  "@material/web/labs/card/internal/card.js",
  "@material/web/labs/card/internal/shared-styles.js",
  "@material/web/labs/card/elevated-card.js",
  "@material/web/labs/card/filled-card.js",
  "@material/web/labs/card/outlined-card.js",
  "@material/web/labs/segmentedbuttonset/internal/outlined-styles.js",
  "@material/web/labs/segmentedbuttonset/internal/segmented-button-set.js",
  "@material/web/labs/segmentedbuttonset/internal/outlined-segmented-button-set.js",
  "@material/web/labs/segmentedbuttonset/internal/shared-styles.js",
  "@material/web/labs/segmentedbuttonset/outlined-segmented-button-set.js",
  "@material/web/labs/item/item.js",
  "@material/web/labs/item/internal/item.js",
  "@material/web/labs/item/internal/item-styles.js",
  "@material/web/labs/badge/internal/badge-styles.js",
  "@material/web/labs/badge/internal/badge.js",
  "@material/web/labs/badge/badge.js",
  "@material/web/labs/navigationtab/navigation-tab.js",
  "@material/web/labs/navigationtab/internal/navigation-tab-styles.js",
  "@material/web/labs/navigationtab/internal/navigation-tab.js",
  "@material/web/labs/navigationtab/internal/state.js",
  "@material/web/labs/navigationbar/navigation-bar.js",
  "@material/web/labs/navigationbar/internal/navigation-bar.js",
  "@material/web/labs/navigationbar/internal/state.js",
  "@material/web/labs/navigationbar/internal/navigation-bar-styles.js",
  "@material/web/labs/navigationbar/internal/constants.js",
  "@material/web/labs/navigationdrawer/internal/navigation-drawer-modal-styles.js",
  "@material/web/labs/navigationdrawer/internal/navigation-drawer.js",
  "@material/web/labs/navigationdrawer/internal/navigation-drawer-modal.js",
  "@material/web/labs/navigationdrawer/internal/navigation-drawer-styles.js",
  "@material/web/labs/navigationdrawer/internal/shared-styles.js",
  "@material/web/labs/navigationdrawer/navigation-drawer.js",
  "@material/web/labs/navigationdrawer/navigation-drawer-modal.js",
  "@material/web/switch/switch.js",
  "@material/web/switch/internal/switch.js",
  "@material/web/switch/internal/switch-styles.js",
  "@material/web/typography/md-typescale-styles.js",
  "@material/web/divider/internal/divider.js",
  "@material/web/divider/internal/divider-styles.js",
  "@material/web/divider/divider.js",
  "@material/web/icon/internal/icon-styles.js",
  "@material/web/icon/internal/icon.js",
  "@material/web/icon/icon.js",
  "@material/web/tabs/tabs.js",
  "@material/web/tabs/internal/primary-tab-styles.js",
  "@material/web/tabs/internal/secondary-tab-styles.js",
  "@material/web/tabs/internal/tabs.js",
  "@material/web/tabs/internal/tab-styles.js",
  "@material/web/tabs/internal/tabs-styles.js",
  "@material/web/tabs/internal/secondary-tab.js",
  "@material/web/tabs/internal/tab.js",
  "@material/web/tabs/internal/primary-tab.js",
  "@material/web/tabs/secondary-tab.js",
  "@material/web/tabs/primary-tab.js",
  "@material/web/dialog/internal/dialog-styles.js",
  "@material/web/dialog/internal/animations.js",
  "@material/web/dialog/internal/dialog.js",
  "@material/web/dialog/dialog.js",
  "@material/web/textfield/filled-text-field.js",
  "@material/web/textfield/internal/text-field.js",
  "@material/web/textfield/internal/filled-text-field.js",
  "@material/web/textfield/internal/outlined-styles.js",
  "@material/web/textfield/internal/outlined-text-field.js",
  "@material/web/textfield/internal/filled-styles.js",
  "@material/web/textfield/internal/shared-styles.js",
  "@material/web/textfield/outlined-text-field.js",
  "@material/web/testing/transform-pseudo-classes.js",
  "@material/web/radio/internal/radio.js",
  "@material/web/radio/internal/radio-styles.js",
  "@material/web/radio/internal/single-selection-controller.js",
  "@material/web/radio/radio.js",
  "@material/web/elevation/elevation.js",
  "@material/web/elevation/internal/elevation.js",
  "@material/web/elevation/internal/elevation-styles.js",
  "@material/web/fab/branded-fab.js",
  "@material/web/fab/fab.js",
  "@material/web/fab/internal/shared.js",
  "@material/web/fab/internal/forced-colors-styles.js",
  "@material/web/fab/internal/fab.js",
  "@material/web/fab/internal/fab-branded-styles.js",
  "@material/web/fab/internal/fab-styles.js",
  "@material/web/fab/internal/shared-styles.js",
  "@material/web/list/internal/listitem/list-item.js",
  "@material/web/list/internal/listitem/list-item-styles.js",
  "@material/web/list/internal/list-styles.js",
  "@material/web/list/internal/list-navigation-helpers.js",
  "@material/web/list/internal/list-controller.js",
  "@material/web/list/internal/list.js",
  "@material/web/list/list.js",
  "@material/web/list/list-item.js",
  "@material/web/checkbox/checkbox.js",
  "@material/web/checkbox/internal/checkbox.js",
  "@material/web/checkbox/internal/checkbox-styles.js",
  "@material/web/focus/md-focus-ring.js",
  "@material/web/focus/internal/focus-ring.js",
  "@material/web/focus/internal/focus-ring-styles.js",
  "@material/web/all.js",
  "@material/web/ripple/internal/ripple-styles.js",
  "@material/web/ripple/internal/ripple.js",
  "@material/web/ripple/ripple.js",
# TAG(reproduce.sh) END_MATERIAL_FILES
]

ts_library("bundle_lit_ts") {
  tsconfig_base = "tsconfig_base.json"
  definitions = [ "lit_exports.d.ts" ]
  composite = true

  # Client code that runs through optimize_webui will attempt to find lit
  # resources in $chrome_resources_dir. As such if ts code depends on mwc
  # it also needs to depend on the rules that move lit resources into
  # $chrome_resources_dir.
  extra_deps = [
    ":copy_lit_bundle",
    ":copy_tslib",
  ]
}

js_library("bundle_lit_js") {
  sources = [ "lit_exports.js" ]
}

rewrite_imports("mwc_rewrite") {
  base_dir =
      "//third_party/material_web_components/components-chromium/node_modules"
  out_dir = chrome_resources_dir

  import_mappings = [
    "lit|//resources/mwc/lit/index.js",
    "@lit/task|//resources/mwc/lit/index.js",
  ]
  import_var_mappings = [
    "lit/static-html:html|staticHtml",
    "lit/static-html:svg|staticSvg",
  ]

  in_files = material_files

  deps = [ ":library" ]
}

# Compile lit_exports.js into a singular bundle we can host on
# chrome://resources.
optimize_webui("bundle_lit") {
  host = "resources"
  input = rebase_path("//third_party/material_web_components/", root_build_dir)
  js_module_in_files = [ "lit_exports.js" ]

  deps = [ ":bundle_lit_js" ]
}

copy("copy_tslib") {
  sources = [ "//third_party/material_web_components/components-chromium/node_modules/tslib/tslib.js" ]
  outputs = [ "$chrome_resources_dir/tslib/tslib.js" ]
}

copy("copy_lit_bundle") {
  sources = [ "$target_gen_dir/lit_exports.rollup.js" ]
  outputs = [ "$chrome_resources_dir/lit/index.js" ]
  deps = [ ":bundle_lit" ]
}

generate_grd("build_lit_grdp") {
  grd_prefix = "material_web_components"
  out_grd = "$target_gen_dir/lit_resources.grdp"
  input_files_base_dir = rebase_path(chrome_resources_dir, root_build_dir)
  resource_path_prefix = "mwc"

  input_files = [
    "tslib/tslib.js",
    "lit/index.js",
  ]

  deps = [
    ":copy_lit_bundle",
    ":copy_tslib",
  ]
}

generate_grd("build_mwc_grdp") {
  grd_prefix = "material_components"
  out_grd = "$target_gen_dir/mwc_resources.grdp"
  input_files_base_dir = rebase_path(chrome_resources_dir, root_build_dir)
  resource_path_prefix = "mwc"

  input_files = material_files

  deps = [ ":mwc_rewrite" ]
}

ts_library("library") {
  composite = true
  tsconfig_base = "tsconfig_base.json"

  # TODO(b/229804752): Clean up and find the minimal set of necessary resources.
  definitions = [
# TAG(reproduce.sh) START_DEFINITIONS
  "components-chromium/node_modules/@types/trusted-types/lib/index.d.ts",
  "components-chromium/node_modules/@types/trusted-types/index.d.ts",
  "components-chromium/node_modules/lit-element/lit-element.d.ts",
  "components-chromium/node_modules/lit-element/index.d.ts",
  "components-chromium/node_modules/lit-element/decorators.d.ts",
  "components-chromium/node_modules/tslib/tslib.d.ts",
  "components-chromium/node_modules/@material/web/iconbutton/icon-button.d.ts",
  "components-chromium/node_modules/@material/web/iconbutton/filled-icon-button.d.ts",
  "components-chromium/node_modules/@material/web/iconbutton/internal/icon-button.d.ts",
  "components-chromium/node_modules/@material/web/iconbutton/internal/filled-tonal-styles.d.ts",
  "components-chromium/node_modules/@material/web/iconbutton/internal/standard-styles.d.ts",
  "components-chromium/node_modules/@material/web/iconbutton/internal/filled-styles.d.ts",
  "components-chromium/node_modules/@material/web/iconbutton/internal/shared-styles.d.ts",
  "components-chromium/node_modules/@material/web/iconbutton/internal/outlined-styles.d.ts",
  "components-chromium/node_modules/@material/web/iconbutton/outlined-icon-button.d.ts",
  "components-chromium/node_modules/@material/web/iconbutton/filled-tonal-icon-button.d.ts",
  "components-chromium/node_modules/@material/web/iconbutton/harness.d.ts",
  "components-chromium/node_modules/@material/web/button/elevated-button.d.ts",
  "components-chromium/node_modules/@material/web/button/internal/shared-elevation-styles.d.ts",
  "components-chromium/node_modules/@material/web/button/internal/filled-tonal-styles.d.ts",
  "components-chromium/node_modules/@material/web/button/internal/elevated-button.d.ts",
  "components-chromium/node_modules/@material/web/button/internal/button.d.ts",
  "components-chromium/node_modules/@material/web/button/internal/filled-styles.d.ts",
  "components-chromium/node_modules/@material/web/button/internal/outlined-button.d.ts",
  "components-chromium/node_modules/@material/web/button/internal/shared-styles.d.ts",
  "components-chromium/node_modules/@material/web/button/internal/text-button.d.ts",
  "components-chromium/node_modules/@material/web/button/internal/outlined-styles.d.ts",
  "components-chromium/node_modules/@material/web/button/internal/filled-button.d.ts",
  "components-chromium/node_modules/@material/web/button/internal/elevated-styles.d.ts",
  "components-chromium/node_modules/@material/web/button/internal/text-styles.d.ts",
  "components-chromium/node_modules/@material/web/button/internal/filled-tonal-button.d.ts",
  "components-chromium/node_modules/@material/web/button/outlined-button.d.ts",
  "components-chromium/node_modules/@material/web/button/text-button.d.ts",
  "components-chromium/node_modules/@material/web/button/harness.d.ts",
  "components-chromium/node_modules/@material/web/button/filled-button.d.ts",
  "components-chromium/node_modules/@material/web/button/filled-tonal-button.d.ts",
  "components-chromium/node_modules/@material/web/menu/internal/menu-styles.d.ts",
  "components-chromium/node_modules/@material/web/menu/internal/controllers/menuItemController.d.ts",
  "components-chromium/node_modules/@material/web/menu/internal/controllers/typeaheadController.d.ts",
  "components-chromium/node_modules/@material/web/menu/internal/controllers/shared.d.ts",
  "components-chromium/node_modules/@material/web/menu/internal/controllers/surfacePositionController.d.ts",
  "components-chromium/node_modules/@material/web/menu/internal/menu.d.ts",
  "components-chromium/node_modules/@material/web/menu/internal/menuitem/menu-item-styles.d.ts",
  "components-chromium/node_modules/@material/web/menu/internal/menuitem/menu-item.d.ts",
  "components-chromium/node_modules/@material/web/menu/internal/menuitem/harness.d.ts",
  "components-chromium/node_modules/@material/web/menu/internal/submenu/sub-menu.d.ts",
  "components-chromium/node_modules/@material/web/menu/internal/submenu/sub-menu-styles.d.ts",
  "components-chromium/node_modules/@material/web/menu/internal/types.d.ts",
  "components-chromium/node_modules/@material/web/menu/menu.d.ts",
  "components-chromium/node_modules/@material/web/menu/menu-item.d.ts",
  "components-chromium/node_modules/@material/web/menu/sub-menu.d.ts",
  "components-chromium/node_modules/@material/web/menu/harness.d.ts",
  "components-chromium/node_modules/@material/web/internal/motion/animation.d.ts",
  "components-chromium/node_modules/@material/web/internal/controller/is-rtl.d.ts",
  "components-chromium/node_modules/@material/web/internal/controller/string-converter.d.ts",
  "components-chromium/node_modules/@material/web/internal/controller/form-submitter.d.ts",
  "components-chromium/node_modules/@material/web/internal/controller/attachable-controller.d.ts",
  "components-chromium/node_modules/@material/web/internal/events/redispatch-event.d.ts",
  "components-chromium/node_modules/@material/web/internal/events/dispatch-hooks.d.ts",
  "components-chromium/node_modules/@material/web/internal/events/form-label-activation.d.ts",
  "components-chromium/node_modules/@material/web/internal/aria/delegate.d.ts",
  "components-chromium/node_modules/@material/web/internal/aria/aria.d.ts",
  "components-chromium/node_modules/@material/web/slider/internal/slider-styles.d.ts",
  "components-chromium/node_modules/@material/web/slider/internal/forced-colors-styles.d.ts",
  "components-chromium/node_modules/@material/web/slider/internal/slider.d.ts",
  "components-chromium/node_modules/@material/web/slider/slider.d.ts",
  "components-chromium/node_modules/@material/web/slider/harness.d.ts",
  "components-chromium/node_modules/@material/web/migrations/v2/query-selector-aria.d.ts",
  "components-chromium/node_modules/@material/web/chips/chip-set.d.ts",
  "components-chromium/node_modules/@material/web/chips/internal/trailing-icons.d.ts",
  "components-chromium/node_modules/@material/web/chips/internal/chip-set.d.ts",
  "components-chromium/node_modules/@material/web/chips/internal/chip.d.ts",
  "components-chromium/node_modules/@material/web/chips/internal/suggestion-styles.d.ts",
  "components-chromium/node_modules/@material/web/chips/internal/shared-styles.d.ts",
  "components-chromium/node_modules/@material/web/chips/internal/assist-chip.d.ts",
  "components-chromium/node_modules/@material/web/chips/internal/input-chip.d.ts",
  "components-chromium/node_modules/@material/web/chips/internal/filter-chip.d.ts",
  "components-chromium/node_modules/@material/web/chips/internal/suggestion-chip.d.ts",
  "components-chromium/node_modules/@material/web/chips/internal/input-styles.d.ts",
  "components-chromium/node_modules/@material/web/chips/internal/assist-styles.d.ts",
  "components-chromium/node_modules/@material/web/chips/internal/chip-set-styles.d.ts",
  "components-chromium/node_modules/@material/web/chips/internal/selectable-styles.d.ts",
  "components-chromium/node_modules/@material/web/chips/internal/elevated-styles.d.ts",
  "components-chromium/node_modules/@material/web/chips/internal/filter-styles.d.ts",
  "components-chromium/node_modules/@material/web/chips/internal/trailing-icon-styles.d.ts",
  "components-chromium/node_modules/@material/web/chips/internal/multi-action-chip.d.ts",
  "components-chromium/node_modules/@material/web/chips/assist-chip.d.ts",
  "components-chromium/node_modules/@material/web/chips/input-chip.d.ts",
  "components-chromium/node_modules/@material/web/chips/filter-chip.d.ts",
  "components-chromium/node_modules/@material/web/chips/suggestion-chip.d.ts",
  "components-chromium/node_modules/@material/web/chips/harness.d.ts",
  "components-chromium/node_modules/@material/web/field/filled-field.d.ts",
  "components-chromium/node_modules/@material/web/field/outlined-field.d.ts",
  "components-chromium/node_modules/@material/web/field/internal/field.d.ts",
  "components-chromium/node_modules/@material/web/field/internal/filled-field.d.ts",
  "components-chromium/node_modules/@material/web/field/internal/filled-styles.d.ts",
  "components-chromium/node_modules/@material/web/field/internal/outlined-field.d.ts",
  "components-chromium/node_modules/@material/web/field/internal/shared-styles.d.ts",
  "components-chromium/node_modules/@material/web/field/internal/outlined-styles.d.ts",
  "components-chromium/node_modules/@material/web/field/harness.d.ts",
  "components-chromium/node_modules/@material/web/progress/internal/circular-progress.d.ts",
  "components-chromium/node_modules/@material/web/progress/internal/progress.d.ts",
  "components-chromium/node_modules/@material/web/progress/internal/linear-progress.d.ts",
  "components-chromium/node_modules/@material/web/progress/internal/linear-progress-styles.d.ts",
  "components-chromium/node_modules/@material/web/progress/internal/circular-progress-styles.d.ts",
  "components-chromium/node_modules/@material/web/progress/circular-progress.d.ts",
  "components-chromium/node_modules/@material/web/progress/linear-progress.d.ts",
  "components-chromium/node_modules/@material/web/progress/harness.d.ts",
  "components-chromium/node_modules/@material/web/select/internal/filled-select-styles.d.ts",
  "components-chromium/node_modules/@material/web/select/internal/selectoption/selectOptionController.d.ts",
  "components-chromium/node_modules/@material/web/select/internal/selectoption/harness.d.ts",
  "components-chromium/node_modules/@material/web/select/internal/selectoption/select-option.d.ts",
  "components-chromium/node_modules/@material/web/select/internal/outlined-select.d.ts",
  "components-chromium/node_modules/@material/web/select/internal/shared-styles.d.ts",
  "components-chromium/node_modules/@material/web/select/internal/outlined-select-styles.d.ts",
  "components-chromium/node_modules/@material/web/select/internal/filled-select.d.ts",
  "components-chromium/node_modules/@material/web/select/internal/select.d.ts",
  "components-chromium/node_modules/@material/web/select/internal/shared.d.ts",
  "components-chromium/node_modules/@material/web/select/outlined-select.d.ts",
  "components-chromium/node_modules/@material/web/select/filled-select.d.ts",
  "components-chromium/node_modules/@material/web/select/harness.d.ts",
  "components-chromium/node_modules/@material/web/select/select-option.d.ts",
  "components-chromium/node_modules/@material/web/labs/segmentedbutton/internal/shared-styles.d.ts",
  "components-chromium/node_modules/@material/web/labs/segmentedbutton/internal/segmented-button.d.ts",
  "components-chromium/node_modules/@material/web/labs/segmentedbutton/internal/outlined-segmented-button.d.ts",
  "components-chromium/node_modules/@material/web/labs/segmentedbutton/internal/outlined-styles.d.ts",
  "components-chromium/node_modules/@material/web/labs/segmentedbutton/outlined-segmented-button.d.ts",
  "components-chromium/node_modules/@material/web/labs/behaviors/constraint-validation.d.ts",
  "components-chromium/node_modules/@material/web/labs/behaviors/focusable.d.ts",
  "components-chromium/node_modules/@material/web/labs/behaviors/validators/radio-validator.d.ts",
  "components-chromium/node_modules/@material/web/labs/behaviors/validators/checkbox-validator.d.ts",
  "components-chromium/node_modules/@material/web/labs/behaviors/validators/validator.d.ts",
  "components-chromium/node_modules/@material/web/labs/behaviors/validators/text-field-validator.d.ts",
  "components-chromium/node_modules/@material/web/labs/behaviors/validators/select-validator.d.ts",
  "components-chromium/node_modules/@material/web/labs/behaviors/on-report-validity.d.ts",
  "components-chromium/node_modules/@material/web/labs/behaviors/form-associated.d.ts",
  "components-chromium/node_modules/@material/web/labs/behaviors/element-internals.d.ts",
  "components-chromium/node_modules/@material/web/labs/behaviors/mixin.d.ts",
  "components-chromium/node_modules/@material/web/labs/card/internal/filled-styles.d.ts",
  "components-chromium/node_modules/@material/web/labs/card/internal/card.d.ts",
  "components-chromium/node_modules/@material/web/labs/card/internal/shared-styles.d.ts",
  "components-chromium/node_modules/@material/web/labs/card/internal/outlined-styles.d.ts",
  "components-chromium/node_modules/@material/web/labs/card/internal/elevated-styles.d.ts",
  "components-chromium/node_modules/@material/web/labs/card/filled-card.d.ts",
  "components-chromium/node_modules/@material/web/labs/card/elevated-card.d.ts",
  "components-chromium/node_modules/@material/web/labs/card/outlined-card.d.ts",
  "components-chromium/node_modules/@material/web/labs/segmentedbuttonset/outlined-segmented-button-set.d.ts",
  "components-chromium/node_modules/@material/web/labs/segmentedbuttonset/internal/outlined-segmented-button-set.d.ts",
  "components-chromium/node_modules/@material/web/labs/segmentedbuttonset/internal/shared-styles.d.ts",
  "components-chromium/node_modules/@material/web/labs/segmentedbuttonset/internal/outlined-styles.d.ts",
  "components-chromium/node_modules/@material/web/labs/segmentedbuttonset/internal/segmented-button-set.d.ts",
  "components-chromium/node_modules/@material/web/labs/item/internal/item.d.ts",
  "components-chromium/node_modules/@material/web/labs/item/internal/item-styles.d.ts",
  "components-chromium/node_modules/@material/web/labs/item/item.d.ts",
  "components-chromium/node_modules/@material/web/labs/badge/internal/badge-styles.d.ts",
  "components-chromium/node_modules/@material/web/labs/badge/internal/badge.d.ts",
  "components-chromium/node_modules/@material/web/labs/badge/badge.d.ts",
  "components-chromium/node_modules/@material/web/labs/navigationtab/internal/navigation-tab-styles.d.ts",
  "components-chromium/node_modules/@material/web/labs/navigationtab/internal/state.d.ts",
  "components-chromium/node_modules/@material/web/labs/navigationtab/internal/navigation-tab.d.ts",
  "components-chromium/node_modules/@material/web/labs/navigationtab/harness.d.ts",
  "components-chromium/node_modules/@material/web/labs/navigationtab/navigation-tab.d.ts",
  "components-chromium/node_modules/@material/web/labs/navigationbar/internal/constants.d.ts",
  "components-chromium/node_modules/@material/web/labs/navigationbar/internal/state.d.ts",
  "components-chromium/node_modules/@material/web/labs/navigationbar/internal/navigation-bar.d.ts",
  "components-chromium/node_modules/@material/web/labs/navigationbar/internal/navigation-bar-styles.d.ts",
  "components-chromium/node_modules/@material/web/labs/navigationbar/navigation-bar.d.ts",
  "components-chromium/node_modules/@material/web/labs/navigationbar/harness.d.ts",
  "components-chromium/node_modules/@material/web/labs/navigationdrawer/navigation-drawer-modal.d.ts",
  "components-chromium/node_modules/@material/web/labs/navigationdrawer/internal/navigation-drawer-modal-styles.d.ts",
  "components-chromium/node_modules/@material/web/labs/navigationdrawer/internal/navigation-drawer-styles.d.ts",
  "components-chromium/node_modules/@material/web/labs/navigationdrawer/internal/navigation-drawer-modal.d.ts",
  "components-chromium/node_modules/@material/web/labs/navigationdrawer/internal/shared-styles.d.ts",
  "components-chromium/node_modules/@material/web/labs/navigationdrawer/internal/navigation-drawer.d.ts",
  "components-chromium/node_modules/@material/web/labs/navigationdrawer/navigation-drawer.d.ts",
  "components-chromium/node_modules/@material/web/switch/internal/switch-styles.d.ts",
  "components-chromium/node_modules/@material/web/switch/internal/switch.d.ts",
  "components-chromium/node_modules/@material/web/switch/harness.d.ts",
  "components-chromium/node_modules/@material/web/switch/switch.d.ts",
  "components-chromium/node_modules/@material/web/typography/md-typescale-styles.d.ts",
  "components-chromium/node_modules/@material/web/divider/internal/divider-styles.d.ts",
  "components-chromium/node_modules/@material/web/divider/internal/divider.d.ts",
  "components-chromium/node_modules/@material/web/divider/divider.d.ts",
  "components-chromium/node_modules/@material/web/icon/internal/icon.d.ts",
  "components-chromium/node_modules/@material/web/icon/internal/icon-styles.d.ts",
  "components-chromium/node_modules/@material/web/icon/icon.d.ts",
  "components-chromium/node_modules/@material/web/all.d.ts",
  "components-chromium/node_modules/@material/web/tabs/internal/tabs-styles.d.ts",
  "components-chromium/node_modules/@material/web/tabs/internal/secondary-tab-styles.d.ts",
  "components-chromium/node_modules/@material/web/tabs/internal/tab-styles.d.ts",
  "components-chromium/node_modules/@material/web/tabs/internal/primary-tab.d.ts",
  "components-chromium/node_modules/@material/web/tabs/internal/tab.d.ts",
  "components-chromium/node_modules/@material/web/tabs/internal/tabs.d.ts",
  "components-chromium/node_modules/@material/web/tabs/internal/secondary-tab.d.ts",
  "components-chromium/node_modules/@material/web/tabs/internal/primary-tab-styles.d.ts",
  "components-chromium/node_modules/@material/web/tabs/primary-tab.d.ts",
  "components-chromium/node_modules/@material/web/tabs/harness.d.ts",
  "components-chromium/node_modules/@material/web/tabs/tabs.d.ts",
  "components-chromium/node_modules/@material/web/tabs/secondary-tab.d.ts",
  "components-chromium/node_modules/@material/web/common.d.ts",
  "components-chromium/node_modules/@material/web/dialog/internal/dialog.d.ts",
  "components-chromium/node_modules/@material/web/dialog/internal/dialog-styles.d.ts",
  "components-chromium/node_modules/@material/web/dialog/internal/animations.d.ts",
  "components-chromium/node_modules/@material/web/dialog/dialog.d.ts",
  "components-chromium/node_modules/@material/web/dialog/harness.d.ts",
  "components-chromium/node_modules/@material/web/textfield/internal/filled-styles.d.ts",
  "components-chromium/node_modules/@material/web/textfield/internal/shared-styles.d.ts",
  "components-chromium/node_modules/@material/web/textfield/internal/filled-text-field.d.ts",
  "components-chromium/node_modules/@material/web/textfield/internal/text-field.d.ts",
  "components-chromium/node_modules/@material/web/textfield/internal/outlined-styles.d.ts",
  "components-chromium/node_modules/@material/web/textfield/internal/outlined-text-field.d.ts",
  "components-chromium/node_modules/@material/web/textfield/filled-text-field.d.ts",
  "components-chromium/node_modules/@material/web/textfield/harness.d.ts",
  "components-chromium/node_modules/@material/web/textfield/outlined-text-field.d.ts",
  "components-chromium/node_modules/@material/web/testing/transform-pseudo-classes.d.ts",
  "components-chromium/node_modules/@material/web/testing/harness.d.ts",
  "components-chromium/node_modules/@material/web/radio/internal/single-selection-controller.d.ts",
  "components-chromium/node_modules/@material/web/radio/internal/radio-styles.d.ts",
  "components-chromium/node_modules/@material/web/radio/internal/radio.d.ts",
  "components-chromium/node_modules/@material/web/radio/radio.d.ts",
  "components-chromium/node_modules/@material/web/radio/harness.d.ts",
  "components-chromium/node_modules/@material/web/elevation/internal/elevation-styles.d.ts",
  "components-chromium/node_modules/@material/web/elevation/internal/elevation.d.ts",
  "components-chromium/node_modules/@material/web/elevation/elevation.d.ts",
  "components-chromium/node_modules/@material/web/fab/fab.d.ts",
  "components-chromium/node_modules/@material/web/fab/internal/fab.d.ts",
  "components-chromium/node_modules/@material/web/fab/internal/fab-branded-styles.d.ts",
  "components-chromium/node_modules/@material/web/fab/internal/fab-styles.d.ts",
  "components-chromium/node_modules/@material/web/fab/internal/forced-colors-styles.d.ts",
  "components-chromium/node_modules/@material/web/fab/internal/shared-styles.d.ts",
  "components-chromium/node_modules/@material/web/fab/internal/shared.d.ts",
  "components-chromium/node_modules/@material/web/fab/branded-fab.d.ts",
  "components-chromium/node_modules/@material/web/fab/harness.d.ts",
  "components-chromium/node_modules/@material/web/list/internal/listitem/harness.d.ts",
  "components-chromium/node_modules/@material/web/list/internal/listitem/list-item.d.ts",
  "components-chromium/node_modules/@material/web/list/internal/listitem/list-item-styles.d.ts",
  "components-chromium/node_modules/@material/web/list/internal/list-navigation-helpers.d.ts",
  "components-chromium/node_modules/@material/web/list/internal/list-controller.d.ts",
  "components-chromium/node_modules/@material/web/list/internal/list.d.ts",
  "components-chromium/node_modules/@material/web/list/internal/list-styles.d.ts",
  "components-chromium/node_modules/@material/web/list/harness.d.ts",
  "components-chromium/node_modules/@material/web/list/list.d.ts",
  "components-chromium/node_modules/@material/web/list/list-item.d.ts",
  "components-chromium/node_modules/@material/web/checkbox/internal/checkbox-styles.d.ts",
  "components-chromium/node_modules/@material/web/checkbox/internal/checkbox.d.ts",
  "components-chromium/node_modules/@material/web/checkbox/checkbox.d.ts",
  "components-chromium/node_modules/@material/web/checkbox/harness.d.ts",
  "components-chromium/node_modules/@material/web/focus/md-focus-ring.d.ts",
  "components-chromium/node_modules/@material/web/focus/internal/focus-ring-styles.d.ts",
  "components-chromium/node_modules/@material/web/focus/internal/focus-ring.d.ts",
  "components-chromium/node_modules/@material/web/ripple/internal/ripple-styles.d.ts",
  "components-chromium/node_modules/@material/web/ripple/internal/ripple.d.ts",
  "components-chromium/node_modules/@material/web/ripple/ripple.d.ts",
  "components-chromium/node_modules/lit/html.d.ts",
  "components-chromium/node_modules/lit/async-directive.d.ts",
  "components-chromium/node_modules/lit/directive-helpers.d.ts",
  "components-chromium/node_modules/lit/directive.d.ts",
  "components-chromium/node_modules/lit/index.d.ts",
  "components-chromium/node_modules/lit/static-html.d.ts",
  "components-chromium/node_modules/lit/decorators.d.ts",
  "components-chromium/node_modules/lit/directives/unsafe-html.d.ts",
  "components-chromium/node_modules/lit/directives/guard.d.ts",
  "components-chromium/node_modules/lit/directives/template-content.d.ts",
  "components-chromium/node_modules/lit/directives/unsafe-svg.d.ts",
  "components-chromium/node_modules/lit/directives/ref.d.ts",
  "components-chromium/node_modules/lit/directives/join.d.ts",
  "components-chromium/node_modules/lit/directives/when.d.ts",
  "components-chromium/node_modules/lit/directives/async-replace.d.ts",
  "components-chromium/node_modules/lit/directives/cache.d.ts",
  "components-chromium/node_modules/lit/directives/choose.d.ts",
  "components-chromium/node_modules/lit/directives/class-map.d.ts",
  "components-chromium/node_modules/lit/directives/range.d.ts",
  "components-chromium/node_modules/lit/directives/if-defined.d.ts",
  "components-chromium/node_modules/lit/directives/live.d.ts",
  "components-chromium/node_modules/lit/directives/map.d.ts",
  "components-chromium/node_modules/lit/directives/until.d.ts",
  "components-chromium/node_modules/lit/directives/keyed.d.ts",
  "components-chromium/node_modules/lit/directives/async-append.d.ts",
  "components-chromium/node_modules/lit/directives/repeat.d.ts",
  "components-chromium/node_modules/lit/directives/style-map.d.ts",
  "components-chromium/node_modules/@lit/reactive-element/decorators/query-async.d.ts",
  "components-chromium/node_modules/@lit/reactive-element/decorators/query-assigned-elements.d.ts",
  "components-chromium/node_modules/@lit/reactive-element/decorators/custom-element.d.ts",
  "components-chromium/node_modules/@lit/reactive-element/decorators/base.d.ts",
  "components-chromium/node_modules/@lit/reactive-element/decorators/state.d.ts",
  "components-chromium/node_modules/@lit/reactive-element/decorators/event-options.d.ts",
  "components-chromium/node_modules/@lit/reactive-element/decorators/query-all.d.ts",
  "components-chromium/node_modules/@lit/reactive-element/decorators/query.d.ts",
  "components-chromium/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts",
  "components-chromium/node_modules/@lit/reactive-element/decorators/property.d.ts",
  "components-chromium/node_modules/@lit/reactive-element/css-tag.d.ts",
  "components-chromium/node_modules/@lit/reactive-element/reactive-element.d.ts",
  "components-chromium/node_modules/@lit/reactive-element/reactive-controller.d.ts",
  "components-chromium/node_modules/@lit/reactive-element/decorators.d.ts",
  "components-chromium/node_modules/@lit/task/index.d.ts",
  "components-chromium/node_modules/@lit/task/deep-equals.d.ts",
  "components-chromium/node_modules/@lit/task/task.d.ts",
  "components-chromium/node_modules/lit-html/static.d.ts",
  "components-chromium/node_modules/lit-html/lit-html.d.ts",
  "components-chromium/node_modules/lit-html/async-directive.d.ts",
  "components-chromium/node_modules/lit-html/directive-helpers.d.ts",
  "components-chromium/node_modules/lit-html/is-server.d.ts",
  "components-chromium/node_modules/lit-html/directive.d.ts",
  "components-chromium/node_modules/lit-html/directives/unsafe-html.d.ts",
  "components-chromium/node_modules/lit-html/directives/guard.d.ts",
  "components-chromium/node_modules/lit-html/directives/template-content.d.ts",
  "components-chromium/node_modules/lit-html/directives/unsafe-svg.d.ts",
  "components-chromium/node_modules/lit-html/directives/ref.d.ts",
  "components-chromium/node_modules/lit-html/directives/join.d.ts",
  "components-chromium/node_modules/lit-html/directives/when.d.ts",
  "components-chromium/node_modules/lit-html/directives/async-replace.d.ts",
  "components-chromium/node_modules/lit-html/directives/cache.d.ts",
  "components-chromium/node_modules/lit-html/directives/choose.d.ts",
  "components-chromium/node_modules/lit-html/directives/private-async-helpers.d.ts",
  "components-chromium/node_modules/lit-html/directives/class-map.d.ts",
  "components-chromium/node_modules/lit-html/directives/range.d.ts",
  "components-chromium/node_modules/lit-html/directives/if-defined.d.ts",
  "components-chromium/node_modules/lit-html/directives/live.d.ts",
  "components-chromium/node_modules/lit-html/directives/map.d.ts",
  "components-chromium/node_modules/lit-html/directives/until.d.ts",
  "components-chromium/node_modules/lit-html/directives/keyed.d.ts",
  "components-chromium/node_modules/lit-html/directives/async-append.d.ts",
  "components-chromium/node_modules/lit-html/directives/repeat.d.ts",
  "components-chromium/node_modules/lit-html/directives/style-map.d.ts",
  "components-chromium/node_modules/@lit-labs/ssr-dom-shim/lib/element-internals.d.ts",
  "components-chromium/node_modules/@lit-labs/ssr-dom-shim/index.d.ts",
# TAG(reproduce.sh) END_DEFINITIONS
  ]

  # Client code that runs through optimize_webui will attempt to find lit
  # resources in $chrome_resources_dir. As such if ts code depends on mwc
  # it also needs to depend on the rules that move lit resources into
  # $chrome_resources_dir.
  extra_deps = [
    ":copy_lit_bundle",
    ":copy_tslib",
  ]
}