tinywidgets 1.0.11 → 1.0.13

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/bun.lockb ADDED
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tinywidgets",
3
3
  "description": "A collection of tiny, reusable, React components",
4
- "version": "1.0.11",
4
+ "version": "1.0.13",
5
5
  "scripts": {
6
6
  "prePublishPackage": "eslint . && cspell --quiet . && tsc"
7
7
  },
@@ -28,6 +28,7 @@
28
28
  },
29
29
  "license": "MIT",
30
30
  "dependencies": {
31
+ "@types/prismjs": "^1.26.4",
31
32
  "lucide-react": "^0.445.0",
32
33
  "prismjs": "^1.29.0",
33
34
  "react": "^18.3.1",
@@ -1,8 +1,9 @@
1
1
  /* eslint-disable max-len */
2
- // import 'prismjs/components/prism-jsx';
3
- // import 'prismjs/components/prism-typescript';
4
- // import 'prismjs/components/prism-tsx';
5
- import {Prism} from 'prismjs';
2
+ import 'prismjs';
3
+ import 'prismjs/components/prism-jsx';
4
+ import 'prismjs/components/prism-typescript';
5
+ import 'prismjs/components/prism-tsx';
6
+ import Prism from 'prismjs';
6
7
  import React from 'react';
7
8
  import {classNames} from '../../common/functions.tsx';
8
9
  import {pre} from './index.css.ts';
@@ -54,7 +55,7 @@ const {highlight, languages} = Prism;
54
55
  * language="typescript"
55
56
  * />
56
57
  * ```
57
- * This example shows the use of the `tsx` language.
58
+ * This example shows the use of the `typescript` language.
58
59
  * @icon Lucide.SquareCode
59
60
  */
60
61
  export const Code = ({
@@ -80,7 +81,7 @@ export const Code = ({
80
81
  <code
81
82
  // eslint-disable-next-line react/no-danger
82
83
  dangerouslySetInnerHTML={{
83
- __html: highlight(code.trim(), languages['clike'], 'clike'),
84
+ __html: highlight(code.trim(), languages[language], language),
84
85
  }}
85
86
  />
86
87
  </pre>