Skip to content

Commit 378f8c5

Browse files
committed
feat: pannels (#232)
1 parent e2d3b6b commit 378f8c5

39 files changed

+944
-609
lines changed

packages/extension/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ export default defineConfig(({ mode }): UserConfig => {
6969
return {
7070
name: pkg.name,
7171
description: pkg.description,
72-
version: pkg.version,
7372
...manifest,
73+
version: pkg.version,
7474
};
7575
};
7676

packages/scan/src/core/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import type { RenderData } from 'src/core/utils';
1313
import { initReactScanInstrumentation } from 'src/new-outlines';
1414
import styles from '~web/assets/css/styles.css';
1515
import { ICONS } from '~web/assets/svgs/svgs';
16-
import type { States } from '~web/components/inspector/utils';
1716
import { createToolbar, scriptLevelToolbar } from '~web/toolbar';
1817
import { readLocalStorage, saveLocalStorage } from '~web/utils/helpers';
1918
import type { Outline } from '~web/utils/outline';
19+
import type { States } from '~web/views/inspector/utils';
2020
import type {
2121
ChangeReason,
2222
Render,

packages/scan/src/core/instrumentation.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ import {
2121
} from 'bippy';
2222
import { isValidElement } from 'preact';
2323
import { isEqual } from '~core/utils';
24-
import {
25-
collectContextChanges,
26-
collectPropsChanges,
27-
collectStateChanges,
28-
} from '~web/components/inspector/timeline/utils';
2924
import {
3025
RENDER_PHASE_STRING_TO_ENUM,
3126
type RenderPhase,
3227
} from '~web/utils/outline';
28+
import {
29+
collectContextChanges,
30+
collectPropsChanges,
31+
collectStateChanges,
32+
} from '~web/views/inspector/timeline/utils';
3333
import {
3434
type Change,
3535
type ContextChange,

packages/scan/src/core/monitor/performance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { type Fiber, getDisplayName } from 'bippy';
2-
import { getCompositeComponentFromElement } from '~web/components/inspector/utils';
2+
import { getCompositeComponentFromElement } from '~web/views/inspector/utils';
33
import { Store } from '..';
44
import type {
55
PerformanceInteraction,

packages/scan/src/new-outlines/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import {
88
} from 'bippy';
99
import { ReactScanInternals, Store, ignoredProps } from '~core/index';
1010
import { createInstrumentation } from '~core/instrumentation';
11-
import { inspectorUpdateSignal } from '~web/components/inspector/states';
1211
import { readLocalStorage, removeLocalStorage } from '~web/utils/helpers';
1312
import { log, logIntro } from '~web/utils/log';
13+
import { inspectorUpdateSignal } from '~web/views/inspector/states';
1414
import {
1515
OUTLINE_ARRAY_SIZE,
1616
drawCanvas,

packages/scan/src/web/assets/css/styles.tailwind.css

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,3 +620,52 @@ svg {
620620
@apply rounded-sm mx-[1px];
621621
}
622622
}
623+
624+
.react-scan-toolbar-notification {
625+
@apply absolute inset-x-0;
626+
@apply flex items-center gap-x-2;
627+
@apply p-1 pl-2 text-[10px];
628+
@apply text-neutral-300;
629+
@apply bg-black/90;
630+
@apply transition-transform;
631+
632+
&:before {
633+
@apply content-[''];
634+
@apply absolute inset-x-0;
635+
@apply bg-black;
636+
@apply h-2;
637+
}
638+
639+
&.position-top {
640+
@apply top-full -translate-y-full;
641+
@apply rounded-b-lg;
642+
643+
&::before {
644+
@apply top-0 -translate-y-full;
645+
}
646+
}
647+
648+
&.position-bottom {
649+
@apply bottom-full translate-y-full;
650+
@apply rounded-t-lg;
651+
652+
&::before {
653+
@apply bottom-0 translate-y-full;
654+
}
655+
656+
}
657+
658+
&.is-open {
659+
@apply translate-y-0;
660+
}
661+
}
662+
663+
664+
.react-scan-header-item {
665+
@apply absolute inset-0 -translate-y-[200%];
666+
@apply transition-transform duration-300;
667+
668+
&.is-visible {
669+
@apply translate-y-0;
670+
}
671+
}

packages/scan/src/web/assets/svgs/svgs.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,12 @@ export const ICONS = `
9898
<rect width="18" height="11" x="3" y="11" rx="2" ry="2"/>
9999
<path d="M7 11V7a5 5 0 0 1 9.9-1"/>
100100
</symbol>
101+
102+
<symbol id="icon-sanil" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
103+
<path d="M2 13a6 6 0 1 0 12 0 4 4 0 1 0-8 0 2 2 0 0 0 4 0"/>
104+
<circle cx="10" cy="13" r="8"/>
105+
<path d="M2 21h12c4.4 0 8-3.6 8-8V7a2 2 0 1 0-4 0v6"/>
106+
<path d="M18 3 19.1 5.2"/>
107+
</symbol>
101108
</svg>
102109
`;

0 commit comments

Comments
 (0)