Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
"path-to-regexp": "6.3.0",
"prettier": "2.8.8",
"ramda": "0.27.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"react": "19.1.0",
"react-dom": "19.1.0",
"react-i18next": "11.16.1",
"remark": "9.0.0",
"remark-react": "4.0.3",
Expand Down Expand Up @@ -131,8 +131,8 @@
"@types/node": "18.19.9",
"@types/node-fetch": "2.5.7",
"@types/ramda": "0.27.1",
"@types/react": "18.2.33",
"@types/react-dom": "18.2.14",
"@types/react": "19.1.8",
"@types/react-dom": "19.1.6",
"@types/zen-observable": "0.8.7",
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript-eslint/parser": "6.21.0",
Expand Down Expand Up @@ -202,8 +202,8 @@
"pnpm": {
"overrides": {
"css-loader": "$css-loader",
"react": "18.3.1",
"@types/react": "18.3.3"
"react": "$react",
"@types/react": "$@types/react"
}
}
}
6 changes: 3 additions & 3 deletions packages/create/bin/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"prettier": "2.8.8",
"reflect-metadata": "0.1.13",
"ramda": "0.27.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"react": "19.1.0",
"react-dom": "19.1.0",
"react-i18next": "11.16.1",
"remark": "9.0.0",
"sass": "1.55.0",
Expand Down Expand Up @@ -76,7 +76,7 @@
"@types/jest": "29.4.4",
"@types/node": "18.19.9",
"@types/ramda": "0.27.1",
"@types/react": "18.2.33",
"@types/react": "19.1.8",
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript-eslint/parser": "6.21.0",
"eslint": "8.48.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/gene/src/contexts/makeStore.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { JSX } from 'react';
import React, { createContext, useContext, useReducer } from 'react';

export type DispatchType<A> = (action: A) => void;
Expand All @@ -9,7 +10,7 @@ type PropsType<S> = {

export function makeStore<S, A>(
initialState: S,
reducer: ReducerType<S, A>,
reducer: ReducerType<S, A>
): [(props: PropsType<S>) => JSX.Element, () => DispatchType<A>, () => S] {
// eslint-disable-next-line @typescript-eslint/no-empty-function
const dispatchContext = createContext((action: A) => {});
Expand Down
3 changes: 2 additions & 1 deletion packages/gene/src/error-boundary/empty.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ErrorBoundaryPropsType } from './types';
import type { JSX } from 'react';
import type { ErrorBoundaryPropsType } from './types';

export const EmptyErrorBoundary = ({ children }: ErrorBoundaryPropsType) => {
return children as JSX.Element;
Expand Down
4 changes: 3 additions & 1 deletion packages/gene/src/error-boundary/types.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import type { JSX } from 'react';

export interface ErrorBoundaryPropsType {
children: React.ReactNode;
boundaryName: string;
fallback?: React.ReactElement<Record<string, unknown>, string>;
}

export type ErrorBoundaryComponentType = (
props: ErrorBoundaryPropsType,
props: ErrorBoundaryPropsType
) => JSX.Element;

export type ErrorBoundaryDeclarationType = Omit<
Expand Down
2 changes: 2 additions & 0 deletions packages/gene/src/image-assets/components/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { JSX } from 'react';

export type GeneImagePropsType = Omit<
JSX.IntrinsicElements['img'],
'src' | 'srcSet' | 'ref' | 'width' | 'height' | 'loading'
Expand Down
1 change: 1 addition & 0 deletions packages/gene/src/modules/createModule.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { JSX } from 'react';
import { render, screen } from '@testing-library/react';
import '@testing-library/jest-dom';
import '@testing-library/jest-dom/matchers';
Expand Down
3 changes: 2 additions & 1 deletion packages/gene/src/modules/createSubmodule.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import type { JSX } from 'react';
import React from 'react';

export function createSubmodule<PropsType extends object>(
Component: React.ComponentType<PropsType>,
context: PropsType,
context: PropsType
): JSX.Element {
return <Component {...context} />;
}
13 changes: 7 additions & 6 deletions packages/gene/src/modules/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { JSX } from 'react';
import type React from 'react';
import type { Container } from 'inversify';
import type { ErrorBoundaryDeclarationType } from '../error-boundary';
Expand All @@ -7,7 +8,7 @@ export type MediatorPropsType<T extends Record<string, unknown>> = T & {
};

export type MediatorFactory<T extends Record<string, unknown> = any> = (
props: MediatorPropsType<T>,
props: MediatorPropsType<T>
) => void;

export type EventHandler = (props: unknown) => void;
Expand All @@ -18,11 +19,11 @@ interface InjectableFactory {

export type MediatorDeclarationsType = [
symbol,
MediatorFactory | InjectableFactory,
MediatorFactory | InjectableFactory
][];
export type ComponentDeclarationType = [
symbol,
React.ComponentType<any> | InjectableFactory,
React.ComponentType<any> | InjectableFactory
][];

export type EventHandlersType = [symbol, EventHandler][];
Expand All @@ -38,7 +39,7 @@ export interface DefaultDeclarationsType {

export interface ModuleComponentPropsType<
T = Record<string, any>,
U extends string = string,
U extends string = string
> {
serverProps?: Record<string, any>;
renderChildren?: (props: T) => JSX.Element;
Expand All @@ -47,7 +48,7 @@ export interface ModuleComponentPropsType<

export type ModuleComponentType<
RenderChildrenProps = Record<string, any>,
SlotsLabels extends string = string,
SlotsLabels extends string = string
> = (
props: ModuleComponentPropsType<RenderChildrenProps, SlotsLabels>,
props: ModuleComponentPropsType<RenderChildrenProps, SlotsLabels>
) => JSX.Element | null;
10 changes: 5 additions & 5 deletions packages/gene/src/react-query/useReactQueryObservableQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ interface ReturnType<TData, TObservable> {
refetch:
| ((options?: RefetchOptions) => Promise<QueryObserverResult<TData, Error>>)
| ((
options?: RefetchOptions,
options?: RefetchOptions
) => Promise<QueryObserverResult<InfiniteData<TData, unknown>, Error>>);
fetchPreviousPage: (
options?: FetchPreviousPageOptions,
options?: FetchPreviousPageOptions
) => Promise<InfiniteQueryObserverResult<unknown, Error>>;
fetchMore: (
options?: FetchNextPageOptions,
options?: FetchNextPageOptions
) => Promise<InfiniteQueryObserverResult<unknown, Error>>;
hasNextPage: boolean;
}
Expand All @@ -51,7 +51,7 @@ interface ReturnType<TData, TObservable> {
*/
export function useReactQueryObservableQuery<
TData,
TObservable = ObservableType<TData>,
TObservable = ObservableType<TData>
>(observable: ObservableType<TData>) {
const [, rerender] = React.useReducer((c) => c + 1, 0);

Expand All @@ -60,7 +60,7 @@ export function useReactQueryObservableQuery<
const lastValue = React.useRef<
| QueryObserverResult<TData, Error>
| InfiniteQueryObserverResult<InfiniteData<TData, unknown>, Error>
>();
>(undefined);

React.useEffect(() => {
mountedRef.current = true;
Expand Down
2 changes: 1 addition & 1 deletion packages/gene/src/services/useObservableQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function useObservableQuery<T>(observable: Observable<T>) {
const [, rerender] = React.useReducer((c) => c + 1, 0);

const isMounted = useIsMounted();
const lastValue = useRef<T>();
const lastValue = useRef<T>(undefined);

useEffect(() => {
const subcription = observable.subscribe((next) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/gene/src/services/useObservableQueryV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function useObservableQueryV2<T>(
};
}, []);

const lastValue = useRef<T>();
const lastValue = useRef<T>(undefined);

useEffect(() => {
const subcription = observable.subscribe((next) => {
Expand Down
Loading
Loading