@june-ai/june-ui 0.2.4 → 0.2.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/dist/june.css CHANGED
@@ -28,121 +28,463 @@
28
28
  border-radius: 8px;
29
29
  color: var(--june-danger, #b91c1c);
30
30
  }
31
- .june-doc {
32
- --jd-bg: #ffffff;
33
- --jd-fg: #111827;
34
- --jd-muted: #6b7280;
35
- --jd-border: #e5e7eb;
36
- --jd-surface: #f9fafb;
37
- --jd-accent: #4f46e5;
38
- --jd-warn-bg: #fffbeb;
39
- --jd-warn-border: #fcd34d;
40
- --jd-danger: #b91c1c;
41
- box-sizing: border-box;
42
- display: flex;
43
- flex-direction: column;
44
- width: 100%;
45
- max-width: 100%;
46
- min-width: 0;
47
- margin: 8px 0;
48
- color: var(--jd-fg);
49
- background: var(--jd-bg);
50
- border: 1px solid var(--jd-border);
51
- border-radius: 10px;
52
- overflow: hidden;
53
- font-family: inherit;
54
- }
55
- .june-doc[data-theme="dark"] {
56
- --jd-bg: #0f1420;
57
- --jd-fg: #f3f4f6;
58
- --jd-muted: #9ca3af;
59
- --jd-border: #263043;
60
- --jd-surface: #151b2a;
61
- --jd-accent: #818cf8;
62
- --jd-warn-bg: #2a2208;
63
- --jd-warn-border: #8a6d0b;
64
- --jd-danger: #f87171;
65
- }
66
- .june-doc *, .june-doc *::before, .june-doc *::after { box-sizing: border-box; }
67
-
68
- .june-doc__header { display: flex; align-items: center; gap: 8px; padding: 12px 16px 4px; }
69
- .june-doc__title {
70
- flex: 1; min-width: 0; padding: 4px 0; font: inherit; font-size: 1.25rem; font-weight: 700;
71
- color: inherit; background: transparent; border: 0; border-bottom: 1px solid transparent; outline: none;
72
- }
73
- .june-doc__title:focus { border-bottom-color: var(--jd-accent); }
74
- .june-doc__badge {
75
- flex: none; padding: 2px 8px; font-size: 0.75rem; color: var(--jd-muted);
76
- background: var(--jd-surface); border: 1px solid var(--jd-border); border-radius: 999px;
77
- }
78
-
79
- .june-doc__banner {
80
- display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
81
- margin: 8px 16px; padding: 8px 12px; font-size: 0.875rem;
82
- background: var(--jd-warn-bg); border: 1px solid var(--jd-warn-border); border-radius: 8px;
83
- }
84
- .june-doc__banner-actions { display: flex; flex-wrap: wrap; gap: 6px; }
85
-
86
- .june-doc__toolbar {
87
- display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px;
88
- background: var(--jd-surface); border-top: 1px solid var(--jd-border); border-bottom: 1px solid var(--jd-border);
89
- }
90
- .june-doc__group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
91
- .june-doc__group--end { margin-left: auto; }
92
- .june-doc__btn, .june-doc__select, .june-doc__input {
93
- min-height: 30px; padding: 3px 9px; font: inherit; font-size: 0.8125rem; color: inherit;
94
- background: var(--jd-bg); border: 1px solid var(--jd-border); border-radius: 6px;
95
- }
96
- .june-doc__btn { cursor: pointer; }
97
- .june-doc__btn:hover:not(:disabled) { border-color: var(--jd-accent); }
98
- .june-doc__btn[data-active] { color: var(--jd-bg); background: var(--jd-accent); border-color: var(--jd-accent); }
99
- .june-doc__btn:disabled, .june-doc__select:disabled { opacity: 0.45; cursor: not-allowed; }
100
- .june-doc__btn:focus-visible, .june-doc__select:focus-visible, .june-doc__input:focus-visible,
101
- .june-doc__title:focus-visible { outline: 2px solid var(--jd-accent); outline-offset: 1px; }
102
- .june-doc__linkbar { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
103
- .june-doc__input { flex: 1; min-width: 180px; }
104
-
105
- .june-doc__content { padding: 4px 16px 12px; max-height: min(70vh, 720px); overflow: auto; }
106
- .june-doc__prose { min-height: 160px; outline: none; line-height: 1.65; overflow-wrap: anywhere; }
107
- .june-doc__prose > :first-child { margin-top: 0.5em; }
108
- .june-doc__prose h1 { font-size: 1.6rem; line-height: 1.25; margin: 1.2em 0 0.4em; }
109
- .june-doc__prose h2 { font-size: 1.3rem; line-height: 1.3; margin: 1.1em 0 0.4em; }
110
- .june-doc__prose h3 { font-size: 1.1rem; line-height: 1.35; margin: 1em 0 0.3em; }
111
- .june-doc__prose p { margin: 0.6em 0; }
112
- .june-doc__prose ul, .june-doc__prose ol { margin: 0.6em 0; padding-left: 1.5em; }
113
- .june-doc__prose blockquote { margin: 0.8em 0; padding-left: 1em; color: var(--jd-muted); border-left: 3px solid var(--jd-border); }
114
- .june-doc__prose a { color: var(--jd-accent); text-decoration: underline; }
115
- .june-doc__prose code { padding: 1px 4px; font-size: 0.9em; background: var(--jd-surface); border-radius: 4px; }
116
- .june-doc__prose pre { padding: 10px 12px; overflow: auto; background: var(--jd-surface); border-radius: 6px; }
117
- .june-doc__prose pre code { padding: 0; background: transparent; }
118
- .june-doc__prose hr { border: 0; border-top: 1px solid var(--jd-border); margin: 1.2em 0; }
119
- .june-doc__prose table { width: 100%; margin: 0.8em 0; border-collapse: collapse; table-layout: fixed; }
120
- .june-doc__prose th, .june-doc__prose td {
121
- position: relative; padding: 6px 10px; text-align: left; vertical-align: top; border: 1px solid var(--jd-border);
122
- }
123
- .june-doc__prose th { font-weight: 600; background: var(--jd-surface); }
124
- .june-doc__prose .selectedCell::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--jd-accent) 18%, transparent); pointer-events: none; }
125
-
126
- .june-doc__footer {
127
- display: flex; justify-content: space-between; gap: 8px; padding: 6px 16px;
128
- font-size: 0.75rem; color: var(--jd-muted); border-top: 1px solid var(--jd-border);
129
- }
130
-
131
- .june-doc--draft, .june-doc--error { padding: 14px 16px; gap: 8px; }
132
- .june-doc__draft-title { margin: 0; font-weight: 700; }
133
- .june-doc__draft-text { margin: 0; color: var(--jd-muted); }
134
- .june-doc--error .june-doc__draft-text { color: var(--jd-danger); }
135
- .june-doc__raw { margin: 8px 0 0; max-height: 240px; padding: 8px; overflow: auto; white-space: pre-wrap; background: var(--jd-surface); border-radius: 6px; }
136
- .june-doc__pulse { display: flex; flex-direction: column; gap: 6px; }
137
- .june-doc__pulse span { height: 10px; background: var(--jd-surface); border-radius: 4px; animation: june-doc-pulse 1.2s ease-in-out infinite; }
138
- .june-doc__pulse span:nth-child(2) { width: 85%; animation-delay: 0.15s; }
139
- .june-doc__pulse span:nth-child(3) { width: 60%; animation-delay: 0.3s; }
140
- @keyframes june-doc-pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
141
- @media (prefers-reduced-motion: reduce) { .june-doc__pulse span { animation: none; } }
142
-
143
- @media (max-width: 640px) {
144
- .june-doc__toolbar { flex-wrap: nowrap; overflow-x: auto; }
145
- .june-doc__group { flex: none; }
146
- .june-doc__group--end { margin-left: 0; }
147
- .june-doc__content { padding: 4px 12px 10px; }
148
- }
31
+ /* ============================== June Document Editor ============================== */
32
+ .june-doc {
33
+ --jd-bg: #ffffff;
34
+ --jd-fg: #111827;
35
+ --jd-muted: #6b7280;
36
+ --jd-faint: #9ca3af;
37
+ --jd-border: #e5e7eb;
38
+ --jd-border-strong: #d1d5db;
39
+ --jd-surface: #f9fafb;
40
+ --jd-hover: #f3f4f6;
41
+ --jd-pressed: #e5e7eb;
42
+ --jd-canvas: #eceff3;
43
+ --jd-page: #ffffff;
44
+ --jd-page-fg: #111827;
45
+ --jd-page-line: #dfe3e8;
46
+ --jd-accent: #4f46e5;
47
+ --jd-solid: #0b0b0f;
48
+ --jd-solid-fg: #ffffff;
49
+ --jd-warn-bg: #fffbeb;
50
+ --jd-warn-border: #fcd34d;
51
+ --jd-danger: #b91c1c;
52
+ --jd-ok: #15803d;
53
+ --jd-match: #fde68a;
54
+ --jd-match-active: #f59e0b;
55
+ --jd-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.08);
56
+ --jd-pop-shadow: 0 12px 32px rgba(16, 24, 40, 0.16), 0 2px 6px rgba(16, 24, 40, 0.08);
57
+ --jd-radius: 12px;
58
+ box-sizing: border-box;
59
+ position: relative;
60
+ display: flex;
61
+ flex-direction: column;
62
+ width: 100%;
63
+ max-width: 100%;
64
+ min-width: 0;
65
+ margin: 8px 0;
66
+ color: var(--jd-fg);
67
+ background: var(--jd-bg);
68
+ border: 1px solid var(--jd-border);
69
+ border-radius: var(--jd-radius);
70
+ box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
71
+ font-family: inherit;
72
+ font-size: 14px;
73
+ line-height: 1.4;
74
+ text-align: left;
75
+ container-type: inline-size;
76
+ container-name: june-doc;
77
+ }
78
+ .june-doc[data-theme="dark"] {
79
+ --jd-bg: #0f1420;
80
+ --jd-fg: #f3f4f6;
81
+ --jd-muted: #9ca3af;
82
+ --jd-faint: #6b7280;
83
+ --jd-border: #263043;
84
+ --jd-border-strong: #334155;
85
+ --jd-surface: #151b2a;
86
+ --jd-hover: #1c2436;
87
+ --jd-pressed: #263043;
88
+ --jd-canvas: #0a0e17;
89
+ --jd-page: #151b2a;
90
+ --jd-page-fg: #e5e7eb;
91
+ --jd-page-line: #263043;
92
+ --jd-accent: #818cf8;
93
+ --jd-solid: #f3f4f6;
94
+ --jd-solid-fg: #0b0b0f;
95
+ --jd-warn-bg: #2a2208;
96
+ --jd-warn-border: #8a6d0b;
97
+ --jd-danger: #f87171;
98
+ --jd-ok: #4ade80;
99
+ --jd-match: #854d0e;
100
+ --jd-match-active: #d97706;
101
+ --jd-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
102
+ --jd-pop-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
103
+ }
104
+ .june-doc *, .june-doc *::before, .june-doc *::after { box-sizing: border-box; }
105
+ .june-doc__icon { flex: none; display: block; }
106
+
107
+ /* ---------- full screen ---------- */
108
+ .june-doc--fullscreen {
109
+ position: fixed;
110
+ inset: 0;
111
+ z-index: 2147483000;
112
+ margin: 0;
113
+ border: 0;
114
+ border-radius: 0;
115
+ box-shadow: none;
116
+ }
117
+ .june-doc--fullscreen .june-doc__canvas { max-height: none; flex: 1 1 auto; }
118
+
119
+ /* ---------- header / app bar ---------- */
120
+ .june-doc__header {
121
+ display: flex;
122
+ align-items: center;
123
+ gap: 10px;
124
+ min-height: 56px;
125
+ padding: 10px 14px 10px 16px;
126
+ border-bottom: 1px solid var(--jd-border);
127
+ }
128
+ .june-doc__doc-icon {
129
+ display: inline-flex; align-items: center; justify-content: center;
130
+ width: 30px; height: 30px; flex: none;
131
+ color: var(--jd-muted); background: var(--jd-surface);
132
+ border: 1px solid var(--jd-border); border-radius: 8px;
133
+ }
134
+ .june-doc__title {
135
+ flex: 1; min-width: 60px; padding: 4px 6px; margin-left: -6px;
136
+ font: inherit; font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em;
137
+ color: inherit; background: transparent;
138
+ border: 1px solid transparent; border-radius: 6px; outline: none;
139
+ text-overflow: ellipsis;
140
+ }
141
+ .june-doc__title:hover:not(:disabled) { background: var(--jd-hover); }
142
+ .june-doc__title:focus { background: var(--jd-bg); border-color: var(--jd-accent); }
143
+ .june-doc__badge {
144
+ display: inline-flex; align-items: center; gap: 4px; flex: none;
145
+ padding: 3px 9px; font-size: 0.75rem; font-weight: 500; color: var(--jd-accent);
146
+ background: color-mix(in srgb, var(--jd-accent) 10%, transparent);
147
+ border: 1px solid color-mix(in srgb, var(--jd-accent) 25%, transparent);
148
+ border-radius: 999px;
149
+ }
150
+ .june-doc__header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
151
+
152
+ /* ---------- buttons & inputs ---------- */
153
+ .june-doc__btn, .june-doc__select, .june-doc__input {
154
+ min-height: 32px; padding: 4px 10px;
155
+ font: inherit; font-size: 0.8125rem; color: inherit;
156
+ background: var(--jd-bg); border: 1px solid var(--jd-border); border-radius: 8px;
157
+ }
158
+ .june-doc__btn {
159
+ display: inline-flex; align-items: center; justify-content: center; gap: 6px;
160
+ cursor: pointer; white-space: nowrap;
161
+ transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
162
+ }
163
+ .june-doc__btn:hover:not(:disabled) { background: var(--jd-hover); border-color: var(--jd-border-strong); }
164
+ .june-doc__btn:disabled, .june-doc__select:disabled { opacity: 0.4; cursor: not-allowed; }
165
+ .june-doc__btn:focus-visible, .june-doc__select:focus-visible, .june-doc__input:focus-visible,
166
+ .june-doc__title:focus-visible, .june-doc__zoom-value:focus-visible, .june-doc__menu-item:focus-visible {
167
+ outline: 2px solid var(--jd-accent); outline-offset: 1px;
168
+ }
169
+ .june-doc__btn--icon { width: 32px; padding: 0; }
170
+ .june-doc__btn--ghost { background: transparent; border-color: transparent; }
171
+ .june-doc__btn--outline { padding: 4px 14px; font-weight: 500; border-color: var(--jd-border-strong); }
172
+ .june-doc__btn--solid {
173
+ padding: 4px 14px; font-weight: 600;
174
+ color: var(--jd-solid-fg); background: var(--jd-solid); border-color: var(--jd-solid);
175
+ }
176
+ .june-doc__btn--solid:hover:not(:disabled) {
177
+ color: var(--jd-solid-fg); background: color-mix(in srgb, var(--jd-solid) 85%, var(--jd-bg)); border-color: var(--jd-solid);
178
+ }
179
+ .june-doc__btn--primary { color: #fff; background: var(--jd-accent); border-color: var(--jd-accent); }
180
+ .june-doc__btn--primary:hover:not(:disabled) { color: #fff; background: color-mix(in srgb, var(--jd-accent) 88%, #000); border-color: var(--jd-accent); }
181
+ .june-doc__btn--danger { color: var(--jd-danger); }
182
+ .june-doc__select { padding-right: 6px; cursor: pointer; }
183
+ .june-doc__input { width: 100%; }
184
+ .june-doc__input::placeholder { color: var(--jd-faint); }
185
+
186
+ /* ---------- ribbon ---------- */
187
+ .june-doc__ribbon { background: var(--jd-bg); border-bottom: 1px solid var(--jd-border); }
188
+ .june-doc__row {
189
+ display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
190
+ padding: 6px 10px;
191
+ }
192
+ .june-doc__row--secondary { background: var(--jd-surface); border-top: 1px solid var(--jd-border); }
193
+ .june-doc__row--context { background: color-mix(in srgb, var(--jd-accent) 5%, var(--jd-bg)); border-top: 1px solid var(--jd-border); }
194
+ .june-doc__group {
195
+ display: flex; align-items: center; gap: 2px;
196
+ padding: 3px 4px; border-radius: 10px;
197
+ background: var(--jd-surface);
198
+ }
199
+ .june-doc__row--secondary .june-doc__group { background: var(--jd-bg); }
200
+ .june-doc__group-label {
201
+ padding: 0 6px 0 4px;
202
+ font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
203
+ color: var(--jd-muted); user-select: none;
204
+ }
205
+ .june-doc__group .june-doc__btn:not(.june-doc__btn--outline) { background: transparent; border-color: transparent; }
206
+ .june-doc__group .june-doc__btn:hover:not(:disabled) { background: var(--jd-hover); border-color: transparent; }
207
+ .june-doc__btn[data-active],
208
+ .june-doc__group .june-doc__btn[data-active] {
209
+ color: var(--jd-fg); background: var(--jd-pressed); border-color: transparent;
210
+ }
211
+ .june-doc__row--context .june-doc__btn { font-size: 0.78rem; }
212
+ .june-doc__more { margin-left: 4px; gap: 4px; padding: 4px 10px; font-weight: 500; }
213
+ .june-doc__btn--marks { gap: 6px; padding: 4px 10px; font-weight: 500; background: var(--jd-bg); }
214
+ .june-doc__btn--marks[data-active] { color: var(--jd-accent); background: color-mix(in srgb, var(--jd-accent) 10%, var(--jd-bg)); border-color: color-mix(in srgb, var(--jd-accent) 30%, transparent); }
215
+ .june-doc__field { display: flex; flex-direction: column; gap: 1px; padding: 0 2px; }
216
+ .june-doc__field-label { font-size: 0.6875rem; color: var(--jd-muted); padding-left: 2px; line-height: 1.2; }
217
+ .june-doc__field .june-doc__select { min-width: 120px; min-height: 30px; }
218
+ .june-doc__select--font { min-width: 150px; }
219
+ .june-doc__field .june-doc__select--size { min-width: 72px; }
220
+ .june-doc__btn--color { position: relative; flex-direction: column; gap: 1px; }
221
+ .june-doc__color-bar { width: 14px; height: 3px; border-radius: 2px; border: 1px solid var(--jd-border); }
222
+
223
+ /* ---------- popovers & menus ---------- */
224
+ .june-doc__anchor { position: relative; display: inline-flex; }
225
+ .june-doc__pop {
226
+ position: absolute; top: calc(100% + 6px); z-index: 50;
227
+ min-width: 220px; padding: 10px;
228
+ color: var(--jd-fg); background: var(--jd-bg);
229
+ border: 1px solid var(--jd-border); border-radius: 12px; box-shadow: var(--jd-pop-shadow);
230
+ animation: june-doc-pop 120ms ease-out;
231
+ }
232
+ .june-doc__pop--start { left: 0; }
233
+ .june-doc__pop--end { right: 0; }
234
+ .june-doc__pop-title { margin: 0 0 8px; font-size: 0.75rem; font-weight: 600; color: var(--jd-muted); }
235
+ .june-doc__pop-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 10px; }
236
+ .june-doc__pop-row--end { justify-content: flex-end; }
237
+ .june-doc__form { display: flex; flex-direction: column; gap: 8px; width: 280px; max-width: 80vw; }
238
+ .june-doc__form .june-doc__pop-title { margin: 0; }
239
+ .june-doc__form .june-doc__pop-row { margin-top: 2px; }
240
+ .june-doc__menu { min-width: 250px; padding: 6px; }
241
+ .june-doc__menu-item {
242
+ display: flex; align-items: center; gap: 10px; width: 100%;
243
+ padding: 8px 10px; font: inherit; font-size: 0.8125rem; text-align: left; color: inherit;
244
+ background: transparent; border: 0; border-radius: 8px; cursor: pointer;
245
+ }
246
+ .june-doc__menu-item:hover { background: var(--jd-hover); }
247
+ .june-doc__menu-item .june-doc__icon { color: var(--jd-muted); }
248
+ .june-doc__menu-label { flex: 1; font-weight: 500; }
249
+ .june-doc__menu-hint { font-size: 0.75rem; color: var(--jd-faint); }
250
+ .june-doc__menu-sep { height: 1px; margin: 6px 4px; background: var(--jd-border); }
251
+ .june-doc__swatches-wrap { width: 232px; }
252
+ .june-doc__swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
253
+ .june-doc__swatch {
254
+ width: 100%; aspect-ratio: 1; padding: 0; cursor: pointer;
255
+ border: 1px solid color-mix(in srgb, #000 12%, transparent); border-radius: 6px;
256
+ transition: transform 100ms ease;
257
+ }
258
+ .june-doc__swatch:hover { transform: scale(1.12); }
259
+ .june-doc__swatch[data-active] { outline: 2px solid var(--jd-accent); outline-offset: 2px; }
260
+ .june-doc__custom-color { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--jd-muted); cursor: pointer; }
261
+ .june-doc__custom-color input { width: 28px; height: 24px; padding: 0; border: 1px solid var(--jd-border); border-radius: 6px; background: none; cursor: pointer; }
262
+ .june-doc__dropzone {
263
+ display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
264
+ width: 100%; padding: 18px 10px; font: inherit; font-size: 0.8125rem; color: var(--jd-muted);
265
+ background: var(--jd-surface); border: 1.5px dashed var(--jd-border-strong); border-radius: 10px; cursor: pointer;
266
+ }
267
+ .june-doc__dropzone:hover { color: var(--jd-accent); border-color: var(--jd-accent); }
268
+ .june-doc__or { font-size: 0.75rem; text-align: center; color: var(--jd-faint); }
269
+ .june-doc__grid { display: grid; grid-template-columns: repeat(8, 18px); gap: 3px; }
270
+ .june-doc__cell {
271
+ width: 18px; height: 18px; padding: 0; cursor: pointer;
272
+ background: var(--jd-bg); border: 1px solid var(--jd-border-strong); border-radius: 3px;
273
+ }
274
+ .june-doc__cell[data-active] { background: color-mix(in srgb, var(--jd-accent) 25%, var(--jd-bg)); border-color: var(--jd-accent); }
275
+ @keyframes june-doc-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
276
+
277
+ /* ---------- bubble menu ---------- */
278
+ .june-doc__bubble {
279
+ display: flex; align-items: center; gap: 2px; padding: 4px;
280
+ color: var(--jd-fg); background: var(--jd-bg);
281
+ border: 1px solid var(--jd-border); border-radius: 10px; box-shadow: var(--jd-pop-shadow);
282
+ z-index: 40;
283
+ }
284
+ .june-doc__bubble .june-doc__btn { background: transparent; border-color: transparent; }
285
+ .june-doc__bubble .june-doc__btn:hover { background: var(--jd-hover); }
286
+ .june-doc__bubble-sep { width: 1px; height: 20px; margin: 0 3px; background: var(--jd-border); }
287
+
288
+ /* ---------- find bar ---------- */
289
+ .june-doc__findbar {
290
+ display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
291
+ padding: 8px 12px; background: var(--jd-bg); border-bottom: 1px solid var(--jd-border);
292
+ }
293
+ .june-doc__find-field {
294
+ display: flex; align-items: center; gap: 6px; flex: 1 1 220px; max-width: 360px;
295
+ min-height: 32px; padding: 0 10px; color: var(--jd-muted);
296
+ border: 1px solid var(--jd-border-strong); border-radius: 8px; background: var(--jd-bg);
297
+ }
298
+ .june-doc__find-field:focus-within { border-color: var(--jd-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--jd-accent) 18%, transparent); }
299
+ .june-doc__find-input { flex: 1; min-width: 0; padding: 0; font: inherit; font-size: 0.8125rem; color: var(--jd-fg); background: transparent; border: 0; outline: none; }
300
+ .june-doc__find-count { font-size: 0.75rem; color: var(--jd-faint); white-space: nowrap; }
301
+ .june-doc__btn--case { font-size: 0.75rem; font-weight: 600; }
302
+ .june-doc__find-sep { width: 1px; height: 22px; background: var(--jd-border); }
303
+ .june-doc__replace-input { flex: 0 1 200px; width: auto; }
304
+ .june-doc__find-close { margin-left: auto; }
305
+ .june-doc__match { background: var(--jd-match); border-radius: 2px; }
306
+ .june-doc__match--active { background: var(--jd-match-active); color: #111827; }
307
+
308
+ /* ---------- conflict banner ---------- */
309
+ .june-doc__banner {
310
+ display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
311
+ margin: 8px 12px; padding: 8px 12px; font-size: 0.875rem;
312
+ background: var(--jd-warn-bg); border: 1px solid var(--jd-warn-border); border-radius: 10px;
313
+ }
314
+ .june-doc__banner-actions { display: flex; flex-wrap: wrap; gap: 6px; }
315
+
316
+ /* ---------- canvas & pages ---------- */
317
+ .june-doc__canvas {
318
+ position: relative;
319
+ max-height: min(78vh, 860px);
320
+ overflow: auto;
321
+ overflow-anchor: none;
322
+ padding: 28px 24px 40px;
323
+ background: var(--jd-canvas);
324
+ scroll-behavior: smooth;
325
+ }
326
+ .june-doc__zoomer { position: relative; margin: 0 auto; }
327
+ .june-doc__sheet {
328
+ --jd-pad-x: 96px;
329
+ --jd-pad-y: 96px;
330
+ position: relative;
331
+ margin: 0 auto;
332
+ padding: var(--jd-pad-y) var(--jd-pad-x);
333
+ color: var(--jd-page-fg);
334
+ transform-origin: top left;
335
+ }
336
+ /* individual page sheets drawn behind the text; the gaps between them show the canvas */
337
+ .june-doc__pages { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
338
+ .june-doc__page {
339
+ position: absolute; left: 0; right: 0;
340
+ background: var(--jd-page);
341
+ border: 1px solid var(--jd-border);
342
+ border-radius: 3px;
343
+ box-shadow: var(--jd-shadow);
344
+ }
345
+ .june-doc__page-num {
346
+ position: absolute; left: 0; right: 0; bottom: calc(var(--jd-pad-y) * 0.4);
347
+ font-size: 0.6875rem; text-align: center; color: var(--jd-faint);
348
+ font-variant-numeric: tabular-nums; letter-spacing: 0.04em;
349
+ }
350
+ .june-doc__sheet .tiptap, .june-doc__sheet .ProseMirror { position: relative; z-index: 1; }
351
+ /* spacer inserted by pagination: pushes the next block to the top of the next page */
352
+ .june-doc__page-gap { display: block; width: 100%; margin: 0 !important; padding: 0; border: 0; list-style: none; pointer-events: none; user-select: none; }
353
+ .june-doc__page-gap + * { margin-top: 0 !important; }
354
+
355
+ .june-doc__canvas[data-layout="fluid"] { padding: 16px; }
356
+ .june-doc__canvas[data-layout="fluid"] .june-doc__sheet {
357
+ min-height: 320px; padding: 32px clamp(16px, 5%, 48px);
358
+ background: var(--jd-page); border: 1px solid var(--jd-border); border-radius: 10px; box-shadow: var(--jd-shadow);
359
+ }
360
+
361
+ /* ---------- prose ---------- */
362
+ .june-doc__prose { min-height: 160px; outline: none; line-height: 1.65; font-size: 1rem; overflow-wrap: anywhere; caret-color: var(--jd-accent); }
363
+ .june-doc__prose > :first-child { margin-top: 0; }
364
+ .june-doc__prose h1 { font-size: 1.75rem; line-height: 1.25; margin: 1.2em 0 0.45em; font-weight: 700; letter-spacing: -0.015em; }
365
+ .june-doc__prose h2 { font-size: 1.375rem; line-height: 1.3; margin: 1.1em 0 0.4em; font-weight: 700; }
366
+ .june-doc__prose h3 { font-size: 1.125rem; line-height: 1.35; margin: 1em 0 0.3em; font-weight: 600; }
367
+ .june-doc__prose p { margin: 0.65em 0; }
368
+ .june-doc__prose ul, .june-doc__prose ol { margin: 0.6em 0; padding-left: 1.6em; }
369
+ .june-doc__prose li > p { margin: 0.25em 0; }
370
+ .june-doc__prose li::marker { color: var(--jd-muted); }
371
+ .june-doc__prose blockquote { margin: 1em 0; padding: 0.15em 0 0.15em 1em; color: var(--jd-muted); border-left: 3px solid var(--jd-border-strong); }
372
+ .june-doc__prose a { color: var(--jd-accent); text-decoration: underline; text-underline-offset: 2px; }
373
+ .june-doc__prose code { padding: 1px 5px; font-size: 0.875em; font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--jd-hover); border-radius: 4px; }
374
+ .june-doc__prose pre { padding: 12px 14px; overflow: auto; background: var(--jd-hover); border-radius: 8px; }
375
+ .june-doc__prose pre code { padding: 0; background: transparent; }
376
+ .june-doc__prose hr { border: 0; border-top: 1px solid var(--jd-border-strong); margin: 1.4em 0; }
377
+ .june-doc__prose mark { padding: 0 0.1em; border-radius: 2px; color: inherit; }
378
+ .june-doc__prose img { display: block; max-width: 100%; height: auto; border-radius: 4px; }
379
+ .june-doc__prose [data-resize-container] { max-width: 100%; margin: 0.8em 0; }
380
+ .june-doc__prose [data-resize-wrapper] { display: inline-block; max-width: 100%; }
381
+ .june-doc__prose [data-resize-handle] { z-index: 2; opacity: 0; transition: opacity 120ms ease; }
382
+ .june-doc__prose [data-resize-container]:hover [data-resize-handle],
383
+ .june-doc__prose .ProseMirror-selectednode [data-resize-handle] { opacity: 1; }
384
+ .june-doc__prose [data-resize-handle="top-left"], .june-doc__prose [data-resize-handle="top-right"],
385
+ .june-doc__prose [data-resize-handle="bottom-left"], .june-doc__prose [data-resize-handle="bottom-right"] {
386
+ width: 10px; height: 10px; background: var(--jd-bg); border: 2px solid var(--jd-accent); border-radius: 50%;
387
+ }
388
+ .june-doc__prose [data-resize-handle="top-left"] { cursor: nwse-resize; transform: translate(-50%, -50%); }
389
+ .june-doc__prose [data-resize-handle="top-right"] { cursor: nesw-resize; transform: translate(50%, -50%); }
390
+ .june-doc__prose [data-resize-handle="bottom-left"] { cursor: nesw-resize; transform: translate(-50%, 50%); }
391
+ .june-doc__prose [data-resize-handle="bottom-right"] { cursor: nwse-resize; transform: translate(50%, 50%); }
392
+ .june-doc__prose [data-resize-handle="top"], .june-doc__prose [data-resize-handle="bottom"] { height: 6px; cursor: ns-resize; }
393
+ .june-doc__prose [data-resize-handle="left"], .june-doc__prose [data-resize-handle="right"] { width: 6px; cursor: ew-resize; }
394
+ .june-doc__prose img.ProseMirror-selectednode,
395
+ .june-doc__prose .ProseMirror-selectednode img { outline: 2px solid var(--jd-accent); outline-offset: 2px; }
396
+ .june-doc__prose table { width: 100%; margin: 1em 0; border-collapse: collapse; table-layout: fixed; overflow: hidden; }
397
+ .june-doc__prose th, .june-doc__prose td {
398
+ position: relative; padding: 7px 10px; text-align: left; vertical-align: top; border: 1px solid var(--jd-border-strong);
399
+ }
400
+ .june-doc__prose th { font-weight: 600; background: var(--jd-surface); }
401
+ .june-doc__prose th > p, .june-doc__prose td > p { margin: 0; }
402
+ .june-doc__prose .selectedCell::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--jd-accent) 18%, transparent); pointer-events: none; }
403
+ .june-doc__prose .column-resize-handle { position: absolute; top: 0; right: -2px; bottom: -2px; width: 4px; background: var(--jd-accent); pointer-events: none; }
404
+ .june-doc__prose.resize-cursor { cursor: col-resize; }
405
+ .june-doc__prose .tableWrapper { overflow-x: auto; }
406
+ .june-doc__page-break {
407
+ position: relative; height: 24px; margin: 1.2em -1px; cursor: default;
408
+ border-top: 1px dashed var(--jd-border-strong);
409
+ }
410
+ .june-doc__page-break::after {
411
+ content: "Page break"; position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
412
+ padding: 0 8px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
413
+ color: var(--jd-faint); background: var(--jd-page);
414
+ }
415
+ .june-doc__page-break.ProseMirror-selectednode { border-top-color: var(--jd-accent); }
416
+ .june-doc__prose ::selection { background: color-mix(in srgb, var(--jd-accent) 25%, transparent); }
417
+
418
+ /* formatting marks (¶) */
419
+ .june-doc__canvas[data-marks] .june-doc__prose p::after,
420
+ .june-doc__canvas[data-marks] .june-doc__prose h1::after,
421
+ .june-doc__canvas[data-marks] .june-doc__prose h2::after,
422
+ .june-doc__canvas[data-marks] .june-doc__prose h3::after {
423
+ content: "¶"; margin-left: 2px; color: var(--jd-faint); font-weight: 400; font-style: normal;
424
+ }
425
+ .june-doc__canvas[data-marks] .june-doc__prose br::after { content: "↵"; color: var(--jd-faint); }
426
+
427
+ /* ---------- status bar ---------- */
428
+ .june-doc__footer {
429
+ display: flex; align-items: center; gap: 12px;
430
+ min-height: 38px; padding: 4px 10px 4px 16px;
431
+ font-size: 0.8125rem; color: var(--jd-muted);
432
+ background: var(--jd-bg); border-top: 1px solid var(--jd-border);
433
+ border-radius: 0 0 var(--jd-radius) var(--jd-radius);
434
+ }
435
+ .june-doc--fullscreen .june-doc__footer { border-radius: 0; }
436
+ .june-doc__stats { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--jd-muted); font-variant-numeric: tabular-nums; }
437
+ .june-doc__stats-sep { width: 1px; height: 14px; background: var(--jd-border-strong); }
438
+ .june-doc__status { flex: 1; text-align: right; font-size: 0.75rem; color: var(--jd-faint); }
439
+ .june-doc__status[data-state="saved"] { color: var(--jd-ok); }
440
+ .june-doc__status[data-state="error"] { color: var(--jd-danger); }
441
+ .june-doc__zoom { display: flex; align-items: center; gap: 2px; padding-left: 8px; border-left: 1px solid var(--jd-border); }
442
+ .june-doc__zoom .june-doc__btn--icon { width: 26px; min-height: 26px; }
443
+ .june-doc__zoom-value {
444
+ min-width: 48px; padding: 3px 4px; font: inherit; font-size: 0.75rem; font-variant-numeric: tabular-nums;
445
+ color: var(--jd-fg); background: transparent; border: 0; border-radius: 6px; cursor: pointer;
446
+ }
447
+ .june-doc__zoom-value:hover { background: var(--jd-hover); }
448
+
449
+ /* ---------- placeholder / error states ---------- */
450
+ .june-doc--draft, .june-doc--error { padding: 14px 16px; gap: 8px; }
451
+ .june-doc__draft-title { margin: 0; font-weight: 700; }
452
+ .june-doc__draft-text { margin: 0; color: var(--jd-muted); }
453
+ .june-doc--error .june-doc__draft-text { color: var(--jd-danger); }
454
+ .june-doc__raw { margin: 8px 0 0; max-height: 240px; padding: 8px; overflow: auto; white-space: pre-wrap; background: var(--jd-surface); border-radius: 6px; }
455
+ .june-doc__pulse { display: flex; flex-direction: column; gap: 6px; }
456
+ .june-doc__pulse span { height: 10px; background: var(--jd-surface); border-radius: 4px; animation: june-doc-pulse 1.2s ease-in-out infinite; }
457
+ .june-doc__pulse span:nth-child(2) { width: 85%; animation-delay: 0.15s; }
458
+ .june-doc__pulse span:nth-child(3) { width: 60%; animation-delay: 0.3s; }
459
+ @keyframes june-doc-pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
460
+ @media (prefers-reduced-motion: reduce) {
461
+ .june-doc__pulse span, .june-doc__pop { animation: none; }
462
+ .june-doc__canvas { scroll-behavior: auto; }
463
+ }
464
+
465
+ /* ---------- responsive: based on the editor's own width, not the window ---------- */
466
+ .june-doc__row > .june-doc__group, .june-doc__row > .june-doc__btn, .june-doc__row > .june-doc__more { min-height: 40px; }
467
+ .june-doc__row > .june-doc__btn--marks, .june-doc__row > .june-doc__more { align-self: center; min-height: 34px; }
468
+ @container june-doc (max-width: 1040px) {
469
+ .june-doc__row:first-child .june-doc__group-label { display: none; }
470
+ }
471
+ @container june-doc (max-width: 820px) {
472
+ .june-doc__group-label { display: none; }
473
+ .june-doc__field-label { display: none; }
474
+ .june-doc__field .june-doc__select { min-width: 0; }
475
+ .june-doc__select--font { width: 130px; }
476
+ }
477
+ @container june-doc (max-width: 600px) {
478
+ .june-doc__header { flex-wrap: wrap; }
479
+ .june-doc__header-actions { width: 100%; justify-content: flex-end; }
480
+ .june-doc__row { gap: 4px; padding: 6px; }
481
+ .june-doc__btn--marks span { display: none; }
482
+ .june-doc__canvas { padding: 12px 8px 24px; }
483
+ .june-doc__status { display: none; }
484
+ .june-doc__footer { justify-content: space-between; }
485
+ }
486
+ @media print {
487
+ .june-doc__header, .june-doc__ribbon, .june-doc__findbar, .june-doc__footer, .june-doc__banner { display: none; }
488
+ .june-doc__canvas { max-height: none; overflow: visible; padding: 0; background: none; }
489
+ .june-doc__sheet { width: auto; box-shadow: none; border: 0; background-image: none; padding: 0; }
490
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@june-ai/june-ui",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "A React Generative UI SDK powered by OpenUI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -59,8 +59,13 @@
59
59
  "dependencies": {
60
60
  "@openuidev/react-ui": "^0.18.0",
61
61
  "@tiptap/core": "^3.33.0",
62
+ "@tiptap/extension-highlight": "^3.33.0",
63
+ "@tiptap/extension-image": "^3.33.0",
64
+ "@tiptap/extension-subscript": "^3.33.0",
65
+ "@tiptap/extension-superscript": "^3.33.0",
62
66
  "@tiptap/extension-table": "^3.33.0",
63
67
  "@tiptap/extension-text-align": "^3.33.0",
68
+ "@tiptap/extension-text-style": "^3.33.0",
64
69
  "@tiptap/markdown": "^3.33.0",
65
70
  "@tiptap/pm": "^3.33.0",
66
71
  "@tiptap/react": "^3.33.0",