@epicbagel/saas-kit 1.36.0 → 1.36.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/{chunk-I6IFBKCL.cjs → chunk-G5P2J6YS.cjs} +25 -10
- package/dist/{chunk-DMX7LQ6D.js → chunk-Y2YH5MC4.js} +25 -10
- package/dist/primitives/code-block.cjs +2 -2
- package/dist/primitives/code-block.js +1 -1
- package/dist/primitives/file-preview.cjs +2 -2
- package/dist/primitives/file-preview.js +1 -1
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@ var _chunkKWLSBTB2cjs = require('./chunk-KWLSBTB2.cjs');
|
|
|
8
8
|
|
|
9
9
|
// src/primitives/code-block.tsx
|
|
10
10
|
var _jsxruntime = require('react/jsx-runtime');
|
|
11
|
+
var CODE_LINE = "text-xs leading-relaxed";
|
|
11
12
|
var HEIGHTS = {
|
|
12
13
|
none: "",
|
|
13
14
|
sm: "max-h-40 overflow-y-auto",
|
|
@@ -29,7 +30,8 @@ function CodeBlock({
|
|
|
29
30
|
"pre",
|
|
30
31
|
{
|
|
31
32
|
className: _chunkKWLSBTB2cjs.cn.call(void 0,
|
|
32
|
-
"rounded-md border border-border bg-muted/40 p-3 font-mono
|
|
33
|
+
"rounded-md border border-border bg-muted/40 p-3 font-mono",
|
|
34
|
+
CODE_LINE,
|
|
33
35
|
wrap ? "whitespace-pre-wrap break-words" : "overflow-x-auto",
|
|
34
36
|
HEIGHTS[maxHeight],
|
|
35
37
|
copy ? "pr-12" : void 0
|
|
@@ -37,15 +39,28 @@ function CodeBlock({
|
|
|
37
39
|
children
|
|
38
40
|
}
|
|
39
41
|
),
|
|
40
|
-
copy ?
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
copy ? (
|
|
43
|
+
// The copy button sits on the first line of code: this box is that
|
|
44
|
+
// line (the block's border and padding down from the top, one line
|
|
45
|
+
// of the block's own type high), and the button is centred in it.
|
|
46
|
+
// So its glyph shares the first line's centre whatever the button's
|
|
47
|
+
// size, the type's or the viewport's, with no offset to keep in step.
|
|
48
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
"data-slot": "code-block-copy",
|
|
52
|
+
className: _chunkKWLSBTB2cjs.cn.call(void 0, CODE_LINE, "pointer-events-none absolute right-1.5 top-3 mt-px flex h-[1lh] items-center"),
|
|
53
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
54
|
+
_chunkAYH5TTLDcjs.CopyButton,
|
|
55
|
+
{
|
|
56
|
+
text: copyText,
|
|
57
|
+
label: copyLabel,
|
|
58
|
+
variant: "ghost",
|
|
59
|
+
className: "pointer-events-auto"
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
)
|
|
49
64
|
) : null
|
|
50
65
|
] });
|
|
51
66
|
}
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
|
|
9
9
|
// src/primitives/code-block.tsx
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
var CODE_LINE = "text-xs leading-relaxed";
|
|
11
12
|
var HEIGHTS = {
|
|
12
13
|
none: "",
|
|
13
14
|
sm: "max-h-40 overflow-y-auto",
|
|
@@ -29,7 +30,8 @@ function CodeBlock({
|
|
|
29
30
|
"pre",
|
|
30
31
|
{
|
|
31
32
|
className: cn(
|
|
32
|
-
"rounded-md border border-border bg-muted/40 p-3 font-mono
|
|
33
|
+
"rounded-md border border-border bg-muted/40 p-3 font-mono",
|
|
34
|
+
CODE_LINE,
|
|
33
35
|
wrap ? "whitespace-pre-wrap break-words" : "overflow-x-auto",
|
|
34
36
|
HEIGHTS[maxHeight],
|
|
35
37
|
copy ? "pr-12" : void 0
|
|
@@ -37,15 +39,28 @@ function CodeBlock({
|
|
|
37
39
|
children
|
|
38
40
|
}
|
|
39
41
|
),
|
|
40
|
-
copy ?
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
copy ? (
|
|
43
|
+
// The copy button sits on the first line of code: this box is that
|
|
44
|
+
// line (the block's border and padding down from the top, one line
|
|
45
|
+
// of the block's own type high), and the button is centred in it.
|
|
46
|
+
// So its glyph shares the first line's centre whatever the button's
|
|
47
|
+
// size, the type's or the viewport's, with no offset to keep in step.
|
|
48
|
+
/* @__PURE__ */ jsx(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
"data-slot": "code-block-copy",
|
|
52
|
+
className: cn(CODE_LINE, "pointer-events-none absolute right-1.5 top-3 mt-px flex h-[1lh] items-center"),
|
|
53
|
+
children: /* @__PURE__ */ jsx(
|
|
54
|
+
CopyButton,
|
|
55
|
+
{
|
|
56
|
+
text: copyText,
|
|
57
|
+
label: copyLabel,
|
|
58
|
+
variant: "ghost",
|
|
59
|
+
className: "pointer-events-auto"
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
)
|
|
49
64
|
) : null
|
|
50
65
|
] });
|
|
51
66
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkG5P2J6YScjs = require('../chunk-G5P2J6YS.cjs');
|
|
5
5
|
require('../chunk-AYH5TTLD.cjs');
|
|
6
6
|
require('../chunk-JDEXZGIY.cjs');
|
|
7
7
|
require('../chunk-KWLSBTB2.cjs');
|
|
8
8
|
require('../chunk-4LXN6GLZ.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.CodeBlock =
|
|
11
|
+
exports.CodeBlock = _chunkG5P2J6YScjs.CodeBlock;
|
|
@@ -17,7 +17,7 @@ require('../chunk-ELPV44S6.cjs');
|
|
|
17
17
|
require('../chunk-2BHI5ZWJ.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkG5P2J6YScjs = require('../chunk-G5P2J6YS.cjs');
|
|
21
21
|
require('../chunk-AYH5TTLD.cjs');
|
|
22
22
|
require('../chunk-WDXEJDMO.cjs');
|
|
23
23
|
|
|
@@ -281,7 +281,7 @@ function FilePreviewBody({
|
|
|
281
281
|
kind === "markdown" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKENBU3NVcjs.LazyMarkdown, { components: { a: NewTabLink, ...markdownComponents }, children: text.text }) : (
|
|
282
282
|
// The theme's relaxed leading is a fixed 1.8rem, which spaces a
|
|
283
283
|
// file's small monospace lines apart; read it at 20px lines.
|
|
284
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
284
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkG5P2J6YScjs.CodeBlock, { wrap: true, className: "[&>pre]:leading-5", children: text.text })
|
|
285
285
|
)
|
|
286
286
|
] });
|
|
287
287
|
}
|
package/package.json
CHANGED