8034c7725f
Reorganizes `twenty-ui`'s component organization to follow how the best
UI libraries (MUI, Mantine, Base UI, Polaris) structure their source,
now that the package has stabilized.
**Taxonomy** — dissolves the meaningless `components/` junk-drawer and
the 107-file `display/` mega-category. New domains/subpaths:
`data-display`, `typography`, `icon`, `surfaces`; `feedback` and
`layout` absorb the rest (banners/callout/info + placeholders →
feedback; modal/card → surfaces; motion + separators → layout).
**Per-component layout** — every component is now
`<domain>/<ComponentName>/<ComponentName>.tsx` with colocated
styles/stories/types, `internal/` for private helpers and `parts/` for
re-exported compound sub-parts. The redundant inner `/components/` is
gone. `icon` and `json-visualizer` are kept as cohesive subsystems.
**Also:** adds a tree-shakeable root barrel (`import { Button } from
'twenty-ui'`), the generator now owns `individual-entry.ts`, and a real
barrel-leak bug is fixed (private `internals/` parts were leaking into
the public API).
Consumer imports (~1.2k files) and the `twenty-sdk` UI aggregator were
updated by codemod. The change is **export-neutral** except 16
intentionally-removed private internals symbols (all verified
unconsumed). Gates green: typecheck, lint, build, size-limit, storybook.
<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/twentyhq/twenty/pull/21745?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
104 lines
3.6 KiB
JSON
104 lines
3.6 KiB
JSON
{
|
|
"name": "twenty-ui",
|
|
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
"sourceRoot": "packages/twenty-ui/src",
|
|
"projectType": "library",
|
|
"tags": ["scope:shared"],
|
|
"targets": {
|
|
"build": {
|
|
"dependsOn": ["^build"],
|
|
"outputs": [
|
|
"{projectRoot}/dist",
|
|
"{projectRoot}/accessibility/package.json",
|
|
"{projectRoot}/accessibility/dist",
|
|
"{projectRoot}/assets/package.json",
|
|
"{projectRoot}/assets/dist",
|
|
"{projectRoot}/data-display/package.json",
|
|
"{projectRoot}/data-display/dist",
|
|
"{projectRoot}/feedback/package.json",
|
|
"{projectRoot}/feedback/dist",
|
|
"{projectRoot}/icon/package.json",
|
|
"{projectRoot}/icon/dist",
|
|
"{projectRoot}/input/package.json",
|
|
"{projectRoot}/input/dist",
|
|
"{projectRoot}/json-visualizer/package.json",
|
|
"{projectRoot}/json-visualizer/dist",
|
|
"{projectRoot}/layout/package.json",
|
|
"{projectRoot}/layout/dist",
|
|
"{projectRoot}/navigation/package.json",
|
|
"{projectRoot}/navigation/dist",
|
|
"{projectRoot}/styles/package.json",
|
|
"{projectRoot}/styles/dist",
|
|
"{projectRoot}/surfaces/package.json",
|
|
"{projectRoot}/surfaces/dist",
|
|
"{projectRoot}/testing/package.json",
|
|
"{projectRoot}/testing/dist",
|
|
"{projectRoot}/theme/package.json",
|
|
"{projectRoot}/theme/dist",
|
|
"{projectRoot}/theme-constants/package.json",
|
|
"{projectRoot}/theme-constants/dist",
|
|
"{projectRoot}/typography/package.json",
|
|
"{projectRoot}/typography/dist",
|
|
"{projectRoot}/utilities/package.json",
|
|
"{projectRoot}/utilities/dist"
|
|
]
|
|
},
|
|
"generateBarrels": {
|
|
"executor": "nx:run-commands",
|
|
"cache": true,
|
|
"inputs": ["production", "{projectRoot}/scripts/generateBarrels.ts"],
|
|
"outputs": [
|
|
"{projectRoot}/src/index.ts",
|
|
"{projectRoot}/src/individual-entry.ts",
|
|
"{projectRoot}/src/**/*/index.ts",
|
|
"{projectRoot}/package.json"
|
|
],
|
|
"options": { "command": "tsx {projectRoot}/scripts/generateBarrels.ts" }
|
|
},
|
|
"build:individual": {
|
|
"executor": "nx:run-commands",
|
|
"cache": true,
|
|
"dependsOn": ["build"],
|
|
"inputs": ["production", "^production"],
|
|
"outputs": ["{projectRoot}/dist/individual"],
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"command": "npx vite build -c vite.config.individual.ts"
|
|
}
|
|
},
|
|
"size": {
|
|
"executor": "nx:run-commands",
|
|
"cache": true,
|
|
"dependsOn": ["build"],
|
|
"inputs": ["{projectRoot}/dist", "{projectRoot}/.size-limit.json"],
|
|
"options": { "cwd": "{projectRoot}", "command": "npx size-limit" },
|
|
"configurations": { "why": { "command": "npx size-limit --why" } }
|
|
},
|
|
"clean": {
|
|
"executor": "nx:run-commands",
|
|
"options": { "command": "rimraf {projectRoot}/dist" }
|
|
},
|
|
"lint": {},
|
|
"fmt": { "options": { "files": "src" }, "configurations": { "fix": {} } },
|
|
"test": {},
|
|
"typecheck": {},
|
|
"storybook:build": { "configurations": { "test": {} } },
|
|
"storybook:serve:dev": { "options": { "port": 6008 } },
|
|
"storybook:serve:static": {
|
|
"options": { "buildTarget": "twenty-ui:storybook:build", "port": 6008 },
|
|
"configurations": { "test": {} }
|
|
},
|
|
"storybook:test": {},
|
|
"storybook:test:no-coverage": {},
|
|
"storybook:visual-diff": {
|
|
"executor": "nx:run-commands",
|
|
"dependsOn": ["storybook:build"],
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"command": "bash scripts/visual-diff.sh"
|
|
}
|
|
},
|
|
"storybook:coverage": {}
|
|
}
|
|
}
|