@foldkit/devtools 0.166.0 → 0.167.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-styles.d.ts +1 -1
- package/dist/overlay-styles.d.ts.map +1 -1
- package/dist/overlay-styles.js +47 -0
- package/dist/overlay.d.ts +21 -0
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +275 -107
- package/package.json +7 -7
package/dist/overlay-styles.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const overlayStyles = ":host {\n /* The host spans the viewport so it has real bounds to snapshot: it carries a\n `view-transition-name` (set in `overlay.ts`, see the note there) to stay\n out of an application's View Transitions, and a name on a zero-size element\n captures nothing. The box itself is inert; the panels inside opt back into\n hit-testing through `.fixed`. */\n position: fixed;\n inset: 0;\n pointer-events: none;\n z-index: 2147483647;\n\n --dt-bg: #1e1e2e;\n --dt-surface-selected: #282839;\n --dt-border: #45475a;\n --dt-text: #cdd6f4;\n --dt-text-muted: #9399b2;\n --dt-accent: #cba6f7;\n --dt-live: #a6e3a1;\n --dt-paused: #fab387;\n --dt-json-string: #a6e3a1;\n --dt-json-number: #89b4fa;\n --dt-json-boolean: #fab387;\n --dt-json-null: #9399b2;\n --dt-json-key: #89dceb;\n --dt-json-tag: #cba6f7;\n --dt-json-preview: #9399b2;\n --dt-json-arrow: #9399b2;\n --dt-tree-hover: #313244;\n --dt-diff-changed: #74c7ec;\n}\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\nbutton {\n font: inherit;\n color: inherit;\n}\nul {\n list-style: none;\n}\n\n/* The host is `pointer-events: none` so its viewport-spanning box cannot\n swallow clicks meant for the application, and everything the shadow root\n renders opts back in here. The boundary is the shadow root's children rather\n than any one panel class: content arrives by routes a class list does not\n cover, including the portal root `@foldkit/ui` prepends for anchored\n dropdowns, and a surface that misses the opt-in is silently unclickable.\n These wrappers are zero-height, so granting them hit-testing costs nothing;\n descendants that must stay transparent, like the listbox backdrop, set\n `pointer-events: none` on themselves. */\n:host > * {\n pointer-events: auto;\n}\n\n.fixed {\n position: fixed;\n}\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n.flex {\n display: flex;\n}\n.contents {\n display: contents;\n}\n.flex-col {\n flex-direction: column;\n}\n.flex-1 {\n flex: 1 1 0%;\n}\n.items-center {\n align-items: center;\n}\n.justify-center {\n justify-content: center;\n}\n.justify-between {\n justify-content: space-between;\n}\n.shrink-0 {\n flex-shrink: 0;\n}\n.inline-block {\n display: inline-block;\n}\n.gap-0\\.5 {\n gap: 2px;\n}\n.gap-1\\.5 {\n gap: 6px;\n}\n.gap-2 {\n gap: 8px;\n}\n.gap-3 {\n gap: 12px;\n}\n.gap-px {\n gap: 1px;\n}\n.px-1 {\n padding-left: 4px;\n padding-right: 4px;\n}\n.px-2 {\n padding-left: 8px;\n padding-right: 8px;\n}\n.px-2\\.5 {\n padding-left: 10px;\n padding-right: 10px;\n}\n.p-3 {\n padding: 12px;\n}\n.px-3 {\n padding-left: 12px;\n padding-right: 12px;\n}\n.py-0\\.5 {\n padding-top: 2px;\n padding-bottom: 2px;\n}\n.pt-1 {\n padding-top: 4px;\n}\n.pl-1 {\n padding-left: 4px;\n}\n.py-1 {\n padding-top: 4px;\n padding-bottom: 4px;\n}\n.py-1\\.5 {\n padding-top: 6px;\n padding-bottom: 6px;\n}\n.py-2 {\n padding-top: 8px;\n padding-bottom: 8px;\n}\n.py-px {\n padding-top: 1px;\n padding-bottom: 1px;\n}\n.w-1\\.5 {\n width: 6px;\n}\n.h-1\\.5 {\n height: 6px;\n}\n.w-3 {\n width: 12px;\n}\n.w-5 {\n width: 20px;\n}\n.h-5 {\n height: 20px;\n}\n.w-14 {\n width: 56px;\n}\n.h-14 {\n height: 56px;\n}\n.min-w-0 {\n min-width: 0;\n}\n.min-w-5 {\n min-width: 20px;\n}\n.min-h-0 {\n min-height: 0;\n}\n/* Badge positions \u2014 flush against side edge */\n.dt-pos-br {\n bottom: 16px;\n right: 0;\n border-radius: 6px 0 0 6px;\n}\n.dt-pos-bl {\n bottom: 16px;\n left: 0;\n border-radius: 0 6px 6px 0;\n}\n.dt-pos-tr {\n top: 16px;\n right: 0;\n border-radius: 6px 0 0 6px;\n}\n.dt-pos-tl {\n top: 16px;\n left: 0;\n border-radius: 0 6px 6px 0;\n}\n.overflow-hidden {\n overflow: hidden;\n}\n.overflow-auto {\n overflow: auto;\n}\n.overflow-y-auto {\n overflow-y: auto;\n}\n.overscroll-none {\n overscroll-behavior: none;\n}\n\n.truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.rounded {\n border-radius: 4px;\n}\n.rounded-lg {\n border-radius: 8px;\n}\n.rounded-full {\n border-radius: 9999px;\n}\n.border {\n border-width: 1px;\n border-style: solid;\n border-color: var(--dt-border);\n}\n.border-b {\n border-bottom: 1px solid var(--dt-border);\n}\n.border-t {\n border-top: 1px solid var(--dt-border);\n}\n.border-r {\n border-right: 1px solid var(--dt-border);\n}\n.border-l {\n border-left: 1px solid var(--dt-border);\n}\n.border-none {\n border: none;\n}\n.selected {\n background-color: var(--dt-surface-selected);\n}\n.dt-row:hover:not(.selected) {\n background-color: var(--dt-tree-hover);\n}\n.dt-header-button:hover {\n color: var(--dt-text);\n}\n.dt-resume-button:hover {\n opacity: 0.7;\n}\n.dt-scroll-pill {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n flex-shrink: 0;\n padding: 4px 12px;\n background-color: var(--dt-surface-selected);\n border: none;\n border-bottom: 1px solid var(--dt-border);\n color: var(--dt-accent);\n font-family:\n ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;\n font-size: 13px;\n cursor: pointer;\n}\n.dt-scroll-pill-icon {\n width: 12px;\n height: 12px;\n}\n.dt-scroll-pill-text {\n margin-top: 1px;\n}\n.dt-scroll-pill:hover {\n background-color: var(--dt-tree-hover);\n}\n.dt-scroll-pill:focus-visible {\n outline: 1px solid var(--dt-accent);\n outline-offset: -1px;\n}\n.dt-filter-wrapper {\n position: relative;\n flex-shrink: 0;\n border-bottom: 1px solid var(--dt-border);\n}\n.dt-filter-button {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 6px 12px;\n background: transparent;\n border: none;\n color: var(--dt-text-muted);\n font-family:\n ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;\n font-size: 13px;\n cursor: pointer;\n text-align: left;\n}\n.dt-filter-button:hover {\n color: var(--dt-text);\n background-color: var(--dt-tree-hover);\n}\n.dt-filter-button:focus-visible {\n outline: 1px solid var(--dt-accent);\n outline-offset: -1px;\n}\n.dt-filter-button[data-open] {\n color: var(--dt-text);\n background-color: var(--dt-surface-selected);\n}\n.dt-filter-button[data-open]:hover {\n background-color: var(--dt-tree-hover);\n}\n.dt-filter-button[data-open] .json-arrow {\n transform: rotate(180deg);\n}\n.dt-filter-items {\n position: absolute;\n width: var(--button-width);\n background-color: var(--dt-bg);\n border-top: 1px solid var(--dt-border);\n border-bottom: 1px solid var(--dt-border);\n z-index: 100000;\n max-height: 200px;\n overflow-y: auto;\n outline: none;\n}\n.dt-filter-item {\n padding: 6px 12px;\n color: var(--dt-text-muted);\n cursor: pointer;\n font-family:\n ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;\n font-size: 13px;\n border-bottom: 1px solid var(--dt-border);\n}\n.dt-filter-item:last-child {\n border-bottom: none;\n}\n.dt-filter-item[data-active] {\n background-color: var(--dt-tree-hover);\n color: var(--dt-text);\n}\n.dt-filter-item[data-selected] {\n color: var(--dt-accent);\n}\n.dt-filter-check {\n width: 12px;\n height: 12px;\n visibility: hidden;\n}\n.dt-filter-item[data-selected] .dt-filter-check {\n visibility: visible;\n color: var(--dt-accent);\n}\n.dt-filter-backdrop {\n position: fixed;\n inset: 0;\n pointer-events: none;\n}\n.dt-settings-button {\n display: flex;\n align-items: center;\n justify-content: center;\n align-self: stretch;\n margin: -8px 0 -8px -12px;\n padding: 0 12px;\n background: transparent;\n border: none;\n border-right: 1px solid var(--dt-border);\n color: var(--dt-text-muted);\n cursor: pointer;\n flex-shrink: 0;\n}\n.dt-settings-button:hover {\n color: var(--dt-text);\n background-color: var(--dt-tree-hover);\n}\n.dt-settings-button:focus-visible {\n outline: 1px solid var(--dt-accent);\n outline-offset: -1px;\n}\n.dt-settings-button-active {\n color: var(--dt-accent);\n background-color: var(--dt-surface-selected);\n}\n.dt-settings-button-active:hover {\n background-color: var(--dt-tree-hover);\n}\n.dt-settings-icon {\n width: 14px;\n height: 14px;\n}\n.dt-settings-section-title {\n padding: 10px 12px 4px;\n color: var(--dt-text-muted);\n font-size: 10px;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n}\n.dt-settings-row {\n display: flex;\n align-items: center;\n gap: 20px;\n padding: 8px 12px;\n}\n.dt-settings-row-text {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n.dt-settings-row-label {\n color: var(--dt-text);\n font-size: 13px;\n cursor: pointer;\n}\n.dt-settings-row-description {\n color: var(--dt-text-muted);\n font-size: 10px;\n}\n.dt-switch {\n position: relative;\n width: 36px;\n height: 20px;\n border-radius: 9999px;\n background-color: var(--dt-border);\n cursor: pointer;\n flex-shrink: 0;\n transition:\n background-color 100ms ease,\n filter 100ms ease;\n}\n.dt-switch:hover {\n filter: brightness(1.2);\n}\n.dt-switch:focus-visible {\n outline: 1px solid var(--dt-accent);\n outline-offset: 2px;\n}\n.dt-switch[data-checked] {\n background-color: var(--dt-accent);\n}\n.dt-switch-thumb {\n position: absolute;\n top: 2px;\n left: 2px;\n width: 16px;\n height: 16px;\n border-radius: 9999px;\n background-color: var(--dt-text-muted);\n transition:\n transform 100ms ease,\n background-color 100ms ease;\n}\n.dt-switch[data-checked] .dt-switch-thumb {\n transform: translateX(16px);\n background-color: var(--dt-bg);\n}\n.dt-tab-button {\n position: relative;\n background: transparent;\n border: none;\n border-right: 1px solid var(--dt-border);\n outline: none;\n flex: 1;\n}\n.dt-tab-button:last-child {\n border-right: none;\n}\n.dt-tab-active {\n background-color: var(--dt-surface-selected);\n}\n.dt-tab-button:not(.dt-tab-active):hover {\n color: var(--dt-text);\n background-color: rgba(49, 50, 68, 0.3);\n}\n.font-sans {\n font-family:\n system-ui,\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n Roboto,\n sans-serif;\n}\n.font-mono {\n font-family:\n ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;\n}\n.font-medium {\n font-weight: 500;\n}\n.font-semibold {\n font-weight: 600;\n}\n.text-xs {\n font-size: 12px;\n}\n.text-2xs {\n font-size: 10px;\n}\n.text-sm {\n font-size: 11px;\n}\n.text-base {\n font-size: 13px;\n}\n.text-md {\n font-size: 15px;\n}\n.text-lg {\n font-size: 20px;\n}\n.text-xl {\n font-size: 26px;\n}\n.italic {\n font-style: italic;\n}\n.text-right {\n text-align: right;\n}\n.tracking-wide {\n letter-spacing: 0.025em;\n}\n.tracking-wider {\n letter-spacing: 0.05em;\n}\n.leading-none {\n line-height: 1;\n}\n.leading-snug {\n line-height: 1.35;\n}\n.bg-dt-bg {\n background-color: var(--dt-bg);\n}\n.bg-dt-live {\n background-color: var(--dt-live);\n}\n.bg-transparent {\n background-color: transparent;\n}\n.text-dt {\n color: var(--dt-text);\n}\n.text-dt-bg {\n color: var(--dt-bg);\n}\n.text-dt-muted {\n color: var(--dt-text-muted);\n}\n.text-dt-accent {\n color: var(--dt-accent);\n}\n.text-dt-live {\n color: var(--dt-live);\n}\n.text-dt-paused {\n color: var(--dt-paused);\n}\n.cursor-pointer {\n cursor: pointer;\n}\n.outline-none {\n outline: none;\n}\n.transition-colors {\n transition-property: color, background-color, border-color;\n transition-duration: 100ms;\n transition-timing-function: ease;\n}\n\n/* Panel */\n.dt-panel {\n width: 360px;\n height: 480px;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);\n z-index: 99998;\n}\n/* Panel positions */\n.dt-panel-br {\n bottom: 16px;\n right: 28px;\n}\n.dt-panel-bl {\n bottom: 16px;\n left: 28px;\n}\n.dt-panel-tr {\n top: 16px;\n right: 28px;\n}\n.dt-panel-tl {\n top: 16px;\n left: 28px;\n}\n.dt-panel-wide {\n width: 720px;\n}\n.dt-message-pane {\n width: 320px;\n flex-shrink: 0;\n}\n.dt-badge {\n z-index: 99999;\n box-shadow: -2px 0 8px rgba(0, 0, 0, 0.3);\n transition: background-color 150ms ease;\n border: 1px solid var(--dt-border);\n}\n.dt-badge-accent:hover {\n background-color: #252538;\n}\n.dt-badge-paused {\n background-color: var(--dt-paused);\n color: var(--dt-bg);\n border: none;\n}\n.dt-badge-paused:hover {\n background-color: #e0a070;\n}\n.dt-badge.dt-pos-br,\n.dt-badge.dt-pos-tr {\n border-right: none;\n}\n.dt-badge.dt-pos-bl,\n.dt-badge.dt-pos-tl {\n border-left: none;\n}\n\n/* JSON tree */\n.tree-row {\n position: relative;\n white-space: nowrap;\n line-height: 18px;\n padding-right: 8px;\n}\n.tree-row-expandable:hover {\n background-color: var(--dt-tree-hover);\n}\n.inspector-tree {\n font-family:\n ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;\n}\n.json-key {\n color: var(--dt-json-key);\n}\n.json-string {\n color: var(--dt-json-string);\n}\n.json-number {\n color: var(--dt-json-number);\n}\n.json-boolean {\n color: var(--dt-json-boolean);\n}\n.json-null {\n color: var(--dt-json-null);\n}\n.json-tag {\n color: var(--dt-json-tag);\n margin-right: 4px;\n}\n.json-preview {\n color: var(--dt-json-preview);\n}\n.json-arrow {\n color: var(--dt-json-arrow);\n width: 10px;\n height: 10px;\n user-select: none;\n}\n\n/* Diff */\n.diff-changed {\n background-color: rgba(116, 199, 236, 0.06);\n}\n.diff-dot {\n position: absolute;\n left: 3px;\n width: 5px;\n height: 5px;\n border-radius: 9999px;\n background-color: var(--dt-diff-changed);\n}\n.diff-dot-inline {\n width: 5px;\n height: 5px;\n border-radius: 9999px;\n background-color: var(--dt-diff-changed);\n flex-shrink: 0;\n}\n.dot-column {\n width: 5px;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.pause-column {\n width: 8px;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.dt-pause-icon {\n width: 8px;\n height: 8px;\n color: var(--dt-paused);\n}\n\n/* Interaction blocker \u2014 covers the app while time-travelling */\n.dt-interaction-blocker {\n position: fixed;\n inset: 0;\n z-index: 99997;\n cursor: not-allowed;\n}\n\n/* Footer */\n.dt-footer {\n background-color: var(--dt-bg);\n height: 33px;\n}\n\n/* Scrubber */\n.dt-scrubber-control {\n position: relative;\n height: 16px;\n width: 100%;\n padding: 0 7px;\n display: flex;\n align-items: center;\n}\n.dt-scrubber-track {\n width: 100%;\n height: 4px;\n background-color: var(--dt-border);\n border-radius: 9999px;\n cursor: pointer;\n}\n.dt-scrubber-track[data-disabled] {\n cursor: not-allowed;\n}\n.dt-scrubber-fill {\n height: 100%;\n background-color: var(--dt-accent);\n border-radius: 9999px;\n}\n.dt-scrubber-thumb {\n width: 14px;\n height: 14px;\n border-radius: 9999px;\n background-color: var(--dt-accent);\n border: 2px solid var(--dt-bg);\n cursor: grab;\n outline: none;\n top: 50%;\n margin-top: -7px;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);\n}\n.dt-scrubber-thumb:focus-visible {\n outline: 2px solid var(--dt-text);\n outline-offset: 2px;\n}\n.dt-scrubber-thumb[data-dragging] {\n cursor: grabbing;\n}\n.dt-scrubber-position {\n width: 72px;\n padding-left: 12px;\n border-left: 1px solid var(--dt-border);\n align-self: stretch;\n margin-top: -8px;\n margin-bottom: -8px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* Mobile */\n@media (max-width: 767px) {\n .dt-panel {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n border-radius: 0;\n border: none;\n }\n .dt-panel-wide {\n width: 100%;\n }\n .dt-content {\n flex-direction: column;\n }\n .dt-message-pane {\n width: 100%;\n max-height: 40%;\n border-bottom: 1px solid var(--dt-border);\n }\n .message-list > :last-child {\n border-bottom: none;\n }\n .dt-inspector-pane {\n border-left: none;\n }\n .dt-badge.dt-pos-br,\n .dt-badge.dt-pos-bl {\n bottom: 44px;\n }\n}\n";
|
|
1
|
+
export declare const overlayStyles = ":host {\n /* The host spans the viewport so it has real bounds to snapshot: it carries a\n `view-transition-name` (set in `overlay.ts`, see the note there) to stay\n out of an application's View Transitions, and a name on a zero-size element\n captures nothing. The box itself is inert; the panels inside opt back into\n hit-testing through `.fixed`. */\n position: fixed;\n inset: 0;\n pointer-events: none;\n z-index: 2147483647;\n\n --dt-bg: #1e1e2e;\n --dt-surface-selected: #282839;\n --dt-border: #45475a;\n --dt-text: #cdd6f4;\n --dt-text-muted: #9399b2;\n --dt-accent: #cba6f7;\n --dt-live: #a6e3a1;\n --dt-paused: #fab387;\n --dt-json-string: #a6e3a1;\n --dt-json-number: #89b4fa;\n --dt-json-boolean: #fab387;\n --dt-json-null: #9399b2;\n --dt-json-key: #89dceb;\n --dt-json-tag: #cba6f7;\n --dt-json-preview: #9399b2;\n --dt-json-arrow: #9399b2;\n --dt-tree-hover: #313244;\n --dt-diff-changed: #74c7ec;\n}\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\nbutton {\n font: inherit;\n color: inherit;\n}\nul {\n list-style: none;\n}\n\n/* The host is `pointer-events: none` so its viewport-spanning box cannot\n swallow clicks meant for the application, and everything the shadow root\n renders opts back in here. The boundary is the shadow root's children rather\n than any one panel class: content arrives by routes a class list does not\n cover, including the portal root `@foldkit/ui` prepends for anchored\n dropdowns, and a surface that misses the opt-in is silently unclickable.\n These wrappers are zero-height, so granting them hit-testing costs nothing;\n descendants that must stay transparent, like the listbox backdrop, set\n `pointer-events: none` on themselves. */\n:host > * {\n pointer-events: auto;\n}\n\n.fixed {\n position: fixed;\n}\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n.flex {\n display: flex;\n}\n.contents {\n display: contents;\n}\n.flex-col {\n flex-direction: column;\n}\n.flex-1 {\n flex: 1 1 0%;\n}\n.items-center {\n align-items: center;\n}\n.justify-center {\n justify-content: center;\n}\n.justify-between {\n justify-content: space-between;\n}\n.shrink-0 {\n flex-shrink: 0;\n}\n.inline-block {\n display: inline-block;\n}\n.gap-0\\.5 {\n gap: 2px;\n}\n.gap-1\\.5 {\n gap: 6px;\n}\n.gap-2 {\n gap: 8px;\n}\n.gap-3 {\n gap: 12px;\n}\n.gap-px {\n gap: 1px;\n}\n.px-1 {\n padding-left: 4px;\n padding-right: 4px;\n}\n.px-2 {\n padding-left: 8px;\n padding-right: 8px;\n}\n.px-2\\.5 {\n padding-left: 10px;\n padding-right: 10px;\n}\n.p-3 {\n padding: 12px;\n}\n.px-3 {\n padding-left: 12px;\n padding-right: 12px;\n}\n.py-0\\.5 {\n padding-top: 2px;\n padding-bottom: 2px;\n}\n.pt-1 {\n padding-top: 4px;\n}\n.pl-1 {\n padding-left: 4px;\n}\n.py-1 {\n padding-top: 4px;\n padding-bottom: 4px;\n}\n.py-1\\.5 {\n padding-top: 6px;\n padding-bottom: 6px;\n}\n.py-2 {\n padding-top: 8px;\n padding-bottom: 8px;\n}\n.py-px {\n padding-top: 1px;\n padding-bottom: 1px;\n}\n.w-1\\.5 {\n width: 6px;\n}\n.h-1\\.5 {\n height: 6px;\n}\n.w-3 {\n width: 12px;\n}\n.w-5 {\n width: 20px;\n}\n.h-5 {\n height: 20px;\n}\n.w-14 {\n width: 56px;\n}\n.h-14 {\n height: 56px;\n}\n.min-w-0 {\n min-width: 0;\n}\n.min-w-5 {\n min-width: 20px;\n}\n.min-h-0 {\n min-height: 0;\n}\n/* Badge positions \u2014 flush against side edge */\n.dt-pos-br {\n bottom: 16px;\n right: 0;\n border-radius: 6px 0 0 6px;\n}\n.dt-pos-bl {\n bottom: 16px;\n left: 0;\n border-radius: 0 6px 6px 0;\n}\n.dt-pos-tr {\n top: 16px;\n right: 0;\n border-radius: 6px 0 0 6px;\n}\n.dt-pos-tl {\n top: 16px;\n left: 0;\n border-radius: 0 6px 6px 0;\n}\n.overflow-hidden {\n overflow: hidden;\n}\n.overflow-auto {\n overflow: auto;\n}\n.overflow-y-auto {\n overflow-y: auto;\n}\n.overscroll-none {\n overscroll-behavior: none;\n}\n\n.truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.rounded {\n border-radius: 4px;\n}\n.rounded-lg {\n border-radius: 8px;\n}\n.rounded-full {\n border-radius: 9999px;\n}\n.border {\n border-width: 1px;\n border-style: solid;\n border-color: var(--dt-border);\n}\n.border-b {\n border-bottom: 1px solid var(--dt-border);\n}\n.border-t {\n border-top: 1px solid var(--dt-border);\n}\n.border-r {\n border-right: 1px solid var(--dt-border);\n}\n.border-l {\n border-left: 1px solid var(--dt-border);\n}\n.border-none {\n border: none;\n}\n.selected {\n background-color: var(--dt-surface-selected);\n}\n.dt-row:hover:not(.selected) {\n background-color: var(--dt-tree-hover);\n}\n.dt-header-button:hover {\n color: var(--dt-text);\n}\n.dt-copy-control {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n.dt-copy-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n padding: 6px;\n background: transparent;\n border: none;\n color: var(--dt-text-muted);\n cursor: pointer;\n border-radius: 4px;\n transition: color 100ms ease;\n}\n.dt-copy-button:hover {\n color: var(--dt-text);\n}\n.dt-copy-button[aria-disabled='true'] {\n cursor: default;\n}\n.dt-copy-button.dt-copy-success,\n.dt-copy-button.dt-copy-success:hover {\n color: var(--dt-live);\n}\n.dt-copy-button:focus-visible {\n outline: 1px solid var(--dt-accent);\n outline-offset: -1px;\n}\n.dt-copy-icon {\n width: 12px;\n height: 12px;\n}\n.dt-resume-button:hover {\n opacity: 0.7;\n}\n.dt-scroll-pill {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n flex-shrink: 0;\n padding: 4px 12px;\n background-color: var(--dt-surface-selected);\n border: none;\n border-bottom: 1px solid var(--dt-border);\n color: var(--dt-accent);\n font-family:\n ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;\n font-size: 13px;\n cursor: pointer;\n}\n.dt-scroll-pill-icon {\n width: 12px;\n height: 12px;\n}\n.dt-scroll-pill-text {\n margin-top: 1px;\n}\n.dt-scroll-pill:hover {\n background-color: var(--dt-tree-hover);\n}\n.dt-scroll-pill:focus-visible {\n outline: 1px solid var(--dt-accent);\n outline-offset: -1px;\n}\n.dt-filter-wrapper {\n position: relative;\n flex-shrink: 0;\n border-bottom: 1px solid var(--dt-border);\n}\n.dt-filter-button {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 6px 12px;\n background: transparent;\n border: none;\n color: var(--dt-text-muted);\n font-family:\n ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;\n font-size: 13px;\n cursor: pointer;\n text-align: left;\n}\n.dt-filter-button:hover {\n color: var(--dt-text);\n background-color: var(--dt-tree-hover);\n}\n.dt-filter-button:focus-visible {\n outline: 1px solid var(--dt-accent);\n outline-offset: -1px;\n}\n.dt-filter-button[data-open] {\n color: var(--dt-text);\n background-color: var(--dt-surface-selected);\n}\n.dt-filter-button[data-open]:hover {\n background-color: var(--dt-tree-hover);\n}\n.dt-filter-button[data-open] .json-arrow {\n transform: rotate(180deg);\n}\n.dt-filter-items {\n position: absolute;\n width: var(--button-width);\n background-color: var(--dt-bg);\n border-top: 1px solid var(--dt-border);\n border-bottom: 1px solid var(--dt-border);\n z-index: 100000;\n max-height: 200px;\n overflow-y: auto;\n outline: none;\n}\n.dt-filter-item {\n padding: 6px 12px;\n color: var(--dt-text-muted);\n cursor: pointer;\n font-family:\n ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;\n font-size: 13px;\n border-bottom: 1px solid var(--dt-border);\n}\n.dt-filter-item:last-child {\n border-bottom: none;\n}\n.dt-filter-item[data-active] {\n background-color: var(--dt-tree-hover);\n color: var(--dt-text);\n}\n.dt-filter-item[data-selected] {\n color: var(--dt-accent);\n}\n.dt-filter-check {\n width: 12px;\n height: 12px;\n visibility: hidden;\n}\n.dt-filter-item[data-selected] .dt-filter-check {\n visibility: visible;\n color: var(--dt-accent);\n}\n.dt-filter-backdrop {\n position: fixed;\n inset: 0;\n pointer-events: none;\n}\n.dt-settings-button {\n display: flex;\n align-items: center;\n justify-content: center;\n align-self: stretch;\n margin: -8px 0 -8px -12px;\n padding: 0 12px;\n background: transparent;\n border: none;\n border-right: 1px solid var(--dt-border);\n color: var(--dt-text-muted);\n cursor: pointer;\n flex-shrink: 0;\n}\n.dt-settings-button:hover {\n color: var(--dt-text);\n background-color: var(--dt-tree-hover);\n}\n.dt-settings-button:focus-visible {\n outline: 1px solid var(--dt-accent);\n outline-offset: -1px;\n}\n.dt-settings-button-active {\n color: var(--dt-accent);\n background-color: var(--dt-surface-selected);\n}\n.dt-settings-button-active:hover {\n background-color: var(--dt-tree-hover);\n}\n.dt-settings-icon {\n width: 14px;\n height: 14px;\n}\n.dt-settings-section-title {\n padding: 10px 12px 4px;\n color: var(--dt-text-muted);\n font-size: 10px;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n}\n.dt-settings-row {\n display: flex;\n align-items: center;\n gap: 20px;\n padding: 8px 12px;\n}\n.dt-settings-row-text {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n.dt-settings-row-label {\n color: var(--dt-text);\n font-size: 13px;\n cursor: pointer;\n}\n.dt-settings-row-description {\n color: var(--dt-text-muted);\n font-size: 10px;\n}\n.dt-switch {\n position: relative;\n width: 36px;\n height: 20px;\n border-radius: 9999px;\n background-color: var(--dt-border);\n cursor: pointer;\n flex-shrink: 0;\n transition:\n background-color 100ms ease,\n filter 100ms ease;\n}\n.dt-switch:hover {\n filter: brightness(1.2);\n}\n.dt-switch:focus-visible {\n outline: 1px solid var(--dt-accent);\n outline-offset: 2px;\n}\n.dt-switch[data-checked] {\n background-color: var(--dt-accent);\n}\n.dt-switch-thumb {\n position: absolute;\n top: 2px;\n left: 2px;\n width: 16px;\n height: 16px;\n border-radius: 9999px;\n background-color: var(--dt-text-muted);\n transition:\n transform 100ms ease,\n background-color 100ms ease;\n}\n.dt-switch[data-checked] .dt-switch-thumb {\n transform: translateX(16px);\n background-color: var(--dt-bg);\n}\n.dt-tab-button {\n position: relative;\n background: transparent;\n border: none;\n border-right: 1px solid var(--dt-border);\n outline: none;\n flex: 1;\n}\n.dt-tab-button:last-child {\n border-right: none;\n}\n.dt-tab-active {\n background-color: var(--dt-surface-selected);\n}\n.dt-tab-button:not(.dt-tab-active):hover {\n color: var(--dt-text);\n background-color: rgba(49, 50, 68, 0.3);\n}\n.font-sans {\n font-family:\n system-ui,\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n Roboto,\n sans-serif;\n}\n.font-mono {\n font-family:\n ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;\n}\n.font-medium {\n font-weight: 500;\n}\n.font-semibold {\n font-weight: 600;\n}\n.text-xs {\n font-size: 12px;\n}\n.text-2xs {\n font-size: 10px;\n}\n.text-sm {\n font-size: 11px;\n}\n.text-base {\n font-size: 13px;\n}\n.text-md {\n font-size: 15px;\n}\n.text-lg {\n font-size: 20px;\n}\n.text-xl {\n font-size: 26px;\n}\n.italic {\n font-style: italic;\n}\n.text-right {\n text-align: right;\n}\n.tracking-wide {\n letter-spacing: 0.025em;\n}\n.tracking-wider {\n letter-spacing: 0.05em;\n}\n.leading-none {\n line-height: 1;\n}\n.leading-snug {\n line-height: 1.35;\n}\n.bg-dt-bg {\n background-color: var(--dt-bg);\n}\n.bg-dt-live {\n background-color: var(--dt-live);\n}\n.bg-transparent {\n background-color: transparent;\n}\n.text-dt {\n color: var(--dt-text);\n}\n.text-dt-bg {\n color: var(--dt-bg);\n}\n.text-dt-muted {\n color: var(--dt-text-muted);\n}\n.text-dt-accent {\n color: var(--dt-accent);\n}\n.text-dt-live {\n color: var(--dt-live);\n}\n.text-dt-paused {\n color: var(--dt-paused);\n}\n.cursor-pointer {\n cursor: pointer;\n}\n.outline-none {\n outline: none;\n}\n.transition-colors {\n transition-property: color, background-color, border-color;\n transition-duration: 100ms;\n transition-timing-function: ease;\n}\n\n/* Panel */\n.dt-panel {\n width: 360px;\n height: 480px;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);\n z-index: 99998;\n}\n/* Panel positions */\n.dt-panel-br {\n bottom: 16px;\n right: 28px;\n}\n.dt-panel-bl {\n bottom: 16px;\n left: 28px;\n}\n.dt-panel-tr {\n top: 16px;\n right: 28px;\n}\n.dt-panel-tl {\n top: 16px;\n left: 28px;\n}\n.dt-panel-wide {\n width: 720px;\n}\n.dt-message-pane {\n width: 320px;\n flex-shrink: 0;\n}\n.dt-badge {\n z-index: 99999;\n box-shadow: -2px 0 8px rgba(0, 0, 0, 0.3);\n transition: background-color 150ms ease;\n border: 1px solid var(--dt-border);\n}\n.dt-badge-accent:hover {\n background-color: #252538;\n}\n.dt-badge-paused {\n background-color: var(--dt-paused);\n color: var(--dt-bg);\n border: none;\n}\n.dt-badge-paused:hover {\n background-color: #e0a070;\n}\n.dt-badge.dt-pos-br,\n.dt-badge.dt-pos-tr {\n border-right: none;\n}\n.dt-badge.dt-pos-bl,\n.dt-badge.dt-pos-tl {\n border-left: none;\n}\n\n/* JSON tree */\n.tree-row {\n position: relative;\n white-space: nowrap;\n line-height: 18px;\n padding-right: 8px;\n}\n.dt-payload-list .tree-row {\n align-items: flex-start;\n flex-wrap: wrap;\n min-width: 0;\n white-space: normal;\n}\n.dt-payload-list .tree-row span {\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.tree-row-expandable:hover {\n background-color: var(--dt-tree-hover);\n}\n.inspector-tree {\n font-family:\n ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;\n}\n.json-key {\n color: var(--dt-json-key);\n}\n.json-string {\n color: var(--dt-json-string);\n}\n.json-number {\n color: var(--dt-json-number);\n}\n.json-boolean {\n color: var(--dt-json-boolean);\n}\n.json-null {\n color: var(--dt-json-null);\n}\n.json-tag {\n color: var(--dt-json-tag);\n margin-right: 4px;\n}\n.json-preview {\n color: var(--dt-json-preview);\n}\n.json-arrow {\n color: var(--dt-json-arrow);\n width: 10px;\n height: 10px;\n user-select: none;\n}\n\n/* Diff */\n.diff-changed {\n background-color: rgba(116, 199, 236, 0.06);\n}\n.diff-dot {\n position: absolute;\n left: 3px;\n width: 5px;\n height: 5px;\n border-radius: 9999px;\n background-color: var(--dt-diff-changed);\n}\n.diff-dot-inline {\n width: 5px;\n height: 5px;\n border-radius: 9999px;\n background-color: var(--dt-diff-changed);\n flex-shrink: 0;\n}\n.dot-column {\n width: 5px;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.pause-column {\n width: 8px;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.dt-pause-icon {\n width: 8px;\n height: 8px;\n color: var(--dt-paused);\n}\n\n/* Interaction blocker \u2014 covers the app while time-travelling */\n.dt-interaction-blocker {\n position: fixed;\n inset: 0;\n z-index: 99997;\n cursor: not-allowed;\n}\n\n/* Footer */\n.dt-footer {\n background-color: var(--dt-bg);\n height: 33px;\n}\n\n/* Scrubber */\n.dt-scrubber-control {\n position: relative;\n height: 16px;\n width: 100%;\n padding: 0 7px;\n display: flex;\n align-items: center;\n}\n.dt-scrubber-track {\n width: 100%;\n height: 4px;\n background-color: var(--dt-border);\n border-radius: 9999px;\n cursor: pointer;\n}\n.dt-scrubber-track[data-disabled] {\n cursor: not-allowed;\n}\n.dt-scrubber-fill {\n height: 100%;\n background-color: var(--dt-accent);\n border-radius: 9999px;\n}\n.dt-scrubber-thumb {\n width: 14px;\n height: 14px;\n border-radius: 9999px;\n background-color: var(--dt-accent);\n border: 2px solid var(--dt-bg);\n cursor: grab;\n outline: none;\n top: 50%;\n margin-top: -7px;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);\n}\n.dt-scrubber-thumb:focus-visible {\n outline: 2px solid var(--dt-text);\n outline-offset: 2px;\n}\n.dt-scrubber-thumb[data-dragging] {\n cursor: grabbing;\n}\n.dt-scrubber-position {\n width: 72px;\n padding-left: 12px;\n border-left: 1px solid var(--dt-border);\n align-self: stretch;\n margin-top: -8px;\n margin-bottom: -8px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* Mobile */\n@media (max-width: 767px) {\n .dt-panel {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n border-radius: 0;\n border: none;\n }\n .dt-panel-wide {\n width: 100%;\n }\n .dt-content {\n flex-direction: column;\n }\n .dt-message-pane {\n width: 100%;\n max-height: 40%;\n border-bottom: 1px solid var(--dt-border);\n }\n .message-list > :last-child {\n border-bottom: none;\n }\n .dt-inspector-pane {\n border-left: none;\n }\n .dt-badge.dt-pos-br,\n .dt-badge.dt-pos-bl {\n bottom: 44px;\n }\n}\n";
|
|
2
2
|
//# sourceMappingURL=overlay-styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay-styles.d.ts","sourceRoot":"","sources":["../src/overlay-styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"overlay-styles.d.ts","sourceRoot":"","sources":["../src/overlay-styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,yuhBAq3BzB,CAAA"}
|
package/dist/overlay-styles.js
CHANGED
|
@@ -265,6 +265,43 @@ ul {
|
|
|
265
265
|
.dt-header-button:hover {
|
|
266
266
|
color: var(--dt-text);
|
|
267
267
|
}
|
|
268
|
+
.dt-copy-control {
|
|
269
|
+
display: inline-flex;
|
|
270
|
+
align-items: center;
|
|
271
|
+
justify-content: center;
|
|
272
|
+
}
|
|
273
|
+
.dt-copy-button {
|
|
274
|
+
display: flex;
|
|
275
|
+
align-items: center;
|
|
276
|
+
justify-content: center;
|
|
277
|
+
width: 24px;
|
|
278
|
+
height: 24px;
|
|
279
|
+
padding: 6px;
|
|
280
|
+
background: transparent;
|
|
281
|
+
border: none;
|
|
282
|
+
color: var(--dt-text-muted);
|
|
283
|
+
cursor: pointer;
|
|
284
|
+
border-radius: 4px;
|
|
285
|
+
transition: color 100ms ease;
|
|
286
|
+
}
|
|
287
|
+
.dt-copy-button:hover {
|
|
288
|
+
color: var(--dt-text);
|
|
289
|
+
}
|
|
290
|
+
.dt-copy-button[aria-disabled='true'] {
|
|
291
|
+
cursor: default;
|
|
292
|
+
}
|
|
293
|
+
.dt-copy-button.dt-copy-success,
|
|
294
|
+
.dt-copy-button.dt-copy-success:hover {
|
|
295
|
+
color: var(--dt-live);
|
|
296
|
+
}
|
|
297
|
+
.dt-copy-button:focus-visible {
|
|
298
|
+
outline: 1px solid var(--dt-accent);
|
|
299
|
+
outline-offset: -1px;
|
|
300
|
+
}
|
|
301
|
+
.dt-copy-icon {
|
|
302
|
+
width: 12px;
|
|
303
|
+
height: 12px;
|
|
304
|
+
}
|
|
268
305
|
.dt-resume-button:hover {
|
|
269
306
|
opacity: 0.7;
|
|
270
307
|
}
|
|
@@ -658,6 +695,16 @@ ul {
|
|
|
658
695
|
line-height: 18px;
|
|
659
696
|
padding-right: 8px;
|
|
660
697
|
}
|
|
698
|
+
.dt-payload-list .tree-row {
|
|
699
|
+
align-items: flex-start;
|
|
700
|
+
flex-wrap: wrap;
|
|
701
|
+
min-width: 0;
|
|
702
|
+
white-space: normal;
|
|
703
|
+
}
|
|
704
|
+
.dt-payload-list .tree-row span {
|
|
705
|
+
min-width: 0;
|
|
706
|
+
overflow-wrap: anywhere;
|
|
707
|
+
}
|
|
661
708
|
.tree-row-expandable:hover {
|
|
662
709
|
background-color: var(--dt-tree-hover);
|
|
663
710
|
}
|
package/dist/overlay.d.ts
CHANGED
|
@@ -69,6 +69,27 @@ export declare const Resume: Command.CommandDefinitionNoArgs<"Resume", Effect.Ef
|
|
|
69
69
|
export declare const Clear: Command.CommandDefinitionNoArgs<"Clear", Effect.Effect<{
|
|
70
70
|
readonly _tag: "CompletedClear";
|
|
71
71
|
}, never, StoreService>>;
|
|
72
|
+
export declare const CopyPayloadToClipboard: Command.CommandDefinitionWithArgs<"CopyPayloadToClipboard", {
|
|
73
|
+
targetId: Schema.String;
|
|
74
|
+
requestId: Schema.Number;
|
|
75
|
+
payload: Schema.Unknown;
|
|
76
|
+
}, Effect.Effect<{
|
|
77
|
+
readonly _tag: "SucceededCopyPayloadToClipboard";
|
|
78
|
+
readonly targetId: string;
|
|
79
|
+
readonly requestId: number;
|
|
80
|
+
} | {
|
|
81
|
+
readonly _tag: "FailedCopyPayloadToClipboard";
|
|
82
|
+
readonly targetId: string;
|
|
83
|
+
readonly requestId: number;
|
|
84
|
+
}, never, never>>;
|
|
85
|
+
export declare const WaitBeforeHidingCopyIndicator: Command.CommandDefinitionWithArgs<"WaitBeforeHidingCopyIndicator", {
|
|
86
|
+
targetId: Schema.String;
|
|
87
|
+
requestId: Schema.Number;
|
|
88
|
+
}, Effect.Effect<{
|
|
89
|
+
readonly _tag: "CompletedWaitBeforeHidingCopyIndicator";
|
|
90
|
+
readonly targetId: string;
|
|
91
|
+
readonly requestId: number;
|
|
92
|
+
}, never, never>>;
|
|
72
93
|
export declare const ScrollToTop: Command.CommandDefinitionNoArgs<"ScrollToTop", Effect.Effect<{
|
|
73
94
|
readonly _tag: "CompletedScrollToTop";
|
|
74
95
|
}, never, ShadowRootService>>;
|
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,
|
|
1
|
+
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../src/overlay.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,OAAO,EACP,MAAM,EAGN,OAAO,EAGP,MAAM,EAIN,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;AAW9B,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;;;;;;;;;;;;;;;;;;;;AA6ZrE,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,sBAAsB;;;;;;;;;;;;iBAyBjC,CAAA;AAIF,eAAO,MAAM,6BAA6B;;;;;;;iBAezC,CAAA;AAED,eAAO,MAAM,WAAW;;6BAUtB,CAAA;AAwoEF,eAAO,MAAM,aAAa,UACjB,aAAa,YACV,gBAAgB,QACpB,YAAY,eACL,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,6DAqFhC,CAAA"}
|
package/dist/overlay.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
|
-
import { Array, Context, Effect, Function, HashSet, Match, Number, Option, Order, Predicate,
|
|
3
|
+
import { Array, Context, Effect, Function, HashMap, HashSet, Match, Number, Option, Order, Predicate, Record, Schema, Stream, String, SubscriptionRef, pipe, } from 'effect';
|
|
4
4
|
import { KeyValueStore } from 'effect/persistence';
|
|
5
5
|
import { Update } from 'foldkit';
|
|
6
6
|
import * as Command from 'foldkit/command';
|
|
7
7
|
import { DEVTOOLS_HOST_ID, GOT_MESSAGE_PATTERN, INIT_INDEX, extractSubmodelInfo, isTagged, latestEntryIndex, toInspectableValue, } from 'foldkit/devtools-host';
|
|
8
|
+
import * as Dom from 'foldkit/dom';
|
|
8
9
|
import { lockScroll, unlockScroll } from 'foldkit/dom';
|
|
9
10
|
import { createKeyedLazy, createLazy, } from 'foldkit/html';
|
|
10
11
|
import { defineMessageUnion } from 'foldkit/message';
|
|
@@ -40,6 +41,10 @@ const DisplayEntry = Schema.Struct({
|
|
|
40
41
|
timestamp: Schema.Number,
|
|
41
42
|
isModelChanged: Schema.Boolean,
|
|
42
43
|
});
|
|
44
|
+
const CopyState = defineTaggedUnion({
|
|
45
|
+
Copying: { requestId: Schema.Number },
|
|
46
|
+
Copied: { requestId: Schema.Number },
|
|
47
|
+
});
|
|
43
48
|
const INSPECTOR_TABS_ID = 'dt-inspector';
|
|
44
49
|
const SUBMODEL_FILTER_ID = 'dt-submodel-filter';
|
|
45
50
|
const FLATTEN_SWITCH_ID = 'dt-flatten-switch';
|
|
@@ -82,6 +87,8 @@ const Model = Schema.Struct({
|
|
|
82
87
|
expandedPaths: Schema.HashSet(Schema.String),
|
|
83
88
|
changedPaths: Schema.HashSet(Schema.String),
|
|
84
89
|
affectedPaths: Schema.HashSet(Schema.String),
|
|
90
|
+
copyStates: Schema.HashMap(Schema.String, CopyState),
|
|
91
|
+
nextCopyRequestId: Schema.Number,
|
|
85
92
|
maybePendingScrubIndex: Schema.Option(Schema.Number),
|
|
86
93
|
inspectorTabs: Tabs.Model,
|
|
87
94
|
activeInspectorTab: InspectorTab,
|
|
@@ -125,7 +132,7 @@ const Message = defineMessageUnion({
|
|
|
125
132
|
CompletedLockScroll: {},
|
|
126
133
|
CompletedUnlockScroll: {},
|
|
127
134
|
CompletedScrollToTop: {},
|
|
128
|
-
|
|
135
|
+
ObservedMobileBreakpoint: { isMobile: Schema.Boolean },
|
|
129
136
|
ReceivedInspectedState: {
|
|
130
137
|
model: Schema.Unknown,
|
|
131
138
|
maybeMessage: Schema.Option(Schema.Unknown),
|
|
@@ -133,6 +140,19 @@ const Message = defineMessageUnion({
|
|
|
133
140
|
affectedPaths: Schema.HashSet(Schema.String),
|
|
134
141
|
},
|
|
135
142
|
ToggledTreeNode: { path: Schema.String },
|
|
143
|
+
ClickedCopyPayload: { targetId: Schema.String, payload: Schema.Unknown },
|
|
144
|
+
SucceededCopyPayloadToClipboard: {
|
|
145
|
+
targetId: Schema.String,
|
|
146
|
+
requestId: Schema.Number,
|
|
147
|
+
},
|
|
148
|
+
FailedCopyPayloadToClipboard: {
|
|
149
|
+
targetId: Schema.String,
|
|
150
|
+
requestId: Schema.Number,
|
|
151
|
+
},
|
|
152
|
+
CompletedWaitBeforeHidingCopyIndicator: {
|
|
153
|
+
targetId: Schema.String,
|
|
154
|
+
requestId: Schema.Number,
|
|
155
|
+
},
|
|
136
156
|
TickedScrubFrame: {},
|
|
137
157
|
GotInspectorTabsMessage: { message: Tabs.Message },
|
|
138
158
|
ReceivedStoreUpdate: {
|
|
@@ -154,6 +174,7 @@ const MOBILE_BREAKPOINT = 767;
|
|
|
154
174
|
const MOBILE_BREAKPOINT_QUERY = `(max-width: ${MOBILE_BREAKPOINT}px)`;
|
|
155
175
|
const TREE_INDENT_PX = 12;
|
|
156
176
|
const MAX_PREVIEW_KEYS = 3;
|
|
177
|
+
const JSON_INDENT = 2;
|
|
157
178
|
const ALL_MESSAGES_VALUE = '';
|
|
158
179
|
const DEVTOOLS_STORAGE_KEY = 'foldkit-devtools';
|
|
159
180
|
const NO_COMMANDS = [];
|
|
@@ -213,6 +234,20 @@ const objectPreview = (value) => __foldkitBrandViewResult((pipe(value, Record.ke
|
|
|
213
234
|
},
|
|
214
235
|
}))), "@foldkit/devtools/overlay.js#objectPreview");
|
|
215
236
|
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");
|
|
237
|
+
const serializePayload = (value) => __foldkitBrandViewResult((Effect.try({
|
|
238
|
+
try: () => {
|
|
239
|
+
const serialized = JSON.stringify(toInspectableValue(value), null, JSON_INDENT);
|
|
240
|
+
if (serialized === undefined) {
|
|
241
|
+
throw new Error('Payload cannot be represented as JSON');
|
|
242
|
+
}
|
|
243
|
+
return __foldkitBrandViewResult((serialized), "@foldkit/devtools/overlay.js#try");
|
|
244
|
+
},
|
|
245
|
+
catch: () => __foldkitBrandViewResult((new Error('Failed to serialize payload')), "@foldkit/devtools/overlay.js#catch"),
|
|
246
|
+
})), "@foldkit/devtools/overlay.js#serializePayload");
|
|
247
|
+
const taggedPayload = (name, args) => __foldkitBrandViewResult((Option.match(args, {
|
|
248
|
+
onNone: () => (__foldkitBrandViewResult(({ _tag: name }), "@foldkit/devtools/overlay.js#onNone")),
|
|
249
|
+
onSome: argsValue => (__foldkitBrandViewResult(({ ...argsValue, _tag: name }), "@foldkit/devtools/overlay.js#onSome")),
|
|
250
|
+
})), "@foldkit/devtools/overlay.js#taggedPayload");
|
|
216
251
|
const foldInspectorTabsOutMessage = Tabs.OutMessage.match({
|
|
217
252
|
Selected: ({ value }) => __foldkitBrandViewResult((model => (__foldkitBrandViewResult(({
|
|
218
253
|
model: modifyFields(model, { activeInspectorTab: () => __foldkitBrandViewResult((value), "@foldkit/devtools/overlay.js#activeInspectorTab") }),
|
|
@@ -355,6 +390,34 @@ export const Clear = Command.define('Clear', {
|
|
|
355
390
|
return __foldkitBrandViewResult((Message.CompletedClear()), "@foldkit/devtools/overlay.js#anonymous~25");
|
|
356
391
|
}),
|
|
357
392
|
});
|
|
393
|
+
export const CopyPayloadToClipboard = Command.define('CopyPayloadToClipboard', {
|
|
394
|
+
args: {
|
|
395
|
+
targetId: Schema.String,
|
|
396
|
+
requestId: Schema.Number,
|
|
397
|
+
payload: Schema.Unknown,
|
|
398
|
+
},
|
|
399
|
+
messages: [
|
|
400
|
+
Message.SucceededCopyPayloadToClipboard,
|
|
401
|
+
Message.FailedCopyPayloadToClipboard,
|
|
402
|
+
],
|
|
403
|
+
execute: ({ targetId, requestId, payload }) => __foldkitBrandViewResult((Effect.gen(function* () {
|
|
404
|
+
const text = yield* serializePayload(payload);
|
|
405
|
+
yield* Effect.tryPromise({
|
|
406
|
+
try: () => __foldkitBrandViewResult((navigator.clipboard.writeText(text)), "@foldkit/devtools/overlay.js#try~2"),
|
|
407
|
+
catch: () => __foldkitBrandViewResult((new Error('Failed to copy payload to clipboard')), "@foldkit/devtools/overlay.js#catch~2"),
|
|
408
|
+
});
|
|
409
|
+
return __foldkitBrandViewResult((Message.SucceededCopyPayloadToClipboard({ targetId, requestId })), "@foldkit/devtools/overlay.js#anonymous~26");
|
|
410
|
+
}).pipe(Effect.catch(() => __foldkitBrandViewResult((Effect.succeed(Message.FailedCopyPayloadToClipboard({ targetId, requestId }))), "@foldkit/devtools/overlay.js#anonymous~27")))), "@foldkit/devtools/overlay.js#execute~4"),
|
|
411
|
+
});
|
|
412
|
+
const COPY_INDICATOR_DURATION = '1 second';
|
|
413
|
+
export const WaitBeforeHidingCopyIndicator = Command.define('WaitBeforeHidingCopyIndicator', {
|
|
414
|
+
args: { targetId: Schema.String, requestId: Schema.Number },
|
|
415
|
+
messages: [Message.CompletedWaitBeforeHidingCopyIndicator],
|
|
416
|
+
execute: ({ targetId, requestId }) => __foldkitBrandViewResult((Effect.sleep(COPY_INDICATOR_DURATION).pipe(Effect.as(Message.CompletedWaitBeforeHidingCopyIndicator({
|
|
417
|
+
targetId,
|
|
418
|
+
requestId,
|
|
419
|
+
})))), "@foldkit/devtools/overlay.js#execute~5"),
|
|
420
|
+
});
|
|
358
421
|
export const ScrollToTop = Command.define('ScrollToTop', {
|
|
359
422
|
messages: [Message.CompletedScrollToTop],
|
|
360
423
|
execute: Effect.gen(function* () {
|
|
@@ -363,7 +426,7 @@ export const ScrollToTop = Command.define('ScrollToTop', {
|
|
|
363
426
|
if (messageList instanceof HTMLElement) {
|
|
364
427
|
messageList.scrollTop = 0;
|
|
365
428
|
}
|
|
366
|
-
return __foldkitBrandViewResult((Message.CompletedScrollToTop()), "@foldkit/devtools/overlay.js#anonymous~
|
|
429
|
+
return __foldkitBrandViewResult((Message.CompletedScrollToTop()), "@foldkit/devtools/overlay.js#anonymous~28");
|
|
367
430
|
}),
|
|
368
431
|
});
|
|
369
432
|
const makeUpdate = (store, shadow, mode) => {
|
|
@@ -390,27 +453,32 @@ const makeUpdate = (store, shadow, mode) => {
|
|
|
390
453
|
},
|
|
391
454
|
ClickedSettingsToggle: () => (__foldkitBrandViewResult(({
|
|
392
455
|
model: modifyFields(model, {
|
|
393
|
-
screen: currentScreen => __foldkitBrandViewResult((Match.value(currentScreen).pipe(Match.withReturnType(), Match.when('Messages', () => __foldkitBrandViewResult(('Settings'), "@foldkit/devtools/overlay.js#anonymous~
|
|
456
|
+
screen: currentScreen => __foldkitBrandViewResult((Match.value(currentScreen).pipe(Match.withReturnType(), Match.when('Messages', () => __foldkitBrandViewResult(('Settings'), "@foldkit/devtools/overlay.js#anonymous~30")), Match.when('Settings', () => __foldkitBrandViewResult(('Messages'), "@foldkit/devtools/overlay.js#anonymous~31")), Match.exhaustive)), "@foldkit/devtools/overlay.js#screen"),
|
|
394
457
|
}),
|
|
395
458
|
}), "@foldkit/devtools/overlay.js#ClickedSettingsToggle")),
|
|
396
459
|
ToggledFlatten: ({ isFlattened }) => (__foldkitBrandViewResult(({
|
|
397
460
|
model: modifyFields(model, { isFlattened: () => __foldkitBrandViewResult((isFlattened), "@foldkit/devtools/overlay.js#isFlattened") }),
|
|
398
461
|
commands: [PersistDevToolsState({ isOpen: model.isOpen, isFlattened })],
|
|
399
462
|
}), "@foldkit/devtools/overlay.js#ToggledFlatten")),
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
463
|
+
ObservedMobileBreakpoint: ({ isMobile }) => {
|
|
464
|
+
if (isMobile === model.isMobile) {
|
|
465
|
+
return __foldkitBrandViewResult(({ model }), "@foldkit/devtools/overlay.js#ObservedMobileBreakpoint");
|
|
466
|
+
}
|
|
467
|
+
return __foldkitBrandViewResult(({
|
|
468
|
+
model: modifyFields(model, { isMobile: () => __foldkitBrandViewResult((isMobile), "@foldkit/devtools/overlay.js#isMobile") }),
|
|
469
|
+
commands: Option.toArray(maybeToggleScrollLock(model.isOpen, isMobile)),
|
|
470
|
+
}), "@foldkit/devtools/overlay.js#ObservedMobileBreakpoint");
|
|
471
|
+
},
|
|
404
472
|
ClickedRow: ({ index }) => __foldkitBrandViewResult((Match.value(mode).pipe(Match.withReturnType(), Match.when('TimeTravel', () => (__foldkitBrandViewResult(({
|
|
405
473
|
model,
|
|
406
474
|
commands: [jumpToAndInspect(index)],
|
|
407
|
-
}), "@foldkit/devtools/overlay.js#anonymous~
|
|
475
|
+
}), "@foldkit/devtools/overlay.js#anonymous~32"))), Match.when('Inspect', () => (__foldkitBrandViewResult(({
|
|
408
476
|
model: modifyFields(model, {
|
|
409
477
|
selectedIndex: () => __foldkitBrandViewResult((index), "@foldkit/devtools/overlay.js#selectedIndex"),
|
|
410
478
|
isFollowingLatest: () => __foldkitBrandViewResult((false), "@foldkit/devtools/overlay.js#isFollowingLatest"),
|
|
411
479
|
}),
|
|
412
480
|
commands: [inspectState(index)],
|
|
413
|
-
}), "@foldkit/devtools/overlay.js#anonymous~
|
|
481
|
+
}), "@foldkit/devtools/overlay.js#anonymous~33"))), Match.exhaustive)), "@foldkit/devtools/overlay.js#ClickedRow"),
|
|
414
482
|
ClickedResume: () => (__foldkitBrandViewResult(({
|
|
415
483
|
model: modifyFields(model, {
|
|
416
484
|
isFollowingTop: () => __foldkitBrandViewResult((true), "@foldkit/devtools/overlay.js#isFollowingTop"),
|
|
@@ -429,6 +497,7 @@ const makeUpdate = (store, shadow, mode) => {
|
|
|
429
497
|
expandedPaths: () => __foldkitBrandViewResult((HashSet.empty()), "@foldkit/devtools/overlay.js#expandedPaths~2"),
|
|
430
498
|
changedPaths: () => __foldkitBrandViewResult((HashSet.empty()), "@foldkit/devtools/overlay.js#changedPaths~2"),
|
|
431
499
|
affectedPaths: () => __foldkitBrandViewResult((HashSet.empty()), "@foldkit/devtools/overlay.js#affectedPaths~2"),
|
|
500
|
+
copyStates: () => __foldkitBrandViewResult((HashMap.empty()), "@foldkit/devtools/overlay.js#copyStates"),
|
|
432
501
|
}),
|
|
433
502
|
commands: [clear, inspectLatest, scrollToTop],
|
|
434
503
|
}), "@foldkit/devtools/overlay.js#ClickedClear")),
|
|
@@ -477,15 +546,28 @@ const makeUpdate = (store, shadow, mode) => {
|
|
|
477
546
|
: HashSet.add(paths, path)), "@foldkit/devtools/overlay.js#expandedPaths~4"),
|
|
478
547
|
}),
|
|
479
548
|
}), "@foldkit/devtools/overlay.js#ToggledTreeNode")),
|
|
549
|
+
ClickedCopyPayload: ({ targetId, payload }) => {
|
|
550
|
+
if (Option.isSome(HashMap.get(model.copyStates, targetId))) {
|
|
551
|
+
return __foldkitBrandViewResult(({ model }), "@foldkit/devtools/overlay.js#ClickedCopyPayload");
|
|
552
|
+
}
|
|
553
|
+
const requestId = model.nextCopyRequestId;
|
|
554
|
+
return __foldkitBrandViewResult(({
|
|
555
|
+
model: modifyFields(model, {
|
|
556
|
+
copyStates: states => __foldkitBrandViewResult((HashMap.set(states, targetId, CopyState.Copying({ requestId }))), "@foldkit/devtools/overlay.js#copyStates~2"),
|
|
557
|
+
nextCopyRequestId: current => __foldkitBrandViewResult((current + 1), "@foldkit/devtools/overlay.js#nextCopyRequestId"),
|
|
558
|
+
}),
|
|
559
|
+
commands: [CopyPayloadToClipboard({ targetId, requestId, payload })],
|
|
560
|
+
}), "@foldkit/devtools/overlay.js#ClickedCopyPayload");
|
|
561
|
+
},
|
|
480
562
|
ReceivedStoreUpdate: ({ entries, initCommands, initMountStarts, startIndex, isPaused, pausedAtIndex, }) => {
|
|
481
|
-
const shouldFollowSelection = Match.value(mode).pipe(Match.when('TimeTravel', () => __foldkitBrandViewResult((!isPaused), "@foldkit/devtools/overlay.js#anonymous~
|
|
482
|
-
const shouldFollowScroll = Match.value(mode).pipe(Match.when('TimeTravel', () => __foldkitBrandViewResult((!isPaused && model.isFollowingTop), "@foldkit/devtools/overlay.js#anonymous~
|
|
563
|
+
const shouldFollowSelection = Match.value(mode).pipe(Match.when('TimeTravel', () => __foldkitBrandViewResult((!isPaused), "@foldkit/devtools/overlay.js#anonymous~34")), Match.when('Inspect', () => __foldkitBrandViewResult((model.isFollowingLatest), "@foldkit/devtools/overlay.js#anonymous~35")), Match.exhaustive);
|
|
564
|
+
const shouldFollowScroll = Match.value(mode).pipe(Match.when('TimeTravel', () => __foldkitBrandViewResult((!isPaused && model.isFollowingTop), "@foldkit/devtools/overlay.js#anonymous~36")), Match.when('Inspect', () => __foldkitBrandViewResult((model.isFollowingTop), "@foldkit/devtools/overlay.js#anonymous~37")), Match.exhaustive);
|
|
483
565
|
const latestIndex = Array.match(entries, {
|
|
484
566
|
onEmpty: () => __foldkitBrandViewResult((INIT_INDEX), "@foldkit/devtools/overlay.js#onEmpty~3"),
|
|
485
567
|
onNonEmpty: () => __foldkitBrandViewResult((startIndex + entries.length - 1), "@foldkit/devtools/overlay.js#onNonEmpty~3"),
|
|
486
568
|
});
|
|
487
569
|
const nextSubmodelTags = computeSubmodelTags(entries);
|
|
488
|
-
const isFilterStale = Option.exists(model.maybeSubmodelFilter, filterTag => __foldkitBrandViewResult((!Array.contains(nextSubmodelTags, filterTag)), "@foldkit/devtools/overlay.js#anonymous~
|
|
570
|
+
const isFilterStale = Option.exists(model.maybeSubmodelFilter, filterTag => __foldkitBrandViewResult((!Array.contains(nextSubmodelTags, filterTag)), "@foldkit/devtools/overlay.js#anonymous~38"));
|
|
489
571
|
const sliderMax = entries.length;
|
|
490
572
|
const targetSliderValue = isPaused
|
|
491
573
|
? hostIndexToSliderValue(pausedAtIndex, startIndex)
|
|
@@ -502,7 +584,7 @@ const makeUpdate = (store, shadow, mode) => {
|
|
|
502
584
|
maybeSubmodelFilter: current => __foldkitBrandViewResult((isFilterStale ? Option.none() : current), "@foldkit/devtools/overlay.js#maybeSubmodelFilter~3"),
|
|
503
585
|
selectedIndex: current => __foldkitBrandViewResult((shouldFollowSelection ? latestIndex : current), "@foldkit/devtools/overlay.js#selectedIndex~4"),
|
|
504
586
|
scrubberSlider: current => __foldkitBrandViewResult((Slider.reflectRange(current, { min: 0, max: sliderMax })), "@foldkit/devtools/overlay.js#scrubberSlider~2"),
|
|
505
|
-
scrubberValue: current => __foldkitBrandViewResult((Match.value(model.scrubberSlider.dragState).pipe(Match.tag('Dragging', () => __foldkitBrandViewResult((Slider.snapAndClamp(current, 0, sliderMax, 1)), "@foldkit/devtools/overlay.js#anonymous~
|
|
587
|
+
scrubberValue: current => __foldkitBrandViewResult((Match.value(model.scrubberSlider.dragState).pipe(Match.tag('Dragging', () => __foldkitBrandViewResult((Slider.snapAndClamp(current, 0, sliderMax, 1)), "@foldkit/devtools/overlay.js#anonymous~39")), Match.orElse(() => __foldkitBrandViewResult((Slider.snapAndClamp(targetSliderValue, 0, sliderMax, 1)), "@foldkit/devtools/overlay.js#anonymous~40")))), "@foldkit/devtools/overlay.js#scrubberValue~2"),
|
|
506
588
|
}),
|
|
507
589
|
commands: [
|
|
508
590
|
...(shouldFollowSelection ? [inspectLatest] : []),
|
|
@@ -513,13 +595,13 @@ const makeUpdate = (store, shadow, mode) => {
|
|
|
513
595
|
GotSubmodelFilterMessage: ({ message: listboxMessage }) => __foldkitBrandViewResult((foldSubmodelFilter(model, listboxMessage)), "@foldkit/devtools/overlay.js#GotSubmodelFilterMessage"),
|
|
514
596
|
GotScrubberSliderMessage: ({ message: sliderMessage }) => __foldkitBrandViewResult((foldScrubberSlider(model, sliderMessage)), "@foldkit/devtools/overlay.js#GotScrubberSliderMessage"),
|
|
515
597
|
TickedScrubFrame: () => __foldkitBrandViewResult((Option.match(model.maybePendingScrubIndex, {
|
|
516
|
-
onNone: () => (__foldkitBrandViewResult(({ model }), "@foldkit/devtools/overlay.js#onNone")),
|
|
598
|
+
onNone: () => (__foldkitBrandViewResult(({ model }), "@foldkit/devtools/overlay.js#onNone~2")),
|
|
517
599
|
onSome: (hostIndex) => (__foldkitBrandViewResult(({
|
|
518
600
|
model: modifyFields(model, {
|
|
519
601
|
maybePendingScrubIndex: () => __foldkitBrandViewResult((Option.none()), "@foldkit/devtools/overlay.js#maybePendingScrubIndex~2"),
|
|
520
602
|
}),
|
|
521
603
|
commands: [jumpToAndInspect(hostIndex)],
|
|
522
|
-
}), "@foldkit/devtools/overlay.js#onSome")),
|
|
604
|
+
}), "@foldkit/devtools/overlay.js#onSome~2")),
|
|
523
605
|
})), "@foldkit/devtools/overlay.js#TickedScrubFrame"),
|
|
524
606
|
CompletedResume: () => (__foldkitBrandViewResult(({ model }), "@foldkit/devtools/overlay.js#CompletedResume")),
|
|
525
607
|
CompletedClear: () => (__foldkitBrandViewResult(({ model }), "@foldkit/devtools/overlay.js#CompletedClear")),
|
|
@@ -527,11 +609,33 @@ const makeUpdate = (store, shadow, mode) => {
|
|
|
527
609
|
CompletedLockScroll: () => (__foldkitBrandViewResult(({ model }), "@foldkit/devtools/overlay.js#CompletedLockScroll")),
|
|
528
610
|
CompletedUnlockScroll: () => (__foldkitBrandViewResult(({ model }), "@foldkit/devtools/overlay.js#CompletedUnlockScroll")),
|
|
529
611
|
CompletedScrollToTop: () => (__foldkitBrandViewResult(({ model }), "@foldkit/devtools/overlay.js#CompletedScrollToTop")),
|
|
530
|
-
|
|
612
|
+
SucceededCopyPayloadToClipboard: ({ targetId, requestId }) => __foldkitBrandViewResult((Option.exists(HashMap.get(model.copyStates, targetId), state => __foldkitBrandViewResult((state._tag === 'Copying' && state.requestId === requestId), "@foldkit/devtools/overlay.js#anonymous~41"))
|
|
613
|
+
? {
|
|
614
|
+
model: modifyFields(model, {
|
|
615
|
+
copyStates: states => __foldkitBrandViewResult((HashMap.set(states, targetId, CopyState.Copied({ requestId }))), "@foldkit/devtools/overlay.js#copyStates~3"),
|
|
616
|
+
}),
|
|
617
|
+
commands: [
|
|
618
|
+
WaitBeforeHidingCopyIndicator({ targetId, requestId }),
|
|
619
|
+
],
|
|
620
|
+
}
|
|
621
|
+
: { model }), "@foldkit/devtools/overlay.js#SucceededCopyPayloadToClipboard"),
|
|
622
|
+
FailedCopyPayloadToClipboard: ({ targetId, requestId }) => (__foldkitBrandViewResult(({
|
|
623
|
+
model: Option.exists(HashMap.get(model.copyStates, targetId), state => __foldkitBrandViewResult((state._tag === 'Copying' && state.requestId === requestId), "@foldkit/devtools/overlay.js#anonymous~42"))
|
|
624
|
+
? modifyFields(model, { copyStates: HashMap.remove(targetId) })
|
|
625
|
+
: model,
|
|
626
|
+
}), "@foldkit/devtools/overlay.js#FailedCopyPayloadToClipboard")),
|
|
627
|
+
CompletedWaitBeforeHidingCopyIndicator: ({ targetId, requestId }) => (__foldkitBrandViewResult(({
|
|
628
|
+
model: Option.exists(HashMap.get(model.copyStates, targetId), state => __foldkitBrandViewResult((state._tag === 'Copied' && state.requestId === requestId), "@foldkit/devtools/overlay.js#anonymous~43"))
|
|
629
|
+
? modifyFields(model, {
|
|
630
|
+
copyStates: HashMap.remove(targetId),
|
|
631
|
+
})
|
|
632
|
+
: model,
|
|
633
|
+
}), "@foldkit/devtools/overlay.js#CompletedWaitBeforeHidingCopyIndicator")),
|
|
634
|
+
})), "@foldkit/devtools/overlay.js#anonymous~29")), "@foldkit/devtools/overlay.js#makeUpdate");
|
|
531
635
|
};
|
|
532
636
|
// SUBSCRIPTION
|
|
533
637
|
const makeOverlaySubscriptions = (store, shadow) => {
|
|
534
|
-
const sliderSubscriptions = Slider.subscriptionsForRoot(() => __foldkitBrandViewResult((shadow), "@foldkit/devtools/overlay.js#anonymous~
|
|
638
|
+
const sliderSubscriptions = Slider.subscriptionsForRoot(() => __foldkitBrandViewResult((shadow), "@foldkit/devtools/overlay.js#anonymous~44"));
|
|
535
639
|
const scrubberSubscriptions = Subscription.lift({
|
|
536
640
|
scrubberPointer: sliderSubscriptions.dragPointer,
|
|
537
641
|
scrubberEscape: sliderSubscriptions.dragEscape,
|
|
@@ -540,20 +644,16 @@ const makeOverlaySubscriptions = (store, shadow) => {
|
|
|
540
644
|
toParentMessage: message => __foldkitBrandViewResult((Message.GotScrubberSliderMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage~4"),
|
|
541
645
|
});
|
|
542
646
|
const ownSubscriptions = Subscription.make()(_entry => (__foldkitBrandViewResult(({
|
|
543
|
-
scrubFrame: Subscription.
|
|
647
|
+
scrubFrame: Subscription.animationFrameEntry({
|
|
544
648
|
isActive: model => __foldkitBrandViewResult((Option.isSome(model.maybePendingScrubIndex)), "@foldkit/devtools/overlay.js#isActive"),
|
|
545
649
|
toMessage: () => __foldkitBrandViewResult((Message.TickedScrubFrame()), "@foldkit/devtools/overlay.js#toMessage"),
|
|
546
650
|
}),
|
|
547
|
-
storeUpdates: Subscription.
|
|
548
|
-
mobileBreakpoint: Subscription.
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
mediaQuery.addEventListener('change', handler);
|
|
554
|
-
return __foldkitBrandViewResult(({ mediaQuery, handler }), "@foldkit/devtools/overlay.js#anonymous~44");
|
|
555
|
-
}), ({ mediaQuery, handler }) => __foldkitBrandViewResult((Effect.sync(() => __foldkitBrandViewResult((mediaQuery.removeEventListener('change', handler)), "@foldkit/devtools/overlay.js#anonymous~46"))), "@foldkit/devtools/overlay.js#anonymous~45")).pipe(Effect.flatMap(() => __foldkitBrandViewResult((Effect.never), "@foldkit/devtools/overlay.js#anonymous~47")))), "@foldkit/devtools/overlay.js#anonymous~43"))),
|
|
556
|
-
}), "@foldkit/devtools/overlay.js#anonymous~40")));
|
|
651
|
+
storeUpdates: Subscription.persistentEntry(SubscriptionRef.changes(store.stateRef).pipe(Stream.map(state => __foldkitBrandViewResult((Message.ReceivedStoreUpdate(toDisplayState(state))), "@foldkit/devtools/overlay.js#anonymous~46")))),
|
|
652
|
+
mobileBreakpoint: Subscription.persistentEntry(Dom.streamFromMediaQuery({
|
|
653
|
+
query: MOBILE_BREAKPOINT_QUERY,
|
|
654
|
+
mapMatches: isMobile => __foldkitBrandViewResult((Message.ObservedMobileBreakpoint({ isMobile })), "@foldkit/devtools/overlay.js#mapMatches"),
|
|
655
|
+
})),
|
|
656
|
+
}), "@foldkit/devtools/overlay.js#anonymous~45")));
|
|
557
657
|
return __foldkitBrandViewResult((Subscription.aggregate(ownSubscriptions, scrubberSubscriptions)), "@foldkit/devtools/overlay.js#makeOverlaySubscriptions");
|
|
558
658
|
};
|
|
559
659
|
// VIEW
|
|
@@ -587,7 +687,7 @@ const makeView = (position, mode, shadow, maybeBanner) => {
|
|
|
587
687
|
let viewWithBuilder;
|
|
588
688
|
return __foldkitBrandViewResult(((model, h) => {
|
|
589
689
|
viewWithBuilder ??= buildOverlayView(position, mode, shadow, maybeBanner, h);
|
|
590
|
-
return __foldkitBrandViewResult((viewWithBuilder(model)), "@foldkit/devtools/overlay.js#anonymous~
|
|
690
|
+
return __foldkitBrandViewResult((viewWithBuilder(model)), "@foldkit/devtools/overlay.js#anonymous~47");
|
|
591
691
|
}), "@foldkit/devtools/overlay.js#makeView");
|
|
592
692
|
};
|
|
593
693
|
const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
@@ -597,10 +697,12 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
597
697
|
const lazyMessageList = createLazy();
|
|
598
698
|
// JSON TREE
|
|
599
699
|
const leafSpan = (className, text) => __foldkitBrandViewResult((h.span([h.Class(className)], [text])), "@foldkit/devtools/overlay.js#leafSpan");
|
|
600
|
-
const leafValueView = (value) => __foldkitBrandViewResult((Match.value(value).pipe(Match.when(Predicate.isNull, () => __foldkitBrandViewResult((leafSpan('json-null italic', 'null')), "@foldkit/devtools/overlay.js#anonymous~
|
|
700
|
+
const leafValueView = (value) => __foldkitBrandViewResult((Match.value(value).pipe(Match.when(Predicate.isNull, () => __foldkitBrandViewResult((leafSpan('json-null italic', 'null')), "@foldkit/devtools/overlay.js#anonymous~48")), Match.when(Predicate.isUndefined, () => __foldkitBrandViewResult((leafSpan('json-null italic', 'undefined')), "@foldkit/devtools/overlay.js#anonymous~49")), Match.when(Predicate.isString, stringValue => __foldkitBrandViewResult((leafSpan('json-string', `"${stringValue}"`)), "@foldkit/devtools/overlay.js#anonymous~50")), Match.when(Predicate.isNumber, numberValue => __foldkitBrandViewResult((leafSpan('json-number', globalThis.String(numberValue))), "@foldkit/devtools/overlay.js#anonymous~51")), Match.when(Predicate.isBoolean, booleanValue => __foldkitBrandViewResult((leafSpan('json-boolean', globalThis.String(booleanValue))), "@foldkit/devtools/overlay.js#anonymous~52")), Match.orElse(unknownValue => __foldkitBrandViewResult((leafSpan('json-null', globalThis.String(unknownValue))), "@foldkit/devtools/overlay.js#anonymous~53")))), "@foldkit/devtools/overlay.js#leafValueView");
|
|
601
701
|
const keyView = (key) => __foldkitBrandViewResult((h.span([h.Class('json-key')], [`${key}:\u00a0`])), "@foldkit/devtools/overlay.js#keyView");
|
|
602
702
|
const CHEVRON_RIGHT = 'M8.25 4.5l7.5 7.5-7.5 7.5';
|
|
603
703
|
const CHEVRON_DOWN = 'M19.5 8.25l-7.5 7.5-7.5-7.5';
|
|
704
|
+
const COPY_ICON = 'M8 8h10a2 2 0 012 2v8a2 2 0 01-2 2h-8a2 2 0 01-2-2V8Zm8 0V6a2 2 0 00-2-2H6a2 2 0 00-2 2v8a2 2 0 002 2h2';
|
|
705
|
+
const COPY_SUCCESS_ICON = 'M4.5 12.75l6 6 9-13.5';
|
|
604
706
|
const arrowView = (isExpanded) => __foldkitBrandViewResult((h.svg([
|
|
605
707
|
h.AriaHidden(true),
|
|
606
708
|
h.Class('json-arrow shrink-0'),
|
|
@@ -617,6 +719,47 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
617
719
|
]),
|
|
618
720
|
])), "@foldkit/devtools/overlay.js#arrowView");
|
|
619
721
|
const tagLabelView = (tag) => __foldkitBrandViewResult((h.span([h.Class('json-tag')], [tag])), "@foldkit/devtools/overlay.js#tagLabelView");
|
|
722
|
+
const copyPayloadButtonView = (payload, targetId, copyStates, subject) => {
|
|
723
|
+
const maybeCopyState = HashMap.get(copyStates, targetId);
|
|
724
|
+
const isCopying = Option.exists(maybeCopyState, state => __foldkitBrandViewResult((state._tag === 'Copying'), "@foldkit/devtools/overlay.js#anonymous~54"));
|
|
725
|
+
const isCopied = Option.exists(maybeCopyState, state => __foldkitBrandViewResult((state._tag === 'Copied'), "@foldkit/devtools/overlay.js#anonymous~55"));
|
|
726
|
+
const ariaLabel = Option.match(maybeCopyState, {
|
|
727
|
+
onNone: () => __foldkitBrandViewResult((`Copy ${subject} as JSON`), "@foldkit/devtools/overlay.js#onNone~3"),
|
|
728
|
+
onSome: CopyState.match({
|
|
729
|
+
Copying: () => __foldkitBrandViewResult((`Copying ${subject} as JSON`), "@foldkit/devtools/overlay.js#Copying"),
|
|
730
|
+
Copied: () => __foldkitBrandViewResult((`Copied ${subject} as JSON`), "@foldkit/devtools/overlay.js#Copied"),
|
|
731
|
+
}),
|
|
732
|
+
});
|
|
733
|
+
return __foldkitBrandViewResult((h.span([h.Class('dt-copy-control shrink-0')], [
|
|
734
|
+
h.button([
|
|
735
|
+
h.Class(clsx('dt-copy-button', isCopied && 'dt-copy-success')),
|
|
736
|
+
h.Type('button'),
|
|
737
|
+
h.AriaLabel(ariaLabel),
|
|
738
|
+
h.AriaDisabled(isCopying || isCopied),
|
|
739
|
+
h.Title(isCopied ? 'Copied' : 'Copy as JSON'),
|
|
740
|
+
...(Option.isNone(maybeCopyState)
|
|
741
|
+
? [h.OnClick(Message.ClickedCopyPayload({ targetId, payload }))]
|
|
742
|
+
: []),
|
|
743
|
+
], [
|
|
744
|
+
h.svg([
|
|
745
|
+
h.AriaHidden(true),
|
|
746
|
+
h.Class('dt-copy-icon'),
|
|
747
|
+
h.Xmlns('http://www.w3.org/2000/svg'),
|
|
748
|
+
h.Fill('none'),
|
|
749
|
+
h.ViewBox('0 0 24 24'),
|
|
750
|
+
h.StrokeWidth(isCopied ? '2' : '1.5'),
|
|
751
|
+
h.Stroke('currentColor'),
|
|
752
|
+
], [
|
|
753
|
+
h.path([
|
|
754
|
+
h.StrokeLinecap('round'),
|
|
755
|
+
h.StrokeLinejoin('round'),
|
|
756
|
+
h.D(isCopied ? COPY_SUCCESS_ICON : COPY_ICON),
|
|
757
|
+
]),
|
|
758
|
+
]),
|
|
759
|
+
]),
|
|
760
|
+
h.span([h.Role('status'), h.AriaLive('polite'), h.Class('sr-only')], [isCopied ? 'Copied to clipboard' : '']),
|
|
761
|
+
])), "@foldkit/devtools/overlay.js#copyPayloadButtonView");
|
|
762
|
+
};
|
|
620
763
|
const previewView = (preview) => __foldkitBrandViewResult((h.span([h.Class('json-preview')], [preview])), "@foldkit/devtools/overlay.js#previewView");
|
|
621
764
|
const diffDotView = h.span([h.Class('diff-dot')]);
|
|
622
765
|
const inlineDiffDotView = h.span([h.Class('diff-dot-inline')]);
|
|
@@ -665,16 +808,16 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
665
808
|
treePath: `${treePath}.${arrayIndex}`,
|
|
666
809
|
depth: childDepth,
|
|
667
810
|
key: globalThis.String(arrayIndex),
|
|
668
|
-
})), "@foldkit/devtools/overlay.js#anonymous~
|
|
811
|
+
})), "@foldkit/devtools/overlay.js#anonymous~56"));
|
|
669
812
|
}
|
|
670
813
|
else if (Predicate.isObject(value)) {
|
|
671
|
-
pipe(value, Record.toEntries, Array.filter(([entryKey]) => __foldkitBrandViewResult((entryKey !== '_tag'), "@foldkit/devtools/overlay.js#anonymous~
|
|
814
|
+
pipe(value, Record.toEntries, Array.filter(([entryKey]) => __foldkitBrandViewResult((entryKey !== '_tag'), "@foldkit/devtools/overlay.js#anonymous~57")), Array.forEach(([entryKey, childValue]) => __foldkitBrandViewResult((flattenTree({
|
|
672
815
|
...shared,
|
|
673
816
|
value: childValue,
|
|
674
817
|
treePath: `${treePath}.${entryKey}`,
|
|
675
818
|
depth: childDepth,
|
|
676
819
|
key: entryKey,
|
|
677
|
-
})), "@foldkit/devtools/overlay.js#anonymous~
|
|
820
|
+
})), "@foldkit/devtools/overlay.js#anonymous~58")));
|
|
678
821
|
}
|
|
679
822
|
};
|
|
680
823
|
const flatNodeView = (value, treePath, depth, key, nodeIsExpandable, isExpanded, isChanged, isAffected, isRoot, tag) => {
|
|
@@ -694,7 +837,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
694
837
|
'diff-changed': isChanged,
|
|
695
838
|
})),
|
|
696
839
|
indent,
|
|
697
|
-
], rowSegments.map(segment => __foldkitBrandViewResult((h.keyed('li')(segment._tag, [h.Class('contents')], [rowSegmentView(segment)])), "@foldkit/devtools/overlay.js#anonymous~
|
|
840
|
+
], rowSegments.map(segment => __foldkitBrandViewResult((h.keyed('li')(segment._tag, [h.Class('contents')], [rowSegmentView(segment)])), "@foldkit/devtools/overlay.js#anonymous~59")))), "@foldkit/devtools/overlay.js#flatNodeView");
|
|
698
841
|
}
|
|
699
842
|
const preview = isExpanded
|
|
700
843
|
? globalThis.Array.isArray(value)
|
|
@@ -718,7 +861,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
718
861
|
...(isRoot
|
|
719
862
|
? []
|
|
720
863
|
: [h.OnClick(Message.ToggledTreeNode({ path: treePath }))]),
|
|
721
|
-
], rowSegments.map(segment => __foldkitBrandViewResult((h.keyed('li')(segment._tag, [h.Class('contents')], [rowSegmentView(segment)])), "@foldkit/devtools/overlay.js#anonymous~
|
|
864
|
+
], 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");
|
|
722
865
|
};
|
|
723
866
|
const renderFlatNode = (node) => __foldkitBrandViewResult((lazyTreeNode(node.treePath, flatNodeView, [
|
|
724
867
|
node.value,
|
|
@@ -742,7 +885,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
742
885
|
changedPaths,
|
|
743
886
|
affectedPaths,
|
|
744
887
|
depth: 0,
|
|
745
|
-
key: Option.getOrElse(maybeRootLabel, () => __foldkitBrandViewResult((''), "@foldkit/devtools/overlay.js#anonymous~
|
|
888
|
+
key: Option.getOrElse(maybeRootLabel, () => __foldkitBrandViewResult((''), "@foldkit/devtools/overlay.js#anonymous~61")),
|
|
746
889
|
accumulator: nodes,
|
|
747
890
|
indentRootChildren,
|
|
748
891
|
});
|
|
@@ -756,8 +899,8 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
756
899
|
return __foldkitBrandViewResult(('0ms'), "@foldkit/devtools/overlay.js#inspectedTimestamp");
|
|
757
900
|
}
|
|
758
901
|
const baseTimestamp = pipe(model.entries, Array.head, Option.match({
|
|
759
|
-
onNone: () => __foldkitBrandViewResult((0), "@foldkit/devtools/overlay.js#onNone~
|
|
760
|
-
onSome: ({ timestamp }) => __foldkitBrandViewResult((timestamp), "@foldkit/devtools/overlay.js#onSome~
|
|
902
|
+
onNone: () => __foldkitBrandViewResult((0), "@foldkit/devtools/overlay.js#onNone~4"),
|
|
903
|
+
onSome: ({ timestamp }) => __foldkitBrandViewResult((timestamp), "@foldkit/devtools/overlay.js#onSome~3"),
|
|
761
904
|
}));
|
|
762
905
|
return __foldkitBrandViewResult((pipe(Array.get(model.entries, selectedIndex - model.startIndex), Option.map(entry => {
|
|
763
906
|
const delta = entry.timestamp - baseTimestamp;
|
|
@@ -765,8 +908,8 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
765
908
|
const remainingMs = delta % MILLIS_PER_SECOND;
|
|
766
909
|
return __foldkitBrandViewResult((seconds > 0
|
|
767
910
|
? `+${seconds}s ${remainingMs.toFixed(1)}ms`
|
|
768
|
-
: `+${remainingMs.toFixed(1)}ms`), "@foldkit/devtools/overlay.js#anonymous~
|
|
769
|
-
}), Option.getOrElse(() => __foldkitBrandViewResult((''), "@foldkit/devtools/overlay.js#anonymous~
|
|
911
|
+
: `+${remainingMs.toFixed(1)}ms`), "@foldkit/devtools/overlay.js#anonymous~62");
|
|
912
|
+
}), Option.getOrElse(() => __foldkitBrandViewResult((''), "@foldkit/devtools/overlay.js#anonymous~63")))), "@foldkit/devtools/overlay.js#inspectedTimestamp");
|
|
770
913
|
};
|
|
771
914
|
const emptyInspectorView = h.div([
|
|
772
915
|
h.Class('flex-1 flex items-center justify-center text-dt-muted text-2xs font-mono min-w-0'),
|
|
@@ -774,7 +917,16 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
774
917
|
const noMessageView = () => __foldkitBrandViewResult((h.div([
|
|
775
918
|
h.Class('flex-1 flex items-center justify-center text-dt-muted text-2xs font-mono min-w-0'),
|
|
776
919
|
], ['init: no Message'])), "@foldkit/devtools/overlay.js#noMessageView");
|
|
777
|
-
const
|
|
920
|
+
const payloadHeaderView = (label, payload, targetId, copyStates) => __foldkitBrandViewResult((h.div([
|
|
921
|
+
h.Class('flex items-center justify-between px-2 py-1 border-b text-2xs text-dt-muted font-mono shrink-0'),
|
|
922
|
+
], [
|
|
923
|
+
h.span([], [label]),
|
|
924
|
+
copyPayloadButtonView(payload, targetId, copyStates, `${label} payload`),
|
|
925
|
+
])), "@foldkit/devtools/overlay.js#payloadHeaderView");
|
|
926
|
+
const modelTabContent = (inspectedModel, expandedPaths, changedPaths, affectedPaths, selectedIndex, copyStates) => __foldkitBrandViewResult((h.div([h.Class('flex flex-col flex-1 min-h-0 min-w-0')], [
|
|
927
|
+
payloadHeaderView('Model', inspectedModel, `Model:${selectedIndex}`, copyStates),
|
|
928
|
+
treeView(inspectedModel, 'root', expandedPaths, changedPaths, affectedPaths, Option.none(), true),
|
|
929
|
+
])), "@foldkit/devtools/overlay.js#modelTabContent");
|
|
778
930
|
const unwrapToLeaf = (message) => {
|
|
779
931
|
if (isTagged(message) &&
|
|
780
932
|
GOT_MESSAGE_PATTERN.test(message._tag) &&
|
|
@@ -809,7 +961,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
809
961
|
}
|
|
810
962
|
return __foldkitBrandViewResult((current), "@foldkit/devtools/overlay.js#unwrapIfFiltered");
|
|
811
963
|
};
|
|
812
|
-
const messageTabContent = (maybeInspectedMessage, maybeSubmodelFilter, isFlattened, expandedPaths, timestamp) => __foldkitBrandViewResult((Option.match(maybeInspectedMessage, {
|
|
964
|
+
const messageTabContent = (maybeInspectedMessage, maybeSubmodelFilter, isFlattened, expandedPaths, timestamp, selectedIndex, copyStates) => __foldkitBrandViewResult((Option.match(maybeInspectedMessage, {
|
|
813
965
|
onNone: noMessageView,
|
|
814
966
|
onSome: rawMessage => {
|
|
815
967
|
const message = isFlattened
|
|
@@ -817,12 +969,15 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
817
969
|
: unwrapIfFiltered(rawMessage, maybeSubmodelFilter);
|
|
818
970
|
return __foldkitBrandViewResult((h.div([h.Class('flex flex-col flex-1 min-h-0 min-w-0')], [
|
|
819
971
|
h.div([
|
|
820
|
-
h.Class('px-2 py-1 border-b text-2xs text-dt-muted font-mono shrink-0'),
|
|
821
|
-
], [
|
|
972
|
+
h.Class('flex items-center justify-between px-2 py-1 border-b text-2xs text-dt-muted font-mono shrink-0'),
|
|
973
|
+
], [
|
|
974
|
+
h.span([], [timestamp]),
|
|
975
|
+
copyPayloadButtonView(message, `Message:${selectedIndex}:${isFlattened}:${Option.getOrElse(maybeSubmodelFilter, () => __foldkitBrandViewResult(('All'), "@foldkit/devtools/overlay.js#anonymous~64"))}`, copyStates, 'Message payload'),
|
|
976
|
+
]),
|
|
822
977
|
h.div([h.Class('flex flex-col flex-1 min-h-0 min-w-0 pt-1 pl-1')], [
|
|
823
978
|
treeView(message, 'root', expandedPaths, HashSet.empty(), HashSet.empty(), Option.none(), false),
|
|
824
979
|
]),
|
|
825
|
-
])), "@foldkit/devtools/overlay.js#onSome~
|
|
980
|
+
])), "@foldkit/devtools/overlay.js#onSome~4");
|
|
826
981
|
},
|
|
827
982
|
})), "@foldkit/devtools/overlay.js#messageTabContent");
|
|
828
983
|
const selectedHistoryIndex = (model) => {
|
|
@@ -830,7 +985,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
830
985
|
onEmpty: () => __foldkitBrandViewResult((INIT_INDEX), "@foldkit/devtools/overlay.js#onEmpty~4"),
|
|
831
986
|
onNonEmpty: () => __foldkitBrandViewResult((model.startIndex + model.entries.length - 1), "@foldkit/devtools/overlay.js#onNonEmpty~4"),
|
|
832
987
|
});
|
|
833
|
-
return __foldkitBrandViewResult((Match.value(mode).pipe(Match.when('TimeTravel', () => __foldkitBrandViewResult((model.isPaused ? model.pausedAtIndex : lastIndex), "@foldkit/devtools/overlay.js#anonymous~
|
|
988
|
+
return __foldkitBrandViewResult((Match.value(mode).pipe(Match.when('TimeTravel', () => __foldkitBrandViewResult((model.isPaused ? model.pausedAtIndex : lastIndex), "@foldkit/devtools/overlay.js#anonymous~65")), Match.when('Inspect', () => __foldkitBrandViewResult((model.selectedIndex), "@foldkit/devtools/overlay.js#anonymous~66")), Match.exhaustive)), "@foldkit/devtools/overlay.js#selectedHistoryIndex");
|
|
834
989
|
};
|
|
835
990
|
const selectedCommands = (model) => {
|
|
836
991
|
const selectedIndex = selectedHistoryIndex(model);
|
|
@@ -838,14 +993,11 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
838
993
|
return __foldkitBrandViewResult((model.initCommands), "@foldkit/devtools/overlay.js#selectedCommands");
|
|
839
994
|
}
|
|
840
995
|
else {
|
|
841
|
-
return __foldkitBrandViewResult((pipe(model.entries, Array.get(selectedIndex - model.startIndex), Option.map(entry => __foldkitBrandViewResult((entry.commands), "@foldkit/devtools/overlay.js#anonymous~
|
|
996
|
+
return __foldkitBrandViewResult((pipe(model.entries, Array.get(selectedIndex - model.startIndex), Option.map(entry => __foldkitBrandViewResult((entry.commands), "@foldkit/devtools/overlay.js#anonymous~67")), Option.getOrElse(() => __foldkitBrandViewResult((NO_COMMANDS), "@foldkit/devtools/overlay.js#anonymous~68")))), "@foldkit/devtools/overlay.js#selectedCommands");
|
|
842
997
|
}
|
|
843
998
|
};
|
|
844
999
|
const flattenCommand = (command, index, expandedPaths) => {
|
|
845
|
-
const taggedValue =
|
|
846
|
-
onNone: () => (__foldkitBrandViewResult(({ _tag: command.name }), "@foldkit/devtools/overlay.js#onNone~3")),
|
|
847
|
-
onSome: argsValue => (__foldkitBrandViewResult(({ ...argsValue, _tag: command.name }), "@foldkit/devtools/overlay.js#onSome~4")),
|
|
848
|
-
});
|
|
1000
|
+
const taggedValue = taggedPayload(command.name, command.args);
|
|
849
1001
|
const rootPath = `command-${index}`;
|
|
850
1002
|
const nodes = [];
|
|
851
1003
|
flattenTree({
|
|
@@ -862,12 +1014,12 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
862
1014
|
});
|
|
863
1015
|
return __foldkitBrandViewResult((nodes), "@foldkit/devtools/overlay.js#flattenCommand");
|
|
864
1016
|
};
|
|
865
|
-
const commandsTabContent = (commands, expandedPaths) => __foldkitBrandViewResult((Array.match(commands, {
|
|
1017
|
+
const commandsTabContent = (commands, expandedPaths, selectedIndex, copyStates) => __foldkitBrandViewResult((Array.match(commands, {
|
|
866
1018
|
onEmpty: () => __foldkitBrandViewResult((h.div([
|
|
867
1019
|
h.Class('flex-1 flex items-center justify-center text-dt-muted text-2xs font-mono min-w-0'),
|
|
868
1020
|
], ['No Commands returned'])), "@foldkit/devtools/overlay.js#onEmpty~5"),
|
|
869
1021
|
onNonEmpty: commandList => __foldkitBrandViewResult((h.div([
|
|
870
|
-
h.Class('flex flex-col flex-1 min-h-0 min-w-0 overflow-auto overscroll-none'),
|
|
1022
|
+
h.Class('dt-payload-list flex flex-col flex-1 min-h-0 min-w-0 overflow-auto overscroll-none'),
|
|
871
1023
|
], Array.map(commandList, (command, index) => __foldkitBrandViewResult((h.div([h.Class('flex items-start px-2 py-1 border-b gap-1.5')], [
|
|
872
1024
|
h.span([h.Class(indexClass)], [globalThis.String(index + 1)]),
|
|
873
1025
|
h.div([h.Class('flex flex-col flex-1 min-w-0')], [
|
|
@@ -877,7 +1029,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
877
1029
|
h.span([h.AriaHidden(true)], ['…']),
|
|
878
1030
|
h.span([h.Class('sr-only')], ['Destination pending']),
|
|
879
1031
|
]),
|
|
880
|
-
]), "@foldkit/devtools/overlay.js#onNone~
|
|
1032
|
+
]), "@foldkit/devtools/overlay.js#onNone~5"),
|
|
881
1033
|
onSome: submodelPath => __foldkitBrandViewResult((Array.match(submodelPath, {
|
|
882
1034
|
onEmpty: () => __foldkitBrandViewResult(([]), "@foldkit/devtools/overlay.js#onEmpty~6"),
|
|
883
1035
|
onNonEmpty: submodelPath => __foldkitBrandViewResult(([
|
|
@@ -889,7 +1041,8 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
889
1041
|
}),
|
|
890
1042
|
...Array.map(flattenCommand(command, index, expandedPaths), renderFlatNode),
|
|
891
1043
|
]),
|
|
892
|
-
|
|
1044
|
+
copyPayloadButtonView(taggedPayload(command.name, command.args), `Command:${selectedIndex}:${index}`, copyStates, `Command ${index + 1} (${command.name}) payload`),
|
|
1045
|
+
])), "@foldkit/devtools/overlay.js#anonymous~69")))), "@foldkit/devtools/overlay.js#onNonEmpty~5"),
|
|
893
1046
|
})), "@foldkit/devtools/overlay.js#commandsTabContent");
|
|
894
1047
|
const selectedMountActivity = (model) => {
|
|
895
1048
|
const selectedIndex = selectedHistoryIndex(model);
|
|
@@ -898,7 +1051,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
898
1051
|
}
|
|
899
1052
|
else {
|
|
900
1053
|
return __foldkitBrandViewResult((pipe(model.entries, Array.get(selectedIndex - model.startIndex), Option.match({
|
|
901
|
-
onNone: () => (__foldkitBrandViewResult(({ starts: NO_MOUNTS, ends: NO_MOUNTS }), "@foldkit/devtools/overlay.js#onNone~
|
|
1054
|
+
onNone: () => (__foldkitBrandViewResult(({ starts: NO_MOUNTS, ends: NO_MOUNTS }), "@foldkit/devtools/overlay.js#onNone~6")),
|
|
902
1055
|
onSome: entry => (__foldkitBrandViewResult(({
|
|
903
1056
|
starts: entry.mountStarts,
|
|
904
1057
|
ends: entry.mountEnds,
|
|
@@ -907,10 +1060,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
907
1060
|
}
|
|
908
1061
|
};
|
|
909
1062
|
const flattenMount = (mount, sectionLabel, index, expandedPaths) => {
|
|
910
|
-
const taggedValue =
|
|
911
|
-
onNone: () => (__foldkitBrandViewResult(({ _tag: mount.name }), "@foldkit/devtools/overlay.js#onNone~6")),
|
|
912
|
-
onSome: argsValue => (__foldkitBrandViewResult(({ ...argsValue, _tag: mount.name }), "@foldkit/devtools/overlay.js#onSome~7")),
|
|
913
|
-
});
|
|
1063
|
+
const taggedValue = taggedPayload(mount.name, mount.args);
|
|
914
1064
|
const rootPath = `mount-${sectionLabel}-${index}`;
|
|
915
1065
|
const nodes = [];
|
|
916
1066
|
flattenTree({
|
|
@@ -927,16 +1077,17 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
927
1077
|
});
|
|
928
1078
|
return __foldkitBrandViewResult((nodes), "@foldkit/devtools/overlay.js#flattenMount");
|
|
929
1079
|
};
|
|
930
|
-
const mountListSection = (label, mounts, expandedPaths) => __foldkitBrandViewResult((h.div([h.Class('flex flex-col shrink-0')], [
|
|
1080
|
+
const mountListSection = (label, mounts, expandedPaths, selectedIndex, copyStates) => __foldkitBrandViewResult((h.div([h.Class('flex flex-col shrink-0')], [
|
|
931
1081
|
h.div([
|
|
932
1082
|
h.Class('px-2 py-1 border-b text-2xs text-dt-muted font-mono shrink-0'),
|
|
933
1083
|
], [label]),
|
|
934
1084
|
...Array.map(mounts, (mount, index) => __foldkitBrandViewResult((h.div([h.Class('flex items-start px-2 py-1 border-b gap-1.5')], [
|
|
935
1085
|
h.span([h.Class(indexClass)], [globalThis.String(index + 1)]),
|
|
936
1086
|
h.div([h.Class('flex flex-col flex-1 min-w-0')], Array.map(flattenMount(mount, label, index, expandedPaths), renderFlatNode)),
|
|
937
|
-
|
|
1087
|
+
copyPayloadButtonView(taggedPayload(mount.name, mount.args), `Mount:${selectedIndex}:${label}:${index}`, copyStates, `${label} Mount ${index + 1} (${mount.name}) payload`),
|
|
1088
|
+
])), "@foldkit/devtools/overlay.js#anonymous~70")),
|
|
938
1089
|
])), "@foldkit/devtools/overlay.js#mountListSection");
|
|
939
|
-
const mountsTabContent = (starts, ends, expandedPaths) => {
|
|
1090
|
+
const mountsTabContent = (starts, ends, expandedPaths, selectedIndex, copyStates) => {
|
|
940
1091
|
const hasAny = Array.isReadonlyArrayNonEmpty(starts) ||
|
|
941
1092
|
Array.isReadonlyArrayNonEmpty(ends);
|
|
942
1093
|
if (!hasAny) {
|
|
@@ -945,38 +1096,53 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
945
1096
|
], ['No Mounts during this render'])), "@foldkit/devtools/overlay.js#mountsTabContent");
|
|
946
1097
|
}
|
|
947
1098
|
return __foldkitBrandViewResult((h.div([
|
|
948
|
-
h.Class('flex flex-col flex-1 min-h-0 min-w-0 overflow-auto overscroll-none'),
|
|
1099
|
+
h.Class('dt-payload-list flex flex-col flex-1 min-h-0 min-w-0 overflow-auto overscroll-none'),
|
|
949
1100
|
], [
|
|
950
1101
|
...(Array.isReadonlyArrayNonEmpty(starts)
|
|
951
|
-
? [
|
|
1102
|
+
? [
|
|
1103
|
+
mountListSection('Started', starts, expandedPaths, selectedIndex, copyStates),
|
|
1104
|
+
]
|
|
952
1105
|
: []),
|
|
953
1106
|
...(Array.isReadonlyArrayNonEmpty(ends)
|
|
954
|
-
? [
|
|
1107
|
+
? [
|
|
1108
|
+
mountListSection('Ended', ends, expandedPaths, selectedIndex, copyStates),
|
|
1109
|
+
]
|
|
955
1110
|
: []),
|
|
956
1111
|
])), "@foldkit/devtools/overlay.js#mountsTabContent");
|
|
957
1112
|
};
|
|
958
|
-
const inspectorTabContent = (model, tab, inspectedModel) =>
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
model.affectedPaths,
|
|
963
|
-
])), "@foldkit/devtools/overlay.js#anonymous~69")), Match.when('Message', () => __foldkitBrandViewResult((lazyTabContent('Message', messageTabContent, [
|
|
964
|
-
model.maybeInspectedMessage,
|
|
965
|
-
model.maybeSubmodelFilter,
|
|
966
|
-
model.isFlattened,
|
|
967
|
-
model.expandedPaths,
|
|
968
|
-
inspectedTimestamp(model),
|
|
969
|
-
])), "@foldkit/devtools/overlay.js#anonymous~70")), Match.when('Commands', () => __foldkitBrandViewResult((lazyTabContent('Commands', commandsTabContent, [
|
|
970
|
-
selectedCommands(model),
|
|
971
|
-
model.expandedPaths,
|
|
972
|
-
])), "@foldkit/devtools/overlay.js#anonymous~71")), Match.when('Mounts', () => {
|
|
973
|
-
const { starts, ends } = selectedMountActivity(model);
|
|
974
|
-
return __foldkitBrandViewResult((lazyTabContent('Mounts', mountsTabContent, [
|
|
975
|
-
starts,
|
|
976
|
-
ends,
|
|
1113
|
+
const inspectorTabContent = (model, tab, inspectedModel) => {
|
|
1114
|
+
const selectedIndex = selectedHistoryIndex(model);
|
|
1115
|
+
return __foldkitBrandViewResult((Match.value(tab).pipe(Match.when('Model', () => __foldkitBrandViewResult((lazyTabContent('Model', modelTabContent, [
|
|
1116
|
+
inspectedModel,
|
|
977
1117
|
model.expandedPaths,
|
|
978
|
-
|
|
979
|
-
|
|
1118
|
+
model.changedPaths,
|
|
1119
|
+
model.affectedPaths,
|
|
1120
|
+
selectedIndex,
|
|
1121
|
+
model.copyStates,
|
|
1122
|
+
])), "@foldkit/devtools/overlay.js#anonymous~71")), Match.when('Message', () => __foldkitBrandViewResult((lazyTabContent('Message', messageTabContent, [
|
|
1123
|
+
model.maybeInspectedMessage,
|
|
1124
|
+
model.maybeSubmodelFilter,
|
|
1125
|
+
model.isFlattened,
|
|
1126
|
+
model.expandedPaths,
|
|
1127
|
+
inspectedTimestamp(model),
|
|
1128
|
+
selectedIndex,
|
|
1129
|
+
model.copyStates,
|
|
1130
|
+
])), "@foldkit/devtools/overlay.js#anonymous~72")), Match.when('Commands', () => __foldkitBrandViewResult((lazyTabContent('Commands', commandsTabContent, [
|
|
1131
|
+
selectedCommands(model),
|
|
1132
|
+
model.expandedPaths,
|
|
1133
|
+
selectedIndex,
|
|
1134
|
+
model.copyStates,
|
|
1135
|
+
])), "@foldkit/devtools/overlay.js#anonymous~73")), Match.when('Mounts', () => {
|
|
1136
|
+
const { starts, ends } = selectedMountActivity(model);
|
|
1137
|
+
return __foldkitBrandViewResult((lazyTabContent('Mounts', mountsTabContent, [
|
|
1138
|
+
starts,
|
|
1139
|
+
ends,
|
|
1140
|
+
model.expandedPaths,
|
|
1141
|
+
selectedIndex,
|
|
1142
|
+
model.copyStates,
|
|
1143
|
+
])), "@foldkit/devtools/overlay.js#anonymous~74");
|
|
1144
|
+
}), Match.exhaustive)), "@foldkit/devtools/overlay.js#inspectorTabContent");
|
|
1145
|
+
};
|
|
980
1146
|
const inspectorPaneView = (model) => __foldkitBrandViewResult((h.div([
|
|
981
1147
|
h.Class('flex flex-col border-l min-w-0 min-h-0 flex-1 dt-inspector-pane'),
|
|
982
1148
|
], [
|
|
@@ -995,7 +1161,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
995
1161
|
h.Class(clsx('dt-tab-button cursor-pointer text-base font-mono px-3 py-1', tab.isActive
|
|
996
1162
|
? 'text-dt dt-tab-active'
|
|
997
1163
|
: 'text-dt-muted')),
|
|
998
|
-
], [h.span([], [tab.value])])), "@foldkit/devtools/overlay.js#anonymous~
|
|
1164
|
+
], [h.span([], [tab.value])])), "@foldkit/devtools/overlay.js#anonymous~75"))),
|
|
999
1165
|
...tabs.map(tab => __foldkitBrandViewResult((h.div([
|
|
1000
1166
|
...tab.panel,
|
|
1001
1167
|
h.Class('flex flex-col flex-1 min-h-0 min-w-0'),
|
|
@@ -1006,9 +1172,9 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
1006
1172
|
], [
|
|
1007
1173
|
Option.match(model.maybeInspectedModel, {
|
|
1008
1174
|
onNone: () => __foldkitBrandViewResult((emptyInspectorView), "@foldkit/devtools/overlay.js#onNone~7"),
|
|
1009
|
-
onSome: inspectedModel => __foldkitBrandViewResult((inspectorTabContent(model, tab.value, inspectedModel)), "@foldkit/devtools/overlay.js#onSome~
|
|
1175
|
+
onSome: inspectedModel => __foldkitBrandViewResult((inspectorTabContent(model, tab.value, inspectedModel)), "@foldkit/devtools/overlay.js#onSome~7"),
|
|
1010
1176
|
}),
|
|
1011
|
-
])), "@foldkit/devtools/overlay.js#anonymous~
|
|
1177
|
+
])), "@foldkit/devtools/overlay.js#anonymous~76")),
|
|
1012
1178
|
])), "@foldkit/devtools/overlay.js#toView"),
|
|
1013
1179
|
},
|
|
1014
1180
|
toParentMessage: message => __foldkitBrandViewResult((Message.GotInspectorTabsMessage({ message })), "@foldkit/devtools/overlay.js#toParentMessage~5"),
|
|
@@ -1092,7 +1258,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
1092
1258
|
view: SubmodelFilterListbox.view,
|
|
1093
1259
|
viewInputs: {
|
|
1094
1260
|
items: [ALL_MESSAGES_VALUE, ...model.submodelTags],
|
|
1095
|
-
maybeSelectedValue: Option.orElseSome(model.maybeSubmodelFilter, () => __foldkitBrandViewResult((ALL_MESSAGES_VALUE), "@foldkit/devtools/overlay.js#anonymous~
|
|
1261
|
+
maybeSelectedValue: Option.orElseSome(model.maybeSubmodelFilter, () => __foldkitBrandViewResult((ALL_MESSAGES_VALUE), "@foldkit/devtools/overlay.js#anonymous~77")),
|
|
1096
1262
|
itemToConfig: item => (__foldkitBrandViewResult(({
|
|
1097
1263
|
className: 'dt-filter-item',
|
|
1098
1264
|
content: h.div([h.Class('flex items-center gap-2')], [checkIconView, h.span([], [filterItemLabel(item)])]),
|
|
@@ -1162,7 +1328,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
1162
1328
|
: {
|
|
1163
1329
|
status: h.span([h.Class(`${statusClass} text-dt-live font-medium`)], ['Live']),
|
|
1164
1330
|
maybeAction: Option.none(),
|
|
1165
|
-
}), "@foldkit/devtools/overlay.js#anonymous~
|
|
1331
|
+
}), "@foldkit/devtools/overlay.js#anonymous~78")), Match.when('Inspect', () => (__foldkitBrandViewResult(({
|
|
1166
1332
|
status: h.span([h.Class(`${statusClass} text-dt-accent`)], [
|
|
1167
1333
|
model.selectedIndex === INIT_INDEX
|
|
1168
1334
|
? 'Inspecting (init)'
|
|
@@ -1172,7 +1338,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
1172
1338
|
h.Class(actionButtonClass),
|
|
1173
1339
|
h.OnClick(Message.ClickedFollowLatest()),
|
|
1174
1340
|
], ['Follow Latest →'])),
|
|
1175
|
-
}), "@foldkit/devtools/overlay.js#anonymous~
|
|
1341
|
+
}), "@foldkit/devtools/overlay.js#anonymous~79"))), Match.exhaustive);
|
|
1176
1342
|
const maybeClearHistoryButton = OptionExt.when(!model.isPaused, clearHistoryButton());
|
|
1177
1343
|
return __foldkitBrandViewResult((h.header([h.Class(headerClass)], [
|
|
1178
1344
|
status,
|
|
@@ -1219,11 +1385,11 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
1219
1385
|
const messageListBody = (entries, startIndex, selectedIndex, isPaused, pausedAtIndex, maybeFilterTag, isFlattened) => {
|
|
1220
1386
|
const baseTimestamp = pipe(entries, Array.head, Option.match({
|
|
1221
1387
|
onNone: () => __foldkitBrandViewResult((0), "@foldkit/devtools/overlay.js#onNone~9"),
|
|
1222
|
-
onSome: ({ timestamp }) => __foldkitBrandViewResult((timestamp), "@foldkit/devtools/overlay.js#onSome~
|
|
1388
|
+
onSome: ({ timestamp }) => __foldkitBrandViewResult((timestamp), "@foldkit/devtools/overlay.js#onSome~8"),
|
|
1223
1389
|
}));
|
|
1224
1390
|
const isInitSelected = selectedIndex === INIT_INDEX;
|
|
1225
1391
|
const isFiltered = Option.isSome(maybeFilterTag);
|
|
1226
|
-
const leafOrTag = (entry) => __foldkitBrandViewResult((Option.getOrElse(entry.maybeLeafTag, () => __foldkitBrandViewResult((entry.tag), "@foldkit/devtools/overlay.js#anonymous~
|
|
1392
|
+
const leafOrTag = (entry) => __foldkitBrandViewResult((Option.getOrElse(entry.maybeLeafTag, () => __foldkitBrandViewResult((entry.tag), "@foldkit/devtools/overlay.js#anonymous~80"))), "@foldkit/devtools/overlay.js#leafOrTag");
|
|
1227
1393
|
const displayTagFor = (entry) => {
|
|
1228
1394
|
if (isFlattened) {
|
|
1229
1395
|
return __foldkitBrandViewResult((leafOrTag(entry)), "@foldkit/devtools/overlay.js#displayTagFor");
|
|
@@ -1231,15 +1397,15 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
1231
1397
|
else {
|
|
1232
1398
|
return __foldkitBrandViewResult((Option.match(maybeFilterTag, {
|
|
1233
1399
|
onNone: () => __foldkitBrandViewResult((entry.tag), "@foldkit/devtools/overlay.js#onNone~10"),
|
|
1234
|
-
onSome: filterTag => __foldkitBrandViewResult((pipe(entry.submodelPath, Array.findFirstIndex(pathTag => __foldkitBrandViewResult((pathTag === filterTag), "@foldkit/devtools/overlay.js#anonymous~
|
|
1400
|
+
onSome: filterTag => __foldkitBrandViewResult((pipe(entry.submodelPath, Array.findFirstIndex(pathTag => __foldkitBrandViewResult((pathTag === filterTag), "@foldkit/devtools/overlay.js#anonymous~81")), Option.flatMap(filterIndex => __foldkitBrandViewResult((Array.get(entry.submodelPath, Number.increment(filterIndex))), "@foldkit/devtools/overlay.js#anonymous~82")), Option.orElse(() => __foldkitBrandViewResult((entry.maybeLeafTag), "@foldkit/devtools/overlay.js#anonymous~83")), Option.getOrElse(() => __foldkitBrandViewResult((entry.tag), "@foldkit/devtools/overlay.js#anonymous~84")))), "@foldkit/devtools/overlay.js#onSome~9"),
|
|
1235
1401
|
})), "@foldkit/devtools/overlay.js#displayTagFor");
|
|
1236
1402
|
}
|
|
1237
1403
|
};
|
|
1238
1404
|
const indexedEntries = pipe(entries, Array.map((entry, arrayIndex) => (__foldkitBrandViewResult(({
|
|
1239
1405
|
entry,
|
|
1240
1406
|
absoluteIndex: startIndex + arrayIndex,
|
|
1241
|
-
}), "@foldkit/devtools/overlay.js#anonymous~
|
|
1242
|
-
? Array.filter(({ entry }) => __foldkitBrandViewResult((Array.contains(entry.submodelPath, maybeFilterTag.value)), "@foldkit/devtools/overlay.js#anonymous~
|
|
1407
|
+
}), "@foldkit/devtools/overlay.js#anonymous~85"))), isFiltered
|
|
1408
|
+
? Array.filter(({ entry }) => __foldkitBrandViewResult((Array.contains(entry.submodelPath, maybeFilterTag.value)), "@foldkit/devtools/overlay.js#anonymous~86"))
|
|
1243
1409
|
: Function.identity);
|
|
1244
1410
|
const messageRows = pipe(indexedEntries, Array.map(({ entry, absoluteIndex }) => {
|
|
1245
1411
|
const isSelected = selectedIndex === absoluteIndex;
|
|
@@ -1252,11 +1418,11 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
1252
1418
|
isPausedHere,
|
|
1253
1419
|
entry.timestamp - baseTimestamp,
|
|
1254
1420
|
entry.isModelChanged,
|
|
1255
|
-
])), "@foldkit/devtools/overlay.js#anonymous~
|
|
1421
|
+
])), "@foldkit/devtools/overlay.js#anonymous~87");
|
|
1256
1422
|
}), Array.reverse);
|
|
1257
1423
|
return __foldkitBrandViewResult((h.ul([
|
|
1258
1424
|
h.Class('message-list flex-1 overflow-y-auto min-h-0 overscroll-none'),
|
|
1259
|
-
h.OnScroll(scrollTop => __foldkitBrandViewResult((Message.ScrolledMessageList({ scrollTop })), "@foldkit/devtools/overlay.js#anonymous~
|
|
1425
|
+
h.OnScroll(scrollTop => __foldkitBrandViewResult((Message.ScrolledMessageList({ scrollTop })), "@foldkit/devtools/overlay.js#anonymous~88")),
|
|
1260
1426
|
], isFiltered
|
|
1261
1427
|
? messageRows
|
|
1262
1428
|
: [
|
|
@@ -1384,13 +1550,13 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
1384
1550
|
inspectorPaneView(model),
|
|
1385
1551
|
])), "@foldkit/devtools/overlay.js#messagesScreenView");
|
|
1386
1552
|
};
|
|
1387
|
-
const contentView = (model) => __foldkitBrandViewResult((Match.value(model.screen).pipe(Match.withReturnType(), Match.when('Messages', () => __foldkitBrandViewResult((messagesScreenView(model)), "@foldkit/devtools/overlay.js#anonymous~
|
|
1553
|
+
const contentView = (model) => __foldkitBrandViewResult((Match.value(model.screen).pipe(Match.withReturnType(), Match.when('Messages', () => __foldkitBrandViewResult((messagesScreenView(model)), "@foldkit/devtools/overlay.js#anonymous~89")), Match.when('Settings', () => __foldkitBrandViewResult((settingsScreenView(model)), "@foldkit/devtools/overlay.js#anonymous~90")), Match.exhaustive)), "@foldkit/devtools/overlay.js#contentView");
|
|
1388
1554
|
const panelView = (model) => __foldkitBrandViewResult((h.div([
|
|
1389
1555
|
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])),
|
|
1390
1556
|
], [
|
|
1391
1557
|
...Option.map(maybeBanner, banner => __foldkitBrandViewResult((h.div([
|
|
1392
1558
|
h.Class('px-3 py-2 border-b text-sm text-dt-muted font-mono shrink-0 leading-snug'),
|
|
1393
|
-
], [banner])), "@foldkit/devtools/overlay.js#anonymous~
|
|
1559
|
+
], [banner])), "@foldkit/devtools/overlay.js#anonymous~91")).pipe(Option.toArray),
|
|
1394
1560
|
headerView(model),
|
|
1395
1561
|
contentView(model),
|
|
1396
1562
|
footerView(model),
|
|
@@ -1400,7 +1566,7 @@ const buildOverlayView = (position, mode, shadow, maybeBanner, h) => {
|
|
|
1400
1566
|
...OptionExt.when(model.isPaused && mode === 'TimeTravel', interactionBlocker()).pipe(Option.toArray),
|
|
1401
1567
|
...OptionExt.when(model.isOpen, panelView(model)).pipe(Option.toArray),
|
|
1402
1568
|
badgeView(model),
|
|
1403
|
-
])), "@foldkit/devtools/overlay.js#anonymous~
|
|
1569
|
+
])), "@foldkit/devtools/overlay.js#anonymous~92")), "@foldkit/devtools/overlay.js#buildOverlayView");
|
|
1404
1570
|
};
|
|
1405
1571
|
// CREATE
|
|
1406
1572
|
const VIEW_TRANSITION_NAME = 'foldkit-devtools';
|
|
@@ -1481,10 +1647,10 @@ const createShadowContainer = () => {
|
|
|
1481
1647
|
return __foldkitBrandViewResult(({ container, shadow }), "@foldkit/devtools/overlay.js#createShadowContainer");
|
|
1482
1648
|
};
|
|
1483
1649
|
export const createOverlay = (store, position, mode, maybeBanner) => __foldkitBrandViewResult((Effect.gen(function* () {
|
|
1484
|
-
const { container, shadow } = yield* Effect.acquireRelease(Effect.sync(() => __foldkitBrandViewResult((createShadowContainer()), "@foldkit/devtools/overlay.js#anonymous~
|
|
1650
|
+
const { container, shadow } = yield* Effect.acquireRelease(Effect.sync(() => __foldkitBrandViewResult((createShadowContainer()), "@foldkit/devtools/overlay.js#anonymous~95")), createdShadowContainer => __foldkitBrandViewResult((Effect.sync(() => {
|
|
1485
1651
|
createdShadowContainer.shadow.host.remove();
|
|
1486
1652
|
document.getElementById(VIEW_TRANSITION_STYLE_ID)?.remove();
|
|
1487
|
-
})), "@foldkit/devtools/overlay.js#anonymous~
|
|
1653
|
+
})), "@foldkit/devtools/overlay.js#anonymous~96"));
|
|
1488
1654
|
container.id = '__foldkit_devtools_overlay__';
|
|
1489
1655
|
const flags = Effect.gen(function* () {
|
|
1490
1656
|
const storeState = yield* SubscriptionRef.get(store.stateRef);
|
|
@@ -1494,7 +1660,7 @@ export const createOverlay = (store, position, mode, maybeBanner) => __foldkitBr
|
|
|
1494
1660
|
isMobile: window.matchMedia(MOBILE_BREAKPOINT_QUERY).matches,
|
|
1495
1661
|
isFlattened,
|
|
1496
1662
|
...toDisplayState(storeState),
|
|
1497
|
-
}), "@foldkit/devtools/overlay.js#anonymous~
|
|
1663
|
+
}), "@foldkit/devtools/overlay.js#anonymous~98");
|
|
1498
1664
|
});
|
|
1499
1665
|
const init = (flags) => {
|
|
1500
1666
|
const { isFlattened, ...displayFlags } = flags;
|
|
@@ -1520,6 +1686,8 @@ export const createOverlay = (store, position, mode, maybeBanner) => __foldkitBr
|
|
|
1520
1686
|
expandedPaths: HashSet.empty(),
|
|
1521
1687
|
changedPaths: HashSet.empty(),
|
|
1522
1688
|
affectedPaths: HashSet.empty(),
|
|
1689
|
+
copyStates: HashMap.empty(),
|
|
1690
|
+
nextCopyRequestId: 0,
|
|
1523
1691
|
maybePendingScrubIndex: Option.none(),
|
|
1524
1692
|
inspectorTabs: Tabs.init({ id: INSPECTOR_TABS_ID }),
|
|
1525
1693
|
activeInspectorTab: 'Model',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foldkit/devtools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.167.0",
|
|
4
4
|
"description": "In-browser DevTools overlay for Foldkit applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -15,23 +15,23 @@
|
|
|
15
15
|
],
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@effect/platform-browser": "4.0.0",
|
|
18
|
-
"@foldkit/ui": ">=0.
|
|
18
|
+
"@foldkit/ui": ">=0.167.0",
|
|
19
19
|
"effect": "4.0.0",
|
|
20
|
-
"foldkit": ">=0.
|
|
20
|
+
"foldkit": ">=0.167.0"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"clsx": "^2.1.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@effect/platform-browser": "4.0.0",
|
|
27
|
+
"@foldkit/ui": "0.167.0",
|
|
28
|
+
"@foldkit/vite-plugin": "0.27.0",
|
|
27
29
|
"effect": "4.0.0",
|
|
30
|
+
"foldkit": "0.167.0",
|
|
28
31
|
"happy-dom": "^20.14.5",
|
|
29
32
|
"rimraf": "^6.1.3",
|
|
30
33
|
"typescript": "^7.0.2",
|
|
31
|
-
"vitest": "^4.1.11"
|
|
32
|
-
"@foldkit/vite-plugin": "0.26.1",
|
|
33
|
-
"@foldkit/ui": "0.166.0",
|
|
34
|
-
"foldkit": "0.166.0"
|
|
34
|
+
"vitest": "^4.1.11"
|
|
35
35
|
},
|
|
36
36
|
"keywords": [
|
|
37
37
|
"foldkit",
|