@farming-labs/svelte-theme 0.0.3-beta.2 → 0.0.3-beta.4

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.
@@ -84,6 +84,57 @@
84
84
  }
85
85
  }
86
86
 
87
+ /* ─── Omni Command Palette — colorful theme ────────────────────────── */
88
+
89
+ .omni-content {
90
+ border-radius: 0.75rem;
91
+ }
92
+
93
+ .omni-item-active {
94
+ background: color-mix(in srgb, var(--color-fd-primary) 15%, transparent);
95
+ }
96
+
97
+ .omni-highlight {
98
+ background: color-mix(in srgb, var(--color-fd-primary) 30%, transparent);
99
+ }
100
+
101
+ .omni-search-input:focus {
102
+ caret-color: var(--color-fd-primary);
103
+ }
104
+
105
+ /* ─── Page Actions — colorful theme ────────────────────────────────── */
106
+
107
+ .fd-page-action-btn {
108
+ border-radius: 0.375rem !important;
109
+ font-size: 0.8125rem !important;
110
+ letter-spacing: normal !important;
111
+ box-shadow: none !important;
112
+ text-transform: capitalize !important;
113
+ font-family: var(--fd-font-sans, ui-sans-serif, system-ui, sans-serif) !important;
114
+ }
115
+
116
+ .fd-page-action-dropdown {
117
+ position: relative !important;
118
+ }
119
+
120
+ .fd-page-action-menu {
121
+ border-radius: 0.5rem !important;
122
+ border: 1px solid var(--color-fd-border) !important;
123
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
124
+ background: var(--color-fd-popover) !important;
125
+ }
126
+
127
+ .fd-page-action-menu-item {
128
+ border-radius: 0.25rem !important;
129
+ font-size: 0.8125rem !important;
130
+ color: var(--color-fd-foreground) !important;
131
+ }
132
+
133
+ .fd-page-action-menu-item:hover {
134
+ background: var(--color-fd-accent) !important;
135
+ color: var(--color-fd-accent-foreground) !important;
136
+ }
137
+
87
138
  /* ─── Page nav cards ───────────────────────────────────────────────── */
88
139
 
89
140
  .fd-page-nav-card {
@@ -148,3 +199,24 @@
148
199
  .fd-docs-content hr {
149
200
  border-color: var(--color-fd-border);
150
201
  }
202
+
203
+ /* ─── Ask AI button (floating + custom trigger) — sync with Next.js ───── */
204
+
205
+ .fd-ai-floating-btn {
206
+ border-radius: 26px;
207
+ box-shadow: 0 8px 32px rgba(180, 140, 20, 0.3);
208
+ }
209
+
210
+ .fd-ai-floating-btn:hover {
211
+ box-shadow: 0 10px 40px rgba(180, 140, 20, 0.4);
212
+ }
213
+
214
+ .fd-ai-floating-trigger .ask-ai-trigger {
215
+ font-family: var(--fd-font-sans, inherit);
216
+ border-radius: 26px !important;
217
+ box-shadow: 0 8px 32px rgba(180, 140, 20, 0.3) !important;
218
+ }
219
+
220
+ .fd-ai-floating-trigger .ask-ai-trigger:hover {
221
+ box-shadow: 0 10px 40px rgba(180, 140, 20, 0.4);
222
+ }
@@ -204,3 +204,74 @@ code:not(pre code) {
204
204
  .fd-ai-fm-trigger-btn:hover {
205
205
  transform: none;
206
206
  }
207
+
208
+ /* Custom Ask AI trigger — same as fd-ai-floating-btn for theme */
209
+ .fd-ai-floating-trigger .ask-ai-trigger {
210
+ font-family: var(--fd-font-sans, inherit);
211
+ border-radius: 2px !important;
212
+ }
213
+
214
+ .fd-ai-floating-trigger .ask-ai-trigger:hover {
215
+ box-shadow: 0 0 0 1px var(--color-fd-ring);
216
+ transform: none;
217
+ }
218
+
219
+ .fd-ai-fm-input-bar .fd-ai-floating-trigger .ask-ai-trigger {
220
+ border-radius: 2px !important;
221
+ }
222
+
223
+ .fd-ai-fm-input-bar .fd-ai-floating-trigger .ask-ai-trigger:hover {
224
+ transform: none;
225
+ }
226
+
227
+ /* ─── Omni Command Palette — darksharp theme ────────────────────── */
228
+
229
+ .omni-content {
230
+ border-radius: 0.5rem !important;
231
+ border: 1px solid var(--color-fd-border) !important;
232
+ background: var(--color-fd-popover) !important;
233
+ box-shadow:
234
+ 0 24px 60px -12px rgba(0, 0, 0, 0.7),
235
+ 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
236
+ }
237
+
238
+ .omni-item {
239
+ border-radius: 0.25rem !important;
240
+ }
241
+
242
+ .omni-highlight {
243
+ background: color-mix(in srgb, var(--color-fd-primary) 30%, transparent) !important;
244
+ }
245
+
246
+ /* ─── Page Actions — darksharp theme ────────────────────────────── */
247
+
248
+ .fd-page-action-btn {
249
+ border-radius: 0.2rem !important;
250
+ font-size: 0.8125rem !important;
251
+ letter-spacing: normal !important;
252
+ box-shadow: none !important;
253
+ text-transform: capitalize !important;
254
+ font-family: var(--fd-font-sans, ui-sans-serif, system-ui, sans-serif) !important;
255
+ }
256
+
257
+ .fd-page-action-dropdown {
258
+ position: relative !important;
259
+ }
260
+
261
+ .fd-page-action-menu {
262
+ border-radius: 0.2rem !important;
263
+ border: 1px solid var(--color-fd-border) !important;
264
+ box-shadow: 0 4px 24px hsl(0 0% 0% / 0.4) !important;
265
+ background: var(--color-fd-popover) !important;
266
+ }
267
+
268
+ .fd-page-action-menu-item {
269
+ border-radius: 0.1rem !important;
270
+ font-size: 0.8125rem !important;
271
+ color: var(--color-fd-foreground) !important;
272
+ }
273
+
274
+ .fd-page-action-menu-item:hover {
275
+ background: var(--color-fd-accent) !important;
276
+ color: var(--color-fd-accent-foreground) !important;
277
+ }
package/styles/docs.css CHANGED
@@ -6,6 +6,8 @@
6
6
  * --color-fd-primary, --color-fd-background, --color-fd-foreground, etc.
7
7
  */
8
8
 
9
+ @import "./omni.css";
10
+
9
11
  /* ─── CSS Reset ──────────────────────────────────────────────────────── */
10
12
 
11
13
  *,
@@ -70,10 +72,11 @@ html {
70
72
 
71
73
  body {
72
74
  font-family: var(--fd-font-sans, ui-sans-serif, system-ui, -apple-system, sans-serif);
75
+ font-size: var(--fd-body-size, 1rem);
76
+ font-weight: var(--fd-body-weight, 400);
77
+ line-height: var(--fd-body-line-height, 1.75);
73
78
  background: var(--color-fd-background);
74
79
  color: var(--color-fd-foreground);
75
- line-height: 1.5;
76
- font-size: 14px;
77
80
  -webkit-font-smoothing: antialiased;
78
81
  -moz-osx-font-smoothing: grayscale;
79
82
  }
@@ -88,6 +91,7 @@ samp {
88
91
  "Cascadia Code",
89
92
  "Source Code Pro",
90
93
  Menlo,
94
+ Consolas,
91
95
  monospace
92
96
  );
93
97
  }
@@ -560,24 +564,167 @@ samp {
560
564
  }
561
565
  }
562
566
 
563
- /* ─── Page description (frontmatter) ─────────────────────────────────── */
567
+ /* ─── Page title + description (match Nuxt/Astro: title first, then description) ─────── */
568
+
569
+ .fd-page-title {
570
+ font-size: var(--fd-h1-size, 2.25rem);
571
+ font-weight: var(--fd-h1-weight, 700);
572
+ line-height: var(--fd-h1-line-height, 1.2);
573
+ letter-spacing: var(--fd-h1-letter-spacing, -0.025em);
574
+ margin: 0 0 0.5rem;
575
+ scroll-margin-top: 80px;
576
+ }
564
577
 
565
578
  .fd-page-description {
579
+ margin-top: 0;
566
580
  margin-bottom: 1rem;
567
- font-size: 1.125rem;
568
- line-height: 1.75;
581
+ font-size: var(--fd-body-size, 1.125rem);
582
+ font-weight: var(--fd-body-weight, 400);
583
+ line-height: var(--fd-body-line-height, 1.75);
569
584
  color: var(--color-fd-muted-foreground);
570
585
  }
571
586
 
587
+ /* ─── Page Actions (Copy page / Open in …) ─────────────────────────────── */
588
+
589
+ .fd-page-actions-divider {
590
+ border: none;
591
+ border-top: 1px solid var(--color-fd-border);
592
+ margin: 1rem 0 0.75rem;
593
+ }
594
+
595
+ .fd-page-actions,
596
+ [data-page-actions] {
597
+ display: flex;
598
+ flex-direction: row;
599
+ align-items: center;
600
+ gap: 0.5rem;
601
+ margin-top: 0;
602
+ margin-bottom: 1rem;
603
+ width: 100%;
604
+ }
605
+
606
+ .fd-page-actions[data-actions-alignment="right"],
607
+ [data-page-actions][data-actions-alignment="right"] {
608
+ justify-content: flex-end;
609
+ }
610
+
611
+ .fd-page-actions[data-actions-alignment="left"],
612
+ [data-page-actions][data-actions-alignment="left"] {
613
+ justify-content: flex-start;
614
+ }
615
+
616
+ .fd-page-action-btn {
617
+ display: inline-flex;
618
+ align-items: center;
619
+ gap: 0.375rem;
620
+ padding: 0.375rem 0.75rem;
621
+ font-size: 0.8125rem;
622
+ font-weight: 500;
623
+ line-height: 1;
624
+ min-height: 2rem;
625
+ color: var(--color-fd-muted-foreground);
626
+ background: var(--color-fd-secondary);
627
+ border: 1px solid var(--color-fd-border);
628
+ border-radius: 0.375rem;
629
+ cursor: pointer;
630
+ white-space: nowrap;
631
+ transition:
632
+ color 0.15s,
633
+ background 0.15s,
634
+ border-color 0.15s;
635
+ user-select: none;
636
+ }
637
+
638
+ .fd-page-action-btn:hover {
639
+ color: var(--color-fd-accent-foreground);
640
+ background: var(--color-fd-accent);
641
+ }
642
+
643
+ .fd-page-action-btn[data-copied="true"] {
644
+ color: var(--color-fd-foreground);
645
+ }
646
+
647
+ .fd-page-action-btn svg {
648
+ flex-shrink: 0;
649
+ }
650
+
651
+ .fd-page-action-dropdown {
652
+ position: relative;
653
+ }
654
+
655
+ .fd-page-action-menu {
656
+ position: absolute;
657
+ top: calc(100% + 0.375rem);
658
+ left: 0;
659
+ z-index: 50;
660
+ min-width: 220px;
661
+ padding: 0.375rem;
662
+ background: var(--color-fd-popover, var(--color-fd-background));
663
+ border: 1px solid var(--color-fd-border);
664
+ border-radius: 0.5rem;
665
+ box-shadow: 0 4px 24px hsl(0 0% 0% / 0.15);
666
+ display: flex;
667
+ flex-direction: column;
668
+ gap: 0.125rem;
669
+ }
670
+
671
+ .fd-page-action-menu[hidden] {
672
+ display: none !important;
673
+ }
674
+
675
+ .fd-page-action-menu-item {
676
+ display: flex;
677
+ align-items: center;
678
+ gap: 0.5rem;
679
+ width: 100%;
680
+ padding: 0.35rem 0.625rem;
681
+ font-size: 0.8125rem;
682
+ font-weight: 400;
683
+ color: var(--color-fd-foreground);
684
+ background: transparent;
685
+ border: none;
686
+ border-radius: 0.25rem;
687
+ cursor: pointer;
688
+ text-align: left;
689
+ text-decoration: none;
690
+ transition: background 0.1s, color 0.1s;
691
+ }
692
+
693
+ .fd-page-action-menu-item:hover {
694
+ background: var(--color-fd-accent);
695
+ color: var(--color-fd-accent-foreground);
696
+ }
697
+
698
+ .fd-page-action-menu-label {
699
+ flex: 1;
700
+ }
701
+
702
+ .fd-page-actions a,
703
+ .fd-page-actions button,
704
+ .fd-page-action-menu-item,
705
+ .fd-page-action-btn {
706
+ text-decoration: none !important;
707
+ }
708
+
709
+ .fd-page-action-menu-item:hover {
710
+ text-decoration: none !important;
711
+ }
712
+
713
+ .fd-last-modified-below-title {
714
+ margin-top: 0.25rem;
715
+ margin-bottom: 1rem;
716
+ }
717
+
572
718
  /* ─── Breadcrumb ─────────────────────────────────────────────────────── */
573
719
 
574
720
  .fd-breadcrumb {
575
721
  display: flex;
576
722
  align-items: center;
577
723
  gap: 0;
578
- font-size: 13px;
724
+ font-size: var(--fd-small-size, 0.8125rem);
725
+ font-family: var(--fd-font-sans, inherit);
579
726
  color: var(--color-fd-muted-foreground);
580
- margin-bottom: 8px;
727
+ margin-bottom: 2rem;
581
728
  }
582
729
 
583
730
  .fd-breadcrumb-item {
@@ -588,7 +735,7 @@ samp {
588
735
  .fd-breadcrumb-sep {
589
736
  margin: 0 6px;
590
737
  opacity: 0.4;
591
- font-size: 12px;
738
+ font-size: var(--fd-small-size, 0.75rem);
592
739
  }
593
740
 
594
741
  .fd-breadcrumb-parent {
@@ -805,6 +952,9 @@ samp {
805
952
 
806
953
  .fd-page-body p {
807
954
  margin: 0 0 16px;
955
+ font-size: var(--fd-body-size, 1rem);
956
+ font-weight: var(--fd-body-weight, 400);
957
+ line-height: var(--fd-body-line-height, 1.75);
808
958
  }
809
959
 
810
960
  .fd-page-body ul,
@@ -815,6 +965,9 @@ samp {
815
965
 
816
966
  .fd-page-body li {
817
967
  margin: 4px 0;
968
+ font-size: var(--fd-body-size, 1rem);
969
+ font-weight: var(--fd-body-weight, 400);
970
+ line-height: var(--fd-body-line-height, 1.75);
818
971
  }
819
972
 
820
973
  .fd-page-body li::marker {
@@ -1245,7 +1398,8 @@ html.dark pre.shiki {
1245
1398
 
1246
1399
  .fd-last-modified {
1247
1400
  color: var(--color-fd-muted-foreground);
1248
- font-size: 12px;
1401
+ font-size: var(--fd-small-size, 0.75rem);
1402
+ font-weight: var(--fd-small-weight, 400);
1249
1403
  }
1250
1404
 
1251
1405
  @media (max-width: 640px) {
@@ -1304,7 +1458,7 @@ html.dark pre.shiki {
1304
1458
 
1305
1459
  .fd-page-nav-card:hover {
1306
1460
  background: var(--color-fd-accent);
1307
- border-color: var(--color-fd-ring);
1461
+ border-color: var(--color-fd-border);
1308
1462
  }
1309
1463
 
1310
1464
  .fd-page-nav-next {
@@ -2038,7 +2192,8 @@ html.dark pre.shiki {
2038
2192
  backdrop-filter: blur(4px);
2039
2193
  color: var(--color-fd-muted-foreground, #71717a);
2040
2194
  cursor: pointer;
2041
- font-size: 14px;
2195
+ font-size: var(--fd-small-size, 0.875rem);
2196
+ font-family: var(--fd-font-sans, inherit);
2042
2197
  box-shadow: 0 1px 3px color-mix(in srgb, var(--color-fd-background, #000) 20%, transparent);
2043
2198
  transition:
2044
2199
  transform 150ms,
@@ -2064,6 +2219,37 @@ html.dark pre.shiki {
2064
2219
  animation: fd-ai-fade-in 300ms ease-out;
2065
2220
  }
2066
2221
 
2222
+ /* Custom Ask AI trigger (e.g. triggerComponent): same base as .fd-ai-floating-btn
2223
+ so theme overrides for fd-ai-floating-btn can also target .ask-ai-trigger */
2224
+ .fd-ai-floating-trigger .ask-ai-trigger {
2225
+ display: flex;
2226
+ align-items: center;
2227
+ justify-content: center;
2228
+ gap: 8px;
2229
+ padding: 8px 12px;
2230
+ height: 40px;
2231
+ border-radius: 16px;
2232
+ border: 1px solid var(--color-fd-border, rgba(255, 255, 255, 0.1));
2233
+ background: color-mix(in srgb, var(--color-fd-secondary, #f4f4f5) 80%, transparent);
2234
+ backdrop-filter: blur(4px);
2235
+ color: var(--color-fd-muted-foreground, #71717a);
2236
+ cursor: pointer;
2237
+ font-size: var(--fd-small-size, 0.875rem);
2238
+ font-family: var(--fd-font-sans, inherit);
2239
+ box-shadow: 0 1px 3px color-mix(in srgb, var(--color-fd-background, #000) 20%, transparent);
2240
+ transition: transform 150ms, background 150ms, color 150ms;
2241
+ }
2242
+
2243
+ .fd-ai-floating-trigger .ask-ai-trigger:hover {
2244
+ background: var(--color-fd-accent);
2245
+ color: var(--color-fd-accent-foreground);
2246
+ transform: scale(1.03);
2247
+ }
2248
+
2249
+ .fd-ai-floating-trigger .ask-ai-trigger:active {
2250
+ transform: scale(0.97);
2251
+ }
2252
+
2067
2253
  /* ═══════════════════════════════════════════════════════════════
2068
2254
  Full-Modal (better-auth inspired) — fd-ai-fm-*
2069
2255
  ═══════════════════════════════════════════════════════════════ */