@foldkit/devtools 0.133.0 → 0.134.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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;AAK9B,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;;oFAuDpD,CAAC;;;;;;;;;;;;;;;;;AAiQlB,cAAM,YAAa,SAAQ,iBAE1B;CAAG;;AAEJ,cAAM,iBAAkB,SAAQ,sBAGC;CAAG;AAEpC,eAAO,MAAM,UAAU;;iBAGsB,CAAA;AAE7C,eAAO,MAAM,YAAY;;iBAGwB,CAAA;AAgCjD,eAAO,MAAM,oBAAoB;;;;;iBAiBhC,CAAA;AAuBD,eAAO,MAAM,gBAAgB;;;;;;;;wBAU5B,CAAA;AAED,eAAO,MAAM,YAAY;;;;;;;;wBAIqB,CAAA;AAE9C,eAAO,MAAM,aAAa;;;;;;wBASzB,CAAA;AAED,eAAO,MAAM,MAAM;;wBASlB,CAAA;AAED,eAAO,MAAM,KAAK;;wBASjB,CAAA;AAED,eAAO,MAAM,WAAW;;6BAYvB,CAAA;AA47DD,eAAO,MAAM,aAAa,GACxB,OAAO,aAAa,EACpB,UAAU,gBAAgB,EAC1B,MAAM,YAAY,EAClB,aAAa,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,6DAkFhC,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;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;;oFAsDR,CAAC;;;;;;;;;;;;;;;;;AAkQ9D,cAAM,YAAa,SAAQ,iBAE1B;CAAG;;AAEJ,cAAM,iBAAkB,SAAQ,sBAGC;CAAG;AAEpC,eAAO,MAAM,UAAU;;iBAGsB,CAAA;AAE7C,eAAO,MAAM,YAAY;;iBAGwB,CAAA;AAgCjD,eAAO,MAAM,oBAAoB;;;;;iBAiBhC,CAAA;AAuBD,eAAO,MAAM,gBAAgB;;;;;;;;wBAU5B,CAAA;AAED,eAAO,MAAM,YAAY;;;;;;;;wBAIqB,CAAA;AAE9C,eAAO,MAAM,aAAa;;;;;;wBASzB,CAAA;AAED,eAAO,MAAM,MAAM;;wBASlB,CAAA;AAED,eAAO,MAAM,KAAK;;wBASjB,CAAA;AAED,eAAO,MAAM,WAAW;;6BAYvB,CAAA;AAu9DD,eAAO,MAAM,aAAa,GACxB,OAAO,aAAa,EACpB,UAAU,gBAAgB,EAC1B,MAAM,YAAY,EAClB,aAAa,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,6DAkFhC,CAAA"}
package/dist/overlay.js CHANGED
@@ -5,7 +5,7 @@ import { KeyValueStore } from 'effect/unstable/persistence';
5
5
  import * as Command from 'foldkit/command';
6
6
  import { DEVTOOLS_HOST_ID, GOT_MESSAGE_PATTERN, INIT_INDEX, extractSubmodelInfo, isTagged, latestEntryIndex, toInspectableValue, } from 'foldkit/devtools-host';
7
7
  import { lockScroll, unlockScroll } from 'foldkit/dom';
8
- import { createKeyedLazy, createLazy, html } from 'foldkit/html';
8
+ import { createKeyedLazy, createLazy, } from 'foldkit/html';
9
9
  import { m } from 'foldkit/message';
10
10
  import { makeElement } from 'foldkit/runtime';
11
11
  import { ts } from 'foldkit/schema';
@@ -574,15 +574,32 @@ const PANEL_POSITION_CLASS = {
574
574
  TopRight: 'dt-panel-tr',
575
575
  TopLeft: 'dt-panel-tl',
576
576
  };
577
+ // NOTE: the builder arrives with the first render, so the helper closures
578
+ // (and their createLazy slots) are built once on that render and reused.
579
+ //
580
+ // Required, not just an optimization. `resolveOrCache` compares
581
+ // `previousEntry.fn === fn`, so rebuilding the helpers each render would miss
582
+ // every memo on every render. Hoisting only the lazy slots out does not help;
583
+ // the closures themselves have to be reference-stable.
584
+ //
585
+ // Safe despite the "thread `h`, never store it" rule because the overlay owns
586
+ // its own root frame and the builder is the runtime's process-wide singleton,
587
+ // so the captured object is the one every later render would hand back.
577
588
  const makeView = (position, mode, shadow, maybeBanner) => {
578
- const h = html();
589
+ let viewWithBuilder;
590
+ return __foldkitBrandViewResult(((model, h) => {
591
+ viewWithBuilder ??= buildOverlayView(position, mode, shadow, maybeBanner, h);
592
+ return __foldkitBrandViewResult((viewWithBuilder(model)), "@foldkit/devtools/overlay.js#anonymous~52");
593
+ }), "@foldkit/devtools/overlay.js#makeView");
594
+ };
595
+ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
579
596
  const lazyTreeNode = createKeyedLazy();
580
597
  const lazyMessageRow = createKeyedLazy();
581
598
  const lazyTabContent = createKeyedLazy();
582
599
  const lazyMessageList = createLazy();
583
600
  // JSON TREE
584
601
  const leafSpan = (className, text) => __foldkitBrandViewResult((h.span([h.Class(className)], [text])), "@foldkit/devtools/overlay.js#leafSpan");
585
- const leafValueView = (value) => __foldkitBrandViewResult((M.value(value).pipe(M.when(Predicate.isNull, () => __foldkitBrandViewResult((leafSpan('json-null italic', 'null')), "@foldkit/devtools/overlay.js#anonymous~52")), M.when(Predicate.isUndefined, () => __foldkitBrandViewResult((leafSpan('json-null italic', 'undefined')), "@foldkit/devtools/overlay.js#anonymous~53")), M.when(Predicate.isString, stringValue => __foldkitBrandViewResult((leafSpan('json-string', `"${stringValue}"`)), "@foldkit/devtools/overlay.js#anonymous~54")), M.when(Predicate.isNumber, numberValue => __foldkitBrandViewResult((leafSpan('json-number', String(numberValue))), "@foldkit/devtools/overlay.js#anonymous~55")), M.when(Predicate.isBoolean, booleanValue => __foldkitBrandViewResult((leafSpan('json-boolean', String(booleanValue))), "@foldkit/devtools/overlay.js#anonymous~56")), M.orElse(unknownValue => __foldkitBrandViewResult((leafSpan('json-null', String(unknownValue))), "@foldkit/devtools/overlay.js#anonymous~57")))), "@foldkit/devtools/overlay.js#leafValueView");
602
+ const leafValueView = (value) => __foldkitBrandViewResult((M.value(value).pipe(M.when(Predicate.isNull, () => __foldkitBrandViewResult((leafSpan('json-null italic', 'null')), "@foldkit/devtools/overlay.js#anonymous~53")), M.when(Predicate.isUndefined, () => __foldkitBrandViewResult((leafSpan('json-null italic', 'undefined')), "@foldkit/devtools/overlay.js#anonymous~54")), M.when(Predicate.isString, stringValue => __foldkitBrandViewResult((leafSpan('json-string', `"${stringValue}"`)), "@foldkit/devtools/overlay.js#anonymous~55")), M.when(Predicate.isNumber, numberValue => __foldkitBrandViewResult((leafSpan('json-number', String(numberValue))), "@foldkit/devtools/overlay.js#anonymous~56")), M.when(Predicate.isBoolean, booleanValue => __foldkitBrandViewResult((leafSpan('json-boolean', String(booleanValue))), "@foldkit/devtools/overlay.js#anonymous~57")), M.orElse(unknownValue => __foldkitBrandViewResult((leafSpan('json-null', String(unknownValue))), "@foldkit/devtools/overlay.js#anonymous~58")))), "@foldkit/devtools/overlay.js#leafValueView");
586
603
  const keyView = (key) => __foldkitBrandViewResult((h.span([h.Class('json-key')], [`${key}:\u00a0`])), "@foldkit/devtools/overlay.js#keyView");
587
604
  const CHEVRON_RIGHT = 'M8.25 4.5l7.5 7.5-7.5 7.5';
588
605
  const CHEVRON_DOWN = 'M19.5 8.25l-7.5 7.5-7.5-7.5';
@@ -656,16 +673,16 @@ const makeView = (position, mode, shadow, maybeBanner) => {
656
673
  treePath: `${treePath}.${arrayIndex}`,
657
674
  depth: childDepth,
658
675
  key: String(arrayIndex),
659
- })), "@foldkit/devtools/overlay.js#anonymous~58"));
676
+ })), "@foldkit/devtools/overlay.js#anonymous~59"));
660
677
  }
661
678
  else if (Predicate.isObject(value)) {
662
- pipe(value, Record.toEntries, Array_.filter(([entryKey]) => __foldkitBrandViewResult((entryKey !== '_tag'), "@foldkit/devtools/overlay.js#anonymous~59")), Array_.forEach(([entryKey, childValue]) => __foldkitBrandViewResult((flattenTree({
679
+ pipe(value, Record.toEntries, Array_.filter(([entryKey]) => __foldkitBrandViewResult((entryKey !== '_tag'), "@foldkit/devtools/overlay.js#anonymous~60")), Array_.forEach(([entryKey, childValue]) => __foldkitBrandViewResult((flattenTree({
663
680
  ...shared,
664
681
  value: childValue,
665
682
  treePath: `${treePath}.${entryKey}`,
666
683
  depth: childDepth,
667
684
  key: entryKey,
668
- })), "@foldkit/devtools/overlay.js#anonymous~60")));
685
+ })), "@foldkit/devtools/overlay.js#anonymous~61")));
669
686
  }
670
687
  };
671
688
  const flatNodeView = (value, treePath, depth, key, nodeIsExpandable, isExpanded, isChanged, isAffected, isRoot, tag) => {
@@ -683,7 +700,7 @@ const makeView = (position, mode, shadow, maybeBanner) => {
683
700
  'diff-changed': isChanged,
684
701
  })),
685
702
  indent,
686
- ], rowSegments.map(segment => __foldkitBrandViewResult((h.keyed('li')(segment._tag, [h.Class('contents')], [rowSegmentView(segment)])), "@foldkit/devtools/overlay.js#anonymous~61")))), "@foldkit/devtools/overlay.js#flatNodeView");
703
+ ], rowSegments.map(segment => __foldkitBrandViewResult((h.keyed('li')(segment._tag, [h.Class('contents')], [rowSegmentView(segment)])), "@foldkit/devtools/overlay.js#anonymous~62")))), "@foldkit/devtools/overlay.js#flatNodeView");
687
704
  }
688
705
  const preview = isExpanded
689
706
  ? Array.isArray(value)
@@ -705,7 +722,7 @@ const makeView = (position, mode, shadow, maybeBanner) => {
705
722
  })),
706
723
  indent,
707
724
  ...(isRoot ? [] : [h.OnClick(ToggledTreeNode({ path: treePath }))]),
708
- ], rowSegments.map(segment => __foldkitBrandViewResult((h.keyed('li')(segment._tag, [h.Class('contents')], [rowSegmentView(segment)])), "@foldkit/devtools/overlay.js#anonymous~62")))), "@foldkit/devtools/overlay.js#flatNodeView");
725
+ ], rowSegments.map(segment => __foldkitBrandViewResult((h.keyed('li')(segment._tag, [h.Class('contents')], [rowSegmentView(segment)])), "@foldkit/devtools/overlay.js#anonymous~63")))), "@foldkit/devtools/overlay.js#flatNodeView");
709
726
  };
710
727
  const renderFlatNode = (node) => __foldkitBrandViewResult((lazyTreeNode(node.treePath, flatNodeView, [
711
728
  node.value,
@@ -729,7 +746,7 @@ const makeView = (position, mode, shadow, maybeBanner) => {
729
746
  changedPaths,
730
747
  affectedPaths,
731
748
  depth: 0,
732
- key: Option.getOrElse(maybeRootLabel, () => __foldkitBrandViewResult((''), "@foldkit/devtools/overlay.js#anonymous~63")),
749
+ key: Option.getOrElse(maybeRootLabel, () => __foldkitBrandViewResult((''), "@foldkit/devtools/overlay.js#anonymous~64")),
733
750
  accumulator: nodes,
734
751
  indentRootChildren,
735
752
  });
@@ -752,8 +769,8 @@ const makeView = (position, mode, shadow, maybeBanner) => {
752
769
  const remainingMs = delta % MILLIS_PER_SECOND;
753
770
  return __foldkitBrandViewResult((seconds > 0
754
771
  ? `+${seconds}s ${remainingMs.toFixed(1)}ms`
755
- : `+${remainingMs.toFixed(1)}ms`), "@foldkit/devtools/overlay.js#anonymous~64");
756
- }), Option.getOrElse(() => __foldkitBrandViewResult((''), "@foldkit/devtools/overlay.js#anonymous~65")))), "@foldkit/devtools/overlay.js#inspectedTimestamp");
772
+ : `+${remainingMs.toFixed(1)}ms`), "@foldkit/devtools/overlay.js#anonymous~65");
773
+ }), Option.getOrElse(() => __foldkitBrandViewResult((''), "@foldkit/devtools/overlay.js#anonymous~66")))), "@foldkit/devtools/overlay.js#inspectedTimestamp");
757
774
  };
758
775
  const emptyInspectorView = h.div([
759
776
  h.Class('flex-1 flex items-center justify-center text-dt-muted text-2xs font-mono min-w-0'),
@@ -817,7 +834,7 @@ const makeView = (position, mode, shadow, maybeBanner) => {
817
834
  onEmpty: () => __foldkitBrandViewResult((INIT_INDEX), "@foldkit/devtools/overlay.js#onEmpty~4"),
818
835
  onNonEmpty: () => __foldkitBrandViewResult((model.startIndex + model.entries.length - 1), "@foldkit/devtools/overlay.js#onNonEmpty~4"),
819
836
  });
820
- return __foldkitBrandViewResult((M.value(mode).pipe(M.when('TimeTravel', () => __foldkitBrandViewResult((model.isPaused ? model.pausedAtIndex : lastIndex), "@foldkit/devtools/overlay.js#anonymous~66")), M.when('Inspect', () => __foldkitBrandViewResult((model.selectedIndex), "@foldkit/devtools/overlay.js#anonymous~67")), M.exhaustive)), "@foldkit/devtools/overlay.js#selectedHistoryIndex");
837
+ return __foldkitBrandViewResult((M.value(mode).pipe(M.when('TimeTravel', () => __foldkitBrandViewResult((model.isPaused ? model.pausedAtIndex : lastIndex), "@foldkit/devtools/overlay.js#anonymous~67")), M.when('Inspect', () => __foldkitBrandViewResult((model.selectedIndex), "@foldkit/devtools/overlay.js#anonymous~68")), M.exhaustive)), "@foldkit/devtools/overlay.js#selectedHistoryIndex");
821
838
  };
822
839
  const selectedCommands = (model) => {
823
840
  const selectedIndex = selectedHistoryIndex(model);
@@ -825,7 +842,7 @@ const makeView = (position, mode, shadow, maybeBanner) => {
825
842
  return __foldkitBrandViewResult((model.initCommands), "@foldkit/devtools/overlay.js#selectedCommands");
826
843
  }
827
844
  else {
828
- return __foldkitBrandViewResult((pipe(model.entries, Array_.get(selectedIndex - model.startIndex), Option.map(entry => __foldkitBrandViewResult((entry.commands), "@foldkit/devtools/overlay.js#anonymous~68")), Option.getOrElse(() => __foldkitBrandViewResult((NO_COMMANDS), "@foldkit/devtools/overlay.js#anonymous~69")))), "@foldkit/devtools/overlay.js#selectedCommands");
845
+ return __foldkitBrandViewResult((pipe(model.entries, Array_.get(selectedIndex - model.startIndex), Option.map(entry => __foldkitBrandViewResult((entry.commands), "@foldkit/devtools/overlay.js#anonymous~69")), Option.getOrElse(() => __foldkitBrandViewResult((NO_COMMANDS), "@foldkit/devtools/overlay.js#anonymous~70")))), "@foldkit/devtools/overlay.js#selectedCommands");
829
846
  }
830
847
  };
831
848
  const flattenCommand = (command, index, expandedPaths) => {
@@ -858,7 +875,7 @@ const makeView = (position, mode, shadow, maybeBanner) => {
858
875
  ], Array_.map(commandList, (command, index) => __foldkitBrandViewResult((h.div([h.Class('flex items-start px-2 py-1 border-b gap-1.5')], [
859
876
  h.span([h.Class(indexClass)], [String(index + 1)]),
860
877
  h.div([h.Class('flex flex-col flex-1 min-w-0')], Array_.map(flattenCommand(command, index, expandedPaths), renderFlatNode)),
861
- ])), "@foldkit/devtools/overlay.js#anonymous~70")))), "@foldkit/devtools/overlay.js#onNonEmpty~5"),
878
+ ])), "@foldkit/devtools/overlay.js#anonymous~71")))), "@foldkit/devtools/overlay.js#onNonEmpty~5"),
862
879
  })), "@foldkit/devtools/overlay.js#commandsTabContent");
863
880
  const selectedMountActivity = (model) => {
864
881
  const selectedIndex = selectedHistoryIndex(model);
@@ -903,7 +920,7 @@ const makeView = (position, mode, shadow, maybeBanner) => {
903
920
  ...Array_.map(mounts, (mount, index) => __foldkitBrandViewResult((h.div([h.Class('flex items-start px-2 py-1 border-b gap-1.5')], [
904
921
  h.span([h.Class(indexClass)], [String(index + 1)]),
905
922
  h.div([h.Class('flex flex-col flex-1 min-w-0')], Array_.map(flattenMount(mount, label, index, expandedPaths), renderFlatNode)),
906
- ])), "@foldkit/devtools/overlay.js#anonymous~71")),
923
+ ])), "@foldkit/devtools/overlay.js#anonymous~72")),
907
924
  ])), "@foldkit/devtools/overlay.js#mountListSection");
908
925
  const mountsTabContent = (starts, ends, expandedPaths) => {
909
926
  const hasAny = Array_.isReadonlyArrayNonEmpty(starts) ||
@@ -929,22 +946,22 @@ const makeView = (position, mode, shadow, maybeBanner) => {
929
946
  model.expandedPaths,
930
947
  model.changedPaths,
931
948
  model.affectedPaths,
932
- ])), "@foldkit/devtools/overlay.js#anonymous~72")), M.when('Message', () => __foldkitBrandViewResult((lazyTabContent('Message', messageTabContent, [
949
+ ])), "@foldkit/devtools/overlay.js#anonymous~73")), M.when('Message', () => __foldkitBrandViewResult((lazyTabContent('Message', messageTabContent, [
933
950
  model.maybeInspectedMessage,
934
951
  model.maybeSubmodelFilter,
935
952
  model.isFlattened,
936
953
  model.expandedPaths,
937
954
  inspectedTimestamp(model),
938
- ])), "@foldkit/devtools/overlay.js#anonymous~73")), M.when('Commands', () => __foldkitBrandViewResult((lazyTabContent('Commands', commandsTabContent, [
955
+ ])), "@foldkit/devtools/overlay.js#anonymous~74")), M.when('Commands', () => __foldkitBrandViewResult((lazyTabContent('Commands', commandsTabContent, [
939
956
  selectedCommands(model),
940
957
  model.expandedPaths,
941
- ])), "@foldkit/devtools/overlay.js#anonymous~74")), M.when('Mounts', () => {
958
+ ])), "@foldkit/devtools/overlay.js#anonymous~75")), M.when('Mounts', () => {
942
959
  const { starts, ends } = selectedMountActivity(model);
943
960
  return __foldkitBrandViewResult((lazyTabContent('Mounts', mountsTabContent, [
944
961
  starts,
945
962
  ends,
946
963
  model.expandedPaths,
947
- ])), "@foldkit/devtools/overlay.js#anonymous~75");
964
+ ])), "@foldkit/devtools/overlay.js#anonymous~76");
948
965
  }), M.exhaustive)), "@foldkit/devtools/overlay.js#inspectorTabContent");
949
966
  const inspectorPaneView = (model) => __foldkitBrandViewResult((h.div([
950
967
  h.Class('flex flex-col border-l min-w-0 min-h-0 flex-1 dt-inspector-pane'),
@@ -963,7 +980,7 @@ const makeView = (position, mode, shadow, maybeBanner) => {
963
980
  h.Class(clsx('dt-tab-button cursor-pointer text-base font-mono px-3 py-1', tab.isActive
964
981
  ? 'text-dt dt-tab-active'
965
982
  : 'text-dt-muted')),
966
- ], [h.span([], [tab.value])])), "@foldkit/devtools/overlay.js#anonymous~76"))),
983
+ ], [h.span([], [tab.value])])), "@foldkit/devtools/overlay.js#anonymous~77"))),
967
984
  ...tabs.map(tab => __foldkitBrandViewResult((h.div([
968
985
  ...tab.panel,
969
986
  h.Class('flex flex-col flex-1 min-h-0 min-w-0'),
@@ -976,7 +993,7 @@ const makeView = (position, mode, shadow, maybeBanner) => {
976
993
  onNone: () => __foldkitBrandViewResult((emptyInspectorView), "@foldkit/devtools/overlay.js#onNone~10"),
977
994
  onSome: inspectedModel => __foldkitBrandViewResult((inspectorTabContent(model, tab.value, inspectedModel)), "@foldkit/devtools/overlay.js#onSome~7"),
978
995
  }),
979
- ])), "@foldkit/devtools/overlay.js#anonymous~77")),
996
+ ])), "@foldkit/devtools/overlay.js#anonymous~78")),
980
997
  ])), "@foldkit/devtools/overlay.js#toView"),
981
998
  },
982
999
  toParentMessage: message => __foldkitBrandViewResult((GotInspectorTabsMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage~2"),
@@ -1053,7 +1070,7 @@ const makeView = (position, mode, shadow, maybeBanner) => {
1053
1070
  view: SubmodelFilterListbox.view,
1054
1071
  viewInputs: {
1055
1072
  items: [ALL_MESSAGES_VALUE, ...model.submodelTags],
1056
- maybeSelectedValue: Option.orElseSome(model.maybeSubmodelFilter, () => __foldkitBrandViewResult((ALL_MESSAGES_VALUE), "@foldkit/devtools/overlay.js#anonymous~78")),
1073
+ maybeSelectedValue: Option.orElseSome(model.maybeSubmodelFilter, () => __foldkitBrandViewResult((ALL_MESSAGES_VALUE), "@foldkit/devtools/overlay.js#anonymous~79")),
1057
1074
  itemToConfig: item => (__foldkitBrandViewResult(({
1058
1075
  className: 'dt-filter-item',
1059
1076
  content: h.div([h.Class('flex items-center gap-2')], [checkIconView, h.span([], [filterItemLabel(item)])]),
@@ -1099,7 +1116,7 @@ const makeView = (position, mode, shadow, maybeBanner) => {
1099
1116
  ], ['Label each row with its innermost Message']),
1100
1117
  ]),
1101
1118
  ])), "@foldkit/devtools/overlay.js#toView~2"),
1102
- })), "@foldkit/devtools/overlay.js#flattenSwitchView");
1119
+ }, h)), "@foldkit/devtools/overlay.js#flattenSwitchView");
1103
1120
  const settingsScreenView = (model) => __foldkitBrandViewResult((h.div([h.Class('flex flex-col flex-1 min-h-0 overflow-y-auto overscroll-none')], [
1104
1121
  h.div([h.Class('flex flex-col')], [
1105
1122
  h.span([h.Class('dt-settings-section-title')], ['Message List']),
@@ -1119,14 +1136,14 @@ const makeView = (position, mode, shadow, maybeBanner) => {
1119
1136
  : {
1120
1137
  status: h.span([h.Class(`${statusClass} text-dt-live font-medium`)], ['Live']),
1121
1138
  maybeAction: Option.none(),
1122
- }), "@foldkit/devtools/overlay.js#anonymous~79")), M.when('Inspect', () => (__foldkitBrandViewResult(({
1139
+ }), "@foldkit/devtools/overlay.js#anonymous~80")), M.when('Inspect', () => (__foldkitBrandViewResult(({
1123
1140
  status: h.span([h.Class(`${statusClass} text-dt-accent`)], [
1124
1141
  model.selectedIndex === INIT_INDEX
1125
1142
  ? 'Inspecting (init)'
1126
1143
  : `Inspecting (${model.selectedIndex + 1})`,
1127
1144
  ]),
1128
1145
  maybeAction: OptionExt.when(!model.isFollowingLatest, h.button([h.Class(actionButtonClass), h.OnClick(ClickedFollowLatest())], ['Follow Latest →'])),
1129
- }), "@foldkit/devtools/overlay.js#anonymous~80"))), M.exhaustive);
1146
+ }), "@foldkit/devtools/overlay.js#anonymous~81"))), M.exhaustive);
1130
1147
  const maybeClearHistoryButton = OptionExt.when(!model.isPaused, clearHistoryButton());
1131
1148
  return __foldkitBrandViewResult((h.header([h.Class(headerClass)], [
1132
1149
  status,
@@ -1177,7 +1194,7 @@ const makeView = (position, mode, shadow, maybeBanner) => {
1177
1194
  }));
1178
1195
  const isInitSelected = selectedIndex === INIT_INDEX;
1179
1196
  const isFiltered = Option.isSome(maybeFilterTag);
1180
- const leafOrTag = (entry) => __foldkitBrandViewResult((Option.getOrElse(entry.maybeLeafTag, () => __foldkitBrandViewResult((entry.tag), "@foldkit/devtools/overlay.js#anonymous~81"))), "@foldkit/devtools/overlay.js#leafOrTag");
1197
+ const leafOrTag = (entry) => __foldkitBrandViewResult((Option.getOrElse(entry.maybeLeafTag, () => __foldkitBrandViewResult((entry.tag), "@foldkit/devtools/overlay.js#anonymous~82"))), "@foldkit/devtools/overlay.js#leafOrTag");
1181
1198
  const displayTagFor = (entry) => {
1182
1199
  if (isFlattened) {
1183
1200
  return __foldkitBrandViewResult((leafOrTag(entry)), "@foldkit/devtools/overlay.js#displayTagFor");
@@ -1185,15 +1202,15 @@ const makeView = (position, mode, shadow, maybeBanner) => {
1185
1202
  else {
1186
1203
  return __foldkitBrandViewResult((Option.match(maybeFilterTag, {
1187
1204
  onNone: () => __foldkitBrandViewResult((entry.tag), "@foldkit/devtools/overlay.js#onNone~13"),
1188
- onSome: filterTag => __foldkitBrandViewResult((pipe(entry.submodelPath, Array_.findFirstIndex(pathTag => __foldkitBrandViewResult((pathTag === filterTag), "@foldkit/devtools/overlay.js#anonymous~82")), Option.flatMap(filterIndex => __foldkitBrandViewResult((Array_.get(entry.submodelPath, Number_.increment(filterIndex))), "@foldkit/devtools/overlay.js#anonymous~83")), Option.orElse(() => __foldkitBrandViewResult((entry.maybeLeafTag), "@foldkit/devtools/overlay.js#anonymous~84")), Option.getOrElse(() => __foldkitBrandViewResult((entry.tag), "@foldkit/devtools/overlay.js#anonymous~85")))), "@foldkit/devtools/overlay.js#onSome~9"),
1205
+ onSome: filterTag => __foldkitBrandViewResult((pipe(entry.submodelPath, Array_.findFirstIndex(pathTag => __foldkitBrandViewResult((pathTag === filterTag), "@foldkit/devtools/overlay.js#anonymous~83")), Option.flatMap(filterIndex => __foldkitBrandViewResult((Array_.get(entry.submodelPath, Number_.increment(filterIndex))), "@foldkit/devtools/overlay.js#anonymous~84")), Option.orElse(() => __foldkitBrandViewResult((entry.maybeLeafTag), "@foldkit/devtools/overlay.js#anonymous~85")), Option.getOrElse(() => __foldkitBrandViewResult((entry.tag), "@foldkit/devtools/overlay.js#anonymous~86")))), "@foldkit/devtools/overlay.js#onSome~9"),
1189
1206
  })), "@foldkit/devtools/overlay.js#displayTagFor");
1190
1207
  }
1191
1208
  };
1192
1209
  const indexedEntries = pipe(entries, Array_.map((entry, arrayIndex) => (__foldkitBrandViewResult(({
1193
1210
  entry,
1194
1211
  absoluteIndex: startIndex + arrayIndex,
1195
- }), "@foldkit/devtools/overlay.js#anonymous~86"))), isFiltered
1196
- ? Array_.filter(({ entry }) => __foldkitBrandViewResult((Array_.contains(entry.submodelPath, maybeFilterTag.value)), "@foldkit/devtools/overlay.js#anonymous~87"))
1212
+ }), "@foldkit/devtools/overlay.js#anonymous~87"))), isFiltered
1213
+ ? Array_.filter(({ entry }) => __foldkitBrandViewResult((Array_.contains(entry.submodelPath, maybeFilterTag.value)), "@foldkit/devtools/overlay.js#anonymous~88"))
1197
1214
  : Function.identity);
1198
1215
  const messageRows = pipe(indexedEntries, Array_.map(({ entry, absoluteIndex }) => {
1199
1216
  const isSelected = selectedIndex === absoluteIndex;
@@ -1206,11 +1223,11 @@ const makeView = (position, mode, shadow, maybeBanner) => {
1206
1223
  isPausedHere,
1207
1224
  entry.timestamp - baseTimestamp,
1208
1225
  entry.isModelChanged,
1209
- ])), "@foldkit/devtools/overlay.js#anonymous~88");
1226
+ ])), "@foldkit/devtools/overlay.js#anonymous~89");
1210
1227
  }), Array_.reverse);
1211
1228
  return __foldkitBrandViewResult((h.ul([
1212
1229
  h.Class('message-list flex-1 overflow-y-auto min-h-0 overscroll-none'),
1213
- h.OnScroll(scrollTop => __foldkitBrandViewResult((ScrolledMessageList({ scrollTop })), "@foldkit/devtools/overlay.js#anonymous~89")),
1230
+ h.OnScroll(scrollTop => __foldkitBrandViewResult((ScrolledMessageList({ scrollTop })), "@foldkit/devtools/overlay.js#anonymous~90")),
1214
1231
  ], isFiltered
1215
1232
  ? messageRows
1216
1233
  : [
@@ -1323,13 +1340,13 @@ const makeView = (position, mode, shadow, maybeBanner) => {
1323
1340
  inspectorPaneView(model),
1324
1341
  ])), "@foldkit/devtools/overlay.js#messagesScreenView");
1325
1342
  };
1326
- const contentView = (model) => __foldkitBrandViewResult((M.value(model.screen).pipe(M.withReturnType(), M.when('Messages', () => __foldkitBrandViewResult((messagesScreenView(model)), "@foldkit/devtools/overlay.js#anonymous~90")), M.when('Settings', () => __foldkitBrandViewResult((settingsScreenView(model)), "@foldkit/devtools/overlay.js#anonymous~91")), M.exhaustive)), "@foldkit/devtools/overlay.js#contentView");
1343
+ const contentView = (model) => __foldkitBrandViewResult((M.value(model.screen).pipe(M.withReturnType(), M.when('Messages', () => __foldkitBrandViewResult((messagesScreenView(model)), "@foldkit/devtools/overlay.js#anonymous~91")), M.when('Settings', () => __foldkitBrandViewResult((settingsScreenView(model)), "@foldkit/devtools/overlay.js#anonymous~92")), M.exhaustive)), "@foldkit/devtools/overlay.js#contentView");
1327
1344
  const panelView = (model) => __foldkitBrandViewResult((h.div([
1328
1345
  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])),
1329
1346
  ], [
1330
1347
  ...Option.map(maybeBanner, banner => __foldkitBrandViewResult((h.div([
1331
1348
  h.Class('px-3 py-2 border-b text-sm text-dt-muted font-mono shrink-0 leading-snug'),
1332
- ], [banner])), "@foldkit/devtools/overlay.js#anonymous~92")).pipe(Option.toArray),
1349
+ ], [banner])), "@foldkit/devtools/overlay.js#anonymous~93")).pipe(Option.toArray),
1333
1350
  headerView(model),
1334
1351
  contentView(model),
1335
1352
  footerView(model),
@@ -1339,7 +1356,7 @@ const makeView = (position, mode, shadow, maybeBanner) => {
1339
1356
  ...OptionExt.when(model.isPaused && mode === 'TimeTravel', interactionBlocker()).pipe(Option.toArray),
1340
1357
  ...OptionExt.when(model.isOpen, panelView(model)).pipe(Option.toArray),
1341
1358
  badgeView(model),
1342
- ])), "@foldkit/devtools/overlay.js#anonymous~93")), "@foldkit/devtools/overlay.js#makeView");
1359
+ ])), "@foldkit/devtools/overlay.js#anonymous~94")), "@foldkit/devtools/overlay.js#buildOverlayView");
1343
1360
  };
1344
1361
  // CREATE
1345
1362
  const createShadowContainer = () => {
@@ -1367,9 +1384,9 @@ const createShadowContainer = () => {
1367
1384
  return __foldkitBrandViewResult(({ container, shadow }), "@foldkit/devtools/overlay.js#createShadowContainer");
1368
1385
  };
1369
1386
  export const createOverlay = (store, position, mode, maybeBanner) => __foldkitBrandViewResult((Effect.gen(function* () {
1370
- const { container, shadow } = yield* Effect.acquireRelease(Effect.sync(() => __foldkitBrandViewResult((createShadowContainer()), "@foldkit/devtools/overlay.js#anonymous~96")), createdShadowContainer => __foldkitBrandViewResult((Effect.sync(() => {
1387
+ const { container, shadow } = yield* Effect.acquireRelease(Effect.sync(() => __foldkitBrandViewResult((createShadowContainer()), "@foldkit/devtools/overlay.js#anonymous~97")), createdShadowContainer => __foldkitBrandViewResult((Effect.sync(() => {
1371
1388
  createdShadowContainer.shadow.host.remove();
1372
- })), "@foldkit/devtools/overlay.js#anonymous~97"));
1389
+ })), "@foldkit/devtools/overlay.js#anonymous~98"));
1373
1390
  container.id = '__foldkit_devtools_overlay__';
1374
1391
  const flags = Effect.gen(function* () {
1375
1392
  const storeState = yield* SubscriptionRef.get(store.stateRef);
@@ -1379,7 +1396,7 @@ export const createOverlay = (store, position, mode, maybeBanner) => __foldkitBr
1379
1396
  isMobile: window.matchMedia(MOBILE_BREAKPOINT_QUERY).matches,
1380
1397
  isFlattened,
1381
1398
  ...toDisplayState(storeState),
1382
- }), "@foldkit/devtools/overlay.js#anonymous~99");
1399
+ }), "@foldkit/devtools/overlay.js#anonymous~100");
1383
1400
  });
1384
1401
  const init = (flags) => {
1385
1402
  const { isFlattened, ...displayFlags } = flags;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foldkit/devtools",
3
- "version": "0.133.0",
3
+ "version": "0.134.0",
4
4
  "description": "In-browser DevTools overlay for Foldkit applications",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -31,9 +31,9 @@
31
31
  "rimraf": "^6.1.3",
32
32
  "typescript": "^6.0.3",
33
33
  "vitest": "^4.1.9",
34
- "@foldkit/ui": "0.133.0",
34
+ "@foldkit/ui": "0.134.0",
35
35
  "@foldkit/vite-plugin": "0.11.2",
36
- "foldkit": "0.133.0"
36
+ "foldkit": "0.134.0"
37
37
  },
38
38
  "keywords": [
39
39
  "foldkit",