hotwire-native-dev-tools 0.3.0 → 0.3.2
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
CHANGED
|
@@ -91,6 +91,14 @@ Please note that your JS condition may vary depending on your setup and needs.
|
|
|
91
91
|
The downside of this approach is that you ship the JS code of the dev tools to the client, even if the client is not in development mode.
|
|
92
92
|
This dev tools package is quite small (~15kb), but if you want to avoid shipping unnecessary code to the client, you should use the custom entrypoint approach.
|
|
93
93
|
|
|
94
|
+
### Bubble position
|
|
95
|
+
|
|
96
|
+
The floating bubble lives by default in the bottom right corner. You can change the initial position by setting the `initialBubblePosition` option (`"bottom-right"`, `"bottom-left"`, `"top-right"` or `"top-left"`):
|
|
97
|
+
```js
|
|
98
|
+
setupDevTools({ initialBubblePosition: "top-left" });
|
|
99
|
+
```
|
|
100
|
+
Once you drag the bubble, its position is remembered and takes precedence over this setting.
|
|
101
|
+
|
|
94
102
|
## Usage (Native)
|
|
95
103
|
|
|
96
104
|
Some features, such as the Native Stack and PathConfiguration properties, are only available if you add the dev tool bridge components to your app:
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
export type BubbleCorner = "bottom-right" | "bottom-left" | "top-right" | "top-left"
|
|
2
|
+
|
|
1
3
|
export interface DevToolsOptions {
|
|
2
4
|
enabled?: boolean
|
|
3
5
|
reset?: boolean
|
|
6
|
+
initialBubblePosition?: BubbleCorner
|
|
4
7
|
}
|
|
5
8
|
|
|
6
9
|
export function setupDevTools(options?: DevToolsOptions): void
|