# `ECharts.Assets`
[🔗](https://github.com/Mateus-M-Reis/echarts/blob/main/lib/echarts/assets.ex#L1)

The JavaScript bundles shipped with ECharts.

Assets live in `priv/static` and are served by `ECharts.Phoenix.Plug` (for
Phoenix applications) or imported by the Livebook kino. The Apache ECharts
bundle is vendored so charts work offline and do not depend on a CDN.

Only the files returned by `files/0` are servable. Use `path/1` when you
need to read a file yourself — for example to copy the bundles into a
custom static directory.

# `asset?`

```elixir
@spec asset?(term()) :: boolean()
```

Returns true when `name` is a servable asset.

# `dir`

```elixir
@spec dir() :: String.t()
```

Returns the absolute path of the bundled assets directory.

# `echarts_gl_version`

```elixir
@spec echarts_gl_version() :: String.t()
```

Returns the vendored Apache ECharts GL version.

# `echarts_version`

```elixir
@spec echarts_version() :: String.t()
```

Returns the vendored Apache ECharts version.

# `files`

```elixir
@spec files() :: [String.t()]
```

Returns the names of every servable asset.

# `mime_type`

```elixir
@spec mime_type(String.t()) :: String.t()
```

Returns the content type for a bundled asset.

# `path`

```elixir
@spec path(String.t()) :: String.t()
```

Returns the absolute path of a servable asset.

Raises `ArgumentError` for unknown names, which keeps path traversal out of
the plug.

# `plugin_file`

```elixir
@spec plugin_file(String.t() | atom()) :: String.t()
```

Returns the file name of a plugin bundle.

Raises `ArgumentError` for unknown plugins.

# `plugins`

```elixir
@spec plugins() :: [String.t()]
```

Returns the supported plugin names.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
