@conscience-technology/ovenn 0.7.4 โ 0.7.6
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 +43 -4
- package/assets/components/AIMessage/AIMessage.module.css +10 -0
- package/assets/components/AIMessage/AIMessage.tsx +6 -2
- package/assets/components/AttachmentThumb/AttachmentThumb.tsx +1 -0
- package/assets/components/Breadcrumb/Breadcrumb.module.css +82 -23
- package/assets/components/Breadcrumb/Breadcrumb.tsx +44 -26
- package/assets/components/Breadcrumb/index.ts +1 -0
- package/assets/components/Button/Button.module.css +2 -4
- package/assets/components/Callout/Callout.module.css +44 -18
- package/assets/components/Callout/Callout.tsx +9 -4
- package/assets/components/Callout/index.ts +1 -1
- package/assets/components/Canvas/Canvas.module.css +13 -0
- package/assets/components/Canvas/Canvas.tsx +378 -94
- package/assets/components/Canvas/clipboard.ts +5 -1
- package/assets/components/Canvas/collision.ts +5 -1
- package/assets/components/Canvas/graph.ts +14 -5
- package/assets/components/Canvas/history.ts +11 -4
- package/assets/components/Canvas/index.ts +2 -1
- package/assets/components/Canvas/types.ts +36 -1
- package/assets/components/CanvasEdge/tokens.css +14 -1
- package/assets/components/CanvasNode/tokens.css +13 -10
- package/assets/components/ChatComposer/ChatComposer.tsx +1 -1
- package/assets/components/ChatInput/ChatInput.tsx +1 -1
- package/assets/components/ColorField/ColorField.module.css +6 -1
- package/assets/components/ColorPicker/ColorPicker.module.css +3 -0
- package/assets/components/CommandPalette/CommandPalette.module.css +114 -0
- package/assets/components/CommandPalette/CommandPalette.tsx +206 -21
- package/assets/components/CommandPalette/index.ts +1 -0
- package/assets/components/Drawer/Drawer.module.css +30 -0
- package/assets/components/Drawer/Drawer.tsx +75 -16
- package/assets/components/Drawer/index.ts +1 -0
- package/assets/components/FileIcon/FileIcon.tsx +1 -0
- package/assets/components/FileIcon/fileExtMap.ts +1 -0
- package/assets/components/Icon/Icon.tsx +3 -0
- package/assets/components/Input/Input.module.css +3 -3
- package/assets/components/Onboarding/OnboardingAxisPanel.tsx +1 -1
- package/assets/components/Onboarding/OnboardingPage.tsx +13 -11
- package/assets/components/Onboarding/actions.ts +9 -9
- package/assets/components/Select/Select.module.css +1 -1
- package/assets/components/SocialLoginButton/SocialLoginButton.module.css +198 -0
- package/assets/components/SocialLoginButton/SocialLoginButton.tsx +86 -0
- package/assets/components/SocialLoginButton/assets/amazon.svg +1 -0
- package/assets/components/SocialLoginButton/assets/apple.svg +3 -0
- package/assets/components/SocialLoginButton/assets/discord.svg +3 -0
- package/assets/components/SocialLoginButton/assets/facebook-white.png +0 -0
- package/assets/components/SocialLoginButton/assets/facebook.png +0 -0
- package/assets/components/SocialLoginButton/assets/github.svg +3 -0
- package/assets/components/SocialLoginButton/assets/google-mark.png +0 -0
- package/assets/components/SocialLoginButton/assets/kakao.svg +3 -0
- package/assets/components/SocialLoginButton/assets/line-icon.png +0 -0
- package/assets/components/SocialLoginButton/assets/line-white.png +0 -0
- package/assets/components/SocialLoginButton/assets/linkedin-white.png +0 -0
- package/assets/components/SocialLoginButton/assets/linkedin.png +0 -0
- package/assets/components/SocialLoginButton/assets/microsoft.svg +6 -0
- package/assets/components/SocialLoginButton/assets/naver.png +0 -0
- package/assets/components/SocialLoginButton/assets/slack.svg +17 -0
- package/assets/components/SocialLoginButton/assets/spotify.svg +3 -0
- package/assets/components/SocialLoginButton/assets/twitch.svg +21 -0
- package/assets/components/SocialLoginButton/assets/wechat.png +0 -0
- package/assets/components/SocialLoginButton/assets/x.svg +3 -0
- package/assets/components/SocialLoginButton/index.ts +2 -0
- package/assets/components/SocialLoginButton/provider-tokens.css +30 -0
- package/assets/components/SocialLoginButton/providers.ts +23 -0
- package/assets/components/TableRowEdit/TableRowEdit.tsx +2 -2
- package/assets/components/ThemeController.tsx +2 -2
- package/assets/components/TimelineView/TimelineView.tsx +4 -2
- package/assets/components/Tooltip/Tooltip.module.css +1 -0
- package/assets/components/_data.ts +1 -1
- package/assets/components/_utils.css +1 -0
- package/assets/components/component-registry.json +30 -1
- package/assets/components/index.ts +1 -0
- package/assets/components/side-effect-css.d.ts +5 -0
- package/assets/components/themeBootScript.ts +7 -1
- package/assets/components/tokens.css +14 -6
- package/assets/prompts/ASSEMBLY.md +4 -0
- package/assets/prompts/CASCADE.md +2 -2
- package/assets/prompts/CATALOG.md +2 -1
- package/assets/prompts/PRINCIPLES.md +4 -8
- package/assets/prompts/RULES.md +19 -1
- package/assets/prompts/SLOTS.md +2 -4
- package/assets/prompts/WORKFLOW_DESIGN.md +0 -4
- package/assets/prompts/axes/icon.md +1 -1
- package/assets/prompts/axes/material.md +4 -4
- package/assets/prompts/axes/motion.md +1 -1
- package/assets/prompts/axes/shape.md +2 -2
- package/assets/prompts/axes/voice.md +1 -1
- package/assets/prompts/components/_variants.md +4 -4
- package/assets/prompts/components/accordion.md +4 -4
- package/assets/prompts/components/ai-message.md +6 -2
- package/assets/prompts/components/attachment-item.md +2 -2
- package/assets/prompts/components/breadcrumb.md +11 -5
- package/assets/prompts/components/button.md +3 -3
- package/assets/prompts/components/callout.md +8 -4
- package/assets/prompts/components/canvas-edge.md +1 -1
- package/assets/prompts/components/canvas-node.md +1 -1
- package/assets/prompts/components/canvas.md +24 -8
- package/assets/prompts/components/card.md +1 -2
- package/assets/prompts/components/chart-bar.md +1 -1
- package/assets/prompts/components/chat-input.md +1 -1
- package/assets/prompts/components/checkbox.md +5 -5
- package/assets/prompts/components/color-field.md +2 -2
- package/assets/prompts/components/command-palette.md +55 -47
- package/assets/prompts/components/context-menu.md +5 -5
- package/assets/prompts/components/date-picker.md +2 -2
- package/assets/prompts/components/drawer.md +17 -3
- package/assets/prompts/components/dropdown-menu.md +3 -3
- package/assets/prompts/components/event-list-item.md +4 -4
- package/assets/prompts/components/file-icon.md +2 -2
- package/assets/prompts/components/gallery-item.md +1 -1
- package/assets/prompts/components/hint.md +3 -3
- package/assets/prompts/components/kanban.md +2 -3
- package/assets/prompts/components/list-item.md +12 -12
- package/assets/prompts/components/menu-item.md +2 -2
- package/assets/prompts/components/message-table.md +4 -4
- package/assets/prompts/components/onboarding.md +3 -3
- package/assets/prompts/components/page-header.md +6 -7
- package/assets/prompts/components/quotation-bar.md +1 -1
- package/assets/prompts/components/select.md +1 -1
- package/assets/prompts/components/shortcut.md +3 -3
- package/assets/prompts/components/sidebar.md +5 -4
- package/assets/prompts/components/social-login-button.md +117 -0
- package/assets/prompts/components/stepper.md +1 -1
- package/assets/prompts/components/tab-strip.md +2 -2
- package/assets/prompts/components/table-row-edit.md +6 -6
- package/assets/prompts/components/table-row-select.md +1 -1
- package/assets/prompts/components/tabs.md +5 -2
- package/assets/prompts/components/textarea.md +1 -1
- package/assets/prompts/components/toast.md +3 -3
- package/assets/prompts/components/tooltip.md +3 -3
- package/assets/prompts/components/topbar.md +1 -1
- package/assets/prompts/design-examples/ai-chat-full-page.png +0 -0
- package/assets/prompts/design-examples/catalog.json +9 -9
- package/assets/prompts/design-examples/sources/ai-chat-full-page/ChatExperience.module.css +37 -1
- package/assets/prompts/design-examples/sources/ai-chat-full-page/ChatExperience.tsx +113 -18
- package/assets/prompts/design-examples/sources/ai-chat-full-page/FullPageChat.tsx +2 -2
- package/assets/prompts/design-examples/sources/ai-chat-full-page/REFERENCE.md +3 -1
- package/assets/prompts/design-examples/sources/ai-chat-full-page/useChatDemo.ts +99 -51
- package/assets/prompts/primitives/scroll.md +1 -1
- package/assets/prompts/recipes/README.md +5 -6
- package/assets/prompts/recipes/meta-line.md +2 -2
- package/assets/prompts/recipes/page-header.md +2 -2
- package/assets/prompts/recipes/section-header.md +1 -1
- package/assets/prompts/themes/_SCHEMA.md +2 -2
- package/assets/prompts/tokens/material.md +5 -2
- package/assets/prompts/tokens/radius.md +1 -1
- package/assets/prompts/use-cases/chat-chat-input.md +382 -74
- package/assets/prompts/use-cases/data-list-item.md +38 -431
- package/assets/prompts/use-cases/feedback-drawer.md +112 -33
- package/assets/prompts/use-cases/overlay-command-palette.md +2004 -0
- package/assets/prompts/use-cases/structure-canvas.md +1016 -0
- package/assets/skills/ovenn-validate/SKILL.md +1 -1
- package/assets/skills/ovenn-validate/scripts/lib/component-usage.js +7 -1
- package/assets/skills/ovenn-validate/scripts/lib/engine.mjs +105 -0
- package/assets/skills/ovenn-validate/scripts/lib/engine.test.mjs +46 -0
- package/assets/skills/ovenn-validate/scripts/lib/source-utils.mjs +5 -3
- package/assets/skills/ovenn-validate/scripts/rules/doc-sync.mjs +28 -5
- package/assets/skills/ovenn-validate/scripts/rules/doc-sync.test.mjs +15 -0
- package/assets/skills/ovenn-validate/scripts/rules/ghost-tokens.mjs +7 -0
- package/assets/skills/ovenn-validate/scripts/rules/hardcoded.mjs +61 -30
- package/assets/skills/ovenn-validate/scripts/rules/memory-rules.mjs +7 -4
- package/assets/skills/ovenn-validate/scripts/rules/memory-rules.test.mjs +3 -0
- package/assets/skills/ovenn-validate/scripts/validate.mjs +8 -136
- package/assets/skills/ovenn-wireframe/SKILL.md +1 -1
- package/bin/ovenn.js +8 -0
- package/package.json +2 -2
- package/src/commands/check.js +70 -0
- package/src/commands/info.js +32 -7
- package/src/commands/init.js +26 -30
- package/src/commands/setup-checks.js +80 -0
- package/src/commands/update.js +90 -18
- package/src/data/ctds-releases.json +1 -0
- package/src/utils/assets.js +5 -0
- package/src/utils/component-usage.js +7 -1
- package/src/utils/design-workflow.js +6 -2
- package/src/utils/doctor.js +7 -1
- package/src/utils/legacy-ctds.js +169 -0
- package/src/utils/managed-assets.js +16 -3
- package/src/utils/route.js +17 -0
- package/src/utils/rules-context.js +91 -0
- package/src/utils/update-transaction.js +16 -3
- package/assets/prompts/FEEDBACK_PROCESS.md +0 -19
- package/assets/prompts/GUIDE.md +0 -307
- package/assets/prompts/MEMORY.md +0 -202
- package/assets/prompts/TEMPLATE_PREVIEWS.md +0 -21
- package/assets/prompts/components/README.md +0 -84
|
@@ -1,22 +1,31 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { useRef, useState } from "react";
|
|
3
|
+
import { useEffect, useRef, useState } from "react";
|
|
4
|
+
import type { ChatAttachment } from "@/components/ovenn/ChatInput";
|
|
4
5
|
import { useDemoTextStream } from "./useDemoTextStream";
|
|
5
6
|
|
|
6
|
-
export type ChatDemoMessage = {
|
|
7
|
+
export type ChatDemoMessage = {
|
|
8
|
+
id: string;
|
|
9
|
+
role: "user" | "assistant";
|
|
10
|
+
text: string;
|
|
11
|
+
isStreaming?: boolean;
|
|
12
|
+
interruption?: "failed" | "stopped";
|
|
13
|
+
attachments?: ChatAttachment[];
|
|
14
|
+
};
|
|
7
15
|
export type ChatDemoThread = {
|
|
8
16
|
id: string;
|
|
9
17
|
title: string;
|
|
10
18
|
draft: string;
|
|
19
|
+
attachments: ChatAttachment[];
|
|
11
20
|
messages: ChatDemoMessage[];
|
|
12
21
|
};
|
|
13
22
|
|
|
14
|
-
export function useChatDemo(getReply: (text: string) => string, getTitle: (text: string) => string) {
|
|
23
|
+
export function useChatDemo(getReply: (text: string, hasAttachments: boolean) => string, getTitle: (text: string) => string, initialMessages: ChatDemoMessage[] = []) {
|
|
15
24
|
const sequence = useRef(1);
|
|
16
25
|
const delivery = useDemoTextStream();
|
|
17
26
|
const pendingThreads = useRef(new Set<string>());
|
|
18
27
|
const [threads, setThreads] = useState<ChatDemoThread[]>([
|
|
19
|
-
{ id: "chat-0", title: "", draft: "",
|
|
28
|
+
{ id: "chat-0", title: initialMessages.length ? getTitle(initialMessages[0].text) : "", draft: "", attachments: [], messages: initialMessages },
|
|
20
29
|
]);
|
|
21
30
|
const [activeId, setActiveId] = useState("chat-0");
|
|
22
31
|
const activeThread = threads.find((thread) => thread.id === activeId) ?? threads[0];
|
|
@@ -25,41 +34,87 @@ export function useChatDemo(getReply: (text: string) => string, getTitle: (text:
|
|
|
25
34
|
setThreads((previous) => previous.map((thread) => thread.id === activeId ? { ...thread, draft } : thread));
|
|
26
35
|
};
|
|
27
36
|
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
if (!
|
|
51
|
-
|
|
37
|
+
const imageUrls = useRef(new Set<string>());
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
const used = new Set<string>();
|
|
40
|
+
for (const thread of threads) {
|
|
41
|
+
for (const attachment of [...thread.attachments, ...thread.messages.flatMap((message) => message.attachments ?? [])]) {
|
|
42
|
+
if (attachment.kind === "image" && attachment.src) used.add(attachment.src);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
for (const url of imageUrls.current) {
|
|
46
|
+
if (used.has(url)) continue;
|
|
47
|
+
URL.revokeObjectURL(url);
|
|
48
|
+
imageUrls.current.delete(url);
|
|
49
|
+
}
|
|
50
|
+
}, [threads]);
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
const urls = imageUrls.current;
|
|
53
|
+
return () => { urls.forEach((url) => URL.revokeObjectURL(url)); urls.clear(); };
|
|
54
|
+
}, []);
|
|
55
|
+
|
|
56
|
+
const attach = (files: File[]) => {
|
|
57
|
+
const attachments = files.map((file): ChatAttachment => {
|
|
58
|
+
const id = `attachment-${sequence.current++}`;
|
|
59
|
+
if (!file.type.startsWith("image/")) return { id, kind: "file", filename: file.name };
|
|
60
|
+
const src = URL.createObjectURL(file);
|
|
61
|
+
imageUrls.current.add(src);
|
|
62
|
+
return { id, kind: "image", src, alt: file.name };
|
|
63
|
+
});
|
|
64
|
+
setThreads((previous) => previous.map((thread) => thread.id === activeId ? {
|
|
65
|
+
...thread, attachments: [...thread.attachments, ...attachments],
|
|
66
|
+
} : thread));
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const removeAttachment = (id: string) => {
|
|
70
|
+
setThreads((previous) => previous.map((thread) => thread.id === activeId ? {
|
|
71
|
+
...thread, attachments: thread.attachments.filter((attachment) => attachment.id !== id),
|
|
72
|
+
} : thread));
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const streamReply = (threadId: string, assistantId: string, prompt: ChatDemoMessage) => {
|
|
76
|
+
pendingThreads.current.add(threadId);
|
|
77
|
+
delivery.start(threadId, getReply(prompt.text, !!prompt.attachments?.length), (text, isStreaming) => {
|
|
78
|
+
if (!isStreaming) pendingThreads.current.delete(threadId);
|
|
79
|
+
setThreads((previous) => previous.map((thread) => thread.id === threadId ? {
|
|
52
80
|
...thread,
|
|
53
|
-
messages: thread.messages.map((message) => message.id === assistantId ? {
|
|
81
|
+
messages: thread.messages.map((message) => message.id === assistantId ? {
|
|
82
|
+
...message, text, isStreaming, interruption: undefined,
|
|
83
|
+
} : message),
|
|
54
84
|
} : thread));
|
|
55
85
|
});
|
|
56
86
|
};
|
|
57
87
|
|
|
88
|
+
const send = (text: string, useDraft = true) => {
|
|
89
|
+
const value = text.trim();
|
|
90
|
+
const attachments = useDraft ? activeThread.attachments : [];
|
|
91
|
+
if ((!value && !attachments.length) || pendingThreads.current.has(activeId)) return;
|
|
92
|
+
const messageId = `${activeId}-${activeThread.messages.length}`;
|
|
93
|
+
const assistantId = `${messageId}-assistant`;
|
|
94
|
+
const prompt: ChatDemoMessage = { id: `${messageId}-user`, role: "user", text: value, attachments };
|
|
95
|
+
const failed = value === "/fail";
|
|
96
|
+
const firstFile = attachments[0];
|
|
97
|
+
const title = value || (firstFile?.kind === "file" ? firstFile.filename : firstFile?.alt) || "";
|
|
98
|
+
setThreads((previous) => previous.map((thread) => thread.id === activeId ? {
|
|
99
|
+
...thread,
|
|
100
|
+
title: thread.title || getTitle(title),
|
|
101
|
+
draft: useDraft ? "" : thread.draft,
|
|
102
|
+
attachments: useDraft ? [] : thread.attachments,
|
|
103
|
+
messages: [...thread.messages, prompt, {
|
|
104
|
+
id: assistantId, role: "assistant", text: "",
|
|
105
|
+
interruption: failed ? "failed" : undefined, isStreaming: !failed,
|
|
106
|
+
}],
|
|
107
|
+
} : thread));
|
|
108
|
+
if (!failed) streamReply(activeId, assistantId, prompt);
|
|
109
|
+
};
|
|
110
|
+
|
|
58
111
|
const stop = () => {
|
|
59
112
|
delivery.stop(activeId);
|
|
60
113
|
pendingThreads.current.delete(activeId);
|
|
61
114
|
setThreads((previous) => previous.map((thread) => thread.id === activeId ? {
|
|
62
|
-
...thread, messages: thread.messages.map((message) => message.isStreaming ? {
|
|
115
|
+
...thread, messages: thread.messages.map((message) => message.isStreaming ? {
|
|
116
|
+
...message, isStreaming: false, interruption: message.text ? undefined : "stopped",
|
|
117
|
+
} : message),
|
|
63
118
|
} : thread));
|
|
64
119
|
};
|
|
65
120
|
|
|
@@ -70,22 +125,22 @@ export function useChatDemo(getReply: (text: string) => string, getTitle: (text:
|
|
|
70
125
|
const targetId = activeId;
|
|
71
126
|
const assistantId = `${targetId}-${index}-assistant`;
|
|
72
127
|
delivery.stop(targetId);
|
|
73
|
-
pendingThreads.current.add(targetId);
|
|
74
128
|
setThreads((previous) => previous.map((thread) => thread.id === targetId ? {
|
|
75
129
|
...thread,
|
|
76
130
|
messages: [
|
|
77
131
|
...thread.messages.slice(0, index),
|
|
78
|
-
{
|
|
132
|
+
{ ...thread.messages[index], text: value },
|
|
79
133
|
{ id: assistantId, role: "assistant", text: "", isStreaming: true },
|
|
80
134
|
],
|
|
81
135
|
} : thread));
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
136
|
+
streamReply(targetId, assistantId, { ...activeThread.messages[index], text: value });
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
const retry = (messageId: string) => {
|
|
140
|
+
if (pendingThreads.current.has(activeId)) return;
|
|
141
|
+
const index = activeThread.messages.findIndex((message) => message.id === messageId && message.interruption);
|
|
142
|
+
const prompt = activeThread.messages[index - 1];
|
|
143
|
+
if (prompt?.role === "user") streamReply(activeId, messageId, prompt);
|
|
89
144
|
};
|
|
90
145
|
|
|
91
146
|
const regenerate = (messageId: string) => {
|
|
@@ -94,28 +149,21 @@ export function useChatDemo(getReply: (text: string) => string, getTitle: (text:
|
|
|
94
149
|
const prompt = activeThread.messages[index - 1];
|
|
95
150
|
if (index < 1 || prompt?.role !== "user") return;
|
|
96
151
|
const targetId = activeId;
|
|
97
|
-
pendingThreads.current.add(targetId);
|
|
98
152
|
setThreads((previous) => previous.map((thread) => thread.id === targetId ? {
|
|
99
153
|
...thread,
|
|
100
154
|
messages: [...thread.messages.slice(0, index), { id: messageId, role: "assistant", text: "", isStreaming: true }],
|
|
101
155
|
} : thread));
|
|
102
|
-
|
|
103
|
-
if (!streaming) pendingThreads.current.delete(targetId);
|
|
104
|
-
setThreads((previous) => previous.map((thread) => thread.id === targetId ? {
|
|
105
|
-
...thread,
|
|
106
|
-
messages: thread.messages.map((message) => message.id === messageId ? { ...message, text, isStreaming: streaming } : message),
|
|
107
|
-
} : thread));
|
|
108
|
-
});
|
|
156
|
+
streamReply(targetId, messageId, prompt);
|
|
109
157
|
};
|
|
110
158
|
|
|
111
159
|
const createThread = () => {
|
|
112
|
-
const empty = threads.find((thread) => thread.messages.length === 0 && !thread.draft && !thread.title);
|
|
160
|
+
const empty = threads.find((thread) => thread.messages.length === 0 && !thread.draft.trim() && !thread.title && !thread.attachments.length);
|
|
113
161
|
if (empty) {
|
|
114
162
|
setActiveId(empty.id);
|
|
115
163
|
return;
|
|
116
164
|
}
|
|
117
165
|
const id = `chat-${sequence.current++}`;
|
|
118
|
-
setThreads((previous) => [...previous, { id, title: "", draft: "", messages: [] }]);
|
|
166
|
+
setThreads((previous) => [...previous, { id, title: "", draft: "", attachments: [], messages: [] }]);
|
|
119
167
|
setActiveId(id);
|
|
120
168
|
};
|
|
121
169
|
|
|
@@ -129,11 +177,11 @@ export function useChatDemo(getReply: (text: string) => string, getTitle: (text:
|
|
|
129
177
|
pendingThreads.current.delete(id);
|
|
130
178
|
const remaining = threads.filter((thread) => thread.id !== id);
|
|
131
179
|
if (!remaining.length) {
|
|
132
|
-
remaining.push({ id: `chat-${sequence.current++}`, title: "", draft: "", messages: [] });
|
|
180
|
+
remaining.push({ id: `chat-${sequence.current++}`, title: "", draft: "", attachments: [], messages: [] });
|
|
133
181
|
}
|
|
134
182
|
setThreads(remaining);
|
|
135
183
|
if (activeId === id) setActiveId(remaining[remaining.length - 1].id);
|
|
136
184
|
};
|
|
137
185
|
|
|
138
|
-
return { threads, activeThread, setActiveId, createThread, renameThread, deleteThread, setDraft, send, stop, edit, regenerate, isStreaming: activeThread.messages.some((message) => message.isStreaming) };
|
|
186
|
+
return { threads, activeThread, setActiveId, createThread, renameThread, deleteThread, setDraft, attach, removeAttachment, send, stop, edit, regenerate, retry, isStreaming: activeThread.messages.some((message) => message.isStreaming) };
|
|
139
187
|
}
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
|
|
47
47
|
### ์คํฌ๋กค๋ฐ ์๊ฐ ์ ์ฑ
(์ ์ญ, globals.css)
|
|
48
48
|
|
|
49
|
-
ํต์ฌ์ **overlay ๋ฐฉ์ ์ ์ฉ** โ ์คํฌ๋กค๋ฐ๋ ์ฝํ
์ธ ์์ ๋จ๊ธฐ๋ง ํ๊ณ **๊ณต๊ฐ์ ๋จน์ง ์๋๋ค**. ๊ณต๊ฐ์ ๋จน๋ "๊ณ ์ ์คํฌ๋กค๋ฐ" ๋ ๋คํฌ ๋ชจ๋์์ OSยท๋ธ๋ผ์ฐ์ ์กฐํฉ์ด ํธ๋ยท์ฝ๋๋ฅผ ํฐ์์ผ๋ก ๊ฐ์ ๋ ๋ํด ๊ทธ ์๋ฆฌ๊ฐ ํ์๊ฒ ๋จ๋ ํจ์ ์ด ์์ด ์๊ตฌ
|
|
49
|
+
ํต์ฌ์ **overlay ๋ฐฉ์ ์ ์ฉ** โ ์คํฌ๋กค๋ฐ๋ ์ฝํ
์ธ ์์ ๋จ๊ธฐ๋ง ํ๊ณ **๊ณต๊ฐ์ ๋จน์ง ์๋๋ค**. ๊ณต๊ฐ์ ๋จน๋ "๊ณ ์ ์คํฌ๋กค๋ฐ" ๋ ๋คํฌ ๋ชจ๋์์ OSยท๋ธ๋ผ์ฐ์ ์กฐํฉ์ด ํธ๋ยท์ฝ๋๋ฅผ ํฐ์์ผ๋ก ๊ฐ์ ๋ ๋ํด ๊ทธ ์๋ฆฌ๊ฐ ํ์๊ฒ ๋จ๋ ํจ์ ์ด ์์ด ์๊ตฌ ๊ธ์ง.
|
|
50
50
|
|
|
51
51
|
- ํ์์: thumb ํฌ๋ช
โ ์คํฌ๋กค๋ฐ ์๋ฆฌ๋ ์์ง๋ง ์ ๋ณด์ (overlay)
|
|
52
52
|
- ๋ถ๋ชจ `:hover` ๋๋ `:focus-within`: thumb์ `--border-strong` ํ์ด๋ ์ธ
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
## ๋ ์ํผ ์์ฑ ๊ท์น
|
|
12
12
|
|
|
13
|
-
๋ ์ํผ ํ์ผ์
|
|
13
|
+
๋ ์ํผ ํ์ผ์ ํ๋กฌํํธ ๋ฌธ์์ **๊ณตํต ๊ณจ๊ฒฉ(`### ์์น` ยท `### Do` ยท `### Don't` ยท `### Fallback` ยท `### ๊ด๋ จ`)**์ ๋ฐ๋ฅด๋, ์๋ ์ถ๊ฐ ์น์
์ ํฌํจํ๋ค.
|
|
14
14
|
|
|
15
15
|
```markdown
|
|
16
16
|
# <๋ ์ํผ ์ด๋ฆ>
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
|
|
61
61
|
- **meta-line separator** โ ์ด๊ธฐ ๋ ์ํผ์ `width:1px / height:0.75em`๊ฐ check_tokens hook์์ ๋ฆฌํฐ๋ด๋ก ์ฐจ๋จ๋จ โ `border-left: 1px solid var(--border)` + `align-self: stretch`๋ก ์์
|
|
62
62
|
- **๋ฐฐ๊ฒฝยท๊ฒฝ๊ณ ์กฐํฉ** โ [[PRINCIPLES]] ยง5b์ ๋ฏธ์ธํ ํ์ ์ ์ฐจ์ด ๊ธฐ์ค์ ๋ฐ๋ฅธ๋ค. ์์ ํฌ๋ช
ํ border๋ ๋ณด์ด๋ ์คํธ๋กํฌ๊ฐ ์๋๋ฏ๋ก ๋์ ์ฌ์ฉ ์๋ฐ์ผ๋ก ๋ณด์ง ์๋๋ค. ๋ถํ์ํ ํ
๋๋ฆฌ ์ ์ธ์ ์๋ตํ๋ค.
|
|
63
|
-
- **๋ ์ง ํฌ๋งท** โ ์ด๊ธฐ ์์๋ค์ "10. 13." ์ซ์ ๋ ์ง๊ฐ
|
|
64
|
-
- **Callout ์ ๋ น ์ฐธ์กฐ** โ `
|
|
63
|
+
- **๋ ์ง ํฌ๋งท** โ ์ด๊ธฐ ์์๋ค์ "10. 13." ์ซ์ ๋ ์ง๊ฐ ๋ฃฐ ์๋ฐ โ "10์ 13์ผ" ํ๊ธฐ๋ก ์์
|
|
64
|
+
- **Callout ์ ๋ น ์ฐธ์กฐ** โ `components/banner`๊ฐ ์ ๋ น โ `recipes/page-banner`๋ก ๊ต์ฒด
|
|
65
65
|
- **์์ด์ฝ ์ด๋ฆ misname** โ ๋ ์ํผ ์์์ `name="chevron-right" / "refresh" / "share" / "code" / "shield" / "checklist" / "terminal"` ์ค ์ด๋ ๊ฒ๋ Ovenn Icon ์ธํธ์ **๋ฑ์ฌ๋์ง ์์**. ๊ฐ๊ฐ `caret-right / arrow-clockwise / share-network / brackets-square / shield-check / clipboard-text / brackets-square`๋ก ๊ต์ฒด. **๋ ์ํผ์ "์์ด์ฝ ์ด๋ฆ์ `web/components/Icon/Icon.tsx`์ phosphor ์ด๋ฆ ๋ ์ง์คํธ๋ฆฌ์์ ์ฐพ์ ๊ฒ" ๊ฐ์ด๋ ์ถ๊ฐ ํ์**
|
|
66
66
|
- **Badge API prop ์ค๋ฅ** โ ๋ ์ํผ๊ฐ `tone="warning"`์ ์ผ์ง๋ง ์ค์ API๋ `status="warning"` + `variant="soft"` ์กฐํฉ. `tone`์ Callout prop. ๋ ์ํผ ์์ ํ์
|
|
67
67
|
- **Vendor prop ์ ์ธ ํ์ธ ๊ณต๋ฐฑ** โ ASSEMBLY ยง1 2๋จ๊ณ "๊ฐ์ฅ ๊ฐ๊น์ด ๋ฒค๋ anatomy ๋ฒ ๋ผ๊ธฐ"๋ API๊น์ง ํ์ธํ์ง ์์ผ๋ฉด ๋ณต์ ๊ฐ ๊นจ์ง. ASSEMBLY์ **"vendor propยทํ์
์ ์ธ์ ๋ฐ๋์ ํ์ธ"** ๋จ๊ณ ์ถ๊ฐ ํ์
|
|
@@ -80,11 +80,11 @@
|
|
|
80
80
|
- **์น์
header๊ฐ "ํต์ง ๋ผ๋ฒจ"๋ง ์์ผ๋ฉด ์ด์** โ h2๋ง ๋ ์๊ณ countยท์ค๋ช
ยทeyebrow ์์ผ๋ฉด ์น์
๋ผ๋ฆฌ ๊ตฌ๋ณ ์ ๋จ. count badge ๋๋ ์ค๋ช
1์ค **์๋ฏธ ์๋ ์๋ฆฌ๋ฉด** ๋ฃ๊ธฐ
|
|
81
81
|
|
|
82
82
|
**๋ธ๋ผ์ฐ์ ๋ ๋ 3์ฐจ ํผ๋๋ฐฑ (์ ์ ์ก์ ๊ฒ์ฆ, 2026-10-14)** โ โ
๋ ์ด์์ ์ ๋ฉด ๊ต์ฒด:
|
|
83
|
-
- **"margin-top differential rhythm"์ ํ๋ฆฐ ๊ฒฐ๋ก ์ด์์** โ 2์ฐจ์์ ์๋ํ `A + B { margin-top: ... }`๋ ๊ทธ๋ฃน ์ค๊ณ๊ฐ ํ๋ ธ๋ค๋ ์ ํธ์์. ์ ๋ต์ **wrapper ์ถ๊ฐ + ๊ทธ๋ฃน๋ณ flex column + gap**. ๋ ์ด์์ 1์์น์ "**๊ด๋ จ์๋ ๊ฒ๋ผ๋ฆฌ ๋ฌถ๊ธฐ**" โ ์ด๊ฒ **padding/margin์ผ๋ก ๊ฐ๊ฒฉ ์กฐ์ ๋ณด๋ค ์ ํ**ํด์ผ ํจ. โ ASSEMBLY ยง2a ์ ๋ฉด ์ฌ์์ฑ,
|
|
83
|
+
- **"margin-top differential rhythm"์ ํ๋ฆฐ ๊ฒฐ๋ก ์ด์์** โ 2์ฐจ์์ ์๋ํ `A + B { margin-top: ... }`๋ ๊ทธ๋ฃน ์ค๊ณ๊ฐ ํ๋ ธ๋ค๋ ์ ํธ์์. ์ ๋ต์ **wrapper ์ถ๊ฐ + ๊ทธ๋ฃน๋ณ flex column + gap**. ๋ ์ด์์ 1์์น์ "**๊ด๋ จ์๋ ๊ฒ๋ผ๋ฆฌ ๋ฌถ๊ธฐ**" โ ์ด๊ฒ **padding/margin์ผ๋ก ๊ฐ๊ฒฉ ์กฐ์ ๋ณด๋ค ์ ํ**ํด์ผ ํจ. โ ASSEMBLY ยง2a ์ ๋ฉด ์ฌ์์ฑ, ๋ฉ๋ชจ๋ฆฌ ๊ต์ฒด (๊ธฐ์กด differential rhythm ํ๊ธฐ)
|
|
84
84
|
- **์ ๋ น ํ ํฐ `--font-medium` โ ๋ชจ๋ ํ์ดํ ์์์ ์จ์ ์์ธ** โ ์ค์ ํ ํฐ์ `--font-weight-medium`. ๋ ์ํผ๋ค์ด ์ ๋ถ `var(--font-medium)` ์ผ๊ณ **check_tokens hook์ด ์ ๋ น ํ ํฐ์ ๋ชป ์ก์** (๋ฆฌํฐ๋ด๋ง ์ก์). ์กฐ์ฉํ ์์๋ 400์ผ๋ก ๋ ๋๋์ด h1ยทh2ยทcardTitle ์ ๋ถ ์์. โ ASSEMBLY ยง1 ์ฒดํฌ๋ฆฌ์คํธ "font-weight ํ ํฐ ์ด๋ฆ ์ ํ์ฑ" ์ถ๊ฐ, ์ ์ ๊ต์ฒด
|
|
85
85
|
- **์น์
header์ `margin-bottom`์ ํ๋ฆผ** โ section ์์ฒด๋ฅผ flex column + gap์ผ๋ก ๋ฌถ์ผ๋ฉด header์ body๊ฐ ์์ฐ์ค๋ฝ๊ฒ ๊ฐ๊ฒฉ์ ๊ฐ์ง. margin-bottom์ ๊ทธ๋ฃน ์ค๊ณ ์คํจ์ ํ์
|
|
86
86
|
- **3-tier ๋ฆฌ๋ฌ ํ๋ฆฝ**: ๊ทธ๋ฃน ์ `space-2~3` / ์น์
๋ฐ๋ณต `space-6` / ๊ทธ๋ฃน ์ฌ์ด `space-10`. ์ฝ์ ๋ฆฌ๋ฌ ๊ธฐ์ค
|
|
87
|
-
- **`<section>`
|
|
87
|
+
- **`<section>` ์ฌ๋ฐฑ ํจ์ ์ ์ **: 80px ์ฌ๋ฐฑ์ Ovenn ๋ฌธ์ ์ฌ์ดํธ์ `.content section` ๊ท์น์ด์๊ณ ์ค์น ํ๋ก์ ํธ์๋ ์๋ค. ์๋ฏธ์ ๋ง๋ ํ๊ทธ๋ฅผ ์ฐ๊ณ , ํ๊ทธ ์ ํ์ ์ฌ๋ฐฑ์ wrapper class๋ก ์ขํ๋ค([[tokens/spacing]]).
|
|
88
88
|
- **๊ทธ๋ฃน ์์์๋ "๋ฏธ๋ ๊ทธ๋ฃน" ํ์** โ introGroup ์ bannerโheaderโhint ์
์ `space-3` ํ๋๋ก ํต์ผํ๋๋ "๊ฐ์ ๊ฑฐ๋ฆฌ๋ก ๋ญ์ณ" ์ฑ๊ฒฉ ๊ตฌ๋ถ ์ ๋จ. **banner(๋ฉํ)์ headerBlock(ํ์ดํ+์ค๋ช
)**์ ๋ถ๋ฆฌํ๋ ์ค๊ฐ wrapper(headerBlock) ์ถ๊ฐ โ introGroup gap์ `space-6`๋ก ๋ฒ๋ฆฌ๊ณ headerBlock ์์ `space-2` ์ข๊ฒ. ๊ทธ๋ฃน ์ค๊ณ๋ **์ฌ๊ท์ **์ด์ด์ผ ํจ.
|
|
89
89
|
- **3-tier ๋ฆฌ๋ฌ ์์น ์ํฅ** โ ์ด๊ธฐ "์น์
๋ฐ๋ณต space-6 / ๊ทธ๋ฃน space-10"์ ์ค์ธก์์ ์ข์์. "์น์
โ ์น์
๋ฐ๋ณต"๊ณผ "๊ทธ๋ฃน โ ๊ทธ๋ฃน"์ ๋ ๋ค `space-20` (80px) ์์ค์ด ์์ฐ์ค๋ฌ์. space-6์ "์น์
์ ๋ธ๋ก ๋จ์" ๋๋ "๊ฐ์ ๊ทธ๋ฃน ์ ์ฑ๊ฒฉ ๋ค๋ฅธ ์์"์๋ง.
|
|
90
90
|
- **"๊ฐ๊น์ด ๊ด๊ณ์ผ์๋ก ๋ ์ข๊ฒ" ์์น ํ๋ฆฝ (ASSEMBLY ยง2a ์ฌ์์ฑ)** โ ์ ์ ์ง์ : section headerโbody `space-2` + cardList ์์ดํ
๊ฐ `space-2`๊ฐ **๊ฐ์ ๊ฐ**์ด๋ผ "ํ์ดํ๊ณผ ์์ดํ
์ด ๊ฐ์ ๋ ๋ฒจ"๋ก ๋ญ์ณ ๋ณด์. **์ธ์ ํ ๋ ๋ ๋ฒจ์ ๋ฐ๋์ ํ ๋จ๊ณ ์ด์ ์ฐจ์ด**๊ฐ ๋์ผ ์๊ณ ์ฑ๋ฆฝ. ์์ : ์์ดํ
๊ฐ `space-1`, ์น์
headerโbody `space-3`. ๊ฐ์ ์์น์ผ๋ก headerBlock gap๋ `space-2`โ`space-3` ์ํฅ (pageHeader ์ titleโdescription์ด `space-1`์ด๋ฏ๋ก)
|
|
@@ -100,5 +100,4 @@
|
|
|
100
100
|
## ๊ด๋ จ
|
|
101
101
|
|
|
102
102
|
- [[ASSEMBLY]] โ ์กฐ๋ฆฝ ์๊ณ ๋ฆฌ์ฆ. ๋ ์ํผ๋ ๊ทธ 3๋จ๊ณ์์ ์ฐธ์กฐ๋๋ค
|
|
103
|
-
- [[GUIDE]] โ ๊ณตํต ๊ณจ๊ฒฉยทN/A ๊ท์น. ๋ ์ํผ ํ์ผ๋ ์ด๋ฅผ ๋ฐ๋ฅธ๋ค
|
|
104
103
|
- [[components/_variants]] โ ์ญํ ร variant ๋งคํ. ๋ ์ํผ ๋ด vendor ์ ํ ์ ์ฐธ์กฐ
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
- separator๋ `aria-hidden="true"` โ ์คํฌ๋ฆฐ๋ฆฌ๋์์ ์ฝํ์ง ์๊ฒ
|
|
19
19
|
- label ์ค ํ๋๊ฐ **๊ฐ**(์ฌ๋ ์ด๋ฆยท์๊ฐ)์ด๊ณ ๋๋จธ์ง๊ฐ **๊ณ ์ ๋ผ๋ฒจ**์ด๋ฉด, ๊ฐ๋ง `color: var(--fg)` (์ด์ง ์ฌ๋ฆผ) โ ๋จ ํค ์ฐจ์ด๋ 1๋จ๊ณ ์ด๋ด
|
|
20
20
|
- ์ ์ฒด wrapper: `display: flex; align-items: center; gap: var(--space-2);`
|
|
21
|
-
- ๋ ์งยท์๊ฐ์
|
|
21
|
+
- ๋ ์งยท์๊ฐ์ ์ ๋ต ์ค ํ๋๋ก (์๋์ด "12๋ถ ์ " / "10์ 13์ผ") โ ์ซ์ ํจํด("10. 13") ๊ธ์ง
|
|
22
22
|
|
|
23
23
|
### Don't
|
|
24
|
-
-
|
|
24
|
+
- ๋ฌธ์ ๊ตฌ๋ถ์๋ ์ฐ์ง ์๋๋ค([[RULES]] ยง3). hairline์ผ๋ก๋ง ๋๋๋ค.
|
|
25
25
|
- [HARD] separator๋ฅผ label ์๋ค์๋ ๋ฃ์ง ์๋๋ค. **"์ฌ์ด์๋ง"**. ๋์ ๋๋ ์ฒ์์ ๋๋ฉด ๋๊ธด ๋๋
|
|
26
26
|
- [HARD] label ํ๋ํ๋๋ฅผ Badge๋ก ์ฐ์ง ์๋๋ค โ ๋ฉํ ๋ผ์ธ์ ํค์ด ์กฐ์ฉํด์ผ ํ๋ค. Badge๋ ์ํยท์นดํ
๊ณ ๋ฆฌ **ํ์**๊ฐ ํ์ํ ๋๋ง, ๋ฉํ ๋ผ์ธ์ ์์ด์ง ์๊ฒ ๋ถ๋ฆฌ
|
|
27
27
|
- [SOFT] 3๊ฐ ๋์ผ๋ฉด ๋ฉํ ๋ผ์ธ์ด ์๋๋ผ **๋ณ๋ ๋ธ๋ก**์ด ๋ง๋์ง ์ฌ๊ฒํ . 4๊ฐ ์ด์์ ์ฌ์ฉ์๊ฐ ๋ค ๋ชป ์ฝ์
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
- eyebrow์ title ์ฌ์ด: `space-1`
|
|
16
16
|
- title๊ณผ description ์ฌ์ด: `space-2`
|
|
17
|
-
- **๋ธ๋ก ์ ์ฒด ์๋ (๋ค์ ์น์
๊น์ง)์ ๊ฐ๊ฒฉ์ ์์ wrapper ์ `gap` ์ด ๋ด๋น**. `space-6` (์ฑ ๋ฆฌ๋ฌ) / `space-10` (๋๋ฉ ๋ฆฌ๋ฌ). PageHeader ์์ฒด๋ `margin-bottom` ์ ๊ฑธ์ง
|
|
17
|
+
- **๋ธ๋ก ์ ์ฒด ์๋ (๋ค์ ์น์
๊น์ง)์ ๊ฐ๊ฒฉ์ ์์ wrapper ์ `gap` ์ด ๋ด๋น**. `space-6` (์ฑ ๋ฆฌ๋ฌ) / `space-10` (๋๋ฉ ๋ฆฌ๋ฌ). PageHeader ์์ฒด๋ `margin-bottom` ์ ๊ฑธ์ง ์๋๋ค.
|
|
18
18
|
- actions๋ title๊ณผ ๊ฐ์ row โ `align-items: center`, `flex: 1 1 auto` title / `flex: 0 0 auto` actions
|
|
19
19
|
|
|
20
20
|
### Do
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
### Don't
|
|
28
28
|
- [HARD] h1 ์๋ `margin-bottom`์ ์์(h1)์ด ๊ฑธ๊ณ **๋์์** ๋ถ๋ชจ wrapper๋ gap์ ๊ฑธ์ง ์๋๋ค โ ์ด์ค ์ฌ๋ฐฑ ([[tokens/spacing]] Don't)
|
|
29
29
|
- [HARD] h1์ `font-semibold`/`font-bold`๋ก ์ฐ์ง ์๋๋ค โ [[tokens/typography]] font weight cap
|
|
30
|
-
-
|
|
30
|
+
- uppercase + letter-spacing ์กฐํฉ์ ์ฐ์ง ์๋๋ค(๊ธฐ๋ณธ๊ฐ).
|
|
31
31
|
- [SOFT] eyebrow ์์ด breadcrumb๋ง Topbar leading์ ๋๋ ํจํด์ ํผํ๋ค โ ํ์ด์ง ์๋ณ์ด shell๋ก ์๋ค. Topbar leading์๋ workspace/section๋ง, ํ์ด์ง ์ด๋ฆ์ body๋ก
|
|
32
32
|
|
|
33
33
|
### Fallback
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
- ์ก์
์ด 2๊ฐ ์ด์์ด๋ฉด ์๋ก ๊ฐ gap `space-1`
|
|
25
25
|
|
|
26
26
|
### Don't
|
|
27
|
-
-
|
|
27
|
+
- Ovenn ์ปดํฌ๋ํธ๋ `section`ยท`article` ๊ฐ์ ํ๊ทธ์ ์ฌ๋ฐฑ์ ๊ฑธ์ง ์์ผ๋ฏ๋ก ์๋ฏธ์ ๋ง๋ ํ๊ทธ๋ฅผ ์ด๋ค. ํ๋ก์ ํธ ์ ์ญ CSS๊ฐ ํ๊ทธ ์ ํ์์ ์ฌ๋ฐฑ์ ๊ฑธ์๋ค๋ฉด ๊ทธ ๊ท์น์ wrapper class ์์ผ๋ก ์ขํ๋ค([[tokens/spacing]]).
|
|
28
28
|
- [HARD] h2๋ฅผ `font-semibold`/`font-bold`๋ก ์ฐ์ง ์๋๋ค โ [[tokens/typography]] font weight cap
|
|
29
29
|
- [HARD] h2 ์๋์ `border-bottom`์ ๊น์ง ์๋๋ค. ์น์
๋ถ๋ฆฌ๋ **gap**์ด ๋ด๋น. ์ + ๊ณต๊ฐ์ ์ด์ค ๋ถ๋ฆฌ
|
|
30
30
|
- [HARD] ์น์
๋ผ๋ฆฌ `space-6` ์ด์ gap์ผ๋ก ๋ถ๋ฆฌํ์ง ์๋๋ค โ ๊ฐ ์น์
์ด border/๋ฐฐ๊ฒฝ์ผ๋ก ๋ถ๋ฆฌ๋ผ ์์ผ๋ฉด ๊ณผํ ๊ณต๊ฐ์ "๊ตฌ์กฐ๊ฐ ๋๊ธด" ๊ฒฐ๊ณผ ([[tokens/spacing]] Don't)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Theme Schema
|
|
2
2
|
|
|
3
3
|
Theme ๋ ์ด์ด ์์ฒด์ ๊ท์น. ๊ฐ๋ณ Theme ๋ฌธ์๋ ์ด ์คํค๋ง๋ฅผ ๋ฐ๋ฅธ๋ค.
|
|
4
|
-
[[PRINCIPLES]]
|
|
4
|
+
[[PRINCIPLES]]์ ์ ์ ๋ฅผ ๋ชจ๋ ์ด์ด๋ฐ๋๋ค.
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -31,7 +31,7 @@ Theme์ **6๊ฐ ์ถ์ preset ๋ฌถ์ + ์ถ ๋ฐ ์ฐ๋ฌธ ๋ ์ด์ด**๋ค. "๋ฃฉ์
|
|
|
31
31
|
์ถ 6๊ฐ ์ค preset ์ ํ์ด ์ ๋งคํ๋ฉด ๊ฐ ์ถ์ ๊ธฐ๋ณธ๊ฐ([[axes/mode]] ๋ฑ ์ฐธ๊ณ )์ผ๋ก ๋๋ค. ๊ทธ๋๋ ์ ๋งคํ๋ฉด ์ฌ์ฉ์์๊ฒ ํ์ธ.
|
|
32
32
|
|
|
33
33
|
### ๊ด๋ จ
|
|
34
|
-
-
|
|
34
|
+
- Theme๋ ํ๋กฌํํธ ๋ฌธ์์ ๊ณตํต ๊ณจ๊ฒฉ(`### ์์น` ยท `### Do` ยท `### Don't` ยท `### Fallback` ยท `### ๊ด๋ จ`)์ ๋ฐ๋ฅด๊ณ , ์๋ "Theme ์ ์ฉ ์ถ๊ฐ ํญ๋ชฉ"์ ๋ํ๋ค.
|
|
35
35
|
- [[themes/_TEMPLATE]] โ ๋ณต์ฌํด์ ์ฐ๋ Theme skeleton.
|
|
36
36
|
|
|
37
37
|
---
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
|---|---|
|
|
11
11
|
| `--surface-glass-bg` | Mode๋ณ tint์ ๋ถํฌ๋ช
๋๋ก ํฉ์ฑํ ๋ค๋ ํ๋ฉด |
|
|
12
12
|
| `--surface-glass-border` | `--fg` ๋ผ์ดํธ5%/๋คํฌ10% + `--bg`, `--hairline` ๋๊ป |
|
|
13
|
+
| `--surface-glass-field-opacity` | ๋ฐ์ค ์
๋ ฅ ์ปจํธ๋กค๊ณผ ๋ฉ๋ด ๋ฐฐ๊ฒฝ์ ๋ถํฌ๋ช
๋45% |
|
|
14
|
+
| `--surface-glass-field-bg/filled-bg/active-bg` | ๊ธฐ๋ณธยท์ฑ์ยทํ์ฑ ์
๋ ฅ ๋ฐฐ๊ฒฝ์45%๋ก ํฉ์ฑ |
|
|
13
15
|
| `--surface-glass-blur` | 8px backdrop blur |
|
|
14
16
|
| `--surface-glass-radius` | `--radius-lg` |
|
|
15
17
|
| `--surface-glass-selected-bg` | `--fg` 8% + `--bg` 92% |
|
|
@@ -21,12 +23,13 @@
|
|
|
21
23
|
| ๋ค๋ ์์ | 72% | 40% | 8px | dim/blur ModalยทDrawer |
|
|
22
24
|
| CommandPalette | 70% | 70% | 8px | ์ ์ญ ๋ช
๋ น ์ฐฝ |
|
|
23
25
|
| ์ผ๋ฐ ๋ค๋ ์์ | 80% | 58% | 16px | DatePicker, transparent Modalยทnone Drawer |
|
|
26
|
+
| ๋ฐ์ค ์
๋ ฅ ์ปจํธ๋กค | 45% | 45% | ๋ณ๋ ์ถ๊ฐ ์์ | InputยทTextareaยทSelect/Combobox ํธ๋ฆฌ๊ฑฐ |
|
|
24
27
|
| ColorPicker | 42% | 42% | 10px | ์์ํ/์
๋ ฅ์ ์ฝ์ ์ ์๊ฒ ์ ์ง, ์ธ๊ณฝ์ 5% ์ค์ฑ ๊ฒฝ๊ณ |
|
|
25
|
-
| ๋ฉ๋ด |
|
|
28
|
+
| ๋ฉ๋ด | 45% | 45% | 16px | ContextMenuยทDropdownMenuยทSelect์ ๊ณตํต ํ๋ฉด |
|
|
26
29
|
|
|
27
30
|
๋คํฌ๋ `--surface-glass-tint`๋ก ์ ๊ฒฝ4%๋ฅผ ๋ฐฐ๊ฒฝ์ ์๊ณ , `--surface-glass-border-contrast`๋ฅผ10%๋ก ๋์ฌ ๊ฒ์ ๋ฐํ๊ณผ ํ๋ฉด์ ๊ฒฝ๊ณ๋ฅผ ๊ตฌ๋ถํ๋ค. ๋ผ์ดํธ๋ ๊ฐ๊ฐ0%ยท5%๋ค. ๋ถํฌ๋ช
๋๋ `--surface-glass-opacity`ยท`--surface-glass-floating-opacity`์ ์ ์ฅํ๋ฉฐ, ๋ก์ปฌ Mode/Material scope๋ ์ด ๊ฐ์ ๋ฐ๋ฅธ๋ค.
|
|
28
31
|
|
|
29
|
-
๋ค๋๊ฐ ์๋ ํ๋ฉด์ ๋ฐฐ๊ฒฝ์ ์ยทํ
์คํธ๊ฐ ์ง์ ๊ฐ์ญํ๋ฏ๋ก ๋ถํฌ๋ช
๋์ ๋ธ๋ฌ๋ฅผ ๋์ธ๋ค. `--surface-glass-floating-bg`ยท`--surface-glass-floating-blur`์ ๊ฐ์ ์ ์ฅํ๊ณ `--material-floating-bg/filter`๋ก ํ์ฑํํ๋ค.
|
|
32
|
+
๋ค๋๊ฐ ์๋ ํ๋ฉด์ ๋ฐฐ๊ฒฝ์ ์ยทํ
์คํธ๊ฐ ์ง์ ๊ฐ์ญํ๋ฏ๋ก ๋ถํฌ๋ช
๋์ ๋ธ๋ฌ๋ฅผ ๋์ธ๋ค. `--surface-glass-floating-bg`ยท`--surface-glass-floating-blur`์ ๊ฐ์ ์ ์ฅํ๊ณ `--material-floating-bg/filter`๋ก ํ์ฑํํ๋ค. ColorPicker ์์ํ๊ณผ ์์ ์์น ์
๋ ฅ์ ๋ถํฌ๋ช
ํ๊ฒ ์ ์งํ๋ค. ๋ฐ์ค ์
๋ ฅ ์ปจํธ๋กค์ `--material-field-bg/filled-bg/active-bg`๋ก ํ์ฑํํ๋ฉฐ Solidยท๋ก์ปฌ Solidยทํฌ๋ช
๋ ๊ฐ์์์๋ ๊ธฐ์กด ๋ถํฌ๋ช
ํ๋ฉด์ผ๋ก ๋์๊ฐ๋ค. line๊ณผ readOnly์ ํฌ๋ช
๋ฐฐ๊ฒฝ์ ๊ทธ๋๋ก ์ ์งํ๋ค.
|
|
30
33
|
|
|
31
34
|
### ์ฌ์ฉ
|
|
32
35
|
- ์ ์ญ ์ฌ์ง ์ ํ์ [[axes/material]]์ `solid | glass`๋ฅผ ์ฌ์ฉํ๋ค. `--surface-glass-*`๋ ์ฌ์ง ์๋ณธ์ด๋ฉฐ, ํ์ฑ ํ๋ฉด์ `--material-*` ๋ณ์นญ์ ์ฐธ์กฐํ๋ค.
|
|
@@ -6,7 +6,7 @@ Tooltip < Button < Card < Modal ์์๋ ์ด๋ค ํ๋ก์ ํธ์์๋ ์ ์ง.
|
|
|
6
6
|
|
|
7
7
|
๋ชจ์๋ฆฌ ํํ๋ `corner-shape: var(--corner-shape)`๋ก ์ฐ๊ฒฐํ๋ค. ๋ฐ๊ฒฝ์ ์์ํ๋ ๋ด๋ถ ํ๋ฉด์ `corner-shape: inherit`๋ ํจ๊ป ์ด๋ค. ๋ฏธ๋ CheckboxยทBadge๋ `corner-shape-mini`๋ฅผ ์ฌ์ฉํ๋ค. Switch๋ ์์ฒด soft/crisp variant์ ๋ก์ปฌ ํ ํฐ์ ์ ์งํ๋ฉฐ ์ ์ญ Shape์ ๋
๋ฆฝ์ ์ด๋ค.
|
|
8
8
|
|
|
9
|
-
Squircle ๋ณด์ ๋ฐฐ์จ์ `radius-scale`(standard
|
|
9
|
+
Squircle ๋ณด์ ๋ฐฐ์จ์ `radius-scale`(standard 1.75, soft 1.72, pill 1.8, crisp 1)์ด๋ค. standard์ ๊ธฐ์ค ๋ฐ๊ฒฝ 10% ์ถ์์ soft์ ํฐ ๋จ๊ณ ์ถ์๋ ๋ฐฐ์จ ์ด์ ๊ธฐ์ค๊ฐ์ ์ ์งํ๋ค. none/full์ ๋ฐฐ์จ์ ์ ์ฉํ์ง ์๋๋ค. soft์ ์ก์
์ปจํธ๋กค radius-pill-sm/md/lg๋ ํด๋น control ๋์ด์ 44%๋ฅผ ์ํ์ผ๋ก ๋์ด pill์ฒ๋ผ ์ฐจ๋ ๊ฒ์ ๋ง๋๋ค. ์์ ๋ถํ์ ๋์ด ์ ๋ฐ ์ ๊ทํ ๋๋ฌธ์ ๊ฐ์ ๋ชจ์์ด ๋ ์ ์์ผ๋ฏ๋ก ์ค์ ํ๋ฉด์์ ์ถ๋ณ ๊ณก์ ์ฐจ์ด๋ฅผ ํ์ธํ๋ค.
|
|
10
10
|
|
|
11
11
|
- ํ๋ฉด ์ SVG ์ธ๊ณฝ์ ์ CSS์ radiusยทcorner-shape์์ ๊ฐ์ ๊ฒฝ๋ก๋ฅผ ์์ฑํ๋ค. ๋ณ๋ rect rx๋ก ์ผ๋ฐ ์ํธ๋ฅผ ๊ฒน์น๋ฉด squircle๊ณผ ์ด๊ธ๋๋ค. border/outline ๊ฐ์ ๋์ผ ์์์ ๋ค์ดํฐ๋ธ ๊ฒฝ๊ณ์ ๊ตฌ๋ถํ๋ค.
|
|
12
12
|
|