@wallarm-org/design-system 0.2.0-rc-feat-code-snippet-actions.1 → 0.2.0

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.
@@ -27,7 +27,7 @@ export type LineConfig = {
27
27
  };
28
28
  export type CodeSnippetContextValue<TLanguage extends string = string> = {
29
29
  code: string;
30
- language: TLanguage;
30
+ language?: TLanguage;
31
31
  tokens: Token[][] | null;
32
32
  isLoading: boolean;
33
33
  size: CodeSnippetSize;
@@ -11,7 +11,7 @@ export type CodeSnippetRootProps<TLanguage extends string = string> = CodeSnippe
11
11
  /** The code string to display */
12
12
  code: string;
13
13
  /** Programming language for syntax highlighting */
14
- language: TLanguage;
14
+ language?: TLanguage;
15
15
  /** Per-line configuration (color, prefix) keyed by line number */
16
16
  lines?: Record<number, LineConfig>;
17
17
  /** Starting line number (default: 1) */
@@ -19,7 +19,7 @@ const codeSnippetRootVariants = cva("relative bg-component-code-snippet-bg round
19
19
  size: 'md'
20
20
  }
21
21
  });
22
- const CodeSnippetRoot = ({ code, language, size = 'md', lines = {}, startingLineNumber = 1, wrapLines: initialWrapLines = false, maxLines = 0, onCopy, className, children, ...props })=>{
22
+ const CodeSnippetRoot = ({ code, language = 'text', size = 'md', lines = {}, startingLineNumber = 1, wrapLines: initialWrapLines = false, maxLines = 0, onCopy, className, children, ...props })=>{
23
23
  const adapterContext = useAdapter();
24
24
  const [wrapLines, setWrapLines] = useState(initialWrapLines);
25
25
  const [isExpanded, setIsExpanded] = useState(false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wallarm-org/design-system",
3
- "version": "0.2.0-rc-feat-code-snippet-actions.1",
3
+ "version": "0.2.0",
4
4
  "description": "Core design system library with React components and Storybook documentation",
5
5
  "publishConfig": {
6
6
  "access": "public",