@docusaurus/theme-live-codeblock 3.0.0-beta.0 → 3.0.0-rc.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.
@@ -11,7 +11,6 @@ import CodeBlock from '@theme-init/CodeBlock';
11
11
  const withLiveEditor = (Component) => {
12
12
  function WrappedComponent(props) {
13
13
  if (props.live) {
14
- // @ts-expect-error: we have deliberately widened the type of language prop
15
14
  return <Playground scope={ReactLiveScope} {...props} />;
16
15
  }
17
16
  return <Component {...props} />;
@@ -97,7 +97,6 @@ export default function Playground({children, transformCode, ...props}) {
97
97
  const noInline = props.metastring?.includes('noInline') ?? false;
98
98
  return (
99
99
  <div className={styles.playgroundContainer}>
100
- {/* @ts-expect-error: type incompatibility with refs */}
101
100
  <LiveProvider
102
101
  code={children.replace(/\n$/, '')}
103
102
  noInline={noInline}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/theme-live-codeblock",
3
- "version": "3.0.0-beta.0",
3
+ "version": "3.0.0-rc.0",
4
4
  "description": "Docusaurus live code block component.",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/theme-live-codeblock.d.ts",
@@ -23,18 +23,18 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
- "@docusaurus/core": "3.0.0-beta.0",
27
- "@docusaurus/theme-common": "3.0.0-beta.0",
28
- "@docusaurus/theme-translations": "3.0.0-beta.0",
29
- "@docusaurus/utils-validation": "3.0.0-beta.0",
26
+ "@docusaurus/core": "3.0.0-rc.0",
27
+ "@docusaurus/theme-common": "3.0.0-rc.0",
28
+ "@docusaurus/theme-translations": "3.0.0-rc.0",
29
+ "@docusaurus/utils-validation": "3.0.0-rc.0",
30
30
  "@philpl/buble": "^0.19.7",
31
31
  "clsx": "^1.2.1",
32
32
  "fs-extra": "^11.1.1",
33
- "react-live": "2.2.3",
33
+ "react-live": "^4.1.5",
34
34
  "tslib": "^2.6.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@docusaurus/types": "3.0.0-beta.0",
37
+ "@docusaurus/types": "3.0.0-rc.0",
38
38
  "@types/buble": "^0.20.1"
39
39
  },
40
40
  "peerDependencies": {
@@ -42,7 +42,7 @@
42
42
  "react-dom": "^18.0.0"
43
43
  },
44
44
  "engines": {
45
- "node": ">=16.14"
45
+ "node": ">=18.0"
46
46
  },
47
- "gitHead": "27a1e90d9fff88af90ecad35bea16d4d7230482a"
47
+ "gitHead": "e66dfe04d2972edce66f431908470c61340f8ffc"
48
48
  }
package/src/deps.d.ts CHANGED
@@ -7,7 +7,8 @@
7
7
 
8
8
  declare module '@philpl/buble' {
9
9
  import type {TransformOptions as OriginalTransformOptions} from 'buble';
10
- // eslint-disable-next-line import/no-extraneous-dependencies, no-restricted-syntax
10
+
11
+ // eslint-disable-next-line no-restricted-syntax
11
12
  export * from 'buble';
12
13
  export const features: string[];
13
14
  export type TransformOptions = OriginalTransformOptions & {
@@ -13,7 +13,6 @@ import CodeBlock, {type Props} from '@theme-init/CodeBlock';
13
13
  const withLiveEditor = (Component: typeof CodeBlock) => {
14
14
  function WrappedComponent(props: Props) {
15
15
  if (props.live) {
16
- // @ts-expect-error: we have deliberately widened the type of language prop
17
16
  return <Playground scope={ReactLiveScope} {...props} />;
18
17
  }
19
18
 
@@ -115,7 +115,6 @@ export default function Playground({
115
115
 
116
116
  return (
117
117
  <div className={styles.playgroundContainer}>
118
- {/* @ts-expect-error: type incompatibility with refs */}
119
118
  <LiveProvider
120
119
  code={children.replace(/\n$/, '')}
121
120
  noInline={noInline}
@@ -18,9 +18,10 @@ declare module '@docusaurus/theme-live-codeblock' {
18
18
 
19
19
  declare module '@theme/Playground' {
20
20
  import type {Props as BaseProps} from '@theme/CodeBlock';
21
- import type {LiveProviderProps} from 'react-live';
21
+ import type {LiveProvider} from 'react-live';
22
22
 
23
23
  type CodeBlockProps = Omit<BaseProps, 'className' | 'language' | 'title'>;
24
+ type LiveProviderProps = React.ComponentProps<typeof LiveProvider>;
24
25
 
25
26
  export interface Props extends CodeBlockProps, LiveProviderProps {
26
27
  children: string;