vite-uni-dev-tool 0.0.1

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.
Files changed (69) hide show
  1. package/README.md +120 -0
  2. package/dev/components/Button/index.vue +34 -0
  3. package/dev/components/Checkbox/index.vue +40 -0
  4. package/dev/components/CloseButton/index.vue +25 -0
  5. package/dev/components/Connection/index.vue +98 -0
  6. package/dev/components/ConsoleList/ConsoleItem.vue +89 -0
  7. package/dev/components/ConsoleList/index.vue +98 -0
  8. package/dev/components/DevTool/index.vue +165 -0
  9. package/dev/components/DevToolButton/index.vue +213 -0
  10. package/dev/components/DevToolWindow/index.vue +847 -0
  11. package/dev/components/DeviceInfo/index.vue +32 -0
  12. package/dev/components/Empty/empty.png +0 -0
  13. package/dev/components/Empty/index.vue +28 -0
  14. package/dev/components/FilterInput/index.vue +86 -0
  15. package/dev/components/JsonPretty/components/Brackets/index.vue +23 -0
  16. package/dev/components/JsonPretty/components/Carets/index.vue +63 -0
  17. package/dev/components/JsonPretty/components/CheckController/index.vue +108 -0
  18. package/dev/components/JsonPretty/components/TreeNode/index.vue +348 -0
  19. package/dev/components/JsonPretty/hooks/useClipboard.ts +21 -0
  20. package/dev/components/JsonPretty/hooks/useError.ts +21 -0
  21. package/dev/components/JsonPretty/index.vue +463 -0
  22. package/dev/components/JsonPretty/type.ts +123 -0
  23. package/dev/components/JsonPretty/utils/index.ts +172 -0
  24. package/dev/components/NetworkList/NetworkDetail.vue +197 -0
  25. package/dev/components/NetworkList/NetworkItem.vue +106 -0
  26. package/dev/components/NetworkList/index.vue +108 -0
  27. package/dev/components/PiniaList/index.vue +64 -0
  28. package/dev/components/RouteList/index.vue +98 -0
  29. package/dev/components/SettingList/index.vue +235 -0
  30. package/dev/components/StorageList/index.vue +170 -0
  31. package/dev/components/SystemInfo/index.vue +34 -0
  32. package/dev/components/Tabs/index.vue +110 -0
  33. package/dev/components/Tag/index.vue +89 -0
  34. package/dev/components/UploadList/UploadDetail.vue +208 -0
  35. package/dev/components/UploadList/UploadItem.vue +111 -0
  36. package/dev/components/UploadList/index.vue +94 -0
  37. package/dev/components/VuexList/index.vue +54 -0
  38. package/dev/components/WebSocket/WebSocketItem.vue +98 -0
  39. package/dev/components/WebSocket/WebSocketList.vue +176 -0
  40. package/dev/components/WebSocket/index.vue +99 -0
  41. package/dev/components/WindowInfo/index.vue +33 -0
  42. package/dev/const.ts +95 -0
  43. package/dev/core.ts +103 -0
  44. package/dev/devConsole/index.ts +334 -0
  45. package/dev/devEvent/index.ts +665 -0
  46. package/dev/devIntercept/index.ts +629 -0
  47. package/dev/devStore/index.ts +581 -0
  48. package/dev/index.d.ts +6 -0
  49. package/dev/index.d.ts.map +1 -0
  50. package/dev/index.js +1 -0
  51. package/dev/plugins/uniDevTool/uniDevTool.d.ts +66 -0
  52. package/dev/plugins/uniDevTool/uniDevTool.d.ts.map +1 -0
  53. package/dev/plugins/uniDevTool/uniDevTool.js +13 -0
  54. package/dev/plugins/uniGlobalComponents/uniGlobalComponents.d.ts +28 -0
  55. package/dev/plugins/uniGlobalComponents/uniGlobalComponents.d.ts.map +1 -0
  56. package/dev/plugins/uniGlobalComponents/uniGlobalComponents.js +5 -0
  57. package/dev/shims-uni.d.ts +43 -0
  58. package/dev/type.ts +188 -0
  59. package/dev/utils/date.ts +75 -0
  60. package/dev/utils/file.ts +121 -0
  61. package/dev/utils/function.ts +192 -0
  62. package/dev/utils/index.ts +25 -0
  63. package/dev/utils/ip.ts +79 -0
  64. package/dev/utils/language.ts +19 -0
  65. package/dev/utils/object.ts +235 -0
  66. package/dev/utils/page.ts +13 -0
  67. package/dev/utils/string.ts +23 -0
  68. package/dev/utils/utils.ts +198 -0
  69. package/package.json +34 -0
@@ -0,0 +1,32 @@
1
+ <template>
2
+ <view class="device-info-content">
3
+ <JsonPretty :data="deviceInfo" v-if="showJson" />
4
+ <Empty v-else />
5
+ </view>
6
+ </template>
7
+ <script lang="ts" setup>
8
+ import { computed } from 'vue';
9
+ import Empty from '../Empty/index.vue';
10
+ import JsonPretty from '../JsonPretty/index.vue';
11
+ const props = defineProps<{
12
+ deviceInfo: Record<string, any>;
13
+ }>();
14
+
15
+ const showJson = computed(() => {
16
+ try {
17
+ const str = JSON.stringify(props.deviceInfo);
18
+ if (typeof props.deviceInfo === 'object' && (str === '' || str === '{}')) {
19
+ return false;
20
+ }
21
+ return true;
22
+ } catch (error) {
23
+ return false;
24
+ }
25
+ });
26
+ </script>
27
+ <style>
28
+ .device-info-content {
29
+ padding: 16px;
30
+ font-size: var(--dev-tool-base-font-size);
31
+ }
32
+ </style>
Binary file
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <view class="dev-tool-empty">
3
+ <image :src="empty" class="dev-tool-empty-image" />
4
+ <text class="dev-tool-empty-text">{{ text ?? '暂无调试信息' }}</text>
5
+ </view>
6
+ </template>
7
+ <script lang="ts" setup>
8
+ import empty from './empty.png';
9
+ defineProps<{ text?: string }>();
10
+ </script>
11
+ <style scoped>
12
+ .dev-tool-empty {
13
+ display: flex;
14
+ flex-direction: column;
15
+ justify-content: center;
16
+ align-items: center;
17
+ margin: 0 auto;
18
+ }
19
+ .dev-tool-empty-image {
20
+ margin-top: 50px;
21
+ width: 50px;
22
+ height: 50px;
23
+ }
24
+
25
+ .dev-tool-empty-text {
26
+ color: #888;
27
+ }
28
+ </style>
@@ -0,0 +1,86 @@
1
+ <template>
2
+ <view class="filter-input-wrapper">
3
+ <input
4
+ :class="`filter-input`"
5
+ :value="modelValue"
6
+ :placeholder="placeholder || '请输入'"
7
+ @input="debounceInput"
8
+ />
9
+ <view class="filter-input-clear" @click="onClear"> × </view>
10
+ </view>
11
+ </template>
12
+ <script lang="ts" setup>
13
+ import { debounce } from '../../utils';
14
+ import { ref, onMounted } from 'vue';
15
+ const props = defineProps<{
16
+ placeholder?: string;
17
+ modelValue?: string;
18
+ }>();
19
+ const emit = defineEmits<{
20
+ (e: 'update:modelValue', value: string): void;
21
+ (e: 'search', value: string): void;
22
+ (e: 'openSearch', value: boolean): void;
23
+ }>();
24
+
25
+ const isActive = ref(false);
26
+
27
+ function onInput(e: any) {
28
+ const value = e.detail.value;
29
+ emit('update:modelValue', value);
30
+ emit('search', value);
31
+ }
32
+
33
+ function onClear() {
34
+ emit('update:modelValue', '');
35
+ emit('search', '');
36
+ }
37
+
38
+ function openSearch(open: boolean) {
39
+ isActive.value = open;
40
+ emit('openSearch', open);
41
+ if (!open && props.modelValue) {
42
+ emit('update:modelValue', '');
43
+ emit('search', '');
44
+ }
45
+ }
46
+
47
+ const debounceInput = debounce(onInput, 500);
48
+ </script>
49
+ <style scoped>
50
+ .filter-input-wrapper {
51
+ flex: 1;
52
+ display: flex;
53
+ align-items: center;
54
+ padding: 0 8px;
55
+ width: 100%;
56
+ height: 24px;
57
+
58
+ border-radius: 4px;
59
+ border: 1px solid #eee;
60
+
61
+ background-color: #fff;
62
+ transition: max-width 0.3s;
63
+ box-sizing: border-box;
64
+ }
65
+
66
+ .filter-input {
67
+ flex: 1;
68
+ box-shadow: none;
69
+ box-sizing: border-box;
70
+ border-radius: 5;
71
+ font-family: inherit;
72
+ color: #000;
73
+ font-weight: 400;
74
+ font: unset;
75
+ height: 24px;
76
+ }
77
+
78
+ .filter-input-clear {
79
+ padding-left: 8px;
80
+ }
81
+
82
+ .filter-input-icon {
83
+ width: 24px;
84
+ height: 24px;
85
+ }
86
+ </style>
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <view class="json-pretty-tree-brackets" @click="onClick">
3
+ {{ data }}
4
+ </view>
5
+ </template>
6
+ <script lang="ts" setup>
7
+ defineProps<{ data: string }>();
8
+ const emit = defineEmits<{
9
+ (e: 'click', event: MouseEvent): void;
10
+ }>();
11
+
12
+ function onClick(e: MouseEvent) {
13
+ emit('click', e);
14
+ }
15
+ </script>
16
+ <style>
17
+ .json-pretty-tree-brackets {
18
+ cursor: pointer;
19
+ }
20
+ .json-pretty-tree-brackets:hover {
21
+ color: var(--json-pretty-primary-color);
22
+ }
23
+ </style>
@@ -0,0 +1,63 @@
1
+ <template>
2
+ <view
3
+ v-if="isOpen && isClose"
4
+ :class="`json-pretty-carets json-pretty-carets-${
5
+ isOpen ? 'open' : 'close'
6
+ }`"
7
+ @click="onClick"
8
+ >
9
+ <svg
10
+ viewBox="0 0 1024 1024"
11
+ focusable="false"
12
+ data-icon="caret-down"
13
+ width="1em"
14
+ height="1em"
15
+ fill="currentColor"
16
+ aria-hidden="true"
17
+ >
18
+ <path
19
+ d="M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"
20
+ ></path>
21
+ </svg>
22
+ </view>
23
+ </template>
24
+ <script lang="ts" setup>
25
+ import { computed } from 'vue';
26
+ // import "./styles.less";
27
+ const props = defineProps<{ nodeType: string }>();
28
+ const emit = defineEmits<{
29
+ (e: 'click', event: MouseEvent): void;
30
+ }>();
31
+
32
+ const isOpen = computed(() => {
33
+ return props.nodeType === 'objectStart' || props.nodeType === 'arrayStart';
34
+ });
35
+
36
+ const isClose = computed(() => {
37
+ return (
38
+ props.nodeType === 'objectCollapsed' || props.nodeType === 'arrayCollapsed'
39
+ );
40
+ });
41
+
42
+ function onClick(e: MouseEvent) {
43
+ emit('click', e);
44
+ }
45
+ </script>
46
+ <style>
47
+ .json-pretty-carets {
48
+ position: absolute;
49
+ right: 0;
50
+ cursor: pointer;
51
+ }
52
+ .json-pretty-carets svg {
53
+ transition: transform 0.3s;
54
+ }
55
+
56
+ .json-pretty-carets::hover {
57
+ color: var(--json-pretty-primary-color);
58
+ }
59
+
60
+ .json-pretty-carets-close {
61
+ transform: rotate(-90deg);
62
+ }
63
+ </style>
@@ -0,0 +1,108 @@
1
+ <template>
2
+ <view
3
+ :class="`json-pretty-check-controller ${model ? 'is-checked' : ''}`"
4
+ @click="onClick"
5
+ >
6
+ <view :class="`json-pretty-check-controller-inner is-${uiType}`" />
7
+ <input
8
+ :checked="model"
9
+ :class="`json-pretty-check-controller-original is-${uiType}`"
10
+ :type="uiType"
11
+ @change="onChange"
12
+ />
13
+ </view>
14
+ </template>
15
+ <script lang="ts" setup>
16
+ import { computed } from 'vue';
17
+ // import "./style.less";
18
+ const props = defineProps<{ checked: boolean; isMultiple: boolean }>();
19
+ const emit = defineEmits<{
20
+ (e: 'change', value: boolean): void;
21
+ (e: 'update:modelValue', value: boolean): void;
22
+ }>();
23
+
24
+ const uiType = computed(() => (props.isMultiple ? 'checkbox' : 'radio'));
25
+ const model = computed({
26
+ get: (): boolean => props.checked,
27
+ set: (val) => emit('update:modelValue', val)
28
+ });
29
+
30
+ function onChange() {
31
+ emit('change', model.value);
32
+ }
33
+
34
+ function onClick(e: MouseEvent) {
35
+ e.stopPropagation();
36
+ }
37
+ </script>
38
+
39
+ <style>
40
+ .json-pretty-check-controller {
41
+ position: absolute;
42
+ left: 0;
43
+ }
44
+ .json-pretty-check-controller.is-checked .json-pretty-check-controller-inner {
45
+ background-color: var(--json-pretty-color-primary);
46
+ border-color: var(--json-pretty-color-primary);
47
+ }
48
+ .json-pretty-check-controller.is-checked
49
+ .json-pretty-check-controller-inner.is-checkbox:after {
50
+ transform: rotate(45deg) scaleY(1);
51
+ }
52
+ .json-pretty-check-controller.is-checked
53
+ .json-pretty-check-controller-inner.is-radio:after {
54
+ transform: translate(-50%, -50%) scale(1);
55
+ }
56
+ .json-pretty-check-controller .json-pretty-check-controller-inner {
57
+ display: inline-block;
58
+ position: relative;
59
+ border: 1px solid var(--json-pretty-border-color);
60
+ border-radius: 2px;
61
+ vertical-align: middle;
62
+ box-sizing: border-box;
63
+ width: 16px;
64
+ height: 16px;
65
+ background-color: #fff;
66
+ z-index: 1;
67
+ cursor: pointer;
68
+ transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
69
+ background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
70
+ }
71
+ .json-pretty-check-controller .json-pretty-check-controller-inner:after {
72
+ box-sizing: content-box;
73
+ content: '';
74
+ border: 2px solid #fff;
75
+ border-left: 0;
76
+ border-top: 0;
77
+ height: 8px;
78
+ left: 4px;
79
+ position: absolute;
80
+ top: 1px;
81
+ transform: rotate(45deg) scaleY(0);
82
+ width: 4px;
83
+ transition: transform 0.15s cubic-bezier(0.71, -0.46, 0.88, 0.6) 0.05s;
84
+ transform-origin: center;
85
+ }
86
+ .json-pretty-check-controller .json-pretty-check-controller-inner.is-radio {
87
+ border-radius: 100%;
88
+ }
89
+ .json-pretty-check-controller
90
+ .json-pretty-check-controller-inner.is-radio:after {
91
+ border-radius: 100%;
92
+ height: 4px;
93
+ background-color: #fff;
94
+ left: 50%;
95
+ top: 50%;
96
+ }
97
+ .json-pretty-check-controller .json-pretty-check-controller-original {
98
+ opacity: 0;
99
+ outline: none;
100
+ position: absolute;
101
+ z-index: -1;
102
+ top: 0;
103
+ left: 0;
104
+ right: 0;
105
+ bottom: 0;
106
+ margin: 0;
107
+ }
108
+ </style>
@@ -0,0 +1,348 @@
1
+ <template>
2
+ <view
3
+ :class="{
4
+ 'json-pretty-tree-node': true,
5
+ 'has-selector': showSelectController,
6
+ 'has-carets': showIcon,
7
+ 'is-highlight': highlightSelectedNode && checked,
8
+ 'json-pretty-tree-node-active': state.editing,
9
+ dark: theme === 'dark',
10
+ }"
11
+ @click="handleNodeClick"
12
+ @mouseover="handleNodeMouseover"
13
+ :style="style"
14
+ >
15
+ <view v-if="showLineNumber" class="json-pretty-node-index">{{
16
+ node.id + 1
17
+ }}</view>
18
+
19
+ <CheckController
20
+ v-if="
21
+ showSelectController &&
22
+ selectable &&
23
+ node.type !== 'objectEnd' &&
24
+ node.type !== 'arrayEnd'
25
+ "
26
+ :isMultiple="isMultiple"
27
+ :checked="checked"
28
+ @change="handleSelectedChange"
29
+ />
30
+
31
+ <view class="json-pretty-indent">
32
+ <view
33
+ v-for="(item, index) in Array(node.level)"
34
+ :key="index"
35
+ :class="{
36
+ 'json-pretty-indent-unit': true,
37
+ 'has-line': showLine,
38
+ }"
39
+ >
40
+ <view v-for="() in Array(indent)" :key="Math.random()">&nbsp;</view>
41
+ </view>
42
+ <Carets v-if="showIcon" :nodeType="node.type" @click="handleIconClick" />
43
+ </view>
44
+
45
+ <view v-if="node.key" class="json-pretty-key">
46
+ <slot name="render-node-key" :node="props.node" :default-key="prettyKey">
47
+ {{ prettyKey }}
48
+ </slot>
49
+ <view class="json-pretty-colon">{{
50
+ `:${showKeyValueSpace ? ' ' : ''}`
51
+ }}</view>
52
+ </view>
53
+
54
+ <view class="json-pretty-value-wrapper">
55
+ <Brackets
56
+ v-if="node.type !== 'content' && node.content"
57
+ :data="node.content.toString()"
58
+ @click="handleBracketsClick"
59
+ />
60
+
61
+ <view v-else :class="valueClass" @click="handleValueEdit">
62
+ <input
63
+ v-if="editable && state.editing"
64
+ class="json-pretty-edit-input"
65
+ :value="defaultValue"
66
+ :focus="state.editing"
67
+ @blur="handleInputBlur"
68
+ />
69
+ <view v-else>
70
+ <slot
71
+ name="render-node-value"
72
+ :node="props.node"
73
+ :default-value="defaultValue"
74
+ >
75
+ {{ defaultValue }}
76
+ </slot>
77
+ </view>
78
+ </view>
79
+
80
+ <view v-if="node.showComma">,</view>
81
+
82
+ <view v-if="showLength && collapsed" class="json-pretty-comment">
83
+ // {{ node.length }} items
84
+ </view>
85
+ </view>
86
+ <view class="json-pretty-tree-node-actions" v-if="showNodeActions">
87
+ <slot name="render-node-actions" :copy="handleCopy">
88
+ <view @click="handleCopy" class="json-pretty-tree-node-actions-item"
89
+ >copy</view
90
+ >
91
+ </slot>
92
+ </view>
93
+ </view>
94
+ </template>
95
+
96
+ <script lang="ts" setup>
97
+ import { reactive, computed } from 'vue';
98
+ import Brackets from '../Brackets/index.vue';
99
+ import CheckController from '../CheckController/index.vue';
100
+ import Carets from '../Carets/index.vue';
101
+ import { getDataType, isFunction, stringToAutoType } from '../../utils';
102
+
103
+ import type { NodeDataType, TreeNodeProps } from '../../type';
104
+ import { getValueByPath } from '../../../../utils';
105
+
106
+ const props = withDefaults(defineProps<TreeNodeProps>(), {
107
+ rootPath: 'root',
108
+ indent: 2,
109
+ showDoubleQuotes: true,
110
+ showLine: true,
111
+ selectOnClickNode: true,
112
+ highlightSelectedNode: true,
113
+ theme: 'light',
114
+ showKeyValueSpace: true,
115
+ editableTrigger: 'click',
116
+ checked: false,
117
+ nodeSelectable: () => false,
118
+ });
119
+
120
+ const emit = defineEmits<{
121
+ (e: 'nodeClick', node: NodeDataType): void;
122
+ (e: 'nodeMouseover', node: NodeDataType): void;
123
+ (e: 'bracketsClick', collapsed: boolean, node: NodeDataType): void;
124
+ (e: 'iconClick', collapsed: boolean, node: NodeDataType): void;
125
+ (e: 'selectedChange', node: NodeDataType): void;
126
+ (e: 'valueChange', value: any, path: string): void;
127
+ }>();
128
+
129
+ const dataType = computed<string>(() => getDataType(props.node.content));
130
+
131
+ const valueClass = computed(
132
+ () => `json-pretty-value json-pretty-value-${dataType.value}`,
133
+ );
134
+
135
+ const prettyKey = computed(() =>
136
+ props.showDoubleQuotes ? `"${props.node.key}"` : props.node.key,
137
+ );
138
+
139
+ const isMultiple = computed(() => props.selectableType === 'multiple');
140
+
141
+ const isSingle = computed(() => props.selectableType === 'single');
142
+
143
+ const selectable = computed(
144
+ () =>
145
+ isFunction(props?.nodeSelectable) &&
146
+ props?.nodeSelectable?.(props.node) &&
147
+ (isMultiple.value || isSingle.value),
148
+ );
149
+
150
+ const state = reactive({
151
+ editing: false,
152
+ });
153
+
154
+ const handleInputBlur = (e: FocusEvent) => {
155
+ const source = (e.detail as any).value;
156
+ const value = stringToAutoType(source);
157
+ emit('valueChange', value, props.node.path);
158
+ state.editing = false;
159
+ };
160
+
161
+ const defaultValue = computed(() => {
162
+ let value = props.node?.content;
163
+ if (value === null) {
164
+ value = 'null';
165
+ } else if (value === undefined) {
166
+ value = 'undefined';
167
+ }
168
+ return dataType.value === 'string' ? `"${value}"` : value + '';
169
+ });
170
+
171
+ const handleBracketsClick = () => {
172
+ emit('bracketsClick', !props.collapsed, props.node);
173
+ };
174
+
175
+ const handleIconClick = () => {
176
+ emit('iconClick', !props.collapsed, props.node);
177
+ };
178
+
179
+ const handleSelectedChange = () => {
180
+ emit('selectedChange', props.node);
181
+ };
182
+
183
+ const handleNodeClick = () => {
184
+ emit('nodeClick', props.node);
185
+ if (selectable.value && props.selectOnClickNode) {
186
+ emit('selectedChange', props.node);
187
+ }
188
+ };
189
+
190
+ const handleNodeMouseover = () => {
191
+ emit('nodeMouseover', props.node);
192
+ };
193
+
194
+ const handleValueEdit = (e: MouseEvent) => {
195
+ if (!props.editable) return;
196
+
197
+ if (!state.editing) {
198
+ state.editing = true;
199
+ }
200
+ };
201
+
202
+ const handleCopy = () => {
203
+ const { key, path } = props.node;
204
+ const rootPath = props.rootPath;
205
+
206
+ const content = getValueByPath(props.data, path.slice(rootPath.length));
207
+
208
+ const copiedData = JSON.stringify(
209
+ key ? { [key]: content } : content,
210
+ null,
211
+ 2,
212
+ );
213
+
214
+ uni.setClipboardData({
215
+ data: copiedData,
216
+ success() {
217
+ uni.showToast({
218
+ title: '复制成功',
219
+ icon: 'none',
220
+ });
221
+ },
222
+ fail() {
223
+ uni.showToast({
224
+ title: '复制失败',
225
+ icon: 'none',
226
+ });
227
+ },
228
+ });
229
+ };
230
+ </script>
231
+ <style scoped>
232
+ .json-pretty-tree-node {
233
+ display: flex;
234
+ align-items: center;
235
+ position: relative;
236
+ line-height: 20px;
237
+ }
238
+ .json-pretty-tree-node.has-carets {
239
+ padding-left: 15px;
240
+ }
241
+ .json-pretty-tree-node.has-selector,
242
+ .json-pretty-tree-node.has-carets.has-selector {
243
+ padding-left: 30px;
244
+ }
245
+ .json-pretty-tree-node.is-highlight,
246
+ .json-pretty-tree-node:hover {
247
+ background-color: var(--json-pretty-highlight-bg-color);
248
+ border-radius: 4px;
249
+ }
250
+ .json-pretty-tree-node.is-highlight .json-pretty-tree-node-actions,
251
+ .json-pretty-tree-node:hover .json-pretty-tree-node-actions {
252
+ display: block;
253
+ }
254
+ .json-pretty-tree-node .json-pretty-indent {
255
+ display: flex;
256
+ position: relative;
257
+ }
258
+ .json-pretty-tree-node .json-pretty-indent-unit {
259
+ display: flex;
260
+ }
261
+ .json-pretty-tree-node .json-pretty-indent-unit.has-line {
262
+ border-left: 1px dashed var(--json-pretty-border-color);
263
+ }
264
+ .json-pretty-tree-node .json-pretty-tree-node-actions {
265
+ display: none;
266
+ position: absolute;
267
+ right: 0;
268
+ top: 0;
269
+ padding: 0 4px;
270
+ background-color: var(--json-pretty-highlight-bg-color);
271
+ border-radius: 4px;
272
+ }
273
+ .json-pretty-tree-node
274
+ .json-pretty-tree-node-actions
275
+ .json-pretty-tree-node-actions-item {
276
+ cursor: pointer;
277
+ }
278
+ .json-pretty-tree-node
279
+ .json-pretty-tree-node-actions
280
+ .json-pretty-tree-node-actions-item:hover {
281
+ color: var(--json-pretty-color-primary);
282
+ }
283
+ .json-pretty-tree-node.dark.is-highlight,
284
+ .json-pretty-tree-node.dark:hover {
285
+ background-color: var(--json-pretty-highlight-bg-color-dark);
286
+ }
287
+ .json-pretty-tree-node.dark .json-pretty-tree-node-actions {
288
+ background-color: var(--json-pretty-highlight-bg-color-dark);
289
+ }
290
+ .json-pretty-tree-node-active {
291
+ background-color: var(--json-pretty-highlight-bg-color);
292
+ border-radius: 4px;
293
+ }
294
+ .json-pretty-tree-node-active .json-pretty-tree-node-actions {
295
+ display: block;
296
+ }
297
+ .json-pretty-node-index {
298
+ position: absolute;
299
+ right: 100%;
300
+ margin-right: 4px;
301
+ user-select: none;
302
+ }
303
+ .json-pretty-colon {
304
+ white-space: pre;
305
+ }
306
+ .json-pretty-comment {
307
+ color: var(--json-pretty-color-primary);
308
+ }
309
+ .json-pretty-key {
310
+ display: flex;
311
+ }
312
+ .json-pretty-value-wrapper {
313
+ display: flex;
314
+ align-items: center;
315
+ }
316
+ .json-pretty-value {
317
+ /* word-break: break-word; */
318
+ white-space: nowrap;
319
+ }
320
+ .json-pretty-value-null {
321
+ color: var(--json-pretty-color-null);
322
+ }
323
+ .json-pretty-value-undefined {
324
+ color: var(--json-pretty-color-undefined);
325
+ }
326
+ .json-pretty-value-number {
327
+ color: var(--json-pretty-color-number);
328
+ }
329
+ .json-pretty-value-boolean {
330
+ color: var(--json-pretty-color-boolean);
331
+ }
332
+ .json-pretty-value-string {
333
+ color: var(--json-pretty-color-string);
334
+ }
335
+ .json-pretty-edit-input {
336
+ padding: 0px 8px;
337
+ border: 1px solid #eee;
338
+ box-shadow: none;
339
+ box-sizing: border-box;
340
+ border-radius: 5;
341
+ font-family: inherit;
342
+ color: #000;
343
+ font-weight: 400;
344
+ background-color: #fff;
345
+ font: unset;
346
+ height: 16px;
347
+ }
348
+ </style>