@owomark/view 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +296 -0
- package/dist/chunk-Z7WJR3XO.js +1663 -0
- package/dist/index.d.ts +228 -0
- package/dist/index.js +2047 -0
- package/dist/static.d.ts +220 -0
- package/dist/static.js +40 -0
- package/package.json +85 -0
- package/src/mdx-components/mdx-components.css +336 -0
- package/src/style.css +15 -0
- package/src/theme/dark.css +79 -0
- package/src/theme/light.css +79 -0
- package/src/theme/owomark.css +159 -0
- package/src/theme/side-annotation.css +232 -0
- package/src/theme/slash-menu.css +88 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* OwoMark Dark Theme Preset */
|
|
2
|
+
|
|
3
|
+
.owo-theme-dark {
|
|
4
|
+
/* Base tokens — shared across editor and rendered output */
|
|
5
|
+
--owo-brand: #89b4fa;
|
|
6
|
+
--owo-text: #cdd6f4;
|
|
7
|
+
--owo-text-muted: #7f849c;
|
|
8
|
+
--owo-surface: #1e1e2e;
|
|
9
|
+
--owo-surface-raised: #252536;
|
|
10
|
+
--owo-border: #45475a;
|
|
11
|
+
--owo-border-strong: #585b70;
|
|
12
|
+
--owo-success: #a6e3a1;
|
|
13
|
+
--owo-warning: #fab387;
|
|
14
|
+
--owo-error: #f38ba8;
|
|
15
|
+
--owo-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
|
|
16
|
+
|
|
17
|
+
/* Surface — derived from base tokens */
|
|
18
|
+
--owo-editor-bg: var(--owo-surface);
|
|
19
|
+
--owo-editor-surface: var(--owo-surface-raised);
|
|
20
|
+
--owo-editor-surface-raised: #2a2a3c;
|
|
21
|
+
--owo-editor-panel-bg: var(--owo-surface-raised);
|
|
22
|
+
--owo-editor-gutter-bg: var(--owo-surface-raised);
|
|
23
|
+
|
|
24
|
+
/* Text — derived from base tokens where matching */
|
|
25
|
+
--owo-editor-text: var(--owo-text);
|
|
26
|
+
--owo-editor-muted: #7f849c;
|
|
27
|
+
--owo-editor-subtle: #585b70;
|
|
28
|
+
--owo-editor-heading: #f5f5f5;
|
|
29
|
+
--owo-editor-link: #89b4fa;
|
|
30
|
+
--owo-editor-code: #a6adc8;
|
|
31
|
+
--owo-editor-quote: #a6adc8;
|
|
32
|
+
|
|
33
|
+
/* Border */
|
|
34
|
+
--owo-editor-border: #45475a;
|
|
35
|
+
--owo-editor-border-strong: #585b70;
|
|
36
|
+
--owo-editor-divider: #45475a;
|
|
37
|
+
|
|
38
|
+
/* Placeholder */
|
|
39
|
+
--owo-editor-placeholder: #585b70;
|
|
40
|
+
|
|
41
|
+
/* Interaction */
|
|
42
|
+
--owo-editor-caret: #f5f5f5;
|
|
43
|
+
--owo-editor-selection-bg: rgba(137, 180, 250, 0.2);
|
|
44
|
+
--owo-editor-selection-text: inherit;
|
|
45
|
+
--owo-editor-focus-ring: rgba(137, 180, 250, 0.35);
|
|
46
|
+
--owo-editor-active-bg: rgba(137, 180, 250, 0.1);
|
|
47
|
+
--owo-editor-hover-bg: rgba(205, 214, 244, 0.06);
|
|
48
|
+
|
|
49
|
+
/* Syntax */
|
|
50
|
+
--owo-syntax-marker: #585b70;
|
|
51
|
+
--owo-syntax-heading-marker: #7f849c;
|
|
52
|
+
--owo-syntax-keyword: #cba6f7;
|
|
53
|
+
--owo-syntax-string: #a6e3a1;
|
|
54
|
+
--owo-syntax-number: #cba6f7;
|
|
55
|
+
--owo-syntax-comment: #6c7086;
|
|
56
|
+
--owo-syntax-link-url: #89b4fa;
|
|
57
|
+
--owo-syntax-inline-code: #94e2d5;
|
|
58
|
+
--owo-syntax-inline-code-bg: rgba(88, 91, 112, 0.35);
|
|
59
|
+
--owo-syntax-code-fence: #7f849c;
|
|
60
|
+
--owo-syntax-code-lang: #fab387;
|
|
61
|
+
--owo-syntax-list-marker: #fab387;
|
|
62
|
+
--owo-syntax-blockquote-marker: #585b70;
|
|
63
|
+
--owo-syntax-hr: #45475a;
|
|
64
|
+
|
|
65
|
+
/* Toolbar */
|
|
66
|
+
--owo-toolbar-bg: #252536;
|
|
67
|
+
--owo-toolbar-text: #bac2de;
|
|
68
|
+
--owo-toolbar-icon: #a6adc8;
|
|
69
|
+
--owo-toolbar-border: #45475a;
|
|
70
|
+
--owo-toolbar-button-bg: transparent;
|
|
71
|
+
--owo-toolbar-button-hover-bg: rgba(205, 214, 244, 0.08);
|
|
72
|
+
--owo-toolbar-button-active-bg: rgba(137, 180, 250, 0.12);
|
|
73
|
+
|
|
74
|
+
/* Panel */
|
|
75
|
+
--owo-panel-bg: #2a2a3c;
|
|
76
|
+
--owo-panel-text: #cdd6f4;
|
|
77
|
+
--owo-panel-border: #45475a;
|
|
78
|
+
--owo-panel-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
|
|
79
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* OwoMark Light Theme Preset */
|
|
2
|
+
|
|
3
|
+
.owo-theme-light {
|
|
4
|
+
/* Base tokens — shared across editor and rendered output */
|
|
5
|
+
--owo-brand: #3b82f6;
|
|
6
|
+
--owo-text: #1f2937;
|
|
7
|
+
--owo-text-muted: #64748b;
|
|
8
|
+
--owo-surface: #ffffff;
|
|
9
|
+
--owo-surface-raised: #f8fafc;
|
|
10
|
+
--owo-border: #e2e8f0;
|
|
11
|
+
--owo-border-strong: #cbd5e1;
|
|
12
|
+
--owo-success: #22c55e;
|
|
13
|
+
--owo-warning: #f59e0b;
|
|
14
|
+
--owo-error: #ef4444;
|
|
15
|
+
--owo-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
|
|
16
|
+
|
|
17
|
+
/* Surface — derived from base tokens */
|
|
18
|
+
--owo-editor-bg: var(--owo-surface);
|
|
19
|
+
--owo-editor-surface: var(--owo-surface-raised);
|
|
20
|
+
--owo-editor-surface-raised: #ffffff;
|
|
21
|
+
--owo-editor-panel-bg: var(--owo-surface-raised);
|
|
22
|
+
--owo-editor-gutter-bg: var(--owo-surface-raised);
|
|
23
|
+
|
|
24
|
+
/* Text — derived from base tokens where matching */
|
|
25
|
+
--owo-editor-text: var(--owo-text);
|
|
26
|
+
--owo-editor-muted: #6b7280;
|
|
27
|
+
--owo-editor-subtle: #9ca3af;
|
|
28
|
+
--owo-editor-heading: #111827;
|
|
29
|
+
--owo-editor-link: #2563eb;
|
|
30
|
+
--owo-editor-code: #475569;
|
|
31
|
+
--owo-editor-quote: #374151;
|
|
32
|
+
|
|
33
|
+
/* Border */
|
|
34
|
+
--owo-editor-border: #e5e7eb;
|
|
35
|
+
--owo-editor-border-strong: #cbd5e1;
|
|
36
|
+
--owo-editor-divider: #e5e7eb;
|
|
37
|
+
|
|
38
|
+
/* Placeholder */
|
|
39
|
+
--owo-editor-placeholder: #9ca3af;
|
|
40
|
+
|
|
41
|
+
/* Interaction */
|
|
42
|
+
--owo-editor-caret: #111827;
|
|
43
|
+
--owo-editor-selection-bg: rgba(37, 99, 235, 0.18);
|
|
44
|
+
--owo-editor-selection-text: inherit;
|
|
45
|
+
--owo-editor-focus-ring: rgba(37, 99, 235, 0.35);
|
|
46
|
+
--owo-editor-active-bg: rgba(37, 99, 235, 0.08);
|
|
47
|
+
--owo-editor-hover-bg: rgba(15, 23, 42, 0.04);
|
|
48
|
+
|
|
49
|
+
/* Syntax */
|
|
50
|
+
--owo-syntax-marker: #9ca3af;
|
|
51
|
+
--owo-syntax-heading-marker: #64748b;
|
|
52
|
+
--owo-syntax-keyword: #7c3aed;
|
|
53
|
+
--owo-syntax-string: #0f766e;
|
|
54
|
+
--owo-syntax-number: #7c3aed;
|
|
55
|
+
--owo-syntax-comment: #94a3b8;
|
|
56
|
+
--owo-syntax-link-url: #2563eb;
|
|
57
|
+
--owo-syntax-inline-code: #0f766e;
|
|
58
|
+
--owo-syntax-inline-code-bg: rgba(148, 163, 184, 0.16);
|
|
59
|
+
--owo-syntax-code-fence: #64748b;
|
|
60
|
+
--owo-syntax-code-lang: #ea580c;
|
|
61
|
+
--owo-syntax-list-marker: #ea580c;
|
|
62
|
+
--owo-syntax-blockquote-marker: #9ca3af;
|
|
63
|
+
--owo-syntax-hr: #d1d5db;
|
|
64
|
+
|
|
65
|
+
/* Toolbar */
|
|
66
|
+
--owo-toolbar-bg: #f8fafc;
|
|
67
|
+
--owo-toolbar-text: #334155;
|
|
68
|
+
--owo-toolbar-icon: #475569;
|
|
69
|
+
--owo-toolbar-border: #e2e8f0;
|
|
70
|
+
--owo-toolbar-button-bg: transparent;
|
|
71
|
+
--owo-toolbar-button-hover-bg: rgba(15, 23, 42, 0.06);
|
|
72
|
+
--owo-toolbar-button-active-bg: rgba(37, 99, 235, 0.1);
|
|
73
|
+
|
|
74
|
+
/* Panel */
|
|
75
|
+
--owo-panel-bg: #ffffff;
|
|
76
|
+
--owo-panel-text: #1f2937;
|
|
77
|
+
--owo-panel-border: #e5e7eb;
|
|
78
|
+
--owo-panel-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
|
|
79
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/* OwoMark base styles — consumes only --owo-* tokens */
|
|
2
|
+
|
|
3
|
+
.owo-editor-root {
|
|
4
|
+
background-color: var(--owo-editor-bg, #ffffff);
|
|
5
|
+
color: var(--owo-editor-text, #1f2937);
|
|
6
|
+
caret-color: var(--owo-editor-caret, #111827);
|
|
7
|
+
font-family: inherit;
|
|
8
|
+
font-size: inherit;
|
|
9
|
+
line-height: 1.75;
|
|
10
|
+
padding: 1rem;
|
|
11
|
+
border: 1px solid var(--owo-editor-border, #e5e7eb);
|
|
12
|
+
border-radius: 0.375rem;
|
|
13
|
+
min-height: 12rem;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.owo-editor-root:focus {
|
|
17
|
+
outline: none;
|
|
18
|
+
box-shadow: 0 0 0 2px var(--owo-editor-focus-ring, rgba(37, 99, 235, 0.35));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* Placeholder — shown when the editor has no content */
|
|
22
|
+
.owo-editor-root:empty::before,
|
|
23
|
+
.owo-editor-root[data-owo-empty="true"]::before {
|
|
24
|
+
content: attr(data-placeholder);
|
|
25
|
+
color: var(--owo-editor-placeholder, #9ca3af);
|
|
26
|
+
pointer-events: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.owo-editor-root::selection,
|
|
30
|
+
.owo-editor-root *::selection {
|
|
31
|
+
background-color: var(--owo-editor-selection-bg, rgba(37, 99, 235, 0.18));
|
|
32
|
+
color: var(--owo-editor-selection-text, inherit);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* Block styles */
|
|
36
|
+
|
|
37
|
+
.owo-block-heading {
|
|
38
|
+
color: var(--owo-editor-heading, #111827);
|
|
39
|
+
font-family: var(--owo-editor-heading-font, inherit);
|
|
40
|
+
font-weight: 600;
|
|
41
|
+
letter-spacing: -0.02em;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.owo-block-heading[data-owo-heading="1"] { font-size: 1.875em; line-height: 1.2; margin-top: 0.75em; margin-bottom: 0.5em; }
|
|
45
|
+
.owo-block-heading[data-owo-heading="2"] { font-size: 1.5em; line-height: 1.25; margin-top: 0.6em; margin-bottom: 0.35em; }
|
|
46
|
+
.owo-block-heading[data-owo-heading="3"] { font-size: 1.25em; line-height: 1.3; margin-top: 0.5em; margin-bottom: 0.25em; }
|
|
47
|
+
.owo-block-heading[data-owo-heading="4"] { font-size: 1.125em; margin-top: 0.4em; margin-bottom: 0.2em; }
|
|
48
|
+
.owo-block-heading[data-owo-heading="5"] { font-size: 1em; margin-top: 0.3em; margin-bottom: 0.15em; }
|
|
49
|
+
.owo-block-heading[data-owo-heading="6"] { font-size: 0.875em; margin-top: 0.3em; margin-bottom: 0.15em; }
|
|
50
|
+
|
|
51
|
+
.owo-block-blockquote {
|
|
52
|
+
color: var(--owo-editor-quote, #374151);
|
|
53
|
+
border-left: 3px solid var(--owo-editor-border-strong, #cbd5e1);
|
|
54
|
+
padding-left: 0.75rem;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
.owo-block-code-fence {
|
|
59
|
+
background-color: var(--owo-syntax-inline-code-bg, rgba(148, 163, 184, 0.16));
|
|
60
|
+
border-radius: 0.25rem;
|
|
61
|
+
padding: 0.25rem 0 0;
|
|
62
|
+
line-height: 1.4;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.owo-block-code-fence > .owo-syntax-fence:last-child {
|
|
66
|
+
line-height: 1;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.owo-block-directive-container {
|
|
70
|
+
background-color: var(--owo-directive-bg, rgba(99, 102, 241, 0.06));
|
|
71
|
+
border-left: 2px solid var(--owo-directive-border, rgba(99, 102, 241, 0.3));
|
|
72
|
+
border-radius: 0.25rem;
|
|
73
|
+
padding: 0.25rem 0 0 0.5rem;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.owo-block-hr {
|
|
77
|
+
color: var(--owo-syntax-hr, #d1d5db);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* Syntax decoration */
|
|
81
|
+
|
|
82
|
+
.owo-syntax-marker {
|
|
83
|
+
color: var(--owo-syntax-marker, #9ca3af);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.owo-syntax-heading-marker {
|
|
87
|
+
color: var(--owo-syntax-heading-marker, #64748b);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.owo-syntax-strong {
|
|
91
|
+
font-weight: 700;
|
|
92
|
+
color: var(--owo-editor-text, #1f2937);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.owo-syntax-emphasis {
|
|
96
|
+
font-style: italic;
|
|
97
|
+
color: var(--owo-editor-text, #1f2937);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.owo-syntax-inline-code {
|
|
101
|
+
color: var(--owo-syntax-inline-code, #0f766e);
|
|
102
|
+
background-color: var(--owo-syntax-inline-code-bg, rgba(148, 163, 184, 0.16));
|
|
103
|
+
padding: 0.1em 0.3em;
|
|
104
|
+
border-radius: 0.2em;
|
|
105
|
+
font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
|
|
106
|
+
font-size: 0.9em;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.owo-syntax-link-text {
|
|
110
|
+
color: var(--owo-editor-link, #2563eb);
|
|
111
|
+
text-decoration: underline;
|
|
112
|
+
text-underline-offset: 2px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.owo-syntax-link-url {
|
|
116
|
+
color: var(--owo-syntax-link-url, #2563eb);
|
|
117
|
+
opacity: 0.7;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.owo-syntax-list-marker {
|
|
121
|
+
color: var(--owo-syntax-list-marker, #ea580c);
|
|
122
|
+
font-weight: 600;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.owo-syntax-blockquote-marker {
|
|
126
|
+
color: transparent;
|
|
127
|
+
font-size: inherit;
|
|
128
|
+
letter-spacing: -0.25em;
|
|
129
|
+
user-select: none;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.owo-syntax-fence {
|
|
133
|
+
color: var(--owo-syntax-code-fence, #64748b);
|
|
134
|
+
font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.owo-syntax-fence-lang {
|
|
138
|
+
color: var(--owo-syntax-code-lang, #ea580c);
|
|
139
|
+
font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.owo-syntax-code-block {
|
|
143
|
+
color: var(--owo-editor-code, #475569);
|
|
144
|
+
font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
|
|
145
|
+
font-size: 0.9em;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.owo-syntax-hr {
|
|
149
|
+
color: var(--owo-syntax-hr, #d1d5db);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.owo-syntax-html {
|
|
153
|
+
color: var(--owo-syntax-keyword, #7c3aed);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.owo-syntax-math {
|
|
157
|
+
color: var(--owo-syntax-string, #0f766e);
|
|
158
|
+
font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
|
|
159
|
+
}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/* Side Annotation — Tight Annotation layout
|
|
2
|
+
*
|
|
3
|
+
* Content column shrinks to its natural width; annotation sits
|
|
4
|
+
* immediately to its right. The whole container is only as wide
|
|
5
|
+
* as content + gap + annotation (capped at 100 % of parent).
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/* Grid container */
|
|
9
|
+
.side-annotation {
|
|
10
|
+
display: grid;
|
|
11
|
+
grid-template-columns: auto auto;
|
|
12
|
+
width: fit-content;
|
|
13
|
+
max-width: 100%;
|
|
14
|
+
gap: 0 0.75rem;
|
|
15
|
+
align-items: stretch;
|
|
16
|
+
margin: 0.5rem 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Main content column — flex for vertical centering */
|
|
20
|
+
.side-annotation-main {
|
|
21
|
+
min-width: 0;
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.side-annotation-main > *:first-child {
|
|
28
|
+
margin-top: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.side-annotation-main > *:last-child {
|
|
32
|
+
margin-bottom: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* Side column — use grid so the stretch SVG can fill the cell height
|
|
36
|
+
without its viewBox intrinsic height inflating the grid row. */
|
|
37
|
+
.side-annotation-aside {
|
|
38
|
+
display: grid;
|
|
39
|
+
grid-template-columns: auto 1fr;
|
|
40
|
+
align-items: center;
|
|
41
|
+
gap: 0 0.375rem;
|
|
42
|
+
font-size: 0.85em;
|
|
43
|
+
color: var(--owo-side-text, #6b7280);
|
|
44
|
+
line-height: 1.4;
|
|
45
|
+
min-width: 0;
|
|
46
|
+
max-width: var(--owo-side-max-width, 220px);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* When no SVG (plain type), text spans both columns */
|
|
50
|
+
.side-annotation-text {
|
|
51
|
+
min-width: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* SVG decorations — shared */
|
|
55
|
+
.side-annotation-svg {
|
|
56
|
+
color: var(--owo-side-decoration, #9ca3af);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Segmented SVG container — flex column for stretch decorations.
|
|
60
|
+
Fixed-height SVG caps/beaks keep their shape at any height;
|
|
61
|
+
only the line divs between them stretch.
|
|
62
|
+
See ADR-014 for design rationale. */
|
|
63
|
+
.side-svg-segmented {
|
|
64
|
+
--side-svg-axis: 50%;
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: column;
|
|
67
|
+
align-items: center;
|
|
68
|
+
align-self: stretch;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.side-svg-cap,
|
|
72
|
+
.side-svg-beak {
|
|
73
|
+
flex: 0 0 auto;
|
|
74
|
+
display: block;
|
|
75
|
+
position: relative;
|
|
76
|
+
z-index: 2;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.side-svg-line {
|
|
80
|
+
flex: 1 1 0;
|
|
81
|
+
align-self: stretch;
|
|
82
|
+
position: relative;
|
|
83
|
+
margin: -1px 0;
|
|
84
|
+
z-index: 1;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.side-svg-line::after {
|
|
88
|
+
content: '';
|
|
89
|
+
position: absolute;
|
|
90
|
+
top: -1px;
|
|
91
|
+
bottom: -1px;
|
|
92
|
+
left: calc(var(--side-svg-axis) - 0.75px);
|
|
93
|
+
width: 1.5px;
|
|
94
|
+
background: currentColor;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* Compound arrows render additional geometry to the right of the main axis.
|
|
98
|
+
Reserve more text gap so overflow-visible arrow strokes never sit on top of copy. */
|
|
99
|
+
.side-type-brace-arrow .side-annotation-aside,
|
|
100
|
+
.side-type-brace-fat-arrow .side-annotation-aside,
|
|
101
|
+
.side-type-bracket-arrow .side-annotation-aside,
|
|
102
|
+
.side-type-bracket-fat-arrow .side-annotation-aside,
|
|
103
|
+
.side-type-line-arrow .side-annotation-aside,
|
|
104
|
+
.side-type-line-fat-arrow .side-annotation-aside {
|
|
105
|
+
gap: 0 1.2rem;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Non-segmented vertical line (for line / warning / question types) */
|
|
109
|
+
.side-svg-vline {
|
|
110
|
+
align-self: stretch;
|
|
111
|
+
height: 0;
|
|
112
|
+
min-height: 100%;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* Non-stretch SVGs (arrow, dash) center vertically */
|
|
116
|
+
.side-svg-arrow,
|
|
117
|
+
.side-svg-fat-arrow,
|
|
118
|
+
.side-svg-wave-arrow,
|
|
119
|
+
.side-svg-dash {
|
|
120
|
+
align-self: center;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* --- Type-specific colors --- */
|
|
124
|
+
|
|
125
|
+
/* Warning */
|
|
126
|
+
.side-type-warning .side-annotation-aside {
|
|
127
|
+
color: var(--owo-side-warning, #d97706);
|
|
128
|
+
}
|
|
129
|
+
.side-type-warning .side-annotation-svg {
|
|
130
|
+
color: var(--owo-side-warning, #d97706);
|
|
131
|
+
}
|
|
132
|
+
.side-type-warning .side-annotation-text::after {
|
|
133
|
+
content: '\26A0\FE0F'; /* ⚠️ */
|
|
134
|
+
margin-left: 0.25rem;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* Question */
|
|
138
|
+
.side-type-question .side-annotation-aside {
|
|
139
|
+
color: var(--owo-side-question, #2563eb);
|
|
140
|
+
}
|
|
141
|
+
.side-type-question .side-annotation-svg {
|
|
142
|
+
color: var(--owo-side-question, #2563eb);
|
|
143
|
+
}
|
|
144
|
+
.side-type-question .side-annotation-text::after {
|
|
145
|
+
content: '\2753'; /* ❓ */
|
|
146
|
+
margin-left: 0.25rem;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* Brace-warning (compound) */
|
|
150
|
+
.side-type-brace-warning .side-annotation-aside {
|
|
151
|
+
color: var(--owo-side-warning, #d97706);
|
|
152
|
+
}
|
|
153
|
+
.side-type-brace-warning .side-annotation-svg {
|
|
154
|
+
color: var(--owo-side-warning, #d97706);
|
|
155
|
+
}
|
|
156
|
+
.side-type-brace-warning .side-annotation-text::after {
|
|
157
|
+
content: '\26A0\FE0F'; /* ⚠️ */
|
|
158
|
+
margin-left: 0.25rem;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* Brace-question (compound) */
|
|
162
|
+
.side-type-brace-question .side-annotation-aside {
|
|
163
|
+
color: var(--owo-side-question, #2563eb);
|
|
164
|
+
}
|
|
165
|
+
.side-type-brace-question .side-annotation-svg {
|
|
166
|
+
color: var(--owo-side-question, #2563eb);
|
|
167
|
+
}
|
|
168
|
+
.side-type-brace-question .side-annotation-text::after {
|
|
169
|
+
content: '\2753'; /* ❓ */
|
|
170
|
+
margin-left: 0.25rem;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/* Orphan — semi-transparent dashed line */
|
|
174
|
+
.side-orphan .side-annotation-aside {
|
|
175
|
+
opacity: 0.4;
|
|
176
|
+
}
|
|
177
|
+
.side-orphan .side-annotation-svg {
|
|
178
|
+
stroke-dasharray: 4 3;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/* Plain — no decoration, just text */
|
|
182
|
+
.side-type-plain .side-annotation-aside {
|
|
183
|
+
padding-left: 0.25rem;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/* --- Mobile fallback: < 768px → callout --- */
|
|
187
|
+
@media (max-width: 767px) {
|
|
188
|
+
.side-annotation {
|
|
189
|
+
display: block;
|
|
190
|
+
width: auto;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.side-annotation-aside {
|
|
194
|
+
max-width: none;
|
|
195
|
+
margin-top: 0.375rem;
|
|
196
|
+
padding: 0.5rem 0.75rem;
|
|
197
|
+
background: var(--owo-side-callout-bg, #f3f4f6);
|
|
198
|
+
border-left: 3px solid var(--owo-side-callout-border, #9ca3af);
|
|
199
|
+
border-radius: 0 0.25rem 0.25rem 0;
|
|
200
|
+
font-size: 0.85em;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.side-svg-segmented,
|
|
204
|
+
.side-svg-vline {
|
|
205
|
+
display: none;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.side-type-warning .side-annotation-aside {
|
|
209
|
+
background: var(--owo-side-warning-bg, #fffbeb);
|
|
210
|
+
border-left-color: var(--owo-side-warning, #d97706);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.side-type-question .side-annotation-aside {
|
|
214
|
+
background: var(--owo-side-question-bg, #eff6ff);
|
|
215
|
+
border-left-color: var(--owo-side-question, #2563eb);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* Phase 3: Offset annotation indicator (when JS positioner pushes annotation down) */
|
|
220
|
+
.side-annotation-offset {
|
|
221
|
+
transition: top 0.2s ease-out;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.side-annotation-offset::before {
|
|
225
|
+
content: '';
|
|
226
|
+
position: absolute;
|
|
227
|
+
top: calc(-1 * var(--owo-side-offset, 0px));
|
|
228
|
+
left: 0;
|
|
229
|
+
width: 1px;
|
|
230
|
+
height: var(--owo-side-offset, 0px);
|
|
231
|
+
border-left: 1px dashed var(--owo-side-offset-line, #cbd5e1);
|
|
232
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/* OwoMark Slash Menu Styles */
|
|
2
|
+
|
|
3
|
+
.owo-slash-menu {
|
|
4
|
+
background: var(--owo-editor-surface-raised, #ffffff);
|
|
5
|
+
border: 1px solid var(--owo-editor-border, #e5e7eb);
|
|
6
|
+
border-radius: 8px;
|
|
7
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
|
|
8
|
+
padding: 4px;
|
|
9
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
10
|
+
font-size: 14px;
|
|
11
|
+
color: var(--owo-editor-text, #1f2937);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.owo-slash-menu__group + .owo-slash-menu__group {
|
|
15
|
+
border-top: 1px solid var(--owo-editor-divider, #e5e7eb);
|
|
16
|
+
margin-top: 4px;
|
|
17
|
+
padding-top: 4px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.owo-slash-menu__category {
|
|
21
|
+
padding: 4px 8px 2px;
|
|
22
|
+
font-size: 11px;
|
|
23
|
+
font-weight: 600;
|
|
24
|
+
text-transform: uppercase;
|
|
25
|
+
letter-spacing: 0.05em;
|
|
26
|
+
color: var(--owo-editor-muted, #6b7280);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.owo-slash-menu__item {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: 8px;
|
|
33
|
+
padding: 6px 8px;
|
|
34
|
+
border-radius: 4px;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
transition: background-color 0.1s;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.owo-slash-menu__item:hover,
|
|
40
|
+
.owo-slash-menu__item--selected {
|
|
41
|
+
background: var(--owo-editor-selection-bg, rgba(37, 99, 235, 0.12));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.owo-slash-menu__icon {
|
|
45
|
+
flex-shrink: 0;
|
|
46
|
+
width: 20px;
|
|
47
|
+
height: 20px;
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
color: var(--owo-editor-muted, #6b7280);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.owo-slash-menu__content {
|
|
55
|
+
flex: 1;
|
|
56
|
+
min-width: 0;
|
|
57
|
+
display: flex;
|
|
58
|
+
flex-wrap: wrap;
|
|
59
|
+
align-items: baseline;
|
|
60
|
+
gap: 4px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.owo-slash-menu__label {
|
|
64
|
+
font-weight: 500;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.owo-slash-menu__shortcut {
|
|
68
|
+
margin-left: auto;
|
|
69
|
+
font-size: 11px;
|
|
70
|
+
color: var(--owo-editor-subtle, #9ca3af);
|
|
71
|
+
font-family: ui-monospace, 'SF Mono', monospace;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.owo-slash-menu__desc {
|
|
75
|
+
width: 100%;
|
|
76
|
+
font-size: 12px;
|
|
77
|
+
color: var(--owo-editor-muted, #6b7280);
|
|
78
|
+
white-space: nowrap;
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
text-overflow: ellipsis;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.owo-slash-menu__pending {
|
|
84
|
+
padding: 8px;
|
|
85
|
+
text-align: center;
|
|
86
|
+
font-size: 12px;
|
|
87
|
+
color: var(--owo-editor-muted, #6b7280);
|
|
88
|
+
}
|