@foldkit/devtools 0.148.2 → 0.149.0-canary.805061650cfe
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.map +1 -1
- package/dist/overlay.js +85 -106
- package/package.json +10 -10
package/dist/overlay.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../src/overlay.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,OAAO,EACP,MAAM,EAEN,OAAO,EAGP,MAAM,EAKN,MAAM,IAAI,CAAC,EAGX,eAAe,EAEhB,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,aAAa,EAGlB,KAAK,WAAW,EAChB,KAAK,UAAU,EAKhB,MAAM,uBAAuB,CAAA;AAU9B,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;;
|
|
1
|
+
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../src/overlay.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,OAAO,EACP,MAAM,EAEN,OAAO,EAGP,MAAM,EAKN,MAAM,IAAI,CAAC,EAGX,eAAe,EAEhB,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,aAAa,EAGlB,KAAK,WAAW,EAChB,KAAK,UAAU,EAKhB,MAAM,uBAAuB,CAAA;AAU9B,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;;oFAsDzB,CAAC;;;;;;;;;;;;;;;;;AAqO7C,cAAM,YAAa,SAAQ,iBAE1B;CAAG;;AAEJ,cAAM,iBAAkB,SAAQ,sBAGC;CAAG;AAEpC,eAAO,MAAM,UAAU;;iBAGrB,CAAA;AAEF,eAAO,MAAM,YAAY;;iBAGvB,CAAA;AAgCF,eAAO,MAAM,oBAAoB;;;;;iBAkB/B,CAAA;AAuBF,eAAO,MAAM,gBAAgB;;;;;;;;wBAS3B,CAAA;AAEF,eAAO,MAAM,YAAY;;;;;;;;wBAIvB,CAAA;AAEF,eAAO,MAAM,aAAa;;;;;;wBAOxB,CAAA;AAEF,eAAO,MAAM,MAAM;;wBAOjB,CAAA;AAEF,eAAO,MAAM,KAAK;;wBAOhB,CAAA;AAEF,eAAO,MAAM,WAAW;;6BAUtB,CAAA;AAihEF,eAAO,MAAM,aAAa,GACxB,OAAO,aAAa,EACpB,UAAU,gBAAgB,EAC1B,MAAM,YAAY,EAClB,aAAa,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,6DAmFhC,CAAA"}
|
package/dist/overlay.js
CHANGED
|
@@ -6,7 +6,7 @@ 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
8
|
import { createKeyedLazy, createLazy, } from 'foldkit/html';
|
|
9
|
-
import {
|
|
9
|
+
import { defineMessageUnion } from 'foldkit/message';
|
|
10
10
|
import { makeElement } from 'foldkit/runtime';
|
|
11
11
|
import { ts } from 'foldkit/schema';
|
|
12
12
|
import { evo } from 'foldkit/struct';
|
|
@@ -106,75 +106,46 @@ const Flags = S.Struct({
|
|
|
106
106
|
pausedAtIndex: S.Number,
|
|
107
107
|
});
|
|
108
108
|
// MESSAGE
|
|
109
|
-
const ClickedToggle = m('ClickedToggle');
|
|
110
|
-
const ClickedSettingsToggle = m('ClickedSettingsToggle');
|
|
111
|
-
const ToggledFlatten = m('ToggledFlatten', { isFlattened: S.Boolean });
|
|
112
|
-
const CompletedPersistDevToolsState = m('CompletedPersistDevToolsState');
|
|
113
|
-
const ClickedRow = m('ClickedRow', { index: S.Number });
|
|
114
|
-
const ClickedResume = m('ClickedResume');
|
|
115
|
-
const ClickedClear = m('ClickedClear');
|
|
116
|
-
const CompletedResume = m('CompletedResume');
|
|
117
|
-
const ClickedFollowLatest = m('ClickedFollowLatest');
|
|
118
|
-
const ClickedScrollToTopPill = m('ClickedScrollToTopPill');
|
|
119
|
-
const ScrolledMessageList = m('ScrolledMessageList', { scrollTop: S.Number });
|
|
120
|
-
const CompletedClear = m('CompletedClear');
|
|
121
|
-
const CompletedLockScroll = m('CompletedLockScroll');
|
|
122
|
-
const CompletedUnlockScroll = m('CompletedUnlockScroll');
|
|
123
|
-
const CompletedScrollToTop = m('CompletedScrollToTop');
|
|
124
|
-
const CrossedMobileBreakpoint = m('CrossedMobileBreakpoint', {
|
|
125
|
-
isMobile: S.Boolean,
|
|
126
|
-
});
|
|
127
|
-
const ReceivedInspectedState = m('ReceivedInspectedState', {
|
|
128
|
-
model: S.Unknown,
|
|
129
|
-
maybeMessage: S.Option(S.Unknown),
|
|
130
|
-
changedPaths: S.HashSet(S.String),
|
|
131
|
-
affectedPaths: S.HashSet(S.String),
|
|
132
|
-
});
|
|
133
|
-
const ToggledTreeNode = m('ToggledTreeNode', { path: S.String });
|
|
134
|
-
const TickedScrubFrame = m('TickedScrubFrame');
|
|
135
|
-
const GotInspectorTabsMessage = m('GotInspectorTabsMessage', {
|
|
136
|
-
message: Tabs.Message,
|
|
137
|
-
});
|
|
138
|
-
const ReceivedStoreUpdate = m('ReceivedStoreUpdate', {
|
|
139
|
-
entries: S.Array(DisplayEntry),
|
|
140
|
-
initCommands: S.Array(DisplayCommand),
|
|
141
|
-
initMountStarts: S.Array(DisplayMount),
|
|
142
|
-
startIndex: S.Number,
|
|
143
|
-
isPaused: S.Boolean,
|
|
144
|
-
pausedAtIndex: S.Number,
|
|
145
|
-
});
|
|
146
|
-
const GotSubmodelFilterMessage = m('GotSubmodelFilterMessage', {
|
|
147
|
-
message: Listbox.Message,
|
|
148
|
-
});
|
|
149
109
|
// NOTE: suspend for the same init-order reason as scrubberSlider above.
|
|
150
|
-
const
|
|
151
|
-
|
|
110
|
+
const Message = defineMessageUnion({
|
|
111
|
+
ClickedToggle: {},
|
|
112
|
+
ClickedSettingsToggle: {},
|
|
113
|
+
ToggledFlatten: { isFlattened: S.Boolean },
|
|
114
|
+
CompletedPersistDevToolsState: {},
|
|
115
|
+
ClickedRow: { index: S.Number },
|
|
116
|
+
ClickedResume: {},
|
|
117
|
+
ClickedClear: {},
|
|
118
|
+
ClickedFollowLatest: {},
|
|
119
|
+
ClickedScrollToTopPill: {},
|
|
120
|
+
ScrolledMessageList: { scrollTop: S.Number },
|
|
121
|
+
CompletedResume: {},
|
|
122
|
+
CompletedClear: {},
|
|
123
|
+
CompletedLockScroll: {},
|
|
124
|
+
CompletedUnlockScroll: {},
|
|
125
|
+
CompletedScrollToTop: {},
|
|
126
|
+
CrossedMobileBreakpoint: { isMobile: S.Boolean },
|
|
127
|
+
ReceivedInspectedState: {
|
|
128
|
+
model: S.Unknown,
|
|
129
|
+
maybeMessage: S.Option(S.Unknown),
|
|
130
|
+
changedPaths: S.HashSet(S.String),
|
|
131
|
+
affectedPaths: S.HashSet(S.String),
|
|
132
|
+
},
|
|
133
|
+
ToggledTreeNode: { path: S.String },
|
|
134
|
+
TickedScrubFrame: {},
|
|
135
|
+
GotInspectorTabsMessage: { message: Tabs.Message },
|
|
136
|
+
ReceivedStoreUpdate: {
|
|
137
|
+
entries: S.Array(DisplayEntry),
|
|
138
|
+
initCommands: S.Array(DisplayCommand),
|
|
139
|
+
initMountStarts: S.Array(DisplayMount),
|
|
140
|
+
startIndex: S.Number,
|
|
141
|
+
isPaused: S.Boolean,
|
|
142
|
+
pausedAtIndex: S.Number,
|
|
143
|
+
},
|
|
144
|
+
GotSubmodelFilterMessage: { message: Listbox.Message },
|
|
145
|
+
GotScrubberSliderMessage: {
|
|
146
|
+
message: S.suspend(() => __foldkitBrandViewResult((Slider.Message), "@foldkit/devtools/overlay.js#anonymous~4")),
|
|
147
|
+
},
|
|
152
148
|
});
|
|
153
|
-
const Message = S.Union([
|
|
154
|
-
ClickedToggle,
|
|
155
|
-
ClickedSettingsToggle,
|
|
156
|
-
ToggledFlatten,
|
|
157
|
-
CompletedPersistDevToolsState,
|
|
158
|
-
ClickedRow,
|
|
159
|
-
ClickedResume,
|
|
160
|
-
ClickedClear,
|
|
161
|
-
ClickedFollowLatest,
|
|
162
|
-
ClickedScrollToTopPill,
|
|
163
|
-
ScrolledMessageList,
|
|
164
|
-
CompletedResume,
|
|
165
|
-
CompletedClear,
|
|
166
|
-
CompletedLockScroll,
|
|
167
|
-
CompletedUnlockScroll,
|
|
168
|
-
CompletedScrollToTop,
|
|
169
|
-
CrossedMobileBreakpoint,
|
|
170
|
-
ReceivedInspectedState,
|
|
171
|
-
ToggledTreeNode,
|
|
172
|
-
TickedScrubFrame,
|
|
173
|
-
GotInspectorTabsMessage,
|
|
174
|
-
ReceivedStoreUpdate,
|
|
175
|
-
GotSubmodelFilterMessage,
|
|
176
|
-
GotScrubberSliderMessage,
|
|
177
|
-
]);
|
|
178
149
|
// HELPERS
|
|
179
150
|
const MILLIS_PER_SECOND = 1000;
|
|
180
151
|
const MOBILE_BREAKPOINT = 767;
|
|
@@ -242,12 +213,12 @@ class StoreService extends Context.Service()('foldkit/DevToolsStore') {
|
|
|
242
213
|
class ShadowRootService extends Context.Service()('foldkit/DevToolsShadowRoot') {
|
|
243
214
|
}
|
|
244
215
|
export const LockScroll = Command.define('LockScroll', {
|
|
245
|
-
messages: [CompletedLockScroll],
|
|
246
|
-
execute: lockScroll.pipe(Effect.as(CompletedLockScroll())),
|
|
216
|
+
messages: [Message.CompletedLockScroll],
|
|
217
|
+
execute: lockScroll.pipe(Effect.as(Message.CompletedLockScroll())),
|
|
247
218
|
});
|
|
248
219
|
export const UnlockScroll = Command.define('UnlockScroll', {
|
|
249
|
-
messages: [CompletedUnlockScroll],
|
|
250
|
-
execute: unlockScroll.pipe(Effect.as(CompletedUnlockScroll())),
|
|
220
|
+
messages: [Message.CompletedUnlockScroll],
|
|
221
|
+
execute: unlockScroll.pipe(Effect.as(Message.CompletedUnlockScroll())),
|
|
251
222
|
});
|
|
252
223
|
const maybeToggleScrollLock = (isEnabled, shouldLock) => __foldkitBrandViewResult((OptionExt.when(isEnabled, shouldLock ? LockScroll() : UnlockScroll())), "@foldkit/devtools/overlay.js#maybeToggleScrollLock");
|
|
253
224
|
const maybeLockScroll = (isOpen, isMobile) => __foldkitBrandViewResult((OptionExt.when(isOpen && isMobile, LockScroll())), "@foldkit/devtools/overlay.js#maybeLockScroll");
|
|
@@ -267,7 +238,7 @@ const readPersistedState = Effect.gen(function* () {
|
|
|
267
238
|
}).pipe(Effect.catch(() => __foldkitBrandViewResult((Effect.succeed(DEFAULT_PERSISTED_STATE)), "@foldkit/devtools/overlay.js#anonymous~14")), Effect.provide(BrowserKeyValueStore.layerLocalStorage));
|
|
268
239
|
export const PersistDevToolsState = Command.define('PersistDevToolsState', {
|
|
269
240
|
args: { isOpen: S.Boolean, isFlattened: S.Boolean },
|
|
270
|
-
messages: [CompletedPersistDevToolsState],
|
|
241
|
+
messages: [Message.CompletedPersistDevToolsState],
|
|
271
242
|
execute: ({ isOpen, isFlattened }) => __foldkitBrandViewResult((Effect.gen(function* () {
|
|
272
243
|
const store = yield* KeyValueStore.KeyValueStore;
|
|
273
244
|
const json = yield* S.encodeEffect(DevToolsPersistedStateJson)({
|
|
@@ -275,14 +246,14 @@ export const PersistDevToolsState = Command.define('PersistDevToolsState', {
|
|
|
275
246
|
isFlattened,
|
|
276
247
|
});
|
|
277
248
|
yield* store.set(DEVTOOLS_STORAGE_KEY, json);
|
|
278
|
-
return __foldkitBrandViewResult((CompletedPersistDevToolsState()), "@foldkit/devtools/overlay.js#anonymous~15");
|
|
279
|
-
}).pipe(Effect.catch(() => __foldkitBrandViewResult((Effect.succeed(CompletedPersistDevToolsState())), "@foldkit/devtools/overlay.js#anonymous~16")), Effect.provide(BrowserKeyValueStore.layerLocalStorage))), "@foldkit/devtools/overlay.js#execute"),
|
|
249
|
+
return __foldkitBrandViewResult((Message.CompletedPersistDevToolsState()), "@foldkit/devtools/overlay.js#anonymous~15");
|
|
250
|
+
}).pipe(Effect.catch(() => __foldkitBrandViewResult((Effect.succeed(Message.CompletedPersistDevToolsState())), "@foldkit/devtools/overlay.js#anonymous~16")), Effect.provide(BrowserKeyValueStore.layerLocalStorage))), "@foldkit/devtools/overlay.js#execute"),
|
|
280
251
|
});
|
|
281
252
|
const buildInspectionFromModel = (index, model) => __foldkitBrandViewResult((Effect.gen(function* () {
|
|
282
253
|
const store = yield* StoreService;
|
|
283
254
|
const maybeMessage = yield* store.getMessageAtIndex(index);
|
|
284
255
|
const diff = yield* store.getDiffAtIndex(index);
|
|
285
|
-
return __foldkitBrandViewResult((ReceivedInspectedState({ model, maybeMessage, ...diff })), "@foldkit/devtools/overlay.js#anonymous~17");
|
|
256
|
+
return __foldkitBrandViewResult((Message.ReceivedInspectedState({ model, maybeMessage, ...diff })), "@foldkit/devtools/overlay.js#anonymous~17");
|
|
286
257
|
})), "@foldkit/devtools/overlay.js#buildInspectionFromModel");
|
|
287
258
|
const buildInspectionEffect = (index) => __foldkitBrandViewResult((Effect.gen(function* () {
|
|
288
259
|
const store = yield* StoreService;
|
|
@@ -297,7 +268,7 @@ const buildInspectionEffect = (index) => __foldkitBrandViewResult((Effect.gen(fu
|
|
|
297
268
|
// `InspectState`, which resolves once on its own.
|
|
298
269
|
export const JumpToAndInspect = Command.define('JumpToAndInspect', {
|
|
299
270
|
args: { index: S.Number },
|
|
300
|
-
messages: [ReceivedInspectedState],
|
|
271
|
+
messages: [Message.ReceivedInspectedState],
|
|
301
272
|
execute: ({ index }) => __foldkitBrandViewResult((Effect.gen(function* () {
|
|
302
273
|
const store = yield* StoreService;
|
|
303
274
|
const model = yield* store.jumpTo(index);
|
|
@@ -306,11 +277,11 @@ export const JumpToAndInspect = Command.define('JumpToAndInspect', {
|
|
|
306
277
|
});
|
|
307
278
|
export const InspectState = Command.define('InspectState', {
|
|
308
279
|
args: { index: S.Number },
|
|
309
|
-
messages: [ReceivedInspectedState],
|
|
280
|
+
messages: [Message.ReceivedInspectedState],
|
|
310
281
|
execute: ({ index }) => __foldkitBrandViewResult((buildInspectionEffect(index)), "@foldkit/devtools/overlay.js#execute~3"),
|
|
311
282
|
});
|
|
312
283
|
export const InspectLatest = Command.define('InspectLatest', {
|
|
313
|
-
messages: [ReceivedInspectedState],
|
|
284
|
+
messages: [Message.ReceivedInspectedState],
|
|
314
285
|
execute: Effect.gen(function* () {
|
|
315
286
|
const store = yield* StoreService;
|
|
316
287
|
const state = yield* SubscriptionRef.get(store.stateRef);
|
|
@@ -318,30 +289,30 @@ export const InspectLatest = Command.define('InspectLatest', {
|
|
|
318
289
|
}),
|
|
319
290
|
});
|
|
320
291
|
export const Resume = Command.define('Resume', {
|
|
321
|
-
messages: [CompletedResume],
|
|
292
|
+
messages: [Message.CompletedResume],
|
|
322
293
|
execute: Effect.gen(function* () {
|
|
323
294
|
const store = yield* StoreService;
|
|
324
295
|
yield* store.resume;
|
|
325
|
-
return __foldkitBrandViewResult((CompletedResume()), "@foldkit/devtools/overlay.js#anonymous~21");
|
|
296
|
+
return __foldkitBrandViewResult((Message.CompletedResume()), "@foldkit/devtools/overlay.js#anonymous~21");
|
|
326
297
|
}),
|
|
327
298
|
});
|
|
328
299
|
export const Clear = Command.define('Clear', {
|
|
329
|
-
messages: [CompletedClear],
|
|
300
|
+
messages: [Message.CompletedClear],
|
|
330
301
|
execute: Effect.gen(function* () {
|
|
331
302
|
const store = yield* StoreService;
|
|
332
303
|
yield* store.clear;
|
|
333
|
-
return __foldkitBrandViewResult((CompletedClear()), "@foldkit/devtools/overlay.js#anonymous~22");
|
|
304
|
+
return __foldkitBrandViewResult((Message.CompletedClear()), "@foldkit/devtools/overlay.js#anonymous~22");
|
|
334
305
|
}),
|
|
335
306
|
});
|
|
336
307
|
export const ScrollToTop = Command.define('ScrollToTop', {
|
|
337
|
-
messages: [CompletedScrollToTop],
|
|
308
|
+
messages: [Message.CompletedScrollToTop],
|
|
338
309
|
execute: Effect.gen(function* () {
|
|
339
310
|
const shadow = yield* ShadowRootService;
|
|
340
311
|
const messageList = shadow.querySelector(MESSAGE_LIST_SELECTOR);
|
|
341
312
|
if (messageList instanceof HTMLElement) {
|
|
342
313
|
messageList.scrollTop = 0;
|
|
343
314
|
}
|
|
344
|
-
return __foldkitBrandViewResult((CompletedScrollToTop()), "@foldkit/devtools/overlay.js#anonymous~23");
|
|
315
|
+
return __foldkitBrandViewResult((Message.CompletedScrollToTop()), "@foldkit/devtools/overlay.js#anonymous~23");
|
|
345
316
|
}),
|
|
346
317
|
});
|
|
347
318
|
const makeUpdate = (store, shadow, mode) => {
|
|
@@ -459,7 +430,7 @@ const makeUpdate = (store, shadow, mode) => {
|
|
|
459
430
|
inspectorTabs: () => __foldkitBrandViewResult((nextTabsModel), "@foldkit/devtools/overlay.js#inspectorTabs"),
|
|
460
431
|
activeInspectorTab: () => __foldkitBrandViewResult((nextActiveInspectorTab), "@foldkit/devtools/overlay.js#activeInspectorTab"),
|
|
461
432
|
}),
|
|
462
|
-
Command.mapMessages(tabsCommands, message => __foldkitBrandViewResult((GotInspectorTabsMessage({ message })), "@foldkit/devtools/overlay.js#anonymous~29")),
|
|
433
|
+
Command.mapMessages(tabsCommands, message => __foldkitBrandViewResult((Message.GotInspectorTabsMessage({ message })), "@foldkit/devtools/overlay.js#anonymous~29")),
|
|
463
434
|
]), "@foldkit/devtools/overlay.js#GotInspectorTabsMessage");
|
|
464
435
|
},
|
|
465
436
|
ToggledTreeNode: ({ path }) => __foldkitBrandViewResult(([
|
|
@@ -505,7 +476,7 @@ const makeUpdate = (store, shadow, mode) => {
|
|
|
505
476
|
},
|
|
506
477
|
GotSubmodelFilterMessage: ({ message: listboxMessage }) => {
|
|
507
478
|
const [nextListboxModel, listboxCommands, maybeOutMessage] = SubmodelFilterListbox.update(model.submodelFilterListbox, listboxMessage);
|
|
508
|
-
const mappedCommands = Command.mapMessages(listboxCommands, message => __foldkitBrandViewResult((GotSubmodelFilterMessage({ message })), "@foldkit/devtools/overlay.js#anonymous~37"));
|
|
479
|
+
const mappedCommands = Command.mapMessages(listboxCommands, message => __foldkitBrandViewResult((Message.GotSubmodelFilterMessage({ message })), "@foldkit/devtools/overlay.js#anonymous~37"));
|
|
509
480
|
return __foldkitBrandViewResult((Option.match(maybeOutMessage, {
|
|
510
481
|
onNone: () => __foldkitBrandViewResult(([
|
|
511
482
|
evo(model, { submodelFilterListbox: () => __foldkitBrandViewResult((nextListboxModel), "@foldkit/devtools/overlay.js#submodelFilterListbox") }),
|
|
@@ -524,7 +495,7 @@ const makeUpdate = (store, shadow, mode) => {
|
|
|
524
495
|
},
|
|
525
496
|
GotScrubberSliderMessage: ({ message: sliderMessage }) => {
|
|
526
497
|
const [nextSlider, sliderCommands, maybeOutMessage] = Slider.update(model.scrubberSlider, sliderMessage);
|
|
527
|
-
const mappedSliderCommands = Command.mapMessages(sliderCommands, message => __foldkitBrandViewResult((GotScrubberSliderMessage({ message })), "@foldkit/devtools/overlay.js#anonymous~38"));
|
|
498
|
+
const mappedSliderCommands = Command.mapMessages(sliderCommands, message => __foldkitBrandViewResult((Message.GotScrubberSliderMessage({ message })), "@foldkit/devtools/overlay.js#anonymous~38"));
|
|
528
499
|
// NOTE: the thumb tracks every pointermove (cheap, model-only via
|
|
529
500
|
// `nextSlider`), but the heavy jump-plus-inspect is coalesced to one
|
|
530
501
|
// navigation per animation frame. Each `ChangedValue` overwrites the
|
|
@@ -569,18 +540,18 @@ const makeOverlaySubscriptions = (store, shadow) => {
|
|
|
569
540
|
scrubberEscape: sliderSubscriptions.dragEscape,
|
|
570
541
|
})({
|
|
571
542
|
toChildModel: model => __foldkitBrandViewResult((model.scrubberSlider), "@foldkit/devtools/overlay.js#toChildModel"),
|
|
572
|
-
toParentMessage: message => __foldkitBrandViewResult((GotScrubberSliderMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage"),
|
|
543
|
+
toParentMessage: message => __foldkitBrandViewResult((Message.GotScrubberSliderMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage"),
|
|
573
544
|
});
|
|
574
545
|
const ownSubscriptions = Subscription.make()(_entry => (__foldkitBrandViewResult(({
|
|
575
546
|
scrubFrame: Subscription.animationFrame({
|
|
576
547
|
isActive: model => __foldkitBrandViewResult((Option.isSome(model.maybePendingScrubIndex)), "@foldkit/devtools/overlay.js#isActive"),
|
|
577
|
-
toMessage: () => __foldkitBrandViewResult((TickedScrubFrame()), "@foldkit/devtools/overlay.js#toMessage"),
|
|
548
|
+
toMessage: () => __foldkitBrandViewResult((Message.TickedScrubFrame()), "@foldkit/devtools/overlay.js#toMessage"),
|
|
578
549
|
}),
|
|
579
|
-
storeUpdates: Subscription.persistent(Stream.concat(Stream.fromEffect(SubscriptionRef.get(store.stateRef).pipe(Effect.map(state => __foldkitBrandViewResult((ReceivedStoreUpdate(toDisplayState(state))), "@foldkit/devtools/overlay.js#anonymous~42")))), Stream.map(SubscriptionRef.changes(store.stateRef), state => __foldkitBrandViewResult((ReceivedStoreUpdate(toDisplayState(state))), "@foldkit/devtools/overlay.js#anonymous~43")))),
|
|
550
|
+
storeUpdates: Subscription.persistent(Stream.concat(Stream.fromEffect(SubscriptionRef.get(store.stateRef).pipe(Effect.map(state => __foldkitBrandViewResult((Message.ReceivedStoreUpdate(toDisplayState(state))), "@foldkit/devtools/overlay.js#anonymous~42")))), Stream.map(SubscriptionRef.changes(store.stateRef), state => __foldkitBrandViewResult((Message.ReceivedStoreUpdate(toDisplayState(state))), "@foldkit/devtools/overlay.js#anonymous~43")))),
|
|
580
551
|
mobileBreakpoint: Subscription.persistent(Stream.callback(queue => __foldkitBrandViewResult((Effect.acquireRelease(Effect.sync(() => {
|
|
581
552
|
const mediaQuery = window.matchMedia(MOBILE_BREAKPOINT_QUERY);
|
|
582
553
|
const handler = (event) => {
|
|
583
|
-
Queue.offerUnsafe(queue, CrossedMobileBreakpoint({ isMobile: event.matches }));
|
|
554
|
+
Queue.offerUnsafe(queue, Message.CrossedMobileBreakpoint({ isMobile: event.matches }));
|
|
584
555
|
};
|
|
585
556
|
mediaQuery.addEventListener('change', handler);
|
|
586
557
|
return __foldkitBrandViewResult(({ mediaQuery, handler }), "@foldkit/devtools/overlay.js#anonymous~45");
|
|
@@ -751,7 +722,9 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
751
722
|
'diff-changed': isChanged,
|
|
752
723
|
})),
|
|
753
724
|
indent,
|
|
754
|
-
...(isRoot
|
|
725
|
+
...(isRoot
|
|
726
|
+
? []
|
|
727
|
+
: [h.OnClick(Message.ToggledTreeNode({ path: treePath }))]),
|
|
755
728
|
], rowSegments.map(segment => __foldkitBrandViewResult((h.keyed('li')(segment._tag, [h.Class('contents')], [rowSegmentView(segment)])), "@foldkit/devtools/overlay.js#anonymous~60")))), "@foldkit/devtools/overlay.js#flatNodeView");
|
|
756
729
|
};
|
|
757
730
|
const renderFlatNode = (node) => __foldkitBrandViewResult((lazyTreeNode(node.treePath, flatNodeView, [
|
|
@@ -1026,14 +999,14 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
1026
999
|
])), "@foldkit/devtools/overlay.js#anonymous~75")),
|
|
1027
1000
|
])), "@foldkit/devtools/overlay.js#toView"),
|
|
1028
1001
|
},
|
|
1029
|
-
toParentMessage: message => __foldkitBrandViewResult((GotInspectorTabsMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage~2"),
|
|
1002
|
+
toParentMessage: message => __foldkitBrandViewResult((Message.GotInspectorTabsMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage~2"),
|
|
1030
1003
|
}),
|
|
1031
1004
|
])), "@foldkit/devtools/overlay.js#inspectorPaneView");
|
|
1032
1005
|
// MESSAGE LIST
|
|
1033
1006
|
const badgeView = (model) => __foldkitBrandViewResult((h.button([
|
|
1034
1007
|
h.Class(clsx('fixed bg-dt-bg text-dt cursor-pointer flex flex-col items-center justify-center font-mono outline-none dt-badge', BADGE_POSITION_CLASS[position], model.isPaused ? 'dt-badge-paused' : 'dt-badge-accent')),
|
|
1035
1008
|
h.Style({ width: '22px', height: '56px', fontSize: '10px' }),
|
|
1036
|
-
h.OnClick(ClickedToggle()),
|
|
1009
|
+
h.OnClick(Message.ClickedToggle()),
|
|
1037
1010
|
], [
|
|
1038
1011
|
model.isOpen
|
|
1039
1012
|
? h.svg([
|
|
@@ -1058,7 +1031,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
1058
1031
|
const headerClass = 'flex items-center justify-between px-3 py-1.5 border-b shrink-0';
|
|
1059
1032
|
const actionButtonClass = 'dt-resume-button bg-transparent border-none text-dt-live cursor-pointer text-base font-mono font-medium';
|
|
1060
1033
|
const statusClass = 'text-base font-mono';
|
|
1061
|
-
const clearHistoryButton = () => __foldkitBrandViewResult((h.button([h.Class(headerButtonClass), h.OnClick(ClickedClear())], ['Clear history'])), "@foldkit/devtools/overlay.js#clearHistoryButton");
|
|
1034
|
+
const clearHistoryButton = () => __foldkitBrandViewResult((h.button([h.Class(headerButtonClass), h.OnClick(Message.ClickedClear())], ['Clear history'])), "@foldkit/devtools/overlay.js#clearHistoryButton");
|
|
1062
1035
|
const submodelLabel = (tag) => __foldkitBrandViewResult((pipe(tag, String_.replace(/^Got/, ''), String_.replace(/Message$/, ''))), "@foldkit/devtools/overlay.js#submodelLabel");
|
|
1063
1036
|
const CHECK_ICON = 'M4.5 12.75l6 6 9-13.5';
|
|
1064
1037
|
const checkIconView = h.svg([
|
|
@@ -1093,7 +1066,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
1093
1066
|
h.StrokeLinejoin('round'),
|
|
1094
1067
|
]),
|
|
1095
1068
|
]);
|
|
1096
|
-
const scrollToTopPillView = () => __foldkitBrandViewResult((h.button([h.Class('dt-scroll-pill'), h.OnClick(ClickedScrollToTopPill())], [
|
|
1069
|
+
const scrollToTopPillView = () => __foldkitBrandViewResult((h.button([h.Class('dt-scroll-pill'), h.OnClick(Message.ClickedScrollToTopPill())], [
|
|
1097
1070
|
arrowUpIconView,
|
|
1098
1071
|
h.span([h.Class('dt-scroll-pill-text')], ['Jump to top']),
|
|
1099
1072
|
])), "@foldkit/devtools/overlay.js#scrollToTopPillView");
|
|
@@ -1136,14 +1109,14 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
1136
1109
|
className: 'dt-filter-wrapper',
|
|
1137
1110
|
backdropClassName: 'dt-filter-backdrop',
|
|
1138
1111
|
},
|
|
1139
|
-
toParentMessage: message => __foldkitBrandViewResult((GotSubmodelFilterMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage~3"),
|
|
1112
|
+
toParentMessage: message => __foldkitBrandViewResult((Message.GotSubmodelFilterMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage~3"),
|
|
1140
1113
|
})), "@foldkit/devtools/overlay.js#submodelFilterView");
|
|
1141
1114
|
};
|
|
1142
1115
|
// SETTINGS
|
|
1143
1116
|
const flattenSwitchView = (model) => __foldkitBrandViewResult((Switch.view({
|
|
1144
1117
|
id: FLATTEN_SWITCH_ID,
|
|
1145
1118
|
isChecked: model.isFlattened,
|
|
1146
|
-
onToggle: isFlattened => __foldkitBrandViewResult((ToggledFlatten({ isFlattened })), "@foldkit/devtools/overlay.js#onToggle"),
|
|
1119
|
+
onToggle: isFlattened => __foldkitBrandViewResult((Message.ToggledFlatten({ isFlattened })), "@foldkit/devtools/overlay.js#onToggle"),
|
|
1147
1120
|
toView: attributes => __foldkitBrandViewResult((h.div([h.Class('dt-settings-row')], [
|
|
1148
1121
|
h.div([...attributes.button, h.Class('dt-switch')], [h.span([h.Class('dt-switch-thumb')])]),
|
|
1149
1122
|
h.div([h.Class('dt-settings-row-text')], [
|
|
@@ -1169,7 +1142,10 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
1169
1142
|
? 'Paused (init)'
|
|
1170
1143
|
: `Paused (${model.pausedAtIndex + 1})`,
|
|
1171
1144
|
]),
|
|
1172
|
-
maybeAction: Option.some(h.button([
|
|
1145
|
+
maybeAction: Option.some(h.button([
|
|
1146
|
+
h.Class(actionButtonClass),
|
|
1147
|
+
h.OnClick(Message.ClickedResume()),
|
|
1148
|
+
], ['Resume →'])),
|
|
1173
1149
|
}
|
|
1174
1150
|
: {
|
|
1175
1151
|
status: h.span([h.Class(`${statusClass} text-dt-live font-medium`)], ['Live']),
|
|
@@ -1180,7 +1156,10 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
1180
1156
|
? 'Inspecting (init)'
|
|
1181
1157
|
: `Inspecting (${model.selectedIndex + 1})`,
|
|
1182
1158
|
]),
|
|
1183
|
-
maybeAction: OptionExt.when(!model.isFollowingLatest, h.button([
|
|
1159
|
+
maybeAction: OptionExt.when(!model.isFollowingLatest, h.button([
|
|
1160
|
+
h.Class(actionButtonClass),
|
|
1161
|
+
h.OnClick(Message.ClickedFollowLatest()),
|
|
1162
|
+
], ['Follow Latest →'])),
|
|
1184
1163
|
}), "@foldkit/devtools/overlay.js#anonymous~78"))), M.exhaustive);
|
|
1185
1164
|
const maybeClearHistoryButton = OptionExt.when(!model.isPaused, clearHistoryButton());
|
|
1186
1165
|
return __foldkitBrandViewResult((h.header([h.Class(headerClass)], [
|
|
@@ -1191,7 +1170,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
1191
1170
|
};
|
|
1192
1171
|
const initRowView = (isSelected, isPausedHere) => __foldkitBrandViewResult((h.keyed('li')('init', [
|
|
1193
1172
|
h.Class(clsx(ROW_BASE, { selected: isSelected })),
|
|
1194
|
-
h.OnClick(ClickedRow({ index: INIT_INDEX })),
|
|
1173
|
+
h.OnClick(Message.ClickedRow({ index: INIT_INDEX })),
|
|
1195
1174
|
], [
|
|
1196
1175
|
...OptionExt.when(mode === 'TimeTravel', h.span([h.Class('pause-column')], isPausedHere ? [pauseIconView] : [])).pipe(Option.toArray),
|
|
1197
1176
|
h.span([h.Class('dot-column')]),
|
|
@@ -1215,7 +1194,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
1215
1194
|
]);
|
|
1216
1195
|
const messageRowView = (tag, absoluteIndex, isSelected, isPausedHere, timeDelta, isModelChanged) => __foldkitBrandViewResult((h.keyed('li')(String(absoluteIndex), [
|
|
1217
1196
|
h.Class(clsx(ROW_BASE, { selected: isSelected })),
|
|
1218
|
-
h.OnClick(ClickedRow({ index: absoluteIndex })),
|
|
1197
|
+
h.OnClick(Message.ClickedRow({ index: absoluteIndex })),
|
|
1219
1198
|
], [
|
|
1220
1199
|
...OptionExt.when(mode === 'TimeTravel', h.span([h.Class('pause-column')], isPausedHere ? [pauseIconView] : [])).pipe(Option.toArray),
|
|
1221
1200
|
h.span([h.Class('dot-column')], isModelChanged ? [inlineDiffDotView] : []),
|
|
@@ -1265,7 +1244,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
1265
1244
|
}), Array_.reverse);
|
|
1266
1245
|
return __foldkitBrandViewResult((h.ul([
|
|
1267
1246
|
h.Class('message-list flex-1 overflow-y-auto min-h-0 overscroll-none'),
|
|
1268
|
-
h.OnScroll(scrollTop => __foldkitBrandViewResult((ScrolledMessageList({ scrollTop })), "@foldkit/devtools/overlay.js#anonymous~87")),
|
|
1247
|
+
h.OnScroll(scrollTop => __foldkitBrandViewResult((Message.ScrolledMessageList({ scrollTop })), "@foldkit/devtools/overlay.js#anonymous~87")),
|
|
1269
1248
|
], isFiltered
|
|
1270
1249
|
? messageRows
|
|
1271
1250
|
: [
|
|
@@ -1321,7 +1300,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
1321
1300
|
], [scrubberPositionLabel(model)]),
|
|
1322
1301
|
])), "@foldkit/devtools/overlay.js#toView~3"),
|
|
1323
1302
|
},
|
|
1324
|
-
toParentMessage: message => __foldkitBrandViewResult((GotScrubberSliderMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage~4"),
|
|
1303
|
+
toParentMessage: message => __foldkitBrandViewResult((Message.GotScrubberSliderMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage~4"),
|
|
1325
1304
|
})), "@foldkit/devtools/overlay.js#scrubberView");
|
|
1326
1305
|
// FOOTER
|
|
1327
1306
|
const isScrubberVisible = mode === 'TimeTravel';
|
|
@@ -1371,7 +1350,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
1371
1350
|
})),
|
|
1372
1351
|
h.AriaLabel(isSettingsOpen ? 'Close settings' : 'Settings'),
|
|
1373
1352
|
h.AriaPressed(String(isSettingsOpen)),
|
|
1374
|
-
h.OnClick(ClickedSettingsToggle()),
|
|
1353
|
+
h.OnClick(Message.ClickedSettingsToggle()),
|
|
1375
1354
|
], [isSettingsOpen ? closeSettingsIconView : gearIconView])), "@foldkit/devtools/overlay.js#settingsToggleView");
|
|
1376
1355
|
};
|
|
1377
1356
|
const footerView = (model) => __foldkitBrandViewResult((h.div([
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foldkit/devtools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.149.0-canary.805061650cfe",
|
|
4
4
|
"description": "In-browser DevTools overlay for Foldkit applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -14,23 +14,23 @@
|
|
|
14
14
|
"dist"
|
|
15
15
|
],
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@effect/platform-browser": "4.0.0-rc.
|
|
18
|
-
"@foldkit/ui": "
|
|
19
|
-
"effect": "4.0.0-rc.
|
|
20
|
-
"foldkit": "
|
|
17
|
+
"@effect/platform-browser": "4.0.0-rc.111",
|
|
18
|
+
"@foldkit/ui": "0.149.0-canary.805061650cfe",
|
|
19
|
+
"effect": "4.0.0-rc.111",
|
|
20
|
+
"foldkit": "0.149.0-canary.805061650cfe"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"clsx": "^2.1.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@effect/platform-browser": "4.0.0-rc.
|
|
27
|
-
"effect": "4.0.0-rc.
|
|
26
|
+
"@effect/platform-browser": "4.0.0-rc.111",
|
|
27
|
+
"effect": "4.0.0-rc.111",
|
|
28
28
|
"rimraf": "^6.1.3",
|
|
29
29
|
"typescript": "^6.0.3",
|
|
30
30
|
"vitest": "^4.1.9",
|
|
31
|
-
"@foldkit/
|
|
32
|
-
"@foldkit/
|
|
33
|
-
"foldkit": "0.
|
|
31
|
+
"@foldkit/vite-plugin": "0.16.2-canary.805061650cfe",
|
|
32
|
+
"@foldkit/ui": "0.149.0-canary.805061650cfe",
|
|
33
|
+
"foldkit": "0.149.0-canary.805061650cfe"
|
|
34
34
|
},
|
|
35
35
|
"keywords": [
|
|
36
36
|
"foldkit",
|