-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWidget.svelte
166 lines (139 loc) · 3.25 KB
/
Widget.svelte
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<script lang="ts">
import { setContext } from 'svelte';
import DFProfile from './components/DFProfile.svelte';
import type { IDFProfileWState } from './common/exchangeInterfaces';
import { WidgetWritable } from './stores';
export let model;
const dfProfile = WidgetWritable<IDFProfileWState>(
'dfProfile',
{
profile: [],
shape: [0, 0],
dfName: 'test',
lastUpdatedTime: 0,
isPinned: false,
warnings: []
},
model
);
const exportedCode = WidgetWritable<string>('exportedCode', '', model);
setContext('inlineprofiler:exportedCode', exportedCode);
</script>
<DFProfile
dfName={$dfProfile.dfName}
dataframeProfile={$dfProfile}
isInFocus={false}
isPinned={$dfProfile.isPinned}
/>
<style global lang="postcss">
/* TAILWIND stuff */
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
h1,
h2,
h3,
h4 {
@apply font-semibold;
}
/* Override default from base since clashes with jupyter */
input {
color: black;
}
}
.ͼ1 .cm-scroller {
/* font-family: 'MD IO'; */
font-size: 13px;
}
.stack-list > * + * {
margin-top: var(--gap, 1rem);
}
.stack + .stack {
margin-top: var(--gap, 1rem);
}
.button {
padding: 0;
margin: 0;
padding: 0.5rem 1rem;
font-weight: bold;
background-color: black;
color: white;
border: none;
}
.small-action-button,
.inspector-button {
padding: 0;
margin: 0;
background: transparent;
border: 1px solid transparent;
font-size: 0.75rem;
width: 1.5rem;
height: 1.5rem;
color: hsl(217, 5%, 60%);
display: inline-grid;
place-items: center;
}
.small-action-button:hover {
background-color: hsl(217, 15%, 95%);
cursor: pointer;
color: black;
}
.small-action-button.selected {
background-color: hsl(217, 15%, 85%);
color: black;
}
.table-container {
width: max-content;
}
.table-container table {
font-size: 13px;
text-align: right;
hyphens: none;
word-break: keep-all;
min-width: 100%;
}
.table-container td,
.table-container th {
padding: 0px 0.5rem;
}
.table-container td {
vertical-align: top;
white-space: nowrap;
}
.table-container th {
font-weight: 500;
font-style: italic;
}
.hljs-punctuation {
color: #bbb;
}
.hljs-attr {
font-weight: 500;
}
.hljs-string,
.hljs-number {
color: hsl(217, 1%, 50%);
}
.gutter-indicator {
width: 18px;
display: grid;
place-items: center;
height: 18px;
}
.draggable:active {
cursor: dragging;
}
.ͼ2 .cm-gutters {
background-color: transparent;
border-right: none;
}
.feedbackLink {
@apply font-semibold;
color: #616161;
}
.footerItem {
@apply inline-block;
@apply align-middle;
}
</style>