@ciderpress/ui 1.0.0-rc.12 → 1.0.0-rc.14

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.
Files changed (52) hide show
  1. package/dist/head/css/themes/honeycrisp.css +1 -1
  2. package/dist/node.mjs +17 -13
  3. package/dist/plugins/mermaid/MermaidRenderer.tsx +2 -2
  4. package/dist/theme/components/home/hero-banner.tsx +225 -0
  5. package/dist/theme/components/home/hero-demo.css +492 -61
  6. package/dist/theme/components/home/hero-demo.test.tsx +159 -0
  7. package/dist/theme/components/home/hero-demo.tsx +335 -32
  8. package/dist/theme/components/home/hero.css +142 -9
  9. package/dist/theme/components/home/hero.test.tsx +105 -0
  10. package/dist/theme/components/home/hero.tsx +201 -4
  11. package/dist/theme/components/home/home-visual.css +98 -0
  12. package/dist/theme/components/home/home-visual.test.tsx +27 -0
  13. package/dist/theme/components/home/home-visual.tsx +20 -13
  14. package/dist/theme/components/home/layout.tsx +125 -1
  15. package/dist/theme/components/home/split.css +2 -2
  16. package/dist/theme/components/home/tabs.css +1 -1
  17. package/dist/theme/components/home/trust-strip.css +12 -0
  18. package/dist/theme/components/home/trust-strip.test.tsx +33 -0
  19. package/dist/theme/components/home/trust-strip.tsx +76 -15
  20. package/dist/theme/components/nav/layout.tsx +10 -14
  21. package/dist/theme/components/nav/nav-logo.tsx +2 -3
  22. package/dist/theme/components/sidebar/sidebar-filter.test.ts +49 -9
  23. package/dist/theme/components/sidebar/sidebar-filter.ts +24 -4
  24. package/dist/theme/index.tsx +8 -1
  25. package/dist/theme/lib/rich-text-parse.ts +0 -2
  26. package/dist/theme/lib/theme-favicon.ts +0 -3
  27. package/dist/theme/styles/themes/honeycrisp.css +20 -20
  28. package/package.json +20 -19
  29. package/src/theme/components/home/hero-banner.tsx +225 -0
  30. package/src/theme/components/home/hero-demo.css +492 -61
  31. package/src/theme/components/home/hero-demo.test.tsx +159 -0
  32. package/src/theme/components/home/hero-demo.tsx +335 -32
  33. package/src/theme/components/home/hero.css +142 -9
  34. package/src/theme/components/home/hero.test.tsx +105 -0
  35. package/src/theme/components/home/hero.tsx +201 -4
  36. package/src/theme/components/home/home-visual.css +98 -0
  37. package/src/theme/components/home/home-visual.test.tsx +27 -0
  38. package/src/theme/components/home/home-visual.tsx +20 -13
  39. package/src/theme/components/home/layout.tsx +125 -1
  40. package/src/theme/components/home/split.css +2 -2
  41. package/src/theme/components/home/tabs.css +1 -1
  42. package/src/theme/components/home/trust-strip.css +12 -0
  43. package/src/theme/components/home/trust-strip.test.tsx +33 -0
  44. package/src/theme/components/home/trust-strip.tsx +76 -15
  45. package/src/theme/components/nav/layout.tsx +10 -14
  46. package/src/theme/components/nav/nav-logo.tsx +2 -3
  47. package/src/theme/components/sidebar/sidebar-filter.test.ts +49 -9
  48. package/src/theme/components/sidebar/sidebar-filter.ts +24 -4
  49. package/src/theme/index.tsx +8 -1
  50. package/src/theme/lib/rich-text-parse.ts +0 -2
  51. package/src/theme/lib/theme-favicon.ts +0 -3
  52. package/src/theme/styles/themes/honeycrisp.css +20 -20
@@ -1,104 +1,535 @@
1
1
  .cp-hero-demo {
2
- max-width: var(--cp-size-demo-max);
2
+ position: relative;
3
+ width: min(920px, 100%);
3
4
  margin: 0 auto;
5
+ text-align: left;
6
+ filter: drop-shadow(0 24px 60px color-mix(in srgb, var(--cp-c-brand-1) 14%, transparent));
7
+ }
8
+
9
+ .cp-hero-demo > .cp-window {
10
+ display: grid;
11
+ height: 420px;
12
+ margin: 0;
13
+ box-shadow: 0 18px 48px color-mix(in srgb, #000 24%, transparent);
14
+ }
15
+
16
+ .cp-hero-demo > .cp-window[hidden] {
17
+ display: none;
18
+ }
19
+
20
+ .cp-hero-demo > .cp-window--terminal {
21
+ grid-template-rows: auto minmax(0, 1fr);
22
+ }
23
+
24
+ .cp-hero-demo > .cp-window--browser {
25
+ grid-template-rows: auto auto minmax(0, 1fr);
26
+ }
27
+
28
+ .cp-hero-demo .cp-window__titlebar {
29
+ padding-right: 154px;
30
+ }
31
+
32
+ .cp-hero-demo__switcher {
33
+ position: absolute;
34
+ z-index: 2;
35
+ top: 5px;
36
+ right: 7px;
37
+ display: flex;
38
+ height: 28px;
39
+ overflow: hidden;
4
40
  border: 1px solid var(--cp-c-border);
5
- border-radius: var(--cp-radius-lg);
6
- background: var(--cp-code-block-bg);
41
+ border-radius: var(--cp-radius-sm);
42
+ background: var(--cp-c-bg-soft);
43
+ }
44
+
45
+ .cp-hero-demo__switcher > div {
46
+ display: flex;
47
+ }
48
+
49
+ .cp-hero-demo__switcher button {
50
+ border: 0;
51
+ padding: 0 12px;
52
+ background: transparent;
53
+ color: var(--cp-c-text-3);
54
+ font-family: var(--rp-font-family-mono);
55
+ font-size: 11px;
56
+ cursor: pointer;
57
+ }
58
+
59
+ .cp-hero-demo__switcher button + button {
60
+ border-left: 1px solid var(--cp-c-border);
61
+ }
62
+
63
+ .cp-hero-demo__switcher button.is-active {
64
+ background: var(--cp-c-bg-elv);
65
+ color: var(--cp-c-text-1);
66
+ }
67
+
68
+ .cp-hero-demo__switcher button:focus-visible,
69
+ .cp-hero-demo__open:focus-visible,
70
+ .cp-hero-demo__rerun:focus-visible {
71
+ outline: 2px solid var(--cp-c-brand-1);
72
+ outline-offset: -2px;
73
+ }
74
+
75
+ .cp-hero-demo__rerun {
76
+ display: flex;
77
+ align-items: center;
78
+ gap: 5px;
79
+ margin: 10px auto 0;
80
+ border: 1px solid var(--cp-c-border);
81
+ border-radius: var(--cp-radius-md);
82
+ padding: 5px 10px;
83
+ background: var(--cp-c-bg-soft);
84
+ color: var(--cp-c-text-2);
85
+ font-family: var(--rp-font-family-mono);
86
+ font-size: 10px;
87
+ cursor: pointer;
88
+ }
89
+
90
+ .cp-hero-demo__rerun svg {
91
+ width: 12px;
92
+ height: 12px;
93
+ }
94
+
95
+ .cp-hero-demo__rerun:hover {
96
+ border-color: var(--cp-c-brand-1);
97
+ color: var(--cp-c-text-1);
98
+ }
99
+
100
+ .cp-hero-demo__terminal {
101
+ height: 100%;
102
+ }
103
+
104
+ .cp-hero-demo .cp-term-line--command {
105
+ display: flex;
106
+ align-items: baseline;
107
+ gap: 1ch;
108
+ word-break: normal;
109
+ }
110
+
111
+ .cp-hero-demo .cp-term-line--command::before {
112
+ content: none;
113
+ }
114
+
115
+ .cp-hero-demo__prompt {
116
+ flex: none;
117
+ color: var(--cp-c-term-prompt-prefix);
118
+ }
119
+
120
+ .cp-hero-demo__typing {
121
+ display: inline-block;
122
+ width: 0;
7
123
  overflow: hidden;
8
- box-shadow: var(--cp-shadow-hero-demo);
124
+ animation: cp-hero-demo-type-command 700ms steps(14, end) forwards;
125
+ white-space: nowrap;
126
+ }
127
+
128
+ .cp-hero-demo__typing[data-initial-run='true'] {
129
+ animation-delay: 800ms;
9
130
  }
10
131
 
11
- .cp-hero-demo__bar {
132
+ .cp-hero-demo__loading {
133
+ display: block;
134
+ margin-top: 10px;
135
+ color: var(--cp-c-term-yellow);
136
+ opacity: 0;
137
+ }
138
+
139
+ .cp-hero-demo__loading[data-visible='true'] {
140
+ animation: cp-hero-demo-show-loading 0ms linear 900ms forwards;
141
+ }
142
+
143
+ .cp-hero-demo__loading[data-initial-run='true'][data-visible='true'] {
144
+ animation-delay: 1.7s;
145
+ }
146
+
147
+ .cp-hero-demo__run-output {
148
+ opacity: 0;
149
+ transform: translateY(-4px);
150
+ transition:
151
+ opacity 180ms ease,
152
+ transform 180ms ease;
153
+ }
154
+
155
+ .cp-hero-demo__run-output[data-visible='true'] {
156
+ opacity: 1;
157
+ transform: translateY(0);
158
+ }
159
+
160
+ .cp-hero-demo__cli-banner {
161
+ margin: 10px 0 4px;
162
+ padding-bottom: 4px;
163
+ overflow: hidden;
164
+ color: var(--cp-c-brand-1);
165
+ font-family: var(--rp-font-family-mono);
166
+ font-size: clamp(7px, 1.25vw, 14px);
167
+ font-weight: 600;
168
+ letter-spacing: 0;
169
+ line-height: 1.15;
170
+ white-space: pre;
171
+ }
172
+
173
+ .cp-hero-demo__status-row,
174
+ .cp-hero-demo__stats {
12
175
  display: flex;
13
176
  align-items: center;
14
- gap: var(--cp-s-8);
15
- padding: var(--cp-s-10) var(--cp-s-14);
16
- background: var(--cp-c-bg-elv);
177
+ justify-content: space-between;
178
+ gap: 16px;
179
+ }
180
+
181
+ .cp-hero-demo__status {
182
+ position: relative;
183
+ min-width: 74px;
184
+ min-height: 20px;
185
+ text-align: right;
186
+ }
187
+
188
+ .cp-hero-demo__status > span {
189
+ position: absolute;
190
+ top: 0;
191
+ right: 0;
192
+ opacity: 0;
193
+ transition: opacity 180ms ease;
194
+ white-space: nowrap;
195
+ }
196
+
197
+ .cp-hero-demo__status > span[data-visible='true'] {
198
+ opacity: 1;
199
+ }
200
+
201
+ .cp-hero-demo__status .cp-term-text--yellow[data-visible='true'] {
202
+ animation: cp-hero-demo-starting 700ms ease-in-out infinite alternate;
203
+ }
204
+
205
+ .cp-hero-demo__rule {
206
+ height: 1px;
207
+ margin: 8px 0;
208
+ background: var(--cp-c-term-border);
209
+ }
210
+
211
+ .cp-hero-demo__watching {
212
+ margin-bottom: 5px;
213
+ }
214
+
215
+ .cp-hero-demo__activity {
216
+ display: grid;
217
+ gap: 2px;
218
+ }
219
+
220
+ .cp-hero-demo__activity-row {
221
+ display: grid;
222
+ grid-template-columns: 70px 82px minmax(0, 1fr) 42px;
223
+ gap: 9px;
224
+ min-width: 0;
225
+ }
226
+
227
+ .cp-hero-demo__activity-row span:nth-child(3) {
228
+ overflow: hidden;
229
+ text-overflow: ellipsis;
230
+ white-space: nowrap;
231
+ }
232
+
233
+ .cp-hero-demo__activity-row span:last-child {
234
+ text-align: right;
235
+ }
236
+
237
+ .cp-hero-demo__open {
238
+ border: 0;
239
+ padding: 2px 5px;
240
+ background: transparent;
241
+ color: var(--cp-c-term-muted);
242
+ font: inherit;
243
+ cursor: pointer;
244
+ }
245
+
246
+ .cp-hero-demo__open:hover {
247
+ color: var(--cp-c-term-text);
248
+ }
249
+
250
+ .cp-hero-demo__sr-only {
251
+ position: absolute;
252
+ width: 1px;
253
+ height: 1px;
254
+ overflow: hidden;
255
+ clip: rect(0, 0, 0, 0);
256
+ white-space: nowrap;
257
+ }
258
+
259
+ .cp-hero-demo .cp-window--browser .cp-window__content {
260
+ min-height: 0;
261
+ }
262
+
263
+ .cp-hero-demo__site {
264
+ height: 100%;
265
+ background: var(--cp-c-bg);
266
+ color: var(--cp-c-text-1);
267
+ }
268
+
269
+ .cp-hero-demo__site-header {
270
+ display: grid;
271
+ grid-template-columns: 150px minmax(0, 1fr) auto;
272
+ align-items: center;
273
+ gap: 14px;
274
+ min-height: 46px;
275
+ padding: 0 14px;
17
276
  border-bottom: 1px solid var(--cp-c-border);
277
+ background: var(--cp-c-bg-elv);
18
278
  }
19
279
 
20
- .cp-hero-demo__dot {
21
- width: var(--cp-size-window-dot);
22
- height: var(--cp-size-window-dot);
23
- border-radius: 50%;
24
- background: var(--cp-c-bg-soft);
25
- border: 1px solid var(--cp-c-border);
280
+ .cp-hero-demo__site-wordmark {
281
+ color: var(--cp-c-brand-1);
282
+ font-family: var(--cp-font-family-pixel);
283
+ font-size: 17px;
284
+ letter-spacing: 0.08em;
285
+ line-height: 1;
286
+ text-transform: uppercase;
26
287
  }
27
288
 
28
- .cp-hero-demo__title {
29
- font-family: var(--cp-font-family-mono);
30
- font-size: var(--cp-fs-demo-title);
289
+ .cp-hero-demo__search {
290
+ display: flex;
291
+ width: 150px;
292
+ justify-content: space-between;
293
+ justify-self: end;
294
+ border: 1px solid var(--cp-c-border);
295
+ border-radius: var(--cp-radius-md);
296
+ padding: 5px 8px;
31
297
  color: var(--cp-c-text-3);
32
- margin-left: var(--cp-s-8);
298
+ font-family: var(--rp-font-family-mono);
299
+ font-size: 9px;
33
300
  }
34
301
 
35
- .cp-hero-demo__title em {
302
+ .cp-hero-demo__search kbd {
36
303
  color: var(--cp-c-text-2);
37
- font-style: normal;
304
+ font: inherit;
38
305
  }
39
306
 
40
- .cp-hero-demo__body {
41
- margin: 0;
42
- padding: var(--cp-s-20) var(--cp-s-24);
43
- font-family: var(--cp-font-family-mono);
44
- font-size: var(--cp-fs-demo-body);
45
- line-height: var(--cp-lh-demo);
46
- white-space: pre;
47
- overflow-x: auto;
307
+ .cp-hero-demo__site-nav {
308
+ display: flex;
309
+ gap: 16px;
310
+ min-width: 0;
311
+ color: var(--cp-c-text-2);
312
+ font-size: 10px;
313
+ }
314
+
315
+ .cp-hero-demo__site-nav strong {
316
+ color: var(--cp-c-brand-1);
317
+ }
318
+
319
+ .cp-hero-demo__docs-layout {
320
+ display: grid;
321
+ grid-template-columns: 154px minmax(0, 1fr) 126px;
322
+ height: calc(100% - 46px);
323
+ }
324
+
325
+ .cp-hero-demo__sidebar {
326
+ display: flex;
327
+ flex-direction: column;
328
+ gap: 7px;
329
+ padding: 12px 11px;
330
+ border-right: 1px solid var(--cp-c-border);
331
+ background: var(--cp-c-bg);
332
+ color: var(--cp-c-text-2);
333
+ font-size: 9px;
334
+ }
335
+
336
+ .cp-hero-demo__sidebar-menu {
337
+ margin: -12px -11px 8px;
338
+ border-bottom: 1px solid var(--cp-c-border);
339
+ padding: 10px 11px;
48
340
  color: var(--cp-c-text-1);
49
341
  }
50
342
 
51
- .cp-hero-demo__prompt,
52
- .cp-hero-demo__ok {
343
+ .cp-hero-demo__sidebar strong {
344
+ margin: -2px -4px 1px;
345
+ border-radius: var(--cp-radius-sm);
346
+ padding: 5px 6px;
347
+ background: color-mix(in srgb, var(--cp-c-brand-1) 16%, transparent);
53
348
  color: var(--cp-c-brand-1);
54
349
  }
55
350
 
56
- .cp-hero-demo__cmt {
351
+ .cp-hero-demo__sidebar-label {
352
+ margin-top: 4px;
57
353
  color: var(--cp-c-text-3);
354
+ font-family: var(--rp-font-family-mono);
355
+ font-size: 8px;
356
+ letter-spacing: 0.1em;
357
+ text-transform: uppercase;
58
358
  }
59
359
 
60
- .cp-hero-demo__info {
61
- color: var(--cp-c-tint-blue-fg);
360
+ .cp-hero-demo__document {
361
+ min-width: 0;
362
+ background: var(--cp-c-bg);
62
363
  }
63
364
 
64
- .cp-hero-demo__file {
65
- color: var(--cp-c-tint-amber-bright-fg);
365
+ .cp-hero-demo__breadcrumb {
366
+ border-bottom: 1px solid var(--cp-c-border);
367
+ padding: 10px 18px;
368
+ color: var(--cp-c-text-3);
369
+ font-size: 9px;
66
370
  }
67
371
 
68
- /* Image-form hero demo — the frame chrome (rounded corners + brand-soft
69
- glow shadow) stays; the `<img>` simply fills the surface. The hero
70
- slot already constrains aspect ratio. */
71
- .cp-hero-demo--image {
72
- padding: 0;
372
+ .cp-hero-demo__document article {
373
+ padding: 17px 22px 20px;
73
374
  }
74
375
 
75
- /* Code-form hero demo — the frame owns the chrome, so strip the native
76
- Rspress code block's own margin and rounded corners. */
77
- .cp-hero-demo--code .rp-codeblock {
376
+ .cp-hero-demo__document h2 {
78
377
  margin: 0;
79
- border-radius: 0;
378
+ color: var(--cp-c-text-1);
379
+ font-size: clamp(19px, 2.4vw, 25px);
380
+ line-height: 1.15;
381
+ }
382
+
383
+ .cp-hero-demo__document-rule {
384
+ height: 1px;
385
+ margin: 13px 0;
386
+ background: var(--cp-c-border);
80
387
  }
81
388
 
82
- .cp-hero-demo--code .rp-codeblock pre {
83
- overflow-x: auto;
389
+ .cp-hero-demo__document h3 {
390
+ margin: 0 0 9px;
391
+ color: var(--cp-c-text-1);
392
+ font-size: 14px;
393
+ }
394
+
395
+ .cp-hero-demo__document h3:last-child {
396
+ margin-top: 15px;
397
+ }
398
+
399
+ .cp-hero-demo__document p {
400
+ max-width: 480px;
401
+ margin: 0 0 10px;
402
+ color: var(--cp-c-text-2);
403
+ font-size: 10px;
404
+ line-height: 1.55;
84
405
  }
85
406
 
86
- .cp-hero-demo__img {
407
+ .cp-hero-demo__document code {
87
408
  display: block;
88
- width: 100%;
89
- height: auto;
90
- border-radius: inherit;
409
+ margin: 11px 0;
410
+ border: 1px solid var(--cp-c-border);
411
+ border-radius: var(--cp-radius-md);
412
+ padding: 8px 11px;
413
+ background: var(--cp-c-bg-soft);
414
+ color: var(--cp-c-brand-1);
415
+ font-family: var(--rp-font-family-mono);
416
+ font-size: 9px;
91
417
  }
92
418
 
93
- /* Custom Split visual `<pre>` shares the `.cp-split__code` surface with
94
- the default `ConfigPreview` block — same padding, font, scrolling. */
95
- .cp-split__code {
96
- margin: 0;
97
- padding: var(--cp-s-20) var(--cp-s-24);
98
- font-family: var(--cp-font-family-mono);
99
- font-size: var(--cp-fs-code);
100
- line-height: var(--cp-lh-code);
101
- white-space: pre;
102
- overflow-x: auto;
103
- color: var(--cp-c-text-1);
419
+ .cp-hero-demo__toc {
420
+ display: flex;
421
+ flex-direction: column;
422
+ gap: 9px;
423
+ border-left: 1px solid var(--cp-c-border);
424
+ padding: 14px 12px;
425
+ color: var(--cp-c-text-2);
426
+ font-size: 9px;
427
+ }
428
+
429
+ .cp-hero-demo__toc strong {
430
+ padding-bottom: 8px;
431
+ border-bottom: 1px solid var(--cp-c-border);
432
+ color: var(--cp-c-text-3);
433
+ font-family: var(--rp-font-family-mono);
434
+ font-size: 8px;
435
+ letter-spacing: 0.08em;
436
+ text-transform: uppercase;
437
+ }
438
+
439
+ .cp-hero-demo__toc span:first-of-type {
440
+ color: var(--cp-c-brand-1);
441
+ }
442
+
443
+ @keyframes cp-hero-demo-type-command {
444
+ to {
445
+ width: 14ch;
446
+ }
447
+ }
448
+
449
+ @keyframes cp-hero-demo-starting {
450
+ to {
451
+ opacity: 0.45;
452
+ }
453
+ }
454
+
455
+ @keyframes cp-hero-demo-show-loading {
456
+ to {
457
+ opacity: 1;
458
+ }
459
+ }
460
+
461
+ @media (prefers-reduced-motion: reduce) {
462
+ .cp-hero-demo__typing {
463
+ width: 14ch;
464
+ animation: none;
465
+ }
466
+
467
+ .cp-hero-demo__loading {
468
+ animation: none;
469
+ }
470
+
471
+ .cp-hero-demo__run-output,
472
+ .cp-hero-demo__status > span {
473
+ transition: none;
474
+ }
475
+
476
+ .cp-hero-demo__status .cp-term-text--yellow[data-visible='true'] {
477
+ animation: none;
478
+ }
479
+ }
480
+
481
+ @media (max-width: 640px) {
482
+ .cp-hero-demo .cp-window__titlebar {
483
+ padding-right: 132px;
484
+ }
485
+
486
+ .cp-hero-demo .cp-window__title,
487
+ .cp-hero-demo .cp-browser__tab {
488
+ visibility: hidden;
489
+ }
490
+
491
+ .cp-hero-demo__switcher button {
492
+ padding: 0 9px;
493
+ }
494
+
495
+ .cp-hero-demo__terminal {
496
+ height: 100%;
497
+ }
498
+
499
+ .cp-hero-demo__activity-row {
500
+ grid-template-columns: 64px 68px minmax(0, 1fr);
501
+ gap: 6px;
502
+ }
503
+
504
+ .cp-hero-demo__activity-row span:last-child {
505
+ display: none;
506
+ }
507
+
508
+ .cp-hero-demo__site-header {
509
+ display: flex;
510
+ min-height: 42px;
511
+ }
512
+
513
+ .cp-hero-demo__site-wordmark {
514
+ font-size: 15px;
515
+ }
516
+
517
+ .cp-hero-demo__site-nav,
518
+ .cp-hero-demo__search,
519
+ .cp-hero-demo__sidebar,
520
+ .cp-hero-demo__toc {
521
+ display: none;
522
+ }
523
+
524
+ .cp-hero-demo__docs-layout {
525
+ grid-template-columns: 1fr;
526
+ }
527
+
528
+ .cp-hero-demo__document article {
529
+ padding: 18px 20px;
530
+ }
531
+
532
+ .cp-hero-demo__document h2 {
533
+ font-size: 22px;
534
+ }
104
535
  }