@slidev-react/theme-paper 0.2.5

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 slidev-react contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,9 @@
1
+ import type { ReactNode } from "react";
2
+
3
+ export function PaperBadge({ children }: { children: ReactNode }) {
4
+ return (
5
+ <span className="inline-flex items-center rounded-full border border-[rgba(146,64,14,0.2)] bg-[rgba(255,247,237,0.95)] px-3 py-1 text-[0.8em] font-semibold uppercase tracking-[0.14em] text-amber-800 shadow-[0_8px_18px_rgba(146,64,14,0.08)]">
6
+ {children}
7
+ </span>
8
+ );
9
+ }
package/index.ts ADDED
@@ -0,0 +1,18 @@
1
+ import { defineTheme } from "@slidev-react/core/theme";
2
+ import { PaperCoverLayout } from "./layouts/CoverLayout";
3
+ import { PaperBadge } from "./components/PaperBadge";
4
+
5
+ export default defineTheme({
6
+ id: "paper",
7
+ label: "Paper",
8
+ colorScheme: "light",
9
+ rootAttributes: {
10
+ "data-slide-theme": "paper",
11
+ },
12
+ layouts: {
13
+ cover: PaperCoverLayout,
14
+ },
15
+ mdxComponents: {
16
+ Badge: PaperBadge,
17
+ },
18
+ });
@@ -0,0 +1,12 @@
1
+ import type { ReactNode } from "react";
2
+
3
+ export function PaperCoverLayout({ children }: { children: ReactNode }) {
4
+ return (
5
+ <section className="slide-layout-cover grid size-full place-content-center">
6
+ <div className="paper-cover-shell mx-auto w-full max-w-[1500px] rounded-[32px] border border-[rgba(146,64,14,0.18)] bg-[rgba(255,251,235,0.84)] px-18 py-16 shadow-[0_30px_100px_rgba(146,64,14,0.12)]">
7
+ <div className="paper-cover-accent mb-8 h-2 w-28 rounded-full bg-[linear-gradient(90deg,#b45309_0%,#f59e0b_100%)]" />
8
+ {children}
9
+ </div>
10
+ </section>
11
+ );
12
+ }
package/package.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@slidev-react/theme-paper",
3
+ "version": "0.2.5",
4
+ "type": "module",
5
+ "main": "./index.ts",
6
+ "exports": {
7
+ ".": "./index.ts",
8
+ "./style.css": "./style.css"
9
+ },
10
+ "peerDependencies": {
11
+ "react": "^19.0.0",
12
+ "@slidev-react/core": "0.2.5"
13
+ },
14
+ "publishConfig": {
15
+ "access": "public"
16
+ }
17
+ }
package/style.css ADDED
@@ -0,0 +1,34 @@
1
+ :root[data-slide-theme="paper"] {
2
+ --font-sans:
3
+ "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Source Han Serif SC", "Songti SC",
4
+ serif;
5
+ --slide-color-body: #3f2a1d;
6
+ --slide-color-heading: #2b1d12;
7
+ --slide-color-muted: #6b4f3a;
8
+ --slide-link-decoration-style: solid;
9
+ --slide-link-decoration-color: rgba(120, 53, 15, 0.26);
10
+ --slide-link-decoration-color-hover: rgba(120, 53, 15, 0.48);
11
+ --slide-list-bullet-bg: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
12
+ --slide-list-bullet-shadow: 0 0 0 2px rgba(245, 158, 11, 0.12), 0 4px 10px rgba(180, 83, 9, 0.18);
13
+ --slide-ol-badge-bg: rgba(245, 158, 11, 0.14);
14
+ --slide-ol-badge-color: #92400e;
15
+ --slide-blockquote-border-color: #d97706;
16
+ --slide-blockquote-bg: #fff7ed;
17
+ --slide-table-head-bg: rgba(146, 64, 14, 0.05);
18
+ --slide-inline-code-bg: rgba(120, 53, 15, 0.08);
19
+ --slide-badge-bg: #ffedd5;
20
+ --slide-badge-color: #9a3412;
21
+ --slide-badge-border: 1px solid rgba(146, 64, 14, 0.14);
22
+ }
23
+
24
+ :root[data-slide-theme="paper"] body {
25
+ background: linear-gradient(180deg, #f8f1e4 0%, #f5efe5 100%);
26
+ }
27
+
28
+ :root[data-slide-theme="paper"] .slide-prose a {
29
+ color: #9a3412;
30
+ }
31
+
32
+ :root[data-slide-theme="paper"] .slide-prose strong {
33
+ color: #2b1d12;
34
+ }