@rozenite/vite-plugin 1.13.0 → 2.1.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/README.md +12 -0
- package/dist/bundle-dts.d.ts.map +1 -1
- package/dist/client-plugin.d.ts.map +1 -1
- package/dist/dev-host/assets/index-BgAxGQdD.js +13 -0
- package/dist/dev-host/assets/index-ClIYIppU.css +1 -0
- package/dist/dev-host/index.html +3 -3
- package/dist/dev-host/manifest.json +2 -2
- package/dist/index.cjs +34 -63
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +34 -63
- package/dist/load-config.d.ts.map +1 -1
- package/dist/package-json.d.ts.map +1 -1
- package/dist/react-native-plugin.d.ts.map +1 -1
- package/dist/require-plugin.d.ts.map +1 -1
- package/dist/sdk-plugin.d.ts.map +1 -1
- package/dist/server-plugin.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/package.json +29 -30
- package/src/bundle-dts.ts +6 -14
- package/src/client-plugin.ts +13 -36
- package/src/dev-host/App.tsx +184 -414
- package/src/dev-host/components/DispatchForm.tsx +97 -121
- package/src/dev-host/components/FlowList.tsx +70 -102
- package/src/dev-host/components/MessageDetailsPane.tsx +50 -83
- package/src/dev-host/components/MessageLogPane.tsx +75 -66
- package/src/dev-host/components/PanelTabs.tsx +19 -10
- package/src/dev-host/constants.ts +0 -19
- package/src/dev-host/flow-runtime.ts +15 -12
- package/src/dev-host/index.html +1 -1
- package/src/dev-host/main.tsx +1 -10
- package/src/dev-host/styles.css +162 -830
- package/src/dev-host/types.ts +0 -9
- package/src/dev-host/utils.ts +1 -7
- package/src/dev-host/vite.config.mts +2 -0
- package/src/index.ts +16 -16
- package/src/load-config.ts +9 -20
- package/src/package-json.ts +1 -3
- package/src/react-native-plugin.ts +4 -2
- package/src/require-plugin.ts +6 -18
- package/src/sdk-plugin.ts +3 -0
- package/src/server-plugin.ts +3 -0
- package/src/utils.ts +1 -4
- package/dist/dev-host/assets/index-CkxvBMpp.css +0 -1
- package/dist/dev-host/assets/index-cNKHRwej.js +0 -11
- package/src/dev-host/components/MessagePayloadDetail.tsx +0 -32
- package/src/dev-host/components/ResizeHandle.tsx +0 -33
- package/src/dev-host/components/icons.tsx +0 -79
- package/src/dev-host/components/ui/Button.tsx +0 -91
- package/src/dev-host/components/ui/DropdownMenu.tsx +0 -84
- package/src/dev-host/components/ui/IconButton.tsx +0 -41
- package/src/dev-host/components/ui/Input.tsx +0 -73
- package/src/dev-host/components/ui/ScrollArea.tsx +0 -20
- package/src/dev-host/components/ui/Tabs.tsx +0 -166
- package/src/dev-host/components/ui/Textarea.tsx +0 -79
- package/src/dev-host/components/ui/ToggleGroup.tsx +0 -120
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import type { ComponentProps } from 'react';
|
|
2
|
-
import { mergeOverrides } from 'baseui';
|
|
3
|
-
import { SIZE, Textarea as BaseTextarea } from 'baseui/textarea/index.js';
|
|
4
|
-
|
|
5
|
-
type BaseTextareaProps = ComponentProps<typeof BaseTextarea>;
|
|
6
|
-
|
|
7
|
-
export type TextareaProps = BaseTextareaProps & {
|
|
8
|
-
spellCheck?: boolean;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
const textareaOverrides = {
|
|
12
|
-
Root: {
|
|
13
|
-
style: {
|
|
14
|
-
width: '100%',
|
|
15
|
-
borderWidth: '0',
|
|
16
|
-
backgroundColor: 'transparent',
|
|
17
|
-
paddingLeft: '0',
|
|
18
|
-
paddingRight: '0',
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
InputContainer: {
|
|
22
|
-
style: ({ $isFocused }: { $isFocused?: boolean }) => ({
|
|
23
|
-
borderWidth: '1px',
|
|
24
|
-
borderStyle: 'solid',
|
|
25
|
-
borderColor: 'rgba(255, 255, 255, 0.08)',
|
|
26
|
-
borderRadius: '4px',
|
|
27
|
-
backgroundColor: 'rgba(255, 255, 255, 0.03)',
|
|
28
|
-
outline: $isFocused ? '2px solid rgba(130, 50, 255, 0.95)' : 'none',
|
|
29
|
-
outlineOffset: '-2px',
|
|
30
|
-
alignItems: 'stretch',
|
|
31
|
-
}),
|
|
32
|
-
},
|
|
33
|
-
Input: {
|
|
34
|
-
style: {
|
|
35
|
-
minHeight: '112px',
|
|
36
|
-
display: 'block',
|
|
37
|
-
alignSelf: 'stretch',
|
|
38
|
-
resize: 'none',
|
|
39
|
-
paddingTop: '12px',
|
|
40
|
-
paddingRight: '12px',
|
|
41
|
-
paddingBottom: '12px',
|
|
42
|
-
paddingLeft: '12px',
|
|
43
|
-
fontFamily: '"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace',
|
|
44
|
-
fontWeight: 400,
|
|
45
|
-
color: 'rgba(255, 255, 255, 0.9)',
|
|
46
|
-
fontSize: '12px',
|
|
47
|
-
lineHeight: '1.5',
|
|
48
|
-
letterSpacing: '-0.02em',
|
|
49
|
-
'::placeholder': {
|
|
50
|
-
color: 'rgba(255, 255, 255, 0.36)',
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
export const Textarea = ({ overrides, rows = 6, spellCheck, ...props }: TextareaProps) => {
|
|
57
|
-
return (
|
|
58
|
-
<BaseTextarea
|
|
59
|
-
rows={rows}
|
|
60
|
-
size={SIZE.compact}
|
|
61
|
-
overrides={mergeOverrides(
|
|
62
|
-
textareaOverrides,
|
|
63
|
-
spellCheck === undefined
|
|
64
|
-
? overrides
|
|
65
|
-
: mergeOverrides(
|
|
66
|
-
{
|
|
67
|
-
Input: {
|
|
68
|
-
props: {
|
|
69
|
-
spellCheck,
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
overrides,
|
|
74
|
-
),
|
|
75
|
-
)}
|
|
76
|
-
{...props}
|
|
77
|
-
/>
|
|
78
|
-
);
|
|
79
|
-
};
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import type { Key, ReactNode } from 'react';
|
|
2
|
-
import { mergeOverrides } from 'baseui';
|
|
3
|
-
import { Segment } from 'baseui/segmented-control/segment.js';
|
|
4
|
-
import { SegmentedControl } from 'baseui/segmented-control/index.js';
|
|
5
|
-
|
|
6
|
-
export type ToggleGroupOption = {
|
|
7
|
-
key: Key;
|
|
8
|
-
label: ReactNode;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
type ToggleGroupProps = {
|
|
13
|
-
value: Key;
|
|
14
|
-
options: ToggleGroupOption[];
|
|
15
|
-
onChange: (value: string) => void;
|
|
16
|
-
'aria-label'?: string;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const overrides = {
|
|
20
|
-
Root: {
|
|
21
|
-
style: {
|
|
22
|
-
display: 'inline-flex',
|
|
23
|
-
width: 'fit-content',
|
|
24
|
-
maxWidth: '100%',
|
|
25
|
-
paddingTop: '2px',
|
|
26
|
-
paddingRight: '2px',
|
|
27
|
-
paddingBottom: '2px',
|
|
28
|
-
paddingLeft: '2px',
|
|
29
|
-
border: '1px solid rgba(255, 255, 255, 0.08)',
|
|
30
|
-
borderRadius: '4px',
|
|
31
|
-
backgroundColor: 'rgba(255, 255, 255, 0.04)',
|
|
32
|
-
overflow: 'hidden',
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
SegmentList: {
|
|
36
|
-
style: {
|
|
37
|
-
display: 'inline-flex',
|
|
38
|
-
width: 'fit-content',
|
|
39
|
-
minHeight: '22px',
|
|
40
|
-
maxWidth: '100%',
|
|
41
|
-
alignItems: 'center',
|
|
42
|
-
gap: '2px',
|
|
43
|
-
overflow: 'hidden',
|
|
44
|
-
minWidth: 'unset',
|
|
45
|
-
backgroundColor: 'transparent',
|
|
46
|
-
zIndex: 0,
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
Active: {
|
|
50
|
-
style: {
|
|
51
|
-
backgroundColor: '#ffffff',
|
|
52
|
-
borderRadius: '2px',
|
|
53
|
-
zIndex: -1,
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
const segmentOverrides = {
|
|
59
|
-
Segment: {
|
|
60
|
-
style: ({ $isActive, $disabled, $isFocusVisible }: { $isActive?: boolean; $disabled?: boolean; $isFocusVisible?: boolean }) => ({
|
|
61
|
-
minHeight: '22px',
|
|
62
|
-
minWidth: 'auto',
|
|
63
|
-
paddingTop: '3px',
|
|
64
|
-
paddingRight: '9px',
|
|
65
|
-
paddingBottom: '3px',
|
|
66
|
-
paddingLeft: '9px',
|
|
67
|
-
borderRadius: '2px',
|
|
68
|
-
backgroundColor: 'transparent',
|
|
69
|
-
color: $isActive ? '#000000' : 'rgba(255, 255, 255, 0.6)',
|
|
70
|
-
fontSize: '12px',
|
|
71
|
-
fontWeight: 500,
|
|
72
|
-
lineHeight: 1.2,
|
|
73
|
-
transitionProperty: 'background-color, color',
|
|
74
|
-
transitionDuration: '120ms',
|
|
75
|
-
outline: $isFocusVisible ? '2px solid rgba(130, 50, 255, 0.95)' : 'none',
|
|
76
|
-
outlineOffset: '-2px',
|
|
77
|
-
cursor: $disabled ? 'default' : 'pointer',
|
|
78
|
-
opacity: $disabled ? 0.4 : 1,
|
|
79
|
-
':hover': $disabled || $isActive ? undefined : {
|
|
80
|
-
color: '#ffffff',
|
|
81
|
-
},
|
|
82
|
-
}),
|
|
83
|
-
},
|
|
84
|
-
LabelBlock: {
|
|
85
|
-
style: {
|
|
86
|
-
paddingTop: '0',
|
|
87
|
-
paddingRight: '0',
|
|
88
|
-
paddingBottom: '0',
|
|
89
|
-
paddingLeft: '0',
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
Label: {
|
|
93
|
-
style: {
|
|
94
|
-
fontSize: '12px',
|
|
95
|
-
fontWeight: 500,
|
|
96
|
-
lineHeight: 1.2,
|
|
97
|
-
color: 'inherit',
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
export const ToggleGroup = ({ value, options, onChange, 'aria-label': ariaLabel }: ToggleGroupProps) => {
|
|
103
|
-
return (
|
|
104
|
-
<SegmentedControl
|
|
105
|
-
activeKey={value}
|
|
106
|
-
onChange={({ activeKey }) => onChange(String(activeKey))}
|
|
107
|
-
overrides={mergeOverrides(overrides, {
|
|
108
|
-
Root: {
|
|
109
|
-
props: {
|
|
110
|
-
'aria-label': ariaLabel,
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
})}
|
|
114
|
-
>
|
|
115
|
-
{options.map((option) => (
|
|
116
|
-
<Segment key={option.key} label={option.label} disabled={option.disabled} overrides={segmentOverrides} />
|
|
117
|
-
))}
|
|
118
|
-
</SegmentedControl>
|
|
119
|
-
);
|
|
120
|
-
};
|