@foldkit/devtools 0.150.0 → 0.151.0-canary.4c91a3b5da2b

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.
@@ -1 +1 @@
1
- {"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../src/overlay.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,OAAO,EACP,MAAM,EAEN,OAAO,EAGP,MAAM,EAKN,MAAM,IAAI,CAAC,EAGX,eAAe,EAEhB,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,aAAa,EAGlB,KAAK,WAAW,EAChB,KAAK,UAAU,EAKhB,MAAM,uBAAuB,CAAA;AAU9B,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;;oFAsDzB,CAAC;;;;;;;;;;;;;;;;;AAqO7C,cAAM,YAAa,SAAQ,iBAE1B;CAAG;;AAEJ,cAAM,iBAAkB,SAAQ,sBAGC;CAAG;AAEpC,eAAO,MAAM,UAAU;;iBAGrB,CAAA;AAEF,eAAO,MAAM,YAAY;;iBAGvB,CAAA;AAgCF,eAAO,MAAM,oBAAoB;;;;;iBAkB/B,CAAA;AAuBF,eAAO,MAAM,gBAAgB;;;;;;;;wBAS3B,CAAA;AAEF,eAAO,MAAM,YAAY;;;;;;;;wBAIvB,CAAA;AAEF,eAAO,MAAM,aAAa;;;;;;wBAOxB,CAAA;AAEF,eAAO,MAAM,MAAM;;wBAOjB,CAAA;AAEF,eAAO,MAAM,KAAK;;wBAOhB,CAAA;AAEF,eAAO,MAAM,WAAW;;6BAUtB,CAAA;AAihEF,eAAO,MAAM,aAAa,GACxB,OAAO,aAAa,EACpB,UAAU,gBAAgB,EAC1B,MAAM,YAAY,EAClB,aAAa,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,6DAmFhC,CAAA"}
1
+ {"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../src/overlay.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,OAAO,EACP,MAAM,EAEN,OAAO,EAGP,MAAM,EAKN,MAAM,IAAI,CAAC,EAGX,eAAe,EAEhB,MAAM,QAAQ,CAAA;AAGf,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,aAAa,EAGlB,KAAK,WAAW,EAChB,KAAK,UAAU,EAKhB,MAAM,uBAAuB,CAAA;AAU9B,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;;oFAsD1D,CAAC;;;;;;;;;;;;;;;;;AA+SZ,cAAM,YAAa,SAAQ,iBAE1B;CAAG;;AAEJ,cAAM,iBAAkB,SAAQ,sBAGC;CAAG;AAEpC,eAAO,MAAM,UAAU;;iBAGrB,CAAA;AAEF,eAAO,MAAM,YAAY;;iBAGvB,CAAA;AAgCF,eAAO,MAAM,oBAAoB;;;;;iBAkB/B,CAAA;AAuBF,eAAO,MAAM,gBAAgB;;;;;;;;wBAS3B,CAAA;AAEF,eAAO,MAAM,YAAY;;;;;;;;wBAIvB,CAAA;AAEF,eAAO,MAAM,aAAa;;;;;;wBAOxB,CAAA;AAEF,eAAO,MAAM,MAAM;;wBAOjB,CAAA;AAEF,eAAO,MAAM,KAAK;;wBAOhB,CAAA;AAEF,eAAO,MAAM,WAAW;;6BAUtB,CAAA;AA+6DF,eAAO,MAAM,aAAa,GACxB,OAAO,aAAa,EACpB,UAAU,gBAAgB,EAC1B,MAAM,YAAY,EAClB,aAAa,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,6DAmFhC,CAAA"}
package/dist/overlay.js CHANGED
@@ -2,6 +2,7 @@ import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
2
  import { clsx } from 'clsx';
3
3
  import { Array as Array_, Context, Effect, Function, HashSet, Match as M, Number as Number_, Option, Order, Predicate, Queue, Record, Schema as S, Stream, String as String_, SubscriptionRef, pipe, } from 'effect';
4
4
  import { KeyValueStore } from 'effect/unstable/persistence';
5
+ import { Update } from 'foldkit';
5
6
  import * as Command from 'foldkit/command';
6
7
  import { DEVTOOLS_HOST_ID, GOT_MESSAGE_PATTERN, INIT_INDEX, extractSubmodelInfo, isTagged, latestEntryIndex, toInspectableValue, } from 'foldkit/devtools-host';
7
8
  import { lockScroll, unlockScroll } from 'foldkit/dom';
@@ -208,6 +209,52 @@ const objectPreview = (value) => __foldkitBrandViewResult((pipe(value, Record.ke
208
209
  },
209
210
  }))), "@foldkit/devtools/overlay.js#objectPreview");
210
211
  const collapsedPreview = (value) => __foldkitBrandViewResult((M.value(value).pipe(M.when(Array.isArray, array => __foldkitBrandViewResult((`(${array.length})`), "@foldkit/devtools/overlay.js#anonymous~11")), M.when(Predicate.isObject, objectPreview), M.orElse(() => __foldkitBrandViewResult((''), "@foldkit/devtools/overlay.js#anonymous~12")))), "@foldkit/devtools/overlay.js#collapsedPreview");
212
+ const foldInspectorTabsOutMessage = M.type().pipe(M.withReturnType(), M.tagsExhaustive({
213
+ Selected: ({ value }) => __foldkitBrandViewResult((model => (__foldkitBrandViewResult(({
214
+ model: evo(model, { activeInspectorTab: () => __foldkitBrandViewResult((value), "@foldkit/devtools/overlay.js#activeInspectorTab") }),
215
+ }), "@foldkit/devtools/overlay.js#anonymous~13"))), "@foldkit/devtools/overlay.js#Selected"),
216
+ }));
217
+ const foldInspectorTabs = Update.foldChild({
218
+ update: InspectorTabs.update,
219
+ read: (model) => __foldkitBrandViewResult((Option.some(model.inspectorTabs)), "@foldkit/devtools/overlay.js#read"),
220
+ write: (model, nextInspectorTabs) => __foldkitBrandViewResult((evo(model, { inspectorTabs: () => __foldkitBrandViewResult((nextInspectorTabs), "@foldkit/devtools/overlay.js#inspectorTabs") })), "@foldkit/devtools/overlay.js#write"),
221
+ toParentMessage: message => __foldkitBrandViewResult((Message.GotInspectorTabsMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage"),
222
+ foldOutMessage: foldInspectorTabsOutMessage,
223
+ });
224
+ const foldSubmodelFilterOutMessage = M.type().pipe(M.withReturnType(), M.tagsExhaustive({
225
+ Selected: ({ value }) => __foldkitBrandViewResult((model => (__foldkitBrandViewResult(({
226
+ model: evo(model, {
227
+ maybeSubmodelFilter: () => __foldkitBrandViewResult((Option.liftPredicate(value, String_.isNonEmpty)), "@foldkit/devtools/overlay.js#maybeSubmodelFilter"),
228
+ }),
229
+ }), "@foldkit/devtools/overlay.js#anonymous~14"))), "@foldkit/devtools/overlay.js#Selected~2"),
230
+ }));
231
+ const foldSubmodelFilter = Update.foldChild({
232
+ update: SubmodelFilterListbox.update,
233
+ read: (model) => __foldkitBrandViewResult((Option.some(model.submodelFilterListbox)), "@foldkit/devtools/overlay.js#read~2"),
234
+ write: (model, nextSubmodelFilterListbox) => __foldkitBrandViewResult((evo(model, {
235
+ submodelFilterListbox: () => __foldkitBrandViewResult((nextSubmodelFilterListbox), "@foldkit/devtools/overlay.js#submodelFilterListbox"),
236
+ })), "@foldkit/devtools/overlay.js#write~2"),
237
+ toParentMessage: message => __foldkitBrandViewResult((Message.GotSubmodelFilterMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage~2"),
238
+ foldOutMessage: foldSubmodelFilterOutMessage,
239
+ });
240
+ // NOTE: Pointer Messages update the thumb immediately, but jumping to and
241
+ // inspecting the corresponding state is expensive. Keep only the latest host
242
+ // index until TickedScrubFrame flushes one navigation on the next frame.
243
+ const foldScrubberSliderOutMessage = M.type().pipe(M.withReturnType(), M.tagsExhaustive({
244
+ ChangedValue: ({ value }) => __foldkitBrandViewResult((model => (__foldkitBrandViewResult(({
245
+ model: evo(model, {
246
+ scrubberValue: () => __foldkitBrandViewResult((value), "@foldkit/devtools/overlay.js#scrubberValue"),
247
+ maybePendingScrubIndex: () => __foldkitBrandViewResult((Option.some(sliderValueToHostIndex(value, model.startIndex))), "@foldkit/devtools/overlay.js#maybePendingScrubIndex"),
248
+ }),
249
+ }), "@foldkit/devtools/overlay.js#anonymous~15"))), "@foldkit/devtools/overlay.js#ChangedValue"),
250
+ }));
251
+ const foldScrubberSlider = Update.foldChild({
252
+ update: Slider.update,
253
+ read: (model) => __foldkitBrandViewResult((Option.some(model.scrubberSlider)), "@foldkit/devtools/overlay.js#read~3"),
254
+ write: (model, nextScrubberSlider) => __foldkitBrandViewResult((evo(model, { scrubberSlider: () => __foldkitBrandViewResult((nextScrubberSlider), "@foldkit/devtools/overlay.js#scrubberSlider") })), "@foldkit/devtools/overlay.js#write~3"),
255
+ toParentMessage: message => __foldkitBrandViewResult((Message.GotScrubberSliderMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage~3"),
256
+ foldOutMessage: foldScrubberSliderOutMessage,
257
+ });
211
258
  class StoreService extends Context.Service()('foldkit/DevToolsStore') {
212
259
  }
213
260
  class ShadowRootService extends Context.Service()('foldkit/DevToolsShadowRoot') {
@@ -234,8 +281,8 @@ const DEFAULT_PERSISTED_STATE = {
234
281
  const readPersistedState = Effect.gen(function* () {
235
282
  const store = yield* KeyValueStore.KeyValueStore;
236
283
  const json = yield* Effect.fromOption(Option.fromNullishOr(yield* store.get(DEVTOOLS_STORAGE_KEY)));
237
- return __foldkitBrandViewResult((yield* S.decodeEffect(DevToolsPersistedStateJson)(json)), "@foldkit/devtools/overlay.js#anonymous~13");
238
- }).pipe(Effect.catch(() => __foldkitBrandViewResult((Effect.succeed(DEFAULT_PERSISTED_STATE)), "@foldkit/devtools/overlay.js#anonymous~14")), Effect.provide(BrowserKeyValueStore.layerLocalStorage));
284
+ return __foldkitBrandViewResult((yield* S.decodeEffect(DevToolsPersistedStateJson)(json)), "@foldkit/devtools/overlay.js#anonymous~16");
285
+ }).pipe(Effect.catch(() => __foldkitBrandViewResult((Effect.succeed(DEFAULT_PERSISTED_STATE)), "@foldkit/devtools/overlay.js#anonymous~17")), Effect.provide(BrowserKeyValueStore.layerLocalStorage));
239
286
  export const PersistDevToolsState = Command.define('PersistDevToolsState', {
240
287
  args: { isOpen: S.Boolean, isFlattened: S.Boolean },
241
288
  messages: [Message.CompletedPersistDevToolsState],
@@ -246,19 +293,19 @@ export const PersistDevToolsState = Command.define('PersistDevToolsState', {
246
293
  isFlattened,
247
294
  });
248
295
  yield* store.set(DEVTOOLS_STORAGE_KEY, json);
249
- return __foldkitBrandViewResult((Message.CompletedPersistDevToolsState()), "@foldkit/devtools/overlay.js#anonymous~15");
250
- }).pipe(Effect.catch(() => __foldkitBrandViewResult((Effect.succeed(Message.CompletedPersistDevToolsState())), "@foldkit/devtools/overlay.js#anonymous~16")), Effect.provide(BrowserKeyValueStore.layerLocalStorage))), "@foldkit/devtools/overlay.js#execute"),
296
+ return __foldkitBrandViewResult((Message.CompletedPersistDevToolsState()), "@foldkit/devtools/overlay.js#anonymous~18");
297
+ }).pipe(Effect.catch(() => __foldkitBrandViewResult((Effect.succeed(Message.CompletedPersistDevToolsState())), "@foldkit/devtools/overlay.js#anonymous~19")), Effect.provide(BrowserKeyValueStore.layerLocalStorage))), "@foldkit/devtools/overlay.js#execute"),
251
298
  });
252
299
  const buildInspectionFromModel = (index, model) => __foldkitBrandViewResult((Effect.gen(function* () {
253
300
  const store = yield* StoreService;
254
301
  const maybeMessage = yield* store.getMessageAtIndex(index);
255
302
  const diff = yield* store.getDiffAtIndex(index);
256
- return __foldkitBrandViewResult((Message.ReceivedInspectedState({ model, maybeMessage, ...diff })), "@foldkit/devtools/overlay.js#anonymous~17");
303
+ return __foldkitBrandViewResult((Message.ReceivedInspectedState({ model, maybeMessage, ...diff })), "@foldkit/devtools/overlay.js#anonymous~20");
257
304
  })), "@foldkit/devtools/overlay.js#buildInspectionFromModel");
258
305
  const buildInspectionEffect = (index) => __foldkitBrandViewResult((Effect.gen(function* () {
259
306
  const store = yield* StoreService;
260
307
  const model = yield* store.getModelAtIndex(index);
261
- return __foldkitBrandViewResult((yield* buildInspectionFromModel(index, model)), "@foldkit/devtools/overlay.js#anonymous~18");
308
+ return __foldkitBrandViewResult((yield* buildInspectionFromModel(index, model)), "@foldkit/devtools/overlay.js#anonymous~21");
262
309
  })), "@foldkit/devtools/overlay.js#buildInspectionEffect");
263
310
  // NOTE: jump and inspect both need the model at `index`. Resolving it twice
264
311
  // (once to render the host, once to feed the inspector) replays the segment
@@ -272,7 +319,7 @@ export const JumpToAndInspect = Command.define('JumpToAndInspect', {
272
319
  execute: ({ index }) => __foldkitBrandViewResult((Effect.gen(function* () {
273
320
  const store = yield* StoreService;
274
321
  const model = yield* store.jumpTo(index);
275
- return __foldkitBrandViewResult((yield* buildInspectionFromModel(index, model)), "@foldkit/devtools/overlay.js#anonymous~19");
322
+ return __foldkitBrandViewResult((yield* buildInspectionFromModel(index, model)), "@foldkit/devtools/overlay.js#anonymous~22");
276
323
  })), "@foldkit/devtools/overlay.js#execute~2"),
277
324
  });
278
325
  export const InspectState = Command.define('InspectState', {
@@ -285,7 +332,7 @@ export const InspectLatest = Command.define('InspectLatest', {
285
332
  execute: Effect.gen(function* () {
286
333
  const store = yield* StoreService;
287
334
  const state = yield* SubscriptionRef.get(store.stateRef);
288
- return __foldkitBrandViewResult((yield* buildInspectionEffect(latestEntryIndex(state))), "@foldkit/devtools/overlay.js#anonymous~20");
335
+ return __foldkitBrandViewResult((yield* buildInspectionEffect(latestEntryIndex(state))), "@foldkit/devtools/overlay.js#anonymous~23");
289
336
  }),
290
337
  });
291
338
  export const Resume = Command.define('Resume', {
@@ -293,7 +340,7 @@ export const Resume = Command.define('Resume', {
293
340
  execute: Effect.gen(function* () {
294
341
  const store = yield* StoreService;
295
342
  yield* store.resume;
296
- return __foldkitBrandViewResult((Message.CompletedResume()), "@foldkit/devtools/overlay.js#anonymous~21");
343
+ return __foldkitBrandViewResult((Message.CompletedResume()), "@foldkit/devtools/overlay.js#anonymous~24");
297
344
  }),
298
345
  });
299
346
  export const Clear = Command.define('Clear', {
@@ -301,7 +348,7 @@ export const Clear = Command.define('Clear', {
301
348
  execute: Effect.gen(function* () {
302
349
  const store = yield* StoreService;
303
350
  yield* store.clear;
304
- return __foldkitBrandViewResult((Message.CompletedClear()), "@foldkit/devtools/overlay.js#anonymous~22");
351
+ return __foldkitBrandViewResult((Message.CompletedClear()), "@foldkit/devtools/overlay.js#anonymous~25");
305
352
  }),
306
353
  });
307
354
  export const ScrollToTop = Command.define('ScrollToTop', {
@@ -312,7 +359,7 @@ export const ScrollToTop = Command.define('ScrollToTop', {
312
359
  if (messageList instanceof HTMLElement) {
313
360
  messageList.scrollTop = 0;
314
361
  }
315
- return __foldkitBrandViewResult((Message.CompletedScrollToTop()), "@foldkit/devtools/overlay.js#anonymous~23");
362
+ return __foldkitBrandViewResult((Message.CompletedScrollToTop()), "@foldkit/devtools/overlay.js#anonymous~26");
316
363
  }),
317
364
  });
318
365
  const makeUpdate = (store, shadow, mode) => {
@@ -323,69 +370,71 @@ const makeUpdate = (store, shadow, mode) => {
323
370
  const scrollToTop = Command.mapEffect(ScrollToTop(), provideContext);
324
371
  const jumpToAndInspect = (index) => __foldkitBrandViewResult((Command.mapEffect(JumpToAndInspect({ index }), provideContext)), "@foldkit/devtools/overlay.js#jumpToAndInspect");
325
372
  const inspectState = (index) => __foldkitBrandViewResult((Command.mapEffect(InspectState({ index }), provideContext)), "@foldkit/devtools/overlay.js#inspectState");
326
- return __foldkitBrandViewResult(((model, message) => __foldkitBrandViewResult((M.value(message).pipe(M.withReturnType(), M.tags({
373
+ return __foldkitBrandViewResult(((model, message) => __foldkitBrandViewResult((Message.match(message, {
327
374
  ClickedToggle: () => {
328
375
  const nextIsOpen = !model.isOpen;
329
- return __foldkitBrandViewResult(([
330
- evo(model, { isOpen: () => __foldkitBrandViewResult((nextIsOpen), "@foldkit/devtools/overlay.js#isOpen") }),
331
- [
376
+ return __foldkitBrandViewResult(({
377
+ model: evo(model, { isOpen: () => __foldkitBrandViewResult((nextIsOpen), "@foldkit/devtools/overlay.js#isOpen") }),
378
+ commands: [
332
379
  ...Option.toArray(maybeToggleScrollLock(model.isMobile, nextIsOpen)),
333
380
  PersistDevToolsState({
334
381
  isOpen: nextIsOpen,
335
382
  isFlattened: model.isFlattened,
336
383
  }),
337
384
  ],
338
- ]), "@foldkit/devtools/overlay.js#ClickedToggle");
385
+ }), "@foldkit/devtools/overlay.js#ClickedToggle");
339
386
  },
340
- ClickedSettingsToggle: () => __foldkitBrandViewResult(([
341
- evo(model, {
342
- screen: currentScreen => __foldkitBrandViewResult((M.value(currentScreen).pipe(M.withReturnType(), M.when('Messages', () => __foldkitBrandViewResult(('Settings'), "@foldkit/devtools/overlay.js#anonymous~25")), M.when('Settings', () => __foldkitBrandViewResult(('Messages'), "@foldkit/devtools/overlay.js#anonymous~26")), M.exhaustive)), "@foldkit/devtools/overlay.js#screen"),
387
+ ClickedSettingsToggle: () => (__foldkitBrandViewResult(({
388
+ model: evo(model, {
389
+ screen: currentScreen => __foldkitBrandViewResult((M.value(currentScreen).pipe(M.withReturnType(), M.when('Messages', () => __foldkitBrandViewResult(('Settings'), "@foldkit/devtools/overlay.js#anonymous~28")), M.when('Settings', () => __foldkitBrandViewResult(('Messages'), "@foldkit/devtools/overlay.js#anonymous~29")), M.exhaustive)), "@foldkit/devtools/overlay.js#screen"),
343
390
  }),
344
- [],
345
- ]), "@foldkit/devtools/overlay.js#ClickedSettingsToggle"),
346
- ToggledFlatten: ({ isFlattened }) => __foldkitBrandViewResult(([
347
- evo(model, { isFlattened: () => __foldkitBrandViewResult((isFlattened), "@foldkit/devtools/overlay.js#isFlattened") }),
348
- [PersistDevToolsState({ isOpen: model.isOpen, isFlattened })],
349
- ]), "@foldkit/devtools/overlay.js#ToggledFlatten"),
350
- CrossedMobileBreakpoint: ({ isMobile }) => __foldkitBrandViewResult(([
351
- evo(model, { isMobile: () => __foldkitBrandViewResult((isMobile), "@foldkit/devtools/overlay.js#isMobile") }),
352
- Option.toArray(maybeToggleScrollLock(model.isOpen, isMobile)),
353
- ]), "@foldkit/devtools/overlay.js#CrossedMobileBreakpoint"),
354
- ClickedRow: ({ index }) => __foldkitBrandViewResult((M.value(mode).pipe(M.withReturnType(), M.when('TimeTravel', () => __foldkitBrandViewResult(([model, [jumpToAndInspect(index)]]), "@foldkit/devtools/overlay.js#anonymous~27")), M.when('Inspect', () => __foldkitBrandViewResult(([
355
- evo(model, {
391
+ }), "@foldkit/devtools/overlay.js#ClickedSettingsToggle")),
392
+ ToggledFlatten: ({ isFlattened }) => (__foldkitBrandViewResult(({
393
+ model: evo(model, { isFlattened: () => __foldkitBrandViewResult((isFlattened), "@foldkit/devtools/overlay.js#isFlattened") }),
394
+ commands: [PersistDevToolsState({ isOpen: model.isOpen, isFlattened })],
395
+ }), "@foldkit/devtools/overlay.js#ToggledFlatten")),
396
+ CrossedMobileBreakpoint: ({ isMobile }) => (__foldkitBrandViewResult(({
397
+ model: evo(model, { isMobile: () => __foldkitBrandViewResult((isMobile), "@foldkit/devtools/overlay.js#isMobile") }),
398
+ commands: Option.toArray(maybeToggleScrollLock(model.isOpen, isMobile)),
399
+ }), "@foldkit/devtools/overlay.js#CrossedMobileBreakpoint")),
400
+ ClickedRow: ({ index }) => __foldkitBrandViewResult((M.value(mode).pipe(M.withReturnType(), M.when('TimeTravel', () => (__foldkitBrandViewResult(({
401
+ model,
402
+ commands: [jumpToAndInspect(index)],
403
+ }), "@foldkit/devtools/overlay.js#anonymous~30"))), M.when('Inspect', () => (__foldkitBrandViewResult(({
404
+ model: evo(model, {
356
405
  selectedIndex: () => __foldkitBrandViewResult((index), "@foldkit/devtools/overlay.js#selectedIndex"),
357
406
  isFollowingLatest: () => __foldkitBrandViewResult((false), "@foldkit/devtools/overlay.js#isFollowingLatest"),
358
407
  }),
359
- [inspectState(index)],
360
- ]), "@foldkit/devtools/overlay.js#anonymous~28")), M.exhaustive)), "@foldkit/devtools/overlay.js#ClickedRow"),
361
- ClickedResume: () => __foldkitBrandViewResult(([
362
- evo(model, {
408
+ commands: [inspectState(index)],
409
+ }), "@foldkit/devtools/overlay.js#anonymous~31"))), M.exhaustive)), "@foldkit/devtools/overlay.js#ClickedRow"),
410
+ ClickedResume: () => (__foldkitBrandViewResult(({
411
+ model: evo(model, {
363
412
  isFollowingTop: () => __foldkitBrandViewResult((true), "@foldkit/devtools/overlay.js#isFollowingTop"),
364
413
  expandedPaths: () => __foldkitBrandViewResult((HashSet.empty()), "@foldkit/devtools/overlay.js#expandedPaths"),
365
414
  changedPaths: () => __foldkitBrandViewResult((HashSet.empty()), "@foldkit/devtools/overlay.js#changedPaths"),
366
415
  affectedPaths: () => __foldkitBrandViewResult((HashSet.empty()), "@foldkit/devtools/overlay.js#affectedPaths"),
367
416
  }),
368
- [resume, inspectLatest, scrollToTop],
369
- ]), "@foldkit/devtools/overlay.js#ClickedResume"),
370
- ClickedClear: () => __foldkitBrandViewResult(([
371
- evo(model, {
417
+ commands: [resume, inspectLatest, scrollToTop],
418
+ }), "@foldkit/devtools/overlay.js#ClickedResume")),
419
+ ClickedClear: () => (__foldkitBrandViewResult(({
420
+ model: evo(model, {
372
421
  selectedIndex: () => __foldkitBrandViewResult((INIT_INDEX), "@foldkit/devtools/overlay.js#selectedIndex~2"),
373
422
  isFollowingLatest: () => __foldkitBrandViewResult((true), "@foldkit/devtools/overlay.js#isFollowingLatest~2"),
374
423
  isFollowingTop: () => __foldkitBrandViewResult((true), "@foldkit/devtools/overlay.js#isFollowingTop~2"),
375
- maybeSubmodelFilter: () => __foldkitBrandViewResult((Option.none()), "@foldkit/devtools/overlay.js#maybeSubmodelFilter"),
424
+ maybeSubmodelFilter: () => __foldkitBrandViewResult((Option.none()), "@foldkit/devtools/overlay.js#maybeSubmodelFilter~2"),
376
425
  expandedPaths: () => __foldkitBrandViewResult((HashSet.empty()), "@foldkit/devtools/overlay.js#expandedPaths~2"),
377
426
  changedPaths: () => __foldkitBrandViewResult((HashSet.empty()), "@foldkit/devtools/overlay.js#changedPaths~2"),
378
427
  affectedPaths: () => __foldkitBrandViewResult((HashSet.empty()), "@foldkit/devtools/overlay.js#affectedPaths~2"),
379
428
  }),
380
- [clear, inspectLatest, scrollToTop],
381
- ]), "@foldkit/devtools/overlay.js#ClickedClear"),
429
+ commands: [clear, inspectLatest, scrollToTop],
430
+ }), "@foldkit/devtools/overlay.js#ClickedClear")),
382
431
  ClickedFollowLatest: () => {
383
432
  const latestIndex = Array_.match(model.entries, {
384
433
  onEmpty: () => __foldkitBrandViewResult((INIT_INDEX), "@foldkit/devtools/overlay.js#onEmpty~2"),
385
434
  onNonEmpty: () => __foldkitBrandViewResult((model.startIndex + model.entries.length - 1), "@foldkit/devtools/overlay.js#onNonEmpty~2"),
386
435
  });
387
- return __foldkitBrandViewResult(([
388
- evo(model, {
436
+ return __foldkitBrandViewResult(({
437
+ model: evo(model, {
389
438
  selectedIndex: () => __foldkitBrandViewResult((latestIndex), "@foldkit/devtools/overlay.js#selectedIndex~3"),
390
439
  isFollowingLatest: () => __foldkitBrandViewResult((true), "@foldkit/devtools/overlay.js#isFollowingLatest~3"),
391
440
  isFollowingTop: () => __foldkitBrandViewResult((true), "@foldkit/devtools/overlay.js#isFollowingTop~3"),
@@ -393,69 +442,52 @@ const makeUpdate = (store, shadow, mode) => {
393
442
  changedPaths: () => __foldkitBrandViewResult((HashSet.empty()), "@foldkit/devtools/overlay.js#changedPaths~3"),
394
443
  affectedPaths: () => __foldkitBrandViewResult((HashSet.empty()), "@foldkit/devtools/overlay.js#affectedPaths~3"),
395
444
  }),
396
- [inspectLatest, scrollToTop],
397
- ]), "@foldkit/devtools/overlay.js#ClickedFollowLatest");
445
+ commands: [inspectLatest, scrollToTop],
446
+ }), "@foldkit/devtools/overlay.js#ClickedFollowLatest");
398
447
  },
399
- ClickedScrollToTopPill: () => __foldkitBrandViewResult(([
400
- evo(model, {
448
+ ClickedScrollToTopPill: () => (__foldkitBrandViewResult(({
449
+ model: evo(model, {
401
450
  isFollowingTop: () => __foldkitBrandViewResult((true), "@foldkit/devtools/overlay.js#isFollowingTop~4"),
402
451
  }),
403
- [scrollToTop],
404
- ]), "@foldkit/devtools/overlay.js#ClickedScrollToTopPill"),
452
+ commands: [scrollToTop],
453
+ }), "@foldkit/devtools/overlay.js#ClickedScrollToTopPill")),
405
454
  ScrolledMessageList: ({ scrollTop }) => {
406
455
  const isAtTop = scrollTop <= SCROLL_FOLLOW_THRESHOLD_PX;
407
456
  return __foldkitBrandViewResult((isAtTop === model.isFollowingTop
408
- ? [model, []]
409
- : [evo(model, { isFollowingTop: () => __foldkitBrandViewResult((isAtTop), "@foldkit/devtools/overlay.js#isFollowingTop~5") }), []]), "@foldkit/devtools/overlay.js#ScrolledMessageList");
457
+ ? { model }
458
+ : { model: evo(model, { isFollowingTop: () => __foldkitBrandViewResult((isAtTop), "@foldkit/devtools/overlay.js#isFollowingTop~5") }) }), "@foldkit/devtools/overlay.js#ScrolledMessageList");
410
459
  },
411
- ReceivedInspectedState: ({ model: inspectedModel, maybeMessage, changedPaths, affectedPaths, }) => __foldkitBrandViewResult(([
412
- evo(model, {
460
+ ReceivedInspectedState: ({ model: inspectedModel, maybeMessage, changedPaths, affectedPaths, }) => (__foldkitBrandViewResult(({
461
+ model: evo(model, {
413
462
  maybeInspectedModel: () => __foldkitBrandViewResult((Option.some(inspectedModel)), "@foldkit/devtools/overlay.js#maybeInspectedModel"),
414
463
  maybeInspectedMessage: () => __foldkitBrandViewResult((maybeMessage), "@foldkit/devtools/overlay.js#maybeInspectedMessage"),
415
464
  changedPaths: () => __foldkitBrandViewResult((changedPaths), "@foldkit/devtools/overlay.js#changedPaths~4"),
416
465
  affectedPaths: () => __foldkitBrandViewResult((affectedPaths), "@foldkit/devtools/overlay.js#affectedPaths~4"),
417
466
  }),
418
- [],
419
- ]), "@foldkit/devtools/overlay.js#ReceivedInspectedState"),
420
- GotInspectorTabsMessage: ({ message: tabsMessage }) => {
421
- const [nextTabsModel, tabsCommands, maybeOutMessage] = InspectorTabs.update(model.inspectorTabs, tabsMessage);
422
- const nextActiveInspectorTab = Option.match(maybeOutMessage, {
423
- onNone: () => __foldkitBrandViewResult((model.activeInspectorTab), "@foldkit/devtools/overlay.js#onNone"),
424
- onSome: M.type().pipe(M.tagsExhaustive({
425
- Selected: ({ value }) => __foldkitBrandViewResult((value), "@foldkit/devtools/overlay.js#Selected"),
426
- })),
427
- });
428
- return __foldkitBrandViewResult(([
429
- evo(model, {
430
- inspectorTabs: () => __foldkitBrandViewResult((nextTabsModel), "@foldkit/devtools/overlay.js#inspectorTabs"),
431
- activeInspectorTab: () => __foldkitBrandViewResult((nextActiveInspectorTab), "@foldkit/devtools/overlay.js#activeInspectorTab"),
432
- }),
433
- Command.mapMessages(tabsCommands, message => __foldkitBrandViewResult((Message.GotInspectorTabsMessage({ message })), "@foldkit/devtools/overlay.js#anonymous~29")),
434
- ]), "@foldkit/devtools/overlay.js#GotInspectorTabsMessage");
435
- },
436
- ToggledTreeNode: ({ path }) => __foldkitBrandViewResult(([
437
- evo(model, {
467
+ }), "@foldkit/devtools/overlay.js#ReceivedInspectedState")),
468
+ GotInspectorTabsMessage: ({ message: tabsMessage }) => __foldkitBrandViewResult((foldInspectorTabs(model, tabsMessage)), "@foldkit/devtools/overlay.js#GotInspectorTabsMessage"),
469
+ ToggledTreeNode: ({ path }) => (__foldkitBrandViewResult(({
470
+ model: evo(model, {
438
471
  expandedPaths: paths => __foldkitBrandViewResult((HashSet.has(paths, path)
439
472
  ? HashSet.remove(paths, path)
440
473
  : HashSet.add(paths, path)), "@foldkit/devtools/overlay.js#expandedPaths~4"),
441
474
  }),
442
- [],
443
- ]), "@foldkit/devtools/overlay.js#ToggledTreeNode"),
475
+ }), "@foldkit/devtools/overlay.js#ToggledTreeNode")),
444
476
  ReceivedStoreUpdate: ({ entries, initCommands, initMountStarts, startIndex, isPaused, pausedAtIndex, }) => {
445
- const shouldFollowSelection = M.value(mode).pipe(M.when('TimeTravel', () => __foldkitBrandViewResult((!isPaused), "@foldkit/devtools/overlay.js#anonymous~30")), M.when('Inspect', () => __foldkitBrandViewResult((model.isFollowingLatest), "@foldkit/devtools/overlay.js#anonymous~31")), M.exhaustive);
446
- const shouldFollowScroll = M.value(mode).pipe(M.when('TimeTravel', () => __foldkitBrandViewResult((!isPaused && model.isFollowingTop), "@foldkit/devtools/overlay.js#anonymous~32")), M.when('Inspect', () => __foldkitBrandViewResult((model.isFollowingTop), "@foldkit/devtools/overlay.js#anonymous~33")), M.exhaustive);
477
+ const shouldFollowSelection = M.value(mode).pipe(M.when('TimeTravel', () => __foldkitBrandViewResult((!isPaused), "@foldkit/devtools/overlay.js#anonymous~32")), M.when('Inspect', () => __foldkitBrandViewResult((model.isFollowingLatest), "@foldkit/devtools/overlay.js#anonymous~33")), M.exhaustive);
478
+ const shouldFollowScroll = M.value(mode).pipe(M.when('TimeTravel', () => __foldkitBrandViewResult((!isPaused && model.isFollowingTop), "@foldkit/devtools/overlay.js#anonymous~34")), M.when('Inspect', () => __foldkitBrandViewResult((model.isFollowingTop), "@foldkit/devtools/overlay.js#anonymous~35")), M.exhaustive);
447
479
  const latestIndex = Array_.match(entries, {
448
480
  onEmpty: () => __foldkitBrandViewResult((INIT_INDEX), "@foldkit/devtools/overlay.js#onEmpty~3"),
449
481
  onNonEmpty: () => __foldkitBrandViewResult((startIndex + entries.length - 1), "@foldkit/devtools/overlay.js#onNonEmpty~3"),
450
482
  });
451
483
  const nextSubmodelTags = computeSubmodelTags(entries);
452
- const isFilterStale = Option.exists(model.maybeSubmodelFilter, filterTag => __foldkitBrandViewResult((!Array_.contains(nextSubmodelTags, filterTag)), "@foldkit/devtools/overlay.js#anonymous~34"));
484
+ const isFilterStale = Option.exists(model.maybeSubmodelFilter, filterTag => __foldkitBrandViewResult((!Array_.contains(nextSubmodelTags, filterTag)), "@foldkit/devtools/overlay.js#anonymous~36"));
453
485
  const sliderMax = entries.length;
454
486
  const targetSliderValue = isPaused
455
487
  ? hostIndexToSliderValue(pausedAtIndex, startIndex)
456
488
  : sliderMax;
457
- return __foldkitBrandViewResult(([
458
- evo(model, {
489
+ return __foldkitBrandViewResult(({
490
+ model: evo(model, {
459
491
  entries: () => __foldkitBrandViewResult((entries), "@foldkit/devtools/overlay.js#entries"),
460
492
  initCommands: () => __foldkitBrandViewResult((initCommands), "@foldkit/devtools/overlay.js#initCommands"),
461
493
  initMountStarts: () => __foldkitBrandViewResult((initMountStarts), "@foldkit/devtools/overlay.js#initMountStarts"),
@@ -463,100 +495,61 @@ const makeUpdate = (store, shadow, mode) => {
463
495
  isPaused: () => __foldkitBrandViewResult((isPaused), "@foldkit/devtools/overlay.js#isPaused"),
464
496
  pausedAtIndex: () => __foldkitBrandViewResult((pausedAtIndex), "@foldkit/devtools/overlay.js#pausedAtIndex"),
465
497
  submodelTags: () => __foldkitBrandViewResult((nextSubmodelTags), "@foldkit/devtools/overlay.js#submodelTags"),
466
- maybeSubmodelFilter: current => __foldkitBrandViewResult((isFilterStale ? Option.none() : current), "@foldkit/devtools/overlay.js#maybeSubmodelFilter~2"),
498
+ maybeSubmodelFilter: current => __foldkitBrandViewResult((isFilterStale ? Option.none() : current), "@foldkit/devtools/overlay.js#maybeSubmodelFilter~3"),
467
499
  selectedIndex: current => __foldkitBrandViewResult((shouldFollowSelection ? latestIndex : current), "@foldkit/devtools/overlay.js#selectedIndex~4"),
468
- scrubberSlider: current => __foldkitBrandViewResult((Slider.reflectRange(current, { min: 0, max: sliderMax })), "@foldkit/devtools/overlay.js#scrubberSlider"),
469
- scrubberValue: current => __foldkitBrandViewResult((M.value(model.scrubberSlider.dragState).pipe(M.tag('Dragging', () => __foldkitBrandViewResult((Slider.snapAndClamp(current, 0, sliderMax, 1)), "@foldkit/devtools/overlay.js#anonymous~35")), M.orElse(() => __foldkitBrandViewResult((Slider.snapAndClamp(targetSliderValue, 0, sliderMax, 1)), "@foldkit/devtools/overlay.js#anonymous~36")))), "@foldkit/devtools/overlay.js#scrubberValue"),
500
+ scrubberSlider: current => __foldkitBrandViewResult((Slider.reflectRange(current, { min: 0, max: sliderMax })), "@foldkit/devtools/overlay.js#scrubberSlider~2"),
501
+ scrubberValue: current => __foldkitBrandViewResult((M.value(model.scrubberSlider.dragState).pipe(M.tag('Dragging', () => __foldkitBrandViewResult((Slider.snapAndClamp(current, 0, sliderMax, 1)), "@foldkit/devtools/overlay.js#anonymous~37")), M.orElse(() => __foldkitBrandViewResult((Slider.snapAndClamp(targetSliderValue, 0, sliderMax, 1)), "@foldkit/devtools/overlay.js#anonymous~38")))), "@foldkit/devtools/overlay.js#scrubberValue~2"),
470
502
  }),
471
- [
503
+ commands: [
472
504
  ...(shouldFollowSelection ? [inspectLatest] : []),
473
505
  ...(shouldFollowScroll ? [scrollToTop] : []),
474
506
  ],
475
- ]), "@foldkit/devtools/overlay.js#ReceivedStoreUpdate");
476
- },
477
- GotSubmodelFilterMessage: ({ message: listboxMessage }) => {
478
- const [nextListboxModel, listboxCommands, maybeOutMessage] = SubmodelFilterListbox.update(model.submodelFilterListbox, listboxMessage);
479
- const mappedCommands = Command.mapMessages(listboxCommands, message => __foldkitBrandViewResult((Message.GotSubmodelFilterMessage({ message })), "@foldkit/devtools/overlay.js#anonymous~37"));
480
- return __foldkitBrandViewResult((Option.match(maybeOutMessage, {
481
- onNone: () => __foldkitBrandViewResult(([
482
- evo(model, { submodelFilterListbox: () => __foldkitBrandViewResult((nextListboxModel), "@foldkit/devtools/overlay.js#submodelFilterListbox") }),
483
- mappedCommands,
484
- ]), "@foldkit/devtools/overlay.js#onNone~2"),
485
- onSome: M.type().pipe(M.withReturnType(), M.tagsExhaustive({
486
- Selected: ({ value }) => __foldkitBrandViewResult(([
487
- evo(model, {
488
- maybeSubmodelFilter: () => __foldkitBrandViewResult((Option.liftPredicate(value, String_.isNonEmpty)), "@foldkit/devtools/overlay.js#maybeSubmodelFilter~3"),
489
- submodelFilterListbox: () => __foldkitBrandViewResult((nextListboxModel), "@foldkit/devtools/overlay.js#submodelFilterListbox~2"),
490
- }),
491
- mappedCommands,
492
- ]), "@foldkit/devtools/overlay.js#Selected~2"),
493
- })),
494
- })), "@foldkit/devtools/overlay.js#GotSubmodelFilterMessage");
495
- },
496
- GotScrubberSliderMessage: ({ message: sliderMessage }) => {
497
- const [nextSlider, sliderCommands, maybeOutMessage] = Slider.update(model.scrubberSlider, sliderMessage);
498
- const mappedSliderCommands = Command.mapMessages(sliderCommands, message => __foldkitBrandViewResult((Message.GotScrubberSliderMessage({ message })), "@foldkit/devtools/overlay.js#anonymous~38"));
499
- // NOTE: the thumb tracks every pointermove (cheap, model-only via
500
- // `nextSlider`), but the heavy jump-plus-inspect is coalesced to one
501
- // navigation per animation frame. Each `ChangedValue` overwrites the
502
- // pending host index; the `TickedScrubFrame` subscription flushes the
503
- // latest on the next frame, so a fast drag can't enqueue jumps faster
504
- // than they complete.
505
- const nextMaybePendingScrubIndex = Option.match(maybeOutMessage, {
506
- onNone: () => __foldkitBrandViewResult((model.maybePendingScrubIndex), "@foldkit/devtools/overlay.js#onNone~3"),
507
- onSome: M.type().pipe(M.tagsExhaustive({
508
- ChangedValue: ({ value }) => __foldkitBrandViewResult((Option.some(sliderValueToHostIndex(value, model.startIndex))), "@foldkit/devtools/overlay.js#ChangedValue"),
509
- })),
510
- });
511
- const nextScrubberValue = Option.match(maybeOutMessage, {
512
- onNone: () => __foldkitBrandViewResult((model.scrubberValue), "@foldkit/devtools/overlay.js#onNone~4"),
513
- onSome: M.type().pipe(M.tagsExhaustive({
514
- ChangedValue: ({ value }) => __foldkitBrandViewResult((value), "@foldkit/devtools/overlay.js#ChangedValue~2"),
515
- })),
516
- });
517
- return __foldkitBrandViewResult(([
518
- evo(model, {
519
- scrubberSlider: () => __foldkitBrandViewResult((nextSlider), "@foldkit/devtools/overlay.js#scrubberSlider~2"),
520
- scrubberValue: () => __foldkitBrandViewResult((nextScrubberValue), "@foldkit/devtools/overlay.js#scrubberValue~2"),
521
- maybePendingScrubIndex: () => __foldkitBrandViewResult((nextMaybePendingScrubIndex), "@foldkit/devtools/overlay.js#maybePendingScrubIndex"),
522
- }),
523
- mappedSliderCommands,
524
- ]), "@foldkit/devtools/overlay.js#GotScrubberSliderMessage");
507
+ }), "@foldkit/devtools/overlay.js#ReceivedStoreUpdate");
525
508
  },
509
+ GotSubmodelFilterMessage: ({ message: listboxMessage }) => __foldkitBrandViewResult((foldSubmodelFilter(model, listboxMessage)), "@foldkit/devtools/overlay.js#GotSubmodelFilterMessage"),
510
+ GotScrubberSliderMessage: ({ message: sliderMessage }) => __foldkitBrandViewResult((foldScrubberSlider(model, sliderMessage)), "@foldkit/devtools/overlay.js#GotScrubberSliderMessage"),
526
511
  TickedScrubFrame: () => __foldkitBrandViewResult((Option.match(model.maybePendingScrubIndex, {
527
- onNone: () => __foldkitBrandViewResult(([model, []]), "@foldkit/devtools/overlay.js#onNone~5"),
528
- onSome: (hostIndex) => __foldkitBrandViewResult(([
529
- evo(model, { maybePendingScrubIndex: () => __foldkitBrandViewResult((Option.none()), "@foldkit/devtools/overlay.js#maybePendingScrubIndex~2") }),
530
- [jumpToAndInspect(hostIndex)],
531
- ]), "@foldkit/devtools/overlay.js#onSome"),
512
+ onNone: () => (__foldkitBrandViewResult(({ model }), "@foldkit/devtools/overlay.js#onNone")),
513
+ onSome: (hostIndex) => (__foldkitBrandViewResult(({
514
+ model: evo(model, {
515
+ maybePendingScrubIndex: () => __foldkitBrandViewResult((Option.none()), "@foldkit/devtools/overlay.js#maybePendingScrubIndex~2"),
516
+ }),
517
+ commands: [jumpToAndInspect(hostIndex)],
518
+ }), "@foldkit/devtools/overlay.js#onSome")),
532
519
  })), "@foldkit/devtools/overlay.js#TickedScrubFrame"),
533
- }), M.tag('CompletedResume', 'CompletedClear', 'CompletedPersistDevToolsState', 'CompletedLockScroll', 'CompletedUnlockScroll', 'CompletedScrollToTop', () => __foldkitBrandViewResult(([model, []]), "@foldkit/devtools/overlay.js#anonymous~39")), M.exhaustive)), "@foldkit/devtools/overlay.js#anonymous~24")), "@foldkit/devtools/overlay.js#makeUpdate");
520
+ CompletedResume: () => (__foldkitBrandViewResult(({ model }), "@foldkit/devtools/overlay.js#CompletedResume")),
521
+ CompletedClear: () => (__foldkitBrandViewResult(({ model }), "@foldkit/devtools/overlay.js#CompletedClear")),
522
+ CompletedPersistDevToolsState: () => (__foldkitBrandViewResult(({ model }), "@foldkit/devtools/overlay.js#CompletedPersistDevToolsState")),
523
+ CompletedLockScroll: () => (__foldkitBrandViewResult(({ model }), "@foldkit/devtools/overlay.js#CompletedLockScroll")),
524
+ CompletedUnlockScroll: () => (__foldkitBrandViewResult(({ model }), "@foldkit/devtools/overlay.js#CompletedUnlockScroll")),
525
+ CompletedScrollToTop: () => (__foldkitBrandViewResult(({ model }), "@foldkit/devtools/overlay.js#CompletedScrollToTop")),
526
+ })), "@foldkit/devtools/overlay.js#anonymous~27")), "@foldkit/devtools/overlay.js#makeUpdate");
534
527
  };
535
528
  // SUBSCRIPTION
536
529
  const makeOverlaySubscriptions = (store, shadow) => {
537
- const sliderSubscriptions = Slider.subscriptionsForRoot(() => __foldkitBrandViewResult((shadow), "@foldkit/devtools/overlay.js#anonymous~40"));
530
+ const sliderSubscriptions = Slider.subscriptionsForRoot(() => __foldkitBrandViewResult((shadow), "@foldkit/devtools/overlay.js#anonymous~39"));
538
531
  const scrubberSubscriptions = Subscription.lift({
539
532
  scrubberPointer: sliderSubscriptions.dragPointer,
540
533
  scrubberEscape: sliderSubscriptions.dragEscape,
541
534
  })({
542
535
  toChildModel: model => __foldkitBrandViewResult((model.scrubberSlider), "@foldkit/devtools/overlay.js#toChildModel"),
543
- toParentMessage: message => __foldkitBrandViewResult((Message.GotScrubberSliderMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage"),
536
+ toParentMessage: message => __foldkitBrandViewResult((Message.GotScrubberSliderMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage~4"),
544
537
  });
545
538
  const ownSubscriptions = Subscription.make()(_entry => (__foldkitBrandViewResult(({
546
539
  scrubFrame: Subscription.animationFrame({
547
540
  isActive: model => __foldkitBrandViewResult((Option.isSome(model.maybePendingScrubIndex)), "@foldkit/devtools/overlay.js#isActive"),
548
541
  toMessage: () => __foldkitBrandViewResult((Message.TickedScrubFrame()), "@foldkit/devtools/overlay.js#toMessage"),
549
542
  }),
550
- storeUpdates: Subscription.persistent(Stream.concat(Stream.fromEffect(SubscriptionRef.get(store.stateRef).pipe(Effect.map(state => __foldkitBrandViewResult((Message.ReceivedStoreUpdate(toDisplayState(state))), "@foldkit/devtools/overlay.js#anonymous~42")))), Stream.map(SubscriptionRef.changes(store.stateRef), state => __foldkitBrandViewResult((Message.ReceivedStoreUpdate(toDisplayState(state))), "@foldkit/devtools/overlay.js#anonymous~43")))),
543
+ storeUpdates: Subscription.persistent(Stream.concat(Stream.fromEffect(SubscriptionRef.get(store.stateRef).pipe(Effect.map(state => __foldkitBrandViewResult((Message.ReceivedStoreUpdate(toDisplayState(state))), "@foldkit/devtools/overlay.js#anonymous~41")))), Stream.map(SubscriptionRef.changes(store.stateRef), state => __foldkitBrandViewResult((Message.ReceivedStoreUpdate(toDisplayState(state))), "@foldkit/devtools/overlay.js#anonymous~42")))),
551
544
  mobileBreakpoint: Subscription.persistent(Stream.callback(queue => __foldkitBrandViewResult((Effect.acquireRelease(Effect.sync(() => {
552
545
  const mediaQuery = window.matchMedia(MOBILE_BREAKPOINT_QUERY);
553
546
  const handler = (event) => {
554
547
  Queue.offerUnsafe(queue, Message.CrossedMobileBreakpoint({ isMobile: event.matches }));
555
548
  };
556
549
  mediaQuery.addEventListener('change', handler);
557
- return __foldkitBrandViewResult(({ mediaQuery, handler }), "@foldkit/devtools/overlay.js#anonymous~45");
558
- }), ({ mediaQuery, handler }) => __foldkitBrandViewResult((Effect.sync(() => __foldkitBrandViewResult((mediaQuery.removeEventListener('change', handler)), "@foldkit/devtools/overlay.js#anonymous~47"))), "@foldkit/devtools/overlay.js#anonymous~46")).pipe(Effect.flatMap(() => __foldkitBrandViewResult((Effect.never), "@foldkit/devtools/overlay.js#anonymous~48")))), "@foldkit/devtools/overlay.js#anonymous~44"))),
559
- }), "@foldkit/devtools/overlay.js#anonymous~41")));
550
+ return __foldkitBrandViewResult(({ mediaQuery, handler }), "@foldkit/devtools/overlay.js#anonymous~44");
551
+ }), ({ mediaQuery, handler }) => __foldkitBrandViewResult((Effect.sync(() => __foldkitBrandViewResult((mediaQuery.removeEventListener('change', handler)), "@foldkit/devtools/overlay.js#anonymous~46"))), "@foldkit/devtools/overlay.js#anonymous~45")).pipe(Effect.flatMap(() => __foldkitBrandViewResult((Effect.never), "@foldkit/devtools/overlay.js#anonymous~47")))), "@foldkit/devtools/overlay.js#anonymous~43"))),
552
+ }), "@foldkit/devtools/overlay.js#anonymous~40")));
560
553
  return __foldkitBrandViewResult((Subscription.aggregate()(ownSubscriptions, scrubberSubscriptions)), "@foldkit/devtools/overlay.js#makeOverlaySubscriptions");
561
554
  };
562
555
  // VIEW
@@ -590,7 +583,7 @@ const makeView = (position, mode, shadow, maybeBanner) => {
590
583
  let viewWithBuilder;
591
584
  return __foldkitBrandViewResult(((model, h) => {
592
585
  viewWithBuilder ??= buildOverlayView(position, mode, shadow, maybeBanner, h);
593
- return __foldkitBrandViewResult((viewWithBuilder(model)), "@foldkit/devtools/overlay.js#anonymous~49");
586
+ return __foldkitBrandViewResult((viewWithBuilder(model)), "@foldkit/devtools/overlay.js#anonymous~48");
594
587
  }), "@foldkit/devtools/overlay.js#makeView");
595
588
  };
596
589
  const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
@@ -600,7 +593,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
600
593
  const lazyMessageList = createLazy();
601
594
  // JSON TREE
602
595
  const leafSpan = (className, text) => __foldkitBrandViewResult((h.span([h.Class(className)], [text])), "@foldkit/devtools/overlay.js#leafSpan");
603
- const leafValueView = (value) => __foldkitBrandViewResult((M.value(value).pipe(M.when(Predicate.isNull, () => __foldkitBrandViewResult((leafSpan('json-null italic', 'null')), "@foldkit/devtools/overlay.js#anonymous~50")), M.when(Predicate.isUndefined, () => __foldkitBrandViewResult((leafSpan('json-null italic', 'undefined')), "@foldkit/devtools/overlay.js#anonymous~51")), M.when(Predicate.isString, stringValue => __foldkitBrandViewResult((leafSpan('json-string', `"${stringValue}"`)), "@foldkit/devtools/overlay.js#anonymous~52")), M.when(Predicate.isNumber, numberValue => __foldkitBrandViewResult((leafSpan('json-number', String(numberValue))), "@foldkit/devtools/overlay.js#anonymous~53")), M.when(Predicate.isBoolean, booleanValue => __foldkitBrandViewResult((leafSpan('json-boolean', String(booleanValue))), "@foldkit/devtools/overlay.js#anonymous~54")), M.orElse(unknownValue => __foldkitBrandViewResult((leafSpan('json-null', String(unknownValue))), "@foldkit/devtools/overlay.js#anonymous~55")))), "@foldkit/devtools/overlay.js#leafValueView");
596
+ const leafValueView = (value) => __foldkitBrandViewResult((M.value(value).pipe(M.when(Predicate.isNull, () => __foldkitBrandViewResult((leafSpan('json-null italic', 'null')), "@foldkit/devtools/overlay.js#anonymous~49")), M.when(Predicate.isUndefined, () => __foldkitBrandViewResult((leafSpan('json-null italic', 'undefined')), "@foldkit/devtools/overlay.js#anonymous~50")), M.when(Predicate.isString, stringValue => __foldkitBrandViewResult((leafSpan('json-string', `"${stringValue}"`)), "@foldkit/devtools/overlay.js#anonymous~51")), M.when(Predicate.isNumber, numberValue => __foldkitBrandViewResult((leafSpan('json-number', String(numberValue))), "@foldkit/devtools/overlay.js#anonymous~52")), M.when(Predicate.isBoolean, booleanValue => __foldkitBrandViewResult((leafSpan('json-boolean', String(booleanValue))), "@foldkit/devtools/overlay.js#anonymous~53")), M.orElse(unknownValue => __foldkitBrandViewResult((leafSpan('json-null', String(unknownValue))), "@foldkit/devtools/overlay.js#anonymous~54")))), "@foldkit/devtools/overlay.js#leafValueView");
604
597
  const keyView = (key) => __foldkitBrandViewResult((h.span([h.Class('json-key')], [`${key}:\u00a0`])), "@foldkit/devtools/overlay.js#keyView");
605
598
  const CHEVRON_RIGHT = 'M8.25 4.5l7.5 7.5-7.5 7.5';
606
599
  const CHEVRON_DOWN = 'M19.5 8.25l-7.5 7.5-7.5-7.5';
@@ -674,16 +667,16 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
674
667
  treePath: `${treePath}.${arrayIndex}`,
675
668
  depth: childDepth,
676
669
  key: String(arrayIndex),
677
- })), "@foldkit/devtools/overlay.js#anonymous~56"));
670
+ })), "@foldkit/devtools/overlay.js#anonymous~55"));
678
671
  }
679
672
  else if (Predicate.isObject(value)) {
680
- pipe(value, Record.toEntries, Array_.filter(([entryKey]) => __foldkitBrandViewResult((entryKey !== '_tag'), "@foldkit/devtools/overlay.js#anonymous~57")), Array_.forEach(([entryKey, childValue]) => __foldkitBrandViewResult((flattenTree({
673
+ pipe(value, Record.toEntries, Array_.filter(([entryKey]) => __foldkitBrandViewResult((entryKey !== '_tag'), "@foldkit/devtools/overlay.js#anonymous~56")), Array_.forEach(([entryKey, childValue]) => __foldkitBrandViewResult((flattenTree({
681
674
  ...shared,
682
675
  value: childValue,
683
676
  treePath: `${treePath}.${entryKey}`,
684
677
  depth: childDepth,
685
678
  key: entryKey,
686
- })), "@foldkit/devtools/overlay.js#anonymous~58")));
679
+ })), "@foldkit/devtools/overlay.js#anonymous~57")));
687
680
  }
688
681
  };
689
682
  const flatNodeView = (value, treePath, depth, key, nodeIsExpandable, isExpanded, isChanged, isAffected, isRoot, tag) => {
@@ -701,7 +694,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
701
694
  'diff-changed': isChanged,
702
695
  })),
703
696
  indent,
704
- ], rowSegments.map(segment => __foldkitBrandViewResult((h.keyed('li')(segment._tag, [h.Class('contents')], [rowSegmentView(segment)])), "@foldkit/devtools/overlay.js#anonymous~59")))), "@foldkit/devtools/overlay.js#flatNodeView");
697
+ ], rowSegments.map(segment => __foldkitBrandViewResult((h.keyed('li')(segment._tag, [h.Class('contents')], [rowSegmentView(segment)])), "@foldkit/devtools/overlay.js#anonymous~58")))), "@foldkit/devtools/overlay.js#flatNodeView");
705
698
  }
706
699
  const preview = isExpanded
707
700
  ? Array.isArray(value)
@@ -725,7 +718,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
725
718
  ...(isRoot
726
719
  ? []
727
720
  : [h.OnClick(Message.ToggledTreeNode({ path: treePath }))]),
728
- ], rowSegments.map(segment => __foldkitBrandViewResult((h.keyed('li')(segment._tag, [h.Class('contents')], [rowSegmentView(segment)])), "@foldkit/devtools/overlay.js#anonymous~60")))), "@foldkit/devtools/overlay.js#flatNodeView");
721
+ ], rowSegments.map(segment => __foldkitBrandViewResult((h.keyed('li')(segment._tag, [h.Class('contents')], [rowSegmentView(segment)])), "@foldkit/devtools/overlay.js#anonymous~59")))), "@foldkit/devtools/overlay.js#flatNodeView");
729
722
  };
730
723
  const renderFlatNode = (node) => __foldkitBrandViewResult((lazyTreeNode(node.treePath, flatNodeView, [
731
724
  node.value,
@@ -749,7 +742,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
749
742
  changedPaths,
750
743
  affectedPaths,
751
744
  depth: 0,
752
- key: Option.getOrElse(maybeRootLabel, () => __foldkitBrandViewResult((''), "@foldkit/devtools/overlay.js#anonymous~61")),
745
+ key: Option.getOrElse(maybeRootLabel, () => __foldkitBrandViewResult((''), "@foldkit/devtools/overlay.js#anonymous~60")),
753
746
  accumulator: nodes,
754
747
  indentRootChildren,
755
748
  });
@@ -763,7 +756,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
763
756
  return __foldkitBrandViewResult(('0ms'), "@foldkit/devtools/overlay.js#inspectedTimestamp");
764
757
  }
765
758
  const baseTimestamp = pipe(model.entries, Array_.head, Option.match({
766
- onNone: () => __foldkitBrandViewResult((0), "@foldkit/devtools/overlay.js#onNone~6"),
759
+ onNone: () => __foldkitBrandViewResult((0), "@foldkit/devtools/overlay.js#onNone~2"),
767
760
  onSome: ({ timestamp }) => __foldkitBrandViewResult((timestamp), "@foldkit/devtools/overlay.js#onSome~2"),
768
761
  }));
769
762
  return __foldkitBrandViewResult((pipe(Array_.get(model.entries, selectedIndex - model.startIndex), Option.map(entry => {
@@ -772,8 +765,8 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
772
765
  const remainingMs = delta % MILLIS_PER_SECOND;
773
766
  return __foldkitBrandViewResult((seconds > 0
774
767
  ? `+${seconds}s ${remainingMs.toFixed(1)}ms`
775
- : `+${remainingMs.toFixed(1)}ms`), "@foldkit/devtools/overlay.js#anonymous~62");
776
- }), Option.getOrElse(() => __foldkitBrandViewResult((''), "@foldkit/devtools/overlay.js#anonymous~63")))), "@foldkit/devtools/overlay.js#inspectedTimestamp");
768
+ : `+${remainingMs.toFixed(1)}ms`), "@foldkit/devtools/overlay.js#anonymous~61");
769
+ }), Option.getOrElse(() => __foldkitBrandViewResult((''), "@foldkit/devtools/overlay.js#anonymous~62")))), "@foldkit/devtools/overlay.js#inspectedTimestamp");
777
770
  };
778
771
  const emptyInspectorView = h.div([
779
772
  h.Class('flex-1 flex items-center justify-center text-dt-muted text-2xs font-mono min-w-0'),
@@ -837,7 +830,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
837
830
  onEmpty: () => __foldkitBrandViewResult((INIT_INDEX), "@foldkit/devtools/overlay.js#onEmpty~4"),
838
831
  onNonEmpty: () => __foldkitBrandViewResult((model.startIndex + model.entries.length - 1), "@foldkit/devtools/overlay.js#onNonEmpty~4"),
839
832
  });
840
- return __foldkitBrandViewResult((M.value(mode).pipe(M.when('TimeTravel', () => __foldkitBrandViewResult((model.isPaused ? model.pausedAtIndex : lastIndex), "@foldkit/devtools/overlay.js#anonymous~64")), M.when('Inspect', () => __foldkitBrandViewResult((model.selectedIndex), "@foldkit/devtools/overlay.js#anonymous~65")), M.exhaustive)), "@foldkit/devtools/overlay.js#selectedHistoryIndex");
833
+ return __foldkitBrandViewResult((M.value(mode).pipe(M.when('TimeTravel', () => __foldkitBrandViewResult((model.isPaused ? model.pausedAtIndex : lastIndex), "@foldkit/devtools/overlay.js#anonymous~63")), M.when('Inspect', () => __foldkitBrandViewResult((model.selectedIndex), "@foldkit/devtools/overlay.js#anonymous~64")), M.exhaustive)), "@foldkit/devtools/overlay.js#selectedHistoryIndex");
841
834
  };
842
835
  const selectedCommands = (model) => {
843
836
  const selectedIndex = selectedHistoryIndex(model);
@@ -845,12 +838,12 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
845
838
  return __foldkitBrandViewResult((model.initCommands), "@foldkit/devtools/overlay.js#selectedCommands");
846
839
  }
847
840
  else {
848
- return __foldkitBrandViewResult((pipe(model.entries, Array_.get(selectedIndex - model.startIndex), Option.map(entry => __foldkitBrandViewResult((entry.commands), "@foldkit/devtools/overlay.js#anonymous~66")), Option.getOrElse(() => __foldkitBrandViewResult((NO_COMMANDS), "@foldkit/devtools/overlay.js#anonymous~67")))), "@foldkit/devtools/overlay.js#selectedCommands");
841
+ return __foldkitBrandViewResult((pipe(model.entries, Array_.get(selectedIndex - model.startIndex), Option.map(entry => __foldkitBrandViewResult((entry.commands), "@foldkit/devtools/overlay.js#anonymous~65")), Option.getOrElse(() => __foldkitBrandViewResult((NO_COMMANDS), "@foldkit/devtools/overlay.js#anonymous~66")))), "@foldkit/devtools/overlay.js#selectedCommands");
849
842
  }
850
843
  };
851
844
  const flattenCommand = (command, index, expandedPaths) => {
852
845
  const taggedValue = Option.match(command.args, {
853
- onNone: () => (__foldkitBrandViewResult(({ _tag: command.name }), "@foldkit/devtools/overlay.js#onNone~7")),
846
+ onNone: () => (__foldkitBrandViewResult(({ _tag: command.name }), "@foldkit/devtools/overlay.js#onNone~3")),
854
847
  onSome: argsValue => (__foldkitBrandViewResult(({ ...argsValue, _tag: command.name }), "@foldkit/devtools/overlay.js#onSome~4")),
855
848
  });
856
849
  const rootPath = `command-${index}`;
@@ -878,7 +871,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
878
871
  ], Array_.map(commandList, (command, index) => __foldkitBrandViewResult((h.div([h.Class('flex items-start px-2 py-1 border-b gap-1.5')], [
879
872
  h.span([h.Class(indexClass)], [String(index + 1)]),
880
873
  h.div([h.Class('flex flex-col flex-1 min-w-0')], Array_.map(flattenCommand(command, index, expandedPaths), renderFlatNode)),
881
- ])), "@foldkit/devtools/overlay.js#anonymous~68")))), "@foldkit/devtools/overlay.js#onNonEmpty~5"),
874
+ ])), "@foldkit/devtools/overlay.js#anonymous~67")))), "@foldkit/devtools/overlay.js#onNonEmpty~5"),
882
875
  })), "@foldkit/devtools/overlay.js#commandsTabContent");
883
876
  const selectedMountActivity = (model) => {
884
877
  const selectedIndex = selectedHistoryIndex(model);
@@ -887,7 +880,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
887
880
  }
888
881
  else {
889
882
  return __foldkitBrandViewResult((pipe(model.entries, Array_.get(selectedIndex - model.startIndex), Option.match({
890
- onNone: () => (__foldkitBrandViewResult(({ starts: NO_MOUNTS, ends: NO_MOUNTS }), "@foldkit/devtools/overlay.js#onNone~8")),
883
+ onNone: () => (__foldkitBrandViewResult(({ starts: NO_MOUNTS, ends: NO_MOUNTS }), "@foldkit/devtools/overlay.js#onNone~4")),
891
884
  onSome: entry => (__foldkitBrandViewResult(({
892
885
  starts: entry.mountStarts,
893
886
  ends: entry.mountEnds,
@@ -897,7 +890,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
897
890
  };
898
891
  const flattenMount = (mount, sectionLabel, index, expandedPaths) => {
899
892
  const taggedValue = Option.match(mount.args, {
900
- onNone: () => (__foldkitBrandViewResult(({ _tag: mount.name }), "@foldkit/devtools/overlay.js#onNone~9")),
893
+ onNone: () => (__foldkitBrandViewResult(({ _tag: mount.name }), "@foldkit/devtools/overlay.js#onNone~5")),
901
894
  onSome: argsValue => (__foldkitBrandViewResult(({ ...argsValue, _tag: mount.name }), "@foldkit/devtools/overlay.js#onSome~6")),
902
895
  });
903
896
  const rootPath = `mount-${sectionLabel}-${index}`;
@@ -923,7 +916,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
923
916
  ...Array_.map(mounts, (mount, index) => __foldkitBrandViewResult((h.div([h.Class('flex items-start px-2 py-1 border-b gap-1.5')], [
924
917
  h.span([h.Class(indexClass)], [String(index + 1)]),
925
918
  h.div([h.Class('flex flex-col flex-1 min-w-0')], Array_.map(flattenMount(mount, label, index, expandedPaths), renderFlatNode)),
926
- ])), "@foldkit/devtools/overlay.js#anonymous~69")),
919
+ ])), "@foldkit/devtools/overlay.js#anonymous~68")),
927
920
  ])), "@foldkit/devtools/overlay.js#mountListSection");
928
921
  const mountsTabContent = (starts, ends, expandedPaths) => {
929
922
  const hasAny = Array_.isReadonlyArrayNonEmpty(starts) ||
@@ -949,22 +942,22 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
949
942
  model.expandedPaths,
950
943
  model.changedPaths,
951
944
  model.affectedPaths,
952
- ])), "@foldkit/devtools/overlay.js#anonymous~70")), M.when('Message', () => __foldkitBrandViewResult((lazyTabContent('Message', messageTabContent, [
945
+ ])), "@foldkit/devtools/overlay.js#anonymous~69")), M.when('Message', () => __foldkitBrandViewResult((lazyTabContent('Message', messageTabContent, [
953
946
  model.maybeInspectedMessage,
954
947
  model.maybeSubmodelFilter,
955
948
  model.isFlattened,
956
949
  model.expandedPaths,
957
950
  inspectedTimestamp(model),
958
- ])), "@foldkit/devtools/overlay.js#anonymous~71")), M.when('Commands', () => __foldkitBrandViewResult((lazyTabContent('Commands', commandsTabContent, [
951
+ ])), "@foldkit/devtools/overlay.js#anonymous~70")), M.when('Commands', () => __foldkitBrandViewResult((lazyTabContent('Commands', commandsTabContent, [
959
952
  selectedCommands(model),
960
953
  model.expandedPaths,
961
- ])), "@foldkit/devtools/overlay.js#anonymous~72")), M.when('Mounts', () => {
954
+ ])), "@foldkit/devtools/overlay.js#anonymous~71")), M.when('Mounts', () => {
962
955
  const { starts, ends } = selectedMountActivity(model);
963
956
  return __foldkitBrandViewResult((lazyTabContent('Mounts', mountsTabContent, [
964
957
  starts,
965
958
  ends,
966
959
  model.expandedPaths,
967
- ])), "@foldkit/devtools/overlay.js#anonymous~73");
960
+ ])), "@foldkit/devtools/overlay.js#anonymous~72");
968
961
  }), M.exhaustive)), "@foldkit/devtools/overlay.js#inspectorTabContent");
969
962
  const inspectorPaneView = (model) => __foldkitBrandViewResult((h.div([
970
963
  h.Class('flex flex-col border-l min-w-0 min-h-0 flex-1 dt-inspector-pane'),
@@ -983,7 +976,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
983
976
  h.Class(clsx('dt-tab-button cursor-pointer text-base font-mono px-3 py-1', tab.isActive
984
977
  ? 'text-dt dt-tab-active'
985
978
  : 'text-dt-muted')),
986
- ], [h.span([], [tab.value])])), "@foldkit/devtools/overlay.js#anonymous~74"))),
979
+ ], [h.span([], [tab.value])])), "@foldkit/devtools/overlay.js#anonymous~73"))),
987
980
  ...tabs.map(tab => __foldkitBrandViewResult((h.div([
988
981
  ...tab.panel,
989
982
  h.Class('flex flex-col flex-1 min-h-0 min-w-0'),
@@ -993,13 +986,13 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
993
986
  : [h.Style({ display: 'none' })]),
994
987
  ], [
995
988
  Option.match(model.maybeInspectedModel, {
996
- onNone: () => __foldkitBrandViewResult((emptyInspectorView), "@foldkit/devtools/overlay.js#onNone~10"),
989
+ onNone: () => __foldkitBrandViewResult((emptyInspectorView), "@foldkit/devtools/overlay.js#onNone~6"),
997
990
  onSome: inspectedModel => __foldkitBrandViewResult((inspectorTabContent(model, tab.value, inspectedModel)), "@foldkit/devtools/overlay.js#onSome~7"),
998
991
  }),
999
- ])), "@foldkit/devtools/overlay.js#anonymous~75")),
992
+ ])), "@foldkit/devtools/overlay.js#anonymous~74")),
1000
993
  ])), "@foldkit/devtools/overlay.js#toView"),
1001
994
  },
1002
- toParentMessage: message => __foldkitBrandViewResult((Message.GotInspectorTabsMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage~2"),
995
+ toParentMessage: message => __foldkitBrandViewResult((Message.GotInspectorTabsMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage~5"),
1003
996
  }),
1004
997
  ])), "@foldkit/devtools/overlay.js#inspectorPaneView");
1005
998
  // MESSAGE LIST
@@ -1072,7 +1065,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
1072
1065
  ])), "@foldkit/devtools/overlay.js#scrollToTopPillView");
1073
1066
  const submodelFilterView = (model) => {
1074
1067
  const buttonLabel = Option.match(model.maybeSubmodelFilter, {
1075
- onNone: () => __foldkitBrandViewResult(('All Messages'), "@foldkit/devtools/overlay.js#onNone~11"),
1068
+ onNone: () => __foldkitBrandViewResult(('All Messages'), "@foldkit/devtools/overlay.js#onNone~7"),
1076
1069
  onSome: submodelLabel,
1077
1070
  });
1078
1071
  return __foldkitBrandViewResult((h.submodel({
@@ -1081,7 +1074,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
1081
1074
  view: SubmodelFilterListbox.view,
1082
1075
  viewInputs: {
1083
1076
  items: [ALL_MESSAGES_VALUE, ...model.submodelTags],
1084
- maybeSelectedValue: Option.orElseSome(model.maybeSubmodelFilter, () => __foldkitBrandViewResult((ALL_MESSAGES_VALUE), "@foldkit/devtools/overlay.js#anonymous~76")),
1077
+ maybeSelectedValue: Option.orElseSome(model.maybeSubmodelFilter, () => __foldkitBrandViewResult((ALL_MESSAGES_VALUE), "@foldkit/devtools/overlay.js#anonymous~75")),
1085
1078
  itemToConfig: item => (__foldkitBrandViewResult(({
1086
1079
  className: 'dt-filter-item',
1087
1080
  content: h.div([h.Class('flex items-center gap-2')], [checkIconView, h.span([], [filterItemLabel(item)])]),
@@ -1109,7 +1102,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
1109
1102
  className: 'dt-filter-wrapper',
1110
1103
  backdropClassName: 'dt-filter-backdrop',
1111
1104
  },
1112
- toParentMessage: message => __foldkitBrandViewResult((Message.GotSubmodelFilterMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage~3"),
1105
+ toParentMessage: message => __foldkitBrandViewResult((Message.GotSubmodelFilterMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage~6"),
1113
1106
  })), "@foldkit/devtools/overlay.js#submodelFilterView");
1114
1107
  };
1115
1108
  // SETTINGS
@@ -1150,7 +1143,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
1150
1143
  : {
1151
1144
  status: h.span([h.Class(`${statusClass} text-dt-live font-medium`)], ['Live']),
1152
1145
  maybeAction: Option.none(),
1153
- }), "@foldkit/devtools/overlay.js#anonymous~77")), M.when('Inspect', () => (__foldkitBrandViewResult(({
1146
+ }), "@foldkit/devtools/overlay.js#anonymous~76")), M.when('Inspect', () => (__foldkitBrandViewResult(({
1154
1147
  status: h.span([h.Class(`${statusClass} text-dt-accent`)], [
1155
1148
  model.selectedIndex === INIT_INDEX
1156
1149
  ? 'Inspecting (init)'
@@ -1160,7 +1153,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
1160
1153
  h.Class(actionButtonClass),
1161
1154
  h.OnClick(Message.ClickedFollowLatest()),
1162
1155
  ], ['Follow Latest →'])),
1163
- }), "@foldkit/devtools/overlay.js#anonymous~78"))), M.exhaustive);
1156
+ }), "@foldkit/devtools/overlay.js#anonymous~77"))), M.exhaustive);
1164
1157
  const maybeClearHistoryButton = OptionExt.when(!model.isPaused, clearHistoryButton());
1165
1158
  return __foldkitBrandViewResult((h.header([h.Class(headerClass)], [
1166
1159
  status,
@@ -1206,28 +1199,28 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
1206
1199
  ])), "@foldkit/devtools/overlay.js#messageRowView");
1207
1200
  const messageListBody = (entries, startIndex, selectedIndex, isPaused, pausedAtIndex, maybeFilterTag, isFlattened) => {
1208
1201
  const baseTimestamp = pipe(entries, Array_.head, Option.match({
1209
- onNone: () => __foldkitBrandViewResult((0), "@foldkit/devtools/overlay.js#onNone~12"),
1202
+ onNone: () => __foldkitBrandViewResult((0), "@foldkit/devtools/overlay.js#onNone~8"),
1210
1203
  onSome: ({ timestamp }) => __foldkitBrandViewResult((timestamp), "@foldkit/devtools/overlay.js#onSome~8"),
1211
1204
  }));
1212
1205
  const isInitSelected = selectedIndex === INIT_INDEX;
1213
1206
  const isFiltered = Option.isSome(maybeFilterTag);
1214
- const leafOrTag = (entry) => __foldkitBrandViewResult((Option.getOrElse(entry.maybeLeafTag, () => __foldkitBrandViewResult((entry.tag), "@foldkit/devtools/overlay.js#anonymous~79"))), "@foldkit/devtools/overlay.js#leafOrTag");
1207
+ const leafOrTag = (entry) => __foldkitBrandViewResult((Option.getOrElse(entry.maybeLeafTag, () => __foldkitBrandViewResult((entry.tag), "@foldkit/devtools/overlay.js#anonymous~78"))), "@foldkit/devtools/overlay.js#leafOrTag");
1215
1208
  const displayTagFor = (entry) => {
1216
1209
  if (isFlattened) {
1217
1210
  return __foldkitBrandViewResult((leafOrTag(entry)), "@foldkit/devtools/overlay.js#displayTagFor");
1218
1211
  }
1219
1212
  else {
1220
1213
  return __foldkitBrandViewResult((Option.match(maybeFilterTag, {
1221
- onNone: () => __foldkitBrandViewResult((entry.tag), "@foldkit/devtools/overlay.js#onNone~13"),
1222
- onSome: filterTag => __foldkitBrandViewResult((pipe(entry.submodelPath, Array_.findFirstIndex(pathTag => __foldkitBrandViewResult((pathTag === filterTag), "@foldkit/devtools/overlay.js#anonymous~80")), Option.flatMap(filterIndex => __foldkitBrandViewResult((Array_.get(entry.submodelPath, Number_.increment(filterIndex))), "@foldkit/devtools/overlay.js#anonymous~81")), Option.orElse(() => __foldkitBrandViewResult((entry.maybeLeafTag), "@foldkit/devtools/overlay.js#anonymous~82")), Option.getOrElse(() => __foldkitBrandViewResult((entry.tag), "@foldkit/devtools/overlay.js#anonymous~83")))), "@foldkit/devtools/overlay.js#onSome~9"),
1214
+ onNone: () => __foldkitBrandViewResult((entry.tag), "@foldkit/devtools/overlay.js#onNone~9"),
1215
+ onSome: filterTag => __foldkitBrandViewResult((pipe(entry.submodelPath, Array_.findFirstIndex(pathTag => __foldkitBrandViewResult((pathTag === filterTag), "@foldkit/devtools/overlay.js#anonymous~79")), Option.flatMap(filterIndex => __foldkitBrandViewResult((Array_.get(entry.submodelPath, Number_.increment(filterIndex))), "@foldkit/devtools/overlay.js#anonymous~80")), Option.orElse(() => __foldkitBrandViewResult((entry.maybeLeafTag), "@foldkit/devtools/overlay.js#anonymous~81")), Option.getOrElse(() => __foldkitBrandViewResult((entry.tag), "@foldkit/devtools/overlay.js#anonymous~82")))), "@foldkit/devtools/overlay.js#onSome~9"),
1223
1216
  })), "@foldkit/devtools/overlay.js#displayTagFor");
1224
1217
  }
1225
1218
  };
1226
1219
  const indexedEntries = pipe(entries, Array_.map((entry, arrayIndex) => (__foldkitBrandViewResult(({
1227
1220
  entry,
1228
1221
  absoluteIndex: startIndex + arrayIndex,
1229
- }), "@foldkit/devtools/overlay.js#anonymous~84"))), isFiltered
1230
- ? Array_.filter(({ entry }) => __foldkitBrandViewResult((Array_.contains(entry.submodelPath, maybeFilterTag.value)), "@foldkit/devtools/overlay.js#anonymous~85"))
1222
+ }), "@foldkit/devtools/overlay.js#anonymous~83"))), isFiltered
1223
+ ? Array_.filter(({ entry }) => __foldkitBrandViewResult((Array_.contains(entry.submodelPath, maybeFilterTag.value)), "@foldkit/devtools/overlay.js#anonymous~84"))
1231
1224
  : Function.identity);
1232
1225
  const messageRows = pipe(indexedEntries, Array_.map(({ entry, absoluteIndex }) => {
1233
1226
  const isSelected = selectedIndex === absoluteIndex;
@@ -1240,11 +1233,11 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
1240
1233
  isPausedHere,
1241
1234
  entry.timestamp - baseTimestamp,
1242
1235
  entry.isModelChanged,
1243
- ])), "@foldkit/devtools/overlay.js#anonymous~86");
1236
+ ])), "@foldkit/devtools/overlay.js#anonymous~85");
1244
1237
  }), Array_.reverse);
1245
1238
  return __foldkitBrandViewResult((h.ul([
1246
1239
  h.Class('message-list flex-1 overflow-y-auto min-h-0 overscroll-none'),
1247
- h.OnScroll(scrollTop => __foldkitBrandViewResult((Message.ScrolledMessageList({ scrollTop })), "@foldkit/devtools/overlay.js#anonymous~87")),
1240
+ h.OnScroll(scrollTop => __foldkitBrandViewResult((Message.ScrolledMessageList({ scrollTop })), "@foldkit/devtools/overlay.js#anonymous~86")),
1248
1241
  ], isFiltered
1249
1242
  ? messageRows
1250
1243
  : [
@@ -1300,7 +1293,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
1300
1293
  ], [scrubberPositionLabel(model)]),
1301
1294
  ])), "@foldkit/devtools/overlay.js#toView~3"),
1302
1295
  },
1303
- toParentMessage: message => __foldkitBrandViewResult((Message.GotScrubberSliderMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage~4"),
1296
+ toParentMessage: message => __foldkitBrandViewResult((Message.GotScrubberSliderMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage~7"),
1304
1297
  })), "@foldkit/devtools/overlay.js#scrubberView");
1305
1298
  // FOOTER
1306
1299
  const isScrubberVisible = mode === 'TimeTravel';
@@ -1372,13 +1365,13 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
1372
1365
  inspectorPaneView(model),
1373
1366
  ])), "@foldkit/devtools/overlay.js#messagesScreenView");
1374
1367
  };
1375
- const contentView = (model) => __foldkitBrandViewResult((M.value(model.screen).pipe(M.withReturnType(), M.when('Messages', () => __foldkitBrandViewResult((messagesScreenView(model)), "@foldkit/devtools/overlay.js#anonymous~88")), M.when('Settings', () => __foldkitBrandViewResult((settingsScreenView(model)), "@foldkit/devtools/overlay.js#anonymous~89")), M.exhaustive)), "@foldkit/devtools/overlay.js#contentView");
1368
+ const contentView = (model) => __foldkitBrandViewResult((M.value(model.screen).pipe(M.withReturnType(), M.when('Messages', () => __foldkitBrandViewResult((messagesScreenView(model)), "@foldkit/devtools/overlay.js#anonymous~87")), M.when('Settings', () => __foldkitBrandViewResult((settingsScreenView(model)), "@foldkit/devtools/overlay.js#anonymous~88")), M.exhaustive)), "@foldkit/devtools/overlay.js#contentView");
1376
1369
  const panelView = (model) => __foldkitBrandViewResult((h.div([
1377
1370
  h.Class(clsx('fixed dt-panel dt-panel-wide bg-dt-bg border rounded-lg flex flex-col overflow-hidden font-mono text-dt', PANEL_POSITION_CLASS[position])),
1378
1371
  ], [
1379
1372
  ...Option.map(maybeBanner, banner => __foldkitBrandViewResult((h.div([
1380
1373
  h.Class('px-3 py-2 border-b text-sm text-dt-muted font-mono shrink-0 leading-snug'),
1381
- ], [banner])), "@foldkit/devtools/overlay.js#anonymous~90")).pipe(Option.toArray),
1374
+ ], [banner])), "@foldkit/devtools/overlay.js#anonymous~89")).pipe(Option.toArray),
1382
1375
  headerView(model),
1383
1376
  contentView(model),
1384
1377
  footerView(model),
@@ -1388,7 +1381,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
1388
1381
  ...OptionExt.when(model.isPaused && mode === 'TimeTravel', interactionBlocker()).pipe(Option.toArray),
1389
1382
  ...OptionExt.when(model.isOpen, panelView(model)).pipe(Option.toArray),
1390
1383
  badgeView(model),
1391
- ])), "@foldkit/devtools/overlay.js#anonymous~91")), "@foldkit/devtools/overlay.js#buildOverlayView");
1384
+ ])), "@foldkit/devtools/overlay.js#anonymous~90")), "@foldkit/devtools/overlay.js#buildOverlayView");
1392
1385
  };
1393
1386
  // CREATE
1394
1387
  const VIEW_TRANSITION_NAME = 'foldkit-devtools';
@@ -1469,10 +1462,10 @@ const createShadowContainer = () => {
1469
1462
  return __foldkitBrandViewResult(({ container, shadow }), "@foldkit/devtools/overlay.js#createShadowContainer");
1470
1463
  };
1471
1464
  export const createOverlay = (store, position, mode, maybeBanner) => __foldkitBrandViewResult((Effect.gen(function* () {
1472
- const { container, shadow } = yield* Effect.acquireRelease(Effect.sync(() => __foldkitBrandViewResult((createShadowContainer()), "@foldkit/devtools/overlay.js#anonymous~94")), createdShadowContainer => __foldkitBrandViewResult((Effect.sync(() => {
1465
+ const { container, shadow } = yield* Effect.acquireRelease(Effect.sync(() => __foldkitBrandViewResult((createShadowContainer()), "@foldkit/devtools/overlay.js#anonymous~93")), createdShadowContainer => __foldkitBrandViewResult((Effect.sync(() => {
1473
1466
  createdShadowContainer.shadow.host.remove();
1474
1467
  document.getElementById(VIEW_TRANSITION_STYLE_ID)?.remove();
1475
- })), "@foldkit/devtools/overlay.js#anonymous~95"));
1468
+ })), "@foldkit/devtools/overlay.js#anonymous~94"));
1476
1469
  container.id = '__foldkit_devtools_overlay__';
1477
1470
  const flags = Effect.gen(function* () {
1478
1471
  const storeState = yield* SubscriptionRef.get(store.stateRef);
@@ -1482,7 +1475,7 @@ export const createOverlay = (store, position, mode, maybeBanner) => __foldkitBr
1482
1475
  isMobile: window.matchMedia(MOBILE_BREAKPOINT_QUERY).matches,
1483
1476
  isFlattened,
1484
1477
  ...toDisplayState(storeState),
1485
- }), "@foldkit/devtools/overlay.js#anonymous~97");
1478
+ }), "@foldkit/devtools/overlay.js#anonymous~96");
1486
1479
  });
1487
1480
  const init = (flags) => {
1488
1481
  const { isFlattened, ...displayFlags } = flags;
@@ -1490,8 +1483,8 @@ export const createOverlay = (store, position, mode, maybeBanner) => __foldkitBr
1490
1483
  const initialSliderValue = flags.isPaused
1491
1484
  ? hostIndexToSliderValue(flags.pausedAtIndex, flags.startIndex)
1492
1485
  : sliderMax;
1493
- return __foldkitBrandViewResult(([
1494
- {
1486
+ return __foldkitBrandViewResult(({
1487
+ model: {
1495
1488
  screen: 'Messages',
1496
1489
  ...displayFlags,
1497
1490
  isFlattened,
@@ -1519,8 +1512,8 @@ export const createOverlay = (store, position, mode, maybeBanner) => __foldkitBr
1519
1512
  }),
1520
1513
  scrubberValue: Slider.snapAndClamp(initialSliderValue, 0, sliderMax, 1),
1521
1514
  },
1522
- Option.toArray(maybeLockScroll(flags.isOpen, flags.isMobile)),
1523
- ]), "@foldkit/devtools/overlay.js#init");
1515
+ commands: Option.toArray(maybeLockScroll(flags.isOpen, flags.isMobile)),
1516
+ }), "@foldkit/devtools/overlay.js#init");
1524
1517
  };
1525
1518
  const overlayRuntime = makeElement({
1526
1519
  Model,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foldkit/devtools",
3
- "version": "0.150.0",
3
+ "version": "0.151.0-canary.4c91a3b5da2b",
4
4
  "description": "In-browser DevTools overlay for Foldkit applications",
5
5
  "type": "module",
6
6
  "exports": {
@@ -15,9 +15,9 @@
15
15
  ],
16
16
  "peerDependencies": {
17
17
  "@effect/platform-browser": "4.0.0-rc.111",
18
- "@foldkit/ui": "^0",
18
+ "@foldkit/ui": "0.151.0-canary.4c91a3b5da2b",
19
19
  "effect": "4.0.0-rc.111",
20
- "foldkit": "^0"
20
+ "foldkit": "0.151.0-canary.4c91a3b5da2b"
21
21
  },
22
22
  "dependencies": {
23
23
  "clsx": "^2.1.1"
@@ -28,9 +28,9 @@
28
28
  "rimraf": "^6.1.3",
29
29
  "typescript": "^6.0.3",
30
30
  "vitest": "^4.1.9",
31
- "@foldkit/vite-plugin": "0.17.0",
32
- "@foldkit/ui": "0.150.0",
33
- "foldkit": "0.150.0"
31
+ "@foldkit/ui": "0.151.0-canary.4c91a3b5da2b",
32
+ "foldkit": "0.151.0-canary.4c91a3b5da2b",
33
+ "@foldkit/vite-plugin": "0.17.0-canary.4c91a3b5da2b"
34
34
  },
35
35
  "keywords": [
36
36
  "foldkit",