@livestore/adapter-web 0.3.0-dev.18 → 0.3.0-dev.21

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.
Files changed (50) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/web-worker/client-session/client-session-devtools.d.ts +1 -1
  3. package/dist/web-worker/client-session/client-session-devtools.d.ts.map +1 -1
  4. package/dist/web-worker/client-session/client-session-devtools.js +7 -97
  5. package/dist/web-worker/client-session/client-session-devtools.js.map +1 -1
  6. package/dist/web-worker/client-session/index.d.ts +10 -0
  7. package/dist/web-worker/client-session/index.d.ts.map +1 -1
  8. package/dist/web-worker/client-session/index.js +51 -17
  9. package/dist/web-worker/client-session/index.js.map +1 -1
  10. package/dist/web-worker/common/persisted-sqlite.d.ts +1 -1
  11. package/dist/web-worker/common/worker-schema.d.ts +9 -3
  12. package/dist/web-worker/common/worker-schema.d.ts.map +1 -1
  13. package/package.json +7 -14
  14. package/src/web-worker/client-session/client-session-devtools.ts +8 -155
  15. package/src/web-worker/client-session/index.ts +79 -16
  16. package/dist/devtools-bridge/background-browser-channel.d.ts +0 -9
  17. package/dist/devtools-bridge/background-browser-channel.d.ts.map +0 -1
  18. package/dist/devtools-bridge/background-browser-channel.js +0 -31
  19. package/dist/devtools-bridge/background-browser-channel.js.map +0 -1
  20. package/dist/devtools-bridge/background-message.d.ts +0 -75
  21. package/dist/devtools-bridge/background-message.d.ts.map +0 -1
  22. package/dist/devtools-bridge/background-message.js +0 -53
  23. package/dist/devtools-bridge/background-message.js.map +0 -1
  24. package/dist/devtools-bridge/bridge-shared.d.ts +0 -14
  25. package/dist/devtools-bridge/bridge-shared.d.ts.map +0 -1
  26. package/dist/devtools-bridge/bridge-shared.js +0 -67
  27. package/dist/devtools-bridge/bridge-shared.js.map +0 -1
  28. package/dist/devtools-bridge/browser-extension-bridge.d.ts +0 -3
  29. package/dist/devtools-bridge/browser-extension-bridge.d.ts.map +0 -1
  30. package/dist/devtools-bridge/browser-extension-bridge.js +0 -59
  31. package/dist/devtools-bridge/browser-extension-bridge.js.map +0 -1
  32. package/dist/devtools-bridge/iframe-message.d.ts +0 -16
  33. package/dist/devtools-bridge/iframe-message.d.ts.map +0 -1
  34. package/dist/devtools-bridge/iframe-message.js +0 -11
  35. package/dist/devtools-bridge/iframe-message.js.map +0 -1
  36. package/dist/devtools-bridge/index.d.ts +0 -6
  37. package/dist/devtools-bridge/index.d.ts.map +0 -1
  38. package/dist/devtools-bridge/index.js +0 -5
  39. package/dist/devtools-bridge/index.js.map +0 -1
  40. package/dist/devtools-bridge/web-bridge.d.ts +0 -31
  41. package/dist/devtools-bridge/web-bridge.d.ts.map +0 -1
  42. package/dist/devtools-bridge/web-bridge.js +0 -131
  43. package/dist/devtools-bridge/web-bridge.js.map +0 -1
  44. package/src/devtools-bridge/background-browser-channel.ts +0 -57
  45. package/src/devtools-bridge/background-message.ts +0 -42
  46. package/src/devtools-bridge/bridge-shared.ts +0 -97
  47. package/src/devtools-bridge/browser-extension-bridge.ts +0 -64
  48. package/src/devtools-bridge/iframe-message.ts +0 -9
  49. package/src/devtools-bridge/index.ts +0 -9
  50. package/src/devtools-bridge/web-bridge.ts +0 -169
@@ -1,167 +1,20 @@
1
- import type { ClientSession, UnexpectedError } from '@livestore/common'
2
- import { Devtools } from '@livestore/common'
3
- import { ShutdownChannel } from '@livestore/common/leader-thread'
1
+ import type { ClientSession } from '@livestore/common'
4
2
  import { isDevEnv } from '@livestore/utils'
5
- import type { Scope } from '@livestore/utils/effect'
6
- import { Effect, FiberHandle, Runtime, Schema, Stream, WebChannel } from '@livestore/utils/effect'
7
- import { nanoid } from '@livestore/utils/nanoid'
3
+ import { Effect } from '@livestore/utils/effect'
8
4
 
9
- import { makeShutdownChannel } from '../common/shutdown-channel.js'
10
-
11
- export const bootDevtools = ({
12
- clientSession,
13
- storeId,
14
- // waitForDevtoolsWebBridgePort,
15
- // connectToDevtools,
16
- }: {
17
- clientSession: ClientSession
18
- storeId: string
19
- // waitForDevtoolsWebBridgePort: (_: { webBridgeId: string }) => Effect.Effect<MessagePort, UnexpectedError>
20
- // connectToDevtools: (coordinatorMessagePort: MessagePort) => Effect.Effect<void, UnexpectedError, Scope.Scope>
21
- }) =>
5
+ export const logDevtoolsUrl = ({ clientSession, storeId }: { clientSession: ClientSession; storeId: string }) =>
22
6
  Effect.gen(function* () {
23
- // const webBridgeFiberHandle = yield* FiberHandle.make()
24
-
25
- // // NOTE we're not using the existing coordinator `shutdownChannel` as we won't be able to listen to messages emitted by the same coordinator
26
- // const shutdownChannel = yield* makeShutdownChannel(storeId)
27
-
28
- // const connectWebBridge = FiberHandle.run(
29
- // webBridgeFiberHandle,
30
- // listenToWebBridge({ coordinator, waitForDevtoolsWebBridgePort, connectToDevtools, storeId }),
31
- // )
32
-
33
- // yield* connectWebBridge
34
-
35
- // // TODO Given we're listening to our own messages and given the leader will emit an initial
36
- // // `DedicatedWorkerDisconnectBroadcast`, this will re-run and we should avoid it
37
- // yield* shutdownChannel.listen.pipe(
38
- // Stream.flatten(),
39
- // Stream.filter(Schema.is(ShutdownChannel.DedicatedWorkerDisconnectBroadcast)),
40
- // Stream.tap(() => connectWebBridge),
41
- // Stream.runDrain,
42
- // Effect.ignoreLogged,
43
- // Effect.forkScoped,
44
- // )
45
-
46
- // yield* listenToBrowserExtensionBridge({ coordinator, connectToDevtools })
47
-
48
7
  if (isDevEnv()) {
49
- const searchParams = new URLSearchParams()
50
- searchParams.set('clientId', clientSession.clientId)
51
- searchParams.set('sessionId', clientSession.sessionId)
52
- searchParams.set('storeId', storeId)
53
- const url = `${location.origin}/_livestore?${searchParams.toString()}`
8
+ const devtoolsBaseUrl = `${location.origin}/_livestore`
54
9
 
55
10
  // Check whether devtools are available and then log the URL
56
- const response = yield* Effect.promise(() => fetch(url))
11
+ const response = yield* Effect.promise(() => fetch(devtoolsBaseUrl))
57
12
  if (response.ok) {
58
13
  const text = yield* Effect.promise(() => response.text())
59
14
  if (text.includes('<meta name="livestore-devtools" content="true" />')) {
60
- // NOTE the trailing `&` is intentional to avoid Chrome opening the URL in the sources pane
61
- // as the browser already fetched it
62
- yield* Effect.log(`[@livestore/adapter-web] Devtools ready on ${url}&`)
15
+ const url = `${devtoolsBaseUrl}/web/${storeId}/${clientSession.clientId}/${clientSession.sessionId}`
16
+ yield* Effect.log(`[@livestore/adapter-web] Devtools ready on ${url}`)
63
17
  }
64
18
  }
65
19
  }
66
- }).pipe(Effect.withSpan('@livestore/adapter-web:coordinator:devtools:boot'))
67
-
68
- const listenToWebBridge = ({
69
- clientSession,
70
- storeId,
71
- waitForDevtoolsWebBridgePort,
72
- connectToDevtools,
73
- }: {
74
- clientSession: ClientSession
75
- storeId: string
76
- waitForDevtoolsWebBridgePort: (_: { webBridgeId: string }) => Effect.Effect<MessagePort, UnexpectedError>
77
- connectToDevtools: (coordinatorMessagePort: MessagePort) => Effect.Effect<void, UnexpectedError, Scope.Scope>
78
- }) =>
79
- Effect.gen(function* () {
80
- // const appHostId = clientSession.devtools.appHostId
81
- const webBridgeBroadcastChannel = yield* Devtools.WebBridge.makeBroadcastChannel()
82
-
83
- // const isLeader = yield* clientSession.lockStatus.get.pipe(Effect.map((_) => _ === 'has-lock'))
84
- // yield* webBridgeBroadcastChannel.send(Devtools.WebBridge.AppHostReady.make({ appHostId, isLeader }))
85
-
86
- const runtime = yield* Effect.runtime()
87
-
88
- // window.addEventListener('beforeunload', () =>
89
- // webBridgeBroadcastChannel
90
- // .send(Devtools.WebBridge.AppHostWillDisconnect.make({ appHostId }))
91
- // .pipe(Runtime.runFork(runtime)),
92
- // )
93
-
94
- // yield* Effect.addFinalizer(() =>
95
- // webBridgeBroadcastChannel
96
- // .send(Devtools.WebBridge.AppHostWillDisconnect.make({ appHostId }))
97
- // .pipe(Effect.ignoreLogged),
98
- // )
99
-
100
- // yield* webBridgeBroadcastChannel.listen.pipe(
101
- // Stream.flatten(),
102
- // Stream.filter(Schema.is(Devtools.WebBridge.DevtoolsReady)),
103
- // Stream.tap(({ devtoolsId }) =>
104
- // Effect.gen(function* () {
105
- // const webBridgeId = nanoid()
106
- // yield* waitForDevtoolsWebBridgePort({ webBridgeId }).pipe(
107
- // Effect.andThen(connectToDevtools),
108
- // Effect.tapCauseLogPretty,
109
- // Effect.forkScoped,
110
- // )
111
-
112
- // const isLeader = yield* clientSession.lockStatus.get.pipe(Effect.map((_) => _ === 'has-lock'))
113
- // yield* webBridgeBroadcastChannel.send(
114
- // Devtools.WebBridge.ConnectToDevtools.make({ appHostId, isLeader, devtoolsId, webBridgeId, storeId }),
115
- // )
116
- // }),
117
- // ),
118
- // Stream.runDrain,
119
- // Effect.ignoreLogged,
120
- // Effect.forkScoped,
121
- // )
122
-
123
- yield* Effect.never
124
- }).pipe(Effect.scoped)
125
-
126
- const listenToBrowserExtensionBridge = ({
127
- appHostId,
128
- connectToDevtools,
129
- }: {
130
- appHostId: string
131
- connectToDevtools: (coordinatorMessagePort: MessagePort) => Effect.Effect<void, UnexpectedError, Scope.Scope>
132
- }) =>
133
- Effect.gen(function* () {
134
- const windowChannel = yield* WebChannel.windowChannel({
135
- window,
136
- schema: {
137
- listen: Devtools.DevtoolsWindowMessage.MessageForStore,
138
- send: Devtools.DevtoolsWindowMessage.MessageForContentscript,
139
- },
140
- })
141
-
142
- yield* windowChannel.send(Devtools.DevtoolsWindowMessage.LoadIframe.make({}))
143
-
144
- yield* windowChannel.listen.pipe(
145
- Stream.flatten(),
146
- Stream.tap((message) =>
147
- Effect.gen(function* () {
148
- if (message._tag === 'LSD.WindowMessage.ContentscriptListening') {
149
- // Send message to contentscript via window (which the contentscript iframe is listening to)
150
- yield* windowChannel.send(Devtools.DevtoolsWindowMessage.StoreReady.make({ appHostId }))
151
- return
152
- }
153
-
154
- if (message.appHostId !== appHostId) return
155
-
156
- if (message._tag === 'LSD.WindowMessage.MessagePortReady') {
157
- yield* connectToDevtools(message.port)
158
- }
159
- }).pipe(Effect.ignoreLogged, Effect.forkScoped),
160
- ),
161
- Stream.runDrain,
162
- Effect.ignoreLogged,
163
- Effect.forkScoped,
164
- )
165
-
166
- yield* windowChannel.send(Devtools.DevtoolsWindowMessage.StoreReady.make({ appHostId }))
167
- })
20
+ }).pipe(Effect.withSpan('@livestore/adapter-web:client-session:devtools:logDevtoolsUrl'))
@@ -4,7 +4,12 @@ import { Devtools, IntentionalShutdownCause, StoreInterrupted, UnexpectedError }
4
4
  // NOTE We're using a non-relative import here for Vite to properly resolve the import during app builds
5
5
  // import LiveStoreSharedWorker from '@livestore/adapter-web/internal-shared-worker?sharedworker'
6
6
  import { EventId, SESSION_CHANGESET_META_TABLE } from '@livestore/common/schema'
7
- import { makeWebDevtoolsChannel } from '@livestore/devtools-web-common/web-channel'
7
+ import {
8
+ ClientSessionRequestContentscriptMain,
9
+ connectViaWorker,
10
+ makeChannelForConnectedMeshNode,
11
+ makeSessionsChannel,
12
+ } from '@livestore/devtools-web-common/web-channel'
8
13
  import { sqliteDbFactory } from '@livestore/sqlite-wasm/browser'
9
14
  import { loadSqlite3Wasm } from '@livestore/sqlite-wasm/load-wasm'
10
15
  import { isDevEnv, shouldNeverHappen, tryAsFunctionAndNew } from '@livestore/utils'
@@ -20,18 +25,20 @@ import {
20
25
  Schema,
21
26
  Stream,
22
27
  SubscriptionRef,
28
+ WebChannel,
23
29
  WebLock,
24
30
  Worker,
25
31
  WorkerError,
26
32
  } from '@livestore/utils/effect'
27
33
  import { nanoid } from '@livestore/utils/nanoid'
34
+ import * as Webmesh from '@livestore/webmesh'
28
35
 
29
36
  import * as OpfsUtils from '../../opfs-utils.js'
30
37
  import { readPersistedAppDbFromClientSession, resetPersistedDataFromClientSession } from '../common/persisted-sqlite.js'
31
38
  import { makeShutdownChannel } from '../common/shutdown-channel.js'
32
39
  import { DedicatedWorkerDisconnectBroadcast, makeWorkerDisconnectChannel } from '../common/worker-disconnect-channel.js'
33
40
  import * as WorkerSchema from '../common/worker-schema.js'
34
- import { bootDevtools } from './client-session-devtools.js'
41
+ import { logDevtoolsUrl } from './client-session-devtools.js'
35
42
 
36
43
  // NOTE we're starting to initialize the sqlite wasm binary here to speed things up
37
44
  const sqlite3Promise = loadSqlite3Wasm()
@@ -74,6 +81,16 @@ export type WebAdapterOptions = {
74
81
  * @default false
75
82
  */
76
83
  resetPersistence?: boolean
84
+ /**
85
+ * By default the adapter will initially generate a random clientId (via `nanoid(5)`),
86
+ * store it in `localStorage` and restore it for subsequent client sessions. It's the same across all tabs/windows.
87
+ */
88
+ clientId?: string
89
+ /**
90
+ * By default the adapter will initially generate a random sessionId (via `nanoid(5)`),
91
+ * store it in `sessionStorage` and restore it for subsequent client sessions in the same tab/window.
92
+ */
93
+ sessionId?: string
77
94
  }
78
95
 
79
96
  export const makeAdapter =
@@ -103,9 +120,9 @@ export const makeAdapter =
103
120
  const dataFromFile = yield* readPersistedAppDbFromClientSession({ storageOptions, storeId, schema })
104
121
 
105
122
  // The same across all client sessions (i.e. tabs, windows)
106
- const clientId = getPersistedId(`clientId:${storeId}`, 'local')
123
+ const clientId = options.clientId ?? getPersistedId(`clientId:${storeId}`, 'local')
107
124
  // Unique per client session (i.e. tab, window)
108
- const sessionId = getPersistedId(`sessionId:${storeId}`, 'session')
125
+ const sessionId = options.sessionId ?? getPersistedId(`sessionId:${storeId}`, 'session')
109
126
 
110
127
  const shutdownChannel = yield* makeShutdownChannel(storeId)
111
128
  const workerDisconnectChannel = yield* makeWorkerDisconnectChannel(storeId)
@@ -163,7 +180,7 @@ export const makeAdapter =
163
180
 
164
181
  const runLocked = Effect.gen(function* () {
165
182
  yield* Effect.logDebug(
166
- `[@livestore/adapter-web:client-session] ✅ Got lock '${LIVESTORE_TAB_LOCK}' (sessionId: ${sessionId})`,
183
+ `[@livestore/adapter-web:client-session] ✅ Got lock '${LIVESTORE_TAB_LOCK}' (clientId: ${clientId}, sessionId: ${sessionId})`,
167
184
  )
168
185
 
169
186
  yield* Effect.addFinalizer(() =>
@@ -445,22 +462,68 @@ export const makeAdapter =
445
462
  } satisfies ClientSession
446
463
 
447
464
  if (devtoolsEnabled) {
448
- // yield* bootDevtools({ client-session, waitForDevtoolsWebBridgePort, connectToDevtools, storeId })
449
465
  yield* Effect.gen(function* () {
450
466
  const sharedWorker = yield* Fiber.join(sharedWorkerFiber)
451
467
 
452
- yield* bootDevtools({ clientSession, storeId })
468
+ const webmeshNode = yield* Webmesh.makeMeshNode(`client-session-${storeId}-${clientId}-${sessionId}`)
469
+ globalThis.__debugWebmeshNode = webmeshNode
470
+
471
+ yield* logDevtoolsUrl({ clientSession, storeId })
472
+
473
+ const sessionsChannel = yield* makeSessionsChannel
474
+ const sessionInfoMessage = Devtools.SessionInfo.SessionInfo.make({ storeId, clientId, sessionId })
475
+
476
+ yield* Devtools.SessionInfo.provideSessionInfo({
477
+ webChannel: sessionsChannel,
478
+ sessionInfo: sessionInfoMessage,
479
+ }).pipe(Effect.tapCauseLogPretty, Effect.forkScoped)
480
+
481
+ yield* Effect.gen(function* () {
482
+ const clientSessionStaticChannel = yield* WebChannel.windowChannel2({
483
+ listenWindow: window,
484
+ sendWindow: window,
485
+ schema: { listen: Schema.Void, send: ClientSessionRequestContentscriptMain },
486
+ ids: { own: 'client-session-static', other: 'contentscript-main-static' },
487
+ })
453
488
 
454
- // TODO re-enable browser extension as well
455
- const storeDevtoolsChannel = yield* makeWebDevtoolsChannel({
456
- nodeName: `client-session-${storeId}-${clientId}-${sessionId}`,
489
+ yield* clientSessionStaticChannel.send(
490
+ ClientSessionRequestContentscriptMain.make({ clientId, sessionId, storeId }),
491
+ )
492
+
493
+ const contentscriptMainNodeName = `contentscript-main-${storeId}-${clientId}-${sessionId}`
494
+
495
+ const contentscriptMainChannel = yield* WebChannel.windowChannel2({
496
+ listenWindow: window,
497
+ sendWindow: window,
498
+ schema: Webmesh.WebmeshSchema.Packet,
499
+ ids: { own: webmeshNode.nodeName, other: contentscriptMainNodeName },
500
+ })
501
+
502
+ yield* webmeshNode.addConnection({
503
+ target: contentscriptMainNodeName,
504
+ connectionChannel: contentscriptMainChannel,
505
+ })
506
+ // yield* Effect.logDebug(
507
+ // `[@livestore/adapter-web:client-session] initiated connection: ${webmeshNode.nodeName} → contentscript-main`,
508
+ // )
509
+
510
+ const extensionWorkerChannel = yield* webmeshNode.makeBroadcastChannel({
511
+ channelName: 'session-info',
512
+ schema: Devtools.SessionInfo.Message,
513
+ })
514
+
515
+ yield* Devtools.SessionInfo.provideSessionInfo({
516
+ webChannel: extensionWorkerChannel,
517
+ sessionInfo: sessionInfoMessage,
518
+ })
519
+ }).pipe(Effect.tapCauseLogPretty, Effect.forkScoped)
520
+
521
+ yield* connectViaWorker({ node: webmeshNode, target: 'shared-worker', worker: sharedWorker })
522
+
523
+ const storeDevtoolsChannel = yield* makeChannelForConnectedMeshNode({
524
+ node: webmeshNode,
457
525
  target: `devtools`,
458
- schema: {
459
- listen: Devtools.ClientSession.MessageToApp,
460
- send: Devtools.ClientSession.MessageFromApp,
461
- },
462
- worker: sharedWorker,
463
- workerTargetName: 'shared-worker',
526
+ schema: { listen: Devtools.ClientSession.MessageToApp, send: Devtools.ClientSession.MessageFromApp },
464
527
  })
465
528
 
466
529
  yield* connectDevtoolsToStore(storeDevtoolsChannel)
@@ -1,9 +0,0 @@
1
- import { Effect, Schema, Scope, WebChannel } from '@livestore/utils/effect';
2
- export declare const backgroundChannel: <MsgIn, MsgOut, MsgInEncoded, MsgOutEncoded>({ schema: inputSchema, port, }: {
3
- schema: Schema.Schema<MsgIn | MsgOut, MsgInEncoded | MsgOutEncoded> | {
4
- listen: Schema.Schema<MsgIn, MsgInEncoded>;
5
- send: Schema.Schema<MsgOut, MsgOutEncoded>;
6
- };
7
- port: chrome.runtime.Port;
8
- }) => Effect.Effect<WebChannel.WebChannel<MsgIn, MsgOut>, never, Scope.Scope>;
9
- //# sourceMappingURL=background-browser-channel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"background-browser-channel.d.ts","sourceRoot":"","sources":["../../src/devtools-bridge/background-browser-channel.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,MAAM,EAAiB,MAAM,EAAE,KAAK,EAAU,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEnH,eAAO,MAAM,iBAAiB,GAAI,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,gCAG3E;IACD,MAAM,EACF,MAAM,CAAC,MAAM,CAAC,KAAK,GAAG,MAAM,EAAE,YAAY,GAAG,aAAa,CAAC,GAC3D;QAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;KAAE,CAAA;IAC9F,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAA;CAC1B,KAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CA6CvE,CAAA"}
@@ -1,31 +0,0 @@
1
- import { Chunk, Deferred, Effect, Exit, Runtime, Schema, Scope, Stream, WebChannel } from '@livestore/utils/effect';
2
- export const backgroundChannel = ({ schema: inputSchema, port, }) => Effect.scopeWithCloseable((scope) => Effect.gen(function* () {
3
- const schema = WebChannel.mapSchema(inputSchema);
4
- const send = (msg) => Effect.gen(function* () {
5
- const encoded = yield* Schema.encode(schema.send)(msg);
6
- port.postMessage(encoded);
7
- });
8
- const runtime = yield* Effect.runtime();
9
- const listen = Stream.async((emit) => {
10
- const onMessage = (message) => Effect.gen(function* () {
11
- const result = yield* Schema.decode(schema.listen)(message).pipe(Effect.either);
12
- emit(Effect.succeed(Chunk.make(result)));
13
- }).pipe(Effect.withSpan(`WebChannel:backgroundChannel:listen`), Effect.tapCauseLogPretty, Runtime.runFork(runtime));
14
- port.onMessage.addListener(onMessage);
15
- return Effect.sync(() => {
16
- port.onMessage.removeListener(onMessage);
17
- });
18
- });
19
- const closedDeferred = yield* Deferred.make().pipe(Effect.acquireRelease(Deferred.done(Exit.void)));
20
- const supportsTransferables = false;
21
- return {
22
- [WebChannel.WebChannelSymbol]: WebChannel.WebChannelSymbol,
23
- listen,
24
- send,
25
- closedDeferred,
26
- schema,
27
- supportsTransferables,
28
- shutdown: Scope.close(scope, Exit.void),
29
- };
30
- }).pipe(Effect.withSpan(`WebChannel:backgroundChannel`)));
31
- //# sourceMappingURL=background-browser-channel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"background-browser-channel.js","sourceRoot":"","sources":["../../src/devtools-bridge/background-browser-channel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEnH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAA6C,EAC5E,MAAM,EAAE,WAAW,EACnB,IAAI,GAML,EAA2E,EAAE,CAC5E,MAAM,CAAC,kBAAkB,CAAC,CAAC,KAAK,EAAE,EAAE,CAClC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,MAAM,GAAG,UAAU,CAAC,SAAS,CAAC,WAAW,CAAC,CAAA;IAEhD,MAAM,IAAI,GAAG,CAAC,GAAW,EAAE,EAAE,CAC3B,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QAClB,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAA;QACtD,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;IAC3B,CAAC,CAAC,CAAA;IAEJ,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,CAAA;IAEvC,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAA+C,CAAC,IAAI,EAAE,EAAE;QACjF,MAAM,SAAS,GAAG,CAAC,OAAY,EAAE,EAAE,CACjC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;YAClB,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;YAE/E,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QAC1C,CAAC,CAAC,CAAC,IAAI,CACL,MAAM,CAAC,QAAQ,CAAC,qCAAqC,CAAC,EACtD,MAAM,CAAC,iBAAiB,EACxB,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CACzB,CAAA;QAEH,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;QAErC,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE;YACtB,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC,CAAA;QAC1C,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,MAAM,cAAc,GAAG,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACzG,MAAM,qBAAqB,GAAG,KAAK,CAAA;IAEnC,OAAO;QACL,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,UAAU,CAAC,gBAAgB;QAC1D,MAAM;QACN,IAAI;QACJ,cAAc;QACd,MAAM;QACN,qBAAqB;QACrB,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC;KACxC,CAAA;AACH,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,8BAA8B,CAAC,CAAC,CACzD,CAAA"}
@@ -1,75 +0,0 @@
1
- import { Devtools } from '@livestore/common';
2
- import { Schema } from '@livestore/utils/effect';
3
- export declare namespace BackgroundMessage {
4
- const CopyToClipboard_base: Schema.TaggedStruct<"Background.CopyToClipboard", {
5
- text: typeof Schema.String;
6
- }>;
7
- export class CopyToClipboard extends CopyToClipboard_base {
8
- }
9
- const MessageFromAppHost_base: Schema.TaggedStruct<"Background.MessageFromAppHost", {
10
- msg: Schema.Union<[typeof Devtools.Leader.SnapshotRes, typeof Devtools.Leader.LoadDatabaseFileRes, typeof Devtools.Leader.MutationLogRes, typeof Devtools.Leader.Disconnect, typeof Devtools.Leader.SyncPull, typeof Devtools.Leader.NetworkStatusRes, typeof Devtools.Leader.RunMutationRes, typeof Devtools.Leader.Pong, typeof Devtools.Leader.DatabaseFileInfoRes, typeof Devtools.Leader.SyncHistoryRes, typeof Devtools.Leader.SyncingInfoRes, typeof Devtools.Leader.SyncHeadRes, Schema.TaggedStruct<"LSD.Leader.ResetAllData.Response", {
11
- readonly requestId: typeof Schema.String;
12
- readonly liveStoreVersion: typeof Devtools.liveStoreVersion;
13
- readonly clientId: typeof Schema.String;
14
- }>, Schema.TaggedStruct<"LSD.Leader.SetSyncLatch.Response", {
15
- readonly requestId: typeof Schema.String;
16
- readonly liveStoreVersion: typeof Devtools.liveStoreVersion;
17
- readonly clientId: typeof Schema.String;
18
- }>]>;
19
- }>;
20
- export class MessageFromAppHost extends MessageFromAppHost_base {
21
- }
22
- const MessageToAppHost_base: Schema.TaggedStruct<"Background.MessageToAppHost", {
23
- msg: Schema.Union<[typeof Devtools.Leader.SnapshotReq, typeof Devtools.Leader.LoadDatabaseFileReq, typeof Devtools.Leader.MutationLogReq, Schema.TaggedStruct<"LSD.Leader.ResetAllData.Request", {
24
- mode: Schema.Literal<["all-data", "only-app-db"]>;
25
- } & {
26
- readonly requestId: typeof Schema.String;
27
- readonly liveStoreVersion: typeof Devtools.liveStoreVersion;
28
- readonly clientId: typeof Schema.String;
29
- }>, typeof Devtools.Leader.NetworkStatusSubscribe, typeof Devtools.Leader.NetworkStatusUnsubscribe, typeof Devtools.Leader.Disconnect, typeof Devtools.Leader.RunMutationReq, typeof Devtools.Leader.Ping, typeof Devtools.Leader.DatabaseFileInfoReq, typeof Devtools.Leader.SyncHistorySubscribe, typeof Devtools.Leader.SyncHistoryUnsubscribe, typeof Devtools.Leader.SyncingInfoReq, typeof Devtools.Leader.SyncHeadSubscribe, typeof Devtools.Leader.SyncHeadUnsubscribe, Schema.TaggedStruct<"LSD.Leader.SetSyncLatch.Request", {
30
- closeLatch: typeof Schema.Boolean;
31
- } & {
32
- readonly requestId: typeof Schema.String;
33
- readonly liveStoreVersion: typeof Devtools.liveStoreVersion;
34
- readonly clientId: typeof Schema.String;
35
- }>]>;
36
- }>;
37
- export class MessageToAppHost extends MessageToAppHost_base {
38
- }
39
- const RequestPortForDevtools_base: Schema.TaggedStruct<"Background.RequestPortForDevtools", {
40
- tabId: typeof Schema.Number;
41
- }>;
42
- export class RequestPortForDevtools extends RequestPortForDevtools_base {
43
- }
44
- const RequestOneTimePortFromDevtools_base: Schema.TaggedStruct<"Background.RequestOneTimePortFromDevtools", {
45
- tabId: typeof Schema.Number;
46
- }>;
47
- export class RequestOneTimePortFromDevtools extends RequestOneTimePortFromDevtools_base {
48
- }
49
- const Disconnect_base: Schema.TaggedStruct<"Background.Disconnect", {
50
- appHostId: typeof Schema.String;
51
- }>;
52
- export class Disconnect extends Disconnect_base {
53
- }
54
- export {};
55
- }
56
- export declare namespace MessagePortInit {
57
- const PortForDevtools_base: Schema.TaggedStruct<"MessagePortInit.PortForDevtools", {
58
- port: Schema.Schema<MessagePort, MessagePort, never>;
59
- tabId: typeof Schema.Number;
60
- appHostId: typeof Schema.String;
61
- }>;
62
- /**
63
- * Message is first sent from contentscript-iframe to background and then posted to the devtools.
64
- */
65
- export class PortForDevtools extends PortForDevtools_base {
66
- }
67
- const OneTimePortFromDevtools_base: Schema.TaggedStruct<"MessagePortInit.OneTimePortFromDevtools", {
68
- port: Schema.Schema<MessagePort, MessagePort, never>;
69
- tabId: typeof Schema.Number;
70
- }>;
71
- export class OneTimePortFromDevtools extends OneTimePortFromDevtools_base {
72
- }
73
- export {};
74
- }
75
- //# sourceMappingURL=background-message.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"background-message.d.ts","sourceRoot":"","sources":["../../src/devtools-bridge/background-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAgB,MAAM,yBAAyB,CAAA;AAE9D,yBAAiB,iBAAiB,CAAC;;;;IACjC,MAAM,OAAO,eAAgB,SAAQ,oBAEnC;KAAG;;;uCAoC86Z,OAAQ,MAAM;;sCAAuF,OAAQ,MAAM;;uCAA8F,OAAQ,MAAM;;sCAAuF,OAAQ,MAAM;;;IAlCvva,MAAM,OAAO,kBAAmB,SAAQ,uBAEtC;KAAG;;;kBAgCkwX,OAAQ,OAAO;;uCAAmE,OAAQ,MAAM;;sCAAuF,OAAQ,MAAM;;+BAAiX,OAAQ,OAAO;;uCAAsC,OAAQ,MAAM;;sCAAuF,OAAQ,MAAM;;;IA9Br+Y,MAAM,OAAO,gBAAiB,SAAQ,qBAEpC;KAAG;;;;IAEL,MAAM,OAAO,sBAAuB,SAAQ,2BAE1C;KAAG;;;;IAEL,MAAM,OAAO,8BAA+B,SAAQ,mCAElD;KAAG;;;;IAEL,MAAM,OAAO,UAAW,SAAQ,eAA0E;KAAG;;CAC9G;AAED,yBAAiB,eAAe,CAAC;;;;;;IAC/B;;OAEG;IACH,MAAM,OAAO,eAAgB,SAAQ,oBAInC;KAAG;;;;;IAEL,MAAM,OAAO,uBAAwB,SAAQ,4BAG3C;KAAG;;CACN"}
@@ -1,53 +0,0 @@
1
- import { Devtools } from '@livestore/common';
2
- import { Schema, Transferable } from '@livestore/utils/effect';
3
- export var BackgroundMessage;
4
- (function (BackgroundMessage) {
5
- class CopyToClipboard extends Schema.TaggedStruct('Background.CopyToClipboard', {
6
- text: Schema.String,
7
- }) {
8
- }
9
- BackgroundMessage.CopyToClipboard = CopyToClipboard;
10
- class MessageFromAppHost extends Schema.TaggedStruct('Background.MessageFromAppHost', {
11
- msg: Devtools.Leader.MessageFromApp,
12
- }) {
13
- }
14
- BackgroundMessage.MessageFromAppHost = MessageFromAppHost;
15
- class MessageToAppHost extends Schema.TaggedStruct('Background.MessageToAppHost', {
16
- msg: Devtools.Leader.MessageToApp,
17
- }) {
18
- }
19
- BackgroundMessage.MessageToAppHost = MessageToAppHost;
20
- class RequestPortForDevtools extends Schema.TaggedStruct('Background.RequestPortForDevtools', {
21
- tabId: Schema.Number,
22
- }) {
23
- }
24
- BackgroundMessage.RequestPortForDevtools = RequestPortForDevtools;
25
- class RequestOneTimePortFromDevtools extends Schema.TaggedStruct('Background.RequestOneTimePortFromDevtools', {
26
- tabId: Schema.Number,
27
- }) {
28
- }
29
- BackgroundMessage.RequestOneTimePortFromDevtools = RequestOneTimePortFromDevtools;
30
- class Disconnect extends Schema.TaggedStruct('Background.Disconnect', { appHostId: Schema.String }) {
31
- }
32
- BackgroundMessage.Disconnect = Disconnect;
33
- })(BackgroundMessage || (BackgroundMessage = {}));
34
- export var MessagePortInit;
35
- (function (MessagePortInit) {
36
- /**
37
- * Message is first sent from contentscript-iframe to background and then posted to the devtools.
38
- */
39
- class PortForDevtools extends Schema.TaggedStruct('MessagePortInit.PortForDevtools', {
40
- port: Transferable.MessagePort,
41
- tabId: Schema.Number,
42
- appHostId: Schema.String,
43
- }) {
44
- }
45
- MessagePortInit.PortForDevtools = PortForDevtools;
46
- class OneTimePortFromDevtools extends Schema.TaggedStruct('MessagePortInit.OneTimePortFromDevtools', {
47
- port: Transferable.MessagePort,
48
- tabId: Schema.Number,
49
- }) {
50
- }
51
- MessagePortInit.OneTimePortFromDevtools = OneTimePortFromDevtools;
52
- })(MessagePortInit || (MessagePortInit = {}));
53
- //# sourceMappingURL=background-message.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"background-message.js","sourceRoot":"","sources":["../../src/devtools-bridge/background-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAE9D,MAAM,KAAW,iBAAiB,CAsBjC;AAtBD,WAAiB,iBAAiB;IAChC,MAAa,eAAgB,SAAQ,MAAM,CAAC,YAAY,CAAC,4BAA4B,EAAE;QACrF,IAAI,EAAE,MAAM,CAAC,MAAM;KACpB,CAAC;KAAG;IAFQ,iCAAe,kBAEvB,CAAA;IAEL,MAAa,kBAAmB,SAAQ,MAAM,CAAC,YAAY,CAAC,+BAA+B,EAAE;QAC3F,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,cAAc;KACpC,CAAC;KAAG;IAFQ,oCAAkB,qBAE1B,CAAA;IAEL,MAAa,gBAAiB,SAAQ,MAAM,CAAC,YAAY,CAAC,6BAA6B,EAAE;QACvF,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,YAAY;KAClC,CAAC;KAAG;IAFQ,kCAAgB,mBAExB,CAAA;IAEL,MAAa,sBAAuB,SAAQ,MAAM,CAAC,YAAY,CAAC,mCAAmC,EAAE;QACnG,KAAK,EAAE,MAAM,CAAC,MAAM;KACrB,CAAC;KAAG;IAFQ,wCAAsB,yBAE9B,CAAA;IAEL,MAAa,8BAA+B,SAAQ,MAAM,CAAC,YAAY,CAAC,2CAA2C,EAAE;QACnH,KAAK,EAAE,MAAM,CAAC,MAAM;KACrB,CAAC;KAAG;IAFQ,gDAA8B,iCAEtC,CAAA;IAEL,MAAa,UAAW,SAAQ,MAAM,CAAC,YAAY,CAAC,uBAAuB,EAAE,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;KAAG;IAAhG,4BAAU,aAAsF,CAAA;AAC/G,CAAC,EAtBgB,iBAAiB,KAAjB,iBAAiB,QAsBjC;AAED,MAAM,KAAW,eAAe,CAc/B;AAdD,WAAiB,eAAe;IAC9B;;OAEG;IACH,MAAa,eAAgB,SAAQ,MAAM,CAAC,YAAY,CAAC,iCAAiC,EAAE;QAC1F,IAAI,EAAE,YAAY,CAAC,WAAW;QAC9B,KAAK,EAAE,MAAM,CAAC,MAAM;QACpB,SAAS,EAAE,MAAM,CAAC,MAAM;KACzB,CAAC;KAAG;IAJQ,+BAAe,kBAIvB,CAAA;IAEL,MAAa,uBAAwB,SAAQ,MAAM,CAAC,YAAY,CAAC,yCAAyC,EAAE;QAC1G,IAAI,EAAE,YAAY,CAAC,WAAW;QAC9B,KAAK,EAAE,MAAM,CAAC,MAAM;KACrB,CAAC;KAAG;IAHQ,uCAAuB,0BAG/B,CAAA;AACP,CAAC,EAdgB,eAAe,KAAf,eAAe,QAc/B"}
@@ -1,14 +0,0 @@
1
- import { Devtools } from '@livestore/common';
2
- import { Deferred, Effect, PubSub } from '@livestore/utils/effect';
3
- /**
4
- * This code is running in the devtools window where it's assumed that message ports
5
- * can be transferred over the bridge.
6
- */
7
- export declare const makeShared: ({ portForDevtoolsDeferred, responsePubSub, }: {
8
- portForDevtoolsDeferred: Deferred.Deferred<MessagePort>;
9
- responsePubSub: PubSub.PubSub<Devtools.MessageFromApp | Devtools.MessageFromApp>;
10
- }) => Effect.Effect<{
11
- appHostId: string;
12
- isLeader: boolean;
13
- }, never, import("effect/Scope").Scope>;
14
- //# sourceMappingURL=bridge-shared.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bridge-shared.d.ts","sourceRoot":"","sources":["../../src/devtools-bridge/bridge-shared.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAoB,MAAM,mBAAmB,CAAA;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAA8B,MAAM,yBAAyB,CAAA;AAE9F;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAI,8CAGxB;IACD,uBAAuB,EAAE,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAA;IACvD,cAAc,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAA;CACjF;;;uCAkFG,CAAA"}
@@ -1,67 +0,0 @@
1
- // @ts-nocheck
2
- import { Devtools } from '@livestore/common';
3
- import { Deferred, Effect, PubSub, Stream, WebChannel } from '@livestore/utils/effect';
4
- /**
5
- * This code is running in the devtools window where it's assumed that message ports
6
- * can be transferred over the bridge.
7
- */
8
- export const makeShared = ({ portForDevtoolsDeferred, responsePubSub, }) => Effect.gen(function* () {
9
- const appHostInfoDeferred = yield* Deferred.make();
10
- const appHostStoreChannelDeferred = yield* Deferred.make();
11
- const portForDevtools = yield* Deferred.await(portForDevtoolsDeferred);
12
- const appHostCoordinatorChannel = yield* WebChannel.messagePortChannel({
13
- port: portForDevtools,
14
- schema: { listen: Devtools.MessageFromApp, send: Devtools.MessageToApp },
15
- });
16
- yield* appHostCoordinatorChannel.listen.pipe(Stream.flatten(),
17
- // Stream.tapLogWithLabel('appHostCoordinatorChannel.listen'),
18
- Stream.tap((msg) => Effect.gen(function* () {
19
- // if (msg._tag === 'LSD.AppHostReady') {
20
- // const { appHostId, isLeader } = msg
21
- // yield* Deferred.succeed(appHostInfoDeferred, { appHostId, isLeader })
22
- // } else if (msg._tag === 'LSD.MessagePortForStoreReq') {
23
- // Here we're "duplicating" the message port since we need one for the coordinator
24
- // and one for the store
25
- const storeMessageChannel = new MessageChannel();
26
- // yield* sendToAppHost(
27
- // Devtools.MessagePortForStoreRes.make({
28
- // // appHostId: msg.appHostId,
29
- // liveStoreVersion: msg.liveStoreVersion,
30
- // port: storeMessageChannel.port1,
31
- // requestId: msg.requestId,
32
- // }),
33
- // )
34
- // const portForAppHostStoreChannel = yield* WebChannel.messagePortChannel({
35
- // port: storeMessageChannel.port2,
36
- // schema: { listen: Devtools.MessageFromApp, send: Devtools.MessageToApp },
37
- // })
38
- // yield* portForAppHostStoreChannel.listen.pipe(
39
- // Stream.flatten(),
40
- // Stream.tap((msg) => PubSub.publish(responsePubSub, msg)),
41
- // Stream.runDrain,
42
- // Effect.withSpan('portForStoreChannel.listen'),
43
- // Effect.tapCauseLogPretty,
44
- // Effect.forkScoped,
45
- // )
46
- // yield* Deferred.succeed(appHostStoreChannelDeferred, portForAppHostStoreChannel)
47
- // } else {
48
- yield* PubSub.publish(responsePubSub, msg);
49
- // }
50
- })), Stream.runDrain, Effect.withSpan('portForDevtoolsChannel.listen'), Effect.tapCauseLogPretty, Effect.forkScoped);
51
- // Sends the message to the app host (i.e. contentscript) via the devtools panel window and the background script
52
- // const sendToAppHost: Devtools.PrepareDevtoolsBridge['sendToAppHost'] = (msg) =>
53
- // Effect.gen(function* () {
54
- // // console.log('bridge-shared: sendToAppHost', msg)
55
- // if (Schema.is(Devtools.MessageToApp)(msg)) {
56
- // yield* appHostCoordinatorChannel.send(msg)
57
- // } else {
58
- // // console.log('bridge-shared: sendToAppHostStore', msg)
59
- // const appHostStoreChannel = yield* Deferred.await(appHostStoreChannelDeferred)
60
- // yield* appHostStoreChannel.send(msg)
61
- // }
62
- // }).pipe(Effect.withSpan('sendToAppHost'), Effect.orDie)
63
- // yield* sendToAppHost(Devtools.DevtoolsReady.make({ liveStoreVersion }))
64
- const { appHostId, isLeader } = yield* Deferred.await(appHostInfoDeferred);
65
- return { appHostId, isLeader };
66
- });
67
- //# sourceMappingURL=bridge-shared.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bridge-shared.js","sourceRoot":"","sources":["../../src/devtools-bridge/bridge-shared.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,OAAO,EAAE,QAAQ,EAAoB,MAAM,mBAAmB,CAAA;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAU,MAAM,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAE9F;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,uBAAuB,EACvB,cAAc,GAIf,EAAE,EAAE,CACH,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,mBAAmB,GAAG,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,EAA4C,CAAA;IAE5F,MAAM,2BAA2B,GAC/B,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,EAEjB,CAAA;IAEL,MAAM,eAAe,GAAG,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAA;IAEtE,MAAM,yBAAyB,GAAG,KAAK,CAAC,CAAC,UAAU,CAAC,kBAAkB,CAAC;QACrE,IAAI,EAAE,eAAe;QACrB,MAAM,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,cAAc,EAAE,IAAI,EAAE,QAAQ,CAAC,YAAY,EAAE;KACzE,CAAC,CAAA;IAEF,KAAK,CAAC,CAAC,yBAAyB,CAAC,MAAM,CAAC,IAAI,CAC1C,MAAM,CAAC,OAAO,EAAE;IAChB,8DAA8D;IAC9D,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CACjB,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QAClB,yCAAyC;QACzC,sCAAsC;QACtC,wEAAwE;QACxE,0DAA0D;QAC1D,kFAAkF;QAClF,wBAAwB;QACxB,MAAM,mBAAmB,GAAG,IAAI,cAAc,EAAE,CAAA;QAEhD,wBAAwB;QACxB,2CAA2C;QAC3C,mCAAmC;QACnC,8CAA8C;QAC9C,uCAAuC;QACvC,gCAAgC;QAChC,QAAQ;QACR,IAAI;QAEJ,8EAA8E;QAC9E,uCAAuC;QACvC,gFAAgF;QAChF,OAAO;QAEP,mDAAmD;QACnD,wBAAwB;QACxB,gEAAgE;QAChE,uBAAuB;QACvB,qDAAqD;QACrD,gCAAgC;QAChC,yBAAyB;QACzB,MAAM;QAEN,qFAAqF;QACrF,WAAW;QACX,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,EAAE,GAAG,CAAC,CAAA;QAC1C,IAAI;IACN,CAAC,CAAC,CACH,EACD,MAAM,CAAC,QAAQ,EACf,MAAM,CAAC,QAAQ,CAAC,+BAA+B,CAAC,EAChD,MAAM,CAAC,iBAAiB,EACxB,MAAM,CAAC,UAAU,CAClB,CAAA;IAED,iHAAiH;IACjH,kFAAkF;IAClF,8BAA8B;IAC9B,0DAA0D;IAC1D,mDAAmD;IACnD,mDAAmD;IACnD,eAAe;IACf,iEAAiE;IACjE,uFAAuF;IACvF,6CAA6C;IAC7C,QAAQ;IACR,4DAA4D;IAE5D,0EAA0E;IAE1E,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAA;IAE1E,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAA;AAChC,CAAC,CAAC,CAAA"}
@@ -1,3 +0,0 @@
1
- import { Effect } from '@livestore/utils/effect';
2
- export declare const prepareBrowserExtensionDevtoolsBridge: Effect.Effect<void, never, never>;
3
- //# sourceMappingURL=browser-extension-bridge.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"browser-extension-bridge.d.ts","sourceRoot":"","sources":["../../src/devtools-bridge/browser-extension-bridge.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,MAAM,EAAsC,MAAM,yBAAyB,CAAA;AAQ9F,eAAO,MAAM,qCAAqC,mCAsDhD,CAAA"}