palette-mcp 1.0.0 → 1.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/dist/components/OrderManagementGuide.d.ts +6 -0
- package/dist/components/OrderManagementGuide.js +266 -0
- package/dist/index-simple.d.ts +2 -0
- package/dist/index-simple.js +139 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +16 -226
- package/dist/requests/1762927928451-ajgna9b/SomaComponent.html +63 -0
- package/dist/requests/1762927928451-ajgna9b/SomaComponent.tsx +913 -0
- package/dist/requests/1762927928451-ajgna9b/metadata.json +9 -0
- package/dist/requests/1762931214963-cqlwvxn/SomaComponent.html +63 -0
- package/dist/requests/1762931214963-cqlwvxn/SomaComponent.tsx +525 -0
- package/dist/requests/1762931214963-cqlwvxn/metadata.json +9 -0
- package/dist/requests/1762932805663-m5wkk3a/SomaComponent.html +248 -0
- package/dist/requests/1762932805663-m5wkk3a/SomaComponent.tsx +1050 -0
- package/dist/requests/1762932805663-m5wkk3a/metadata.json +9 -0
- package/dist/requests/1762934645710-b67ldow/SomaComponent.html +193 -0
- package/dist/requests/1762934645710-b67ldow/SomaComponent.tsx +307 -0
- package/dist/requests/1762934645710-b67ldow/metadata.json +9 -0
- package/dist/requests/1762934961257-wwnmpvx/SomaComponent.html +193 -0
- package/dist/requests/1762934961257-wwnmpvx/SomaComponent.tsx +932 -0
- package/dist/requests/1762934961257-wwnmpvx/metadata.json +9 -0
- package/dist/requests/1762935126549-yjdcezr/SomaComponent.html +193 -0
- package/dist/requests/1762935126549-yjdcezr/SomaComponent.tsx +847 -0
- package/dist/requests/1762935126549-yjdcezr/metadata.json +9 -0
- package/dist/requests/1762935353759-fuokdeu/SomaComponent.html +193 -0
- package/dist/requests/1762935353759-fuokdeu/SomaComponent.tsx +334 -0
- package/dist/requests/1762935353759-fuokdeu/metadata.json +9 -0
- package/dist/requests/1762935378891-ckwbabn/SomaComponent.html +193 -0
- package/dist/requests/1762935378891-ckwbabn/SomaComponent.tsx +256 -0
- package/dist/requests/1762935378891-ckwbabn/metadata.json +9 -0
- package/dist/requests/1762935418352-181zqu4/SomaComponent.html +193 -0
- package/dist/requests/1762935418352-181zqu4/SomaComponent.tsx +45 -0
- package/dist/requests/1762935418352-181zqu4/metadata.json +9 -0
- package/dist/requests/1762935438157-vzkcbwy/SomaComponent.html +193 -0
- package/dist/requests/1762935438157-vzkcbwy/SomaComponent.tsx +238 -0
- package/dist/requests/1762935438157-vzkcbwy/metadata.json +9 -0
- package/dist/requests/1762935529749-ukzmiu3/SomaComponent.html +193 -0
- package/dist/requests/1762935529749-ukzmiu3/SomaComponent.tsx +138 -0
- package/dist/requests/1762935529749-ukzmiu3/metadata.json +9 -0
- package/dist/requests/1762935556527-jxelwj4/SomaComponent.html +193 -0
- package/dist/requests/1762935556527-jxelwj4/SomaComponent.tsx +138 -0
- package/dist/requests/1762935556527-jxelwj4/metadata.json +9 -0
- package/dist/requests/1762935579673-g39fqly/SomaComponent.html +193 -0
- package/dist/requests/1762935579673-g39fqly/SomaComponent.tsx +138 -0
- package/dist/requests/1762935579673-g39fqly/metadata.json +9 -0
- package/dist/requests/1762935613556-ogvsekd/SomaComponent.html +193 -0
- package/dist/requests/1762935613556-ogvsekd/SomaComponent.tsx +150 -0
- package/dist/requests/1762935613556-ogvsekd/metadata.json +9 -0
- package/dist/requests/1762935943631-hb2drgf/SomaComponent.html +193 -0
- package/dist/requests/1762935943631-hb2drgf/SomaComponent.tsx +150 -0
- package/dist/requests/1762935943631-hb2drgf/metadata.json +9 -0
- package/dist/requests/1762935954110-m7jb9m7/SomaComponent.html +193 -0
- package/dist/requests/1762935954110-m7jb9m7/SomaComponent.tsx +150 -0
- package/dist/requests/1762935954110-m7jb9m7/metadata.json +9 -0
- package/dist/requests/1762936003095-0jnmlga/SomaComponent.html +193 -0
- package/dist/requests/1762936003095-0jnmlga/SomaComponent.tsx +150 -0
- package/dist/requests/1762936003095-0jnmlga/metadata.json +9 -0
- package/dist/requests/1762937044748-7ubrrua/SomaComponent.html +193 -0
- package/dist/requests/1762937044748-7ubrrua/SomaComponent.tsx +138 -0
- package/dist/requests/1762937044748-7ubrrua/metadata.json +9 -0
- package/dist/server.d.ts +18 -0
- package/dist/server.js +246 -0
- package/dist/smithery.d.ts +50 -0
- package/dist/smithery.js +44 -0
- package/dist/test-figma-tools.d.ts +2 -0
- package/dist/test-figma-tools.js +55 -0
- package/dist/test-mcp-servers.d.ts +2 -0
- package/dist/test-mcp-servers.js +166 -0
- package/dist/test.d.ts +2 -0
- package/dist/test.js +76 -0
- package/package.json +4 -5
- package/smithery.yaml +8 -57
- package/src/components/OrderManagementGuide.tsx +459 -0
- package/src/index.ts +43 -0
- package/src/server.ts +301 -0
- package/src/services/code-generator.ts +1330 -0
- package/src/services/design-system.ts +2133 -0
- package/src/services/figma.ts +422 -0
- package/src/smithery.ts +54 -0
- package/src/test-figma-tools.ts +72 -0
- package/src/test-mcp-servers.ts +180 -0
- package/src/test.ts +89 -0
- package/src/utils/figma-mcp-client.ts +193 -0
- package/src/utils/request-manager.ts +101 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
// Design System Components from GitHub:
|
|
2
|
+
// React: https://github.com/dealicious-inc/ssm-web/tree/master/packages/design-system-react
|
|
3
|
+
// Vue: https://github.com/dealicious-inc/ssm-web/tree/master/packages/design-system
|
|
4
|
+
//
|
|
5
|
+
// To use these components, install the packages:
|
|
6
|
+
// npm install @dealicious/design-system-react @dealicious/design-system
|
|
7
|
+
// or
|
|
8
|
+
// yarn add @dealicious/design-system-react @dealicious/design-system
|
|
9
|
+
|
|
10
|
+
import { Tab } from '@dealicious/design-system-react/src/components/ssm-tab';
|
|
11
|
+
import { Button } from '@dealicious/design-system-react/src/components/ssm-button';
|
|
12
|
+
import { Radio } from '@dealicious/design-system-react/src/components/ssm-radio';
|
|
13
|
+
import { Text } from '@dealicious/design-system-react/src/components/ssm-text';
|
|
14
|
+
import { LabeledText } from '@dealicious/design-system-react/src/components/ssm-labeled-text';
|
|
15
|
+
import { Badge } from '@dealicious/design-system-react/src/components/ssm-badge';
|
|
16
|
+
import { Chip } from '@dealicious/design-system-react/src/components/ssm-chip';
|
|
17
|
+
import { Icon } from '@dealicious/design-system-react/src/components/ssm-icon';
|
|
18
|
+
import { Tag } from '@dealicious/design-system-react/src/components/ssm-tag';
|
|
19
|
+
import { TextLink } from '@dealicious/design-system-react/src/components/ssm-text-link';
|
|
20
|
+
import { Accordion } from '@dealicious/design-system-react/src/components/ssm-accordion';
|
|
21
|
+
|
|
22
|
+
import React from 'react';
|
|
23
|
+
|
|
24
|
+
interface SomaComponentProps {
|
|
25
|
+
// Add your props here
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const SomaComponent: React.FC<SomaComponentProps> = (props) => {
|
|
29
|
+
return (
|
|
30
|
+
<div>
|
|
31
|
+
<Tab>
|
|
32
|
+
<Button>
|
|
33
|
+
<Radio>
|
|
34
|
+
<Button size="large">
|
|
35
|
+
<Tab>
|
|
36
|
+
<Button size="medium">
|
|
37
|
+
<Chip size="large">
|
|
38
|
+
주문상태
|
|
39
|
+
<Button size="small">
|
|
40
|
+
</Button>
|
|
41
|
+
3개월
|
|
42
|
+
<Button size="small">
|
|
43
|
+
</Button>
|
|
44
|
+
<Button size="small">
|
|
45
|
+
<Button size="small">
|
|
46
|
+
</Button>
|
|
47
|
+
</Button>
|
|
48
|
+
</Chip>
|
|
49
|
+
</Button>
|
|
50
|
+
<Button size="small">
|
|
51
|
+
<LabeledText>
|
|
52
|
+
<Text>
|
|
53
|
+
거래완료 요청
|
|
54
|
+
</Text>
|
|
55
|
+
<Text>
|
|
56
|
+
3
|
|
57
|
+
</Text>
|
|
58
|
+
</LabeledText>
|
|
59
|
+
</Button>
|
|
60
|
+
</Tab>
|
|
61
|
+
<Tag size="small">
|
|
62
|
+
<Button size="small">
|
|
63
|
+
<Tag size="small">
|
|
64
|
+
주문접수
|
|
65
|
+
</Tag>
|
|
66
|
+
<Tag size="small">
|
|
67
|
+
사입사 방문
|
|
68
|
+
</Tag>
|
|
69
|
+
<Tag size="small">
|
|
70
|
+
현장 결제
|
|
71
|
+
</Tag>
|
|
72
|
+
</Button>
|
|
73
|
+
<TextLink>
|
|
74
|
+
<Text>
|
|
75
|
+
주문서 보기
|
|
76
|
+
</Text>
|
|
77
|
+
<Button size="small">
|
|
78
|
+
</Button>
|
|
79
|
+
</TextLink>
|
|
80
|
+
</Tag>
|
|
81
|
+
<Text>
|
|
82
|
+
신상플래닛
|
|
83
|
+
</Text>
|
|
84
|
+
<Text>
|
|
85
|
+
베스트 검정 니트
|
|
86
|
+
</Text>
|
|
87
|
+
<Text>
|
|
88
|
+
₩30,000
|
|
89
|
+
</Text>
|
|
90
|
+
<TextLink>
|
|
91
|
+
<Button size="small">
|
|
92
|
+
</Button>
|
|
93
|
+
<Button size="small">
|
|
94
|
+
</Button>
|
|
95
|
+
</TextLink>
|
|
96
|
+
주문취소
|
|
97
|
+
<Tag size="small">
|
|
98
|
+
<Text>
|
|
99
|
+
포장완료
|
|
100
|
+
</Text>
|
|
101
|
+
<Text>
|
|
102
|
+
직접 수령
|
|
103
|
+
</Text>
|
|
104
|
+
<Text>
|
|
105
|
+
현장 결제
|
|
106
|
+
</Text>
|
|
107
|
+
<TextLink>
|
|
108
|
+
<Text>
|
|
109
|
+
주문서 보기
|
|
110
|
+
</Text>
|
|
111
|
+
<Button size="small">
|
|
112
|
+
</Button>
|
|
113
|
+
</TextLink>
|
|
114
|
+
</Tag>
|
|
115
|
+
<Text>
|
|
116
|
+
신상랩
|
|
117
|
+
</Text>
|
|
118
|
+
<Text>
|
|
119
|
+
데일리 티셔츠 외 2건
|
|
120
|
+
</Text>
|
|
121
|
+
<Text>
|
|
122
|
+
₩56,000
|
|
123
|
+
</Text>
|
|
124
|
+
<TextLink>
|
|
125
|
+
<Button size="small">
|
|
126
|
+
</Button>
|
|
127
|
+
<Button size="small">
|
|
128
|
+
</Button>
|
|
129
|
+
</TextLink>
|
|
130
|
+
</Button>
|
|
131
|
+
</Radio>
|
|
132
|
+
<LabeledText>
|
|
133
|
+
<Text>
|
|
134
|
+
거래완료 요청
|
|
135
|
+
</Text>
|
|
136
|
+
<Text>
|
|
137
|
+
3
|
|
138
|
+
</Text>
|
|
139
|
+
</LabeledText>
|
|
140
|
+
</Button>
|
|
141
|
+
<Accordion>
|
|
142
|
+
</Accordion>
|
|
143
|
+
<Accordion>
|
|
144
|
+
</Accordion>
|
|
145
|
+
</Tab>
|
|
146
|
+
</div>
|
|
147
|
+
);
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export default SomaComponent;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"requestId": "1762935954110-m7jb9m7",
|
|
3
|
+
"createdAt": "2025-11-12T08:25:54.122Z",
|
|
4
|
+
"files": [],
|
|
5
|
+
"type": "react",
|
|
6
|
+
"componentName": "SomaComponent",
|
|
7
|
+
"figmaUrl": "https://www.figma.com/design/akI7EwlWemAf8KJup9F2ZS/-%EC%86%8C%EB%A7%A4-%EB%8F%84%EB%A7%A4--%EC%8B%A0%EC%83%81%ED%86%A1?node-id=45733-99056&m=dev",
|
|
8
|
+
"nodeId": "45733-99056"
|
|
9
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="ko">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>SomaComponent - Preview</title>
|
|
7
|
+
<script crossorigin src="https://unpkg.com/react@19/umd/react.production.min.js"></script>
|
|
8
|
+
<script crossorigin src="https://unpkg.com/react-dom@19/umd/react-dom.production.min.js"></script>
|
|
9
|
+
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
|
|
10
|
+
<style>
|
|
11
|
+
body {
|
|
12
|
+
margin: 0;
|
|
13
|
+
padding: 20px;
|
|
14
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
|
|
15
|
+
background-color: #f5f5f5;
|
|
16
|
+
}
|
|
17
|
+
.container {
|
|
18
|
+
max-width: 1200px;
|
|
19
|
+
margin: 0 auto;
|
|
20
|
+
background: white;
|
|
21
|
+
padding: 20px;
|
|
22
|
+
border-radius: 8px;
|
|
23
|
+
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
24
|
+
}
|
|
25
|
+
.preview {
|
|
26
|
+
margin-top: 30px;
|
|
27
|
+
padding: 20px;
|
|
28
|
+
border: 2px dashed #dee2e6;
|
|
29
|
+
border-radius: 4px;
|
|
30
|
+
background: #fff;
|
|
31
|
+
min-height: 200px;
|
|
32
|
+
}
|
|
33
|
+
.error {
|
|
34
|
+
color: red;
|
|
35
|
+
padding: 10px;
|
|
36
|
+
background: #ffe6e6;
|
|
37
|
+
border: 1px solid #ff9999;
|
|
38
|
+
border-radius: 4px;
|
|
39
|
+
margin: 10px 0;
|
|
40
|
+
}
|
|
41
|
+
.mock-button {
|
|
42
|
+
display: inline-block;
|
|
43
|
+
padding: 8px 16px;
|
|
44
|
+
margin: 4px;
|
|
45
|
+
background: #007bff;
|
|
46
|
+
color: white;
|
|
47
|
+
border: none;
|
|
48
|
+
border-radius: 4px;
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
}
|
|
51
|
+
.mock-button:hover {
|
|
52
|
+
background: #0056b3;
|
|
53
|
+
}
|
|
54
|
+
</style>
|
|
55
|
+
</head>
|
|
56
|
+
<body>
|
|
57
|
+
<div class="container">
|
|
58
|
+
<h1>SomaComponent - React 컴포넌트 미리보기</h1>
|
|
59
|
+
<div class="preview">
|
|
60
|
+
<div id="root"></div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
<script type="text/babel">
|
|
64
|
+
// 모의 Design System 컴포넌트 정의
|
|
65
|
+
const Button = ({ children, size, ...props }) => {
|
|
66
|
+
const sizeStyle = size === 'small' ? { padding: '4px 8px', fontSize: '12px' } :
|
|
67
|
+
size === 'large' ? { padding: '12px 24px', fontSize: '16px' } :
|
|
68
|
+
{ padding: '8px 16px', fontSize: '14px' };
|
|
69
|
+
return React.createElement('button', {
|
|
70
|
+
style: { ...sizeStyle, background: '#007bff', color: 'white', border: 'none', borderRadius: '4px', cursor: 'pointer', margin: '2px' },
|
|
71
|
+
...props
|
|
72
|
+
}, children);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const LayerPopup = ({ children, isOpen, onClose, ...props }) => {
|
|
76
|
+
if (!isOpen) return null;
|
|
77
|
+
return React.createElement('div', {
|
|
78
|
+
style: { position: 'fixed', top: 0, left: 0, right: 0, bottom: 0, background: 'rgba(0,0,0,0.5)', zIndex: 1000, display: 'flex', alignItems: 'center', justifyContent: 'center' },
|
|
79
|
+
onClick: onClose,
|
|
80
|
+
...props
|
|
81
|
+
}, React.createElement('div', {
|
|
82
|
+
style: { background: 'white', padding: '20px', borderRadius: '8px', maxWidth: '90%', maxHeight: '90%', overflow: 'auto' },
|
|
83
|
+
onClick: (e) => e.stopPropagation()
|
|
84
|
+
}, children));
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const Tab = ({ children, tabs, activeTab, onTabChange, ...props }) => {
|
|
88
|
+
return React.createElement('div', { style: { borderBottom: '1px solid #ddd' }, ...props }, children);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const Text = ({ children, variant, size, ...props }) => {
|
|
92
|
+
const style = {
|
|
93
|
+
fontSize: size === 'small' ? '12px' : size === 'large' ? '18px' : '14px',
|
|
94
|
+
fontWeight: variant === 'heading' ? 'bold' : 'normal',
|
|
95
|
+
...props.style
|
|
96
|
+
};
|
|
97
|
+
return React.createElement('span', { style, ...props }, children);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const LabeledText = ({ label, value, ...props }) => {
|
|
101
|
+
return React.createElement('div', { style: { margin: '4px 0' }, ...props },
|
|
102
|
+
React.createElement('span', { style: { fontWeight: 'bold', marginRight: '8px' } }, label + ':'),
|
|
103
|
+
React.createElement('span', {}, value || '')
|
|
104
|
+
);
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
const Input = ({ placeholder, value, onChange, ...props }) => {
|
|
108
|
+
return React.createElement('input', {
|
|
109
|
+
type: 'text',
|
|
110
|
+
placeholder,
|
|
111
|
+
value: value || '',
|
|
112
|
+
onChange: onChange || (() => {}),
|
|
113
|
+
style: { padding: '8px', border: '1px solid #ddd', borderRadius: '4px', margin: '4px', width: '200px' },
|
|
114
|
+
...props
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
const Chip = ({ children, variant, size, onDelete, ...props }) => {
|
|
119
|
+
return React.createElement('span', {
|
|
120
|
+
style: {
|
|
121
|
+
display: 'inline-block',
|
|
122
|
+
padding: '4px 8px',
|
|
123
|
+
background: variant === 'filled' ? '#007bff' : '#f0f0f0',
|
|
124
|
+
color: variant === 'filled' ? 'white' : 'black',
|
|
125
|
+
borderRadius: '16px',
|
|
126
|
+
margin: '2px',
|
|
127
|
+
fontSize: size === 'small' ? '12px' : '14px'
|
|
128
|
+
},
|
|
129
|
+
...props
|
|
130
|
+
}, children, onDelete && React.createElement('button', {
|
|
131
|
+
onClick: onDelete,
|
|
132
|
+
style: { marginLeft: '8px', background: 'none', border: 'none', cursor: 'pointer' }
|
|
133
|
+
}, '×'));
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
const Switch = ({ checked, onChange, label, ...props }) => {
|
|
137
|
+
return React.createElement('label', { style: { display: 'flex', alignItems: 'center', margin: '4px' }, ...props },
|
|
138
|
+
React.createElement('input', {
|
|
139
|
+
type: 'checkbox',
|
|
140
|
+
checked: checked || false,
|
|
141
|
+
onChange: onChange || (() => {}),
|
|
142
|
+
style: { marginRight: '8px' }
|
|
143
|
+
}),
|
|
144
|
+
label && React.createElement('span', {}, label)
|
|
145
|
+
);
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
const ArrowPagination = ({ currentPage, totalPages, onPageChange, children, ...props }) => {
|
|
149
|
+
return React.createElement('div', { style: { display: 'flex', alignItems: 'center', margin: '4px' }, ...props }, children);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
const Accordion = ({ title, children, defaultExpanded, disabled, ...props }) => {
|
|
153
|
+
const [expanded, setExpanded] = React.useState(defaultExpanded || false);
|
|
154
|
+
if (disabled) return null;
|
|
155
|
+
return React.createElement('div', { style: { border: '1px solid #ddd', borderRadius: '4px', margin: '4px' }, ...props },
|
|
156
|
+
React.createElement('div', {
|
|
157
|
+
onClick: () => setExpanded(!expanded),
|
|
158
|
+
style: { padding: '8px', cursor: 'pointer', background: '#f5f5f5', fontWeight: 'bold' }
|
|
159
|
+
}, title || 'Accordion'),
|
|
160
|
+
expanded && React.createElement('div', { style: { padding: '8px' } }, children)
|
|
161
|
+
);
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
// 컴포넌트 코드 정리
|
|
165
|
+
const cleanCode = "// Design System Components from GitHub:\n// React: https://github.com/dealicious-inc/ssm-web/tree/master/packages/design-system-react\n// Vue: https://github.com/dealicious-inc/ssm-web/tree/master/packages/design-system\n// \n// To use these components, install the packages:\n// npm install @dealicious/design-system-react @dealicious/design-system\n// or\n// yarn add @dealicious/design-system-react @dealicious/design-system\n\nimport { Tab } from '@dealicious/design-system-react/src/components/ssm-tab';\nimport { Button } from '@dealicious/design-system-react/src/components/ssm-button';\nimport { Radio } from '@dealicious/design-system-react/src/components/ssm-radio';\nimport { Text } from '@dealicious/design-system-react/src/components/ssm-text';\nimport { LabeledText } from '@dealicious/design-system-react/src/components/ssm-labeled-text';\nimport { Badge } from '@dealicious/design-system-react/src/components/ssm-badge';\nimport { Chip } from '@dealicious/design-system-react/src/components/ssm-chip';\nimport { Icon } from '@dealicious/design-system-react/src/components/ssm-icon';\nimport { Tag } from '@dealicious/design-system-react/src/components/ssm-tag';\nimport { TextLink } from '@dealicious/design-system-react/src/components/ssm-text-link';\nimport { Accordion } from '@dealicious/design-system-react/src/components/ssm-accordion';\n\nimport React from 'react';\n\ninterface SomaComponentProps {\n // Add your props here\n}\n\nconst SomaComponent: React.FC<SomaComponentProps> = (props) => {\n return (\n <div>\n <Tab>\n <Button>\n <Radio>\n <Button size=\"large\">\n <Tab>\n <Button size=\"medium\">\n <Chip size=\"large\">\n 주문상태\n <Button size=\"small\">\n </Button>\n 3개월\n <Button size=\"small\">\n </Button>\n <Button size=\"small\">\n <Button size=\"small\">\n </Button>\n </Button>\n </Chip>\n </Button>\n <Button size=\"small\">\n <LabeledText>\n <Text>\n 거래완료 요청\n </Text>\n <Text>\n 3\n </Text>\n </LabeledText>\n </Button>\n </Tab>\n <Tag size=\"small\">\n <Button size=\"small\">\n <Tag size=\"small\">\n 주문접수\n </Tag>\n <Tag size=\"small\">\n 사입사 방문\n </Tag>\n <Tag size=\"small\">\n 현장 결제\n </Tag>\n </Button>\n <TextLink>\n <Text>\n 주문서 보기\n </Text>\n <Button size=\"small\">\n </Button>\n </TextLink>\n </Tag>\n <Text>\n 신상플래닛\n </Text>\n <Text>\n 베스트 검정 니트\n </Text>\n <Text>\n ₩30,000\n </Text>\n <TextLink>\n <Button size=\"small\">\n </Button>\n <Button size=\"small\">\n </Button>\n </TextLink>\n 주문취소\n <Tag size=\"small\">\n <Text>\n 포장완료\n </Text>\n <Text>\n 직접 수령\n </Text>\n <Text>\n 현장 결제\n </Text>\n <TextLink>\n <Text>\n 주문서 보기\n </Text>\n <Button size=\"small\">\n </Button>\n </TextLink>\n </Tag>\n <Text>\n 신상랩\n </Text>\n <Text>\n 데일리 티셔츠 외 2건\n </Text>\n <Text>\n ₩56,000\n </Text>\n <TextLink>\n <Button size=\"small\">\n </Button>\n <Button size=\"small\">\n </Button>\n </TextLink>\n </Button>\n </Radio>\n <LabeledText>\n <Text>\n 거래완료 요청\n </Text>\n <Text>\n 3\n </Text>\n </LabeledText>\n </Button>\n <Accordion>\n </Accordion>\n <Accordion>\n </Accordion>\n </Tab>\n </div>\n );\n};\n\nexport default SomaComponent;\n"
|
|
166
|
+
.replace(/import[^;]+;/g, '')
|
|
167
|
+
.replace(///[^\n]*/g, '')
|
|
168
|
+
.replace(/interface[^\{]*\{[^\}]*\}/g, '')
|
|
169
|
+
.replace(/React\.FC<[^>]*>/g, '')
|
|
170
|
+
.replace(/export default SomaComponent;/g, '')
|
|
171
|
+
.replace(new RegExp(`const SomaComponent:.*?=`, 'g'), `const SomaComponent = `)
|
|
172
|
+
// 문법 오류 수정: 잘못된 prop 형식 수정
|
|
173
|
+
.replace(/<Button\s+>([^<]+)\s+size="([^"]+)">/g, '<Button size="$2">$1</Button>')
|
|
174
|
+
.replace(/<Button\s+>([^<]+)\s+size="([^"]+)">/g, '<Button size="$2">$1</Button>')
|
|
175
|
+
// 빈 Button 태그 정리
|
|
176
|
+
.replace(/<Button\s*><\/Button>/g, '<Button></Button>')
|
|
177
|
+
.replace(/<Button\s+size="([^"]+)"\s*><\/Button>/g, '<Button size="$1"></Button>');
|
|
178
|
+
|
|
179
|
+
try {
|
|
180
|
+
const transformedCode = Babel.transform(cleanCode, { presets: ['react'] }).code;
|
|
181
|
+
eval(transformedCode);
|
|
182
|
+
const root = ReactDOM.createRoot(document.getElementById('root'));
|
|
183
|
+
root.render(React.createElement(SomaComponent, {}));
|
|
184
|
+
} catch (error) {
|
|
185
|
+
console.error('렌더링 오류:', error);
|
|
186
|
+
const errorDiv = document.getElementById('root');
|
|
187
|
+
errorDiv.innerHTML = '<div class="error"><strong>렌더링 오류:</strong><br>' +
|
|
188
|
+
error.message + '<br><br><strong>스택:</strong><br>' +
|
|
189
|
+
(error.stack || '스택 정보 없음') + '</div>';
|
|
190
|
+
}
|
|
191
|
+
</script>
|
|
192
|
+
</body>
|
|
193
|
+
</html>
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
// Design System Components from GitHub:
|
|
2
|
+
// React: https://github.com/dealicious-inc/ssm-web/tree/master/packages/design-system-react
|
|
3
|
+
// Vue: https://github.com/dealicious-inc/ssm-web/tree/master/packages/design-system
|
|
4
|
+
//
|
|
5
|
+
// To use these components, install the packages:
|
|
6
|
+
// npm install @dealicious/design-system-react @dealicious/design-system
|
|
7
|
+
// or
|
|
8
|
+
// yarn add @dealicious/design-system-react @dealicious/design-system
|
|
9
|
+
|
|
10
|
+
import { Tab } from '@dealicious/design-system-react/src/components/ssm-tab';
|
|
11
|
+
import { Button } from '@dealicious/design-system-react/src/components/ssm-button';
|
|
12
|
+
import { Radio } from '@dealicious/design-system-react/src/components/ssm-radio';
|
|
13
|
+
import { Text } from '@dealicious/design-system-react/src/components/ssm-text';
|
|
14
|
+
import { LabeledText } from '@dealicious/design-system-react/src/components/ssm-labeled-text';
|
|
15
|
+
import { Badge } from '@dealicious/design-system-react/src/components/ssm-badge';
|
|
16
|
+
import { Chip } from '@dealicious/design-system-react/src/components/ssm-chip';
|
|
17
|
+
import { Icon } from '@dealicious/design-system-react/src/components/ssm-icon';
|
|
18
|
+
import { Tag } from '@dealicious/design-system-react/src/components/ssm-tag';
|
|
19
|
+
import { TextLink } from '@dealicious/design-system-react/src/components/ssm-text-link';
|
|
20
|
+
import { Accordion } from '@dealicious/design-system-react/src/components/ssm-accordion';
|
|
21
|
+
|
|
22
|
+
import React from 'react';
|
|
23
|
+
|
|
24
|
+
interface SomaComponentProps {
|
|
25
|
+
// Add your props here
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const SomaComponent: React.FC<SomaComponentProps> = (props) => {
|
|
29
|
+
return (
|
|
30
|
+
<div>
|
|
31
|
+
<Tab>
|
|
32
|
+
<Button>
|
|
33
|
+
<Radio>
|
|
34
|
+
<Button size="large">
|
|
35
|
+
<Tab>
|
|
36
|
+
<Button size="medium">
|
|
37
|
+
<Chip size="large">
|
|
38
|
+
주문상태
|
|
39
|
+
<Button size="small">
|
|
40
|
+
</Button>
|
|
41
|
+
3개월
|
|
42
|
+
<Button size="small">
|
|
43
|
+
</Button>
|
|
44
|
+
<Button size="small">
|
|
45
|
+
<Button size="small">
|
|
46
|
+
</Button>
|
|
47
|
+
</Button>
|
|
48
|
+
</Chip>
|
|
49
|
+
</Button>
|
|
50
|
+
<Button size="small">
|
|
51
|
+
<LabeledText>
|
|
52
|
+
<Text>
|
|
53
|
+
거래완료 요청
|
|
54
|
+
</Text>
|
|
55
|
+
<Text>
|
|
56
|
+
3
|
|
57
|
+
</Text>
|
|
58
|
+
</LabeledText>
|
|
59
|
+
</Button>
|
|
60
|
+
</Tab>
|
|
61
|
+
<Tag size="small">
|
|
62
|
+
<Button size="small">
|
|
63
|
+
<Tag size="small">
|
|
64
|
+
주문접수
|
|
65
|
+
</Tag>
|
|
66
|
+
<Tag size="small">
|
|
67
|
+
사입사 방문
|
|
68
|
+
</Tag>
|
|
69
|
+
<Tag size="small">
|
|
70
|
+
현장 결제
|
|
71
|
+
</Tag>
|
|
72
|
+
</Button>
|
|
73
|
+
<TextLink>
|
|
74
|
+
<Text>
|
|
75
|
+
주문서 보기
|
|
76
|
+
</Text>
|
|
77
|
+
<Button size="small">
|
|
78
|
+
</Button>
|
|
79
|
+
</TextLink>
|
|
80
|
+
</Tag>
|
|
81
|
+
<Text>
|
|
82
|
+
신상플래닛
|
|
83
|
+
</Text>
|
|
84
|
+
<Text>
|
|
85
|
+
베스트 검정 니트
|
|
86
|
+
</Text>
|
|
87
|
+
<Text>
|
|
88
|
+
₩30,000
|
|
89
|
+
</Text>
|
|
90
|
+
<TextLink>
|
|
91
|
+
<Button size="small">
|
|
92
|
+
</Button>
|
|
93
|
+
<Button size="small">
|
|
94
|
+
</Button>
|
|
95
|
+
</TextLink>
|
|
96
|
+
주문취소
|
|
97
|
+
<Tag size="small">
|
|
98
|
+
<Text>
|
|
99
|
+
포장완료
|
|
100
|
+
</Text>
|
|
101
|
+
<Text>
|
|
102
|
+
직접 수령
|
|
103
|
+
</Text>
|
|
104
|
+
<Text>
|
|
105
|
+
현장 결제
|
|
106
|
+
</Text>
|
|
107
|
+
<TextLink>
|
|
108
|
+
<Text>
|
|
109
|
+
주문서 보기
|
|
110
|
+
</Text>
|
|
111
|
+
<Button size="small">
|
|
112
|
+
</Button>
|
|
113
|
+
</TextLink>
|
|
114
|
+
</Tag>
|
|
115
|
+
<Text>
|
|
116
|
+
신상랩
|
|
117
|
+
</Text>
|
|
118
|
+
<Text>
|
|
119
|
+
데일리 티셔츠 외 2건
|
|
120
|
+
</Text>
|
|
121
|
+
<Text>
|
|
122
|
+
₩56,000
|
|
123
|
+
</Text>
|
|
124
|
+
<TextLink>
|
|
125
|
+
<Button size="small">
|
|
126
|
+
</Button>
|
|
127
|
+
<Button size="small">
|
|
128
|
+
</Button>
|
|
129
|
+
</TextLink>
|
|
130
|
+
</Button>
|
|
131
|
+
</Radio>
|
|
132
|
+
<LabeledText>
|
|
133
|
+
<Text>
|
|
134
|
+
거래완료 요청
|
|
135
|
+
</Text>
|
|
136
|
+
<Text>
|
|
137
|
+
3
|
|
138
|
+
</Text>
|
|
139
|
+
</LabeledText>
|
|
140
|
+
</Button>
|
|
141
|
+
<Accordion>
|
|
142
|
+
</Accordion>
|
|
143
|
+
<Accordion>
|
|
144
|
+
</Accordion>
|
|
145
|
+
</Tab>
|
|
146
|
+
</div>
|
|
147
|
+
);
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export default SomaComponent;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"requestId": "1762936003095-0jnmlga",
|
|
3
|
+
"createdAt": "2025-11-12T08:26:43.111Z",
|
|
4
|
+
"files": [],
|
|
5
|
+
"type": "react",
|
|
6
|
+
"componentName": "SomaComponent",
|
|
7
|
+
"figmaUrl": "https://www.figma.com/design/akI7EwlWemAf8KJup9F2ZS/-%EC%86%8C%EB%A7%A4-%EB%8F%84%EB%A7%A4--%EC%8B%A0%EC%83%81%ED%86%A1?node-id=45733-99056&m=dev",
|
|
8
|
+
"nodeId": "45733-99056"
|
|
9
|
+
}
|