@docusaurus/theme-live-codeblock 3.5.2 → 3.6.0-canary-6132

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.
@@ -4,80 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import React from 'react';
8
- declare const ReactLiveScope: {
9
- createFactory<T extends HTMLElement>(type: keyof React.ReactHTML): React.HTMLFactory<T>;
10
- createFactory(type: keyof React.ReactSVG): React.SVGFactory;
11
- createFactory<P extends React.DOMAttributes<T>, T extends Element>(type: string): React.DOMFactory<P, T>;
12
- createFactory<P>(type: React.FunctionComponent<P>): React.FunctionComponentFactory<P>;
13
- createFactory<P>(type: React.ClassType<P, React.ClassicComponent<P, React.ComponentState>, React.ClassicComponentClass<P>>): React.CFactory<P, React.ClassicComponent<P, React.ComponentState>>;
14
- createFactory<P, T extends React.Component<P, React.ComponentState>, C extends React.ComponentClass<P>>(type: React.ClassType<P, T, C>): React.CFactory<P, T>;
15
- createFactory<P>(type: React.ComponentClass<P>): React.Factory<P>;
16
- createElement(type: "input", props?: (React.InputHTMLAttributes<HTMLInputElement> & React.ClassAttributes<HTMLInputElement>) | null, ...children: React.ReactNode[]): React.DetailedReactHTMLElement<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
17
- createElement<P extends React.HTMLAttributes<T>, T extends HTMLElement>(type: keyof React.ReactHTML, props?: (React.ClassAttributes<T> & P) | null, ...children: React.ReactNode[]): React.DetailedReactHTMLElement<P, T>;
18
- createElement<P extends React.SVGAttributes<T>, T extends SVGElement>(type: keyof React.ReactSVG, props?: (React.ClassAttributes<T> & P) | null, ...children: React.ReactNode[]): React.ReactSVGElement;
19
- createElement<P extends React.DOMAttributes<T>, T extends Element>(type: string, props?: (React.ClassAttributes<T> & P) | null, ...children: React.ReactNode[]): React.DOMElement<P, T>;
20
- createElement<P extends {}>(type: React.FunctionComponent<P>, props?: (React.Attributes & P) | null, ...children: React.ReactNode[]): React.FunctionComponentElement<P>;
21
- createElement<P extends {}>(type: React.ClassType<P, React.ClassicComponent<P, React.ComponentState>, React.ClassicComponentClass<P>>, props?: (React.ClassAttributes<React.ClassicComponent<P, React.ComponentState>> & P) | null, ...children: React.ReactNode[]): React.CElement<P, React.ClassicComponent<P, React.ComponentState>>;
22
- createElement<P extends {}, T extends React.Component<P, React.ComponentState>, C extends React.ComponentClass<P>>(type: React.ClassType<P, T, C>, props?: (React.ClassAttributes<T> & P) | null, ...children: React.ReactNode[]): React.CElement<P, T>;
23
- createElement<P extends {}>(type: React.FunctionComponent<P> | React.ComponentClass<P> | string, props?: (React.Attributes & P) | null, ...children: React.ReactNode[]): React.ReactElement<P>;
24
- cloneElement<P extends React.HTMLAttributes<T>, T extends HTMLElement>(element: React.DetailedReactHTMLElement<P, T>, props?: P, ...children: React.ReactNode[]): React.DetailedReactHTMLElement<P, T>;
25
- cloneElement<P extends React.HTMLAttributes<T>, T extends HTMLElement>(element: React.ReactHTMLElement<T>, props?: P, ...children: React.ReactNode[]): React.ReactHTMLElement<T>;
26
- cloneElement<P extends React.SVGAttributes<T>, T extends SVGElement>(element: React.ReactSVGElement, props?: P, ...children: React.ReactNode[]): React.ReactSVGElement;
27
- cloneElement<P extends React.DOMAttributes<T>, T extends Element>(element: React.DOMElement<P, T>, props?: React.DOMAttributes<T> & P, ...children: React.ReactNode[]): React.DOMElement<P, T>;
28
- cloneElement<P>(element: React.FunctionComponentElement<P>, props?: Partial<P> & React.Attributes, ...children: React.ReactNode[]): React.FunctionComponentElement<P>;
29
- cloneElement<P, T extends React.Component<P, React.ComponentState>>(element: React.CElement<P, T>, props?: Partial<P> & React.ClassAttributes<T>, ...children: React.ReactNode[]): React.CElement<P, T>;
30
- cloneElement<P>(element: React.ReactElement<P>, props?: Partial<P> & React.Attributes, ...children: React.ReactNode[]): React.ReactElement<P>;
31
- createContext<T>(defaultValue: T): React.Context<T>;
32
- isValidElement<P>(object: {} | null | undefined): object is React.ReactElement<P>;
33
- createRef<T>(): React.RefObject<T>;
34
- forwardRef<T, P = {}>(render: React.ForwardRefRenderFunction<T, P>): React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<T>>;
35
- memo<P extends object>(Component: React.FunctionComponent<P>, propsAreEqual?: (prevProps: Readonly<P>, nextProps: Readonly<P>) => boolean): React.NamedExoticComponent<P>;
36
- memo<T extends React.ComponentType<any>>(Component: T, propsAreEqual?: (prevProps: Readonly<React.ComponentProps<T>>, nextProps: Readonly<React.ComponentProps<T>>) => boolean): React.MemoExoticComponent<T>;
37
- lazy<T extends React.ComponentType<any>>(factory: () => Promise<{
38
- default: T;
39
- }>): React.LazyExoticComponent<T>;
40
- useContext<T>(context: React.Context<T>): T;
41
- useState<S>(initialState: S | (() => S)): [S, React.Dispatch<React.SetStateAction<S>>];
42
- useState<S = undefined>(): [S | undefined, React.Dispatch<React.SetStateAction<S | undefined>>];
43
- useReducer<R extends React.ReducerWithoutAction<any>, I>(reducer: R, initializerArg: I, initializer: (arg: I) => React.ReducerStateWithoutAction<R>): [React.ReducerStateWithoutAction<R>, React.DispatchWithoutAction];
44
- useReducer<R extends React.ReducerWithoutAction<any>>(reducer: R, initializerArg: React.ReducerStateWithoutAction<R>, initializer?: undefined): [React.ReducerStateWithoutAction<R>, React.DispatchWithoutAction];
45
- useReducer<R extends React.Reducer<any, any>, I>(reducer: R, initializerArg: I & React.ReducerState<R>, initializer: (arg: I & React.ReducerState<R>) => React.ReducerState<R>): [React.ReducerState<R>, React.Dispatch<React.ReducerAction<R>>];
46
- useReducer<R extends React.Reducer<any, any>, I>(reducer: R, initializerArg: I, initializer: (arg: I) => React.ReducerState<R>): [React.ReducerState<R>, React.Dispatch<React.ReducerAction<R>>];
47
- useReducer<R extends React.Reducer<any, any>>(reducer: R, initialState: React.ReducerState<R>, initializer?: undefined): [React.ReducerState<R>, React.Dispatch<React.ReducerAction<R>>];
48
- useRef<T>(initialValue: T): React.MutableRefObject<T>;
49
- useRef<T>(initialValue: T | null): React.RefObject<T>;
50
- useRef<T = undefined>(): React.MutableRefObject<T | undefined>;
51
- useLayoutEffect(effect: React.EffectCallback, deps?: React.DependencyList): void;
52
- useEffect(effect: React.EffectCallback, deps?: React.DependencyList): void;
53
- useImperativeHandle<T, R extends T>(ref: React.Ref<T> | undefined, init: () => R, deps?: React.DependencyList): void;
54
- useCallback<T extends Function>(callback: T, deps: React.DependencyList): T;
55
- useMemo<T>(factory: () => T, deps: React.DependencyList | undefined): T;
56
- useDebugValue<T>(value: T, format?: (value: T) => any): void;
57
- useDeferredValue<T>(value: T): T;
58
- useTransition(): [boolean, React.TransitionStartFunction];
59
- startTransition(scope: React.TransitionFunction): void;
60
- useId(): string;
61
- useInsertionEffect(effect: React.EffectCallback, deps?: React.DependencyList): void;
62
- useSyncExternalStore<Snapshot>(subscribe: (onStoreChange: () => void) => () => void, getSnapshot: () => Snapshot, getServerSnapshot?: () => Snapshot): Snapshot;
63
- Children: {
64
- map<T, C>(children: C | ReadonlyArray<C>, fn: (child: C, index: number) => T): C extends null | undefined ? C : Array<Exclude<T, boolean | null | undefined>>;
65
- forEach<C>(children: C | ReadonlyArray<C>, fn: (child: C, index: number) => void): void;
66
- count(children: any): number;
67
- only<C>(children: C): C extends any[] ? never : C;
68
- toArray(children: React.ReactNode | React.ReactNode[]): Array<Exclude<React.ReactNode, boolean | null | undefined>>;
69
- };
70
- Fragment: React.ExoticComponent<{
71
- children?: React.ReactNode | undefined;
72
- }>;
73
- StrictMode: React.ExoticComponent<{
74
- children?: React.ReactNode | undefined;
75
- }>;
76
- Suspense: React.ExoticComponent<React.SuspenseProps>;
77
- version: string;
78
- Profiler: React.ExoticComponent<React.ProfilerProps>;
79
- Component: typeof React.Component;
80
- PureComponent: typeof React.PureComponent;
81
- React: typeof React;
82
- };
7
+ declare const ReactLiveScope: unknown;
83
8
  export default ReactLiveScope;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/theme-live-codeblock",
3
- "version": "3.5.2",
3
+ "version": "3.6.0-canary-6132",
4
4
  "description": "Docusaurus live code block component.",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/theme-live-codeblock.d.ts",
@@ -23,10 +23,10 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
- "@docusaurus/core": "3.5.2",
27
- "@docusaurus/theme-common": "3.5.2",
28
- "@docusaurus/theme-translations": "3.5.2",
29
- "@docusaurus/utils-validation": "3.5.2",
26
+ "@docusaurus/core": "3.6.0-canary-6132",
27
+ "@docusaurus/theme-common": "3.6.0-canary-6132",
28
+ "@docusaurus/theme-translations": "3.6.0-canary-6132",
29
+ "@docusaurus/utils-validation": "3.6.0-canary-6132",
30
30
  "@philpl/buble": "^0.19.7",
31
31
  "clsx": "^2.0.0",
32
32
  "fs-extra": "^11.1.1",
@@ -34,7 +34,7 @@
34
34
  "tslib": "^2.6.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@docusaurus/types": "3.5.2",
37
+ "@docusaurus/types": "3.6.0-canary-6132",
38
38
  "@types/buble": "^0.20.1"
39
39
  },
40
40
  "peerDependencies": {
@@ -44,5 +44,5 @@
44
44
  "engines": {
45
45
  "node": ">=18.0"
46
46
  },
47
- "gitHead": "eeec303dd773774ed5a023884800da0b061f6942"
47
+ "gitHead": "4930a868b86cafcb0786e2ddc6d400459127c4f6"
48
48
  }
@@ -8,7 +8,7 @@
8
8
  import React from 'react';
9
9
 
10
10
  // Add react-live imports you need here
11
- const ReactLiveScope = {
11
+ const ReactLiveScope: unknown = {
12
12
  React,
13
13
  ...React,
14
14
  };