boltdocs 1.10.1 → 1.10.2
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/{SearchDialog-MEWGAONO.mjs → SearchDialog-AGVF6JBO.mjs} +1 -1
- package/dist/{SearchDialog-BEVZQ74P.css → SearchDialog-YPDOM7Q6.css} +196 -28
- package/dist/{chunk-OZLYRXAD.mjs → chunk-TKLQWU7H.mjs} +177 -171
- package/dist/client/index.css +196 -28
- package/dist/client/index.d.mts +3 -10
- package/dist/client/index.d.ts +3 -10
- package/dist/client/index.js +377 -341
- package/dist/client/index.mjs +91 -52
- package/dist/client/ssr.css +196 -28
- package/dist/client/ssr.js +190 -192
- package/dist/client/ssr.mjs +1 -1
- package/package.json +1 -1
- package/src/client/index.ts +0 -1
- package/src/client/theme/components/CodeBlock/CodeBlock.tsx +22 -1
- package/src/client/theme/components/Playground/Playground.tsx +104 -48
- package/src/client/theme/components/Playground/playground.css +88 -18
- package/src/client/theme/styles/markdown.css +53 -0
- package/src/client/theme/styles/variables.css +0 -12
- package/src/client/theme/styles.css +1 -0
- package/src/client/theme/ui/CopyMarkdown/copy-markdown.css +0 -2
- package/src/client/theme/ui/ErrorBoundary/ErrorBoundary.tsx +19 -15
- package/src/client/theme/ui/ErrorBoundary/error-boundary.css +55 -0
- package/src/client/theme/ui/Layout/Layout.tsx +5 -10
- package/src/client/theme/ui/Layout/base.css +2 -1
- package/src/client/theme/ui/Layout/responsive.css +11 -0
- package/src/client/theme/ui/BackgroundGradient/BackgroundGradient.tsx +0 -10
- package/src/client/theme/ui/BackgroundGradient/index.ts +0 -1
package/dist/client/index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
BackgroundGradient,
|
|
3
2
|
Breadcrumbs,
|
|
4
3
|
CodeBlock,
|
|
5
4
|
Head,
|
|
@@ -10,7 +9,7 @@ import {
|
|
|
10
9
|
Sidebar,
|
|
11
10
|
ThemeLayout,
|
|
12
11
|
createBoltdocsApp
|
|
13
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-TKLQWU7H.mjs";
|
|
14
13
|
import {
|
|
15
14
|
Video
|
|
16
15
|
} from "../chunk-Z7JHYNAS.mjs";
|
|
@@ -23,12 +22,12 @@ import {
|
|
|
23
22
|
import "../chunk-FMTOYQLO.mjs";
|
|
24
23
|
|
|
25
24
|
// src/client/theme/components/Playground/Playground.tsx
|
|
26
|
-
import React, { useState } from "react";
|
|
25
|
+
import React, { useState, useMemo } from "react";
|
|
27
26
|
import { LiveProvider, LiveEditor, LiveError, LivePreview } from "react-live";
|
|
28
27
|
import { Copy, Check, Terminal, Play } from "lucide-react";
|
|
29
28
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
30
29
|
function prepareCode(raw) {
|
|
31
|
-
const trimmed = raw.trim();
|
|
30
|
+
const trimmed = (raw || "").trim();
|
|
32
31
|
const fnMatch = trimmed.match(/export\s+default\s+function\s+(\w+)/);
|
|
33
32
|
if (fnMatch) {
|
|
34
33
|
const name = fnMatch[1];
|
|
@@ -47,65 +46,106 @@ render(<${name} />);`;
|
|
|
47
46
|
return { code: trimmed, noInline: false };
|
|
48
47
|
}
|
|
49
48
|
function Playground({
|
|
50
|
-
code,
|
|
49
|
+
code: propsCode,
|
|
51
50
|
children,
|
|
51
|
+
preview,
|
|
52
52
|
scope = {},
|
|
53
53
|
readonly = false,
|
|
54
54
|
noInline: forceNoInline
|
|
55
55
|
}) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
const initialCode = useMemo(() => {
|
|
57
|
+
let base = propsCode || "";
|
|
58
|
+
if (!base && typeof children === "string") {
|
|
59
|
+
base = children;
|
|
60
|
+
}
|
|
61
|
+
return base.trim();
|
|
62
|
+
}, [propsCode, children]);
|
|
63
|
+
const prepared = useMemo(() => prepareCode(initialCode), [initialCode]);
|
|
61
64
|
const useNoInline = forceNoInline ?? prepared.noInline;
|
|
62
65
|
const [copied, setCopied] = useState(false);
|
|
63
66
|
const [activeCode, setActiveCode] = useState(prepared.code);
|
|
67
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
68
|
+
React.useEffect(() => {
|
|
69
|
+
setActiveCode(prepared.code);
|
|
70
|
+
}, [prepared.code]);
|
|
64
71
|
const handleCopy = () => {
|
|
65
|
-
|
|
72
|
+
const textToCopy = !!preview ? initialCode : activeCode;
|
|
73
|
+
navigator.clipboard.writeText(textToCopy);
|
|
66
74
|
setCopied(true);
|
|
67
75
|
setTimeout(() => setCopied(false), 2e3);
|
|
68
76
|
};
|
|
69
77
|
const extendedScope = { React, ...scope };
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
)
|
|
93
|
-
] }),
|
|
94
|
-
/* @__PURE__ */ jsx("div", { className: "playground-panel-content playground-editor", children: /* @__PURE__ */ jsx(LiveEditor, { disabled: readonly, onChange: setActiveCode }) })
|
|
95
|
-
] }),
|
|
96
|
-
/* @__PURE__ */ jsxs("div", { className: "playground-panel playground-preview-panel", children: [
|
|
97
|
-
/* @__PURE__ */ jsx("div", { className: "playground-panel-header", children: /* @__PURE__ */ jsxs("div", { className: "playground-panel-title", children: [
|
|
98
|
-
/* @__PURE__ */ jsx(Play, { size: 14 }),
|
|
99
|
-
/* @__PURE__ */ jsx("span", { children: "Preview" })
|
|
100
|
-
] }) }),
|
|
101
|
-
/* @__PURE__ */ jsxs("div", { className: "playground-panel-content playground-preview", children: [
|
|
78
|
+
const charLimit = 800;
|
|
79
|
+
const isExpandable = (propsCode || initialCode).length > charLimit;
|
|
80
|
+
const shouldTruncate = isExpandable && !isExpanded;
|
|
81
|
+
const isStatic = !!preview;
|
|
82
|
+
const staticTransform = (code) => {
|
|
83
|
+
return "render(<div style={{display:'none'}} />)";
|
|
84
|
+
};
|
|
85
|
+
return /* @__PURE__ */ jsx("div", { className: `boltdocs-playground ${shouldTruncate ? "is-truncated" : ""}`, "data-readonly": readonly || isStatic, children: /* @__PURE__ */ jsxs("div", { className: "playground-split-container", children: [
|
|
86
|
+
/* @__PURE__ */ jsxs("div", { className: "playground-panel playground-preview-panel", children: [
|
|
87
|
+
/* @__PURE__ */ jsx("div", { className: "playground-panel-header", children: /* @__PURE__ */ jsxs("div", { className: "playground-panel-title", children: [
|
|
88
|
+
/* @__PURE__ */ jsx(Play, { size: 14 }),
|
|
89
|
+
/* @__PURE__ */ jsx("span", { children: "Preview" })
|
|
90
|
+
] }) }),
|
|
91
|
+
/* @__PURE__ */ jsx("div", { className: "playground-panel-content playground-preview", children: isStatic ? preview : /* @__PURE__ */ jsxs(
|
|
92
|
+
LiveProvider,
|
|
93
|
+
{
|
|
94
|
+
code: activeCode,
|
|
95
|
+
scope: extendedScope,
|
|
96
|
+
theme: void 0,
|
|
97
|
+
noInline: useNoInline,
|
|
98
|
+
children: [
|
|
102
99
|
/* @__PURE__ */ jsx(LivePreview, {}),
|
|
103
100
|
/* @__PURE__ */ jsx(LiveError, { className: "playground-error" })
|
|
104
|
-
]
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
) })
|
|
104
|
+
] }),
|
|
105
|
+
/* @__PURE__ */ jsxs("div", { className: "playground-panel playground-editor-panel", children: [
|
|
106
|
+
!isStatic && /* @__PURE__ */ jsx("div", { className: "playground-panel-header", children: /* @__PURE__ */ jsxs("div", { className: "playground-panel-title", children: [
|
|
107
|
+
/* @__PURE__ */ jsx(Terminal, { size: 14 }),
|
|
108
|
+
/* @__PURE__ */ jsx("span", { children: readonly ? "Code Example" : "Live Editor" })
|
|
109
|
+
] }) }),
|
|
110
|
+
/* @__PURE__ */ jsxs("div", { className: "playground-panel-content playground-editor", children: [
|
|
111
|
+
/* @__PURE__ */ jsx(
|
|
112
|
+
"button",
|
|
113
|
+
{
|
|
114
|
+
className: "playground-copy-btn-inner",
|
|
115
|
+
onClick: handleCopy,
|
|
116
|
+
title: "Copy code",
|
|
117
|
+
children: copied ? /* @__PURE__ */ jsx(Check, { size: 14 }) : /* @__PURE__ */ jsx(Copy, { size: 14 })
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
isStatic ? /* @__PURE__ */ jsx(
|
|
121
|
+
LiveProvider,
|
|
122
|
+
{
|
|
123
|
+
code: initialCode,
|
|
124
|
+
noInline: true,
|
|
125
|
+
transformCode: staticTransform,
|
|
126
|
+
children: /* @__PURE__ */ jsx(LiveEditor, { disabled: true })
|
|
127
|
+
}
|
|
128
|
+
) : /* @__PURE__ */ jsx(
|
|
129
|
+
LiveProvider,
|
|
130
|
+
{
|
|
131
|
+
code: activeCode,
|
|
132
|
+
scope: extendedScope,
|
|
133
|
+
theme: void 0,
|
|
134
|
+
noInline: useNoInline,
|
|
135
|
+
children: /* @__PURE__ */ jsx(LiveEditor, { disabled: readonly, onChange: setActiveCode })
|
|
136
|
+
}
|
|
137
|
+
)
|
|
138
|
+
] }),
|
|
139
|
+
isExpandable && /* @__PURE__ */ jsx("div", { className: "playground-expand-wrapper", children: /* @__PURE__ */ jsx(
|
|
140
|
+
"button",
|
|
141
|
+
{
|
|
142
|
+
className: "playground-expand-btn",
|
|
143
|
+
onClick: () => setIsExpanded(!isExpanded),
|
|
144
|
+
children: isExpanded ? "Show less" : "Expand code"
|
|
145
|
+
}
|
|
146
|
+
) })
|
|
147
|
+
] })
|
|
148
|
+
] }) });
|
|
109
149
|
}
|
|
110
150
|
|
|
111
151
|
// src/client/theme/components/mdx/Button.tsx
|
|
@@ -484,7 +524,7 @@ function FileTree({ children }) {
|
|
|
484
524
|
}
|
|
485
525
|
|
|
486
526
|
// src/client/theme/components/mdx/Table.tsx
|
|
487
|
-
import { useState as useState4, useMemo } from "react";
|
|
527
|
+
import { useState as useState4, useMemo as useMemo2 } from "react";
|
|
488
528
|
import { ChevronUp, ChevronDown, ChevronLeft, ChevronRight as ChevronRight3, ChevronsLeft, ChevronsRight } from "lucide-react";
|
|
489
529
|
import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
490
530
|
function Table({
|
|
@@ -498,7 +538,7 @@ function Table({
|
|
|
498
538
|
}) {
|
|
499
539
|
const [sortConfig, setSortConfig] = useState4(null);
|
|
500
540
|
const [currentPage, setCurrentPage] = useState4(1);
|
|
501
|
-
const processedData =
|
|
541
|
+
const processedData = useMemo2(() => {
|
|
502
542
|
if (!data) return [];
|
|
503
543
|
let items = [...data];
|
|
504
544
|
if (sortable && sortConfig !== null) {
|
|
@@ -515,7 +555,7 @@ function Table({
|
|
|
515
555
|
return items;
|
|
516
556
|
}, [data, sortConfig, sortable]);
|
|
517
557
|
const totalPages = Math.ceil(processedData.length / pageSize);
|
|
518
|
-
const paginatedData =
|
|
558
|
+
const paginatedData = useMemo2(() => {
|
|
519
559
|
if (!paginated) return processedData;
|
|
520
560
|
const start = (currentPage - 1) * pageSize;
|
|
521
561
|
return processedData.slice(start, start + pageSize);
|
|
@@ -627,7 +667,6 @@ function Field({
|
|
|
627
667
|
}
|
|
628
668
|
export {
|
|
629
669
|
Admonition,
|
|
630
|
-
BackgroundGradient,
|
|
631
670
|
Badge,
|
|
632
671
|
Breadcrumbs,
|
|
633
672
|
Button,
|
package/dist/client/ssr.css
CHANGED
|
@@ -85,8 +85,6 @@
|
|
|
85
85
|
--ld-btn-primary-text: #ffffff;
|
|
86
86
|
--ld-btn-secondary-bg: #ffffff;
|
|
87
87
|
--ld-btn-secondary-text: #111827;
|
|
88
|
-
--ld-gradient-from: var(--ld-color-primary);
|
|
89
|
-
--ld-gradient-to: #a855f7;
|
|
90
88
|
--ld-code-bg: #f3f4f6;
|
|
91
89
|
--ld-code-header: #e5e7eb;
|
|
92
90
|
--ld-code-text: #1f2937;
|
|
@@ -94,8 +92,6 @@
|
|
|
94
92
|
--ld-navbar-blur: 12px;
|
|
95
93
|
--ld-sidebar-bg: transparent;
|
|
96
94
|
--ld-sidebar-blur: 0px;
|
|
97
|
-
--ld-glow-1-bg: var(--ld-color-primary-glow);
|
|
98
|
-
--ld-glow-2-bg: rgba(215, 59, 246, 0.15);
|
|
99
95
|
--ld-ui-btn-primary-bg: var(--ld-btn-primary-bg);
|
|
100
96
|
--ld-ui-btn-primary-text: var(--ld-btn-primary-text);
|
|
101
97
|
--ld-ui-btn-secondary-bg: var(--ld-btn-secondary-bg);
|
|
@@ -139,8 +135,6 @@
|
|
|
139
135
|
--ld-btn-primary-text: #0a0a0f;
|
|
140
136
|
--ld-btn-secondary-bg: #1a1a2e;
|
|
141
137
|
--ld-btn-secondary-text: #e4e4ed;
|
|
142
|
-
--ld-gradient-from: #ffffff;
|
|
143
|
-
--ld-gradient-to: rgba(255, 255, 255, 0.7);
|
|
144
138
|
--ld-code-bg: #050505;
|
|
145
139
|
--ld-code-header: #111119;
|
|
146
140
|
--ld-code-text: #d4d4d4;
|
|
@@ -148,8 +142,6 @@
|
|
|
148
142
|
--ld-navbar-blur: 12px;
|
|
149
143
|
--ld-sidebar-bg: transparent;
|
|
150
144
|
--ld-sidebar-blur: 0px;
|
|
151
|
-
--ld-glow-1-bg: var(--ld-color-primary-glow);
|
|
152
|
-
--ld-glow-2-bg: rgba(246, 59, 187, 0.15);
|
|
153
145
|
--ld-ui-btn-primary-bg: var(--ld-btn-primary-bg);
|
|
154
146
|
--ld-ui-btn-primary-text: var(--ld-btn-primary-text);
|
|
155
147
|
--ld-ui-btn-secondary-bg: var(--ld-btn-secondary-bg);
|
|
@@ -292,12 +284,13 @@ a {
|
|
|
292
284
|
}
|
|
293
285
|
.boltdocs-page-header {
|
|
294
286
|
position: absolute;
|
|
295
|
-
top: 0;
|
|
287
|
+
top: -0.5rem;
|
|
296
288
|
right: 0;
|
|
297
289
|
display: flex;
|
|
298
290
|
justify-content: flex-end;
|
|
299
291
|
padding: 1rem 0;
|
|
300
292
|
pointer-events: none;
|
|
293
|
+
z-index: 101;
|
|
301
294
|
}
|
|
302
295
|
.boltdocs-page-header > * {
|
|
303
296
|
pointer-events: auto;
|
|
@@ -1120,11 +1113,9 @@ a {
|
|
|
1120
1113
|
border-radius: var(--ld-radius-full);
|
|
1121
1114
|
overflow: hidden;
|
|
1122
1115
|
transition: all 0.2s ease;
|
|
1123
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
|
1124
1116
|
}
|
|
1125
1117
|
.copy-btn-group:hover {
|
|
1126
1118
|
border-color: var(--ld-color-primary-hover);
|
|
1127
|
-
box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
|
|
1128
1119
|
}
|
|
1129
1120
|
.copy-btn {
|
|
1130
1121
|
display: flex;
|
|
@@ -1271,6 +1262,7 @@ a {
|
|
|
1271
1262
|
font-weight: 700;
|
|
1272
1263
|
letter-spacing: -0.025em;
|
|
1273
1264
|
color: var(--ld-text-main);
|
|
1265
|
+
padding-right: 160px;
|
|
1274
1266
|
}
|
|
1275
1267
|
.boltdocs-page h1 + p {
|
|
1276
1268
|
color: var(--ld-text-muted);
|
|
@@ -1431,6 +1423,56 @@ a {
|
|
|
1431
1423
|
display: grid !important;
|
|
1432
1424
|
padding: 1.25rem 1rem !important;
|
|
1433
1425
|
}
|
|
1426
|
+
.code-block-wrapper.is-truncated pre {
|
|
1427
|
+
max-height: 250px;
|
|
1428
|
+
overflow: hidden;
|
|
1429
|
+
}
|
|
1430
|
+
.code-block-expand-wrapper {
|
|
1431
|
+
position: absolute;
|
|
1432
|
+
bottom: 0;
|
|
1433
|
+
left: 0;
|
|
1434
|
+
right: 0;
|
|
1435
|
+
height: 80px;
|
|
1436
|
+
background:
|
|
1437
|
+
linear-gradient(
|
|
1438
|
+
to top,
|
|
1439
|
+
var(--ld-code-bg) 20%,
|
|
1440
|
+
transparent);
|
|
1441
|
+
display: none;
|
|
1442
|
+
align-items: flex-end;
|
|
1443
|
+
justify-content: center;
|
|
1444
|
+
padding-bottom: 1rem;
|
|
1445
|
+
z-index: 10;
|
|
1446
|
+
}
|
|
1447
|
+
.code-block-wrapper.is-truncated .code-block-expand-wrapper {
|
|
1448
|
+
display: flex;
|
|
1449
|
+
}
|
|
1450
|
+
.code-block-expand-btn {
|
|
1451
|
+
background-color: var(--ld-surface);
|
|
1452
|
+
border: 1px solid var(--ld-border-subtle);
|
|
1453
|
+
border-radius: 20px;
|
|
1454
|
+
color: var(--ld-text-main);
|
|
1455
|
+
padding: 0.5rem 1.25rem;
|
|
1456
|
+
font-size: 0.8125rem;
|
|
1457
|
+
font-weight: 500;
|
|
1458
|
+
cursor: pointer;
|
|
1459
|
+
transition: all 0.2s ease;
|
|
1460
|
+
backdrop-filter: blur(8px);
|
|
1461
|
+
-webkit-backdrop-filter: blur(8px);
|
|
1462
|
+
}
|
|
1463
|
+
.code-block-expand-btn:hover {
|
|
1464
|
+
background-color: var(--ld-border-subtle);
|
|
1465
|
+
transform: translateY(-1px);
|
|
1466
|
+
}
|
|
1467
|
+
.code-block-wrapper:not(.is-truncated) .code-block-expand-wrapper {
|
|
1468
|
+
position: relative;
|
|
1469
|
+
height: auto;
|
|
1470
|
+
background: none;
|
|
1471
|
+
display: flex;
|
|
1472
|
+
justify-content: center;
|
|
1473
|
+
padding: 1rem 0;
|
|
1474
|
+
border-top: 1px solid var(--ld-border-subtle);
|
|
1475
|
+
}
|
|
1434
1476
|
.code-block-wrapper pre > code .line {
|
|
1435
1477
|
padding: 0 1.25rem;
|
|
1436
1478
|
}
|
|
@@ -2510,6 +2552,58 @@ a.not-found-link:hover {
|
|
|
2510
2552
|
margin: 0;
|
|
2511
2553
|
}
|
|
2512
2554
|
|
|
2555
|
+
/* src/client/theme/ui/ErrorBoundary/error-boundary.css */
|
|
2556
|
+
.boltdocs-error-boundary {
|
|
2557
|
+
display: flex;
|
|
2558
|
+
flex-direction: column;
|
|
2559
|
+
align-items: center;
|
|
2560
|
+
justify-content: center;
|
|
2561
|
+
padding: 3rem 2rem;
|
|
2562
|
+
margin: 2rem 0;
|
|
2563
|
+
background-color: var(--ld-bg-soft);
|
|
2564
|
+
border: 1px solid var(--ld-ui-danger-border);
|
|
2565
|
+
border-radius: var(--ld-radius-lg);
|
|
2566
|
+
text-align: center;
|
|
2567
|
+
backdrop-filter: blur(8px);
|
|
2568
|
+
-webkit-backdrop-filter: blur(8px);
|
|
2569
|
+
}
|
|
2570
|
+
.boltdocs-error-title {
|
|
2571
|
+
font-size: 1.5rem;
|
|
2572
|
+
font-weight: 700;
|
|
2573
|
+
color: var(--ld-ui-danger-text);
|
|
2574
|
+
margin-bottom: 0.75rem;
|
|
2575
|
+
font-family: var(--ld-font-sans);
|
|
2576
|
+
}
|
|
2577
|
+
.boltdocs-error-message {
|
|
2578
|
+
font-size: 1rem;
|
|
2579
|
+
color: var(--ld-text-muted);
|
|
2580
|
+
max-width: 100%;
|
|
2581
|
+
margin-bottom: 1.5rem;
|
|
2582
|
+
line-height: 1.6;
|
|
2583
|
+
overflow-wrap: break-word;
|
|
2584
|
+
word-break: break-word;
|
|
2585
|
+
}
|
|
2586
|
+
.boltdocs-error-retry {
|
|
2587
|
+
padding: 0.6rem 1.25rem;
|
|
2588
|
+
background-color: var(--ld-ui-btn-primary-bg);
|
|
2589
|
+
color: var(--ld-ui-btn-primary-text);
|
|
2590
|
+
border: none;
|
|
2591
|
+
border-radius: var(--ld-radius-full);
|
|
2592
|
+
font-size: 0.875rem;
|
|
2593
|
+
font-weight: 600;
|
|
2594
|
+
cursor: pointer;
|
|
2595
|
+
transition: all 0.2s ease;
|
|
2596
|
+
box-shadow: 0 4px 12px var(--ld-color-primary-glow);
|
|
2597
|
+
}
|
|
2598
|
+
.boltdocs-error-retry:hover {
|
|
2599
|
+
background-color: var(--ld-color-primary-hover);
|
|
2600
|
+
transform: translateY(-1px);
|
|
2601
|
+
box-shadow: 0 6px 16px var(--ld-color-primary-glow);
|
|
2602
|
+
}
|
|
2603
|
+
.boltdocs-error-retry:active {
|
|
2604
|
+
transform: translateY(0);
|
|
2605
|
+
}
|
|
2606
|
+
|
|
2513
2607
|
/* src/client/theme/components/Playground/playground.css */
|
|
2514
2608
|
.boltdocs-playground {
|
|
2515
2609
|
display: flex;
|
|
@@ -2527,13 +2621,6 @@ a.not-found-link:hover {
|
|
|
2527
2621
|
flex-direction: column;
|
|
2528
2622
|
width: 100%;
|
|
2529
2623
|
}
|
|
2530
|
-
@media (min-width: 1024px) {
|
|
2531
|
-
.playground-split-container {
|
|
2532
|
-
flex-direction: row;
|
|
2533
|
-
min-height: 350px;
|
|
2534
|
-
align-items: stretch;
|
|
2535
|
-
}
|
|
2536
|
-
}
|
|
2537
2624
|
.playground-panel {
|
|
2538
2625
|
display: flex;
|
|
2539
2626
|
flex-direction: column;
|
|
@@ -2541,14 +2628,59 @@ a.not-found-link:hover {
|
|
|
2541
2628
|
min-width: 0;
|
|
2542
2629
|
}
|
|
2543
2630
|
.playground-editor-panel {
|
|
2544
|
-
border-
|
|
2631
|
+
border-top: 1px solid var(--ld-border-subtle);
|
|
2545
2632
|
background: var(--ld-code-bg);
|
|
2633
|
+
position: relative;
|
|
2546
2634
|
}
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2635
|
+
.boltdocs-playground.is-truncated .playground-editor {
|
|
2636
|
+
max-height: 250px;
|
|
2637
|
+
overflow: hidden;
|
|
2638
|
+
}
|
|
2639
|
+
.boltdocs-playground[data-readonly=true]:not(.is-truncated) .playground-editor {
|
|
2640
|
+
max-height: 600px;
|
|
2641
|
+
}
|
|
2642
|
+
.playground-expand-wrapper {
|
|
2643
|
+
position: absolute;
|
|
2644
|
+
bottom: 0;
|
|
2645
|
+
left: 0;
|
|
2646
|
+
right: 0;
|
|
2647
|
+
height: 80px;
|
|
2648
|
+
background:
|
|
2649
|
+
linear-gradient(
|
|
2650
|
+
to top,
|
|
2651
|
+
var(--ld-code-bg) 20%,
|
|
2652
|
+
transparent);
|
|
2653
|
+
display: flex;
|
|
2654
|
+
align-items: flex-end;
|
|
2655
|
+
justify-content: center;
|
|
2656
|
+
padding-bottom: 1rem;
|
|
2657
|
+
z-index: 10;
|
|
2658
|
+
}
|
|
2659
|
+
.playground-expand-btn {
|
|
2660
|
+
background-color: var(--ld-surface);
|
|
2661
|
+
border: 1px solid var(--ld-border-subtle);
|
|
2662
|
+
border-radius: 20px;
|
|
2663
|
+
color: var(--ld-text-main);
|
|
2664
|
+
padding: 0.5rem 1.25rem;
|
|
2665
|
+
font-size: 0.8125rem;
|
|
2666
|
+
font-weight: 500;
|
|
2667
|
+
cursor: pointer;
|
|
2668
|
+
transition: all 0.2s ease;
|
|
2669
|
+
backdrop-filter: blur(8px);
|
|
2670
|
+
-webkit-backdrop-filter: blur(8px);
|
|
2671
|
+
}
|
|
2672
|
+
.playground-expand-btn:hover {
|
|
2673
|
+
background-color: var(--ld-border-subtle);
|
|
2674
|
+
transform: translateY(-1px);
|
|
2675
|
+
}
|
|
2676
|
+
.boltdocs-playground:not(.is-truncated) .playground-expand-wrapper {
|
|
2677
|
+
position: relative;
|
|
2678
|
+
height: auto;
|
|
2679
|
+
background: none;
|
|
2680
|
+
display: flex;
|
|
2681
|
+
justify-content: center;
|
|
2682
|
+
padding: 1rem 0;
|
|
2683
|
+
border-top: 1px solid var(--ld-border-subtle);
|
|
2552
2684
|
}
|
|
2553
2685
|
.playground-preview-panel {
|
|
2554
2686
|
background: var(--ld-bg-mute);
|
|
@@ -2617,15 +2749,15 @@ a.not-found-link:hover {
|
|
|
2617
2749
|
cursor: default !important;
|
|
2618
2750
|
}
|
|
2619
2751
|
.playground-preview {
|
|
2620
|
-
padding:
|
|
2752
|
+
padding: 2.5rem;
|
|
2621
2753
|
display: flex;
|
|
2622
2754
|
align-items: center;
|
|
2623
2755
|
justify-content: center;
|
|
2624
|
-
background-color:
|
|
2625
|
-
background-image: radial-gradient(
|
|
2756
|
+
background-color: #000;
|
|
2757
|
+
background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1.5px, transparent 1.5px);
|
|
2626
2758
|
background-size: 24px 24px;
|
|
2627
2759
|
color: var(--ld-text-main);
|
|
2628
|
-
min-height:
|
|
2760
|
+
min-height: 300px;
|
|
2629
2761
|
}
|
|
2630
2762
|
.playground-error {
|
|
2631
2763
|
margin: 0;
|
|
@@ -2646,6 +2778,33 @@ a.not-found-link:hover {
|
|
|
2646
2778
|
margin: 2rem 0;
|
|
2647
2779
|
border: 1px solid var(--ld-border-subtle);
|
|
2648
2780
|
}
|
|
2781
|
+
.playground-copy-btn-inner {
|
|
2782
|
+
position: absolute;
|
|
2783
|
+
top: 1rem;
|
|
2784
|
+
right: 1.5rem;
|
|
2785
|
+
z-index: 20;
|
|
2786
|
+
display: flex;
|
|
2787
|
+
align-items: center;
|
|
2788
|
+
justify-content: center;
|
|
2789
|
+
width: 32px;
|
|
2790
|
+
height: 32px;
|
|
2791
|
+
border-radius: 6px;
|
|
2792
|
+
border: 1px solid var(--ld-border-subtle);
|
|
2793
|
+
background: var(--ld-surface);
|
|
2794
|
+
color: var(--ld-text-dim);
|
|
2795
|
+
cursor: pointer;
|
|
2796
|
+
transition: all 0.2s ease;
|
|
2797
|
+
backdrop-filter: blur(8px);
|
|
2798
|
+
-webkit-backdrop-filter: blur(8px);
|
|
2799
|
+
}
|
|
2800
|
+
.playground-copy-btn-inner:hover {
|
|
2801
|
+
background: var(--ld-border-subtle);
|
|
2802
|
+
color: var(--ld-text-main);
|
|
2803
|
+
transform: translateY(-1px);
|
|
2804
|
+
}
|
|
2805
|
+
.playground-static-code {
|
|
2806
|
+
display: none;
|
|
2807
|
+
}
|
|
2649
2808
|
|
|
2650
2809
|
/* src/client/theme/ui/Layout/responsive.css */
|
|
2651
2810
|
@media (max-width: 1100px) {
|
|
@@ -2663,6 +2822,15 @@ a.not-found-link:hover {
|
|
|
2663
2822
|
.hero-title {
|
|
2664
2823
|
font-size: 2.25rem;
|
|
2665
2824
|
}
|
|
2825
|
+
.boltdocs-page h1 {
|
|
2826
|
+
padding-right: 0;
|
|
2827
|
+
}
|
|
2828
|
+
.boltdocs-page-header {
|
|
2829
|
+
position: static;
|
|
2830
|
+
justify-content: flex-start;
|
|
2831
|
+
margin-bottom: 1rem;
|
|
2832
|
+
padding: 0;
|
|
2833
|
+
}
|
|
2666
2834
|
.ld-cards--2,
|
|
2667
2835
|
.ld-cards--3,
|
|
2668
2836
|
.ld-cards--4 {
|