diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd276e98d..d1f4235b4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -206,22 +206,6 @@ jobs: name: brick-artifacts path: ci-bricks - - name: Download artifact from next-advanced-bricks - id: download-artifact-from-next-advanced-bricks - uses: dawidd6/action-download-artifact@v7 - with: - name: brick-artifacts - path: ci-advanced-bricks - github_token: ${{ secrets.GITHUB_TOKEN }} - repo: easyops-cn/next-advanced-bricks - branch: master - event: push - workflow: ci.yml - workflow_conclusion: "" - - - name: Merge bricks - run: cp -r ci-advanced-bricks/* ci-bricks/bricks/ - - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" diff --git a/bricks/basic/package.json b/bricks/basic/package.json index 5df627c7d..6d467da39 100644 --- a/bricks/basic/package.json +++ b/bricks/basic/package.json @@ -44,18 +44,20 @@ "@next-core/element": "^1.2.16", "@next-core/http": "^1.2.11", "@next-core/i18n": "^1.0.73", - "@next-core/react-element": "^1.0.35", - "@next-core/react-runtime": "^1.7.9", + "@next-core/pipes": "^2.0.30", + "@next-core/react-element": "^2.0.0", + "@next-core/react-runtime": "^2.0.0", "@next-core/runtime": "^1.59.2", "@next-core/theme": "^1.5.4", "@next-core/types": "^1.14.0", + "@next-core/utils": "^1.7.31", "@next-shared/general": "^0.10.7", "@next-shared/story": "^0.0.4", "broadcast-channel": "^7.0.0", "classnames": "^2.3.2", "dompurify": "^3.1.6", "lodash": "^4.17.21", - "react": "0.0.0-experimental-ee8509801-20230117", + "react": "^19.0.0", "react-i18next": "^12.3.1" }, "devDependencies": { diff --git a/bricks/basic/src/actions/index.spec.tsx b/bricks/basic/src/actions/index.spec.tsx index 6a8db568f..95f2a37bf 100644 --- a/bricks/basic/src/actions/index.spec.tsx +++ b/bricks/basic/src/actions/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import { fireEvent, createEvent } from "@testing-library/dom"; import "./"; import type { EoActions } from "./index.js"; diff --git a/bricks/basic/src/app-bar-wrapper/index.spec.tsx b/bricks/basic/src/app-bar-wrapper/index.spec.tsx index fc8ef59c4..8c0a13944 100644 --- a/bricks/basic/src/app-bar-wrapper/index.spec.tsx +++ b/bricks/basic/src/app-bar-wrapper/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import { EoAppBarWrapper } from "./index.js"; diff --git a/bricks/basic/src/avatar-group/index.spec.tsx b/bricks/basic/src/avatar-group/index.spec.tsx index 9e968af1c..95e5b61ca 100644 --- a/bricks/basic/src/avatar-group/index.spec.tsx +++ b/bricks/basic/src/avatar-group/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import { EoAvatarGroup } from "./index.js"; import { EoAvatar } from "../avatar"; diff --git a/bricks/basic/src/avatar/index.spec.tsx b/bricks/basic/src/avatar/index.spec.tsx index 5188b1cfe..f0cc93763 100644 --- a/bricks/basic/src/avatar/index.spec.tsx +++ b/bricks/basic/src/avatar/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import { EoAvatar } from "./index.js"; diff --git a/bricks/basic/src/breadcrumb-item/index.spec.tsx b/bricks/basic/src/breadcrumb-item/index.spec.tsx index 897a28909..62a5bb8f9 100644 --- a/bricks/basic/src/breadcrumb-item/index.spec.tsx +++ b/bricks/basic/src/breadcrumb-item/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import { EoBreadcrumbItem } from "./index.js"; diff --git a/bricks/basic/src/breadcrumb/index.spec.tsx b/bricks/basic/src/breadcrumb/index.spec.tsx index c0be7e4be..d12bea144 100644 --- a/bricks/basic/src/breadcrumb/index.spec.tsx +++ b/bricks/basic/src/breadcrumb/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import "../breadcrumb-item/index.js"; import { EoBreadcrumb } from "./index.js"; diff --git a/bricks/basic/src/broadcast-channel/index.spec.tsx b/bricks/basic/src/broadcast-channel/index.spec.tsx index 646a7ddb0..fc4fb81d2 100644 --- a/bricks/basic/src/broadcast-channel/index.spec.tsx +++ b/bricks/basic/src/broadcast-channel/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import type { EoBroadcastChannel } from "./index.js"; diff --git a/bricks/basic/src/broadcast-channel/index.tsx b/bricks/basic/src/broadcast-channel/index.tsx index 8be881f6d..95543a981 100644 --- a/bricks/basic/src/broadcast-channel/index.tsx +++ b/bricks/basic/src/broadcast-channel/index.tsx @@ -75,8 +75,8 @@ export function LegacyBroadcastChannelComponent( { channel, onMessage }: BroadcastChannelComponentProps, ref: Ref> ) { - const channelRef = useRef(); - const polyfillRef = useRef(); + const channelRef = useRef(undefined); + const polyfillRef = useRef(undefined); useImperativeHandle(ref, () => ({ postMessage(message: unknown) { diff --git a/bricks/basic/src/button/index.spec.ts b/bricks/basic/src/button/index.spec.ts index f1976bf67..5e0b227a6 100644 --- a/bricks/basic/src/button/index.spec.ts +++ b/bricks/basic/src/button/index.spec.ts @@ -1,5 +1,5 @@ import { describe, test, expect } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import { Button } from "./index.js"; diff --git a/bricks/basic/src/context-menu/index.spec.tsx b/bricks/basic/src/context-menu/index.spec.tsx index 6ec344f4f..9a6a183dd 100644 --- a/bricks/basic/src/context-menu/index.spec.tsx +++ b/bricks/basic/src/context-menu/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import { fireEvent } from "@testing-library/react"; import "./"; import type { EoContextMenu } from "./index.js"; diff --git a/bricks/basic/src/counter-badge/index.spec.tsx b/bricks/basic/src/counter-badge/index.spec.tsx index fda84b3d6..8d5fb41b9 100644 --- a/bricks/basic/src/counter-badge/index.spec.tsx +++ b/bricks/basic/src/counter-badge/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import { EoCounterBadge } from "./index.jsx"; diff --git a/bricks/basic/src/data-providers/show-notification/show-notification.spec.tsx b/bricks/basic/src/data-providers/show-notification/show-notification.spec.tsx index 7565f80a7..b32e80628 100644 --- a/bricks/basic/src/data-providers/show-notification/show-notification.spec.tsx +++ b/bricks/basic/src/data-providers/show-notification/show-notification.spec.tsx @@ -1,6 +1,6 @@ import { describe, test, expect } from "@jest/globals"; import { showNotification } from "./show-notification.jsx"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import { fireEvent } from "@testing-library/react"; customElements.define("sl-alert", class extends HTMLElement {}); diff --git a/bricks/basic/src/data-providers/show-watermark/show-watermark.spec.tsx b/bricks/basic/src/data-providers/show-watermark/show-watermark.spec.tsx index 80ee634c2..b9e30415f 100644 --- a/bricks/basic/src/data-providers/show-watermark/show-watermark.spec.tsx +++ b/bricks/basic/src/data-providers/show-watermark/show-watermark.spec.tsx @@ -1,7 +1,7 @@ -// import { act } from "react-dom/test-utils"; +// import { act } from "react"; import { showWaterMark } from "./show-watermark.js"; import "jest-canvas-mock"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; describe("showWaterMark", () => { test("general", async () => { diff --git a/bricks/basic/src/dropdown-actions/index.spec.tsx b/bricks/basic/src/dropdown-actions/index.spec.tsx index 44f5e1d91..b862a2ad8 100644 --- a/bricks/basic/src/dropdown-actions/index.spec.tsx +++ b/bricks/basic/src/dropdown-actions/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import { fireEvent } from "@testing-library/react"; import "./"; import { EoDropdownActions } from "./index.js"; diff --git a/bricks/basic/src/dropdown-button/index.spec.ts b/bricks/basic/src/dropdown-button/index.spec.ts index 8e9e4abac..2c20e9f9e 100644 --- a/bricks/basic/src/dropdown-button/index.spec.ts +++ b/bricks/basic/src/dropdown-button/index.spec.ts @@ -1,5 +1,5 @@ import { describe, test, expect } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./index.js"; import { DropdownButton } from "./index.js"; diff --git a/bricks/basic/src/dropdown-select/i18n.ts b/bricks/basic/src/dropdown-select/i18n.ts index c6ce20375..181364166 100644 --- a/bricks/basic/src/dropdown-select/i18n.ts +++ b/bricks/basic/src/dropdown-select/i18n.ts @@ -1,3 +1,5 @@ +import { i18n } from "@next-core/i18n"; + export enum K { PLEASE_SELECT = "PLEASE_SELECT", } @@ -14,4 +16,6 @@ export const NS = "bricks/basic/eo-dropdown-select"; export const locales = { en, zh }; +export const t = i18n.getFixedT(null, NS); + type Locale = { [key in K]: string }; diff --git a/bricks/basic/src/dropdown-select/index.spec.tsx b/bricks/basic/src/dropdown-select/index.spec.tsx index 44e9c2a4a..06ef777dc 100644 --- a/bricks/basic/src/dropdown-select/index.spec.tsx +++ b/bricks/basic/src/dropdown-select/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import { fireEvent } from "@testing-library/dom"; import "./"; import type { DropdownSelect } from "./index.js"; @@ -133,45 +133,45 @@ describe("eo-dropdown-select", () => { document.body.appendChild(element); }); expect(element.shadowRoot?.childNodes).toMatchInlineSnapshot(` - NodeList [ - , - - - - PLEASE_SELECT - - - - - , - ] - `); +NodeList [ + , + + + + Please select + + + + + , +] +`); act(() => { element.setDefaultOption({ diff --git a/bricks/basic/src/dropdown-select/index.tsx b/bricks/basic/src/dropdown-select/index.tsx index 684fee255..523307a3a 100644 --- a/bricks/basic/src/dropdown-select/index.tsx +++ b/bricks/basic/src/dropdown-select/index.tsx @@ -9,7 +9,7 @@ import React, { } from "react"; import { createDecorators, type EventEmitter } from "@next-core/element"; import { ReactNextElement, wrapBrick } from "@next-core/react-element"; -import { useTranslation, initializeReactI18n } from "@next-core/i18n/react"; +import { initializeI18n } from "@next-core/i18n"; import "@next-core/theme"; import type { GeneralIcon, @@ -27,10 +27,10 @@ import type { LoadingContainer, LoadingContainerProps, } from "../loading-container"; -import { K, NS, locales } from "./i18n.js"; +import { K, NS, locales, t } from "./i18n.js"; import styleText from "./styles.shadow.css"; -initializeReactI18n(NS, locales); +initializeI18n(NS, locales); const { defineElement, property, event, method } = createDecorators(); @@ -159,7 +159,6 @@ export function LegacyDropdownSelectComponent( }: DropdownSelectComponentProps, ref: React.ForwardedRef ) { - const { t } = useTranslation(NS); const [open, setOpen] = useState(false); const [value, setValue] = useState(defaultValue); const [memoizedOptions, setMemoizedOptions] = useState< diff --git a/bricks/basic/src/easyops-avatar/index.spec.tsx b/bricks/basic/src/easyops-avatar/index.spec.tsx index 6fdeaa81b..b1514e741 100644 --- a/bricks/basic/src/easyops-avatar/index.spec.tsx +++ b/bricks/basic/src/easyops-avatar/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import { useUserInfoByNameOrInstanceId } from "./useUserInfoByNameOrInstanceId.js"; import { EoEasyopsAvatar } from "./index.js"; diff --git a/bricks/basic/src/easyops-avatar/useUserInfoByNameOrInstanceId.spec.tsx b/bricks/basic/src/easyops-avatar/useUserInfoByNameOrInstanceId.spec.tsx index d3ac976f3..833dd3169 100644 --- a/bricks/basic/src/easyops-avatar/useUserInfoByNameOrInstanceId.spec.tsx +++ b/bricks/basic/src/easyops-avatar/useUserInfoByNameOrInstanceId.spec.tsx @@ -1,5 +1,5 @@ import { jest, describe, afterEach, test, expect } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import { renderHook } from "@testing-library/react"; import { UserAdminApi_searchAllUsersInfo } from "@next-api-sdk/user-service-sdk"; import { useUserInfoByNameOrInstanceId } from "./useUserInfoByNameOrInstanceId.js"; diff --git a/bricks/basic/src/editors/eo-descriptions/index.tsx b/bricks/basic/src/editors/eo-descriptions/index.tsx index 053831de9..b80733ce8 100644 --- a/bricks/basic/src/editors/eo-descriptions/index.tsx +++ b/bricks/basic/src/editors/eo-descriptions/index.tsx @@ -15,7 +15,7 @@ function EoButtonComponentFactory(React: typeof _React) { form, effects, } = props; - const dataListRef = React.useRef(); + const dataListRef = React.useRef(undefined); React.useEffect(() => { const { onSubmit } = effects; diff --git a/bricks/basic/src/editors/eo-next-table/index.tsx b/bricks/basic/src/editors/eo-next-table/index.tsx index fe257538e..914f81bfd 100644 --- a/bricks/basic/src/editors/eo-next-table/index.tsx +++ b/bricks/basic/src/editors/eo-next-table/index.tsx @@ -43,7 +43,7 @@ function EoNextTableComponentFactory(React: typeof _React) { } = props; const isInitRef = React.useRef(false); - const dataListRef = React.useRef(); + const dataListRef = React.useRef(undefined); React.useEffect(() => { const { diff --git a/bricks/basic/src/event-agent/index.spec.ts b/bricks/basic/src/event-agent/index.spec.ts index e38cae431..b05874307 100644 --- a/bricks/basic/src/event-agent/index.spec.ts +++ b/bricks/basic/src/event-agent/index.spec.ts @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import type { EoEventAgent } from "./index.js"; diff --git a/bricks/basic/src/formatter-number/index.spec.tsx b/bricks/basic/src/formatter-number/index.spec.tsx index 7246e5972..994a118b2 100644 --- a/bricks/basic/src/formatter-number/index.spec.tsx +++ b/bricks/basic/src/formatter-number/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import type { EoFormatterNumber } from "./index.js"; diff --git a/bricks/basic/src/frame-breadcrumb/index.spec.tsx b/bricks/basic/src/frame-breadcrumb/index.spec.tsx index f95cd5bcc..e6881cd1a 100644 --- a/bricks/basic/src/frame-breadcrumb/index.spec.tsx +++ b/bricks/basic/src/frame-breadcrumb/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import { getRuntime } from "@next-core/runtime"; import { useCurrentApp } from "@next-core/react-runtime"; import "./"; diff --git a/bricks/basic/src/iframe/index.spec.tsx b/bricks/basic/src/iframe/index.spec.tsx index 445d1cd0f..9d0ab80cf 100644 --- a/bricks/basic/src/iframe/index.spec.tsx +++ b/bricks/basic/src/iframe/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import { fireEvent } from "@testing-library/dom"; import "./"; import type { Iframe } from "./index.js"; diff --git a/bricks/basic/src/image/ImageList.spec.tsx b/bricks/basic/src/image/ImageList.spec.tsx index 3534befc7..93cb29452 100644 --- a/bricks/basic/src/image/ImageList.spec.tsx +++ b/bricks/basic/src/image/ImageList.spec.tsx @@ -1,8 +1,8 @@ import React, { Ref, createRef } from "react"; import { describe, test, expect } from "@jest/globals"; -import { screen, render, fireEvent } from "@testing-library/react"; +import { render, fireEvent } from "@testing-library/react"; import { ImageList, ImageListRef } from "./ImageList.jsx"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; describe("ImageList", () => { test("should work", () => { @@ -35,7 +35,7 @@ describe("ImageList", () => { }, ]; - const { container, rerender, unmount } = render( + const { container } = render( { it("should work", async (): Promise => { diff --git a/bricks/basic/src/image/index.spec.ts b/bricks/basic/src/image/index.spec.ts index 442f3ee0a..91cfd827b 100644 --- a/bricks/basic/src/image/index.spec.ts +++ b/bricks/basic/src/image/index.spec.ts @@ -1,5 +1,5 @@ import { describe, test, expect } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./index.jsx"; import { Image } from "./index.jsx"; diff --git a/bricks/basic/src/link/index.spec.tsx b/bricks/basic/src/link/index.spec.tsx index 43536c70b..08f621b18 100644 --- a/bricks/basic/src/link/index.spec.tsx +++ b/bricks/basic/src/link/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import { Link } from "./index.js"; import { GeneralIconProps } from "@next-bricks/icons/general-icon"; diff --git a/bricks/basic/src/loading-container/index.spec.tsx b/bricks/basic/src/loading-container/index.spec.tsx index 22ead2dbf..d07a09d98 100644 --- a/bricks/basic/src/loading-container/index.spec.tsx +++ b/bricks/basic/src/loading-container/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import type { LoadingContainer } from "./index.js"; diff --git a/bricks/basic/src/menu-group/index.spec.tsx b/bricks/basic/src/menu-group/index.spec.tsx index 26c1dfe1b..4275ff670 100644 --- a/bricks/basic/src/menu-group/index.spec.tsx +++ b/bricks/basic/src/menu-group/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import { EoMenuGroup } from "./index.js"; diff --git a/bricks/basic/src/menu-item-sub-menu/index.spec.tsx b/bricks/basic/src/menu-item-sub-menu/index.spec.tsx index 1e756c7dd..cd64ee074 100644 --- a/bricks/basic/src/menu-item-sub-menu/index.spec.tsx +++ b/bricks/basic/src/menu-item-sub-menu/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./index.jsx"; import { EoMenuItemSubMenu } from "./index.jsx"; diff --git a/bricks/basic/src/menu-item/index.spec.ts b/bricks/basic/src/menu-item/index.spec.ts index c565fb281..5a7254852 100644 --- a/bricks/basic/src/menu-item/index.spec.ts +++ b/bricks/basic/src/menu-item/index.spec.ts @@ -1,5 +1,5 @@ import { describe, test, expect } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./index.js"; import { MenuItem } from "./index.js"; diff --git a/bricks/basic/src/menu/index.spec.ts b/bricks/basic/src/menu/index.spec.ts index 47f4f2558..3e460c87f 100644 --- a/bricks/basic/src/menu/index.spec.ts +++ b/bricks/basic/src/menu/index.spec.ts @@ -1,5 +1,5 @@ import { describe, test, expect } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./index.js"; import { Menu } from "./index.js"; diff --git a/bricks/basic/src/message-listener/index.spec.tsx b/bricks/basic/src/message-listener/index.spec.tsx index 32163b7b0..6b38c8725 100644 --- a/bricks/basic/src/message-listener/index.spec.tsx +++ b/bricks/basic/src/message-listener/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import type { EoMessageListener } from "./index.js"; diff --git a/bricks/basic/src/mini-actions/index.spec.tsx b/bricks/basic/src/mini-actions/index.spec.tsx index a97182c9a..704d583ac 100644 --- a/bricks/basic/src/mini-actions/index.spec.tsx +++ b/bricks/basic/src/mini-actions/index.spec.tsx @@ -1,6 +1,6 @@ import { describe, test, expect, jest } from "@jest/globals"; import { fireEvent, createEvent } from "@testing-library/dom"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./index.jsx"; import { ActionType, EoMiniActions } from "./index.jsx"; diff --git a/bricks/basic/src/page-title/index.spec.tsx b/bricks/basic/src/page-title/index.spec.tsx index c8d4df8df..1136acb44 100644 --- a/bricks/basic/src/page-title/index.spec.tsx +++ b/bricks/basic/src/page-title/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import { EoPageTitle } from "./index.js"; import { getRuntime } from "@next-core/runtime"; diff --git a/bricks/basic/src/popover/index.spec.tsx b/bricks/basic/src/popover/index.spec.tsx index f6d0412e3..98b9c154a 100644 --- a/bricks/basic/src/popover/index.spec.tsx +++ b/bricks/basic/src/popover/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./index.jsx"; import { Popover } from "./index.jsx"; import { fireEvent } from "@testing-library/react"; diff --git a/bricks/basic/src/popover/index.tsx b/bricks/basic/src/popover/index.tsx index 6fe8b17c6..7279d7c57 100644 --- a/bricks/basic/src/popover/index.tsx +++ b/bricks/basic/src/popover/index.tsx @@ -418,6 +418,5 @@ function PopoverComponent(props: PopoverComponentProps) { ); } - export { Popover }; export type { Placement }; diff --git a/bricks/basic/src/sidebar-sub-menu/index.spec.tsx b/bricks/basic/src/sidebar-sub-menu/index.spec.tsx index a6206812d..859d86f24 100644 --- a/bricks/basic/src/sidebar-sub-menu/index.spec.tsx +++ b/bricks/basic/src/sidebar-sub-menu/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import { EoSidebarSubMenu } from "./index.js"; import * as GeneralMenu from "@next-shared/general/menu"; diff --git a/bricks/basic/src/sidebar-sub-menu/index.tsx b/bricks/basic/src/sidebar-sub-menu/index.tsx index 2d3bf4c6a..bcdafdc13 100644 --- a/bricks/basic/src/sidebar-sub-menu/index.tsx +++ b/bricks/basic/src/sidebar-sub-menu/index.tsx @@ -30,10 +30,6 @@ import type { } from "@next-bricks/icons/general-icon"; import classNames from "classnames"; -// --- NOTE: uncomment these lines below to enable i18n for your brick --- -// import { useTranslation, initializeReactI18n } from "@next-core/i18n/react"; -// import { K, NS, locales } from "./i18n.js"; -// initializeReactI18n(NS, locales); const WrappedIcon = wrapBrick("eo-icon"); const WrappedMenu = wrapBrick("eo-menu"); diff --git a/bricks/basic/src/sidebar/i18n.ts b/bricks/basic/src/sidebar/i18n.ts index f9c73e768..81ed10f63 100644 --- a/bricks/basic/src/sidebar/i18n.ts +++ b/bricks/basic/src/sidebar/i18n.ts @@ -1,3 +1,5 @@ +import { i18n } from "@next-core/i18n"; + export enum K { CLICK_TO_FIX_NAVIGATION = "CLICK_TO_FIX_NAVIGATION", UNPIN_NAVIGATION = "UNPIN_NAVIGATION", @@ -20,4 +22,6 @@ export const NS = "bricks/basic/eo-sidebar"; export const locales = { en, zh }; +export const t = i18n.getFixedT(null, NS); + type Locale = { [key in K]: string }; diff --git a/bricks/basic/src/sidebar/index.spec.tsx b/bricks/basic/src/sidebar/index.spec.tsx index b7f6528e6..4b5fc76bf 100644 --- a/bricks/basic/src/sidebar/index.spec.tsx +++ b/bricks/basic/src/sidebar/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import { fireEvent } from "@testing-library/react"; import "./"; import { EoSidebar } from "./index.jsx"; diff --git a/bricks/basic/src/sidebar/index.tsx b/bricks/basic/src/sidebar/index.tsx index ecc09832a..ff3b9d251 100644 --- a/bricks/basic/src/sidebar/index.tsx +++ b/bricks/basic/src/sidebar/index.tsx @@ -28,15 +28,15 @@ import { sideBarCollapsedWidth, sideBarWidth, } from "./utils.js"; -import { useTranslation, initializeReactI18n } from "@next-core/i18n/react"; -import { K, NS, locales } from "./i18n.js"; +import { initializeI18n } from "@next-core/i18n"; +import { K, NS, locales, t } from "./i18n.js"; import classNames from "classnames"; import { initMenuItemAndMatchCurrentPathKeys } from "@next-shared/general/menu"; import { UnregisterCallback } from "history"; import { getHistory, getRuntime } from "@next-core/runtime"; import { useCurrentApp } from "@next-core/react-runtime"; -initializeReactI18n(NS, locales); +initializeI18n(NS, locales); const { defineElement, property, event } = createDecorators(); @@ -138,8 +138,6 @@ interface EoSidebarComponentProps extends EoSidebarProps { } export function EoSidebarComponent(props: EoSidebarComponentProps) { - const { t } = useTranslation(NS); - const { hiddenFixedIcon, position, diff --git a/bricks/basic/src/sidebar/sidebar-menu-group/index.spec.tsx b/bricks/basic/src/sidebar/sidebar-menu-group/index.spec.tsx index 7e77cf21e..35d778aee 100644 --- a/bricks/basic/src/sidebar/sidebar-menu-group/index.spec.tsx +++ b/bricks/basic/src/sidebar/sidebar-menu-group/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./index.jsx"; import { EoSidebarMenuGroup } from "./index.jsx"; diff --git a/bricks/basic/src/sidebar/sidebar-menu-item/index.spec.tsx b/bricks/basic/src/sidebar/sidebar-menu-item/index.spec.tsx index 987a5cc95..c6c1de671 100644 --- a/bricks/basic/src/sidebar/sidebar-menu-item/index.spec.tsx +++ b/bricks/basic/src/sidebar/sidebar-menu-item/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./index.jsx"; import { EoSidebarMenuItem } from "./index.jsx"; diff --git a/bricks/basic/src/sidebar/sidebar-menu-submenu/index.spec.tsx b/bricks/basic/src/sidebar/sidebar-menu-submenu/index.spec.tsx index ab4766f55..2228f07ec 100644 --- a/bricks/basic/src/sidebar/sidebar-menu-submenu/index.spec.tsx +++ b/bricks/basic/src/sidebar/sidebar-menu-submenu/index.spec.tsx @@ -1,6 +1,6 @@ import { describe, test, expect, jest } from "@jest/globals"; import { fireEvent } from "@testing-library/react"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./index.jsx"; import { EoSidebarMenuSubmenu } from "./index.jsx"; diff --git a/bricks/basic/src/sidebar/sidebar-menu/index.spec.tsx b/bricks/basic/src/sidebar/sidebar-menu/index.spec.tsx index b0b695c8e..ed3c84e01 100644 --- a/bricks/basic/src/sidebar/sidebar-menu/index.spec.tsx +++ b/bricks/basic/src/sidebar/sidebar-menu/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./index.jsx"; import { EoSidebarMenu } from "./index.jsx"; diff --git a/bricks/basic/src/tag-list/index.spec.ts b/bricks/basic/src/tag-list/index.spec.ts index 985bf4789..9349888ac 100644 --- a/bricks/basic/src/tag-list/index.spec.ts +++ b/bricks/basic/src/tag-list/index.spec.ts @@ -1,5 +1,5 @@ import { describe, test, expect } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import { fireEvent } from "@testing-library/dom"; import "./index.js"; import { TagList } from "./index.js"; diff --git a/bricks/basic/src/tag/index.spec.ts b/bricks/basic/src/tag/index.spec.ts index f4e72bc34..112a2e0c4 100644 --- a/bricks/basic/src/tag/index.spec.ts +++ b/bricks/basic/src/tag/index.spec.ts @@ -1,5 +1,5 @@ import { describe, test, expect } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./index.js"; import { Tag } from "./index.js"; diff --git a/bricks/basic/src/text/index.spec.ts b/bricks/basic/src/text/index.spec.ts index 06e7d9f47..2962cdf67 100644 --- a/bricks/basic/src/text/index.spec.ts +++ b/bricks/basic/src/text/index.spec.ts @@ -1,5 +1,5 @@ import { describe, test, expect } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import { queryByTestId, getByTestId, fireEvent } from "@testing-library/dom"; import "./index.js"; diff --git a/bricks/basic/src/text/index.tsx b/bricks/basic/src/text/index.tsx index 1ee2493a1..f0bd670f6 100644 --- a/bricks/basic/src/text/index.tsx +++ b/bricks/basic/src/text/index.tsx @@ -1,4 +1,4 @@ -import React, { CSSProperties, useCallback, useState } from "react"; +import React, { CSSProperties, useCallback, useState, type JSX } from "react"; import { EventEmitter, createDecorators } from "@next-core/element"; import { ReactNextElement, wrapBrick } from "@next-core/react-element"; import classNames from "classnames"; diff --git a/bricks/basic/src/tooltip/index.spec.tsx b/bricks/basic/src/tooltip/index.spec.tsx index b2dd8dfb7..966a36717 100644 --- a/bricks/basic/src/tooltip/index.spec.tsx +++ b/bricks/basic/src/tooltip/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import { EoTooltip } from "./index.js"; diff --git a/bricks/containers/package.json b/bricks/containers/package.json index a32c2a12a..983792210 100644 --- a/bricks/containers/package.json +++ b/bricks/containers/package.json @@ -37,14 +37,14 @@ "dependencies": { "@next-core/element": "^1.2.16", "@next-core/i18n": "^1.0.73", - "@next-core/react-element": "^1.0.35", + "@next-core/react-element": "^2.0.0", "@next-core/runtime": "^1.59.2", "@next-core/types": "^1.14.0", "@next-core/utils": "^1.7.31", "@next-shared/general": "^0.10.7", "@next-shared/story": "^0.0.4", "classnames": "^2.3.2", - "react": "0.0.0-experimental-ee8509801-20230117", + "react": "^19.0.0", "react-rnd": "^10.4.1" }, "devDependencies": { diff --git a/bricks/containers/src/banner/index.spec.tsx b/bricks/containers/src/banner/index.spec.tsx index 31a2c1375..c7a977d2d 100644 --- a/bricks/containers/src/banner/index.spec.tsx +++ b/bricks/containers/src/banner/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import { EoBanner } from "./index.js"; diff --git a/bricks/containers/src/card/index.spec.tsx b/bricks/containers/src/card/index.spec.tsx index ef5d4ba6f..3148c4c6c 100644 --- a/bricks/containers/src/card/index.spec.tsx +++ b/bricks/containers/src/card/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import { Card } from "./index.js"; diff --git a/bricks/containers/src/category/index.spec.ts b/bricks/containers/src/category/index.spec.ts index 0278dc44c..45acd6ace 100644 --- a/bricks/containers/src/category/index.spec.ts +++ b/bricks/containers/src/category/index.spec.ts @@ -1,5 +1,5 @@ import { describe, test, expect } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./index.jsx"; import { Category } from "./index.jsx"; diff --git a/bricks/containers/src/content-layout/index.spec.tsx b/bricks/containers/src/content-layout/index.spec.tsx index 955dfb2d3..178424d21 100644 --- a/bricks/containers/src/content-layout/index.spec.tsx +++ b/bricks/containers/src/content-layout/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import { EoContentLayout } from "./index.js"; diff --git a/bricks/containers/src/drawer/index.spec.ts b/bricks/containers/src/drawer/index.spec.ts index ee1826531..da56d37b0 100644 --- a/bricks/containers/src/drawer/index.spec.ts +++ b/bricks/containers/src/drawer/index.spec.ts @@ -1,5 +1,5 @@ import { describe, test, expect } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./index.jsx"; import { Drawer } from "./index.jsx"; diff --git a/bricks/containers/src/drawer/index.tsx b/bricks/containers/src/drawer/index.tsx index 3bb11d002..1b2db4d3b 100644 --- a/bricks/containers/src/drawer/index.tsx +++ b/bricks/containers/src/drawer/index.tsx @@ -248,7 +248,7 @@ export function DrawerComponent({ stackable, stack, }: DrawerComponentProps) { - const contentRef = useRef(); + const contentRef = useRef(undefined); const header = useMemo( () => (
diff --git a/bricks/containers/src/easy-view/index.spec.ts b/bricks/containers/src/easy-view/index.spec.ts index 86a03b964..013c5aaca 100644 --- a/bricks/containers/src/easy-view/index.spec.ts +++ b/bricks/containers/src/easy-view/index.spec.ts @@ -1,5 +1,5 @@ import { describe, test, expect } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./index.js"; import { EasyViewElement } from "./index.js"; diff --git a/bricks/containers/src/flex-layout/index.spec.ts b/bricks/containers/src/flex-layout/index.spec.ts index 37dc23000..c09756f31 100644 --- a/bricks/containers/src/flex-layout/index.spec.ts +++ b/bricks/containers/src/flex-layout/index.spec.ts @@ -1,5 +1,5 @@ import { describe, test, expect } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./index.js"; import { FlexLayout } from "./index.js"; diff --git a/bricks/containers/src/grid-layout/index.spec.ts b/bricks/containers/src/grid-layout/index.spec.ts index 32f1ec541..78e944f97 100644 --- a/bricks/containers/src/grid-layout/index.spec.ts +++ b/bricks/containers/src/grid-layout/index.spec.ts @@ -1,5 +1,5 @@ import { describe, test, expect } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./index.js"; import { GridLayout } from "./index.js"; diff --git a/bricks/containers/src/main-view/index.spec.tsx b/bricks/containers/src/main-view/index.spec.tsx index 1fcc3bfe6..bef7b701c 100644 --- a/bricks/containers/src/main-view/index.spec.tsx +++ b/bricks/containers/src/main-view/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import { fireEvent } from "@testing-library/dom"; import { getRuntime } from "@next-core/runtime"; import "./"; diff --git a/bricks/containers/src/micro-view/index.spec.ts b/bricks/containers/src/micro-view/index.spec.ts index 06bf1a5a4..aa84a0f1c 100644 --- a/bricks/containers/src/micro-view/index.spec.ts +++ b/bricks/containers/src/micro-view/index.spec.ts @@ -1,5 +1,5 @@ import { describe, test, expect } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./index.js"; import { MicroView } from "./index.js"; diff --git a/bricks/containers/src/modal/index.spec.tsx b/bricks/containers/src/modal/index.spec.tsx index e18e7d143..9ebce7f9b 100644 --- a/bricks/containers/src/modal/index.spec.tsx +++ b/bricks/containers/src/modal/index.spec.tsx @@ -1,6 +1,6 @@ import { describe, test, expect } from "@jest/globals"; import { getByTestId, fireEvent } from "@testing-library/dom"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import { Modal } from "./index.js"; diff --git a/bricks/containers/src/narrow-view/index.spec.tsx b/bricks/containers/src/narrow-view/index.spec.tsx index d2052d04b..c8c2d43ef 100644 --- a/bricks/containers/src/narrow-view/index.spec.tsx +++ b/bricks/containers/src/narrow-view/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import { EoNarrowView } from "./index.js"; diff --git a/bricks/containers/src/page-view/index.spec.tsx b/bricks/containers/src/page-view/index.spec.tsx index 3039c158a..e72710454 100644 --- a/bricks/containers/src/page-view/index.spec.tsx +++ b/bricks/containers/src/page-view/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import { EoPageView } from "./index.js"; diff --git a/bricks/containers/src/popup/index.spec.tsx b/bricks/containers/src/popup/index.spec.tsx index e91758734..78f757c60 100644 --- a/bricks/containers/src/popup/index.spec.tsx +++ b/bricks/containers/src/popup/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import type { EoPopup } from "./index.js"; diff --git a/bricks/containers/src/popup/index.tsx b/bricks/containers/src/popup/index.tsx index 7ab197deb..086312f85 100644 --- a/bricks/containers/src/popup/index.tsx +++ b/bricks/containers/src/popup/index.tsx @@ -181,16 +181,16 @@ export function EoPopupComponent({ resizable, closePopup, }: EoPopupProps) { - const popupRef = useRef(); - const headerRef = useRef(); - const contentRef = useRef(); + const popupRef = useRef(undefined); + const headerRef = useRef(undefined); + const contentRef = useRef(undefined); const [size, setSize] = useState<[number | string, number | string]>([ popupWidth ?? 500, popupHeight, ]); const [position, setPosition] = useState<[number, number]>(); const preSizeRef = useRef<[number | string, number | string]>(size); - const prePositionRef = useRef<[number, number]>(); + const prePositionRef = useRef<[number, number]>(undefined); const storage = useMemo( () => diff --git a/bricks/containers/src/resizable-box/index.spec.tsx b/bricks/containers/src/resizable-box/index.spec.tsx index fb23e0a5e..0c133ef5f 100644 --- a/bricks/containers/src/resizable-box/index.spec.tsx +++ b/bricks/containers/src/resizable-box/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import { fireEvent } from "@testing-library/react"; import "./"; import type { ResizableBox } from "./index.js"; diff --git a/bricks/containers/src/search-bar/index.spec.tsx b/bricks/containers/src/search-bar/index.spec.tsx index 3cf7ff776..eab6b1818 100644 --- a/bricks/containers/src/search-bar/index.spec.tsx +++ b/bricks/containers/src/search-bar/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import { SearchBar } from "./index.js"; diff --git a/bricks/containers/src/spin/index.spec.tsx b/bricks/containers/src/spin/index.spec.tsx index b5a7222cb..4af614bdf 100644 --- a/bricks/containers/src/spin/index.spec.tsx +++ b/bricks/containers/src/spin/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import { EoSpin } from "./index.js"; diff --git a/bricks/containers/src/tab/tab-group/index.spec.ts b/bricks/containers/src/tab/tab-group/index.spec.ts index 84be15683..695b73760 100644 --- a/bricks/containers/src/tab/tab-group/index.spec.ts +++ b/bricks/containers/src/tab/tab-group/index.spec.ts @@ -1,6 +1,6 @@ import { describe, test, expect } from "@jest/globals"; import { fireEvent } from "@testing-library/react"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./index.jsx"; import "../tab-item/index.jsx"; import type { TabGroup } from "./index.jsx"; diff --git a/bricks/containers/src/tab/tab-item/index.spec.ts b/bricks/containers/src/tab/tab-item/index.spec.ts index 4f8e40a2e..50497cc96 100644 --- a/bricks/containers/src/tab/tab-item/index.spec.ts +++ b/bricks/containers/src/tab/tab-item/index.spec.ts @@ -1,5 +1,5 @@ import { describe, test, expect } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./index.jsx"; import type { TabItem } from "./index.jsx"; import type { GeneralIconProps } from "@next-bricks/icons/general-icon"; diff --git a/bricks/containers/src/tab/tab-list/index.spec.ts b/bricks/containers/src/tab/tab-list/index.spec.ts index 388436671..553f44013 100644 --- a/bricks/containers/src/tab/tab-list/index.spec.ts +++ b/bricks/containers/src/tab/tab-list/index.spec.ts @@ -1,5 +1,5 @@ import { describe, test, expect } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import { fireEvent } from "@testing-library/react"; import "./index.jsx"; import "../tab-group/index.jsx"; diff --git a/bricks/containers/src/tab/tab-list/index.tsx b/bricks/containers/src/tab/tab-list/index.tsx index 40d88fa43..f5bfdd4bf 100644 --- a/bricks/containers/src/tab/tab-list/index.tsx +++ b/bricks/containers/src/tab/tab-list/index.tsx @@ -177,7 +177,7 @@ function TabListElement({ autoSpeed, fillContainer, }: TabListElementProps): React.ReactElement { - const timerRef = useRef(); + const timerRef = useRef(undefined); const tabs = useMemo(() => { if (_tabs?.length) { diff --git a/bricks/icons/package.json b/bricks/icons/package.json index 9a3eb2a45..13f904606 100644 --- a/bricks/icons/package.json +++ b/bricks/icons/package.json @@ -76,11 +76,11 @@ "@fortawesome/free-regular-svg-icons": "^6.6.0", "@fortawesome/free-solid-svg-icons": "^6.6.0", "@next-core/element": "^1.2.16", - "@next-core/react-element": "^1.0.35", + "@next-core/react-element": "^2.0.0", "@next-core/runtime": "^1.59.2", "@next-core/utils": "^1.7.31", "lodash": "^4.17.21", - "react": "0.0.0-experimental-ee8509801-20230117" + "react": "^19.0.0" }, "devDependencies": { "@fortawesome/fontawesome-svg-core": "^6.6.0", diff --git a/bricks/icons/src/easyops-icon/index.spec.ts b/bricks/icons/src/easyops-icon/index.spec.ts index 658bfeaa9..f44b11bb3 100644 --- a/bricks/icons/src/easyops-icon/index.spec.ts +++ b/bricks/icons/src/easyops-icon/index.spec.ts @@ -1,5 +1,5 @@ import { describe, test, expect } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./index.js"; import type { EasyOpsIcon } from "./index.js"; import "../img-icon/index.js"; diff --git a/bricks/icons/src/fa-icon/index.spec.ts b/bricks/icons/src/fa-icon/index.spec.ts index 54c0c354d..324cf599f 100644 --- a/bricks/icons/src/fa-icon/index.spec.ts +++ b/bricks/icons/src/fa-icon/index.spec.ts @@ -1,4 +1,4 @@ -import { act } from "react-dom/test-utils"; +import { act } from "react"; import type { FaIcon } from "./index.js"; window.fetch = jest.fn( diff --git a/bricks/icons/src/general-icon/index.spec.ts b/bricks/icons/src/general-icon/index.spec.ts index 3dd80b4ac..3729a94b3 100644 --- a/bricks/icons/src/general-icon/index.spec.ts +++ b/bricks/icons/src/general-icon/index.spec.ts @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./index.js"; import { GeneralIcon } from "./index.js"; diff --git a/bricks/icons/src/general-icon/index.tsx b/bricks/icons/src/general-icon/index.tsx index de8f2f40b..2711a7748 100644 --- a/bricks/icons/src/general-icon/index.tsx +++ b/bricks/icons/src/general-icon/index.tsx @@ -1,4 +1,4 @@ -import React, { CSSProperties, useCallback, useState } from "react"; +import React, { CSSProperties, useCallback, useState, type JSX } from "react"; import { createDecorators } from "@next-core/element"; import { ReactNextElement } from "@next-core/react-element"; import { pick } from "lodash"; diff --git a/bricks/icons/src/img-icon/index.spec.tsx b/bricks/icons/src/img-icon/index.spec.tsx index b163ed8f8..0ab0442a7 100644 --- a/bricks/icons/src/img-icon/index.spec.tsx +++ b/bricks/icons/src/img-icon/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import * as runtime from "@next-core/runtime"; import { EoImgIcon } from "./index.js"; diff --git a/bricks/illustrations/package.json b/bricks/illustrations/package.json index fe6f9aa8e..3eec022e7 100644 --- a/bricks/illustrations/package.json +++ b/bricks/illustrations/package.json @@ -59,12 +59,12 @@ "dependencies": { "@next-core/element": "^1.2.16", "@next-core/illustrations": "^0.11.34", - "@next-core/react-element": "^1.0.35", - "@next-core/react-runtime": "^1.7.9", + "@next-core/react-element": "^2.0.0", + "@next-core/react-runtime": "^2.0.0", "@next-core/types": "^1.14.0", "@next-core/utils": "^1.7.31", "lodash": "^4.17.21", - "react": "0.0.0-experimental-ee8509801-20230117" + "react": "^19.0.0" }, "devDependencies": { "@next-core/build-next-bricks": "^1.23.10", diff --git a/bricks/illustrations/src/illustration-message/index.spec.tsx b/bricks/illustrations/src/illustration-message/index.spec.tsx index 8b7e69160..f9ecd79ff 100644 --- a/bricks/illustrations/src/illustration-message/index.spec.tsx +++ b/bricks/illustrations/src/illustration-message/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import type { IllustrationMessage } from "./index.js"; diff --git a/bricks/illustrations/src/loading-transition/index.spec.tsx b/bricks/illustrations/src/loading-transition/index.spec.tsx index a57543558..2677d1a34 100644 --- a/bricks/illustrations/src/loading-transition/index.spec.tsx +++ b/bricks/illustrations/src/loading-transition/index.spec.tsx @@ -1,5 +1,5 @@ import { describe, test, expect, jest } from "@jest/globals"; -import { act } from "react-dom/test-utils"; +import { act } from "react"; import "./"; import type { LoadingTransition } from "./index.js"; diff --git a/cypress/size-check.spec.js b/cypress/size-check.spec.js index 1db4d8820..1acac4b56 100644 --- a/cypress/size-check.spec.js +++ b/cypress/size-check.spec.js @@ -3,7 +3,6 @@ const homepage = "http://localhost:8081/-size-check-"; const resourceUrlPrefix = "http://localhost:8081/sa-static/-/bricks/"; -const reactChunkRegExp = /\/chunks\/(?:(?:40)?41|3?144)\.[0-9a-f]+\.js$/; describe("brick size check", () => { it("all together", () => { @@ -20,31 +19,36 @@ describe("brick size check", () => { }); cy.get("@console.error").should("not.be.called"); - cy.window().then((win) => { + cy.window().then(async (win) => { const { performance } = win; const resources = performance.getEntriesByType("resource"); let others = 0; let total = 0; let react = 0; const deps = new Map(); - resources.map((resource) => { - if (resource.name.startsWith(resourceUrlPrefix)) { - total += resource.transferSize; - if (reactChunkRegExp.test(resource.name)) { - react += resource.transferSize; + await Promise.all( + resources.map(async (resource) => { + if ( + resource.name.startsWith(resourceUrlPrefix) && + !resource.name.endsWith(".LICENSE.txt") + ) { + total += resource.transferSize; + if (await isReactChunk(resource.name)) { + react += resource.transferSize; + } else { + const resourcePkg = resource.name + .substring(resourceUrlPrefix.length) + .split("/", 1)[0]; + deps.set( + resourcePkg, + (deps.get(resourcePkg) ?? 0) + resource.transferSize + ); + } } else { - const resourcePkg = resource.name - .substring(resourceUrlPrefix.length) - .split("/", 1)[0]; - deps.set( - resourcePkg, - (deps.get(resourcePkg) ?? 0) + resource.transferSize - ); + others += resource.transferSize; } - } else { - others += resource.transferSize; - } - }); + }) + ); const lines = []; lines.push( `Core: ${getSizeInKB(others)}`, @@ -87,33 +91,38 @@ describe("brick size check", () => { cy.contains("This is size-check!"); cy.get("@console.error").should("not.be.called"); - cy.window().then((win) => { + cy.window().then(async (win) => { const { performance } = win; const resources = performance.getEntriesByType("resource"); let total = 0; let self = 0; let react = 0; const deps = new Map(); - resources.map((resource) => { - if (resource.name.startsWith(resourceUrlPrefix)) { - total += resource.transferSize; - if (reactChunkRegExp.test(resource.name)) { - react += resource.transferSize; - } else { - const resourcePkg = resource.name - .substring(resourceUrlPrefix.length) - .split("/", 1)[0]; - if (resourcePkg === pkgName) { - self += resource.transferSize; + await Promise.all( + resources.map(async (resource) => { + if ( + resource.name.startsWith(resourceUrlPrefix) && + !resource.name.endsWith(".LICENSE.txt") + ) { + total += resource.transferSize; + if (await isReactChunk(resource.name)) { + react += resource.transferSize; } else { - deps.set( - resourcePkg, - (deps.get(resourcePkg) ?? 0) + resource.transferSize - ); + const resourcePkg = resource.name + .substring(resourceUrlPrefix.length) + .split("/", 1)[0]; + if (resourcePkg === pkgName) { + self += resource.transferSize; + } else { + deps.set( + resourcePkg, + (deps.get(resourcePkg) ?? 0) + resource.transferSize + ); + } } } - } - }); + }) + ); const lines = []; lines.push(`${pkgName}:`, ` total: ${getSizeInKB(total)}`); @@ -162,7 +171,7 @@ describe("brick size check", () => { cy.contains("This is size-check!"); cy.get("@console.error").should("not.be.called"); - cy.window().then((win) => { + cy.window().then(async (win) => { const { performance } = win; const resources = performance.getEntriesByType("resource"); let total = 0; @@ -170,31 +179,37 @@ describe("brick size check", () => { let react = 0; const deps = new Map(); const byFiles = new Map(); - resources.map((resource) => { - if (resource.name.startsWith(resourceUrlPrefix)) { - total += resource.transferSize; - if (reactChunkRegExp.test(resource.name)) { - react += resource.transferSize; - } else { - const resourcePkg = resource.name - .substring(resourceUrlPrefix.length) - .split("/", 1)[0]; - if (resourcePkg === pkgName) { - self += resource.transferSize; + + await Promise.all( + resources.map(async (resource) => { + if ( + resource.name.startsWith(resourceUrlPrefix) && + !resource.name.endsWith(".LICENSE.txt") + ) { + total += resource.transferSize; + if (await isReactChunk(resource.name)) { + react += resource.transferSize; } else { - deps.set( - resourcePkg, - (deps.get(resourcePkg) ?? 0) + resource.transferSize - ); + const resourcePkg = resource.name + .substring(resourceUrlPrefix.length) + .split("/", 1)[0]; + if (resourcePkg === pkgName) { + self += resource.transferSize; + } else { + deps.set( + resourcePkg, + (deps.get(resourcePkg) ?? 0) + resource.transferSize + ); + } } + // Remove the version part from the file path + const filePath = resource.name + .substring(resourceUrlPrefix.length) + .replace(/([^/]+\/)\d+\.\d+\.\d+\//, "$1"); + byFiles.set(filePath, resource.transferSize); } - // Remove the version part from the file path - const filePath = resource.name - .substring(resourceUrlPrefix.length) - .replace(/([^/]+\/)\d+\.\d+\.\d+\//, "$1"); - byFiles.set(filePath, resource.transferSize); - } - }); + }) + ); const lines = []; lines.push(`${brick}:`, ` total: ${getSizeInKB(total)}`); @@ -229,3 +244,19 @@ describe("brick size check", () => { function getSizeInKB(size) { return `${(+(size / 1024).toFixed(2)).toLocaleString()} KB`; } + +async function isReactChunk(resourceName) { + const response = await fetch(`${resourceName}.LICENSE.txt`); + if (response.ok) { + const license = await response.text(); + if ( + license.includes("@license React") && + /(?:react(?:-dom(?:-client)?)?|scheduler)\.production(?:\.min)?\.js/.test( + license + ) + ) { + return true; + } + } + return false; +} diff --git a/package.json b/package.json index acfc5d676..b7c2b9bcf 100644 --- a/package.json +++ b/package.json @@ -53,13 +53,7 @@ "@next-core/eslint-config-next": "^2.0.26", "@next-core/preview": "^0.7.50", "@next-core/test-next": "^1.1.8", - "@next-core/yo": "^1.5.91", - "@types/d3-force": "^3.0.9", - "@types/d3-geo": "^3.1.0", - "@types/d3-hierarchy": "^3.1.2", - "@types/d3-selection": "^3.0.10", - "@types/d3-shape": "^3.1.6", - "@types/d3-zoom": "^3.0.8", + "@next-core/yo": "^2.0.0", "@types/dompurify": "^3.0.5", "@types/file-saver": "^2.0.5", "@types/history": "^4.7.11", @@ -67,11 +61,8 @@ "@types/js-yaml": "^3.12.10", "@types/lodash": "^4.17.0", "@types/node": "^20.12.7", - "@types/prismjs": "^1.26.0", - "@types/react": "^18.2.79", - "@types/react-dom": "^18.2.25", - "@types/react-grid-layout": "^1.3.5", - "@types/react-transition-group": "^4.4.6", + "@types/react": "^19.0.5", + "@types/react-dom": "^19.0.3", "@types/three": "^0.150.1", "@typescript-eslint/eslint-plugin": "^7.18.0", "concurrently": "^9.1.0", @@ -85,17 +76,16 @@ "lerna": "^8.1.7", "lint-staged": "^15.2.10", "prettier": "^3.3.3", - "typescript": "^5.6.3" + "typescript": "^5.7.3" }, "workspaces": [ "bricks/*", "shared/*" ], "resolutions": { - "@babel/parser": "^7.24.4", - "@babel/runtime": "^7.24.4", - "@types/hast": "^3.0.4", - "@types/react": "^18.2.79", + "@babel/parser": "^7.26.5", + "@babel/runtime": "^7.26.0", + "@types/react": "^19.0.5", "lodash": "^4.17.21", "moment": "^2.30.1" } diff --git a/shared/general/package.json b/shared/general/package.json index a8389f129..dbd26b430 100644 --- a/shared/general/package.json +++ b/shared/general/package.json @@ -62,7 +62,7 @@ "@next-core/cook": "^2.5.6", "@next-core/runtime": "^1.59.2", "@next-core/utils": "^1.7.31", - "history": "^4.7.11" + "history": "^4.10.1" }, "devDependencies": { "@next-core/build-next-libs": "^1.0.23", diff --git a/size-check.config.mjs b/size-check.config.mjs index 3379c770a..005013043 100644 --- a/size-check.config.mjs +++ b/size-check.config.mjs @@ -1,7 +1,8 @@ /** @type {import("@next-core/brick-container").DevConfig} */ export default { brickFolders: [ - "ci-bricks/bricks" + "node_modules/@next-bricks", + "ci-bricks/bricks", ], sizeCheckFilter(brick, pkgId) { return ( diff --git a/yarn.lock b/yarn.lock index 2545fe1f1..d9043cf31 100644 --- a/yarn.lock +++ b/yarn.lock @@ -240,12 +240,12 @@ "@babel/template" "^7.25.9" "@babel/types" "^7.26.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.24.4", "@babel/parser@^7.25.9", "@babel/parser@^7.26.0", "@babel/parser@^7.26.5": - version "7.25.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.3.tgz#91fb126768d944966263f0657ab222a642b82065" - integrity sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.25.9", "@babel/parser@^7.26.0", "@babel/parser@^7.26.5": + version "7.26.5" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.5.tgz#6fec9aebddef25ca57a935c86dbb915ae2da3e1f" + integrity sha512-SRJ4jYmXRqV1/Xc+TIVG84WjHBXKlxO9sHQnA2Pf12QQEAp1LOh6kDzNHXcUnbH1QI0FDoPPVOt+vyUDucxpaw== dependencies: - "@babel/types" "^7.25.2" + "@babel/types" "^7.26.5" "@babel/plugin-bugfix-firefox-class-in-computed-class-key@^7.25.9": version "7.25.9" @@ -1003,10 +1003,10 @@ "@babel/plugin-transform-modules-commonjs" "^7.25.9" "@babel/plugin-transform-typescript" "^7.25.9" -"@babel/runtime@7.23.4", "@babel/runtime@^7.1.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.16.0", "@babel/runtime@^7.20.6", "@babel/runtime@^7.23.2", "@babel/runtime@^7.24.4", "@babel/runtime@^7.26.0", "@babel/runtime@^7.8.4": - version "7.24.4" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.4.tgz#de795accd698007a66ba44add6cc86542aff1edd" - integrity sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA== +"@babel/runtime@7.23.4", "@babel/runtime@^7.1.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.16.0", "@babel/runtime@^7.20.6", "@babel/runtime@^7.23.2", "@babel/runtime@^7.26.0", "@babel/runtime@^7.8.4": + version "7.26.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.26.0.tgz#8600c2f595f277c60815256418b85356a65173c1" + integrity sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw== dependencies: regenerator-runtime "^0.14.0" @@ -1032,7 +1032,7 @@ debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.21.3", "@babel/types@^7.22.5", "@babel/types@^7.25.2", "@babel/types@^7.25.9", "@babel/types@^7.26.0", "@babel/types@^7.26.5", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.21.3", "@babel/types@^7.22.5", "@babel/types@^7.25.9", "@babel/types@^7.26.0", "@babel/types@^7.26.5", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.26.5" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.5.tgz#7a1e1c01d28e26d1fe7f8ec9567b3b92b9d07747" integrity sha512-L6mZmwFDK6Cjh1nRCLXpa6no13ZIioJDz7mdkzHv399pThrTa/k0nUlNaenOeh2kWu/iaOQYElEpKPUswUa9Vg== @@ -2233,27 +2233,27 @@ resolved "https://registry.yarnpkg.com/@next-core/preview/-/preview-0.7.50.tgz#d1a0a7de253494dd925b0158bda8e59a148d67d5" integrity sha512-pUGORhQnrkOGb/ygK+dvpb39srMpJZUXhc94pzCPpgj5low3la0CDZMf7XRf39gun9KRsBQlkkq1bLiVSfuKiw== -"@next-core/react-element@^1.0.35": - version "1.0.35" - resolved "https://registry.yarnpkg.com/@next-core/react-element/-/react-element-1.0.35.tgz#24095b9ddcd5aa8d1305e7fb7a2fad1c42390371" - integrity sha512-8CmwkOo7EZXLvAZ2ipNnGD6ShepcVMBn6+YBxkoTGsX8y5A5yvOmGMrPa0cZKxlA9GD3t0YKprE1iQed/0P6zw== +"@next-core/react-element@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@next-core/react-element/-/react-element-2.0.0.tgz#25ec3bdd433ce01582dd4cb64574cf10de76e071" + integrity sha512-px5XiQ+qEW0eMZ0zfptA6LzooXbWOYHBf4qqXb4rFtNiyJCnarpkPaGCAJOJOkxQU1KdJhDtaeOCQIxAZHAMcg== dependencies: "@next-core/element" "^1.2.16" - react "0.0.0-experimental-ee8509801-20230117" - react-dom "0.0.0-experimental-ee8509801-20230117" + react "^19.0.0" + react-dom "^19.0.0" -"@next-core/react-runtime@^1.7.9": - version "1.7.9" - resolved "https://registry.yarnpkg.com/@next-core/react-runtime/-/react-runtime-1.7.9.tgz#ba6abb69926d3742dea28610ee5e2b3ecf8eb477" - integrity sha512-PAMZodjEoMlBKQc7fy9o2Knv8TwWCtkR0R9GRgi6NVldnpY9r6PFbzYHZonxFn1QF8fsBFzR0TYGOPYSFlm8hA== +"@next-core/react-runtime@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@next-core/react-runtime/-/react-runtime-2.0.0.tgz#133574eb43f2f58a2fc7b01fde28e3605a4cb2ed" + integrity sha512-wzTibN1S80cNbbfE+VkKqAM3COF8IsrJGjLxooz9soRUMnVFHyJucb++c6wo6mgVB8yL7goQqcG1ojZBAsC/aQ== dependencies: - "@next-core/react-element" "^1.0.35" - "@next-core/runtime" "^1.59.2" + "@next-core/react-element" "^2.0.0" + "@next-core/runtime" "^1.59.1" "@next-core/types" "^1.14.0" - react "0.0.0-experimental-ee8509801-20230117" - react-dom "0.0.0-experimental-ee8509801-20230117" + react "^19.0.0" + react-dom "^19.0.0" -"@next-core/runtime@^1.59.2": +"@next-core/runtime@^1.59.1", "@next-core/runtime@^1.59.2": version "1.59.2" resolved "https://registry.yarnpkg.com/@next-core/runtime/-/runtime-1.59.2.tgz#8cb2ac629bcd3e7dab8e9d329e747dda8d2b7624" integrity sha512-Z2PtwrPuU1VuNymZ3k6Xe4FnqSM3I8lwJbjVieCKdWNG9/hsw5oesrxWygjcnIipCKaRuKKJDNs7ZIkQaDZugA== @@ -2333,10 +2333,10 @@ file-saver "^2.0.5" lodash "^4.17.21" -"@next-core/yo@^1.5.91": - version "1.5.91" - resolved "https://registry.yarnpkg.com/@next-core/yo/-/yo-1.5.91.tgz#b22b19883553e7218e4db324a5c320b16606838b" - integrity sha512-mKIYRDIcihqHDPz03CRdVO4rjm6YkEth4I+fCmfwIdTo+xTiEaH3TEGkqcagcxL8ubd3LXgVFsV4u2vVpCibxg== +"@next-core/yo@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@next-core/yo/-/yo-2.0.0.tgz#18600a3bacffd53fdd4fae549ed71769ff3683a6" + integrity sha512-sq4YFED6E/aqxdYl3kb7wimVzSGmcyEiTYrLQpaNBPWZRdGbrzBWTXl6j3RDCYnsNOMAN9miAo0kbGJbCAoydw== dependencies: minimist "^1.2.8" plop "^4.0.1" @@ -3014,60 +3014,6 @@ dependencies: "@babel/types" "^7.3.0" -"@types/d3-color@*": - version "3.1.3" - resolved "https://registry.yarnpkg.com/@types/d3-color/-/d3-color-3.1.3.tgz#368c961a18de721da8200e80bf3943fb53136af2" - integrity sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A== - -"@types/d3-force@^3.0.9": - version "3.0.9" - resolved "https://registry.yarnpkg.com/@types/d3-force/-/d3-force-3.0.9.tgz#dd96ccefba4386fe4ff36b8e4ee4e120c21fcf29" - integrity sha512-IKtvyFdb4Q0LWna6ymywQsEYjK/94SGhPrMfEr1TIc5OBeziTi+1jcCvttts8e0UWZIxpasjnQk9MNk/3iS+kA== - -"@types/d3-geo@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@types/d3-geo/-/d3-geo-3.1.0.tgz#b9e56a079449174f0a2c8684a9a4df3f60522440" - integrity sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ== - dependencies: - "@types/geojson" "*" - -"@types/d3-hierarchy@^3.1.2": - version "3.1.2" - resolved "https://registry.npmjs.org/@types/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz#b3a446b5437faededb30ac32b7cc0486559ab1e2" - integrity sha512-9hjRTVoZjRFR6xo8igAJyNXQyPX6Aq++Nhb5ebrUF414dv4jr2MitM2fWiOY475wa3Za7TOS2Gh9fmqEhLTt0A== - -"@types/d3-interpolate@*": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz#412b90e84870285f2ff8a846c6eb60344f12a41c" - integrity sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA== - dependencies: - "@types/d3-color" "*" - -"@types/d3-path@*": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@types/d3-path/-/d3-path-3.0.2.tgz#4327f4a05d475cf9be46a93fc2e0f8d23380805a" - integrity sha512-WAIEVlOCdd/NKRYTsqCpOMHQHemKBEINf8YXMYOtXH0GA7SY0dqMB78P3Uhgfy+4X+/Mlw2wDtlETkN6kQUCMA== - -"@types/d3-selection@*", "@types/d3-selection@^3.0.10": - version "3.0.10" - resolved "https://registry.yarnpkg.com/@types/d3-selection/-/d3-selection-3.0.10.tgz#98cdcf986d0986de6912b5892e7c015a95ca27fe" - integrity sha512-cuHoUgS/V3hLdjJOLTT691+G2QoqAjCVLmr4kJXR4ha56w1Zdu8UUQ5TxLRqudgNjwXeQxKMq4j+lyf9sWuslg== - -"@types/d3-shape@^3.1.6": - version "3.1.6" - resolved "https://registry.yarnpkg.com/@types/d3-shape/-/d3-shape-3.1.6.tgz#65d40d5a548f0a023821773e39012805e6e31a72" - integrity sha512-5KKk5aKGu2I+O6SONMYSNflgiP0WfZIQvVUMan50wHsLG1G94JlxEVnCpQARfTtzytuY0p/9PXXZb3I7giofIA== - dependencies: - "@types/d3-path" "*" - -"@types/d3-zoom@^3.0.8": - version "3.0.8" - resolved "https://registry.yarnpkg.com/@types/d3-zoom/-/d3-zoom-3.0.8.tgz#dccb32d1c56b1e1c6e0f1180d994896f038bc40b" - integrity sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw== - dependencies: - "@types/d3-interpolate" "*" - "@types/d3-selection" "*" - "@types/dompurify@^3.0.5": version "3.0.5" resolved "https://registry.yarnpkg.com/@types/dompurify/-/dompurify-3.0.5.tgz#02069a2fcb89a163bacf1a788f73cb415dd75cb7" @@ -3106,11 +3052,6 @@ resolved "https://registry.yarnpkg.com/@types/fined/-/fined-1.1.3.tgz#83f03e8f0a8d3673dfcafb18fce3571f6250e1bc" integrity sha512-CWYnSRnun3CGbt6taXeVo2lCbuaj4mchVJ4UF/BdU5TSuIn3AmS13pGMwCsBUoehGbhZrBrpNJZSZI5EVilXww== -"@types/geojson@*": - version "7946.0.14" - resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.14.tgz#319b63ad6df705ee2a65a73ef042c8271e696613" - integrity sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg== - "@types/graceful-fs@^4.1.3": version "4.1.6" resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.6.tgz#e14b2576a1c25026b7f02ede1de3b84c3a1efeae" @@ -3118,13 +3059,6 @@ dependencies: "@types/node" "*" -"@types/hast@^3.0.4": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@types/hast/-/hast-3.0.4.tgz#1d6b39993b82cea6ad783945b0508c25903e15aa" - integrity sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ== - dependencies: - "@types/unist" "*" - "@types/history@^4.7.11": version "4.7.11" resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.11.tgz#56588b17ae8f50c53983a524fc3cc47437969d64" @@ -3226,43 +3160,16 @@ resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== -"@types/prismjs@^1.26.0": - version "1.26.0" - resolved "https://registry.npmjs.org/@types/prismjs/-/prismjs-1.26.0.tgz#a1c3809b0ad61c62cac6d4e0c56d610c910b7654" - integrity sha512-ZTaqn/qSqUuAq1YwvOFQfVW1AR/oQJlLSZVustdjwI+GZ8kr0MSHBj0tsXPW1EqHubx50gtBEjbPGsdZwQwCjQ== - -"@types/prop-types@*": - version "15.7.5" - resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" - integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== +"@types/react-dom@^19.0.3": + version "19.0.3" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-19.0.3.tgz#0804dfd279a165d5a0ad8b53a5b9e65f338050a4" + integrity sha512-0Knk+HJiMP/qOZgMyNFamlIjw9OFCsyC2ZbigmEEyXXixgre6IQpm/4V+r3qH4GC1JPvRJKInw+on2rV6YZLeA== -"@types/react-dom@^18.2.25": - version "18.2.25" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.25.tgz#2946a30081f53e7c8d585eb138277245caedc521" - integrity sha512-o/V48vf4MQh7juIKZU2QGDfli6p1+OOi5oXx36Hffpc9adsHeXjVp8rHuPkjd8VT8sOJ2Zp05HR7CdpGTIUFUA== +"@types/react@^19.0.5": + version "19.0.5" + resolved "https://registry.yarnpkg.com/@types/react/-/react-19.0.5.tgz#1196ef3a0a03dffe0ab02ddd7ae1e3590376cffd" + integrity sha512-i4OQzFiqsUCfoBns/KHpz+4QcvfjoCsTUi+mugo3lrSRA3+x0gJVvhZhAJrwLGEqz4EXiFVP4hPnOugx+m2uhg== dependencies: - "@types/react" "*" - -"@types/react-grid-layout@^1.3.5": - version "1.3.5" - resolved "https://registry.yarnpkg.com/@types/react-grid-layout/-/react-grid-layout-1.3.5.tgz#f4b52bf27775290ee0523214be0987be14e66823" - integrity sha512-WH/po1gcEcoR6y857yAnPGug+ZhkF4PaTUxgAbwfeSH/QOgVSakKHBXoPGad/sEznmkiaK3pqHk+etdWisoeBQ== - dependencies: - "@types/react" "*" - -"@types/react-transition-group@^4.4.6": - version "4.4.6" - resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-4.4.6.tgz#18187bcda5281f8e10dfc48f0943e2fdf4f75e2e" - integrity sha512-VnCdSxfcm08KjsJVQcfBmhEQAPnLB8G08hAxn39azX1qYBQ/5RVQuoHuKIcfKOdncuaUvEpFKFzEvbtIMsfVew== - dependencies: - "@types/react" "*" - -"@types/react@*", "@types/react@^18.2.79": - version "18.2.79" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.79.tgz#c40efb4f255711f554d47b449f796d1c7756d865" - integrity sha512-RwGAGXPl9kSXwdNTafkOEuFrTBD5SA2B3iEB96xi8+xu5ddUa/cpvyVCSNn+asgLCTHkb5ZxN8gbuibYJi4s1w== - dependencies: - "@types/prop-types" "*" csstype "^3.0.2" "@types/sinonjs__fake-timers@8.1.1": @@ -3312,11 +3219,6 @@ resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.7.tgz#baccb07a970b91707df3a3e8ba6896c57ead2d11" integrity sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw== -"@types/unist@*": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@types/unist/-/unist-3.0.2.tgz#6dd61e43ef60b34086287f83683a5c1b2dc53d20" - integrity sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ== - "@types/webxr@*": version "0.5.1" resolved "https://registry.npmjs.org/@types/webxr/-/webxr-0.5.1.tgz#4908349419104bd476a4252d04e4c3abb496748d" @@ -7286,7 +7188,7 @@ header-case@^2.0.4: capital-case "^1.0.4" tslib "^2.0.3" -history@^4.10.1, history@^4.7.11: +history@^4.10.1: version "4.10.1" resolved "https://registry.yarnpkg.com/history/-/history-4.10.1.tgz#33371a65e3a83b267434e2b3f3b1b4c58aad4cf3" integrity sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew== @@ -9193,7 +9095,7 @@ log-update@^6.1.0: strip-ansi "^7.1.0" wrap-ansi "^9.0.0" -loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.4.0: +loose-envify@^1.2.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== @@ -11460,13 +11362,12 @@ re-resizable@6.10.3: resolved "https://registry.yarnpkg.com/re-resizable/-/re-resizable-6.10.3.tgz#72c42532ede0cbcaf93308bcbfed782abbf97e79" integrity sha512-zvWb7X3RJMA4cuSrqoxgs3KR+D+pEXnGrD2FAD6BMYAULnZsSF4b7AOVyG6pC3VVNVOtlagGDCDmZSwWLjjBBw== -react-dom@0.0.0-experimental-ee8509801-20230117: - version "0.0.0-experimental-ee8509801-20230117" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-0.0.0-experimental-ee8509801-20230117.tgz#3007027b010ab154d1e98795ee359cae5f711161" - integrity sha512-mdtGQKFmP1uIRIp73EQL0axwudwsw79ry3bMq8FyJ5ZRL3iB1AjssEAsWUEVU7T1KKxp3PyG/OYfrTFnpTAz8g== +react-dom@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-19.0.0.tgz#43446f1f01c65a4cd7f7588083e686a6726cfb57" + integrity sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ== dependencies: - loose-envify "^1.1.0" - scheduler "0.0.0-experimental-ee8509801-20230117" + scheduler "^0.25.0" react-draggable@4.4.6: version "4.4.6" @@ -11508,12 +11409,10 @@ react-rnd@^10.4.1: react-draggable "4.4.6" tslib "2.6.2" -react@0.0.0-experimental-ee8509801-20230117: - version "0.0.0-experimental-ee8509801-20230117" - resolved "https://registry.yarnpkg.com/react/-/react-0.0.0-experimental-ee8509801-20230117.tgz#07d19ce8c9f7f4288b1ca05eeb8b4b8016c081ed" - integrity sha512-RriS2Fco7EKsXFXi63e9RFEz9xPnDakzHVKGzQ5iwy0jaFwHpvZbYr4fSbPmmUyGUXjDFtr4BfzANERUju1byw== - dependencies: - loose-envify "^1.1.0" +react@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/react/-/react-19.0.0.tgz#6e1969251b9f108870aa4bff37a0ce9ddfaaabdd" + integrity sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ== read-cmd-shim@4.0.0, read-cmd-shim@^4.0.0: version "4.0.0" @@ -11944,12 +11843,10 @@ saxes@^6.0.0: dependencies: xmlchars "^2.2.0" -scheduler@0.0.0-experimental-ee8509801-20230117: - version "0.0.0-experimental-ee8509801-20230117" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.0.0-experimental-ee8509801-20230117.tgz#3f7ac0ff69d677ee543044e645109edf12a0542a" - integrity sha512-P7U/SCdj9TE3YciEfb6iwY8SskSFFJNttMoHwUrXllu0rGcb2Y8HQC2zN/+ldZufaQCxAqIoevua1QBQFPrXPw== - dependencies: - loose-envify "^1.1.0" +scheduler@^0.25.0: + version "0.25.0" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.25.0.tgz#336cd9768e8cceebf52d3c80e3dcf5de23e7e015" + integrity sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA== schema-utils@^3.1.1, schema-utils@^3.2.0: version "3.3.0" @@ -13024,7 +12921,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== -"typescript@>=3 < 6", typescript@^5.6.3, typescript@^5.7.3: +"typescript@>=3 < 6", typescript@^5.7.3: version "5.7.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.3.tgz#919b44a7dbb8583a9b856d162be24a54bf80073e" integrity sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==