@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oppulence/design-system",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Design system for Oppulence - shadcn-style components with Tailwind CSS v4",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -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<SVGProps<SVGSVGElement>>) =>
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 closeDelay={0} openDelay={0} {...props} />
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(
@@ -3,7 +3,7 @@
3
3
  interface BubbleMenuButtonProps {
4
4
  action: () => void;
5
5
  isActive: boolean;
6
- children: React.ReactNode;
6
+ children?: React.ReactNode;
7
7
  }
8
8
 
9
9
  export function BubbleMenuButton({
@@ -4,7 +4,10 @@ export * from "./calendar";
4
4
  export * from "./carousel";
5
5
  export * from "./chart";
6
6
  export * from "./combobox";
7
- export * from "./combobox-dropdown";
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
@@ -1,3 +1,5 @@
1
+ /// <reference path="./types/react-syntax-highlighter.d.ts" />
2
+
1
3
  export { cn } from "../lib/utils";
2
4
 
3
5
  export * from "./components/ui";
@@ -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
+ }