@mandujs/core 0.19.0 β 0.20.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.ko.md +0 -14
- package/package.json +4 -1
- package/src/brain/architecture/analyzer.ts +4 -4
- package/src/brain/doctor/analyzer.ts +18 -14
- package/src/bundler/build.test.ts +127 -0
- package/src/bundler/build.ts +385 -115
- package/src/bundler/css.ts +20 -5
- package/src/bundler/dev.ts +55 -2
- package/src/bundler/prerender.ts +195 -0
- package/src/bundler/types.ts +20 -0
- package/src/change/snapshot.ts +4 -23
- package/src/change/types.ts +2 -3
- package/src/client/Form.tsx +105 -0
- package/src/client/__tests__/use-sse.test.ts +153 -0
- package/src/client/hooks.ts +105 -6
- package/src/client/index.ts +35 -6
- package/src/client/router.ts +670 -433
- package/src/client/rpc.ts +140 -0
- package/src/client/runtime.ts +24 -21
- package/src/client/use-fetch.ts +239 -0
- package/src/client/use-head.ts +197 -0
- package/src/client/use-sse.ts +378 -0
- package/src/components/Image.tsx +162 -0
- package/src/config/mandu.ts +5 -0
- package/src/config/validate.ts +34 -0
- package/src/content/index.ts +5 -1
- package/src/devtools/client/catchers/error-catcher.ts +17 -0
- package/src/devtools/client/catchers/network-proxy.ts +390 -367
- package/src/devtools/client/components/kitchen-root.tsx +479 -467
- package/src/devtools/client/components/mandu-character.tsx +77 -53
- package/src/devtools/client/components/panel/diff-viewer.tsx +219 -0
- package/src/devtools/client/components/panel/errors-panel.tsx +2 -2
- package/src/devtools/client/components/panel/guard-panel.tsx +363 -234
- package/src/devtools/client/components/panel/index.ts +45 -32
- package/src/devtools/client/components/panel/islands-panel.tsx +30 -14
- package/src/devtools/client/components/panel/network-panel.tsx +2 -3
- package/src/devtools/client/components/panel/panel-container.tsx +273 -100
- package/src/devtools/client/components/panel/preview-panel.tsx +212 -0
- package/src/devtools/client/state-manager.ts +535 -478
- package/src/devtools/design-tokens.ts +265 -264
- package/src/devtools/init.ts +1 -1
- package/src/devtools/types.ts +321 -295
- package/src/filling/filling.ts +328 -6
- package/src/filling/index.ts +5 -1
- package/src/filling/session.ts +216 -0
- package/src/filling/ws.ts +78 -0
- package/src/generator/generate.ts +2 -2
- package/src/guard/auto-correct.ts +0 -29
- package/src/guard/check.ts +14 -31
- package/src/guard/presets/index.ts +296 -294
- package/src/guard/rules.ts +15 -19
- package/src/guard/validator.ts +834 -834
- package/src/index.ts +6 -1
- package/src/island/index.ts +373 -304
- package/src/kitchen/api/contract-api.ts +225 -0
- package/src/kitchen/api/diff-parser.ts +108 -0
- package/src/kitchen/api/file-api.ts +273 -0
- package/src/kitchen/api/guard-api.ts +83 -0
- package/src/kitchen/api/guard-decisions.ts +100 -0
- package/src/kitchen/api/routes-api.ts +50 -0
- package/src/kitchen/index.ts +21 -0
- package/src/kitchen/kitchen-handler.ts +335 -0
- package/src/kitchen/kitchen-ui.ts +1732 -0
- package/src/kitchen/stream/activity-sse.ts +145 -0
- package/src/kitchen/stream/file-tailer.ts +99 -0
- package/src/middleware/compress.ts +62 -0
- package/src/middleware/cors.ts +47 -0
- package/src/middleware/index.ts +10 -0
- package/src/middleware/jwt.ts +134 -0
- package/src/middleware/logger.ts +58 -0
- package/src/middleware/timeout.ts +55 -0
- package/src/observability/event-bus.ts +79 -0
- package/src/observability/index.ts +8 -0
- package/src/observability/logger-adapter.ts +36 -0
- package/src/paths.ts +0 -4
- package/src/plugins/hooks.ts +64 -0
- package/src/plugins/index.ts +3 -0
- package/src/plugins/types.ts +5 -0
- package/src/report/build.ts +0 -6
- package/src/resource/__tests__/backward-compat.test.ts +0 -1
- package/src/router/fs-patterns.ts +11 -1
- package/src/router/fs-routes.ts +78 -14
- package/src/router/fs-scanner.ts +2 -2
- package/src/router/fs-types.ts +2 -1
- package/src/runtime/adapter-bun.ts +62 -0
- package/src/runtime/adapter.ts +47 -0
- package/src/runtime/cache.ts +310 -0
- package/src/runtime/handler.ts +65 -0
- package/src/runtime/image-handler.ts +195 -0
- package/src/runtime/index.ts +13 -0
- package/src/runtime/middleware.ts +263 -0
- package/src/runtime/ppr.ts +74 -0
- package/src/runtime/server.ts +706 -71
- package/src/runtime/ssr.ts +70 -31
- package/src/runtime/streaming-ssr.ts +121 -78
- package/src/spec/index.ts +0 -1
- package/src/spec/schema.ts +1 -0
- package/src/testing/index.ts +189 -0
- package/src/watcher/watcher.ts +27 -1
- package/src/spec/lock.ts +0 -56
|
@@ -1,32 +1,45 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mandu Kitchen DevTools - Panel Components
|
|
3
|
-
* @version 1.0.3
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
PanelContainer,
|
|
8
|
-
TABS,
|
|
9
|
-
type TabId,
|
|
10
|
-
type TabDefinition,
|
|
11
|
-
type PanelContainerProps,
|
|
12
|
-
} from './panel-container';
|
|
13
|
-
|
|
14
|
-
export {
|
|
15
|
-
ErrorsPanel,
|
|
16
|
-
type ErrorsPanelProps,
|
|
17
|
-
} from './errors-panel';
|
|
18
|
-
|
|
19
|
-
export {
|
|
20
|
-
IslandsPanel,
|
|
21
|
-
type IslandsPanelProps,
|
|
22
|
-
} from './islands-panel';
|
|
23
|
-
|
|
24
|
-
export {
|
|
25
|
-
NetworkPanel,
|
|
26
|
-
type NetworkPanelProps,
|
|
27
|
-
} from './network-panel';
|
|
28
|
-
|
|
29
|
-
export {
|
|
30
|
-
GuardPanel,
|
|
31
|
-
type GuardPanelProps,
|
|
32
|
-
} from './guard-panel';
|
|
1
|
+
/**
|
|
2
|
+
* Mandu Kitchen DevTools - Panel Components
|
|
3
|
+
* @version 1.0.3
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export {
|
|
7
|
+
PanelContainer,
|
|
8
|
+
TABS,
|
|
9
|
+
type TabId,
|
|
10
|
+
type TabDefinition,
|
|
11
|
+
type PanelContainerProps,
|
|
12
|
+
} from './panel-container';
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
ErrorsPanel,
|
|
16
|
+
type ErrorsPanelProps,
|
|
17
|
+
} from './errors-panel';
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
IslandsPanel,
|
|
21
|
+
type IslandsPanelProps,
|
|
22
|
+
} from './islands-panel';
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
NetworkPanel,
|
|
26
|
+
type NetworkPanelProps,
|
|
27
|
+
} from './network-panel';
|
|
28
|
+
|
|
29
|
+
export {
|
|
30
|
+
GuardPanel,
|
|
31
|
+
type GuardPanelProps,
|
|
32
|
+
} from './guard-panel';
|
|
33
|
+
|
|
34
|
+
export {
|
|
35
|
+
PreviewPanel,
|
|
36
|
+
type PreviewPanelProps,
|
|
37
|
+
} from './preview-panel';
|
|
38
|
+
|
|
39
|
+
export {
|
|
40
|
+
DiffViewer,
|
|
41
|
+
type DiffViewerProps,
|
|
42
|
+
type FileDiff,
|
|
43
|
+
type DiffHunk,
|
|
44
|
+
type DiffLine,
|
|
45
|
+
} from './diff-viewer';
|
|
@@ -68,9 +68,18 @@ const styles = {
|
|
|
68
68
|
transition: `all ${animation.duration.fast}`,
|
|
69
69
|
},
|
|
70
70
|
islandIcon: {
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
display: 'inline-flex',
|
|
72
|
+
alignItems: 'center',
|
|
73
|
+
justifyContent: 'center',
|
|
74
|
+
minWidth: '48px',
|
|
75
|
+
height: '28px',
|
|
76
|
+
padding: '0 8px',
|
|
77
|
+
borderRadius: borderRadius.full,
|
|
73
78
|
textAlign: 'center' as const,
|
|
79
|
+
fontSize: typography.fontSize.xs,
|
|
80
|
+
fontWeight: typography.fontWeight.bold,
|
|
81
|
+
fontFamily: typography.fontFamily.mono,
|
|
82
|
+
letterSpacing: '0.08em',
|
|
74
83
|
},
|
|
75
84
|
islandInfo: {
|
|
76
85
|
flex: 1,
|
|
@@ -118,11 +127,11 @@ const styles = {
|
|
|
118
127
|
};
|
|
119
128
|
|
|
120
129
|
const statusConfig: Record<string, { icon: string; color: string; bg: string }> = {
|
|
121
|
-
ssr: { icon: '
|
|
122
|
-
pending: { icon: '
|
|
123
|
-
hydrating: { icon: '
|
|
124
|
-
hydrated: { icon: '
|
|
125
|
-
error: { icon: '
|
|
130
|
+
ssr: { icon: 'SSR', color: colors.text.muted, bg: colors.background.light },
|
|
131
|
+
pending: { icon: 'WAIT', color: colors.semantic.warning, bg: `${colors.semantic.warning}20` },
|
|
132
|
+
hydrating: { icon: 'HYDR', color: colors.semantic.info, bg: `${colors.semantic.info}20` },
|
|
133
|
+
hydrated: { icon: 'READY', color: colors.semantic.success, bg: `${colors.semantic.success}20` },
|
|
134
|
+
error: { icon: 'ERR', color: colors.semantic.error, bg: `${colors.semantic.error}20` },
|
|
126
135
|
};
|
|
127
136
|
|
|
128
137
|
const strategyLabels: Record<string, string> = {
|
|
@@ -178,10 +187,9 @@ export function IslandsPanel({ islands }: IslandsPanelProps): React.ReactElement
|
|
|
178
187
|
return (
|
|
179
188
|
<div style={styles.container}>
|
|
180
189
|
<div style={styles.emptyState}>
|
|
181
|
-
ποΈ
|
|
182
190
|
<p>
|
|
183
|
-
μμ§ λ±λ‘λ Islandκ°
|
|
184
|
-
Island μ»΄ν¬λνΈλ₯Ό μ¬μ©νλ©΄ μ¬κΈ°μ νμλ©λλ€.
|
|
191
|
+
μμ§ λ±λ‘λ Islandκ° μμ΅λλ€.<br />
|
|
192
|
+
Island μ»΄ν¬λνΈλ₯Ό μ¬μ©νλ©΄ μ¬κΈ°μ μνκ° νμλ©λλ€.
|
|
185
193
|
</p>
|
|
186
194
|
</div>
|
|
187
195
|
</div>
|
|
@@ -198,18 +206,18 @@ export function IslandsPanel({ islands }: IslandsPanelProps): React.ReactElement
|
|
|
198
206
|
<span style={styles.statValue}>{stats.total}</span>
|
|
199
207
|
</div>
|
|
200
208
|
<div style={styles.stat}>
|
|
201
|
-
<span
|
|
209
|
+
<span>Ready</span>
|
|
202
210
|
<span style={styles.statValue}>{stats.hydrated}</span>
|
|
203
211
|
</div>
|
|
204
212
|
{stats.pending > 0 && (
|
|
205
213
|
<div style={styles.stat}>
|
|
206
|
-
<span
|
|
214
|
+
<span>Pending</span>
|
|
207
215
|
<span style={styles.statValue}>{stats.pending}</span>
|
|
208
216
|
</div>
|
|
209
217
|
)}
|
|
210
218
|
{stats.errors > 0 && (
|
|
211
219
|
<div style={styles.stat}>
|
|
212
|
-
<span
|
|
220
|
+
<span>Error</span>
|
|
213
221
|
<span style={{ ...styles.statValue, color: colors.semantic.error }}>
|
|
214
222
|
{stats.errors}
|
|
215
223
|
</span>
|
|
@@ -234,7 +242,15 @@ export function IslandsPanel({ islands }: IslandsPanelProps): React.ReactElement
|
|
|
234
242
|
|
|
235
243
|
return (
|
|
236
244
|
<div key={island.id} style={styles.islandItem}>
|
|
237
|
-
<span
|
|
245
|
+
<span
|
|
246
|
+
style={{
|
|
247
|
+
...styles.islandIcon,
|
|
248
|
+
backgroundColor: status.bg,
|
|
249
|
+
color: status.color,
|
|
250
|
+
}}
|
|
251
|
+
>
|
|
252
|
+
{status.icon}
|
|
253
|
+
</span>
|
|
238
254
|
|
|
239
255
|
<div style={styles.islandInfo}>
|
|
240
256
|
<div style={styles.islandName}>{island.name}</div>
|
|
@@ -213,10 +213,9 @@ export function NetworkPanel({ requests }: NetworkPanelProps): React.ReactElemen
|
|
|
213
213
|
return (
|
|
214
214
|
<div style={styles.container}>
|
|
215
215
|
<div style={styles.emptyState}>
|
|
216
|
-
π‘
|
|
217
216
|
<p>
|
|
218
|
-
μμ§ λ€νΈμν¬ μμ²μ΄
|
|
219
|
-
|
|
217
|
+
μμ§ λ€νΈμν¬ μμ²μ΄ μμ΅λλ€.<br />
|
|
218
|
+
μμ²μ΄ λ°μνλ©΄ μ¬κΈ°μ κΈ°λ‘λ©λλ€.
|
|
220
219
|
</p>
|
|
221
220
|
</div>
|
|
222
221
|
</div>
|