@foldkit/devtools 0.156.0 → 0.157.0-canary.2f739758a278

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/overlay.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Context, Effect, HashSet, Option, Schema as S, SubscriptionRef } from 'effect';
1
+ import { Context, Effect, HashSet, Option, Schema, SubscriptionRef } from 'effect';
2
2
  import * as Command from 'foldkit/command';
3
3
  import { type CommandRecord, type DevToolsStore, type MountRecord, type StoreState } from 'foldkit/devtools-host';
4
4
  import type { DevToolsMode, DevToolsPosition } from 'foldkit/runtime';
@@ -32,13 +32,13 @@ export declare const UnlockScroll: Command.CommandDefinitionNoArgs<"UnlockScroll
32
32
  readonly _tag: "CompletedUnlockScroll";
33
33
  }, never, never>>;
34
34
  export declare const PersistDevToolsState: Command.CommandDefinitionWithArgs<"PersistDevToolsState", {
35
- isOpen: S.Boolean;
36
- isFlattened: S.Boolean;
35
+ isOpen: Schema.Boolean;
36
+ isFlattened: Schema.Boolean;
37
37
  }, Effect.Effect<{
38
38
  readonly _tag: "CompletedPersistDevToolsState";
39
39
  }, never, never>>;
40
40
  export declare const JumpToAndInspect: Command.CommandDefinitionWithArgs<"JumpToAndInspect", {
41
- index: S.Number;
41
+ index: Schema.Number;
42
42
  }, Effect.Effect<{
43
43
  readonly _tag: "ReceivedInspectedState";
44
44
  readonly model: unknown;
@@ -47,7 +47,7 @@ export declare const JumpToAndInspect: Command.CommandDefinitionWithArgs<"JumpTo
47
47
  readonly affectedPaths: HashSet.HashSet<string>;
48
48
  }, never, StoreService>>;
49
49
  export declare const InspectState: Command.CommandDefinitionWithArgs<"InspectState", {
50
- index: S.Number;
50
+ index: Schema.Number;
51
51
  }, Effect.Effect<{
52
52
  readonly _tag: "ReceivedInspectedState";
53
53
  readonly model: unknown;
@@ -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;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;;;;;;;;;;;;;;;;;;;AAqWrE,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;AAw6DF,eAAO,MAAM,aAAa,UACjB,aAAa,YACV,gBAAgB,QACpB,YAAY,eACL,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,EAGN,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;;;;;;;;;;;;;;;;;;;AAqWrE,cAAM,YAAa,SAAQ,iBAE1B;CAAG;;AAEJ,cAAM,iBAAkB,SAAQ,sBAGC;CAAG;AAEpC,eAAO,MAAM,UAAU;;iBAGrB,CAAA;AAEF,eAAO,MAAM,YAAY;;iBAGvB,CAAA;AAoCF,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;AA86DF,eAAO,MAAM,aAAa,UACjB,aAAa,YACV,gBAAgB,QACpB,YAAY,eACL,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,6DAmFhC,CAAA"}
package/dist/overlay.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
2
  import { clsx } from 'clsx';
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';
3
+ import { Array, Context, Effect, Function, HashSet, Match, Number, Option, Order, Predicate, Queue, Record, Schema, Stream, String, SubscriptionRef, pipe, } from 'effect';
4
4
  import { KeyValueStore } from 'effect/unstable/persistence';
5
5
  import { Update } from 'foldkit';
6
6
  import * as Command from 'foldkit/command';
@@ -21,130 +21,130 @@ import * as OptionExt from './internal/optionExtensions.js';
21
21
  import { overlayStyles } from './overlay-styles.js';
22
22
  const SubmodelFilterListbox = Listbox.create();
23
23
  // MODEL
24
- const DisplayCommand = S.Struct({
25
- name: S.String,
26
- args: S.Option(S.Record(S.String, S.Unknown)),
24
+ const DisplayCommand = Schema.Struct({
25
+ name: Schema.String,
26
+ args: Schema.Option(Schema.Record(Schema.String, Schema.Unknown)),
27
27
  });
28
- const DisplayMount = S.Struct({
29
- name: S.String,
30
- args: S.Option(S.Record(S.String, S.Unknown)),
28
+ const DisplayMount = Schema.Struct({
29
+ name: Schema.String,
30
+ args: Schema.Option(Schema.Record(Schema.String, Schema.Unknown)),
31
31
  });
32
- const DisplayEntry = S.Struct({
33
- tag: S.String,
34
- submodelPath: S.Array(S.String),
35
- maybeLeafTag: S.Option(S.String),
36
- commands: S.Array(DisplayCommand),
37
- mountStarts: S.Array(DisplayMount),
38
- mountEnds: S.Array(DisplayMount),
39
- timestamp: S.Number,
40
- isModelChanged: S.Boolean,
32
+ const DisplayEntry = Schema.Struct({
33
+ tag: Schema.String,
34
+ submodelPath: Schema.Array(Schema.String),
35
+ maybeLeafTag: Schema.Option(Schema.String),
36
+ commands: Schema.Array(DisplayCommand),
37
+ mountStarts: Schema.Array(DisplayMount),
38
+ mountEnds: Schema.Array(DisplayMount),
39
+ timestamp: Schema.Number,
40
+ isModelChanged: Schema.Boolean,
41
41
  });
42
42
  const INSPECTOR_TABS_ID = 'dt-inspector';
43
43
  const SUBMODEL_FILTER_ID = 'dt-submodel-filter';
44
44
  const FLATTEN_SWITCH_ID = 'dt-flatten-switch';
45
45
  const SCRUBBER_SLIDER_ID = 'dt-scrubber';
46
- const InspectorTab = S.Literals(['Model', 'Message', 'Commands', 'Mounts']);
46
+ const InspectorTab = Schema.Literals(['Model', 'Message', 'Commands', 'Mounts']);
47
47
  const INSPECTOR_TABS = InspectorTab.literals;
48
48
  const InspectorTabs = Tabs.create();
49
49
  /**
50
- * `S.Unknown` whose equivalence is reference equality. Effect 4's default
51
- * equivalence for `S.Unknown` is `Equal.equals`, which walks the value
50
+ * `Schema.Unknown` whose equivalence is reference equality. Effect 4's default
51
+ * equivalence for `Schema.Unknown` is `Equal.equals`, which walks the value
52
52
  * structurally (hash + compareRecords) instead of falling back to `===` like
53
53
  * Effect 3. The DevTools overlay holds whole user Model and Message snapshots
54
- * in fields typed as `S.Unknown`, so the runtime's per-dispatch
54
+ * in fields typed as `Schema.Unknown`, so the runtime's per-dispatch
55
55
  * `modelEquivalence` check would otherwise walk the entire payload three
56
56
  * times every time the user dispatches a Message. The snapshots are
57
57
  * through-traffic (different reference per frame iff different content),
58
58
  * which makes reference equality the correct comparison.
59
59
  */
60
- const UnknownByReference = S.Unknown.pipe(S.overrideToEquivalence(() => __foldkitBrandViewResult(((a, b) => __foldkitBrandViewResult((a === b), "@foldkit/devtools/overlay.js#anonymous~2")), "@foldkit/devtools/overlay.js#anonymous")));
61
- const Screen = S.Literals(['Messages', 'Settings']);
62
- const Model = S.Struct({
63
- isOpen: S.Boolean,
64
- isMobile: S.Boolean,
60
+ const UnknownByReference = Schema.Unknown.pipe(Schema.overrideToEquivalence(() => __foldkitBrandViewResult(((a, b) => __foldkitBrandViewResult((a === b), "@foldkit/devtools/overlay.js#anonymous~2")), "@foldkit/devtools/overlay.js#anonymous")));
61
+ const Screen = Schema.Literals(['Messages', 'Settings']);
62
+ const Model = Schema.Struct({
63
+ isOpen: Schema.Boolean,
64
+ isMobile: Schema.Boolean,
65
65
  screen: Screen,
66
- entries: S.Array(DisplayEntry),
67
- initCommands: S.Array(DisplayCommand),
68
- initMountStarts: S.Array(DisplayMount),
69
- startIndex: S.Number,
70
- isPaused: S.Boolean,
71
- pausedAtIndex: S.Number,
72
- selectedIndex: S.Number,
73
- isFollowingLatest: S.Boolean,
74
- isFollowingTop: S.Boolean,
75
- maybeInspectedModel: S.Option(UnknownByReference),
76
- maybeInspectedMessage: S.Option(UnknownByReference),
77
- submodelTags: S.Array(S.String),
78
- maybeSubmodelFilter: S.Option(S.String),
79
- isFlattened: S.Boolean,
66
+ entries: Schema.Array(DisplayEntry),
67
+ initCommands: Schema.Array(DisplayCommand),
68
+ initMountStarts: Schema.Array(DisplayMount),
69
+ startIndex: Schema.Number,
70
+ isPaused: Schema.Boolean,
71
+ pausedAtIndex: Schema.Number,
72
+ selectedIndex: Schema.Number,
73
+ isFollowingLatest: Schema.Boolean,
74
+ isFollowingTop: Schema.Boolean,
75
+ maybeInspectedModel: Schema.Option(UnknownByReference),
76
+ maybeInspectedMessage: Schema.Option(UnknownByReference),
77
+ submodelTags: Schema.Array(Schema.String),
78
+ maybeSubmodelFilter: Schema.Option(Schema.String),
79
+ isFlattened: Schema.Boolean,
80
80
  submodelFilterListbox: Listbox.Model,
81
- expandedPaths: S.HashSet(S.String),
82
- changedPaths: S.HashSet(S.String),
83
- affectedPaths: S.HashSet(S.String),
84
- maybePendingScrubIndex: S.Option(S.Number),
81
+ expandedPaths: Schema.HashSet(Schema.String),
82
+ changedPaths: Schema.HashSet(Schema.String),
83
+ affectedPaths: Schema.HashSet(Schema.String),
84
+ maybePendingScrubIndex: Schema.Option(Schema.Number),
85
85
  inspectorTabs: Tabs.Model,
86
86
  activeInspectorTab: InspectorTab,
87
87
  // NOTE: empirically, inlining `Slider.Model` here throws
88
88
  // "Cannot read properties of undefined (reading 'ast')" when running slider
89
89
  // tests, because slider imports html → runtime → overlay, and overlay
90
- // references Slider.Model mid-cycle. S.suspend defers the read until after
90
+ // references Slider.Model mid-cycle. Schema.suspend defers the read until after
91
91
  // the cycle resolves. Inlining Listbox.Model works in practice but goes
92
92
  // through the same import chain; the exact cause of the asymmetry isn't
93
93
  // pinned down. Suspend is the conservative fix until the runtime ↔ overlay
94
94
  // cycle is broken at the source.
95
- scrubberSlider: S.suspend(() => __foldkitBrandViewResult((Slider.Model), "@foldkit/devtools/overlay.js#anonymous~3")),
96
- scrubberValue: S.Number,
95
+ scrubberSlider: Schema.suspend(() => __foldkitBrandViewResult((Slider.Model), "@foldkit/devtools/overlay.js#anonymous~3")),
96
+ scrubberValue: Schema.Number,
97
97
  });
98
- const Flags = S.Struct({
99
- isOpen: S.Boolean,
100
- isMobile: S.Boolean,
101
- isFlattened: S.Boolean,
102
- entries: S.Array(DisplayEntry),
103
- initCommands: S.Array(DisplayCommand),
104
- initMountStarts: S.Array(DisplayMount),
105
- startIndex: S.Number,
106
- isPaused: S.Boolean,
107
- pausedAtIndex: S.Number,
98
+ const Flags = Schema.Struct({
99
+ isOpen: Schema.Boolean,
100
+ isMobile: Schema.Boolean,
101
+ isFlattened: Schema.Boolean,
102
+ entries: Schema.Array(DisplayEntry),
103
+ initCommands: Schema.Array(DisplayCommand),
104
+ initMountStarts: Schema.Array(DisplayMount),
105
+ startIndex: Schema.Number,
106
+ isPaused: Schema.Boolean,
107
+ pausedAtIndex: Schema.Number,
108
108
  });
109
109
  // MESSAGE
110
110
  // NOTE: suspend for the same init-order reason as scrubberSlider above.
111
111
  const Message = defineMessageUnion({
112
112
  ClickedToggle: {},
113
113
  ClickedSettingsToggle: {},
114
- ToggledFlatten: { isFlattened: S.Boolean },
114
+ ToggledFlatten: { isFlattened: Schema.Boolean },
115
115
  CompletedPersistDevToolsState: {},
116
- ClickedRow: { index: S.Number },
116
+ ClickedRow: { index: Schema.Number },
117
117
  ClickedResume: {},
118
118
  ClickedClear: {},
119
119
  ClickedFollowLatest: {},
120
120
  ClickedScrollToTopPill: {},
121
- ScrolledMessageList: { scrollTop: S.Number },
121
+ ScrolledMessageList: { scrollTop: Schema.Number },
122
122
  CompletedResume: {},
123
123
  CompletedClear: {},
124
124
  CompletedLockScroll: {},
125
125
  CompletedUnlockScroll: {},
126
126
  CompletedScrollToTop: {},
127
- CrossedMobileBreakpoint: { isMobile: S.Boolean },
127
+ CrossedMobileBreakpoint: { isMobile: Schema.Boolean },
128
128
  ReceivedInspectedState: {
129
- model: S.Unknown,
130
- maybeMessage: S.Option(S.Unknown),
131
- changedPaths: S.HashSet(S.String),
132
- affectedPaths: S.HashSet(S.String),
129
+ model: Schema.Unknown,
130
+ maybeMessage: Schema.Option(Schema.Unknown),
131
+ changedPaths: Schema.HashSet(Schema.String),
132
+ affectedPaths: Schema.HashSet(Schema.String),
133
133
  },
134
- ToggledTreeNode: { path: S.String },
134
+ ToggledTreeNode: { path: Schema.String },
135
135
  TickedScrubFrame: {},
136
136
  GotInspectorTabsMessage: { message: Tabs.Message },
137
137
  ReceivedStoreUpdate: {
138
- entries: S.Array(DisplayEntry),
139
- initCommands: S.Array(DisplayCommand),
140
- initMountStarts: S.Array(DisplayMount),
141
- startIndex: S.Number,
142
- isPaused: S.Boolean,
143
- pausedAtIndex: S.Number,
138
+ entries: Schema.Array(DisplayEntry),
139
+ initCommands: Schema.Array(DisplayCommand),
140
+ initMountStarts: Schema.Array(DisplayMount),
141
+ startIndex: Schema.Number,
142
+ isPaused: Schema.Boolean,
143
+ pausedAtIndex: Schema.Number,
144
144
  },
145
145
  GotSubmodelFilterMessage: { message: Listbox.Message },
146
146
  GotScrubberSliderMessage: {
147
- message: S.suspend(() => __foldkitBrandViewResult((Slider.Message), "@foldkit/devtools/overlay.js#anonymous~4")),
147
+ message: Schema.suspend(() => __foldkitBrandViewResult((Slider.Message), "@foldkit/devtools/overlay.js#anonymous~4")),
148
148
  },
149
149
  });
150
150
  // HELPERS
@@ -157,7 +157,7 @@ const ALL_MESSAGES_VALUE = '';
157
157
  const DEVTOOLS_STORAGE_KEY = 'foldkit-devtools';
158
158
  const NO_COMMANDS = [];
159
159
  const NO_MOUNTS = [];
160
- const formatTimeDelta = (deltaMs) => __foldkitBrandViewResult((M.value(deltaMs).pipe(M.when(0, () => __foldkitBrandViewResult(('0ms'), "@foldkit/devtools/overlay.js#anonymous~5")), M.when(Number_.isLessThan(MILLIS_PER_SECOND), ms => __foldkitBrandViewResult((`+${Math.round(ms)}ms`), "@foldkit/devtools/overlay.js#anonymous~6")), M.orElse(ms => __foldkitBrandViewResult((`+${(ms / MILLIS_PER_SECOND).toFixed(1)}s`), "@foldkit/devtools/overlay.js#anonymous~7")))), "@foldkit/devtools/overlay.js#formatTimeDelta");
160
+ const formatTimeDelta = (deltaMs) => __foldkitBrandViewResult((Match.value(deltaMs).pipe(Match.when(0, () => __foldkitBrandViewResult(('0ms'), "@foldkit/devtools/overlay.js#anonymous~5")), Match.when(Number.isLessThan(MILLIS_PER_SECOND), ms => __foldkitBrandViewResult((`+${Math.round(ms)}ms`), "@foldkit/devtools/overlay.js#anonymous~6")), Match.orElse(ms => __foldkitBrandViewResult((`+${(ms / MILLIS_PER_SECOND).toFixed(1)}s`), "@foldkit/devtools/overlay.js#anonymous~7")))), "@foldkit/devtools/overlay.js#formatTimeDelta");
161
161
  const MESSAGE_LIST_SELECTOR = '.message-list';
162
162
  // NOTE: scrubber slider value space is independent of the store's host
163
163
  // indices. Slider value 0 represents init; 1..entries.length represents
@@ -168,7 +168,7 @@ const MESSAGE_LIST_SELECTOR = '.message-list';
168
168
  const hostIndexToSliderValue = (hostIndex, startIndex) => (__foldkitBrandViewResult((hostIndex === INIT_INDEX ? 0 : hostIndex - startIndex + 1), "@foldkit/devtools/overlay.js#hostIndexToSliderValue"));
169
169
  const sliderValueToHostIndex = (sliderValue, startIndex) => (__foldkitBrandViewResult((sliderValue === 0 ? INIT_INDEX : startIndex + sliderValue - 1), "@foldkit/devtools/overlay.js#sliderValueToHostIndex"));
170
170
  const SCROLL_FOLLOW_THRESHOLD_PX = 8;
171
- const computeSubmodelTags = (entries) => __foldkitBrandViewResult((pipe(entries, Array_.flatMap(({ submodelPath }) => __foldkitBrandViewResult((submodelPath), "@foldkit/devtools/overlay.js#anonymous~8")), Array_.dedupe, Array_.sort(Order.String))), "@foldkit/devtools/overlay.js#computeSubmodelTags");
171
+ const computeSubmodelTags = (entries) => __foldkitBrandViewResult((pipe(entries, Array.flatMap(({ submodelPath }) => __foldkitBrandViewResult((submodelPath), "@foldkit/devtools/overlay.js#anonymous~8")), Array.dedupe, Array.sort(Order.String))), "@foldkit/devtools/overlay.js#computeSubmodelTags");
172
172
  const toDisplayCommand = (command) => (__foldkitBrandViewResult(({
173
173
  name: command.name,
174
174
  args: Option.fromNullishOr(command.args),
@@ -177,43 +177,43 @@ const toDisplayMount = (mount) => (__foldkitBrandViewResult(({
177
177
  name: mount.name,
178
178
  args: Option.fromNullishOr(mount.args),
179
179
  }), "@foldkit/devtools/overlay.js#toDisplayMount"));
180
- const toDisplayEntries = ({ entries }) => __foldkitBrandViewResult((Array_.map(entries, entry => {
180
+ const toDisplayEntries = ({ entries }) => __foldkitBrandViewResult((Array.map(entries, entry => {
181
181
  const { submodelPath, maybeLeafTag } = extractSubmodelInfo(entry.tag, entry.message);
182
182
  return __foldkitBrandViewResult(({
183
183
  tag: entry.tag,
184
184
  submodelPath,
185
185
  maybeLeafTag,
186
- commands: Array_.map(entry.commands, toDisplayCommand),
187
- mountStarts: Array_.map(entry.mountStarts, toDisplayMount),
188
- mountEnds: Array_.map(entry.mountEnds, toDisplayMount),
186
+ commands: Array.map(entry.commands, toDisplayCommand),
187
+ mountStarts: Array.map(entry.mountStarts, toDisplayMount),
188
+ mountEnds: Array.map(entry.mountEnds, toDisplayMount),
189
189
  timestamp: entry.timestamp,
190
190
  isModelChanged: entry.isModelChanged,
191
191
  }), "@foldkit/devtools/overlay.js#anonymous~9");
192
192
  })), "@foldkit/devtools/overlay.js#toDisplayEntries");
193
193
  const toDisplayState = (state) => (__foldkitBrandViewResult(({
194
194
  entries: toDisplayEntries(state),
195
- initCommands: Array_.map(state.initCommands, toDisplayCommand),
196
- initMountStarts: Array_.map(state.initMountStarts, toDisplayMount),
195
+ initCommands: Array.map(state.initCommands, toDisplayCommand),
196
+ initMountStarts: Array.map(state.initMountStarts, toDisplayMount),
197
197
  startIndex: state.startIndex,
198
198
  isPaused: state.isPaused,
199
199
  pausedAtIndex: state.pausedAtIndex,
200
200
  }), "@foldkit/devtools/overlay.js#toDisplayState"));
201
201
  const isExpandable = Predicate.isObjectOrArray;
202
- const objectPreview = (value) => __foldkitBrandViewResult((pipe(value, Record.keys, Array_.filter(key => __foldkitBrandViewResult((key !== '_tag'), "@foldkit/devtools/overlay.js#anonymous~10")), Array_.match({
202
+ const objectPreview = (value) => __foldkitBrandViewResult((pipe(value, Record.keys, Array.filter(key => __foldkitBrandViewResult((key !== '_tag'), "@foldkit/devtools/overlay.js#anonymous~10")), Array.match({
203
203
  onEmpty: () => __foldkitBrandViewResult(('{}'), "@foldkit/devtools/overlay.js#onEmpty"),
204
204
  onNonEmpty: keys => {
205
- const preview = pipe(keys, Array_.take(MAX_PREVIEW_KEYS), Array_.join(', '));
206
- return __foldkitBrandViewResult((Array_.length(keys) > MAX_PREVIEW_KEYS
205
+ const preview = pipe(keys, Array.take(MAX_PREVIEW_KEYS), Array.join(', '));
206
+ return __foldkitBrandViewResult((Array.length(keys) > MAX_PREVIEW_KEYS
207
207
  ? `{ ${preview}, … }`
208
208
  : `{ ${preview} }`), "@foldkit/devtools/overlay.js#onNonEmpty");
209
209
  },
210
210
  }))), "@foldkit/devtools/overlay.js#objectPreview");
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({
211
+ const collapsedPreview = (value) => __foldkitBrandViewResult((Match.value(value).pipe(Match.when(globalThis.Array.isArray, array => __foldkitBrandViewResult((`(${array.length})`), "@foldkit/devtools/overlay.js#anonymous~11")), Match.when(Predicate.isObject, objectPreview), Match.orElse(() => __foldkitBrandViewResult((''), "@foldkit/devtools/overlay.js#anonymous~12")))), "@foldkit/devtools/overlay.js#collapsedPreview");
212
+ const foldInspectorTabsOutMessage = Tabs.OutMessage.match({
213
213
  Selected: ({ value }) => __foldkitBrandViewResult((model => (__foldkitBrandViewResult(({
214
214
  model: evo(model, { activeInspectorTab: () => __foldkitBrandViewResult((value), "@foldkit/devtools/overlay.js#activeInspectorTab") }),
215
215
  }), "@foldkit/devtools/overlay.js#anonymous~13"))), "@foldkit/devtools/overlay.js#Selected"),
216
- }));
216
+ });
217
217
  const foldInspectorTabs = Update.foldChild({
218
218
  update: InspectorTabs.update,
219
219
  read: (model) => __foldkitBrandViewResult((Option.some(model.inspectorTabs)), "@foldkit/devtools/overlay.js#read"),
@@ -221,13 +221,13 @@ const foldInspectorTabs = Update.foldChild({
221
221
  toParentMessage: message => __foldkitBrandViewResult((Message.GotInspectorTabsMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage"),
222
222
  foldOutMessage: foldInspectorTabsOutMessage,
223
223
  });
224
- const foldSubmodelFilterOutMessage = M.type().pipe(M.withReturnType(), M.tagsExhaustive({
224
+ const foldSubmodelFilterOutMessage = Listbox.OutMessage.match({
225
225
  Selected: ({ value }) => __foldkitBrandViewResult((model => (__foldkitBrandViewResult(({
226
226
  model: evo(model, {
227
- maybeSubmodelFilter: () => __foldkitBrandViewResult((Option.liftPredicate(value, String_.isNonEmpty)), "@foldkit/devtools/overlay.js#maybeSubmodelFilter"),
227
+ maybeSubmodelFilter: () => __foldkitBrandViewResult((Option.liftPredicate(value, String.isNonEmpty)), "@foldkit/devtools/overlay.js#maybeSubmodelFilter"),
228
228
  }),
229
229
  }), "@foldkit/devtools/overlay.js#anonymous~14"))), "@foldkit/devtools/overlay.js#Selected~2"),
230
- }));
230
+ });
231
231
  const foldSubmodelFilter = Update.foldChild({
232
232
  update: SubmodelFilterListbox.update,
233
233
  read: (model) => __foldkitBrandViewResult((Option.some(model.submodelFilterListbox)), "@foldkit/devtools/overlay.js#read~2"),
@@ -240,14 +240,14 @@ const foldSubmodelFilter = Update.foldChild({
240
240
  // NOTE: Pointer Messages update the thumb immediately, but jumping to and
241
241
  // inspecting the corresponding state is expensive. Keep only the latest host
242
242
  // index until TickedScrubFrame flushes one navigation on the next frame.
243
- const foldScrubberSliderOutMessage = M.type().pipe(M.withReturnType(), M.tagsExhaustive({
243
+ const foldScrubberSliderOutMessage = Slider.OutMessage.match({
244
244
  ChangedValue: ({ value }) => __foldkitBrandViewResult((model => (__foldkitBrandViewResult(({
245
245
  model: evo(model, {
246
246
  scrubberValue: () => __foldkitBrandViewResult((value), "@foldkit/devtools/overlay.js#scrubberValue"),
247
247
  maybePendingScrubIndex: () => __foldkitBrandViewResult((Option.some(sliderValueToHostIndex(value, model.startIndex))), "@foldkit/devtools/overlay.js#maybePendingScrubIndex"),
248
248
  }),
249
249
  }), "@foldkit/devtools/overlay.js#anonymous~15"))), "@foldkit/devtools/overlay.js#ChangedValue"),
250
- }));
250
+ });
251
251
  const foldScrubberSlider = Update.foldChild({
252
252
  update: Slider.update,
253
253
  read: (model) => __foldkitBrandViewResult((Option.some(model.scrubberSlider)), "@foldkit/devtools/overlay.js#read~3"),
@@ -269,11 +269,11 @@ export const UnlockScroll = Command.define('UnlockScroll', {
269
269
  });
270
270
  const maybeToggleScrollLock = (isEnabled, shouldLock) => __foldkitBrandViewResult((OptionExt.when(isEnabled, shouldLock ? LockScroll() : UnlockScroll())), "@foldkit/devtools/overlay.js#maybeToggleScrollLock");
271
271
  const maybeLockScroll = (isOpen, isMobile) => __foldkitBrandViewResult((OptionExt.when(isOpen && isMobile, LockScroll())), "@foldkit/devtools/overlay.js#maybeLockScroll");
272
- const DevToolsPersistedState = S.Struct({
273
- isOpen: S.Boolean.pipe(S.withDecodingDefault(Effect.succeed(false))),
274
- isFlattened: S.Boolean.pipe(S.withDecodingDefault(Effect.succeed(false))),
272
+ const DevToolsPersistedState = Schema.Struct({
273
+ isOpen: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(false))),
274
+ isFlattened: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(false))),
275
275
  });
276
- const DevToolsPersistedStateJson = S.fromJsonString(DevToolsPersistedState);
276
+ const DevToolsPersistedStateJson = Schema.fromJsonString(DevToolsPersistedState);
277
277
  const DEFAULT_PERSISTED_STATE = {
278
278
  isOpen: false,
279
279
  isFlattened: false,
@@ -281,14 +281,14 @@ const DEFAULT_PERSISTED_STATE = {
281
281
  const readPersistedState = Effect.gen(function* () {
282
282
  const store = yield* KeyValueStore.KeyValueStore;
283
283
  const json = yield* Effect.fromOption(Option.fromNullishOr(yield* store.get(DEVTOOLS_STORAGE_KEY)));
284
- return __foldkitBrandViewResult((yield* S.decodeEffect(DevToolsPersistedStateJson)(json)), "@foldkit/devtools/overlay.js#anonymous~16");
284
+ return __foldkitBrandViewResult((yield* Schema.decodeEffect(DevToolsPersistedStateJson)(json)), "@foldkit/devtools/overlay.js#anonymous~16");
285
285
  }).pipe(Effect.catch(() => __foldkitBrandViewResult((Effect.succeed(DEFAULT_PERSISTED_STATE)), "@foldkit/devtools/overlay.js#anonymous~17")), Effect.provide(BrowserKeyValueStore.layerLocalStorage));
286
286
  export const PersistDevToolsState = Command.define('PersistDevToolsState', {
287
- args: { isOpen: S.Boolean, isFlattened: S.Boolean },
287
+ args: { isOpen: Schema.Boolean, isFlattened: Schema.Boolean },
288
288
  messages: [Message.CompletedPersistDevToolsState],
289
289
  execute: ({ isOpen, isFlattened }) => __foldkitBrandViewResult((Effect.gen(function* () {
290
290
  const store = yield* KeyValueStore.KeyValueStore;
291
- const json = yield* S.encodeEffect(DevToolsPersistedStateJson)({
291
+ const json = yield* Schema.encodeEffect(DevToolsPersistedStateJson)({
292
292
  isOpen,
293
293
  isFlattened,
294
294
  });
@@ -314,7 +314,7 @@ const buildInspectionEffect = (index) => __foldkitBrandViewResult((Effect.gen(fu
314
314
  // resolution. Inspect-only navigation (no host pause) still uses
315
315
  // `InspectState`, which resolves once on its own.
316
316
  export const JumpToAndInspect = Command.define('JumpToAndInspect', {
317
- args: { index: S.Number },
317
+ args: { index: Schema.Number },
318
318
  messages: [Message.ReceivedInspectedState],
319
319
  execute: ({ index }) => __foldkitBrandViewResult((Effect.gen(function* () {
320
320
  const store = yield* StoreService;
@@ -323,7 +323,7 @@ export const JumpToAndInspect = Command.define('JumpToAndInspect', {
323
323
  })), "@foldkit/devtools/overlay.js#execute~2"),
324
324
  });
325
325
  export const InspectState = Command.define('InspectState', {
326
- args: { index: S.Number },
326
+ args: { index: Schema.Number },
327
327
  messages: [Message.ReceivedInspectedState],
328
328
  execute: ({ index }) => __foldkitBrandViewResult((buildInspectionEffect(index)), "@foldkit/devtools/overlay.js#execute~3"),
329
329
  });
@@ -386,7 +386,7 @@ const makeUpdate = (store, shadow, mode) => {
386
386
  },
387
387
  ClickedSettingsToggle: () => (__foldkitBrandViewResult(({
388
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"),
389
+ screen: currentScreen => __foldkitBrandViewResult((Match.value(currentScreen).pipe(Match.withReturnType(), Match.when('Messages', () => __foldkitBrandViewResult(('Settings'), "@foldkit/devtools/overlay.js#anonymous~28")), Match.when('Settings', () => __foldkitBrandViewResult(('Messages'), "@foldkit/devtools/overlay.js#anonymous~29")), Match.exhaustive)), "@foldkit/devtools/overlay.js#screen"),
390
390
  }),
391
391
  }), "@foldkit/devtools/overlay.js#ClickedSettingsToggle")),
392
392
  ToggledFlatten: ({ isFlattened }) => (__foldkitBrandViewResult(({
@@ -397,16 +397,16 @@ const makeUpdate = (store, shadow, mode) => {
397
397
  model: evo(model, { isMobile: () => __foldkitBrandViewResult((isMobile), "@foldkit/devtools/overlay.js#isMobile") }),
398
398
  commands: Option.toArray(maybeToggleScrollLock(model.isOpen, isMobile)),
399
399
  }), "@foldkit/devtools/overlay.js#CrossedMobileBreakpoint")),
400
- ClickedRow: ({ index }) => __foldkitBrandViewResult((M.value(mode).pipe(M.withReturnType(), M.when('TimeTravel', () => (__foldkitBrandViewResult(({
400
+ ClickedRow: ({ index }) => __foldkitBrandViewResult((Match.value(mode).pipe(Match.withReturnType(), Match.when('TimeTravel', () => (__foldkitBrandViewResult(({
401
401
  model,
402
402
  commands: [jumpToAndInspect(index)],
403
- }), "@foldkit/devtools/overlay.js#anonymous~30"))), M.when('Inspect', () => (__foldkitBrandViewResult(({
403
+ }), "@foldkit/devtools/overlay.js#anonymous~30"))), Match.when('Inspect', () => (__foldkitBrandViewResult(({
404
404
  model: evo(model, {
405
405
  selectedIndex: () => __foldkitBrandViewResult((index), "@foldkit/devtools/overlay.js#selectedIndex"),
406
406
  isFollowingLatest: () => __foldkitBrandViewResult((false), "@foldkit/devtools/overlay.js#isFollowingLatest"),
407
407
  }),
408
408
  commands: [inspectState(index)],
409
- }), "@foldkit/devtools/overlay.js#anonymous~31"))), M.exhaustive)), "@foldkit/devtools/overlay.js#ClickedRow"),
409
+ }), "@foldkit/devtools/overlay.js#anonymous~31"))), Match.exhaustive)), "@foldkit/devtools/overlay.js#ClickedRow"),
410
410
  ClickedResume: () => (__foldkitBrandViewResult(({
411
411
  model: evo(model, {
412
412
  isFollowingTop: () => __foldkitBrandViewResult((true), "@foldkit/devtools/overlay.js#isFollowingTop"),
@@ -429,7 +429,7 @@ const makeUpdate = (store, shadow, mode) => {
429
429
  commands: [clear, inspectLatest, scrollToTop],
430
430
  }), "@foldkit/devtools/overlay.js#ClickedClear")),
431
431
  ClickedFollowLatest: () => {
432
- const latestIndex = Array_.match(model.entries, {
432
+ const latestIndex = Array.match(model.entries, {
433
433
  onEmpty: () => __foldkitBrandViewResult((INIT_INDEX), "@foldkit/devtools/overlay.js#onEmpty~2"),
434
434
  onNonEmpty: () => __foldkitBrandViewResult((model.startIndex + model.entries.length - 1), "@foldkit/devtools/overlay.js#onNonEmpty~2"),
435
435
  });
@@ -474,14 +474,14 @@ const makeUpdate = (store, shadow, mode) => {
474
474
  }),
475
475
  }), "@foldkit/devtools/overlay.js#ToggledTreeNode")),
476
476
  ReceivedStoreUpdate: ({ entries, initCommands, initMountStarts, startIndex, isPaused, pausedAtIndex, }) => {
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);
479
- const latestIndex = Array_.match(entries, {
477
+ const shouldFollowSelection = Match.value(mode).pipe(Match.when('TimeTravel', () => __foldkitBrandViewResult((!isPaused), "@foldkit/devtools/overlay.js#anonymous~32")), Match.when('Inspect', () => __foldkitBrandViewResult((model.isFollowingLatest), "@foldkit/devtools/overlay.js#anonymous~33")), Match.exhaustive);
478
+ const shouldFollowScroll = Match.value(mode).pipe(Match.when('TimeTravel', () => __foldkitBrandViewResult((!isPaused && model.isFollowingTop), "@foldkit/devtools/overlay.js#anonymous~34")), Match.when('Inspect', () => __foldkitBrandViewResult((model.isFollowingTop), "@foldkit/devtools/overlay.js#anonymous~35")), Match.exhaustive);
479
+ const latestIndex = Array.match(entries, {
480
480
  onEmpty: () => __foldkitBrandViewResult((INIT_INDEX), "@foldkit/devtools/overlay.js#onEmpty~3"),
481
481
  onNonEmpty: () => __foldkitBrandViewResult((startIndex + entries.length - 1), "@foldkit/devtools/overlay.js#onNonEmpty~3"),
482
482
  });
483
483
  const nextSubmodelTags = computeSubmodelTags(entries);
484
- const isFilterStale = Option.exists(model.maybeSubmodelFilter, filterTag => __foldkitBrandViewResult((!Array_.contains(nextSubmodelTags, filterTag)), "@foldkit/devtools/overlay.js#anonymous~36"));
484
+ const isFilterStale = Option.exists(model.maybeSubmodelFilter, filterTag => __foldkitBrandViewResult((!Array.contains(nextSubmodelTags, filterTag)), "@foldkit/devtools/overlay.js#anonymous~36"));
485
485
  const sliderMax = entries.length;
486
486
  const targetSliderValue = isPaused
487
487
  ? hostIndexToSliderValue(pausedAtIndex, startIndex)
@@ -498,7 +498,7 @@ const makeUpdate = (store, shadow, mode) => {
498
498
  maybeSubmodelFilter: current => __foldkitBrandViewResult((isFilterStale ? Option.none() : current), "@foldkit/devtools/overlay.js#maybeSubmodelFilter~3"),
499
499
  selectedIndex: current => __foldkitBrandViewResult((shouldFollowSelection ? latestIndex : current), "@foldkit/devtools/overlay.js#selectedIndex~4"),
500
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"),
501
+ scrubberValue: current => __foldkitBrandViewResult((Match.value(model.scrubberSlider.dragState).pipe(Match.tag('Dragging', () => __foldkitBrandViewResult((Slider.snapAndClamp(current, 0, sliderMax, 1)), "@foldkit/devtools/overlay.js#anonymous~37")), Match.orElse(() => __foldkitBrandViewResult((Slider.snapAndClamp(targetSliderValue, 0, sliderMax, 1)), "@foldkit/devtools/overlay.js#anonymous~38")))), "@foldkit/devtools/overlay.js#scrubberValue~2"),
502
502
  }),
503
503
  commands: [
504
504
  ...(shouldFollowSelection ? [inspectLatest] : []),
@@ -593,7 +593,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
593
593
  const lazyMessageList = createLazy();
594
594
  // JSON TREE
595
595
  const leafSpan = (className, text) => __foldkitBrandViewResult((h.span([h.Class(className)], [text])), "@foldkit/devtools/overlay.js#leafSpan");
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");
596
+ const leafValueView = (value) => __foldkitBrandViewResult((Match.value(value).pipe(Match.when(Predicate.isNull, () => __foldkitBrandViewResult((leafSpan('json-null italic', 'null')), "@foldkit/devtools/overlay.js#anonymous~49")), Match.when(Predicate.isUndefined, () => __foldkitBrandViewResult((leafSpan('json-null italic', 'undefined')), "@foldkit/devtools/overlay.js#anonymous~50")), Match.when(Predicate.isString, stringValue => __foldkitBrandViewResult((leafSpan('json-string', `"${stringValue}"`)), "@foldkit/devtools/overlay.js#anonymous~51")), Match.when(Predicate.isNumber, numberValue => __foldkitBrandViewResult((leafSpan('json-number', globalThis.String(numberValue))), "@foldkit/devtools/overlay.js#anonymous~52")), Match.when(Predicate.isBoolean, booleanValue => __foldkitBrandViewResult((leafSpan('json-boolean', globalThis.String(booleanValue))), "@foldkit/devtools/overlay.js#anonymous~53")), Match.orElse(unknownValue => __foldkitBrandViewResult((leafSpan('json-null', globalThis.String(unknownValue))), "@foldkit/devtools/overlay.js#anonymous~54")))), "@foldkit/devtools/overlay.js#leafValueView");
597
597
  const keyView = (key) => __foldkitBrandViewResult((h.span([h.Class('json-key')], [`${key}:\u00a0`])), "@foldkit/devtools/overlay.js#keyView");
598
598
  const CHEVRON_RIGHT = 'M8.25 4.5l7.5 7.5-7.5 7.5';
599
599
  const CHEVRON_DOWN = 'M19.5 8.25l-7.5 7.5-7.5-7.5';
@@ -617,12 +617,12 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
617
617
  const diffDotView = h.span([h.Class('diff-dot')]);
618
618
  const inlineDiffDotView = h.span([h.Class('diff-dot-inline')]);
619
619
  const RowSegment = defineTaggedUnion({
620
- ArrowSegment: { isExpanded: S.Boolean },
620
+ ArrowSegment: { isExpanded: Schema.Boolean },
621
621
  DiffDotSegment: {},
622
- KeyLabelSegment: { key: S.String },
623
- TagLabelSegment: { tag: S.String },
624
- PreviewSegment: { preview: S.String },
625
- LeafValueSegment: { value: S.Unknown },
622
+ KeyLabelSegment: { key: Schema.String },
623
+ TagLabelSegment: { tag: Schema.String },
624
+ PreviewSegment: { preview: Schema.String },
625
+ LeafValueSegment: { value: Schema.Unknown },
626
626
  });
627
627
  const rowSegmentView = RowSegment.match({
628
628
  ArrowSegment: ({ isExpanded }) => __foldkitBrandViewResult((arrowView(isExpanded)), "@foldkit/devtools/overlay.js#ArrowSegment"),
@@ -654,17 +654,17 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
654
654
  return;
655
655
  }
656
656
  const childDepth = isRoot && !indentRootChildren ? depth : depth + 1;
657
- if (Array.isArray(value)) {
657
+ if (globalThis.Array.isArray(value)) {
658
658
  value.forEach((item, arrayIndex) => __foldkitBrandViewResult((flattenTree({
659
659
  ...shared,
660
660
  value: item,
661
661
  treePath: `${treePath}.${arrayIndex}`,
662
662
  depth: childDepth,
663
- key: String(arrayIndex),
663
+ key: globalThis.String(arrayIndex),
664
664
  })), "@foldkit/devtools/overlay.js#anonymous~55"));
665
665
  }
666
666
  else if (Predicate.isObject(value)) {
667
- pipe(value, Record.toEntries, Array_.filter(([entryKey]) => __foldkitBrandViewResult((entryKey !== '_tag'), "@foldkit/devtools/overlay.js#anonymous~56")), Array_.forEach(([entryKey, childValue]) => __foldkitBrandViewResult((flattenTree({
667
+ pipe(value, Record.toEntries, Array.filter(([entryKey]) => __foldkitBrandViewResult((entryKey !== '_tag'), "@foldkit/devtools/overlay.js#anonymous~56")), Array.forEach(([entryKey, childValue]) => __foldkitBrandViewResult((flattenTree({
668
668
  ...shared,
669
669
  value: childValue,
670
670
  treePath: `${treePath}.${entryKey}`,
@@ -679,7 +679,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
679
679
  if (!nodeIsExpandable) {
680
680
  const rowSegments = [
681
681
  ...(hasDiffDot ? [RowSegment.DiffDotSegment()] : []),
682
- ...(String_.isNonEmpty(key)
682
+ ...(String.isNonEmpty(key)
683
683
  ? [RowSegment.KeyLabelSegment({ key })]
684
684
  : []),
685
685
  RowSegment.LeafValueSegment({ value }),
@@ -693,15 +693,15 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
693
693
  ], 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");
694
694
  }
695
695
  const preview = isExpanded
696
- ? Array.isArray(value)
696
+ ? globalThis.Array.isArray(value)
697
697
  ? `(${value.length})`
698
698
  : ''
699
699
  : collapsedPreview(value);
700
700
  const rowSegments = [
701
701
  ...(isRoot ? [] : [RowSegment.ArrowSegment({ isExpanded })]),
702
702
  ...(!isRoot && hasDiffDot ? [RowSegment.DiffDotSegment()] : []),
703
- ...(String_.isNonEmpty(key) ? [RowSegment.KeyLabelSegment({ key })] : []),
704
- ...(String_.isNonEmpty(tag) ? [RowSegment.TagLabelSegment({ tag })] : []),
703
+ ...(String.isNonEmpty(key) ? [RowSegment.KeyLabelSegment({ key })] : []),
704
+ ...(String.isNonEmpty(tag) ? [RowSegment.TagLabelSegment({ tag })] : []),
705
705
  RowSegment.PreviewSegment({ preview }),
706
706
  ];
707
707
  return __foldkitBrandViewResult((h.ul([
@@ -751,11 +751,11 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
751
751
  if (selectedIndex === INIT_INDEX) {
752
752
  return __foldkitBrandViewResult(('0ms'), "@foldkit/devtools/overlay.js#inspectedTimestamp");
753
753
  }
754
- const baseTimestamp = pipe(model.entries, Array_.head, Option.match({
754
+ const baseTimestamp = pipe(model.entries, Array.head, Option.match({
755
755
  onNone: () => __foldkitBrandViewResult((0), "@foldkit/devtools/overlay.js#onNone~2"),
756
756
  onSome: ({ timestamp }) => __foldkitBrandViewResult((timestamp), "@foldkit/devtools/overlay.js#onSome~2"),
757
757
  }));
758
- return __foldkitBrandViewResult((pipe(Array_.get(model.entries, selectedIndex - model.startIndex), Option.map(entry => {
758
+ return __foldkitBrandViewResult((pipe(Array.get(model.entries, selectedIndex - model.startIndex), Option.map(entry => {
759
759
  const delta = entry.timestamp - baseTimestamp;
760
760
  const seconds = Math.floor(delta / MILLIS_PER_SECOND);
761
761
  const remainingMs = delta % MILLIS_PER_SECOND;
@@ -822,11 +822,11 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
822
822
  },
823
823
  })), "@foldkit/devtools/overlay.js#messageTabContent");
824
824
  const selectedHistoryIndex = (model) => {
825
- const lastIndex = Array_.match(model.entries, {
825
+ const lastIndex = Array.match(model.entries, {
826
826
  onEmpty: () => __foldkitBrandViewResult((INIT_INDEX), "@foldkit/devtools/overlay.js#onEmpty~4"),
827
827
  onNonEmpty: () => __foldkitBrandViewResult((model.startIndex + model.entries.length - 1), "@foldkit/devtools/overlay.js#onNonEmpty~4"),
828
828
  });
829
- 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");
829
+ return __foldkitBrandViewResult((Match.value(mode).pipe(Match.when('TimeTravel', () => __foldkitBrandViewResult((model.isPaused ? model.pausedAtIndex : lastIndex), "@foldkit/devtools/overlay.js#anonymous~63")), Match.when('Inspect', () => __foldkitBrandViewResult((model.selectedIndex), "@foldkit/devtools/overlay.js#anonymous~64")), Match.exhaustive)), "@foldkit/devtools/overlay.js#selectedHistoryIndex");
830
830
  };
831
831
  const selectedCommands = (model) => {
832
832
  const selectedIndex = selectedHistoryIndex(model);
@@ -834,7 +834,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
834
834
  return __foldkitBrandViewResult((model.initCommands), "@foldkit/devtools/overlay.js#selectedCommands");
835
835
  }
836
836
  else {
837
- 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");
837
+ 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");
838
838
  }
839
839
  };
840
840
  const flattenCommand = (command, index, expandedPaths) => {
@@ -858,15 +858,15 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
858
858
  });
859
859
  return __foldkitBrandViewResult((nodes), "@foldkit/devtools/overlay.js#flattenCommand");
860
860
  };
861
- const commandsTabContent = (commands, expandedPaths) => __foldkitBrandViewResult((Array_.match(commands, {
861
+ const commandsTabContent = (commands, expandedPaths) => __foldkitBrandViewResult((Array.match(commands, {
862
862
  onEmpty: () => __foldkitBrandViewResult((h.div([
863
863
  h.Class('flex-1 flex items-center justify-center text-dt-muted text-2xs font-mono min-w-0'),
864
864
  ], ['No Commands returned'])), "@foldkit/devtools/overlay.js#onEmpty~5"),
865
865
  onNonEmpty: commandList => __foldkitBrandViewResult((h.div([
866
866
  h.Class('flex flex-col flex-1 min-h-0 min-w-0 overflow-auto overscroll-none'),
867
- ], Array_.map(commandList, (command, index) => __foldkitBrandViewResult((h.div([h.Class('flex items-start px-2 py-1 border-b gap-1.5')], [
868
- h.span([h.Class(indexClass)], [String(index + 1)]),
869
- h.div([h.Class('flex flex-col flex-1 min-w-0')], Array_.map(flattenCommand(command, index, expandedPaths), renderFlatNode)),
867
+ ], Array.map(commandList, (command, index) => __foldkitBrandViewResult((h.div([h.Class('flex items-start px-2 py-1 border-b gap-1.5')], [
868
+ h.span([h.Class(indexClass)], [globalThis.String(index + 1)]),
869
+ h.div([h.Class('flex flex-col flex-1 min-w-0')], Array.map(flattenCommand(command, index, expandedPaths), renderFlatNode)),
870
870
  ])), "@foldkit/devtools/overlay.js#anonymous~67")))), "@foldkit/devtools/overlay.js#onNonEmpty~5"),
871
871
  })), "@foldkit/devtools/overlay.js#commandsTabContent");
872
872
  const selectedMountActivity = (model) => {
@@ -875,7 +875,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
875
875
  return __foldkitBrandViewResult(({ starts: model.initMountStarts, ends: NO_MOUNTS }), "@foldkit/devtools/overlay.js#selectedMountActivity");
876
876
  }
877
877
  else {
878
- return __foldkitBrandViewResult((pipe(model.entries, Array_.get(selectedIndex - model.startIndex), Option.match({
878
+ return __foldkitBrandViewResult((pipe(model.entries, Array.get(selectedIndex - model.startIndex), Option.match({
879
879
  onNone: () => (__foldkitBrandViewResult(({ starts: NO_MOUNTS, ends: NO_MOUNTS }), "@foldkit/devtools/overlay.js#onNone~4")),
880
880
  onSome: entry => (__foldkitBrandViewResult(({
881
881
  starts: entry.mountStarts,
@@ -909,14 +909,14 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
909
909
  h.div([
910
910
  h.Class('px-2 py-1 border-b text-2xs text-dt-muted font-mono shrink-0'),
911
911
  ], [label]),
912
- ...Array_.map(mounts, (mount, index) => __foldkitBrandViewResult((h.div([h.Class('flex items-start px-2 py-1 border-b gap-1.5')], [
913
- h.span([h.Class(indexClass)], [String(index + 1)]),
914
- h.div([h.Class('flex flex-col flex-1 min-w-0')], Array_.map(flattenMount(mount, label, index, expandedPaths), renderFlatNode)),
912
+ ...Array.map(mounts, (mount, index) => __foldkitBrandViewResult((h.div([h.Class('flex items-start px-2 py-1 border-b gap-1.5')], [
913
+ h.span([h.Class(indexClass)], [globalThis.String(index + 1)]),
914
+ h.div([h.Class('flex flex-col flex-1 min-w-0')], Array.map(flattenMount(mount, label, index, expandedPaths), renderFlatNode)),
915
915
  ])), "@foldkit/devtools/overlay.js#anonymous~68")),
916
916
  ])), "@foldkit/devtools/overlay.js#mountListSection");
917
917
  const mountsTabContent = (starts, ends, expandedPaths) => {
918
- const hasAny = Array_.isReadonlyArrayNonEmpty(starts) ||
919
- Array_.isReadonlyArrayNonEmpty(ends);
918
+ const hasAny = Array.isReadonlyArrayNonEmpty(starts) ||
919
+ Array.isReadonlyArrayNonEmpty(ends);
920
920
  if (!hasAny) {
921
921
  return __foldkitBrandViewResult((h.div([
922
922
  h.Class('flex-1 flex items-center justify-center text-dt-muted text-2xs font-mono min-w-0'),
@@ -925,36 +925,36 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
925
925
  return __foldkitBrandViewResult((h.div([
926
926
  h.Class('flex flex-col flex-1 min-h-0 min-w-0 overflow-auto overscroll-none'),
927
927
  ], [
928
- ...(Array_.isReadonlyArrayNonEmpty(starts)
928
+ ...(Array.isReadonlyArrayNonEmpty(starts)
929
929
  ? [mountListSection('Started', starts, expandedPaths)]
930
930
  : []),
931
- ...(Array_.isReadonlyArrayNonEmpty(ends)
931
+ ...(Array.isReadonlyArrayNonEmpty(ends)
932
932
  ? [mountListSection('Ended', ends, expandedPaths)]
933
933
  : []),
934
934
  ])), "@foldkit/devtools/overlay.js#mountsTabContent");
935
935
  };
936
- const inspectorTabContent = (model, tab, inspectedModel) => __foldkitBrandViewResult((M.value(tab).pipe(M.when('Model', () => __foldkitBrandViewResult((lazyTabContent('Model', modelTabContent, [
936
+ const inspectorTabContent = (model, tab, inspectedModel) => __foldkitBrandViewResult((Match.value(tab).pipe(Match.when('Model', () => __foldkitBrandViewResult((lazyTabContent('Model', modelTabContent, [
937
937
  inspectedModel,
938
938
  model.expandedPaths,
939
939
  model.changedPaths,
940
940
  model.affectedPaths,
941
- ])), "@foldkit/devtools/overlay.js#anonymous~69")), M.when('Message', () => __foldkitBrandViewResult((lazyTabContent('Message', messageTabContent, [
941
+ ])), "@foldkit/devtools/overlay.js#anonymous~69")), Match.when('Message', () => __foldkitBrandViewResult((lazyTabContent('Message', messageTabContent, [
942
942
  model.maybeInspectedMessage,
943
943
  model.maybeSubmodelFilter,
944
944
  model.isFlattened,
945
945
  model.expandedPaths,
946
946
  inspectedTimestamp(model),
947
- ])), "@foldkit/devtools/overlay.js#anonymous~70")), M.when('Commands', () => __foldkitBrandViewResult((lazyTabContent('Commands', commandsTabContent, [
947
+ ])), "@foldkit/devtools/overlay.js#anonymous~70")), Match.when('Commands', () => __foldkitBrandViewResult((lazyTabContent('Commands', commandsTabContent, [
948
948
  selectedCommands(model),
949
949
  model.expandedPaths,
950
- ])), "@foldkit/devtools/overlay.js#anonymous~71")), M.when('Mounts', () => {
950
+ ])), "@foldkit/devtools/overlay.js#anonymous~71")), Match.when('Mounts', () => {
951
951
  const { starts, ends } = selectedMountActivity(model);
952
952
  return __foldkitBrandViewResult((lazyTabContent('Mounts', mountsTabContent, [
953
953
  starts,
954
954
  ends,
955
955
  model.expandedPaths,
956
956
  ])), "@foldkit/devtools/overlay.js#anonymous~72");
957
- }), M.exhaustive)), "@foldkit/devtools/overlay.js#inspectorTabContent");
957
+ }), Match.exhaustive)), "@foldkit/devtools/overlay.js#inspectorTabContent");
958
958
  const inspectorPaneView = (model) => __foldkitBrandViewResult((h.div([
959
959
  h.Class('flex flex-col border-l min-w-0 min-h-0 flex-1 dt-inspector-pane'),
960
960
  ], [
@@ -1021,7 +1021,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
1021
1021
  const actionButtonClass = 'dt-resume-button bg-transparent border-none text-dt-live cursor-pointer text-base font-mono font-medium';
1022
1022
  const statusClass = 'text-base font-mono';
1023
1023
  const clearHistoryButton = () => __foldkitBrandViewResult((h.button([h.Class(headerButtonClass), h.OnClick(Message.ClickedClear())], ['Clear history'])), "@foldkit/devtools/overlay.js#clearHistoryButton");
1024
- const submodelLabel = (tag) => __foldkitBrandViewResult((pipe(tag, String_.replace(/^Got/, ''), String_.replace(/Message$/, ''))), "@foldkit/devtools/overlay.js#submodelLabel");
1024
+ const submodelLabel = (tag) => __foldkitBrandViewResult((pipe(tag, String.replace(/^Got/, ''), String.replace(/Message$/, ''))), "@foldkit/devtools/overlay.js#submodelLabel");
1025
1025
  const CHECK_ICON = 'M4.5 12.75l6 6 9-13.5';
1026
1026
  const checkIconView = h.svg([
1027
1027
  h.AriaHidden(true),
@@ -1038,7 +1038,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
1038
1038
  h.StrokeLinejoin('round'),
1039
1039
  ]),
1040
1040
  ]);
1041
- const filterItemLabel = (item) => __foldkitBrandViewResult((String_.isNonEmpty(item) ? submodelLabel(item) : 'All Messages'), "@foldkit/devtools/overlay.js#filterItemLabel");
1041
+ const filterItemLabel = (item) => __foldkitBrandViewResult((String.isNonEmpty(item) ? submodelLabel(item) : 'All Messages'), "@foldkit/devtools/overlay.js#filterItemLabel");
1042
1042
  const ARROW_UP = 'M4.5 10.5L12 3m0 0l7.5 7.5M12 3v18';
1043
1043
  const arrowUpIconView = h.svg([
1044
1044
  h.AriaHidden(true),
@@ -1124,7 +1124,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
1124
1124
  ]),
1125
1125
  ])), "@foldkit/devtools/overlay.js#settingsScreenView");
1126
1126
  const headerView = (model) => {
1127
- const { status, maybeAction } = M.value(mode).pipe(M.withReturnType(), M.when('TimeTravel', () => __foldkitBrandViewResult((model.isPaused
1127
+ const { status, maybeAction } = Match.value(mode).pipe(Match.withReturnType(), Match.when('TimeTravel', () => __foldkitBrandViewResult((model.isPaused
1128
1128
  ? {
1129
1129
  status: h.span([h.Class(`${statusClass} text-dt-paused`)], [
1130
1130
  model.pausedAtIndex === INIT_INDEX
@@ -1139,7 +1139,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
1139
1139
  : {
1140
1140
  status: h.span([h.Class(`${statusClass} text-dt-live font-medium`)], ['Live']),
1141
1141
  maybeAction: Option.none(),
1142
- }), "@foldkit/devtools/overlay.js#anonymous~76")), M.when('Inspect', () => (__foldkitBrandViewResult(({
1142
+ }), "@foldkit/devtools/overlay.js#anonymous~76")), Match.when('Inspect', () => (__foldkitBrandViewResult(({
1143
1143
  status: h.span([h.Class(`${statusClass} text-dt-accent`)], [
1144
1144
  model.selectedIndex === INIT_INDEX
1145
1145
  ? 'Inspecting (init)'
@@ -1149,7 +1149,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
1149
1149
  h.Class(actionButtonClass),
1150
1150
  h.OnClick(Message.ClickedFollowLatest()),
1151
1151
  ], ['Follow Latest →'])),
1152
- }), "@foldkit/devtools/overlay.js#anonymous~77"))), M.exhaustive);
1152
+ }), "@foldkit/devtools/overlay.js#anonymous~77"))), Match.exhaustive);
1153
1153
  const maybeClearHistoryButton = OptionExt.when(!model.isPaused, clearHistoryButton());
1154
1154
  return __foldkitBrandViewResult((h.header([h.Class(headerClass)], [
1155
1155
  status,
@@ -1181,20 +1181,20 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
1181
1181
  h.D('M5.75 3v18M18.25 3v18'),
1182
1182
  ]),
1183
1183
  ]);
1184
- const messageRowView = (tag, absoluteIndex, isSelected, isPausedHere, timeDelta, isModelChanged) => __foldkitBrandViewResult((h.keyed('li')(String(absoluteIndex), [
1184
+ const messageRowView = (tag, absoluteIndex, isSelected, isPausedHere, timeDelta, isModelChanged) => __foldkitBrandViewResult((h.keyed('li')(globalThis.String(absoluteIndex), [
1185
1185
  h.Class(clsx(ROW_BASE, { selected: isSelected })),
1186
1186
  h.OnClick(Message.ClickedRow({ index: absoluteIndex })),
1187
1187
  ], [
1188
1188
  ...OptionExt.when(mode === 'TimeTravel', h.span([h.Class('pause-column')], isPausedHere ? [pauseIconView] : [])).pipe(Option.toArray),
1189
1189
  h.span([h.Class('dot-column')], isModelChanged ? [inlineDiffDotView] : []),
1190
- h.span([h.Class(indexClass)], [String(absoluteIndex + 1)]),
1190
+ h.span([h.Class(indexClass)], [globalThis.String(absoluteIndex + 1)]),
1191
1191
  h.span([h.Class('text-base text-dt font-mono flex-1 truncate')], [tag]),
1192
1192
  h.span([
1193
1193
  h.Class('text-2xs text-dt-muted font-mono shrink-0 text-right min-w-5'),
1194
1194
  ], [formatTimeDelta(timeDelta)]),
1195
1195
  ])), "@foldkit/devtools/overlay.js#messageRowView");
1196
1196
  const messageListBody = (entries, startIndex, selectedIndex, isPaused, pausedAtIndex, maybeFilterTag, isFlattened) => {
1197
- const baseTimestamp = pipe(entries, Array_.head, Option.match({
1197
+ const baseTimestamp = pipe(entries, Array.head, Option.match({
1198
1198
  onNone: () => __foldkitBrandViewResult((0), "@foldkit/devtools/overlay.js#onNone~8"),
1199
1199
  onSome: ({ timestamp }) => __foldkitBrandViewResult((timestamp), "@foldkit/devtools/overlay.js#onSome~8"),
1200
1200
  }));
@@ -1208,21 +1208,21 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
1208
1208
  else {
1209
1209
  return __foldkitBrandViewResult((Option.match(maybeFilterTag, {
1210
1210
  onNone: () => __foldkitBrandViewResult((entry.tag), "@foldkit/devtools/overlay.js#onNone~9"),
1211
- 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"),
1211
+ 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"),
1212
1212
  })), "@foldkit/devtools/overlay.js#displayTagFor");
1213
1213
  }
1214
1214
  };
1215
- const indexedEntries = pipe(entries, Array_.map((entry, arrayIndex) => (__foldkitBrandViewResult(({
1215
+ const indexedEntries = pipe(entries, Array.map((entry, arrayIndex) => (__foldkitBrandViewResult(({
1216
1216
  entry,
1217
1217
  absoluteIndex: startIndex + arrayIndex,
1218
1218
  }), "@foldkit/devtools/overlay.js#anonymous~83"))), isFiltered
1219
- ? Array_.filter(({ entry }) => __foldkitBrandViewResult((Array_.contains(entry.submodelPath, maybeFilterTag.value)), "@foldkit/devtools/overlay.js#anonymous~84"))
1219
+ ? Array.filter(({ entry }) => __foldkitBrandViewResult((Array.contains(entry.submodelPath, maybeFilterTag.value)), "@foldkit/devtools/overlay.js#anonymous~84"))
1220
1220
  : Function.identity);
1221
- const messageRows = pipe(indexedEntries, Array_.map(({ entry, absoluteIndex }) => {
1221
+ const messageRows = pipe(indexedEntries, Array.map(({ entry, absoluteIndex }) => {
1222
1222
  const isSelected = selectedIndex === absoluteIndex;
1223
1223
  const isPausedHere = isPaused && pausedAtIndex === absoluteIndex;
1224
1224
  const displayTag = displayTagFor(entry);
1225
- return __foldkitBrandViewResult((lazyMessageRow(String(absoluteIndex), messageRowView, [
1225
+ return __foldkitBrandViewResult((lazyMessageRow(globalThis.String(absoluteIndex), messageRowView, [
1226
1226
  displayTag,
1227
1227
  absoluteIndex,
1228
1228
  isSelected,
@@ -1230,7 +1230,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
1230
1230
  entry.timestamp - baseTimestamp,
1231
1231
  entry.isModelChanged,
1232
1232
  ])), "@foldkit/devtools/overlay.js#anonymous~85");
1233
- }), Array_.reverse);
1233
+ }), Array.reverse);
1234
1234
  return __foldkitBrandViewResult((h.ul([
1235
1235
  h.Class('message-list flex-1 overflow-y-auto min-h-0 overscroll-none'),
1236
1236
  h.OnScroll(scrollTop => __foldkitBrandViewResult((Message.ScrolledMessageList({ scrollTop })), "@foldkit/devtools/overlay.js#anonymous~86")),
@@ -1255,8 +1255,8 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
1255
1255
  };
1256
1256
  // SCRUBBER
1257
1257
  const scrubberPositionLabel = (model) => {
1258
- const total = String(model.entries.length).padStart(3, '0');
1259
- const current = String(model.scrubberValue).padStart(3, '0');
1258
+ const total = globalThis.String(model.entries.length).padStart(3, '0');
1259
+ const current = globalThis.String(model.scrubberValue).padStart(3, '0');
1260
1260
  return __foldkitBrandViewResult((`${current} / ${total}`), "@foldkit/devtools/overlay.js#scrubberPositionLabel");
1261
1261
  };
1262
1262
  const scrubberView = (model) => __foldkitBrandViewResult((h.submodel({
@@ -1267,7 +1267,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
1267
1267
  value: model.scrubberValue,
1268
1268
  ariaLabel: 'Session scrubber',
1269
1269
  getTrackRoot: () => __foldkitBrandViewResult((shadow), "@foldkit/devtools/overlay.js#getTrackRoot"),
1270
- formatValue: value => __foldkitBrandViewResult((value === 0 ? 'init' : `Message ${String(value)}`), "@foldkit/devtools/overlay.js#formatValue"),
1270
+ formatValue: value => __foldkitBrandViewResult((value === 0 ? 'init' : `Message ${globalThis.String(value)}`), "@foldkit/devtools/overlay.js#formatValue"),
1271
1271
  toView: attributes => __foldkitBrandViewResult((h.div([h.Class('flex items-center gap-3 flex-1 min-w-0')], [
1272
1272
  h.div([
1273
1273
  ...attributes.root,
@@ -1338,7 +1338,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
1338
1338
  'dt-settings-button-active': isSettingsOpen,
1339
1339
  })),
1340
1340
  h.AriaLabel(isSettingsOpen ? 'Close settings' : 'Settings'),
1341
- h.AriaPressed(String(isSettingsOpen)),
1341
+ h.AriaPressed(globalThis.String(isSettingsOpen)),
1342
1342
  h.OnClick(Message.ClickedSettingsToggle()),
1343
1343
  ], [isSettingsOpen ? closeSettingsIconView : gearIconView])), "@foldkit/devtools/overlay.js#settingsToggleView");
1344
1344
  };
@@ -1350,7 +1350,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
1350
1350
  ])), "@foldkit/devtools/overlay.js#footerView");
1351
1351
  // PANEL
1352
1352
  const messagesScreenView = (model) => {
1353
- const maybeSubmodelFilterView = OptionExt.when(Array_.isReadonlyArrayNonEmpty(model.submodelTags), submodelFilterView(model));
1353
+ const maybeSubmodelFilterView = OptionExt.when(Array.isReadonlyArrayNonEmpty(model.submodelTags), submodelFilterView(model));
1354
1354
  const maybeScrollToTopPillView = OptionExt.when(!model.isFollowingTop, scrollToTopPillView());
1355
1355
  return __foldkitBrandViewResult((h.div([h.Class('flex flex-1 min-h-0 dt-content')], [
1356
1356
  h.div([h.Class('flex flex-col min-h-0 dt-message-pane')], [
@@ -1361,7 +1361,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
1361
1361
  inspectorPaneView(model),
1362
1362
  ])), "@foldkit/devtools/overlay.js#messagesScreenView");
1363
1363
  };
1364
- 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");
1364
+ const contentView = (model) => __foldkitBrandViewResult((Match.value(model.screen).pipe(Match.withReturnType(), Match.when('Messages', () => __foldkitBrandViewResult((messagesScreenView(model)), "@foldkit/devtools/overlay.js#anonymous~87")), Match.when('Settings', () => __foldkitBrandViewResult((settingsScreenView(model)), "@foldkit/devtools/overlay.js#anonymous~88")), Match.exhaustive)), "@foldkit/devtools/overlay.js#contentView");
1365
1365
  const panelView = (model) => __foldkitBrandViewResult((h.div([
1366
1366
  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])),
1367
1367
  ], [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foldkit/devtools",
3
- "version": "0.156.0",
3
+ "version": "0.157.0-canary.2f739758a278",
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.112",
18
- "@foldkit/ui": "^0",
18
+ "@foldkit/ui": "0.157.0-canary.2f739758a278",
19
19
  "effect": "4.0.0-rc.112",
20
- "foldkit": ">=0.153.0"
20
+ "foldkit": "0.157.0-canary.2f739758a278"
21
21
  },
22
22
  "dependencies": {
23
23
  "clsx": "^2.1.1"
@@ -25,12 +25,13 @@
25
25
  "devDependencies": {
26
26
  "@effect/platform-browser": "4.0.0-rc.112",
27
27
  "effect": "4.0.0-rc.112",
28
+ "happy-dom": "^20.11.13",
28
29
  "rimraf": "^6.1.3",
29
30
  "typescript": "^7.0.2",
30
31
  "vitest": "^4.1.11",
31
- "@foldkit/ui": "0.156.0",
32
- "@foldkit/vite-plugin": "0.20.0",
33
- "foldkit": "0.156.0"
32
+ "@foldkit/ui": "0.157.0-canary.2f739758a278",
33
+ "foldkit": "0.157.0-canary.2f739758a278",
34
+ "@foldkit/vite-plugin": "0.20.1-canary.2f739758a278"
34
35
  },
35
36
  "keywords": [
36
37
  "foldkit",