@surrealdb/ui 1.0.16 → 1.0.17
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/ui.d.ts +1 -1
- package/dist/ui.js +27 -19
- package/dist/ui.js.map +1 -1
- package/package.json +1 -1
package/dist/ui.d.ts
CHANGED
|
@@ -182,7 +182,7 @@ export declare function clsx(...args: unknown[]): string;
|
|
|
182
182
|
*/
|
|
183
183
|
export declare const CodeBlock: FC<CodeBlockProps>;
|
|
184
184
|
|
|
185
|
-
export declare interface CodeBlockProps extends Omit<PaperProps, "children"> {
|
|
185
|
+
export declare interface CodeBlockProps extends Omit<PaperProps, "children" | "styles"> {
|
|
186
186
|
title?: string;
|
|
187
187
|
value: string;
|
|
188
188
|
lang?: string;
|
package/dist/ui.js
CHANGED
|
@@ -15500,15 +15500,22 @@ const Na = It.define(EQ).parser, eh = It.define(AQ).parser, th = /* @__PURE__ */
|
|
|
15500
15500
|
)
|
|
15501
15501
|
}
|
|
15502
15502
|
);
|
|
15503
|
-
}, oh = ({
|
|
15504
|
-
|
|
15505
|
-
|
|
15506
|
-
|
|
15503
|
+
}, oh = ({
|
|
15504
|
+
title: t,
|
|
15505
|
+
value: O,
|
|
15506
|
+
lang: e,
|
|
15507
|
+
withBorder: i = !0,
|
|
15508
|
+
style: r,
|
|
15509
|
+
...n
|
|
15510
|
+
}) => {
|
|
15511
|
+
const [a, s] = Le(!1), { code: o, regions: l } = X1(() => {
|
|
15512
|
+
const Q = Jc(O), { processedCode: $, regions: c } = Oh(
|
|
15513
|
+
Q.code
|
|
15507
15514
|
);
|
|
15508
15515
|
return {
|
|
15509
|
-
code:
|
|
15510
|
-
regions:
|
|
15511
|
-
test:
|
|
15516
|
+
code: $,
|
|
15517
|
+
regions: c,
|
|
15518
|
+
test: Q.test
|
|
15512
15519
|
};
|
|
15513
15520
|
}, [O]);
|
|
15514
15521
|
return /* @__PURE__ */ Xt(
|
|
@@ -15516,18 +15523,19 @@ const Na = It.define(EQ).parser, eh = It.define(AQ).parser, th = /* @__PURE__ */
|
|
|
15516
15523
|
{
|
|
15517
15524
|
radius: "md",
|
|
15518
15525
|
onMouseEnter: () => {
|
|
15519
|
-
|
|
15526
|
+
s(!0);
|
|
15520
15527
|
},
|
|
15521
15528
|
onMouseLeave: () => {
|
|
15522
|
-
|
|
15529
|
+
s(!1);
|
|
15523
15530
|
},
|
|
15524
15531
|
pos: "relative",
|
|
15525
15532
|
bg: "obsidian.9",
|
|
15526
|
-
withBorder: i
|
|
15533
|
+
withBorder: i,
|
|
15527
15534
|
style: {
|
|
15528
|
-
overflow: "hidden"
|
|
15535
|
+
overflow: "hidden",
|
|
15536
|
+
...r
|
|
15529
15537
|
},
|
|
15530
|
-
...
|
|
15538
|
+
...n,
|
|
15531
15539
|
children: [
|
|
15532
15540
|
t && /* @__PURE__ */ q(
|
|
15533
15541
|
m1,
|
|
@@ -15556,32 +15564,32 @@ const Na = It.define(EQ).parser, eh = It.define(AQ).parser, th = /* @__PURE__ */
|
|
|
15556
15564
|
/* @__PURE__ */ q(
|
|
15557
15565
|
ih,
|
|
15558
15566
|
{
|
|
15559
|
-
value:
|
|
15567
|
+
value: o,
|
|
15560
15568
|
language: e ?? "text",
|
|
15561
|
-
highlightRegions:
|
|
15569
|
+
highlightRegions: l
|
|
15562
15570
|
}
|
|
15563
15571
|
),
|
|
15564
|
-
/* @__PURE__ */ q(y2, { value:
|
|
15572
|
+
/* @__PURE__ */ q(y2, { value: o, children: ({ copy: Q, copied: $ }) => /* @__PURE__ */ q(
|
|
15565
15573
|
$s,
|
|
15566
15574
|
{
|
|
15567
|
-
label:
|
|
15575
|
+
label: $ ? "Copied!" : "Copy code",
|
|
15568
15576
|
position: "top",
|
|
15569
15577
|
children: /* @__PURE__ */ q(
|
|
15570
15578
|
zi,
|
|
15571
15579
|
{
|
|
15572
15580
|
size: "md",
|
|
15573
|
-
onClick:
|
|
15581
|
+
onClick: Q,
|
|
15574
15582
|
"aria-label": "Copy code",
|
|
15575
15583
|
pos: "absolute",
|
|
15576
15584
|
top: "var(--mantine-radius-sm)",
|
|
15577
15585
|
right: "var(--mantine-radius-sm)",
|
|
15578
|
-
opacity:
|
|
15586
|
+
opacity: a ? 1 : 0,
|
|
15579
15587
|
style: { transition: "opacity 0.2s" },
|
|
15580
15588
|
children: /* @__PURE__ */ q(
|
|
15581
15589
|
Oi,
|
|
15582
15590
|
{
|
|
15583
15591
|
size: "sm",
|
|
15584
|
-
path:
|
|
15592
|
+
path: $ ? nl : sl
|
|
15585
15593
|
}
|
|
15586
15594
|
)
|
|
15587
15595
|
}
|