@rspress/core 0.0.5 → 0.0.7

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.
@@ -26,6 +26,12 @@
26
26
  --rp-c-gray-light-3: #d1d1d1;
27
27
  --rp-c-gray-light-4: #e5e5e5;
28
28
  --rp-c-gray-light-5: #f2f2f2;
29
+ --rp-c-dark: #000000;
30
+ --rp-c-dark-light-1: #2f2f2f;
31
+ --rp-c-dark-light-2: #3a3a3a;
32
+ --rp-c-dark-light-3: #4a4a4a;
33
+ --rp-c-dark-light-4: #5c5c5c;
34
+ --rp-c-dark-light-5: #6b6b6b;
29
35
  }
30
36
  .dark {
31
37
  --rp-c-bg: #000;
@@ -552,6 +558,9 @@ video {
552
558
  .h-full {
553
559
  height: 100%;
554
560
  }
561
+ .min-h-\[50vh\] {
562
+ min-height: 50vh;
563
+ }
555
564
  .w-12 {
556
565
  width: 3rem;
557
566
  }
@@ -567,12 +576,6 @@ video {
567
576
  .w-full {
568
577
  width: 100%;
569
578
  }
570
- .w-max {
571
- width: max-content;
572
- }
573
- .min-w-full {
574
- min-width: 100%;
575
- }
576
579
  .max-w-6xl {
577
580
  max-width: 72rem;
578
581
  }
@@ -672,9 +675,6 @@ video {
672
675
  .border {
673
676
  border-width: 1px;
674
677
  }
675
- .border-b {
676
- border-bottom-width: 1px;
677
- }
678
678
  .border-l-2 {
679
679
  border-left-width: 2px;
680
680
  }
@@ -1199,8 +1199,8 @@ button:focus-visible {
1199
1199
  .md\:pb-3 {
1200
1200
  padding-bottom: 0.75rem;
1201
1201
  }
1202
- .md\:pt-20 {
1203
- padding-top: 5rem;
1202
+ .md\:pt-16 {
1203
+ padding-top: 4rem;
1204
1204
  }
1205
1205
  .md\:text-2xl {
1206
1206
  font-size: 1.5rem;
@@ -1573,7 +1573,7 @@ button:focus-visible {
1573
1573
  transition: color 0.25s;
1574
1574
  }
1575
1575
 
1576
- /* src/theme-default/components/Sidebar/index.module.scss?css_virtual&hash=ce281d13b4e92a30a18a133987fd1974 */
1576
+ /* src/theme-default/components/Sidebar/index.module.scss?css_virtual&hash=1e50b22992d3cc70c0758d47a8be6804 */
1577
1577
  .sidebar_74484 {
1578
1578
  position: fixed;
1579
1579
  top: 0;
@@ -1669,6 +1669,9 @@ button:focus-visible {
1669
1669
  height: 100%;
1670
1670
  background-color: var(--rp-c-gray-light-4);
1671
1671
  }
1672
+ .dark .rspress-sidebar-group::before {
1673
+ background-color: var(--rp-c-bg-mute);
1674
+ }
1672
1675
 
1673
1676
  /* src/theme-default/components/LocalSideBar/index.module.scss?css_virtual&hash=8ee65aa6fc817c893cd6d70fa6feed70 */
1674
1677
  .localNav_dce60 {
@@ -2345,25 +2348,47 @@ button:focus-visible {
2345
2348
  transform: translateX(4px);
2346
2349
  }
2347
2350
 
2348
- /* src/theme-default/components/Tabs/index.module.scss?css_virtual&hash=20dfb36142668180a4b89cab6352cf49 */
2351
+ /* src/theme-default/components/Tabs/index.module.scss?css_virtual&hash=c9e818d0bb47534fff6481cd9a970a36 */
2352
+ .container_7e0fb {
2353
+ border: 1px solid var(--rp-c-gray-light-3);
2354
+ border-radius: 8px;
2355
+ }
2356
+ .dark .container_7e0fb {
2357
+ border-color: var(--rp-c-dark-light-1);
2358
+ }
2359
+ .tab-list_7e0fb {
2360
+ padding-left: 8px;
2361
+ padding-top: 4px;
2362
+ display: flex;
2363
+ min-width: 100%;
2364
+ border-bottom-width: 1px;
2365
+ border-color: var(--rp-c-gray-light-3);
2366
+ }
2367
+ .dark .tab-list_7e0fb {
2368
+ border-color: var(--rp-c-dark-light-1);
2369
+ }
2349
2370
  .tab_7e0fb {
2350
2371
  color: var(--rp-c-text-2);
2351
- border-bottom: 2px solid transparent;
2372
+ border-bottom: 1px solid transparent;
2352
2373
  box-sizing: border-box;
2353
2374
  margin-right: 10px;
2354
- padding: 4px;
2355
- transition: colors 0.2s;
2375
+ padding: 6px 8px;
2356
2376
  margin-bottom: -1px;
2357
2377
  user-select: none;
2358
- transition: all 0.25s ease-in-out;
2378
+ transition: all 0.2s ease-in-out;
2359
2379
  }
2360
2380
  .tab_7e0fb:last-child {
2361
2381
  margin-right: 0;
2362
2382
  }
2363
2383
  .not-selected_7e0fb:hover {
2364
2384
  color: var(--rp-c-text-1);
2365
- border-color: var(--rp-c-gray-light-2);
2366
- border-radius: 2px;
2385
+ border-color: var(--rp-c-gray);
2386
+ border-top-left-radius: 10px;
2387
+ border-top-right-radius: 10px;
2388
+ background-color: var(--rp-c-gray-light-5);
2389
+ }
2390
+ .dark .not-selected_7e0fb:hover {
2391
+ background-color: var(--rp-c-dark-light-3);
2367
2392
  }
2368
2393
  .selected_7e0fb {
2369
2394
  color: var(--rp-c-brand-dark);
@@ -1815,7 +1815,7 @@ function HomeHero({ frontmatter }) {
1815
1815
  const hero = ((_frontmatter = frontmatter) === null || _frontmatter === void 0 ? void 0 : _frontmatter.hero) || DEFAULT_HERO;
1816
1816
  const hasImage = hero.image !== void 0;
1817
1817
  return /* @__PURE__ */ _jsxs10("div", {
1818
- className: "m-auto pt-0 px-6 pb-12 sm:pt-10 sm:px-16 md:pt-20 md:px-16 md:pb-16",
1818
+ className: "m-auto pt-0 px-6 pb-12 sm:pt-10 sm:px-16 md:pt-16 md:px-16 md:pb-16",
1819
1819
  children: [
1820
1820
  /* @__PURE__ */ _jsx15("div", {
1821
1821
  className: index_module_default9.mask,
@@ -1824,7 +1824,7 @@ function HomeHero({ frontmatter }) {
1824
1824
  }
1825
1825
  }),
1826
1826
  /* @__PURE__ */ _jsxs10("div", {
1827
- className: "m-auto flex flex-col md:flex-row max-w-6xl",
1827
+ className: "m-auto flex flex-col md:flex-row max-w-6xl min-h-[50vh]",
1828
1828
  children: [
1829
1829
  /* @__PURE__ */ _jsxs10("div", {
1830
1830
  className: "flex flex-col justify-center text-center max-w-xl sm:max-w-4xl m-auto order-2 md:order-1",
@@ -3606,7 +3606,7 @@ import { useContext as useContext4 } from "react";
3606
3606
  import { Tab as HeadlessTab } from "@headlessui/react";
3607
3607
 
3608
3608
  // src/theme-default/components/Tabs/index.module.scss
3609
- var index_module_default16 = { "tab": "tab_7e0fb", "not-selected": "not-selected_7e0fb", "notSelected": "not-selected_7e0fb", "selected": "selected_7e0fb" };
3609
+ var index_module_default16 = { "container": "container_7e0fb", "tab-list": "tab-list_7e0fb", "tabList": "tab-list_7e0fb", "tab": "tab_7e0fb", "not-selected": "not-selected_7e0fb", "notSelected": "not-selected_7e0fb", "selected": "selected_7e0fb" };
3610
3610
 
3611
3611
  // src/theme-default/components/Tabs/index.tsx
3612
3612
  function _define_property19(obj, key, value) {
@@ -3732,48 +3732,51 @@ function Tabs(props) {
3732
3732
  return false;
3733
3733
  });
3734
3734
  }
3735
- return /* @__PURE__ */ _jsxs24(HeadlessTab.Group, _object_spread_props15(_object_spread19({
3736
- onChange: (index) => {
3737
- var _onChange;
3738
- (_onChange = onChange) === null || _onChange === void 0 ? void 0 : _onChange(index);
3739
- if (groupId) {
3740
- setTabData(_object_spread_props15(_object_spread19({}, tabData), {
3741
- [groupId]: index
3742
- }));
3735
+ return /* @__PURE__ */ _jsx36("div", {
3736
+ className: index_module_default16.container,
3737
+ children: /* @__PURE__ */ _jsxs24(HeadlessTab.Group, _object_spread_props15(_object_spread19({
3738
+ onChange: (index) => {
3739
+ var _onChange;
3740
+ (_onChange = onChange) === null || _onChange === void 0 ? void 0 : _onChange(index);
3741
+ if (groupId) {
3742
+ setTabData(_object_spread_props15(_object_spread19({}, tabData), {
3743
+ [groupId]: index
3744
+ }));
3745
+ }
3743
3746
  }
3744
- }
3745
- }, needSync ? {
3746
- selectedIndex: defaultIndex
3747
- } : {
3748
- defaultIndex
3749
- }), {
3750
- children: [
3751
- /* @__PURE__ */ _jsx36("div", {
3752
- className: tabContainerClassName || "",
3753
- children: tabValues.length ? /* @__PURE__ */ _jsx36(HeadlessTab.List, {
3754
- className: "mt-4 flex w-max min-w-full border-b border-gray-200 dark:border-dark-200",
3755
- children: tabValues.map((item, index) => {
3756
- const disabled = Boolean(item && typeof item === "object" && "disabled" in item && item.disabled);
3757
- return /* @__PURE__ */ _jsx36(HeadlessTab, {
3758
- disabled,
3759
- className: ({ selected }) => `${index_module_default16.tab} ${selected ? index_module_default16.selected : index_module_default16.notSelected}`,
3760
- children: renderTab(item)
3761
- }, index);
3762
- })
3763
- }) : null
3764
- }),
3765
- /* @__PURE__ */ _jsx36(HeadlessTab.Panels, {
3766
- children
3767
- })
3768
- ]
3769
- }));
3747
+ }, needSync ? {
3748
+ selectedIndex: defaultIndex
3749
+ } : {
3750
+ defaultIndex
3751
+ }), {
3752
+ children: [
3753
+ /* @__PURE__ */ _jsx36("div", {
3754
+ className: tabContainerClassName,
3755
+ children: tabValues.length ? /* @__PURE__ */ _jsx36(HeadlessTab.List, {
3756
+ className: index_module_default16.tabList,
3757
+ children: tabValues.map((item, index) => {
3758
+ const disabled = Boolean(item && typeof item === "object" && "disabled" in item && item.disabled);
3759
+ return /* @__PURE__ */ _jsx36(HeadlessTab, {
3760
+ disabled,
3761
+ className: ({ selected }) => `${index_module_default16.tab} ${selected ? index_module_default16.selected : index_module_default16.notSelected}`,
3762
+ children: renderTab(item)
3763
+ }, index);
3764
+ })
3765
+ }) : null
3766
+ }),
3767
+ /* @__PURE__ */ _jsx36(HeadlessTab.Panels, {
3768
+ children
3769
+ })
3770
+ ]
3771
+ }))
3772
+ });
3770
3773
  }
3771
3774
  function Tab(_param) {
3772
3775
  var { children } = _param, props = _object_without_properties(_param, [
3773
3776
  "children"
3774
3777
  ]);
3775
3778
  return /* @__PURE__ */ _jsx36(HeadlessTab.Panel, _object_spread_props15(_object_spread19({}, props), {
3776
- className: "rounded pt-4",
3779
+ className: "rounded px-2",
3777
3780
  children
3778
3781
  }));
3779
3782
  }