From 004e714c0b38979fd7f27a3e6640670639236afd Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Fri, 14 Nov 2025 18:58:25 +0000 Subject: [PATCH 1/3] Replace linaria with ecis --- .github/dependabot.yml | 7 ------- .prettierignore | 1 - .prettierrc.json => .prettierrc | 2 +- .vscode/settings.json | 3 --- babel.config.json | 3 --- package.json | 13 +++++-------- rolldown.config.ts | 19 ++++++++----------- src/Cell.tsx | 2 +- src/EditCell.tsx | 2 +- src/GroupRow.tsx | 2 +- src/HeaderCell.tsx | 2 +- src/HeaderRow.tsx | 2 +- src/SummaryCell.tsx | 2 +- src/SummaryRow.tsx | 2 +- src/cellRenderers/renderCheckbox.tsx | 2 +- src/cellRenderers/renderToggleGroup.tsx | 2 +- src/editors/renderTextEditor.tsx | 2 +- src/renderHeaderCell.tsx | 2 +- src/sortStatus.tsx | 2 +- src/style/cell.ts | 2 +- src/style/core.ts | 2 +- src/style/row.ts | 2 +- src/utils/renderMeasuringCells.tsx | 2 +- test/browser/utils.tsx | 2 +- vite.config.ts | 12 ++++-------- website/Nav.tsx | 2 +- website/components/CellExpanderFormatter.tsx | 2 +- website/components/ChildRowDeleteButton.tsx | 2 +- website/components/DraggableCellRenderer.tsx | 2 +- website/routes/AllFeatures.tsx | 2 +- website/routes/Animation.tsx | 2 +- website/routes/ColumnSpanning.tsx | 2 +- website/routes/CommonFeatures.tsx | 2 +- website/routes/ContextMenu.tsx | 2 +- website/routes/CustomizableRenderers.tsx | 2 +- website/routes/HeaderFilters.tsx | 2 +- website/routes/InfiniteScrolling.tsx | 2 +- website/routes/MasterDetail.tsx | 2 +- website/routes/NoRows.tsx | 2 +- website/routes/RowGrouping.tsx | 2 +- website/routes/ScrollToCell.tsx | 2 +- website/routes/TreeView.tsx | 2 +- website/routes/__root.tsx | 2 +- 43 files changed, 53 insertions(+), 77 deletions(-) rename .prettierrc.json => .prettierrc (94%) delete mode 100644 babel.config.json diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 514a8ae301..3e6e2480c6 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,13 +11,6 @@ updates: patterns: - 'react' - 'react-dom' - babel: - patterns: - - '@babel/*' - linaria: - patterns: - - '@linaria/*' - - '@wyw-in-js/*' typescript-eslint: patterns: - '@typescript-eslint/*' diff --git a/.prettierignore b/.prettierignore index 3b8c0ad9fb..2dfabd2544 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1 @@ -package.json /website/routeTree.gen.ts diff --git a/.prettierrc.json b/.prettierrc similarity index 94% rename from .prettierrc.json rename to .prettierrc index 1511954754..f33e5548eb 100644 --- a/.prettierrc.json +++ b/.prettierrc @@ -9,7 +9,7 @@ "^react-dom", "^react", "", - "^@linaria/core$", + "^@nstep/ecis$", "^clsx$", "", "./src", diff --git a/.vscode/settings.json b/.vscode/settings.json index bb939b6158..c60cc479e1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,9 +4,6 @@ }, "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true, - "[javascript][json][jsonc][css]": { - "editor.defaultFormatter": "biomejs.biome" - }, "typescript.enablePromptUseWorkspaceTsdk": true, "typescript.tsdk": "node_modules/typescript/lib", "files.readonlyInclude": { diff --git a/babel.config.json b/babel.config.json deleted file mode 100644 index f878e8f9f9..0000000000 --- a/babel.config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["@babel/typescript"] -} diff --git a/package.json b/package.json index c377de8a22..4187701c6a 100644 --- a/package.json +++ b/package.json @@ -51,13 +51,12 @@ "postpublish": "git push --follow-tags origin HEAD" }, "devDependencies": { - "@babel/preset-typescript": "^7.27.1", "@biomejs/biome": "2.3.4", "@eslint-react/eslint-plugin": "^2.0.2", "@eslint/markdown": "^7.3.0", "@faker-js/faker": "^10.0.0", "@ianvs/prettier-plugin-sort-imports": "^4.6.2", - "@linaria/core": "^6.3.0", + "@nstep/ecis": "^0.1.0", "@tanstack/react-router": "^1.132.31", "@tanstack/router-plugin": "^1.132.31", "@types/node": "^24.8.0", @@ -65,12 +64,10 @@ "@types/react-dom": "^19.2.0", "@typescript-eslint/eslint-plugin": "^8.39.1", "@typescript-eslint/parser": "^8.39.1", - "@vitejs/plugin-react": "5.0.2", + "@vitejs/plugin-react": "^5.1.1", "@vitest/browser-playwright": "^4.0.1", "@vitest/coverage-istanbul": "^4.0.1", "@vitest/eslint-plugin": "^1.3.4", - "@wyw-in-js/rollup": "^0.8.0", - "@wyw-in-js/vite": "^0.8.0", "clsx": "^2.1.1", "eslint": "^9.36.0", "eslint-plugin-jest-dom": "^5.5.0", @@ -85,10 +82,10 @@ "prettier": "3.6.2", "react": "^19.2.0", "react-dom": "^19.2.0", - "rolldown": "^1.0.0-beta.33", - "rolldown-plugin-dts": "^0.17.1", + "rolldown": "^1.0.0-beta.50", + "rolldown-plugin-dts": "^0.17.7", "typescript": "~5.9.2", - "vite": "npm:rolldown-vite@^7.1.3", + "vite": "npm:rolldown-vite@^7.2.5", "vitest": "^4.0.1", "vitest-browser-react": "^2.0.2" }, diff --git a/rolldown.config.ts b/rolldown.config.ts index dca034dcff..d54371abd2 100644 --- a/rolldown.config.ts +++ b/rolldown.config.ts @@ -1,5 +1,5 @@ import { isAbsolute } from 'node:path'; -import wyw from '@wyw-in-js/rollup'; +import { ecis } from '@nstep/ecis/plugin'; import { defineConfig } from 'rolldown'; import { dts } from 'rolldown-plugin-dts'; @@ -10,22 +10,19 @@ export default defineConfig({ output: { dir: 'lib', cssEntryFileNames: 'styles.css', - sourcemap: true + sourcemap: true, + cleanDir: true }, platform: 'browser', external: (id) => !id.startsWith('.') && !isAbsolute(id), plugins: [ + ecis({ + // We add the package version as prefix to avoid style conflicts + // between multiple versions of RDG on the same page + classPrefix: `rdg-${pkg.version.replaceAll('.', '-')}-` + }), dts({ tsconfig: './tsconfig.lib.json' - }), - wyw({ - exclude: ['**/*.d.ts'], - preprocessor: 'none', - classNameSlug(hash) { - // We add the package version as suffix to avoid style conflicts - // between multiple versions of RDG on the same page. - return `${hash}${pkg.version.replaceAll('.', '-')}`; - } }) ] }); diff --git a/src/Cell.tsx b/src/Cell.tsx index a63e66a2a3..de69477593 100644 --- a/src/Cell.tsx +++ b/src/Cell.tsx @@ -1,5 +1,5 @@ import { memo, type MouseEvent } from 'react'; -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import { useRovingTabIndex } from './hooks'; import { createCellEvent, getCellClassname, getCellStyle, isCellEditableUtil } from './utils'; diff --git a/src/EditCell.tsx b/src/EditCell.tsx index 5e62f69a7b..1c5cdaca19 100644 --- a/src/EditCell.tsx +++ b/src/EditCell.tsx @@ -1,5 +1,5 @@ import { useEffectEvent, useLayoutEffect, useRef } from 'react'; -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import { createCellEvent, getCellClassname, getCellStyle, onEditorNavigation } from './utils'; import type { diff --git a/src/GroupRow.tsx b/src/GroupRow.tsx index c8f2c78c16..f5580098a4 100644 --- a/src/GroupRow.tsx +++ b/src/GroupRow.tsx @@ -1,5 +1,5 @@ import { memo, useMemo } from 'react'; -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import { RowSelectionContext, type RowSelectionContextValue } from './hooks'; import { classnames, getRowStyle } from './utils'; diff --git a/src/HeaderCell.tsx b/src/HeaderCell.tsx index b60b05e81d..fbef396c58 100644 --- a/src/HeaderCell.tsx +++ b/src/HeaderCell.tsx @@ -1,6 +1,6 @@ import { useRef, useState } from 'react'; import { flushSync } from 'react-dom'; -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import { useRovingTabIndex } from './hooks'; import { diff --git a/src/HeaderRow.tsx b/src/HeaderRow.tsx index dee50b215b..7dcf6895ed 100644 --- a/src/HeaderRow.tsx +++ b/src/HeaderRow.tsx @@ -1,5 +1,5 @@ import { memo, useState } from 'react'; -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import { classnames, getColSpan } from './utils'; import type { CalculatedColumn, Direction, Maybe, Position, ResizedWidth } from './types'; diff --git a/src/SummaryCell.tsx b/src/SummaryCell.tsx index 85bf7ae7f0..ec2918d0c7 100644 --- a/src/SummaryCell.tsx +++ b/src/SummaryCell.tsx @@ -1,5 +1,5 @@ import { memo } from 'react'; -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import { useRovingTabIndex } from './hooks'; import { getCellClassname, getCellStyle } from './utils'; diff --git a/src/SummaryRow.tsx b/src/SummaryRow.tsx index 67d9ef1ada..fda27962fa 100644 --- a/src/SummaryRow.tsx +++ b/src/SummaryRow.tsx @@ -1,5 +1,5 @@ import { memo } from 'react'; -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import { classnames, getColSpan, getRowStyle } from './utils'; import type { RenderRowProps } from './types'; diff --git a/src/cellRenderers/renderCheckbox.tsx b/src/cellRenderers/renderCheckbox.tsx index a24ac0ebe4..1c5aa4a2f7 100644 --- a/src/cellRenderers/renderCheckbox.tsx +++ b/src/cellRenderers/renderCheckbox.tsx @@ -1,4 +1,4 @@ -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import type { RenderCheckboxProps } from '../types'; diff --git a/src/cellRenderers/renderToggleGroup.tsx b/src/cellRenderers/renderToggleGroup.tsx index 6cafb99fbb..d4ccd3bfb0 100644 --- a/src/cellRenderers/renderToggleGroup.tsx +++ b/src/cellRenderers/renderToggleGroup.tsx @@ -1,4 +1,4 @@ -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import type { RenderGroupCellProps } from '../types'; diff --git a/src/editors/renderTextEditor.tsx b/src/editors/renderTextEditor.tsx index 784ea851da..7b5ab6d71f 100644 --- a/src/editors/renderTextEditor.tsx +++ b/src/editors/renderTextEditor.tsx @@ -1,4 +1,4 @@ -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import type { RenderEditCellProps } from '../types'; diff --git a/src/renderHeaderCell.tsx b/src/renderHeaderCell.tsx index d7a848359d..a1eb6fe106 100644 --- a/src/renderHeaderCell.tsx +++ b/src/renderHeaderCell.tsx @@ -1,4 +1,4 @@ -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import type { RenderHeaderCellProps } from './types'; import { useDefaultRenderers } from './DataGridDefaultRenderersContext'; diff --git a/src/sortStatus.tsx b/src/sortStatus.tsx index 2b910b7010..8d132a3277 100644 --- a/src/sortStatus.tsx +++ b/src/sortStatus.tsx @@ -1,4 +1,4 @@ -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import type { RenderSortIconProps, RenderSortPriorityProps, RenderSortStatusProps } from './types'; diff --git a/src/style/cell.ts b/src/style/cell.ts index 3e1db87d14..7cdfd05a19 100644 --- a/src/style/cell.ts +++ b/src/style/cell.ts @@ -1,4 +1,4 @@ -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; export const cell = css` @layer rdg.Cell { diff --git a/src/style/core.ts b/src/style/core.ts index ec3a0abc6b..86f2eb68e9 100644 --- a/src/style/core.ts +++ b/src/style/core.ts @@ -1,4 +1,4 @@ -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import { cell } from './cell'; import { bottomSummaryRowClassname, row, topSummaryRowClassname } from './row'; diff --git a/src/style/row.ts b/src/style/row.ts index 9a6d72f8e4..20bf65e0b5 100644 --- a/src/style/row.ts +++ b/src/style/row.ts @@ -1,4 +1,4 @@ -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; export const row = css` @layer rdg.Row { diff --git a/src/utils/renderMeasuringCells.tsx b/src/utils/renderMeasuringCells.tsx index ff2b88b86a..d4bc6b4627 100644 --- a/src/utils/renderMeasuringCells.tsx +++ b/src/utils/renderMeasuringCells.tsx @@ -1,4 +1,4 @@ -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import type { CalculatedColumn } from '../types'; diff --git a/test/browser/utils.tsx b/test/browser/utils.tsx index 3f10c007d2..7aea870d65 100644 --- a/test/browser/utils.tsx +++ b/test/browser/utils.tsx @@ -1,5 +1,5 @@ import { page, userEvent, type Locator } from 'vitest/browser'; -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import { DataGrid } from '../../src'; import type { DataGridProps } from '../../src'; diff --git a/vite.config.ts b/vite.config.ts index 8512ec3602..c67d962023 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,7 +1,7 @@ +import { ecis } from '@nstep/ecis/plugin'; import { tanstackRouter } from '@tanstack/router-plugin/vite'; import react from '@vitejs/plugin-react'; import { playwright } from '@vitest/browser-playwright'; -import wyw from '@wyw-in-js/vite'; import { defineConfig, type ViteUserConfig } from 'vitest/config'; import type { BrowserCommand } from 'vitest/node'; @@ -64,7 +64,7 @@ const scrollGrid: BrowserCommand<[{ scrollLeft?: number; scrollTop?: number }]> const viewport = { width: 1920, height: 1080 } as const; export default defineConfig( - ({ command, isPreview }): ViteUserConfig => ({ + ({ isPreview }): ViteUserConfig => ({ base: '/react-data-grid/', cacheDir: '.cache/vite', clearScreen: false, @@ -76,6 +76,7 @@ export default defineConfig( cssMinify: 'esbuild' }, plugins: [ + ecis(), (!isTest || isPreview) && tanstackRouter({ target: 'react', @@ -85,12 +86,7 @@ export default defineConfig( verboseFileRoutes: false }), react({ - exclude: ['./.cache/**/*'] - }), - wyw({ - exclude: ['./.cache/**/*', '**/*.d.ts', '**/*.gen.ts'], - preprocessor: 'none', - displayName: command === 'serve' + exclude: ['./.cache/**/*', './node_modules/**/*', './website/routeTree.gen.ts'] }) ], server: { diff --git a/website/Nav.tsx b/website/Nav.tsx index 364cadef32..7ec73b5961 100644 --- a/website/Nav.tsx +++ b/website/Nav.tsx @@ -1,6 +1,6 @@ import { useId, useState } from 'react'; import { Link } from '@tanstack/react-router'; -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import type { Direction } from '../src/types'; import { startViewTransition } from './utils'; diff --git a/website/components/CellExpanderFormatter.tsx b/website/components/CellExpanderFormatter.tsx index d62c015866..cb5cf5dd99 100644 --- a/website/components/CellExpanderFormatter.tsx +++ b/website/components/CellExpanderFormatter.tsx @@ -1,4 +1,4 @@ -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; const cellExpandClassname = css` block-size: 100%; diff --git a/website/components/ChildRowDeleteButton.tsx b/website/components/ChildRowDeleteButton.tsx index ac0ff36ffe..8935deb224 100644 --- a/website/components/ChildRowDeleteButton.tsx +++ b/website/components/ChildRowDeleteButton.tsx @@ -1,4 +1,4 @@ -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; const childRowActionCrossClassname = css` block-size: 100%; diff --git a/website/components/DraggableCellRenderer.tsx b/website/components/DraggableCellRenderer.tsx index ab2c2535a2..b29686ec9e 100644 --- a/website/components/DraggableCellRenderer.tsx +++ b/website/components/DraggableCellRenderer.tsx @@ -1,5 +1,5 @@ import { useState } from 'react'; -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import clsx from 'clsx'; import { Cell, type CellRendererProps } from '../../src'; diff --git a/website/routes/AllFeatures.tsx b/website/routes/AllFeatures.tsx index c5b9872ccc..565b0643ca 100644 --- a/website/routes/AllFeatures.tsx +++ b/website/routes/AllFeatures.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; import { faker } from '@faker-js/faker'; -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import clsx from 'clsx'; import { DataGrid, renderTextEditor, SelectColumn } from '../../src'; diff --git a/website/routes/Animation.tsx b/website/routes/Animation.tsx index b40da14bfa..9fcdc8b019 100644 --- a/website/routes/Animation.tsx +++ b/website/routes/Animation.tsx @@ -1,5 +1,5 @@ import { useState } from 'react'; -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import { DataGrid, type Column } from '../../src'; import { useDirection } from '../directionContext'; diff --git a/website/routes/ColumnSpanning.tsx b/website/routes/ColumnSpanning.tsx index afd3493a8e..be6c4391c6 100644 --- a/website/routes/ColumnSpanning.tsx +++ b/website/routes/ColumnSpanning.tsx @@ -1,4 +1,4 @@ -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import { DataGrid, type Column } from '../../src'; import { renderCoordinates } from '../renderers'; diff --git a/website/routes/CommonFeatures.tsx b/website/routes/CommonFeatures.tsx index 3bf63e54ca..a9d33ec831 100644 --- a/website/routes/CommonFeatures.tsx +++ b/website/routes/CommonFeatures.tsx @@ -1,7 +1,7 @@ import { useMemo, useRef, useState } from 'react'; import { createPortal, flushSync } from 'react-dom'; import { faker } from '@faker-js/faker'; -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import { DataGrid, diff --git a/website/routes/ContextMenu.tsx b/website/routes/ContextMenu.tsx index e1ac2b460a..0b78afca1d 100644 --- a/website/routes/ContextMenu.tsx +++ b/website/routes/ContextMenu.tsx @@ -1,7 +1,7 @@ import { useLayoutEffect, useReducer, useRef, useState } from 'react'; import { createPortal } from 'react-dom'; import { faker } from '@faker-js/faker'; -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import { DataGrid, type Column } from '../../src'; import { useDirection } from '../directionContext'; diff --git a/website/routes/CustomizableRenderers.tsx b/website/routes/CustomizableRenderers.tsx index 648c106971..27521b90a3 100644 --- a/website/routes/CustomizableRenderers.tsx +++ b/website/routes/CustomizableRenderers.tsx @@ -1,5 +1,5 @@ import { useMemo, useState } from 'react'; -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import { Row as BaseRow, Cell, DataGrid, renderTextEditor, SelectColumn } from '../../src'; import type { diff --git a/website/routes/HeaderFilters.tsx b/website/routes/HeaderFilters.tsx index 91483680b6..4c1bd64d5e 100644 --- a/website/routes/HeaderFilters.tsx +++ b/website/routes/HeaderFilters.tsx @@ -1,6 +1,6 @@ import { createContext, useContext, useMemo, useState } from 'react'; import { faker } from '@faker-js/faker'; -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import { DataGrid, type Column, type RenderHeaderCellProps } from '../../src'; import type { Omit } from '../../src/types'; diff --git a/website/routes/InfiniteScrolling.tsx b/website/routes/InfiniteScrolling.tsx index d3d92f9b66..00fe7cdf6e 100644 --- a/website/routes/InfiniteScrolling.tsx +++ b/website/routes/InfiniteScrolling.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; import { faker } from '@faker-js/faker'; -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import { DataGrid, type Column } from '../../src'; import { useDirection } from '../directionContext'; diff --git a/website/routes/MasterDetail.tsx b/website/routes/MasterDetail.tsx index 7075af4a42..c845bdc1d9 100644 --- a/website/routes/MasterDetail.tsx +++ b/website/routes/MasterDetail.tsx @@ -1,6 +1,6 @@ import { useMemo, useState } from 'react'; import { faker } from '@faker-js/faker'; -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import { DataGrid, type Column, type Direction, type RowsChangeData } from '../../src'; import { CellExpanderFormatter } from '../components'; diff --git a/website/routes/NoRows.tsx b/website/routes/NoRows.tsx index 3a99463d88..337dfc9377 100644 --- a/website/routes/NoRows.tsx +++ b/website/routes/NoRows.tsx @@ -1,5 +1,5 @@ import { useState } from 'react'; -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import { DataGrid, SelectColumn, type Column } from '../../src'; import { useDirection } from '../directionContext'; diff --git a/website/routes/RowGrouping.tsx b/website/routes/RowGrouping.tsx index 0b52a8c11b..da18bf7d52 100644 --- a/website/routes/RowGrouping.tsx +++ b/website/routes/RowGrouping.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; import { faker } from '@faker-js/faker'; -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import { SelectColumn, TreeDataGrid, type Column } from '../../src'; import { useDirection } from '../directionContext'; diff --git a/website/routes/ScrollToCell.tsx b/website/routes/ScrollToCell.tsx index 506975b6e6..a0d1afad3c 100644 --- a/website/routes/ScrollToCell.tsx +++ b/website/routes/ScrollToCell.tsx @@ -1,5 +1,5 @@ import { useRef, useState } from 'react'; -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import clsx from 'clsx'; import { DataGrid, type Column, type DataGridHandle } from '../../src'; diff --git a/website/routes/TreeView.tsx b/website/routes/TreeView.tsx index c22726437d..f27fd236c2 100644 --- a/website/routes/TreeView.tsx +++ b/website/routes/TreeView.tsx @@ -1,5 +1,5 @@ import { useMemo, useReducer, useState } from 'react'; -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import { DataGrid, type Column } from '../../src'; import { CellExpanderFormatter, ChildRowDeleteButton } from '../components'; diff --git a/website/routes/__root.tsx b/website/routes/__root.tsx index 796e87ff3a..1bac4f224b 100644 --- a/website/routes/__root.tsx +++ b/website/routes/__root.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; import { createRootRoute, Outlet } from '@tanstack/react-router'; -import { css } from '@linaria/core'; +import { css } from '@nstep/ecis'; import type { Direction } from '../../src/types'; import { DirectionContext } from '../directionContext'; From 1c0f9c1dba1b7e771cfbc898fc4bf1aa80fc79a9 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sat, 15 Nov 2025 01:16:27 +0000 Subject: [PATCH 2/3] ecis -> ecij --- .prettierrc | 2 +- package.json | 2 +- rolldown.config.ts | 4 ++-- src/Cell.tsx | 2 +- src/EditCell.tsx | 2 +- src/GroupRow.tsx | 2 +- src/HeaderCell.tsx | 2 +- src/HeaderRow.tsx | 2 +- src/SummaryCell.tsx | 2 +- src/SummaryRow.tsx | 2 +- src/cellRenderers/renderCheckbox.tsx | 2 +- src/cellRenderers/renderToggleGroup.tsx | 2 +- src/editors/renderTextEditor.tsx | 2 +- src/renderHeaderCell.tsx | 2 +- src/sortStatus.tsx | 2 +- src/style/cell.ts | 2 +- src/style/core.ts | 2 +- src/style/row.ts | 2 +- src/utils/renderMeasuringCells.tsx | 2 +- test/browser/utils.tsx | 2 +- vite.config.ts | 4 ++-- website/Nav.tsx | 2 +- website/components/CellExpanderFormatter.tsx | 2 +- website/components/ChildRowDeleteButton.tsx | 2 +- website/components/DraggableCellRenderer.tsx | 2 +- website/routes/AllFeatures.tsx | 2 +- website/routes/Animation.tsx | 2 +- website/routes/ColumnSpanning.tsx | 2 +- website/routes/CommonFeatures.tsx | 2 +- website/routes/ContextMenu.tsx | 2 +- website/routes/CustomizableRenderers.tsx | 2 +- website/routes/HeaderFilters.tsx | 2 +- website/routes/InfiniteScrolling.tsx | 2 +- website/routes/MasterDetail.tsx | 2 +- website/routes/NoRows.tsx | 2 +- website/routes/RowGrouping.tsx | 2 +- website/routes/ScrollToCell.tsx | 2 +- website/routes/TreeView.tsx | 2 +- website/routes/__root.tsx | 2 +- 39 files changed, 41 insertions(+), 41 deletions(-) diff --git a/.prettierrc b/.prettierrc index f33e5548eb..3ff9ca6132 100644 --- a/.prettierrc +++ b/.prettierrc @@ -9,7 +9,7 @@ "^react-dom", "^react", "", - "^@nstep/ecis$", + "^ecij$", "^clsx$", "", "./src", diff --git a/package.json b/package.json index 4187701c6a..6fdefb0917 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,6 @@ "@eslint/markdown": "^7.3.0", "@faker-js/faker": "^10.0.0", "@ianvs/prettier-plugin-sort-imports": "^4.6.2", - "@nstep/ecis": "^0.1.0", "@tanstack/react-router": "^1.132.31", "@tanstack/router-plugin": "^1.132.31", "@types/node": "^24.8.0", @@ -69,6 +68,7 @@ "@vitest/coverage-istanbul": "^4.0.1", "@vitest/eslint-plugin": "^1.3.4", "clsx": "^2.1.1", + "ecij": "^0.1.1", "eslint": "^9.36.0", "eslint-plugin-jest-dom": "^5.5.0", "eslint-plugin-react": "^7.37.5", diff --git a/rolldown.config.ts b/rolldown.config.ts index d54371abd2..d3080f556b 100644 --- a/rolldown.config.ts +++ b/rolldown.config.ts @@ -1,5 +1,5 @@ import { isAbsolute } from 'node:path'; -import { ecis } from '@nstep/ecis/plugin'; +import { ecij } from 'ecij/plugin'; import { defineConfig } from 'rolldown'; import { dts } from 'rolldown-plugin-dts'; @@ -16,7 +16,7 @@ export default defineConfig({ platform: 'browser', external: (id) => !id.startsWith('.') && !isAbsolute(id), plugins: [ - ecis({ + ecij({ // We add the package version as prefix to avoid style conflicts // between multiple versions of RDG on the same page classPrefix: `rdg-${pkg.version.replaceAll('.', '-')}-` diff --git a/src/Cell.tsx b/src/Cell.tsx index de69477593..253d4bbd1a 100644 --- a/src/Cell.tsx +++ b/src/Cell.tsx @@ -1,5 +1,5 @@ import { memo, type MouseEvent } from 'react'; -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import { useRovingTabIndex } from './hooks'; import { createCellEvent, getCellClassname, getCellStyle, isCellEditableUtil } from './utils'; diff --git a/src/EditCell.tsx b/src/EditCell.tsx index 1c5cdaca19..c497929a44 100644 --- a/src/EditCell.tsx +++ b/src/EditCell.tsx @@ -1,5 +1,5 @@ import { useEffectEvent, useLayoutEffect, useRef } from 'react'; -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import { createCellEvent, getCellClassname, getCellStyle, onEditorNavigation } from './utils'; import type { diff --git a/src/GroupRow.tsx b/src/GroupRow.tsx index f5580098a4..abc356682e 100644 --- a/src/GroupRow.tsx +++ b/src/GroupRow.tsx @@ -1,5 +1,5 @@ import { memo, useMemo } from 'react'; -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import { RowSelectionContext, type RowSelectionContextValue } from './hooks'; import { classnames, getRowStyle } from './utils'; diff --git a/src/HeaderCell.tsx b/src/HeaderCell.tsx index fbef396c58..8da9ed3e90 100644 --- a/src/HeaderCell.tsx +++ b/src/HeaderCell.tsx @@ -1,6 +1,6 @@ import { useRef, useState } from 'react'; import { flushSync } from 'react-dom'; -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import { useRovingTabIndex } from './hooks'; import { diff --git a/src/HeaderRow.tsx b/src/HeaderRow.tsx index 7dcf6895ed..dea30c9fe9 100644 --- a/src/HeaderRow.tsx +++ b/src/HeaderRow.tsx @@ -1,5 +1,5 @@ import { memo, useState } from 'react'; -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import { classnames, getColSpan } from './utils'; import type { CalculatedColumn, Direction, Maybe, Position, ResizedWidth } from './types'; diff --git a/src/SummaryCell.tsx b/src/SummaryCell.tsx index ec2918d0c7..cb1e5fdab3 100644 --- a/src/SummaryCell.tsx +++ b/src/SummaryCell.tsx @@ -1,5 +1,5 @@ import { memo } from 'react'; -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import { useRovingTabIndex } from './hooks'; import { getCellClassname, getCellStyle } from './utils'; diff --git a/src/SummaryRow.tsx b/src/SummaryRow.tsx index fda27962fa..3e66c2c41b 100644 --- a/src/SummaryRow.tsx +++ b/src/SummaryRow.tsx @@ -1,5 +1,5 @@ import { memo } from 'react'; -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import { classnames, getColSpan, getRowStyle } from './utils'; import type { RenderRowProps } from './types'; diff --git a/src/cellRenderers/renderCheckbox.tsx b/src/cellRenderers/renderCheckbox.tsx index 1c5aa4a2f7..9920c08157 100644 --- a/src/cellRenderers/renderCheckbox.tsx +++ b/src/cellRenderers/renderCheckbox.tsx @@ -1,4 +1,4 @@ -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import type { RenderCheckboxProps } from '../types'; diff --git a/src/cellRenderers/renderToggleGroup.tsx b/src/cellRenderers/renderToggleGroup.tsx index d4ccd3bfb0..ba7884dd7e 100644 --- a/src/cellRenderers/renderToggleGroup.tsx +++ b/src/cellRenderers/renderToggleGroup.tsx @@ -1,4 +1,4 @@ -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import type { RenderGroupCellProps } from '../types'; diff --git a/src/editors/renderTextEditor.tsx b/src/editors/renderTextEditor.tsx index 7b5ab6d71f..47ccb36c0b 100644 --- a/src/editors/renderTextEditor.tsx +++ b/src/editors/renderTextEditor.tsx @@ -1,4 +1,4 @@ -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import type { RenderEditCellProps } from '../types'; diff --git a/src/renderHeaderCell.tsx b/src/renderHeaderCell.tsx index a1eb6fe106..eb14ee48f4 100644 --- a/src/renderHeaderCell.tsx +++ b/src/renderHeaderCell.tsx @@ -1,4 +1,4 @@ -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import type { RenderHeaderCellProps } from './types'; import { useDefaultRenderers } from './DataGridDefaultRenderersContext'; diff --git a/src/sortStatus.tsx b/src/sortStatus.tsx index 8d132a3277..752f22f576 100644 --- a/src/sortStatus.tsx +++ b/src/sortStatus.tsx @@ -1,4 +1,4 @@ -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import type { RenderSortIconProps, RenderSortPriorityProps, RenderSortStatusProps } from './types'; diff --git a/src/style/cell.ts b/src/style/cell.ts index 7cdfd05a19..207d468f56 100644 --- a/src/style/cell.ts +++ b/src/style/cell.ts @@ -1,4 +1,4 @@ -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; export const cell = css` @layer rdg.Cell { diff --git a/src/style/core.ts b/src/style/core.ts index 86f2eb68e9..142d4b1a4e 100644 --- a/src/style/core.ts +++ b/src/style/core.ts @@ -1,4 +1,4 @@ -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import { cell } from './cell'; import { bottomSummaryRowClassname, row, topSummaryRowClassname } from './row'; diff --git a/src/style/row.ts b/src/style/row.ts index 20bf65e0b5..7c7a2687b4 100644 --- a/src/style/row.ts +++ b/src/style/row.ts @@ -1,4 +1,4 @@ -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; export const row = css` @layer rdg.Row { diff --git a/src/utils/renderMeasuringCells.tsx b/src/utils/renderMeasuringCells.tsx index d4bc6b4627..e26a0807f5 100644 --- a/src/utils/renderMeasuringCells.tsx +++ b/src/utils/renderMeasuringCells.tsx @@ -1,4 +1,4 @@ -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import type { CalculatedColumn } from '../types'; diff --git a/test/browser/utils.tsx b/test/browser/utils.tsx index 7aea870d65..442cb906ac 100644 --- a/test/browser/utils.tsx +++ b/test/browser/utils.tsx @@ -1,5 +1,5 @@ +import { css } from 'ecij'; import { page, userEvent, type Locator } from 'vitest/browser'; -import { css } from '@nstep/ecis'; import { DataGrid } from '../../src'; import type { DataGridProps } from '../../src'; diff --git a/vite.config.ts b/vite.config.ts index c67d962023..fe5cffe731 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,7 +1,7 @@ -import { ecis } from '@nstep/ecis/plugin'; import { tanstackRouter } from '@tanstack/router-plugin/vite'; import react from '@vitejs/plugin-react'; import { playwright } from '@vitest/browser-playwright'; +import { ecij } from 'ecij/plugin'; import { defineConfig, type ViteUserConfig } from 'vitest/config'; import type { BrowserCommand } from 'vitest/node'; @@ -76,7 +76,7 @@ export default defineConfig( cssMinify: 'esbuild' }, plugins: [ - ecis(), + ecij(), (!isTest || isPreview) && tanstackRouter({ target: 'react', diff --git a/website/Nav.tsx b/website/Nav.tsx index 7ec73b5961..b1ad6508a8 100644 --- a/website/Nav.tsx +++ b/website/Nav.tsx @@ -1,6 +1,6 @@ import { useId, useState } from 'react'; import { Link } from '@tanstack/react-router'; -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import type { Direction } from '../src/types'; import { startViewTransition } from './utils'; diff --git a/website/components/CellExpanderFormatter.tsx b/website/components/CellExpanderFormatter.tsx index cb5cf5dd99..7d27dddfcf 100644 --- a/website/components/CellExpanderFormatter.tsx +++ b/website/components/CellExpanderFormatter.tsx @@ -1,4 +1,4 @@ -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; const cellExpandClassname = css` block-size: 100%; diff --git a/website/components/ChildRowDeleteButton.tsx b/website/components/ChildRowDeleteButton.tsx index 8935deb224..69dc6e548f 100644 --- a/website/components/ChildRowDeleteButton.tsx +++ b/website/components/ChildRowDeleteButton.tsx @@ -1,4 +1,4 @@ -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; const childRowActionCrossClassname = css` block-size: 100%; diff --git a/website/components/DraggableCellRenderer.tsx b/website/components/DraggableCellRenderer.tsx index b29686ec9e..80f68a735d 100644 --- a/website/components/DraggableCellRenderer.tsx +++ b/website/components/DraggableCellRenderer.tsx @@ -1,5 +1,5 @@ import { useState } from 'react'; -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import clsx from 'clsx'; import { Cell, type CellRendererProps } from '../../src'; diff --git a/website/routes/AllFeatures.tsx b/website/routes/AllFeatures.tsx index 565b0643ca..a603269e59 100644 --- a/website/routes/AllFeatures.tsx +++ b/website/routes/AllFeatures.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; import { faker } from '@faker-js/faker'; -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import clsx from 'clsx'; import { DataGrid, renderTextEditor, SelectColumn } from '../../src'; diff --git a/website/routes/Animation.tsx b/website/routes/Animation.tsx index 9fcdc8b019..7532f160fa 100644 --- a/website/routes/Animation.tsx +++ b/website/routes/Animation.tsx @@ -1,5 +1,5 @@ import { useState } from 'react'; -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import { DataGrid, type Column } from '../../src'; import { useDirection } from '../directionContext'; diff --git a/website/routes/ColumnSpanning.tsx b/website/routes/ColumnSpanning.tsx index be6c4391c6..35339790b2 100644 --- a/website/routes/ColumnSpanning.tsx +++ b/website/routes/ColumnSpanning.tsx @@ -1,4 +1,4 @@ -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import { DataGrid, type Column } from '../../src'; import { renderCoordinates } from '../renderers'; diff --git a/website/routes/CommonFeatures.tsx b/website/routes/CommonFeatures.tsx index a9d33ec831..0d934a526c 100644 --- a/website/routes/CommonFeatures.tsx +++ b/website/routes/CommonFeatures.tsx @@ -1,7 +1,7 @@ import { useMemo, useRef, useState } from 'react'; import { createPortal, flushSync } from 'react-dom'; import { faker } from '@faker-js/faker'; -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import { DataGrid, diff --git a/website/routes/ContextMenu.tsx b/website/routes/ContextMenu.tsx index 0b78afca1d..58655488e1 100644 --- a/website/routes/ContextMenu.tsx +++ b/website/routes/ContextMenu.tsx @@ -1,7 +1,7 @@ import { useLayoutEffect, useReducer, useRef, useState } from 'react'; import { createPortal } from 'react-dom'; import { faker } from '@faker-js/faker'; -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import { DataGrid, type Column } from '../../src'; import { useDirection } from '../directionContext'; diff --git a/website/routes/CustomizableRenderers.tsx b/website/routes/CustomizableRenderers.tsx index 27521b90a3..ec4a2aa47d 100644 --- a/website/routes/CustomizableRenderers.tsx +++ b/website/routes/CustomizableRenderers.tsx @@ -1,5 +1,5 @@ import { useMemo, useState } from 'react'; -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import { Row as BaseRow, Cell, DataGrid, renderTextEditor, SelectColumn } from '../../src'; import type { diff --git a/website/routes/HeaderFilters.tsx b/website/routes/HeaderFilters.tsx index 4c1bd64d5e..f4b26fd95b 100644 --- a/website/routes/HeaderFilters.tsx +++ b/website/routes/HeaderFilters.tsx @@ -1,6 +1,6 @@ import { createContext, useContext, useMemo, useState } from 'react'; import { faker } from '@faker-js/faker'; -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import { DataGrid, type Column, type RenderHeaderCellProps } from '../../src'; import type { Omit } from '../../src/types'; diff --git a/website/routes/InfiniteScrolling.tsx b/website/routes/InfiniteScrolling.tsx index 00fe7cdf6e..2b7ec28646 100644 --- a/website/routes/InfiniteScrolling.tsx +++ b/website/routes/InfiniteScrolling.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; import { faker } from '@faker-js/faker'; -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import { DataGrid, type Column } from '../../src'; import { useDirection } from '../directionContext'; diff --git a/website/routes/MasterDetail.tsx b/website/routes/MasterDetail.tsx index c845bdc1d9..b5d41d0945 100644 --- a/website/routes/MasterDetail.tsx +++ b/website/routes/MasterDetail.tsx @@ -1,6 +1,6 @@ import { useMemo, useState } from 'react'; import { faker } from '@faker-js/faker'; -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import { DataGrid, type Column, type Direction, type RowsChangeData } from '../../src'; import { CellExpanderFormatter } from '../components'; diff --git a/website/routes/NoRows.tsx b/website/routes/NoRows.tsx index 337dfc9377..ccc9c3c61c 100644 --- a/website/routes/NoRows.tsx +++ b/website/routes/NoRows.tsx @@ -1,5 +1,5 @@ import { useState } from 'react'; -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import { DataGrid, SelectColumn, type Column } from '../../src'; import { useDirection } from '../directionContext'; diff --git a/website/routes/RowGrouping.tsx b/website/routes/RowGrouping.tsx index da18bf7d52..d260902718 100644 --- a/website/routes/RowGrouping.tsx +++ b/website/routes/RowGrouping.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; import { faker } from '@faker-js/faker'; -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import { SelectColumn, TreeDataGrid, type Column } from '../../src'; import { useDirection } from '../directionContext'; diff --git a/website/routes/ScrollToCell.tsx b/website/routes/ScrollToCell.tsx index a0d1afad3c..b442f37333 100644 --- a/website/routes/ScrollToCell.tsx +++ b/website/routes/ScrollToCell.tsx @@ -1,5 +1,5 @@ import { useRef, useState } from 'react'; -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import clsx from 'clsx'; import { DataGrid, type Column, type DataGridHandle } from '../../src'; diff --git a/website/routes/TreeView.tsx b/website/routes/TreeView.tsx index f27fd236c2..47fd20fa4d 100644 --- a/website/routes/TreeView.tsx +++ b/website/routes/TreeView.tsx @@ -1,5 +1,5 @@ import { useMemo, useReducer, useState } from 'react'; -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import { DataGrid, type Column } from '../../src'; import { CellExpanderFormatter, ChildRowDeleteButton } from '../components'; diff --git a/website/routes/__root.tsx b/website/routes/__root.tsx index 1bac4f224b..892d74f21b 100644 --- a/website/routes/__root.tsx +++ b/website/routes/__root.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; import { createRootRoute, Outlet } from '@tanstack/react-router'; -import { css } from '@nstep/ecis'; +import { css } from 'ecij'; import type { Direction } from '../../src/types'; import { DirectionContext } from '../directionContext'; From cf00be29f9c748a608a4d171f58be05e4acae57b Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sat, 15 Nov 2025 01:18:48 +0000 Subject: [PATCH 3/3] format --- test/browser/utils.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/browser/utils.tsx b/test/browser/utils.tsx index 442cb906ac..46e5dd7aa3 100644 --- a/test/browser/utils.tsx +++ b/test/browser/utils.tsx @@ -1,5 +1,5 @@ -import { css } from 'ecij'; import { page, userEvent, type Locator } from 'vitest/browser'; +import { css } from 'ecij'; import { DataGrid } from '../../src'; import type { DataGridProps } from '../../src';