react-native-bundle-discovery-ui 2.5.0 → 2.7.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +178 -103
- package/assets/global.css +171 -0
- package/dist/bin.js +202 -0
- package/dist/client/_virtual/_rolldown/runtime.js +23 -0
- package/dist/client/pages/_common.js +282 -0
- package/dist/client/pages/default.js +184 -0
- package/dist/client/pages/module.js +260 -0
- package/dist/client/pages/package.js +187 -0
- package/dist/client/prepare.js +52 -0
- package/dist/client/queryHelpers.js +282 -0
- package/dist/client/setup.js +9 -0
- package/dist/client/views/_theme.js +16 -0
- package/dist/client/views/foamtree.js +88 -0
- package/dist/client/views/highcharts.js +23 -0
- package/dist/client/views/prettify.js +9 -0
- package/dist/discoveryrc.js +21 -0
- package/dist/rolldown-runtime-VH7oDXx4.js +28 -0
- package/dist/rsdoctor.js +75 -0
- package/dist/src-BSLX-He2.js +30 -0
- package/package.json +26 -27
- package/.discoveryrc.js +0 -22
- package/lib/bin.js +0 -94
- package/lib/build.js +0 -123
- package/lib/isRsdoctorReport.js +0 -33
- package/lib/rsdoctor.js +0 -149
- package/lib/server.js +0 -90
- package/pages/_common.js +0 -324
- package/pages/default.js +0 -211
- package/pages/module.js +0 -324
- package/pages/package.js +0 -255
- package/prepare.js +0 -102
- package/queryHelpers.js +0 -375
- package/setup.js +0 -12
- package/views/_theme.js +0 -35
- package/views/foamtree.js +0 -136
- package/views/global.css +0 -169
- package/views/highcharts.js +0 -43
- package/views/prettify.js +0 -17
- /package/{views → assets}/highcharts.css +0 -0
package/README.md
CHANGED
|
@@ -1,73 +1,92 @@
|
|
|
1
1
|
# react-native-bundle-discovery
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/react-native-bundle-discovery)
|
|
4
|
+
[](https://www.npmtrends.com/react-native-bundle-discovery)
|
|
5
|
+
[](https://www.npmjs.com/package/react-native-bundle-discovery)
|
|
6
|
+
|
|
7
|
+
Visualize and analyze the JS bundle of your React Native app. Find heavy packages, duplicates and deprecated
|
|
8
|
+
dependencies, inspect every module, and catch bundle size regressions in CI.
|
|
9
|
+
|
|
10
|
+
<img width="800" alt="Bundle Discovery UI" src="./assets/img.png" />
|
|
11
|
+
|
|
12
|
+
## Contents
|
|
13
|
+
|
|
14
|
+
- [Features](#features)
|
|
15
|
+
- [Packages](#packages)
|
|
16
|
+
- [Quick start](#quick-start)
|
|
17
|
+
- [Other setups](#other-setups)
|
|
18
|
+
- [Usage](#usage)
|
|
19
|
+
- [UI](#ui)
|
|
20
|
+
- [CLI](#cli)
|
|
21
|
+
- [Bundle size checks in CI](#bundle-size-checks-in-ci)
|
|
22
|
+
- [API](#api)
|
|
23
|
+
- [`createSerializer`](#createserializeroptions)
|
|
24
|
+
- [`createResolveRequest`](#createresolverequestoptions)
|
|
25
|
+
- [Similar projects](#similar-projects)
|
|
26
|
+
- [Support the project](#support-the-project)
|
|
27
|
+
- [License](#license)
|
|
28
|
+
|
|
29
|
+
## Features
|
|
30
|
+
|
|
31
|
+
- 📊 Interactive UI to explore packages, modules and their source/bundled code
|
|
32
|
+
- 💡 Optimization recommendations (duplicates, deprecated / outdated / dev-only packages, and more)
|
|
33
|
+
- 🔍 CLI to list the heaviest packages and modules
|
|
34
|
+
- 🆚 Compare two reports and fail CI on bundle size regressions
|
|
35
|
+
- 🧩 Works with Metro, [Re.Pack](./Re.Pack.md) and [React Native DevTools](./packages/rozenite-plugin/README.md) (via Rozenite)
|
|
36
|
+
|
|
37
|
+
## Packages
|
|
38
|
+
|
|
39
|
+
| Package | What it does | Required |
|
|
40
|
+
| ------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------- | -------- |
|
|
41
|
+
| `react-native-bundle-discovery` | Generates a JSON report (`metro-stats.json`) of your bundle | ✅ Yes |
|
|
42
|
+
| `react-native-bundle-discovery-ui` | Shows the report in the browser | Optional |
|
|
43
|
+
| `react-native-bundle-discovery-cli` | Analyzes and compares reports in the terminal / CI | Optional |
|
|
44
|
+
| [`react-native-bundle-discovery-rozenite-plugin`](./packages/rozenite-plugin/README.md) | Shows the UI inside [React Native DevTools](https://reactnative.dev/docs/react-native-devtools) | Optional |
|
|
45
|
+
|
|
46
|
+
## Quick start
|
|
47
|
+
|
|
48
|
+
This setup is for a standard **Metro** project.
|
|
49
|
+
Using Re.Pack or Rozenite? See [Other setups](#other-setups).
|
|
50
|
+
|
|
51
|
+
> [!TIP]
|
|
52
|
+
> **Using an AI coding agent?** Skip the manual steps below. Point your agent (Claude Code, Cursor, Codex, etc.)
|
|
53
|
+
> at the [`setup-react-native-bundle-discovery`](./skills/setup-react-native-bundle-discovery/SKILL.md) skill.
|
|
54
|
+
> It installs the package and sets up Metro or Re.Pack for you:
|
|
29
55
|
>
|
|
30
|
-
>
|
|
56
|
+
> ```bash
|
|
57
|
+
> npx skills add retyui/react-native-bundle-discovery
|
|
58
|
+
> ```
|
|
31
59
|
|
|
32
|
-
|
|
60
|
+
### 1. Install
|
|
33
61
|
|
|
34
62
|
```bash
|
|
35
|
-
yarn add -D react-native-bundle-discovery
|
|
36
|
-
yarn add -D react-native-bundle-discovery-ui
|
|
37
|
-
yarn add -D react-native-bundle-discovery-cli
|
|
63
|
+
yarn add -D react-native-bundle-discovery # required: generates the report
|
|
64
|
+
yarn add -D react-native-bundle-discovery-ui # optional: browser UI
|
|
65
|
+
yarn add -D react-native-bundle-discovery-cli # optional: CLI
|
|
38
66
|
```
|
|
39
67
|
|
|
40
|
-
|
|
68
|
+
### 2. Configure Metro
|
|
41
69
|
|
|
42
70
|
```diff
|
|
43
71
|
// metro.config.js
|
|
44
|
-
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
|
|
45
|
-
+const {createSerializer} = require('react-native-bundle-discovery');
|
|
46
|
-
|
|
47
|
-
+const mySerializer = createSerializer({
|
|
48
|
-
+ includeCode: true, // Useful if you want to compare source/bundle code (but a report file will be larger)
|
|
49
|
-
+ projectRoot: __dirname,
|
|
50
|
-
+ //^^^ ⚠️ WARNING: In a monorepo setup, this should point to the monorepo root,
|
|
51
|
-
+ // not the individual package directory.
|
|
52
|
-
+});
|
|
72
|
+
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
|
|
73
|
+
+const { createSerializer } = require('react-native-bundle-discovery');
|
|
53
74
|
|
|
54
75
|
-const config = {};
|
|
55
76
|
+const config = {
|
|
56
|
-
serializer: {
|
|
57
|
-
|
|
77
|
+
+ serializer: {
|
|
78
|
+
+ customSerializer: createSerializer({
|
|
79
|
+
+ projectRoot: __dirname, // ⚠️ In a monorepo, use the monorepo root instead
|
|
80
|
+
+ }),
|
|
81
|
+
+ },
|
|
82
|
+
+};
|
|
58
83
|
|
|
59
84
|
module.exports = mergeConfig(getDefaultConfig(__dirname), config);
|
|
60
85
|
```
|
|
61
86
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
See: [_rozenite/README.md](_rozenite/README.md)
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
### 3. Build the app
|
|
87
|
+
See all options in [`createSerializer`](#createserializeroptions).
|
|
69
88
|
|
|
70
|
-
|
|
89
|
+
### 3. Build a release bundle
|
|
71
90
|
|
|
72
91
|
```bash
|
|
73
92
|
npx react-native bundle \
|
|
@@ -78,97 +97,153 @@ npx react-native bundle \
|
|
|
78
97
|
--assets-dest ios/assets
|
|
79
98
|
```
|
|
80
99
|
|
|
81
|
-
|
|
100
|
+
This writes `metro-stats.json` to your project root.
|
|
101
|
+
|
|
102
|
+
### 4. Explore the report
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
npx react-native-bundle-discovery-ui metro-stats.json # open in the browser
|
|
106
|
+
npx react-native-bundle-discovery-cli metro-stats.json # get recommendations in the terminal
|
|
107
|
+
```
|
|
82
108
|
|
|
83
|
-
|
|
109
|
+
## Other setups
|
|
84
110
|
|
|
85
|
-
|
|
111
|
+
| Setup | Guide |
|
|
112
|
+
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
113
|
+
| Re.Pack (Rspack / Webpack) | [Re.Pack.md](./Re.Pack.md) |
|
|
114
|
+
| React Native DevTools | [Rozenite plugin](./packages/rozenite-plugin/README.md) |
|
|
115
|
+
| AI coding agent | Point your agent at the [`setup-react-native-bundle-discovery`](./skills/setup-react-native-bundle-discovery/SKILL.md) skill |
|
|
116
|
+
|
|
117
|
+
## Usage
|
|
118
|
+
|
|
119
|
+
### UI
|
|
120
|
+
|
|
121
|
+
Requires `react-native-bundle-discovery-ui`.
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# Start a local server (default port: 8079)
|
|
125
|
+
npx react-native-bundle-discovery-ui metro-stats.json [--port <port>]
|
|
126
|
+
|
|
127
|
+
# Build a static HTML report (default output: .bundle-discovery)
|
|
128
|
+
npx react-native-bundle-discovery-ui build metro-stats.json [--output <path>]
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### CLI
|
|
132
|
+
|
|
133
|
+
Requires `react-native-bundle-discovery-cli`. Run any command with `--help` to see all options.
|
|
134
|
+
|
|
135
|
+
| Command | Description |
|
|
136
|
+
| ---------- | --------------------------------------------- |
|
|
137
|
+
| _(none)_ | Show recommended optimizations for the bundle |
|
|
138
|
+
| `packages` | List all packages in the bundle |
|
|
139
|
+
| `modules` | List the heaviest modules |
|
|
140
|
+
| `compare` | Compare two reports |
|
|
86
141
|
|
|
87
142
|
```bash
|
|
88
|
-
#
|
|
143
|
+
# Recommended optimizations
|
|
89
144
|
npx react-native-bundle-discovery-cli metro-stats.json
|
|
90
145
|
|
|
91
|
-
#
|
|
146
|
+
# All packages
|
|
92
147
|
npx react-native-bundle-discovery-cli packages metro-stats.json [--sort size|name] [--format json|table|default]
|
|
93
148
|
|
|
94
|
-
#
|
|
95
|
-
# --filter accepts plain text (case-insensitive) or a regexp
|
|
149
|
+
# Heaviest modules (default --limit: 50, use 0 to show all)
|
|
150
|
+
# --filter accepts plain text (case-insensitive) or a regexp, e.g. --filter '/\.json/i'
|
|
96
151
|
npx react-native-bundle-discovery-cli modules metro-stats.json [--limit 50] [--filter <text|/regexp/>] [--sort size|name] [--format json|table|default]
|
|
152
|
+
|
|
153
|
+
# Diff two reports: total size, added/removed/changed modules and packages,
|
|
154
|
+
# version changes, new duplicates and new deprecated packages
|
|
155
|
+
npx react-native-bundle-discovery-cli compare --before main-stats.json --after pr-stats.json [--limit 50] [--format json|markdown|default]
|
|
97
156
|
```
|
|
98
157
|
|
|
99
|
-
|
|
158
|
+
### Bundle size checks in CI
|
|
100
159
|
|
|
101
|
-
|
|
160
|
+
`compare` exits with code `1` when any check fails:
|
|
102
161
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
162
|
+
| Option | Fails when | Example |
|
|
163
|
+
| -------------------- | ------------------------------------------------------------- | ------------------------------- |
|
|
164
|
+
| `--fail-on-increase` | The bundle grows more than the limit (bytes or % of "before") | `50KB`, `0.5MB`, `51200`, `5%` |
|
|
165
|
+
| `--max-size` | The "after" bundle is bigger than the limit | `3MB` |
|
|
166
|
+
| `--fail-on` | New duplicate and/or deprecated packages appear | `new-duplicates,new-deprecated` |
|
|
106
167
|
|
|
107
|
-
|
|
108
|
-
npx react-native-bundle-discovery-
|
|
168
|
+
```bash
|
|
169
|
+
npx react-native-bundle-discovery-cli compare --before main-stats.json --after pr-stats.json \
|
|
170
|
+
--fail-on-increase 50KB \
|
|
171
|
+
--max-size 3MB \
|
|
172
|
+
--fail-on new-duplicates,new-deprecated
|
|
109
173
|
```
|
|
110
174
|
|
|
111
|
-
|
|
175
|
+
**GitHub Actions** works out of the box: the markdown report is added to the job summary and failed checks
|
|
176
|
+
are shown as error annotations.
|
|
177
|
+
|
|
178
|
+
```yaml
|
|
179
|
+
- run: npx react-native-bundle-discovery-cli compare --before main-stats.json --after pr-stats.json --fail-on-increase 5%
|
|
180
|
+
```
|
|
112
181
|
|
|
113
|
-
|
|
182
|
+
To post the report as a PR comment, use `--format markdown`.
|
|
114
183
|
|
|
115
|
-
|
|
184
|
+
## API
|
|
116
185
|
|
|
117
|
-
|
|
118
|
-
| ---------------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
|
119
|
-
| serializer: Function | Default serializer | A custom serializer function. If not provided, a default serializer is used. |
|
|
120
|
-
| projectRoot: string | Required | The root directory of the project. ⚠️ In a monorepo setup, this should point to the monorepo root, not the individual package directory. |
|
|
121
|
-
| outputJsonPath: string | `<root>/metro-stats.json` | The path where the JSON report will be saved. Defaults to `metro-stats.json` in project root. |
|
|
122
|
-
| includeCode: boolean | `true` | Whether to include the source and output code in the JSON report. |
|
|
186
|
+
Exported from `react-native-bundle-discovery`.
|
|
123
187
|
|
|
124
|
-
|
|
188
|
+
### `createSerializer(options)`
|
|
125
189
|
|
|
126
|
-
|
|
190
|
+
Creates a Metro serializer that writes the JSON report. Use it as `serializer.customSerializer` (see [Quick start](#2-configure-metro)).
|
|
127
191
|
|
|
128
|
-
|
|
192
|
+
| Option | Type | Default | Description |
|
|
193
|
+
| ----------------------- | ---------- | -------------------------------- | ----------------------------------------------------------------------------------------- |
|
|
194
|
+
| `projectRoot` | `string` | **Required** | Project root. ⚠️ In a monorepo, use the monorepo root, not the app package directory. |
|
|
195
|
+
| `outputJsonPath` | `string` | `<projectRoot>/metro-stats.json` | Where to save the report. |
|
|
196
|
+
| `includeCode` | `boolean` | `true` | Include source and bundled code of each module in the report (larger file). |
|
|
197
|
+
| `includeEnvs` | `string[]` | `[]` | Names of environment variables to include in the report. |
|
|
198
|
+
| `fetchPackagesMetadata` | `boolean` | `true` | Fetch package metadata (publish date, deprecation, latest version) from the npm registry. |
|
|
199
|
+
| `silent` | `boolean` | `false` | Disable log output. |
|
|
200
|
+
| `serializer` | `Function` | Metro default serializer | Custom serializer to wrap. |
|
|
129
201
|
|
|
130
|
-
|
|
202
|
+
> [!WARNING]
|
|
203
|
+
> With `includeCode: true` (the default) the report **contains your source code**.
|
|
204
|
+
> If your code is proprietary, be careful who you share the report with.
|
|
131
205
|
|
|
132
|
-
### `createResolveRequest(options
|
|
206
|
+
### `createResolveRequest(options)`
|
|
133
207
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
| removePromisePolyfill: boolean | `false` | Remove the Promise polyfill as Hermes provide own impl. (issue: [#57702](https://github.com/react/react-native/issues/57702)) |
|
|
137
|
-
| removeUTFSequence: boolean | `false` | Remove useless undocumented RN module. |
|
|
208
|
+
Creates a Metro `resolveRequest` that removes unnecessary React Native modules from **release** bundles
|
|
209
|
+
(dev builds are not affected). The CLI recommends these options when they apply to your bundle.
|
|
138
210
|
|
|
139
|
-
|
|
140
|
-
|
|
211
|
+
| Option | Type | Default | Description |
|
|
212
|
+
| ------------------- | --------- | ------- | -------------------------------------------------------------------------------- |
|
|
213
|
+
| `removeUTFSequence` | `boolean` | `false` | Remove the unused `react-native/Libraries/UTFSequence.js` module. |
|
|
214
|
+
| `removeNewRenderer` | `boolean` | `false` | Remove the Fabric renderer. Enable only if the New Architecture is **disabled**. |
|
|
141
215
|
|
|
142
216
|
```js
|
|
143
217
|
// metro.config.js
|
|
144
218
|
const { createResolveRequest } = require("react-native-bundle-discovery");
|
|
145
|
-
|
|
146
|
-
removePromisePolyfill: true,
|
|
147
|
-
removeUTFSequence: true,
|
|
148
|
-
});
|
|
219
|
+
|
|
149
220
|
const config = {
|
|
150
221
|
resolver: {
|
|
151
|
-
resolveRequest
|
|
222
|
+
resolveRequest: createResolveRequest({
|
|
223
|
+
removeUTFSequence: true,
|
|
224
|
+
}),
|
|
152
225
|
},
|
|
153
226
|
};
|
|
154
227
|
```
|
|
155
228
|
|
|
156
|
-
|
|
229
|
+
## Similar projects
|
|
157
230
|
|
|
158
|
-
|
|
231
|
+
- [expo-atlas](https://github.com/expo/atlas)
|
|
232
|
+
- [expo-atlas-without-expo](https://github.com/v3ron/expo-atlas-without-expo)
|
|
233
|
+
- [react-native-bundle-visualizer](https://github.com/callstack/react-native-bundle-visualizer)
|
|
234
|
+
- [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer)
|
|
235
|
+
- [bundle-stats](https://github.com/relative-ci/bundle-stats/tree/master/packages/cli#readme)
|
|
236
|
+
- [statoscope](https://github.com/statoscope/statoscope)
|
|
159
237
|
|
|
160
|
-
|
|
238
|
+
Built with [Discovery.js](https://github.com/discoveryjs/discovery)
|
|
239
|
+
([views showcase](https://discoveryjs.github.io/discovery/#views-showcase),
|
|
240
|
+
[Jora syntax](https://discoveryjs.github.io/jora/#article:jora-syntax-operators)).
|
|
161
241
|
|
|
162
|
-
|
|
242
|
+
## Support the project
|
|
163
243
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
- [react-native-bundle-visualizer](https://github.com/callstack/react-native-bundle-visualizer) [](https://www.npmtrends.com/react-native-bundle-visualizer)[](https://packagephobia.com/result?p=react-native-bundle-visualizer)
|
|
167
|
-
- [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer) [](https://www.npmtrends.com/webpack-bundle-analyzer)[](https://packagephobia.com/result?p=webpack-bundle-analyzer)
|
|
168
|
-
- [bundle-stats](https://github.com/relative-ci/bundle-stats/tree/master/packages/cli#readme) [](https://www.npmtrends.com/bundle-stats)[](https://packagephobia.com/result?p=bundle-stats)
|
|
169
|
-
- [statoscope](https://github.com/statoscope/statoscope) [](https://www.npmtrends.com/@statoscope/cli)[](https://packagephobia.com/result?p=@statoscope/cli)
|
|
244
|
+
Become a financial contributor on [OpenCollective](https://opencollective.com/react-native-bundle-discovery)
|
|
245
|
+
or [GitHub Sponsors](https://github.com/sponsors/retyui).
|
|
170
246
|
|
|
171
|
-
|
|
247
|
+
## License
|
|
172
248
|
|
|
173
|
-
|
|
174
|
-
- Jora syntax: https://discoveryjs.github.io/jora/#article:jora-syntax-operators
|
|
249
|
+
MIT
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
hr {
|
|
2
|
+
border: 1px solid rgb(222 222 222);
|
|
3
|
+
margin-top: 1rem;
|
|
4
|
+
margin-bottom: 1rem;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.inline-block {
|
|
8
|
+
display: inline-block;
|
|
9
|
+
}
|
|
10
|
+
.discovery-content > .page-default {
|
|
11
|
+
height: 100%;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
padding-top: 16px;
|
|
14
|
+
padding-bottom: 16px;
|
|
15
|
+
}
|
|
16
|
+
.view-tabs-content > .view-content-filter > .view-input {
|
|
17
|
+
padding-top: 12px;
|
|
18
|
+
padding-bottom: 12px;
|
|
19
|
+
margin: 0;
|
|
20
|
+
background-color: var(--discovery-background-color);
|
|
21
|
+
position: sticky;
|
|
22
|
+
top: 0;
|
|
23
|
+
z-index: 1;
|
|
24
|
+
}
|
|
25
|
+
.main-tabs {
|
|
26
|
+
height: calc(100% - 20px);
|
|
27
|
+
margin-top: 12px;
|
|
28
|
+
}
|
|
29
|
+
.main-tabs .view-tabs-content {
|
|
30
|
+
height: calc(100% - 32px);
|
|
31
|
+
}
|
|
32
|
+
.foamtree-filter,
|
|
33
|
+
.view-foamtree {
|
|
34
|
+
width: 100%;
|
|
35
|
+
height: 100%;
|
|
36
|
+
}
|
|
37
|
+
.foamtree-filter > .content {
|
|
38
|
+
height: calc(100% - 60px);
|
|
39
|
+
width: 100%;
|
|
40
|
+
}
|
|
41
|
+
.tooltip {
|
|
42
|
+
position: absolute;
|
|
43
|
+
z-index: 10;
|
|
44
|
+
display: none;
|
|
45
|
+
background-color: #fff;
|
|
46
|
+
border: 1px solid #ccc;
|
|
47
|
+
padding: 5px;
|
|
48
|
+
border-radius: 5px;
|
|
49
|
+
box-shadow: 0 0 5px #ccc;
|
|
50
|
+
}
|
|
51
|
+
.tooltip-name {
|
|
52
|
+
text-transform: capitalize;
|
|
53
|
+
}
|
|
54
|
+
.flex-no-wrap {
|
|
55
|
+
flex-wrap: nowrap;
|
|
56
|
+
}
|
|
57
|
+
.width-50p {
|
|
58
|
+
width: 50%;
|
|
59
|
+
}
|
|
60
|
+
.my-icon {
|
|
61
|
+
display: block;
|
|
62
|
+
height: 100%;
|
|
63
|
+
width: 100%;
|
|
64
|
+
}
|
|
65
|
+
.my-icon-inline {
|
|
66
|
+
display: inline-block;
|
|
67
|
+
vertical-align: middle;
|
|
68
|
+
margin-left: 4px;
|
|
69
|
+
}
|
|
70
|
+
.my-icon-12 {
|
|
71
|
+
width: 12px;
|
|
72
|
+
height: 12px;
|
|
73
|
+
}
|
|
74
|
+
.no-margin {
|
|
75
|
+
margin: 0;
|
|
76
|
+
}
|
|
77
|
+
.two-column > * {
|
|
78
|
+
width: 50%;
|
|
79
|
+
}
|
|
80
|
+
.m-v-8 {
|
|
81
|
+
margin-top: 8px;
|
|
82
|
+
margin-bottom: 8px;
|
|
83
|
+
}
|
|
84
|
+
.i-duplicate {
|
|
85
|
+
display: inline-block;
|
|
86
|
+
background: #da444e;
|
|
87
|
+
color: #fff;
|
|
88
|
+
border-radius: 0.5em;
|
|
89
|
+
padding: 0 0.5em;
|
|
90
|
+
}
|
|
91
|
+
.m-l-0_5em {
|
|
92
|
+
margin-left: 0.5em;
|
|
93
|
+
}
|
|
94
|
+
.m-r-0_3em {
|
|
95
|
+
margin-right: 0.3em;
|
|
96
|
+
}
|
|
97
|
+
.copy-to-clipboard {
|
|
98
|
+
/* from: https://tabler.io/icons/icon/clipboard-copy */
|
|
99
|
+
background: url("data:image/svg+xml,%3Csvg%20%20xmlns=%22http://www.w3.org/2000/svg%22%20%20width=%2224%22%20%20height=%2224%22%20%20viewBox=%220%200%2024%2024%22%20%20fill=%22none%22%20%20stroke=%22currentColor%22%20%20stroke-width=%222%22%20%20stroke-linecap=%22round%22%20%20stroke-linejoin=%22round%22%20%20class=%22icon%20icon-tabler%20icons-tabler-outline%20icon-tabler-clipboard-copy%22%3E%3Cpath%20stroke=%22none%22%20d=%22M0%200h24v24H0z%22%20fill=%22none%22/%3E%3Cpath%20d=%22M9%205h-2a2%202%200%200%200%20-2%202v12a2%202%200%200%200%202%202h3m9%20-9v-5a2%202%200%200%200%20-2%20-2h-2%22%20/%3E%3Cpath%20d=%22M13%2017v-1a1%201%200%200%201%201%20-1h1m3%200h1a1%201%200%200%201%201%201v1m0%203v1a1%201%200%200%201%20-1%201h-1m-3%200h-1a1%201%200%200%201%20-1%20-1v-1%22%20/%3E%3Cpath%20d=%22M9%203m0%202a2%202%200%200%201%202%20-2h2a2%202%200%200%201%202%202v0a2%202%200%200%201%20-2%202h-2a2%202%200%200%201%20-2%20-2z%22%20/%3E%3C/svg%3E");
|
|
100
|
+
background-repeat: no-repeat;
|
|
101
|
+
background-position: center;
|
|
102
|
+
display: inline-block;
|
|
103
|
+
height: 32px;
|
|
104
|
+
width: 32px;
|
|
105
|
+
}
|
|
106
|
+
.copy-to-clipboard::before {
|
|
107
|
+
position: absolute;
|
|
108
|
+
top: -8px;
|
|
109
|
+
font-size: 0.7rem;
|
|
110
|
+
border-radius: 4px;
|
|
111
|
+
display: inline-block;
|
|
112
|
+
padding: 1px 4px;
|
|
113
|
+
color: #fff;
|
|
114
|
+
left: 78%;
|
|
115
|
+
opacity: 0;
|
|
116
|
+
transition: opacity 0.3s ease-in-out;
|
|
117
|
+
}
|
|
118
|
+
.copy-to-clipboard.done::before {
|
|
119
|
+
content: "Copied!";
|
|
120
|
+
background: green;
|
|
121
|
+
opacity: 1;
|
|
122
|
+
}
|
|
123
|
+
.copy-to-clipboard.err::before {
|
|
124
|
+
content: "Error!";
|
|
125
|
+
background: red;
|
|
126
|
+
opacity: 1;
|
|
127
|
+
}
|
|
128
|
+
.prettify-checkbox {
|
|
129
|
+
position: absolute;
|
|
130
|
+
right: 31px;
|
|
131
|
+
margin-top: -26px;
|
|
132
|
+
z-index: 1;
|
|
133
|
+
}
|
|
134
|
+
.ask-chatgpt {
|
|
135
|
+
color: var(--discovery-view-button-color, #000);
|
|
136
|
+
text-decoration: none;
|
|
137
|
+
vertical-align: middle;
|
|
138
|
+
position: absolute;
|
|
139
|
+
z-index: 9;
|
|
140
|
+
margin-top: 12px;
|
|
141
|
+
/* biome-ignore lint/complexity/noImportantStyles: overrides discovery.js styles */
|
|
142
|
+
margin-left: 105px !important;
|
|
143
|
+
height: 35px;
|
|
144
|
+
}
|
|
145
|
+
.ask-chatgpt::before {
|
|
146
|
+
content: "”";
|
|
147
|
+
font-size: 2em;
|
|
148
|
+
vertical-align: middle;
|
|
149
|
+
font-family: math;
|
|
150
|
+
margin-right: 0.2em;
|
|
151
|
+
display: inline-block;
|
|
152
|
+
height: 15px;
|
|
153
|
+
}
|
|
154
|
+
/* biome-ignore lint/style/noDescendingSpecificity: order is intentional, kept as is */
|
|
155
|
+
.packages-content > .view-input {
|
|
156
|
+
padding-left: 265px;
|
|
157
|
+
}
|
|
158
|
+
.copy-before-ask-chatgpt {
|
|
159
|
+
width: 95px;
|
|
160
|
+
background-position: left center;
|
|
161
|
+
padding-left: 25px;
|
|
162
|
+
position: absolute;
|
|
163
|
+
z-index: 9;
|
|
164
|
+
margin-top: 12px;
|
|
165
|
+
height: 35px;
|
|
166
|
+
}
|
|
167
|
+
.bundlejs-badge-img {
|
|
168
|
+
line-height: 0;
|
|
169
|
+
margin-bottom: -5px;
|
|
170
|
+
margin-left: 10px;
|
|
171
|
+
}
|