@foldkit/devtools 0.162.0 → 0.163.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/overlay.js +21 -21
- package/package.json +9 -9
package/dist/overlay.js
CHANGED
|
@@ -10,7 +10,7 @@ import { createKeyedLazy, createLazy, } from 'foldkit/html';
|
|
|
10
10
|
import { defineMessageUnion } from 'foldkit/message';
|
|
11
11
|
import { makeElement } from 'foldkit/runtime';
|
|
12
12
|
import { defineTaggedUnion } from 'foldkit/schema';
|
|
13
|
-
import {
|
|
13
|
+
import { modifyFields } from 'foldkit/struct';
|
|
14
14
|
import * as Subscription from 'foldkit/subscription';
|
|
15
15
|
import { BrowserKeyValueStore } from '@effect/platform-browser';
|
|
16
16
|
import * as Listbox from '@foldkit/ui/listbox';
|
|
@@ -215,19 +215,19 @@ const objectPreview = (value) => __foldkitBrandViewResult((pipe(value, Record.ke
|
|
|
215
215
|
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");
|
|
216
216
|
const foldInspectorTabsOutMessage = Tabs.OutMessage.match({
|
|
217
217
|
Selected: ({ value }) => __foldkitBrandViewResult((model => (__foldkitBrandViewResult(({
|
|
218
|
-
model:
|
|
218
|
+
model: modifyFields(model, { activeInspectorTab: () => __foldkitBrandViewResult((value), "@foldkit/devtools/overlay.js#activeInspectorTab") }),
|
|
219
219
|
}), "@foldkit/devtools/overlay.js#anonymous~13"))), "@foldkit/devtools/overlay.js#Selected"),
|
|
220
220
|
});
|
|
221
221
|
const foldInspectorTabs = Update.foldChild({
|
|
222
222
|
update: InspectorTabs.update,
|
|
223
223
|
read: (model) => __foldkitBrandViewResult((Option.some(model.inspectorTabs)), "@foldkit/devtools/overlay.js#read"),
|
|
224
|
-
write: (model, nextInspectorTabs) => __foldkitBrandViewResult((
|
|
224
|
+
write: (model, nextInspectorTabs) => __foldkitBrandViewResult((modifyFields(model, { inspectorTabs: () => __foldkitBrandViewResult((nextInspectorTabs), "@foldkit/devtools/overlay.js#inspectorTabs") })), "@foldkit/devtools/overlay.js#write"),
|
|
225
225
|
toParentMessage: message => __foldkitBrandViewResult((Message.GotInspectorTabsMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage"),
|
|
226
226
|
foldOutMessage: foldInspectorTabsOutMessage,
|
|
227
227
|
});
|
|
228
228
|
const foldSubmodelFilterOutMessage = Listbox.OutMessage.match({
|
|
229
229
|
Selected: ({ value }) => __foldkitBrandViewResult((model => (__foldkitBrandViewResult(({
|
|
230
|
-
model:
|
|
230
|
+
model: modifyFields(model, {
|
|
231
231
|
maybeSubmodelFilter: () => __foldkitBrandViewResult((Option.liftPredicate(value, String.isNonEmpty)), "@foldkit/devtools/overlay.js#maybeSubmodelFilter"),
|
|
232
232
|
}),
|
|
233
233
|
}), "@foldkit/devtools/overlay.js#anonymous~14"))), "@foldkit/devtools/overlay.js#Selected~2"),
|
|
@@ -235,7 +235,7 @@ const foldSubmodelFilterOutMessage = Listbox.OutMessage.match({
|
|
|
235
235
|
const foldSubmodelFilter = Update.foldChild({
|
|
236
236
|
update: SubmodelFilterListbox.update,
|
|
237
237
|
read: (model) => __foldkitBrandViewResult((Option.some(model.submodelFilterListbox)), "@foldkit/devtools/overlay.js#read~2"),
|
|
238
|
-
write: (model, nextSubmodelFilterListbox) => __foldkitBrandViewResult((
|
|
238
|
+
write: (model, nextSubmodelFilterListbox) => __foldkitBrandViewResult((modifyFields(model, {
|
|
239
239
|
submodelFilterListbox: () => __foldkitBrandViewResult((nextSubmodelFilterListbox), "@foldkit/devtools/overlay.js#submodelFilterListbox"),
|
|
240
240
|
})), "@foldkit/devtools/overlay.js#write~2"),
|
|
241
241
|
toParentMessage: message => __foldkitBrandViewResult((Message.GotSubmodelFilterMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage~2"),
|
|
@@ -246,7 +246,7 @@ const foldSubmodelFilter = Update.foldChild({
|
|
|
246
246
|
// index until TickedScrubFrame flushes one navigation on the next frame.
|
|
247
247
|
const foldScrubberSliderOutMessage = Slider.OutMessage.match({
|
|
248
248
|
ChangedValue: ({ value }) => __foldkitBrandViewResult((model => (__foldkitBrandViewResult(({
|
|
249
|
-
model:
|
|
249
|
+
model: modifyFields(model, {
|
|
250
250
|
scrubberValue: () => __foldkitBrandViewResult((value), "@foldkit/devtools/overlay.js#scrubberValue"),
|
|
251
251
|
maybePendingScrubIndex: () => __foldkitBrandViewResult((Option.some(sliderValueToHostIndex(value, model.startIndex))), "@foldkit/devtools/overlay.js#maybePendingScrubIndex"),
|
|
252
252
|
}),
|
|
@@ -255,7 +255,7 @@ const foldScrubberSliderOutMessage = Slider.OutMessage.match({
|
|
|
255
255
|
const foldScrubberSlider = Update.foldChild({
|
|
256
256
|
update: Slider.update,
|
|
257
257
|
read: (model) => __foldkitBrandViewResult((Option.some(model.scrubberSlider)), "@foldkit/devtools/overlay.js#read~3"),
|
|
258
|
-
write: (model, nextScrubberSlider) => __foldkitBrandViewResult((
|
|
258
|
+
write: (model, nextScrubberSlider) => __foldkitBrandViewResult((modifyFields(model, { scrubberSlider: () => __foldkitBrandViewResult((nextScrubberSlider), "@foldkit/devtools/overlay.js#scrubberSlider") })), "@foldkit/devtools/overlay.js#write~3"),
|
|
259
259
|
toParentMessage: message => __foldkitBrandViewResult((Message.GotScrubberSliderMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage~3"),
|
|
260
260
|
foldOutMessage: foldScrubberSliderOutMessage,
|
|
261
261
|
});
|
|
@@ -378,7 +378,7 @@ const makeUpdate = (store, shadow, mode) => {
|
|
|
378
378
|
ClickedToggle: () => {
|
|
379
379
|
const nextIsOpen = !model.isOpen;
|
|
380
380
|
return __foldkitBrandViewResult(({
|
|
381
|
-
model:
|
|
381
|
+
model: modifyFields(model, { isOpen: () => __foldkitBrandViewResult((nextIsOpen), "@foldkit/devtools/overlay.js#isOpen") }),
|
|
382
382
|
commands: [
|
|
383
383
|
...Option.toArray(maybeToggleScrollLock(model.isMobile, nextIsOpen)),
|
|
384
384
|
PersistDevToolsState({
|
|
@@ -389,30 +389,30 @@ const makeUpdate = (store, shadow, mode) => {
|
|
|
389
389
|
}), "@foldkit/devtools/overlay.js#ClickedToggle");
|
|
390
390
|
},
|
|
391
391
|
ClickedSettingsToggle: () => (__foldkitBrandViewResult(({
|
|
392
|
-
model:
|
|
392
|
+
model: modifyFields(model, {
|
|
393
393
|
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"),
|
|
394
394
|
}),
|
|
395
395
|
}), "@foldkit/devtools/overlay.js#ClickedSettingsToggle")),
|
|
396
396
|
ToggledFlatten: ({ isFlattened }) => (__foldkitBrandViewResult(({
|
|
397
|
-
model:
|
|
397
|
+
model: modifyFields(model, { isFlattened: () => __foldkitBrandViewResult((isFlattened), "@foldkit/devtools/overlay.js#isFlattened") }),
|
|
398
398
|
commands: [PersistDevToolsState({ isOpen: model.isOpen, isFlattened })],
|
|
399
399
|
}), "@foldkit/devtools/overlay.js#ToggledFlatten")),
|
|
400
400
|
CrossedMobileBreakpoint: ({ isMobile }) => (__foldkitBrandViewResult(({
|
|
401
|
-
model:
|
|
401
|
+
model: modifyFields(model, { isMobile: () => __foldkitBrandViewResult((isMobile), "@foldkit/devtools/overlay.js#isMobile") }),
|
|
402
402
|
commands: Option.toArray(maybeToggleScrollLock(model.isOpen, isMobile)),
|
|
403
403
|
}), "@foldkit/devtools/overlay.js#CrossedMobileBreakpoint")),
|
|
404
404
|
ClickedRow: ({ index }) => __foldkitBrandViewResult((Match.value(mode).pipe(Match.withReturnType(), Match.when('TimeTravel', () => (__foldkitBrandViewResult(({
|
|
405
405
|
model,
|
|
406
406
|
commands: [jumpToAndInspect(index)],
|
|
407
407
|
}), "@foldkit/devtools/overlay.js#anonymous~30"))), Match.when('Inspect', () => (__foldkitBrandViewResult(({
|
|
408
|
-
model:
|
|
408
|
+
model: modifyFields(model, {
|
|
409
409
|
selectedIndex: () => __foldkitBrandViewResult((index), "@foldkit/devtools/overlay.js#selectedIndex"),
|
|
410
410
|
isFollowingLatest: () => __foldkitBrandViewResult((false), "@foldkit/devtools/overlay.js#isFollowingLatest"),
|
|
411
411
|
}),
|
|
412
412
|
commands: [inspectState(index)],
|
|
413
413
|
}), "@foldkit/devtools/overlay.js#anonymous~31"))), Match.exhaustive)), "@foldkit/devtools/overlay.js#ClickedRow"),
|
|
414
414
|
ClickedResume: () => (__foldkitBrandViewResult(({
|
|
415
|
-
model:
|
|
415
|
+
model: modifyFields(model, {
|
|
416
416
|
isFollowingTop: () => __foldkitBrandViewResult((true), "@foldkit/devtools/overlay.js#isFollowingTop"),
|
|
417
417
|
expandedPaths: () => __foldkitBrandViewResult((HashSet.empty()), "@foldkit/devtools/overlay.js#expandedPaths"),
|
|
418
418
|
changedPaths: () => __foldkitBrandViewResult((HashSet.empty()), "@foldkit/devtools/overlay.js#changedPaths"),
|
|
@@ -421,7 +421,7 @@ const makeUpdate = (store, shadow, mode) => {
|
|
|
421
421
|
commands: [resume, inspectLatest, scrollToTop],
|
|
422
422
|
}), "@foldkit/devtools/overlay.js#ClickedResume")),
|
|
423
423
|
ClickedClear: () => (__foldkitBrandViewResult(({
|
|
424
|
-
model:
|
|
424
|
+
model: modifyFields(model, {
|
|
425
425
|
selectedIndex: () => __foldkitBrandViewResult((INIT_INDEX), "@foldkit/devtools/overlay.js#selectedIndex~2"),
|
|
426
426
|
isFollowingLatest: () => __foldkitBrandViewResult((true), "@foldkit/devtools/overlay.js#isFollowingLatest~2"),
|
|
427
427
|
isFollowingTop: () => __foldkitBrandViewResult((true), "@foldkit/devtools/overlay.js#isFollowingTop~2"),
|
|
@@ -438,7 +438,7 @@ const makeUpdate = (store, shadow, mode) => {
|
|
|
438
438
|
onNonEmpty: () => __foldkitBrandViewResult((model.startIndex + model.entries.length - 1), "@foldkit/devtools/overlay.js#onNonEmpty~2"),
|
|
439
439
|
});
|
|
440
440
|
return __foldkitBrandViewResult(({
|
|
441
|
-
model:
|
|
441
|
+
model: modifyFields(model, {
|
|
442
442
|
selectedIndex: () => __foldkitBrandViewResult((latestIndex), "@foldkit/devtools/overlay.js#selectedIndex~3"),
|
|
443
443
|
isFollowingLatest: () => __foldkitBrandViewResult((true), "@foldkit/devtools/overlay.js#isFollowingLatest~3"),
|
|
444
444
|
isFollowingTop: () => __foldkitBrandViewResult((true), "@foldkit/devtools/overlay.js#isFollowingTop~3"),
|
|
@@ -450,7 +450,7 @@ const makeUpdate = (store, shadow, mode) => {
|
|
|
450
450
|
}), "@foldkit/devtools/overlay.js#ClickedFollowLatest");
|
|
451
451
|
},
|
|
452
452
|
ClickedScrollToTopPill: () => (__foldkitBrandViewResult(({
|
|
453
|
-
model:
|
|
453
|
+
model: modifyFields(model, {
|
|
454
454
|
isFollowingTop: () => __foldkitBrandViewResult((true), "@foldkit/devtools/overlay.js#isFollowingTop~4"),
|
|
455
455
|
}),
|
|
456
456
|
commands: [scrollToTop],
|
|
@@ -459,10 +459,10 @@ const makeUpdate = (store, shadow, mode) => {
|
|
|
459
459
|
const isAtTop = scrollTop <= SCROLL_FOLLOW_THRESHOLD_PX;
|
|
460
460
|
return __foldkitBrandViewResult((isAtTop === model.isFollowingTop
|
|
461
461
|
? { model }
|
|
462
|
-
: { model:
|
|
462
|
+
: { model: modifyFields(model, { isFollowingTop: () => __foldkitBrandViewResult((isAtTop), "@foldkit/devtools/overlay.js#isFollowingTop~5") }) }), "@foldkit/devtools/overlay.js#ScrolledMessageList");
|
|
463
463
|
},
|
|
464
464
|
ReceivedInspectedState: ({ model: inspectedModel, maybeMessage, changedPaths, affectedPaths, }) => (__foldkitBrandViewResult(({
|
|
465
|
-
model:
|
|
465
|
+
model: modifyFields(model, {
|
|
466
466
|
maybeInspectedModel: () => __foldkitBrandViewResult((Option.some(inspectedModel)), "@foldkit/devtools/overlay.js#maybeInspectedModel"),
|
|
467
467
|
maybeInspectedMessage: () => __foldkitBrandViewResult((maybeMessage), "@foldkit/devtools/overlay.js#maybeInspectedMessage"),
|
|
468
468
|
changedPaths: () => __foldkitBrandViewResult((changedPaths), "@foldkit/devtools/overlay.js#changedPaths~4"),
|
|
@@ -471,7 +471,7 @@ const makeUpdate = (store, shadow, mode) => {
|
|
|
471
471
|
}), "@foldkit/devtools/overlay.js#ReceivedInspectedState")),
|
|
472
472
|
GotInspectorTabsMessage: ({ message: tabsMessage }) => __foldkitBrandViewResult((foldInspectorTabs(model, tabsMessage)), "@foldkit/devtools/overlay.js#GotInspectorTabsMessage"),
|
|
473
473
|
ToggledTreeNode: ({ path }) => (__foldkitBrandViewResult(({
|
|
474
|
-
model:
|
|
474
|
+
model: modifyFields(model, {
|
|
475
475
|
expandedPaths: paths => __foldkitBrandViewResult((HashSet.has(paths, path)
|
|
476
476
|
? HashSet.remove(paths, path)
|
|
477
477
|
: HashSet.add(paths, path)), "@foldkit/devtools/overlay.js#expandedPaths~4"),
|
|
@@ -491,7 +491,7 @@ const makeUpdate = (store, shadow, mode) => {
|
|
|
491
491
|
? hostIndexToSliderValue(pausedAtIndex, startIndex)
|
|
492
492
|
: sliderMax;
|
|
493
493
|
return __foldkitBrandViewResult(({
|
|
494
|
-
model:
|
|
494
|
+
model: modifyFields(model, {
|
|
495
495
|
entries: () => __foldkitBrandViewResult((entries), "@foldkit/devtools/overlay.js#entries"),
|
|
496
496
|
initCommands: () => __foldkitBrandViewResult((initCommands), "@foldkit/devtools/overlay.js#initCommands"),
|
|
497
497
|
initMountStarts: () => __foldkitBrandViewResult((initMountStarts), "@foldkit/devtools/overlay.js#initMountStarts"),
|
|
@@ -515,7 +515,7 @@ const makeUpdate = (store, shadow, mode) => {
|
|
|
515
515
|
TickedScrubFrame: () => __foldkitBrandViewResult((Option.match(model.maybePendingScrubIndex, {
|
|
516
516
|
onNone: () => (__foldkitBrandViewResult(({ model }), "@foldkit/devtools/overlay.js#onNone")),
|
|
517
517
|
onSome: (hostIndex) => (__foldkitBrandViewResult(({
|
|
518
|
-
model:
|
|
518
|
+
model: modifyFields(model, {
|
|
519
519
|
maybePendingScrubIndex: () => __foldkitBrandViewResult((Option.none()), "@foldkit/devtools/overlay.js#maybePendingScrubIndex~2"),
|
|
520
520
|
}),
|
|
521
521
|
commands: [jumpToAndInspect(hostIndex)],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foldkit/devtools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.163.0",
|
|
4
4
|
"description": "In-browser DevTools overlay for Foldkit applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -14,24 +14,24 @@
|
|
|
14
14
|
"dist"
|
|
15
15
|
],
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@effect/platform-browser": "4.0.0-rc.
|
|
17
|
+
"@effect/platform-browser": "4.0.0-rc.116",
|
|
18
18
|
"@foldkit/ui": "^0",
|
|
19
|
-
"effect": "4.0.0-rc.
|
|
20
|
-
"foldkit": ">=0.
|
|
19
|
+
"effect": "4.0.0-rc.116",
|
|
20
|
+
"foldkit": ">=0.163.0"
|
|
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.116",
|
|
27
|
+
"effect": "4.0.0-rc.116",
|
|
28
28
|
"happy-dom": "^20.11.13",
|
|
29
29
|
"rimraf": "^6.1.3",
|
|
30
30
|
"typescript": "^7.0.2",
|
|
31
31
|
"vitest": "^4.1.11",
|
|
32
|
-
"@foldkit/ui": "0.
|
|
33
|
-
"@foldkit/vite-plugin": "0.
|
|
34
|
-
"foldkit": "0.
|
|
32
|
+
"@foldkit/ui": "0.163.0",
|
|
33
|
+
"@foldkit/vite-plugin": "0.24.0",
|
|
34
|
+
"foldkit": "0.163.0"
|
|
35
35
|
},
|
|
36
36
|
"keywords": [
|
|
37
37
|
"foldkit",
|