@agent-native/core 0.41.1 → 0.43.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 +17 -56
- package/dist/action.d.ts +13 -1
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js.map +1 -1
- package/dist/agent/production-agent.d.ts +8 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +93 -0
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/cli/app-skill.d.ts +16 -0
- package/dist/cli/app-skill.d.ts.map +1 -1
- package/dist/cli/app-skill.js +33 -3
- package/dist/cli/app-skill.js.map +1 -1
- package/dist/cli/pr-visual-recap-workflow.d.ts +1 -1
- package/dist/cli/pr-visual-recap-workflow.d.ts.map +1 -1
- package/dist/cli/pr-visual-recap-workflow.js +1 -1
- package/dist/cli/pr-visual-recap-workflow.js.map +1 -1
- package/dist/cli/recap.d.ts.map +1 -1
- package/dist/cli/recap.js +38 -16
- package/dist/cli/recap.js.map +1 -1
- package/dist/cli/skills.d.ts +30 -3
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +180 -114
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +2 -2
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +172 -5
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/blocks/index.d.ts +11 -0
- package/dist/client/blocks/index.d.ts.map +1 -1
- package/dist/client/blocks/index.js +11 -0
- package/dist/client/blocks/index.js.map +1 -1
- package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts +19 -0
- package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/AnnotatedCodeBlock.js +6 -58
- package/dist/client/blocks/library/AnnotatedCodeBlock.js.map +1 -1
- package/dist/client/blocks/library/ApiEndpointBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/ApiEndpointBlock.js +116 -7
- package/dist/client/blocks/library/ApiEndpointBlock.js.map +1 -1
- package/dist/client/blocks/library/DataModelBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/DataModelBlock.js +75 -9
- package/dist/client/blocks/library/DataModelBlock.js.map +1 -1
- package/dist/client/blocks/library/DiffBlock.d.ts +1 -1
- package/dist/client/blocks/library/DiffBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/DiffBlock.js +265 -39
- package/dist/client/blocks/library/DiffBlock.js.map +1 -1
- package/dist/client/blocks/library/FileTreeBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/FileTreeBlock.js +27 -4
- package/dist/client/blocks/library/FileTreeBlock.js.map +1 -1
- package/dist/client/blocks/library/HighlightedCode.d.ts +1 -1
- package/dist/client/blocks/library/HighlightedCode.js +1 -1
- package/dist/client/blocks/library/HighlightedCode.js.map +1 -1
- package/dist/client/blocks/library/JsonExplorerBlock.js +1 -1
- package/dist/client/blocks/library/JsonExplorerBlock.js.map +1 -1
- package/dist/client/blocks/library/MermaidBlock.js +1 -1
- package/dist/client/blocks/library/MermaidBlock.js.map +1 -1
- package/dist/client/blocks/library/annotation-rail.d.ts +115 -0
- package/dist/client/blocks/library/annotation-rail.d.ts.map +1 -0
- package/dist/client/blocks/library/annotation-rail.js +139 -0
- package/dist/client/blocks/library/annotation-rail.js.map +1 -0
- package/dist/client/blocks/library/api-endpoint.config.d.ts +31 -6
- package/dist/client/blocks/library/api-endpoint.config.d.ts.map +1 -1
- package/dist/client/blocks/library/api-endpoint.config.js +30 -6
- package/dist/client/blocks/library/api-endpoint.config.js.map +1 -1
- package/dist/client/blocks/library/callout.config.d.ts +29 -0
- package/dist/client/blocks/library/callout.config.d.ts.map +1 -0
- package/dist/client/blocks/library/callout.config.js +33 -0
- package/dist/client/blocks/library/callout.config.js.map +1 -0
- package/dist/client/blocks/library/callout.d.ts +20 -0
- package/dist/client/blocks/library/callout.d.ts.map +1 -0
- package/dist/client/blocks/library/callout.js +61 -0
- package/dist/client/blocks/library/callout.js.map +1 -0
- package/dist/client/blocks/library/checklist.d.ts.map +1 -1
- package/dist/client/blocks/library/checklist.js +3 -3
- package/dist/client/blocks/library/checklist.js.map +1 -1
- package/dist/client/blocks/library/code.d.ts.map +1 -1
- package/dist/client/blocks/library/code.js +32 -15
- package/dist/client/blocks/library/code.js.map +1 -1
- package/dist/client/blocks/library/columns.d.ts.map +1 -1
- package/dist/client/blocks/library/columns.js +56 -35
- package/dist/client/blocks/library/columns.js.map +1 -1
- package/dist/client/blocks/library/data-model.config.d.ts +17 -0
- package/dist/client/blocks/library/data-model.config.d.ts.map +1 -1
- package/dist/client/blocks/library/data-model.config.js +15 -0
- package/dist/client/blocks/library/data-model.config.js.map +1 -1
- package/dist/client/blocks/library/decision.config.d.ts +37 -0
- package/dist/client/blocks/library/decision.config.d.ts.map +1 -0
- package/dist/client/blocks/library/decision.config.js +32 -0
- package/dist/client/blocks/library/decision.config.js.map +1 -0
- package/dist/client/blocks/library/decision.d.ts +19 -0
- package/dist/client/blocks/library/decision.d.ts.map +1 -0
- package/dist/client/blocks/library/decision.js +119 -0
- package/dist/client/blocks/library/decision.js.map +1 -0
- package/dist/client/blocks/library/diagram.config.d.ts +64 -0
- package/dist/client/blocks/library/diagram.config.d.ts.map +1 -0
- package/dist/client/blocks/library/diagram.config.js +111 -0
- package/dist/client/blocks/library/diagram.config.js.map +1 -0
- package/dist/client/blocks/library/diagram.d.ts +16 -0
- package/dist/client/blocks/library/diagram.d.ts.map +1 -0
- package/dist/client/blocks/library/diagram.js +261 -0
- package/dist/client/blocks/library/diagram.js.map +1 -0
- package/dist/client/blocks/library/diff.config.d.ts +28 -6
- package/dist/client/blocks/library/diff.config.d.ts.map +1 -1
- package/dist/client/blocks/library/diff.config.js +30 -6
- package/dist/client/blocks/library/diff.config.js.map +1 -1
- package/dist/client/blocks/library/question-form.config.d.ts +69 -0
- package/dist/client/blocks/library/question-form.config.d.ts.map +1 -0
- package/dist/client/blocks/library/question-form.config.js +58 -0
- package/dist/client/blocks/library/question-form.config.js.map +1 -0
- package/dist/client/blocks/library/question-form.d.ts +20 -0
- package/dist/client/blocks/library/question-form.d.ts.map +1 -0
- package/dist/client/blocks/library/question-form.js +286 -0
- package/dist/client/blocks/library/question-form.js.map +1 -0
- package/dist/client/blocks/library/sanitize-html.d.ts +5 -0
- package/dist/client/blocks/library/sanitize-html.d.ts.map +1 -0
- package/dist/client/blocks/library/sanitize-html.js +240 -0
- package/dist/client/blocks/library/sanitize-html.js.map +1 -0
- package/dist/client/blocks/library/server-specs.d.ts.map +1 -1
- package/dist/client/blocks/library/server-specs.js +59 -0
- package/dist/client/blocks/library/server-specs.js.map +1 -1
- package/dist/client/blocks/library/specs.d.ts.map +1 -1
- package/dist/client/blocks/library/specs.js +11 -0
- package/dist/client/blocks/library/specs.js.map +1 -1
- package/dist/client/blocks/library/tabs.d.ts.map +1 -1
- package/dist/client/blocks/library/tabs.js +12 -12
- package/dist/client/blocks/library/tabs.js.map +1 -1
- package/dist/client/blocks/library/wireframe-kit.d.ts +260 -0
- package/dist/client/blocks/library/wireframe-kit.d.ts.map +1 -0
- package/dist/client/blocks/library/wireframe-kit.js +920 -0
- package/dist/client/blocks/library/wireframe-kit.js.map +1 -0
- package/dist/client/blocks/library/wireframe.config.d.ts +123 -0
- package/dist/client/blocks/library/wireframe.config.d.ts.map +1 -0
- package/dist/client/blocks/library/wireframe.config.js +294 -0
- package/dist/client/blocks/library/wireframe.config.js.map +1 -0
- package/dist/client/blocks/library/wireframe.d.ts +15 -0
- package/dist/client/blocks/library/wireframe.d.ts.map +1 -0
- package/dist/client/blocks/library/wireframe.js +206 -0
- package/dist/client/blocks/library/wireframe.js.map +1 -0
- package/dist/client/blocks/registry.d.ts +9 -0
- package/dist/client/blocks/registry.d.ts.map +1 -1
- package/dist/client/blocks/registry.js +12 -5
- package/dist/client/blocks/registry.js.map +1 -1
- package/dist/client/blocks/server.d.ts +1 -0
- package/dist/client/blocks/server.d.ts.map +1 -1
- package/dist/client/blocks/server.js +1 -0
- package/dist/client/blocks/server.js.map +1 -1
- package/dist/client/blocks/types.d.ts +10 -2
- package/dist/client/blocks/types.d.ts.map +1 -1
- package/dist/client/blocks/types.js.map +1 -1
- package/dist/client/rich-markdown-editor/DragHandle.d.ts.map +1 -1
- package/dist/client/rich-markdown-editor/DragHandle.js +152 -21
- package/dist/client/rich-markdown-editor/DragHandle.js.map +1 -1
- package/dist/client/rich-markdown-editor/RegistryBlockNode.d.ts +25 -1
- package/dist/client/rich-markdown-editor/RegistryBlockNode.d.ts.map +1 -1
- package/dist/client/rich-markdown-editor/RegistryBlockNode.js +29 -6
- package/dist/client/rich-markdown-editor/RegistryBlockNode.js.map +1 -1
- package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts +8 -1
- package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts.map +1 -1
- package/dist/client/rich-markdown-editor/SharedRichEditor.js +5 -1
- package/dist/client/rich-markdown-editor/SharedRichEditor.js.map +1 -1
- package/dist/extensions/actions.d.ts.map +1 -1
- package/dist/extensions/actions.js +159 -12
- package/dist/extensions/actions.js.map +1 -1
- package/dist/extensions/store.d.ts +21 -0
- package/dist/extensions/store.d.ts.map +1 -1
- package/dist/extensions/store.js +33 -1
- package/dist/extensions/store.js.map +1 -1
- package/dist/server/recap-image-route.d.ts.map +1 -1
- package/dist/server/recap-image-route.js +12 -3
- package/dist/server/recap-image-route.js.map +1 -1
- package/dist/styles/agent-native.css +1 -0
- package/dist/styles/blocks.css +1380 -0
- package/dist/templates/workspace-core/.agents/skills/extensions/SKILL.md +30 -5
- package/docs/content/plan-plugin.md +107 -0
- package/docs/content/pr-visual-recap.md +2 -2
- package/docs/content/skills-guide.md +8 -0
- package/docs/content/template-plan.md +94 -17
- package/package.json +2 -1
- package/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +30 -5
- package/docs/content/visual-plans.md +0 -80
|
@@ -0,0 +1,1380 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared styling for the core block library (`client/blocks/library/*`).
|
|
3
|
+
*
|
|
4
|
+
* The block components emit app-neutral `an-block*` / `an-callout` classes that
|
|
5
|
+
* resolve against shadcn/ui theme tokens (`--foreground`, `--muted-foreground`,
|
|
6
|
+
* `--border`, `--card`, `--ring`) which EVERY template already defines — so the
|
|
7
|
+
* blocks render correctly in any app (plan, content, future templates) using
|
|
8
|
+
* that app's own palette. Templates may still add their own block classes for a
|
|
9
|
+
* bespoke look; because this file is imported via `agent-native.css` BEFORE a
|
|
10
|
+
* template's `global.css`, any template rule of equal specificity wins (this is
|
|
11
|
+
* how the plan template keeps its existing `.plan-callout` treatment while
|
|
12
|
+
* content gets the theme-token version here).
|
|
13
|
+
*
|
|
14
|
+
* Callout tone accents are fixed semantic hues (info=blue, decision=violet,
|
|
15
|
+
* risk=red, warning=amber, success=green) rather than theme tokens, since their
|
|
16
|
+
* meaning is universal; the dark variants are brightened to read on dark
|
|
17
|
+
* surfaces.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
:root {
|
|
21
|
+
--an-callout-info: 218 85% 57%;
|
|
22
|
+
--an-callout-decision: 262 83% 58%;
|
|
23
|
+
--an-callout-risk: 0 84% 60%;
|
|
24
|
+
--an-callout-warning: 25 95% 48%;
|
|
25
|
+
--an-callout-success: 142 71% 38%;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.dark {
|
|
29
|
+
--an-callout-info: 218 85% 67%;
|
|
30
|
+
--an-callout-decision: 263 88% 74%;
|
|
31
|
+
--an-callout-risk: 0 84% 67%;
|
|
32
|
+
--an-callout-warning: 28 96% 60%;
|
|
33
|
+
--an-callout-success: 142 60% 52%;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Small, muted eyebrow label above a block (block title). */
|
|
37
|
+
.an-block-label {
|
|
38
|
+
margin: 0 0 1rem;
|
|
39
|
+
color: hsl(var(--muted-foreground));
|
|
40
|
+
font-size: 0.8rem;
|
|
41
|
+
font-weight: 600;
|
|
42
|
+
letter-spacing: 0.04em;
|
|
43
|
+
line-height: 1.3;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Callout: a self-contained tinted box with a left accent bar and a tone. */
|
|
47
|
+
.an-callout {
|
|
48
|
+
max-width: 860px;
|
|
49
|
+
border-left: 3px solid hsl(var(--border));
|
|
50
|
+
border-radius: 0 8px 8px 0;
|
|
51
|
+
padding-block: 0.9rem;
|
|
52
|
+
padding-left: 1.25rem;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* The body editor/reader may carry a leading margin; the box padding owns the
|
|
56
|
+
top rhythm, so drop it (a label, when present, keeps its own margin-bottom). */
|
|
57
|
+
.an-callout > .an-rich-md-wrapper {
|
|
58
|
+
margin-top: 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.an-callout[data-tone="info"] {
|
|
62
|
+
--an-callout-accent: var(--an-callout-info);
|
|
63
|
+
}
|
|
64
|
+
.an-callout[data-tone="decision"] {
|
|
65
|
+
--an-callout-accent: var(--an-callout-decision);
|
|
66
|
+
}
|
|
67
|
+
.an-callout[data-tone="risk"] {
|
|
68
|
+
--an-callout-accent: var(--an-callout-risk);
|
|
69
|
+
}
|
|
70
|
+
.an-callout[data-tone="warning"] {
|
|
71
|
+
--an-callout-accent: var(--an-callout-warning);
|
|
72
|
+
}
|
|
73
|
+
.an-callout[data-tone="success"] {
|
|
74
|
+
--an-callout-accent: var(--an-callout-success);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.an-callout[data-tone] {
|
|
78
|
+
border-left-color: hsl(var(--an-callout-accent));
|
|
79
|
+
background-image: linear-gradient(
|
|
80
|
+
90deg,
|
|
81
|
+
hsl(var(--an-callout-accent) / 0.08),
|
|
82
|
+
hsl(var(--an-callout-accent) / 0.02) 38%,
|
|
83
|
+
transparent 72%
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.an-callout[data-tone] .an-block-label {
|
|
88
|
+
color: hsl(var(--an-callout-accent));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
92
|
+
Migrated plan block contract.
|
|
93
|
+
|
|
94
|
+
The core block library (`client/blocks/library/*`) still emits the legacy
|
|
95
|
+
`.plan-*` class names and the `text/bg/border-plan-*` color utilities. Those
|
|
96
|
+
were originally defined ONLY in `templates/plan/app/global.css`, so the
|
|
97
|
+
blocks rendered UNSTYLED in any other app (e.g. content). The structural
|
|
98
|
+
geometry below is migrated verbatim from plan; the only change is that COLOR
|
|
99
|
+
values now resolve against shadcn theme tokens (`--foreground`,
|
|
100
|
+
`--muted-foreground`, `--border`, `--muted`) instead of plan's `--plan-*`
|
|
101
|
+
surface vars — so each app renders the blocks in its own palette.
|
|
102
|
+
|
|
103
|
+
PLAN STAYS PIXEL-IDENTICAL. This file loads (via `agent-native.css`) BEFORE a
|
|
104
|
+
template's `global.css`, so plan's later-declared copies still win:
|
|
105
|
+
• Color utilities live in `@layer utilities` (matching plan); within the
|
|
106
|
+
layer, plan's later copy wins → plan unchanged, content gets these.
|
|
107
|
+
• Structural classes are un-layered (matching plan); source order makes
|
|
108
|
+
plan's later copy win.
|
|
109
|
+
Plan's document-layout / canvas / wireframe / chrome rules are NOT migrated —
|
|
110
|
+
they stay plan-only.
|
|
111
|
+
|
|
112
|
+
Token mapping:
|
|
113
|
+
--plan-text → --foreground
|
|
114
|
+
--plan-muted → --muted-foreground
|
|
115
|
+
--plan-line → --border
|
|
116
|
+
--plan-block → --muted
|
|
117
|
+
--plan-code → --muted
|
|
118
|
+
--plan-code-text → --foreground
|
|
119
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
120
|
+
|
|
121
|
+
/* ── Color utilities (layered so plan's later copy wins) ─────────────────── */
|
|
122
|
+
@layer utilities {
|
|
123
|
+
.bg-plan-block {
|
|
124
|
+
background-color: hsl(var(--muted));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.bg-plan-code {
|
|
128
|
+
background-color: hsl(var(--muted));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.text-plan-text {
|
|
132
|
+
color: hsl(var(--foreground));
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.text-plan-muted {
|
|
136
|
+
color: hsl(var(--muted-foreground));
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.text-plan-code-text {
|
|
140
|
+
color: hsl(var(--foreground));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.border-plan-line {
|
|
144
|
+
border-color: hsl(var(--border));
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* ── Block label + per-column header (structural) ────────────────────────── */
|
|
149
|
+
|
|
150
|
+
/* Small, muted eyebrow label above a block (block title). */
|
|
151
|
+
.plan-block-label {
|
|
152
|
+
margin: 0 0 1rem;
|
|
153
|
+
color: hsl(var(--muted-foreground));
|
|
154
|
+
font-size: 0.8rem;
|
|
155
|
+
font-weight: 600;
|
|
156
|
+
letter-spacing: 0.04em;
|
|
157
|
+
line-height: 1.3;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* Per-column header for `columns` comparison blocks (e.g. Before / After). */
|
|
161
|
+
.plan-columns-label {
|
|
162
|
+
margin: 0 0 0.6rem;
|
|
163
|
+
color: hsl(var(--foreground));
|
|
164
|
+
font-size: 0.95rem;
|
|
165
|
+
font-weight: 600;
|
|
166
|
+
letter-spacing: 0.01em;
|
|
167
|
+
line-height: 1.3;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* Nested block spacing (a block inside another block). */
|
|
171
|
+
.plan-block .plan-block {
|
|
172
|
+
margin-top: 1.75rem;
|
|
173
|
+
padding-top: 0;
|
|
174
|
+
border-top: 0;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.plan-block .plan-block .plan-block-label {
|
|
178
|
+
margin-bottom: 0.75rem;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/* Canonical document body / lede text size. */
|
|
182
|
+
.plan-doc-body {
|
|
183
|
+
font-size: 1.0625rem;
|
|
184
|
+
line-height: 1.75;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* ── Notion-like rich-text block prose ───────────────────────────────────── */
|
|
188
|
+
.plan-rich-markdown-editor {
|
|
189
|
+
max-width: 820px;
|
|
190
|
+
color: hsl(var(--foreground));
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.plan-rich-markdown-editor .an-rich-md-prose {
|
|
194
|
+
color: hsl(var(--foreground));
|
|
195
|
+
font-size: 1.0625rem;
|
|
196
|
+
line-height: 1.75;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.plan-rich-markdown-editor .an-rich-md-prose > :first-child {
|
|
200
|
+
margin-top: 0;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.plan-rich-markdown-editor .an-rich-md-prose > :last-child {
|
|
204
|
+
margin-bottom: 0;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.plan-rich-markdown-editor .an-rich-md-prose p {
|
|
208
|
+
margin: 0.9rem 0;
|
|
209
|
+
color: hsl(var(--muted-foreground));
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.plan-rich-markdown-editor.an-table-cell-markdown {
|
|
213
|
+
max-width: none;
|
|
214
|
+
min-height: 1.5rem;
|
|
215
|
+
color: inherit;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.plan-rich-markdown-editor.an-table-cell-markdown .an-rich-md-prose {
|
|
219
|
+
min-height: 1.5rem;
|
|
220
|
+
color: inherit;
|
|
221
|
+
font-size: inherit;
|
|
222
|
+
line-height: inherit;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.plan-rich-markdown-editor.an-table-cell-markdown .an-rich-md-prose p {
|
|
226
|
+
min-height: 1.5rem;
|
|
227
|
+
margin: 0;
|
|
228
|
+
color: inherit;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.plan-rich-markdown-editor.an-table-cell-markdown
|
|
232
|
+
.an-rich-md-prose
|
|
233
|
+
> :first-child {
|
|
234
|
+
margin-top: 0;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.plan-rich-markdown-editor.an-table-cell-markdown
|
|
238
|
+
.an-rich-md-prose
|
|
239
|
+
> :last-child {
|
|
240
|
+
margin-bottom: 0;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/* Annotated-code side notes: compact prose so a note matches its small card. */
|
|
244
|
+
.plan-annotation-note > .plan-rich-markdown-editor {
|
|
245
|
+
margin-top: 0;
|
|
246
|
+
}
|
|
247
|
+
.plan-annotation-note .plan-rich-markdown-editor .an-rich-md-prose {
|
|
248
|
+
font-size: 0.8125rem;
|
|
249
|
+
line-height: 1.5;
|
|
250
|
+
color: inherit;
|
|
251
|
+
}
|
|
252
|
+
.plan-annotation-note .plan-rich-markdown-editor .an-rich-md-prose p {
|
|
253
|
+
margin: 0;
|
|
254
|
+
color: inherit;
|
|
255
|
+
}
|
|
256
|
+
.plan-annotation-note .plan-rich-markdown-editor .an-rich-md-prose p + p {
|
|
257
|
+
margin-top: 0.45rem;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.plan-rich-markdown-editor .an-rich-md-prose h1,
|
|
261
|
+
.plan-rich-markdown-editor .an-rich-md-prose h2,
|
|
262
|
+
.plan-rich-markdown-editor .an-rich-md-prose h3,
|
|
263
|
+
.plan-rich-markdown-editor .an-rich-md-prose h4 {
|
|
264
|
+
color: hsl(var(--foreground));
|
|
265
|
+
font-weight: 640;
|
|
266
|
+
letter-spacing: 0;
|
|
267
|
+
line-height: 1.2;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.plan-rich-markdown-editor .an-rich-md-prose h1 {
|
|
271
|
+
margin: 2.2rem 0 0.85rem;
|
|
272
|
+
font-size: 1.75rem;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.plan-rich-markdown-editor .an-rich-md-prose h2 {
|
|
276
|
+
margin: 2rem 0 0.75rem;
|
|
277
|
+
font-size: 1.45rem;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.plan-rich-markdown-editor .an-rich-md-prose h3 {
|
|
281
|
+
margin: 1.6rem 0 0.6rem;
|
|
282
|
+
font-size: 1.2rem;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.plan-rich-markdown-editor .an-rich-md-prose h4 {
|
|
286
|
+
margin: 1.3rem 0 0.5rem;
|
|
287
|
+
font-size: 1.05rem;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.plan-rich-markdown-editor .an-rich-md-prose ul:not(.an-rich-md-task-list),
|
|
291
|
+
.plan-rich-markdown-editor .an-rich-md-prose ol,
|
|
292
|
+
.plan-rich-markdown-editor .an-rich-md-task-list {
|
|
293
|
+
margin: 0.85rem 0;
|
|
294
|
+
color: hsl(var(--muted-foreground));
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.plan-rich-markdown-editor .an-rich-md-prose li {
|
|
298
|
+
margin: 0.35rem 0;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.plan-rich-markdown-editor .an-rich-md-prose li::marker {
|
|
302
|
+
color: hsl(var(--border));
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.plan-rich-markdown-editor .an-rich-md-link {
|
|
306
|
+
color: hsl(var(--ring));
|
|
307
|
+
text-decoration-color: hsl(var(--ring) / 0.55);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.plan-rich-markdown-editor .an-rich-md-prose strong {
|
|
311
|
+
color: hsl(var(--foreground));
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.plan-rich-markdown-editor .an-rich-md-prose blockquote {
|
|
315
|
+
margin: 1.1rem 0;
|
|
316
|
+
border-left-color: hsl(var(--border));
|
|
317
|
+
color: hsl(var(--muted-foreground));
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.plan-rich-markdown-editor .an-rich-md-prose hr {
|
|
321
|
+
border-top-color: hsl(var(--border));
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/* Inline code only — never the block code inside <pre>. */
|
|
325
|
+
.plan-rich-markdown-editor .an-rich-md-prose :not(pre) > code {
|
|
326
|
+
background: hsl(var(--muted));
|
|
327
|
+
color: hsl(var(--foreground));
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/* Block code surface fallback for any stray bare <pre>. */
|
|
331
|
+
.plan-rich-markdown-editor .an-rich-md-prose pre {
|
|
332
|
+
border: 1px solid hsl(var(--border));
|
|
333
|
+
background: hsl(var(--muted));
|
|
334
|
+
color: hsl(var(--foreground));
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.plan-rich-markdown-editor .an-rich-md-table th,
|
|
338
|
+
.plan-rich-markdown-editor .an-rich-md-table td {
|
|
339
|
+
border-color: hsl(var(--border));
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.plan-rich-markdown-editor .an-rich-md-table th {
|
|
343
|
+
background: hsl(var(--muted));
|
|
344
|
+
color: hsl(var(--foreground));
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.plan-rich-markdown-editor .an-rich-md-table td {
|
|
348
|
+
color: hsl(var(--muted-foreground));
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.plan-rich-markdown-editor .an-rich-md-task-list li input[type="checkbox"] {
|
|
352
|
+
accent-color: hsl(var(--ring));
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/* ── Code block — shared read/edit surface (structural) ──────────────────── */
|
|
356
|
+
|
|
357
|
+
/* Read-only surface (Shiki-highlighted, collapses past `--plan-code-max-lines`). */
|
|
358
|
+
.plan-code-surface {
|
|
359
|
+
border-radius: 12px;
|
|
360
|
+
overflow: hidden;
|
|
361
|
+
border: 1px solid hsl(var(--border));
|
|
362
|
+
background: hsl(var(--muted));
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.plan-code-surface-bar {
|
|
366
|
+
display: flex;
|
|
367
|
+
align-items: center;
|
|
368
|
+
justify-content: flex-end;
|
|
369
|
+
padding: 0.4rem 0.85rem;
|
|
370
|
+
border-bottom: 1px solid hsl(var(--border));
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.plan-code-surface-lang {
|
|
374
|
+
font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
375
|
+
font-size: 0.6875rem;
|
|
376
|
+
font-weight: 500;
|
|
377
|
+
letter-spacing: 0.02em;
|
|
378
|
+
color: hsl(var(--muted-foreground));
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.plan-code-surface-scroll {
|
|
382
|
+
position: relative;
|
|
383
|
+
overflow: auto;
|
|
384
|
+
font-size: 0.78rem;
|
|
385
|
+
line-height: 1.6;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
/* Collapsed: clamp to N lines (+ the pre's top padding) and hide the rest. */
|
|
389
|
+
.plan-code-surface[data-collapsed="true"] .plan-code-surface-scroll {
|
|
390
|
+
max-height: calc(var(--plan-code-max-lines, 30) * 1lh + 0.85rem);
|
|
391
|
+
overflow: hidden;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.plan-code-surface-fade {
|
|
395
|
+
position: absolute;
|
|
396
|
+
inset: auto 0 0 0;
|
|
397
|
+
height: 3.5rem;
|
|
398
|
+
pointer-events: none;
|
|
399
|
+
background: linear-gradient(to bottom, transparent, hsl(var(--muted)) 92%);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.plan-code-surface-toggle {
|
|
403
|
+
display: block;
|
|
404
|
+
width: 100%;
|
|
405
|
+
padding: 0.45rem 0.85rem;
|
|
406
|
+
border-top: 1px solid hsl(var(--border));
|
|
407
|
+
background: transparent;
|
|
408
|
+
color: hsl(var(--muted-foreground));
|
|
409
|
+
font-size: 0.75rem;
|
|
410
|
+
font-weight: 500;
|
|
411
|
+
text-align: left;
|
|
412
|
+
cursor: pointer;
|
|
413
|
+
transition:
|
|
414
|
+
color 0.15s,
|
|
415
|
+
background-color 0.15s;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.plan-code-surface-toggle:hover {
|
|
419
|
+
color: hsl(var(--foreground));
|
|
420
|
+
background: color-mix(in srgb, hsl(var(--muted)) 60%, transparent);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.plan-code-surface .plan-shiki,
|
|
424
|
+
.plan-code-surface pre {
|
|
425
|
+
margin: 0;
|
|
426
|
+
padding: 0.85rem 1.1rem;
|
|
427
|
+
background: var(--shiki-light-bg, hsl(var(--muted))) !important;
|
|
428
|
+
color: var(--shiki-light, hsl(var(--foreground)));
|
|
429
|
+
font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
430
|
+
font-size: 0.78rem;
|
|
431
|
+
line-height: 1.6;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.plan-code-surface pre code {
|
|
435
|
+
color: inherit;
|
|
436
|
+
background: none;
|
|
437
|
+
padding: 0;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.plan-code-surface .plan-shiki pre,
|
|
441
|
+
.plan-code-surface .plan-shiki code {
|
|
442
|
+
background: var(--shiki-light-bg, transparent) !important;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
.plan-code-surface .plan-shiki pre span {
|
|
446
|
+
color: var(--shiki-light);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.dark .plan-code-surface .plan-shiki,
|
|
450
|
+
.dark .plan-code-surface .plan-shiki pre {
|
|
451
|
+
background: var(--shiki-dark-bg, hsl(var(--muted))) !important;
|
|
452
|
+
color: var(--shiki-dark, hsl(var(--foreground)));
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.dark .plan-code-surface .plan-shiki pre span {
|
|
456
|
+
color: var(--shiki-dark);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/* `code` primitive block: read wraps the surface with a borderless filename
|
|
460
|
+
header + hover chrome; edit is a single-bordered auto-growing surface. */
|
|
461
|
+
.plan-code {
|
|
462
|
+
position: relative;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.plan-code-head {
|
|
466
|
+
display: flex;
|
|
467
|
+
align-items: center;
|
|
468
|
+
justify-content: space-between;
|
|
469
|
+
gap: 0.75rem;
|
|
470
|
+
padding: 0 0.15rem 0.4rem;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.plan-code-filename {
|
|
474
|
+
display: inline-flex;
|
|
475
|
+
align-items: center;
|
|
476
|
+
gap: 0.4rem;
|
|
477
|
+
min-width: 0;
|
|
478
|
+
font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
479
|
+
font-size: 0.78rem;
|
|
480
|
+
font-weight: 600;
|
|
481
|
+
color: hsl(var(--foreground));
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.plan-code-muted {
|
|
485
|
+
color: hsl(var(--muted-foreground));
|
|
486
|
+
font-weight: 500;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.plan-code-chrome {
|
|
490
|
+
display: inline-flex;
|
|
491
|
+
align-items: center;
|
|
492
|
+
gap: 0.35rem;
|
|
493
|
+
opacity: 0;
|
|
494
|
+
transition: opacity 0.12s ease;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
.plan-code:hover .plan-code-chrome,
|
|
498
|
+
.plan-code:focus-within .plan-code-chrome {
|
|
499
|
+
opacity: 1;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.plan-code-chrome-float {
|
|
503
|
+
position: absolute;
|
|
504
|
+
top: 0.5rem;
|
|
505
|
+
right: 0.5rem;
|
|
506
|
+
z-index: 2;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
.plan-code-chip {
|
|
510
|
+
display: inline-flex;
|
|
511
|
+
align-items: center;
|
|
512
|
+
justify-content: center;
|
|
513
|
+
height: 1.75rem;
|
|
514
|
+
width: 1.75rem;
|
|
515
|
+
border-radius: 7px;
|
|
516
|
+
border: 1px solid hsl(var(--border));
|
|
517
|
+
background: hsl(var(--muted));
|
|
518
|
+
color: hsl(var(--muted-foreground));
|
|
519
|
+
cursor: pointer;
|
|
520
|
+
transition:
|
|
521
|
+
color 0.12s,
|
|
522
|
+
background-color 0.12s;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
.plan-code-chip:hover {
|
|
526
|
+
color: hsl(var(--foreground));
|
|
527
|
+
background: hsl(var(--muted));
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
.plan-code-lang-select {
|
|
531
|
+
height: 1.75rem;
|
|
532
|
+
padding: 0 0.4rem;
|
|
533
|
+
border-radius: 7px;
|
|
534
|
+
border: 1px solid hsl(var(--border));
|
|
535
|
+
background: hsl(var(--muted));
|
|
536
|
+
color: hsl(var(--muted-foreground));
|
|
537
|
+
font-size: 0.72rem;
|
|
538
|
+
font-weight: 500;
|
|
539
|
+
cursor: pointer;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
.plan-code-lang-select:hover {
|
|
543
|
+
color: hsl(var(--foreground));
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
/* Editable surface: ONE border, auto-grows to content (no drag-to-resize). */
|
|
547
|
+
.plan-code-editing {
|
|
548
|
+
overflow: hidden;
|
|
549
|
+
border: 1px solid hsl(var(--border));
|
|
550
|
+
border-radius: 12px;
|
|
551
|
+
/* Sit on the page background like the diff block — no distinct surface fill. */
|
|
552
|
+
background: transparent;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
.plan-code-editing .plan-code-head {
|
|
556
|
+
padding: 0.4rem 0.5rem 0.4rem 0.85rem;
|
|
557
|
+
border-bottom: 1px solid hsl(var(--border));
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
.plan-code-editing:hover .plan-code-chrome,
|
|
561
|
+
.plan-code-editing:focus-within .plan-code-chrome {
|
|
562
|
+
opacity: 1;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
/* Read view of the `code` block reuses the shared CodeSurface — flatten it for
|
|
566
|
+
the `code` primitive only so the snippet sits on the page (no gray box). */
|
|
567
|
+
.plan-code .plan-code-surface {
|
|
568
|
+
background: transparent;
|
|
569
|
+
}
|
|
570
|
+
.plan-code .plan-code-surface .plan-shiki,
|
|
571
|
+
.plan-code .plan-code-surface pre,
|
|
572
|
+
.dark .plan-code .plan-code-surface .plan-shiki,
|
|
573
|
+
.dark .plan-code .plan-code-surface pre {
|
|
574
|
+
background: transparent !important;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
.plan-code-editor-body {
|
|
578
|
+
position: relative;
|
|
579
|
+
overflow: auto;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.plan-code-editor-layer,
|
|
583
|
+
.plan-code-editor-input {
|
|
584
|
+
margin: 0;
|
|
585
|
+
padding: 0.85rem 1.1rem;
|
|
586
|
+
font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
587
|
+
font-size: 0.78rem;
|
|
588
|
+
line-height: 1.6;
|
|
589
|
+
white-space: pre;
|
|
590
|
+
tab-size: 2;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.plan-code-editor-layer {
|
|
594
|
+
position: absolute;
|
|
595
|
+
inset: 0;
|
|
596
|
+
overflow: hidden;
|
|
597
|
+
pointer-events: none;
|
|
598
|
+
color: hsl(var(--foreground));
|
|
599
|
+
/* This is a <pre>; a base `pre {}` style would leak in a bg + border + larger
|
|
600
|
+
font-size. Override so it's flat and lines up exactly with the textarea. */
|
|
601
|
+
background: transparent !important;
|
|
602
|
+
border: 0 !important;
|
|
603
|
+
border-radius: 0;
|
|
604
|
+
font-size: 0.78rem !important;
|
|
605
|
+
line-height: 1.6 !important;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
.plan-code-editor-input {
|
|
609
|
+
position: relative;
|
|
610
|
+
display: block;
|
|
611
|
+
width: 100%;
|
|
612
|
+
min-height: 2.5rem;
|
|
613
|
+
resize: none;
|
|
614
|
+
overflow: hidden;
|
|
615
|
+
border: 0;
|
|
616
|
+
background: transparent;
|
|
617
|
+
color: transparent;
|
|
618
|
+
caret-color: hsl(var(--foreground));
|
|
619
|
+
outline: none;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
.plan-code-editor-input::placeholder {
|
|
623
|
+
color: hsl(var(--muted-foreground));
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
/* Collapsed long snippet: fade the clipped bottom into the page background. */
|
|
627
|
+
.plan-code-editor-fade {
|
|
628
|
+
position: absolute;
|
|
629
|
+
inset: auto 0 0 0;
|
|
630
|
+
height: 3rem;
|
|
631
|
+
pointer-events: none;
|
|
632
|
+
background: linear-gradient(
|
|
633
|
+
to bottom,
|
|
634
|
+
transparent,
|
|
635
|
+
hsl(var(--background)) 92%
|
|
636
|
+
);
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
.plan-code-caption {
|
|
640
|
+
margin-top: 0.5rem;
|
|
641
|
+
font-size: 0.8rem;
|
|
642
|
+
color: hsl(var(--muted-foreground));
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
.plan-code-caption-input {
|
|
646
|
+
width: 100%;
|
|
647
|
+
padding: 0 0.15rem;
|
|
648
|
+
border: 0;
|
|
649
|
+
background: transparent;
|
|
650
|
+
font-size: 0.8rem;
|
|
651
|
+
color: hsl(var(--muted-foreground));
|
|
652
|
+
outline: none;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
/* ── Editor node view (Tiptap): language picker header + highlighted <pre> ─── */
|
|
656
|
+
.an-code-block {
|
|
657
|
+
position: relative;
|
|
658
|
+
margin: 1.1rem 0;
|
|
659
|
+
border: 1px solid hsl(var(--border));
|
|
660
|
+
border-radius: 12px;
|
|
661
|
+
background: hsl(var(--muted));
|
|
662
|
+
overflow: hidden;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
.an-code-block__header {
|
|
666
|
+
display: flex;
|
|
667
|
+
align-items: center;
|
|
668
|
+
padding: 0.3rem 0.55rem;
|
|
669
|
+
border-bottom: 1px solid hsl(var(--border));
|
|
670
|
+
min-height: 2rem;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
.an-code-block__lang {
|
|
674
|
+
display: inline-flex;
|
|
675
|
+
align-items: center;
|
|
676
|
+
gap: 0.25rem;
|
|
677
|
+
padding: 0.15rem 0.5rem;
|
|
678
|
+
border: none;
|
|
679
|
+
border-radius: 6px;
|
|
680
|
+
background: transparent;
|
|
681
|
+
color: hsl(var(--muted-foreground));
|
|
682
|
+
font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
683
|
+
font-size: 0.7rem;
|
|
684
|
+
font-weight: 500;
|
|
685
|
+
cursor: pointer;
|
|
686
|
+
transition:
|
|
687
|
+
background-color 0.15s,
|
|
688
|
+
color 0.15s;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
.an-code-block__lang:hover {
|
|
692
|
+
background: color-mix(in srgb, hsl(var(--muted)) 70%, transparent);
|
|
693
|
+
color: hsl(var(--foreground));
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
.an-code-block__lang--readonly,
|
|
697
|
+
.an-code-block__lang--readonly:hover {
|
|
698
|
+
cursor: default;
|
|
699
|
+
background: transparent;
|
|
700
|
+
color: hsl(var(--muted-foreground));
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
/* The node-view wrapper owns the surface (border + bg), so the inner <pre> is
|
|
704
|
+
transparent. Scoped via `.an-rich-md-prose` so it applies in every editor. */
|
|
705
|
+
.an-rich-md-prose .an-code-block pre {
|
|
706
|
+
margin: 0;
|
|
707
|
+
padding: 0.85rem 1.1rem;
|
|
708
|
+
border: 0;
|
|
709
|
+
border-radius: 0;
|
|
710
|
+
background: transparent;
|
|
711
|
+
color: hsl(var(--foreground));
|
|
712
|
+
font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
713
|
+
font-size: 0.78rem;
|
|
714
|
+
line-height: 1.6;
|
|
715
|
+
overflow-x: auto;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
.an-code-block pre code {
|
|
719
|
+
background: none;
|
|
720
|
+
padding: 0;
|
|
721
|
+
color: inherit;
|
|
722
|
+
font-size: inherit;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
/* Language picker popover (rendered in a portal by the shared Popover). */
|
|
726
|
+
.an-code-block__search {
|
|
727
|
+
width: 100%;
|
|
728
|
+
padding: 0.5rem 0.65rem;
|
|
729
|
+
background: transparent;
|
|
730
|
+
border: none;
|
|
731
|
+
border-bottom: 1px solid hsl(var(--border));
|
|
732
|
+
color: hsl(var(--foreground));
|
|
733
|
+
font-size: 0.8rem;
|
|
734
|
+
outline: none;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
.an-code-block__list {
|
|
738
|
+
max-height: 220px;
|
|
739
|
+
overflow-y: auto;
|
|
740
|
+
padding: 0.25rem;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
.an-code-block__option {
|
|
744
|
+
display: flex;
|
|
745
|
+
align-items: center;
|
|
746
|
+
justify-content: space-between;
|
|
747
|
+
width: 100%;
|
|
748
|
+
padding: 0.35rem 0.5rem;
|
|
749
|
+
border: none;
|
|
750
|
+
border-radius: 6px;
|
|
751
|
+
background: transparent;
|
|
752
|
+
color: hsl(var(--foreground));
|
|
753
|
+
font-size: 0.8rem;
|
|
754
|
+
text-align: left;
|
|
755
|
+
cursor: pointer;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
.an-code-block__option:hover {
|
|
759
|
+
background: hsl(var(--accent));
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
.an-code-block__option.is-active {
|
|
763
|
+
color: hsl(var(--primary));
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
/* ════════════════════════════════════════════════════════════════════════
|
|
767
|
+
Wireframe kit + inline diagram + HTML-artboard styling.
|
|
768
|
+
|
|
769
|
+
Copied verbatim from the plan template's wireframe CSS
|
|
770
|
+
(wireframe/html-artboard.css + wireframe/kit/plan-wireframe-tokens.css).
|
|
771
|
+
These already reference plan palette vars with shadcn theme-token
|
|
772
|
+
FALLBACKS — e.g. var(--plan-text, hsl(var(--foreground))) — so in plan
|
|
773
|
+
they resolve to plan's palette (unchanged) and in any other app they
|
|
774
|
+
resolve to that app's theme tokens. Loaded globally here so the shared
|
|
775
|
+
wireframe + diagram blocks render in any app, not just plan.
|
|
776
|
+
════════════════════════════════════════════════════════════════════════ */
|
|
777
|
+
|
|
778
|
+
/* Question form / visual questions: respondent-facing intake block. */
|
|
779
|
+
.an-questions-block {
|
|
780
|
+
max-width: 860px;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
/*
|
|
784
|
+
* HTML artboard styling.
|
|
785
|
+
*
|
|
786
|
+
* The model writes a plain, semantic HTML mockup of a screen. This stylesheet
|
|
787
|
+
* gives that HTML the wireframe look WITHOUT the model having to specify colors,
|
|
788
|
+
* fonts, or borders: it themes bare elements via tokens that flip on
|
|
789
|
+
* [data-theme], swaps the font on [data-style] (sketchy handwriting vs clean
|
|
790
|
+
* sans), and exposes --wf-* tokens + a few helper classes the model can lean on.
|
|
791
|
+
* The rough.js overlay then redraws the bordered boxes as hand-drawn strokes.
|
|
792
|
+
*
|
|
793
|
+
* Scope: `.plan-html-frame`. Everything is contained so model HTML can't leak
|
|
794
|
+
* into the app chrome.
|
|
795
|
+
*/
|
|
796
|
+
|
|
797
|
+
.plan-html-frame {
|
|
798
|
+
--wf-ink: var(--plan-text, hsl(var(--foreground)));
|
|
799
|
+
--wf-muted: var(--plan-muted, hsl(var(--muted-foreground)));
|
|
800
|
+
--wf-line: var(--plan-line, hsl(var(--border)));
|
|
801
|
+
/* Hand-drawn sketch stroke. Separate from --wf-ink (text) so the rough.js
|
|
802
|
+
overlay can run a touch softer than the body text — most important in dark
|
|
803
|
+
mode, where near-white text ink as a stroke makes harsh, eye-straining
|
|
804
|
+
borders. In light mode it matches the ink. */
|
|
805
|
+
/* Sketch stroke = a soft gray a step more pronounced than the hairline
|
|
806
|
+
--wf-line, so rough (broken) strokes still read clearly. Gentle, not hard
|
|
807
|
+
ink; text stays the dark --wf-ink above. */
|
|
808
|
+
--wf-sketch: var(--plan-muted-line, hsl(var(--border)));
|
|
809
|
+
--wf-paper: var(--plan-document, hsl(var(--background)));
|
|
810
|
+
--wf-card: var(--plan-block, hsl(var(--card)));
|
|
811
|
+
--wf-accent: hsl(var(--ring));
|
|
812
|
+
--wf-accent-fg: hsl(var(--primary-foreground));
|
|
813
|
+
--wf-accent-soft: color-mix(in srgb, var(--wf-accent) 11%, transparent);
|
|
814
|
+
--wf-warn: hsl(var(--destructive));
|
|
815
|
+
--wf-ok: var(--wf-accent);
|
|
816
|
+
--wf-radius: 9px;
|
|
817
|
+
|
|
818
|
+
--wf-font-hand: "Excalifont", "Comic Sans MS", "Bradley Hand", cursive;
|
|
819
|
+
--wf-font-clean:
|
|
820
|
+
ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, sans-serif;
|
|
821
|
+
--wf-font: var(--wf-font-hand);
|
|
822
|
+
|
|
823
|
+
position: relative;
|
|
824
|
+
width: 100%;
|
|
825
|
+
/* `min-height` (not a fixed `height: 100%`) so an HTML mockup fills the
|
|
826
|
+
auto-height artboard's floor yet grows with its content instead of clipping.
|
|
827
|
+
The frame shell (ArtboardFrame) owns the height policy; the prototype-live
|
|
828
|
+
scroll mode below pins to 100% for an internally-scrolling canvas. */
|
|
829
|
+
min-height: 100%;
|
|
830
|
+
overflow: hidden;
|
|
831
|
+
box-sizing: border-box;
|
|
832
|
+
background: var(--wf-paper);
|
|
833
|
+
color: var(--wf-ink);
|
|
834
|
+
font-family: var(--wf-font);
|
|
835
|
+
font-size: 14px;
|
|
836
|
+
line-height: 1.45;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
.plan-html-frame-content {
|
|
840
|
+
width: 100%;
|
|
841
|
+
min-height: 100%;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
.plan-html-frame[data-prototype-live="true"] {
|
|
845
|
+
overflow: auto;
|
|
846
|
+
}
|
|
847
|
+
.plan-html-frame[data-prototype-live="true"] > .plan-html-frame-content {
|
|
848
|
+
height: 100%;
|
|
849
|
+
min-height: 0;
|
|
850
|
+
overflow: auto !important;
|
|
851
|
+
overscroll-behavior: contain;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
.plan-html-frame[data-style="clean"] {
|
|
855
|
+
--wf-font: var(--wf-font-clean);
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
.plan-html-frame[data-render-mode="design"] {
|
|
859
|
+
--wf-font: var(--wf-font-clean);
|
|
860
|
+
background: transparent;
|
|
861
|
+
color: inherit;
|
|
862
|
+
font-family: var(--wf-font-clean);
|
|
863
|
+
font-size: 16px;
|
|
864
|
+
line-height: normal;
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
:where(.plan-html-frame[data-render-mode="design"] .plan-html-frame-content)
|
|
868
|
+
:where(h1, h2, h3, p, small, a, button, input, textarea, select, hr) {
|
|
869
|
+
all: revert;
|
|
870
|
+
box-sizing: border-box;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
.plan-html-frame[data-render-mode="design"] button,
|
|
874
|
+
.plan-html-frame[data-render-mode="design"] [role="button"],
|
|
875
|
+
.plan-html-frame[data-render-mode="design"] [data-goto] {
|
|
876
|
+
cursor: pointer;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
.plan-html-frame[data-render-mode="design"] [data-plan-design-selected] {
|
|
880
|
+
outline: 2px solid hsl(var(--ring)) !important;
|
|
881
|
+
outline-offset: 2px;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
.plan-html-frame * {
|
|
885
|
+
box-sizing: border-box;
|
|
886
|
+
min-width: 0;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
/* Bare semantic elements get the wireframe look from tokens. */
|
|
890
|
+
.plan-html-frame:not([data-render-mode="design"]) h1 {
|
|
891
|
+
font-size: 22px;
|
|
892
|
+
font-weight: 700;
|
|
893
|
+
line-height: 1.15;
|
|
894
|
+
margin: 0 0 8px;
|
|
895
|
+
}
|
|
896
|
+
.plan-html-frame:not([data-render-mode="design"]) h2 {
|
|
897
|
+
font-size: 17px;
|
|
898
|
+
font-weight: 700;
|
|
899
|
+
line-height: 1.2;
|
|
900
|
+
margin: 0 0 6px;
|
|
901
|
+
}
|
|
902
|
+
.plan-html-frame:not([data-render-mode="design"]) h3 {
|
|
903
|
+
font-size: 14px;
|
|
904
|
+
font-weight: 700;
|
|
905
|
+
margin: 0 0 4px;
|
|
906
|
+
}
|
|
907
|
+
.plan-html-frame:not([data-render-mode="design"]) p {
|
|
908
|
+
margin: 0 0 8px;
|
|
909
|
+
}
|
|
910
|
+
.plan-html-frame:not([data-render-mode="design"]) small,
|
|
911
|
+
.plan-html-frame:not([data-render-mode="design"]) .wf-muted {
|
|
912
|
+
color: var(--wf-muted);
|
|
913
|
+
font-size: 12.5px;
|
|
914
|
+
}
|
|
915
|
+
.plan-html-frame:not([data-render-mode="design"]) a {
|
|
916
|
+
color: var(--wf-accent);
|
|
917
|
+
text-decoration: none;
|
|
918
|
+
}
|
|
919
|
+
.plan-html-frame:not([data-render-mode="design"]) hr {
|
|
920
|
+
border: 0;
|
|
921
|
+
border-top: 1.4px solid var(--wf-line);
|
|
922
|
+
margin: 10px 0;
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
.plan-html-frame:not([data-render-mode="design"]) button,
|
|
926
|
+
.plan-html-frame:not([data-render-mode="design"]) .wf-btn {
|
|
927
|
+
display: inline-flex;
|
|
928
|
+
align-items: center;
|
|
929
|
+
justify-content: center;
|
|
930
|
+
gap: 6px;
|
|
931
|
+
font: inherit;
|
|
932
|
+
font-weight: 700;
|
|
933
|
+
color: var(--wf-ink);
|
|
934
|
+
/* Opaque paper fill (not transparent) so a floating / overlapping button —
|
|
935
|
+
a FAB, a sticky toolbar action like "+ Add habit" — never shows the
|
|
936
|
+
content behind it through its body. */
|
|
937
|
+
background: var(--wf-paper);
|
|
938
|
+
border: 1.4px solid var(--wf-line);
|
|
939
|
+
border-radius: var(--wf-radius);
|
|
940
|
+
padding: 7px 14px;
|
|
941
|
+
cursor: default;
|
|
942
|
+
}
|
|
943
|
+
.plan-html-frame[data-prototype-live="true"]
|
|
944
|
+
:is(button, .wf-btn, [role="button"], [data-goto]) {
|
|
945
|
+
cursor: pointer;
|
|
946
|
+
}
|
|
947
|
+
.plan-html-frame[data-prototype-live="true"] :is(button, .wf-btn):active {
|
|
948
|
+
transform: translateY(1px);
|
|
949
|
+
}
|
|
950
|
+
.plan-html-frame[data-prototype-live="true"] [hidden] {
|
|
951
|
+
display: none !important;
|
|
952
|
+
}
|
|
953
|
+
.plan-html-frame[data-prototype-live="true"] .is-done,
|
|
954
|
+
.plan-html-frame[data-prototype-live="true"] [data-done="true"] {
|
|
955
|
+
color: var(--wf-muted);
|
|
956
|
+
text-decoration: line-through;
|
|
957
|
+
text-decoration-thickness: 1.5px;
|
|
958
|
+
}
|
|
959
|
+
.plan-html-frame:not([data-render-mode="design"]) button.primary,
|
|
960
|
+
.plan-html-frame:not([data-render-mode="design"]) .wf-btn.primary,
|
|
961
|
+
.plan-html-frame:not([data-render-mode="design"]) [data-primary] {
|
|
962
|
+
background: var(--wf-accent);
|
|
963
|
+
border-color: var(--wf-accent);
|
|
964
|
+
color: var(--wf-accent-fg);
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
.plan-html-frame:not([data-render-mode="design"]) input,
|
|
968
|
+
.plan-html-frame:not([data-render-mode="design"]) textarea,
|
|
969
|
+
.plan-html-frame:not([data-render-mode="design"]) select {
|
|
970
|
+
font: inherit;
|
|
971
|
+
color: var(--wf-ink);
|
|
972
|
+
background: var(--wf-card);
|
|
973
|
+
border: 1.4px solid var(--wf-line);
|
|
974
|
+
border-radius: var(--wf-radius);
|
|
975
|
+
padding: 8px 10px;
|
|
976
|
+
width: 100%;
|
|
977
|
+
}
|
|
978
|
+
.plan-html-frame:not([data-render-mode="design"]) input[type="checkbox"],
|
|
979
|
+
.plan-html-frame:not([data-render-mode="design"]) input[type="radio"] {
|
|
980
|
+
width: 16px;
|
|
981
|
+
height: 16px;
|
|
982
|
+
padding: 0;
|
|
983
|
+
accent-color: var(--wf-accent);
|
|
984
|
+
flex: 0 0 auto;
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
.plan-html-frame:not([data-render-mode="design"]) .wf-card,
|
|
988
|
+
.plan-html-frame:not([data-render-mode="design"]) .wf-box {
|
|
989
|
+
background: var(--wf-card);
|
|
990
|
+
border: 1.4px solid var(--wf-line);
|
|
991
|
+
border-radius: var(--wf-radius);
|
|
992
|
+
padding: 12px;
|
|
993
|
+
}
|
|
994
|
+
.plan-html-frame:not([data-render-mode="design"]) .wf-pill,
|
|
995
|
+
.plan-html-frame:not([data-render-mode="design"]) .wf-chip {
|
|
996
|
+
display: inline-flex;
|
|
997
|
+
align-items: center;
|
|
998
|
+
gap: 5px;
|
|
999
|
+
border: 1.4px solid var(--wf-line);
|
|
1000
|
+
border-radius: 999px;
|
|
1001
|
+
padding: 2px 10px;
|
|
1002
|
+
font-size: 12.5px;
|
|
1003
|
+
}
|
|
1004
|
+
.plan-html-frame:not([data-render-mode="design"]) .wf-pill.accent {
|
|
1005
|
+
border-color: var(--wf-accent);
|
|
1006
|
+
color: var(--wf-accent);
|
|
1007
|
+
background: var(--wf-accent-soft);
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
/* Once rough has drawn, hide the crisp borders so there's no doubling. Pills
|
|
1011
|
+
keep their rounded crisp border (the rough overlay rounds them too). */
|
|
1012
|
+
.plan-html-frame[data-rough-ready]
|
|
1013
|
+
:is(button, input, textarea, select, .wf-card, .wf-box, hr, [data-rough]) {
|
|
1014
|
+
border-color: transparent !important;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
/* Skeleton register: neutral textless geometry. */
|
|
1018
|
+
.plan-html-frame[data-skeleton="true"] {
|
|
1019
|
+
--wf-ink: var(--plan-muted-line, hsl(var(--border)));
|
|
1020
|
+
--wf-muted: var(--plan-muted-line, hsl(var(--border)));
|
|
1021
|
+
--wf-line: var(--plan-placeholder-line, hsl(var(--border)));
|
|
1022
|
+
--wf-card: var(--plan-block, hsl(var(--card)));
|
|
1023
|
+
--wf-accent: var(--plan-muted-line, hsl(var(--border)));
|
|
1024
|
+
--wf-accent-soft: var(--plan-block, hsl(var(--card)));
|
|
1025
|
+
}
|
|
1026
|
+
.plan-html-frame[data-skeleton="true"] * {
|
|
1027
|
+
color: transparent !important;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
/*
|
|
1031
|
+
* Inline architecture/code diagrams.
|
|
1032
|
+
*
|
|
1033
|
+
* These are document-local HTML/SVG fragments, not top-canvas wireframes. They
|
|
1034
|
+
* share the wireframe sketch preference so the same viewer toggle can switch
|
|
1035
|
+
* authored diagrams between crisp and hand-drawn presentation.
|
|
1036
|
+
*/
|
|
1037
|
+
|
|
1038
|
+
.plan-diagram-shell {
|
|
1039
|
+
position: relative;
|
|
1040
|
+
width: 100%;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
.plan-diagram-frame {
|
|
1044
|
+
--wf-ink: var(--plan-text, hsl(var(--foreground)));
|
|
1045
|
+
--wf-muted: var(--plan-muted, hsl(var(--muted-foreground)));
|
|
1046
|
+
--wf-line: var(--plan-line, hsl(var(--border)));
|
|
1047
|
+
--wf-sketch: var(--plan-muted-line, hsl(var(--border)));
|
|
1048
|
+
--wf-paper: var(--plan-document, hsl(var(--background)));
|
|
1049
|
+
--wf-card: var(--plan-block, hsl(var(--card)));
|
|
1050
|
+
--wf-accent: hsl(var(--ring));
|
|
1051
|
+
--wf-accent-fg: hsl(var(--primary-foreground));
|
|
1052
|
+
--wf-accent-soft: color-mix(in srgb, var(--wf-accent) 11%, transparent);
|
|
1053
|
+
--wf-warn: hsl(var(--destructive));
|
|
1054
|
+
--wf-ok: var(--wf-accent);
|
|
1055
|
+
--wf-radius: 8px;
|
|
1056
|
+
--wf-font-hand: "Excalifont", "Comic Sans MS", "Bradley Hand", cursive;
|
|
1057
|
+
--wf-font-clean:
|
|
1058
|
+
ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, sans-serif;
|
|
1059
|
+
--wf-font: var(--wf-font-clean);
|
|
1060
|
+
|
|
1061
|
+
position: relative;
|
|
1062
|
+
overflow: hidden;
|
|
1063
|
+
width: 100%;
|
|
1064
|
+
border: 0;
|
|
1065
|
+
border-radius: 10px;
|
|
1066
|
+
background: var(--wf-paper);
|
|
1067
|
+
color: var(--wf-ink);
|
|
1068
|
+
font-family: var(--wf-font);
|
|
1069
|
+
font-size: 14px;
|
|
1070
|
+
line-height: 1.4;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
.plan-diagram-frame[data-style="sketchy"] {
|
|
1074
|
+
--wf-font: var(--wf-font-hand);
|
|
1075
|
+
line-height: 1.32;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
.plan-diagram-frame * {
|
|
1079
|
+
box-sizing: border-box;
|
|
1080
|
+
min-width: 0;
|
|
1081
|
+
overflow-wrap: anywhere;
|
|
1082
|
+
text-wrap: pretty;
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
.plan-diagram-frame-content {
|
|
1086
|
+
width: 100%;
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
.plan-diagram-frame svg {
|
|
1090
|
+
display: block;
|
|
1091
|
+
max-width: 100%;
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
.plan-diagram-frame :is(h1, h2, h3, p, small, strong) {
|
|
1095
|
+
margin: 0;
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
.plan-diagram-frame :is(h1, h2, h3, strong) {
|
|
1099
|
+
color: var(--wf-ink);
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
.plan-diagram-frame h1 {
|
|
1103
|
+
font-size: 20px;
|
|
1104
|
+
line-height: 1.15;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
.plan-diagram-frame h2 {
|
|
1108
|
+
font-size: 16px;
|
|
1109
|
+
line-height: 1.2;
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
.plan-diagram-frame h3 {
|
|
1113
|
+
font-size: 14px;
|
|
1114
|
+
line-height: 1.2;
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
.plan-diagram-frame :is(p, small, .diagram-muted) {
|
|
1118
|
+
color: var(--wf-muted);
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
.plan-diagram-frame
|
|
1122
|
+
:is(.diagram-panel, .diagram-card, .diagram-node, .diagram-box) {
|
|
1123
|
+
border: 1.25px solid var(--wf-line);
|
|
1124
|
+
border-radius: var(--wf-radius);
|
|
1125
|
+
background: var(--wf-card);
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
.plan-diagram-frame
|
|
1129
|
+
:is(
|
|
1130
|
+
.diagram-panel,
|
|
1131
|
+
.diagram-card,
|
|
1132
|
+
.diagram-node,
|
|
1133
|
+
.diagram-box,
|
|
1134
|
+
[class*="card"],
|
|
1135
|
+
[class*="panel"],
|
|
1136
|
+
[class*="box"]
|
|
1137
|
+
) {
|
|
1138
|
+
border-color: var(--wf-line) !important;
|
|
1139
|
+
background: var(--wf-card) !important;
|
|
1140
|
+
color: var(--wf-ink) !important;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
.plan-diagram-frame :is(.diagram-node, .diagram-box, .diagram-card) {
|
|
1144
|
+
max-width: 100%;
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
.plan-diagram-frame :is(.diagram-node, .diagram-box, .diagram-card) small {
|
|
1148
|
+
display: block;
|
|
1149
|
+
max-width: 100%;
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
.plan-diagram-frame :is(.diagram-muted, [class*="muted"], small) {
|
|
1153
|
+
color: var(--wf-muted) !important;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
.plan-diagram-frame
|
|
1157
|
+
:is(.diagram-pill, [class*="pill"], [class*="badge"], [class*="chip"]) {
|
|
1158
|
+
border-color: var(--wf-line) !important;
|
|
1159
|
+
background: var(--wf-paper) !important;
|
|
1160
|
+
color: var(--wf-ink) !important;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
.plan-diagram-frame :is(.diagram-accent, [class*="accent"], [class*="active"]) {
|
|
1164
|
+
border-color: var(--wf-accent) !important;
|
|
1165
|
+
color: var(--wf-accent) !important;
|
|
1166
|
+
background: var(--wf-accent-soft) !important;
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
.plan-diagram-frame :is(svg, line, path, polyline, polygon, rect, circle) {
|
|
1170
|
+
stroke: var(--wf-line) !important;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
.plan-diagram-frame
|
|
1174
|
+
:is(rect, circle, ellipse, polygon)[fill]:not([fill="none"]) {
|
|
1175
|
+
fill: var(--wf-card) !important;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
.plan-diagram-frame svg text {
|
|
1179
|
+
fill: var(--wf-ink) !important;
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
.plan-diagram-frame[data-style="sketchy"]
|
|
1183
|
+
:is(.diagram-node, .diagram-box, .diagram-card) {
|
|
1184
|
+
line-height: 1.16;
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
.plan-diagram-frame[data-style="sketchy"] :is(.diagram-node, .diagram-box) {
|
|
1188
|
+
padding-inline: 7px;
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
.plan-diagram-frame .diagram-pill {
|
|
1192
|
+
display: inline-flex;
|
|
1193
|
+
align-items: center;
|
|
1194
|
+
border: 1px solid var(--wf-line);
|
|
1195
|
+
border-radius: 999px;
|
|
1196
|
+
padding: 2px 8px;
|
|
1197
|
+
color: var(--wf-ink);
|
|
1198
|
+
background: var(--wf-paper);
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
.plan-diagram-frame :is(.diagram-accent, .diagram-pill.accent) {
|
|
1202
|
+
--rough-stroke: var(--wf-accent);
|
|
1203
|
+
border-color: var(--wf-accent) !important;
|
|
1204
|
+
color: var(--wf-accent) !important;
|
|
1205
|
+
background: var(--wf-accent-soft) !important;
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
.plan-diagram-frame :is(.diagram-ok, .diagram-pill.ok) {
|
|
1209
|
+
--rough-stroke: var(--wf-ok);
|
|
1210
|
+
border-color: var(--wf-ok) !important;
|
|
1211
|
+
color: var(--wf-ok) !important;
|
|
1212
|
+
background: color-mix(in srgb, var(--wf-ok) 10%, transparent) !important;
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
.plan-diagram-frame :is(.diagram-warn, .diagram-pill.warn) {
|
|
1216
|
+
--rough-stroke: var(--wf-warn);
|
|
1217
|
+
border-color: var(--wf-warn) !important;
|
|
1218
|
+
color: var(--wf-warn) !important;
|
|
1219
|
+
background: color-mix(in srgb, var(--wf-warn) 10%, transparent) !important;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
.plan-diagram-frame[data-rough-ready]
|
|
1223
|
+
:is(
|
|
1224
|
+
.diagram-panel,
|
|
1225
|
+
.diagram-card,
|
|
1226
|
+
.diagram-node,
|
|
1227
|
+
.diagram-box,
|
|
1228
|
+
.diagram-pill,
|
|
1229
|
+
[class*="card"],
|
|
1230
|
+
[class*="box"],
|
|
1231
|
+
[class*="panel"],
|
|
1232
|
+
[class*="pill"],
|
|
1233
|
+
[data-rough],
|
|
1234
|
+
hr
|
|
1235
|
+
) {
|
|
1236
|
+
border-color: transparent !important;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
/*
|
|
1240
|
+
* Plan wireframe design tokens.
|
|
1241
|
+
*
|
|
1242
|
+
* The MODEL emits a lean kit tree (no geometry, no CSS). This stylesheet owns
|
|
1243
|
+
* ALL visual quality for the wireframe primitives: ink/paper/accent palette,
|
|
1244
|
+
* density-driven spacing/type, and the hand-drawn fonts. Every kit component in
|
|
1245
|
+
* ./* reads these CSS vars, so density / accent / theme are switchable by
|
|
1246
|
+
* toggling a single attribute on a `.plan-wf` scope — never by changing nodes.
|
|
1247
|
+
*
|
|
1248
|
+
* Scope: `.plan-wf` (set on the Screen wrapper). Tokens are scoped, not global,
|
|
1249
|
+
* so wireframes can sit alongside the normal app chrome without leaking fonts
|
|
1250
|
+
* or colors.
|
|
1251
|
+
*/
|
|
1252
|
+
|
|
1253
|
+
/* Hand-drawn fonts. Excalifont is served by the app; no remote font dependency. */
|
|
1254
|
+
|
|
1255
|
+
.plan-wf {
|
|
1256
|
+
/* ---- Theme palette ----------------------------------------------------- */
|
|
1257
|
+
--ink: var(--plan-text, hsl(var(--foreground)));
|
|
1258
|
+
--ink-soft: var(--plan-muted, hsl(var(--muted-foreground)));
|
|
1259
|
+
--line: var(--plan-line, hsl(var(--border)));
|
|
1260
|
+
/* Sketch stroke = a soft gray a step more pronounced than --line so rough
|
|
1261
|
+
strokes read clearly; matches the HTML artboard. Text stays the dark --ink. */
|
|
1262
|
+
--wf-sketch: var(--plan-muted-line, hsl(var(--border)));
|
|
1263
|
+
--paper: var(--plan-document, hsl(var(--background)));
|
|
1264
|
+
--card: var(--plan-block, hsl(var(--card)));
|
|
1265
|
+
--accent: hsl(var(--ring));
|
|
1266
|
+
--accent-soft: color-mix(in srgb, var(--accent) 15%, transparent);
|
|
1267
|
+
--warn: hsl(var(--destructive));
|
|
1268
|
+
--warn-soft: color-mix(in srgb, var(--warn) 14%, transparent);
|
|
1269
|
+
--ok: var(--accent);
|
|
1270
|
+
--ok-soft: color-mix(in srgb, var(--ok) 15%, transparent);
|
|
1271
|
+
|
|
1272
|
+
/* Page backdrop behind artboards (board surface, not the screen paper). */
|
|
1273
|
+
--plan-wf-page-bg: var(--plan-canvas, hsl(var(--background)));
|
|
1274
|
+
|
|
1275
|
+
/* ---- Fonts ------------------------------------------------------------- */
|
|
1276
|
+
--font-hand:
|
|
1277
|
+
"Excalifont", "Comic Sans MS", "Bradley Hand", "Marker Felt", cursive;
|
|
1278
|
+
--font-script:
|
|
1279
|
+
"Excalifont", "Comic Sans MS", "Bradley Hand", "Marker Felt", cursive;
|
|
1280
|
+
--font-clean:
|
|
1281
|
+
ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, sans-serif;
|
|
1282
|
+
|
|
1283
|
+
/* ---- Density (regular default) ----------------------------------------- */
|
|
1284
|
+
/* Density is selected via [data-density]; individual tokens below. */
|
|
1285
|
+
--gap: 11px;
|
|
1286
|
+
--pad: 12px;
|
|
1287
|
+
--fs: 14px;
|
|
1288
|
+
--radius: 7px;
|
|
1289
|
+
--stroke: 1.4px;
|
|
1290
|
+
|
|
1291
|
+
/* ---- Sketch wobble ----------------------------------------------------- */
|
|
1292
|
+
/* Default crisp (low sketch). setSketch() helper overrides these inline. */
|
|
1293
|
+
--wobble: none;
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
/* Density variants. Match the reference DENSITY map exactly. */
|
|
1297
|
+
.plan-wf[data-density="compact"] {
|
|
1298
|
+
--gap: 7px;
|
|
1299
|
+
--pad: 9px;
|
|
1300
|
+
--fs: 13px;
|
|
1301
|
+
--radius: 6px;
|
|
1302
|
+
--stroke: 1.3px;
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
.plan-wf[data-density="regular"] {
|
|
1306
|
+
--gap: 11px;
|
|
1307
|
+
--pad: 12px;
|
|
1308
|
+
--fs: 14px;
|
|
1309
|
+
--radius: 7px;
|
|
1310
|
+
--stroke: 1.4px;
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
.plan-wf[data-density="roomy"] {
|
|
1314
|
+
--gap: 15px;
|
|
1315
|
+
--pad: 17px;
|
|
1316
|
+
--fs: 15px;
|
|
1317
|
+
--radius: 9px;
|
|
1318
|
+
--stroke: 1.6px;
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
/* ---- Clean style: drop the hand-drawn font for a normal sans ------------- */
|
|
1322
|
+
/* In clean mode the rough overlay is off and frames get crisp CSS borders, so
|
|
1323
|
+
the handwriting font reads as out of place — switch to the sans stack. */
|
|
1324
|
+
.plan-wf[data-style="clean"] {
|
|
1325
|
+
--font-hand: var(--font-clean);
|
|
1326
|
+
--font-script: var(--font-clean);
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
/* ---- Rough sketch layer -------------------------------------------------- */
|
|
1330
|
+
/* The hand-drawn outlines are drawn by the rough.js overlay (kit/rough.tsx).
|
|
1331
|
+
Once it has measured + drawn, hide the crisp CSS borders so there is never a
|
|
1332
|
+
doubled border — fills and text stay, only the outline is replaced. */
|
|
1333
|
+
.plan-wf[data-rough-ready] [data-rough] {
|
|
1334
|
+
border-color: transparent !important;
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
/* ---- Skeleton / neutral loading register --------------------------------- */
|
|
1338
|
+
/* One block flips the WHOLE kit to a textless skeleton: no ink, no rough, no
|
|
1339
|
+
color — every primitive already reads these vars, so nothing else changes.
|
|
1340
|
+
A skeleton is boxes + bars only; real labels collapse to transparent so the
|
|
1341
|
+
silhouette is preserved without readable copy. */
|
|
1342
|
+
.plan-wf[data-skeleton="true"] {
|
|
1343
|
+
--ink: var(--skeleton-fill);
|
|
1344
|
+
--ink-soft: var(--skeleton-fill);
|
|
1345
|
+
--line: var(--skeleton-fill);
|
|
1346
|
+
--card: var(--skeleton-block);
|
|
1347
|
+
--accent: var(--skeleton-fill);
|
|
1348
|
+
--accent-soft: var(--skeleton-block);
|
|
1349
|
+
--warn: var(--skeleton-fill);
|
|
1350
|
+
--warn-soft: var(--skeleton-block);
|
|
1351
|
+
--ok: var(--skeleton-fill);
|
|
1352
|
+
--ok-soft: var(--skeleton-block);
|
|
1353
|
+
--stroke: 0px;
|
|
1354
|
+
--skeleton-fill: var(--plan-muted-line, hsl(var(--border)));
|
|
1355
|
+
--skeleton-block: var(--plan-block, hsl(var(--card)));
|
|
1356
|
+
}
|
|
1357
|
+
/* Textless: hide real labels but keep their layout footprint. */
|
|
1358
|
+
.plan-wf[data-skeleton="true"] * {
|
|
1359
|
+
color: transparent !important;
|
|
1360
|
+
border-color: transparent !important;
|
|
1361
|
+
}
|
|
1362
|
+
/* Soft rounded placeholder bars in skeleton mode. */
|
|
1363
|
+
.plan-wf[data-skeleton="true"] {
|
|
1364
|
+
--radius: 7px;
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
1368
|
+
.plan-wf[data-skeleton="true"] {
|
|
1369
|
+
animation: plan-skeleton-pulse 1.6s ease-in-out infinite;
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
@keyframes plan-skeleton-pulse {
|
|
1373
|
+
0%,
|
|
1374
|
+
100% {
|
|
1375
|
+
opacity: 1;
|
|
1376
|
+
}
|
|
1377
|
+
50% {
|
|
1378
|
+
opacity: 0.7;
|
|
1379
|
+
}
|
|
1380
|
+
}
|