@sqlite-sync/devtools 0.9.3 → 0.9.4

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
@@ -1,8 +1,8 @@
1
1
  # @sqlite-sync/devtools
2
2
 
3
- Embeddable browser devtools for [sqlite-sync](https://github.com/krolebord-dev/sqlite-sync) — a local-first SQLite sync engine for web apps, with reactive queries, offline persistence, and CRDT-based replication.
3
+ Embeddable browser devtools for [sqlite-sync](https://github.com/krolebord-dev/sqlite-sync), a local-first SQLite sync engine for web apps.
4
4
 
5
- This package renders a floating **SQLite Sync** button that opens a dialog with a sidebar, database selector, and query tooling for inspecting databases registered through [`@sqlite-sync/core`](https://www.npmjs.com/package/@sqlite-sync/core).
5
+ Mount `<SQLiteSyncDevtools />` and you get a floating SQLite Sync button. It opens a dialog against databases registered through [`@sqlite-sync/core`](https://www.npmjs.com/package/@sqlite-sync/core). The UI renders in a shadow root, so host-app CSS (including Tailwind preflight) does not restyle it. `className` applies to the light-DOM host, not the launcher or dialog internals.
6
6
 
7
7
  ## Install
8
8
 
@@ -25,7 +25,9 @@ export function AppShell() {
25
25
  }
26
26
  ```
27
27
 
28
- Database instances register automatically when `createSyncedDb()` completes and unregister on `dispose()`, so mounting the component once near the app root is enough.
28
+ Database instances register when `createSyncedDb()` completes and unregister on `dispose()`. Mount the component once near the app root.
29
+
30
+ Pass `hidden` and `onHiddenChange` if your app has its own toggle. Skip them and `Ctrl+Alt+S` (⌘⌥S on macOS) hides the button. That choice is stored in `localStorage`.
29
31
 
30
32
  Query runner rules:
31
33
 
package/dist/index.d.ts CHANGED
@@ -1,8 +1,11 @@
1
1
  //#region src/devtools.d.ts
2
2
  type SQLiteSyncDevtoolsProps = {
3
3
  className?: string;
4
+ /** Hide the floating launcher. Omit to let the user toggle it with Ctrl+Alt+S (⌘⌥S on macOS). */
5
+ hidden?: boolean;
6
+ onHiddenChange?: (hidden: boolean) => void;
4
7
  };
5
- declare function SQLiteSyncDevtools({ className }: SQLiteSyncDevtoolsProps): import("react").JSX.Element;
8
+ declare function SQLiteSyncDevtools({ className, hidden: hiddenProp, onHiddenChange }: SQLiteSyncDevtoolsProps): import("react").JSX.Element;
6
9
  //#endregion
7
- export { SQLiteSyncDevtools };
10
+ export { SQLiteSyncDevtools, type SQLiteSyncDevtoolsProps };
8
11
  //# sourceMappingURL=index.d.ts.map