@oppulence/design-system 1.0.8 → 1.0.9
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/package.json +1 -1
- package/src/components/atoms/icons.tsx +7 -2
- package/src/components/molecules/code-block.tsx +0 -2
- package/src/components/molecules/inline-citation.tsx +3 -1
- package/src/components/organisms/editor/extentions/bubble-menu/bubble-menu-button.tsx +1 -1
- package/src/components/organisms/index.ts +4 -1
- package/src/index.ts +2 -0
- package/src/types/react-syntax-highlighter.d.ts +28 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ArchiveIcon } from "@radix-ui/react-icons";
|
|
2
2
|
import { FiGithub } from "react-icons/fi";
|
|
3
3
|
import type { IconType as BaseIconType } from "react-icons/lib";
|
|
4
|
-
import type { ComponentType, FC, ReactNode, SVGProps } from "react";
|
|
4
|
+
import type { ComponentType, FC, ReactNode, SVGAttributes, SVGProps } from "react";
|
|
5
5
|
import {
|
|
6
6
|
MdArrowBack,
|
|
7
7
|
MdArrowDownward,
|
|
@@ -124,6 +124,11 @@ type SvgProps = Omit<SVGProps<SVGSVGElement>, "className"> & {
|
|
|
124
124
|
size?: number | string;
|
|
125
125
|
};
|
|
126
126
|
|
|
127
|
+
type RadixIconProps = Omit<SVGAttributes<SVGElement>, "children"> & {
|
|
128
|
+
children?: never;
|
|
129
|
+
color?: string;
|
|
130
|
+
};
|
|
131
|
+
|
|
127
132
|
const createReactIcon =
|
|
128
133
|
(Icon: BaseIconType) =>
|
|
129
134
|
({ size = 20, color }: IconProps) => (
|
|
@@ -131,7 +136,7 @@ const createReactIcon =
|
|
|
131
136
|
);
|
|
132
137
|
|
|
133
138
|
const createRadixIcon =
|
|
134
|
-
(Icon: ComponentType<
|
|
139
|
+
(Icon: ComponentType<RadixIconProps>) =>
|
|
135
140
|
({ size = 20, color }: IconProps) => (
|
|
136
141
|
<Icon width={size} height={size} color={color} />
|
|
137
142
|
);
|
|
@@ -40,7 +40,6 @@ export const CodeBlock = ({
|
|
|
40
40
|
{...props}
|
|
41
41
|
>
|
|
42
42
|
<div className="relative">
|
|
43
|
-
{/* @ts-expect-error - SyntaxHighlighter is not a valid JSX component */}
|
|
44
43
|
<SyntaxHighlighter
|
|
45
44
|
className="overflow-hidden dark:hidden"
|
|
46
45
|
codeTagProps={{
|
|
@@ -64,7 +63,6 @@ export const CodeBlock = ({
|
|
|
64
63
|
>
|
|
65
64
|
{code}
|
|
66
65
|
</SyntaxHighlighter>
|
|
67
|
-
{/* @ts-expect-error - SyntaxHighlighter is not a valid JSX component */}
|
|
68
66
|
<SyntaxHighlighter
|
|
69
67
|
className="hidden overflow-hidden dark:block"
|
|
70
68
|
codeTagProps={{
|
|
@@ -41,7 +41,7 @@ export const InlineCitationText = ({ ...props }: InlineCitationTextProps) => (
|
|
|
41
41
|
export type InlineCitationCardProps = ComponentProps<typeof HoverCard>;
|
|
42
42
|
|
|
43
43
|
export const InlineCitationCard = (props: InlineCitationCardProps) => (
|
|
44
|
-
<HoverCard
|
|
44
|
+
<HoverCard {...props} />
|
|
45
45
|
);
|
|
46
46
|
|
|
47
47
|
export type InlineCitationCardTriggerProps =
|
|
@@ -54,6 +54,8 @@ export const InlineCitationCardTrigger = ({
|
|
|
54
54
|
...props
|
|
55
55
|
}: InlineCitationCardTriggerProps) => (
|
|
56
56
|
<HoverCardTrigger
|
|
57
|
+
delay={0}
|
|
58
|
+
closeDelay={0}
|
|
57
59
|
render={
|
|
58
60
|
<span
|
|
59
61
|
className={cn(
|
|
@@ -4,7 +4,10 @@ export * from "./calendar";
|
|
|
4
4
|
export * from "./carousel";
|
|
5
5
|
export * from "./chart";
|
|
6
6
|
export * from "./combobox";
|
|
7
|
-
export
|
|
7
|
+
export {
|
|
8
|
+
ComboboxDropdown,
|
|
9
|
+
type ComboboxItem as ComboboxDropdownItem,
|
|
10
|
+
} from "./combobox-dropdown";
|
|
8
11
|
export * from "./command";
|
|
9
12
|
export * from "./conversation";
|
|
10
13
|
export * from "./context-menu";
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare module "react-syntax-highlighter" {
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
export interface SyntaxHighlighterProps {
|
|
5
|
+
language?: string;
|
|
6
|
+
style?: Record<string, React.CSSProperties>;
|
|
7
|
+
showLineNumbers?: boolean;
|
|
8
|
+
wrapLines?: boolean;
|
|
9
|
+
lineNumberStyle?: React.CSSProperties;
|
|
10
|
+
codeTagProps?: React.HTMLAttributes<HTMLElement>;
|
|
11
|
+
customStyle?: React.CSSProperties;
|
|
12
|
+
className?: string;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const Prism: React.ComponentType<SyntaxHighlighterProps>;
|
|
17
|
+
export const Light: React.ComponentType<SyntaxHighlighterProps>;
|
|
18
|
+
|
|
19
|
+
const SyntaxHighlighter: React.ComponentType<SyntaxHighlighterProps>;
|
|
20
|
+
export default SyntaxHighlighter;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare module "react-syntax-highlighter/dist/esm/styles/prism" {
|
|
24
|
+
import type { CSSProperties } from "react";
|
|
25
|
+
|
|
26
|
+
export const oneDark: Record<string, CSSProperties>;
|
|
27
|
+
export const oneLight: Record<string, CSSProperties>;
|
|
28
|
+
}
|