Merge pull request #66 from microsoft/task/turbo

Use Turborepo
This commit is contained in:
Chris Trevino 2022-05-23 14:24:30 -07:00 коммит произвёл GitHub
Родитель 90e407bbb7 41a6cb72be
Коммит 5304d82df8
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
47 изменённых файлов: 2070 добавлений и 823 удалений

Просмотреть файл

@ -10,13 +10,5 @@
"@typescript-eslint/no-unsafe-argument": 0, "@typescript-eslint/no-unsafe-argument": 0,
"@typescript-eslint/no-unsafe-assignment": 0, "@typescript-eslint/no-unsafe-assignment": 0,
"@typescript-eslint/no-unsafe-return": 0 "@typescript-eslint/no-unsafe-return": 0
}, }
"overrides": [
{
"files": ["packages/webapp/**"],
"rules": {
"import/extensions": "off"
}
}
]
} }

1
.gitignore поставляемый
Просмотреть файл

@ -6,6 +6,7 @@ packages/*/lib/
packages/*/dist/ packages/*/dist/
packages/*/build/ packages/*/build/
packages/*/docsTemp/ packages/*/docsTemp/
packages/*/.turbo/
# testing # testing
/coverage /coverage

8
.yarn/versions/14e34997.yml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,8 @@
declined:
- "@thematic/color"
- "@thematic/core"
- "@thematic/d3"
- "@thematic/fluent"
- "@thematic/react"
- "@thematic/vega"
- "@thematic/webapp"

Просмотреть файл

@ -5,19 +5,14 @@
"scripts": { "scripts": {
"preinstall": "npx only-allow yarn", "preinstall": "npx only-allow yarn",
"postinstall": "husky install", "postinstall": "husky install",
"clean": "yarn workspaces foreach -pv run clean", "clean": "turbo run clean",
"bundle": "yarn workspaces foreach -pv run bundle", "build": "turbo run build",
"build": "yarn workspaces foreach -pivt run build", "bundle": "turbo run bundle",
"start": "yarn workspaces foreach -piv run start", "lint": "turbo run lint",
"publish": "yarn workspaces foreach --exclude '@thematic/root' -pv npm publish --tolerate-republish --access public", "test": "turbo run test",
"version": "yarn workspaces foreach --exclude '@thematic/root' -iv version -d", "publish": "turbo run release",
"lint": "essex lint --fix --strict",
"prettify": "essex prettify", "prettify": "essex prettify",
"test": "yarn jest", "ci": "turbo run ci && essex git-is-clean",
"jest": "NODE_OPTIONS=--experimental-vm-modules yarn node $(yarn bin jest) --runInBand",
"jest_coverage": "yarn jest --coverage",
"git-is-clean": "essex git-is-clean",
"ci": "run-s lint build bundle jest_coverage git-is-clean",
"release": "run-s clean build publish" "release": "run-s clean build publish"
}, },
"workspaces": { "workspaces": {
@ -26,12 +21,12 @@
] ]
}, },
"devDependencies": { "devDependencies": {
"@essex/eslint-config": "^20.3.4", "@essex/eslint-config": "^20.3.5",
"@essex/jest-config": "^21.0.10", "@essex/jest-config": "^21.0.11",
"@essex/prettier-config": "^18.0.2", "@essex/prettier-config": "^18.0.2",
"@essex/scripts": "^22.0.1", "@essex/scripts": "^22.0.3",
"@types/jest": "^27.5.0", "@types/jest": "^27.5.1",
"@types/node": "^17.0.31", "@types/node": "^17.0.35",
"eslint": "^8.14.0", "eslint": "^8.14.0",
"husky": "^7.0.4", "husky": "^7.0.4",
"jest": "^28.0.3", "jest": "^28.0.3",
@ -40,6 +35,7 @@
"react": "^18.1.0", "react": "^18.1.0",
"react-dom": "^18.1.0", "react-dom": "^18.1.0",
"regenerator-runtime": "^0.13.9", "regenerator-runtime": "^0.13.9",
"turbo": "^1.2.11",
"typescript": "^4.6.4" "typescript": "^4.6.4"
}, },
"prettier": "@essex/prettier-config", "prettier": "@essex/prettier-config",

14
packages/color/.eslintrc Normal file
Просмотреть файл

@ -0,0 +1,14 @@
{
"extends": "@essex/eslint-config",
"rules": {
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-non-null-assertion": 0,
// TODO: re-neable
"@typescript-eslint/no-unsafe-call": 0,
"@typescript-eslint/no-unsafe-member-access": 0,
"@typescript-eslint/no-unsafe-argument": 0,
"@typescript-eslint/no-unsafe-assignment": 0,
"@typescript-eslint/no-unsafe-return": 0
}
}

Просмотреть файл

@ -0,0 +1,7 @@
/*!
* Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project.
*/
import { configure } from '@essex/jest-config'
const configuration = configure()
export default configuration

Просмотреть файл

@ -16,7 +16,9 @@
}, },
"scripts": { "scripts": {
"clean": "essex clean", "clean": "essex clean",
"build": "essex build --docs" "build": "essex build --docs",
"release": "yarn npm publish --tolerate-republish --access public",
"lint": "essex lint --fix"
}, },
"dependencies": { "dependencies": {
"chroma-js": "^2.4.2", "chroma-js": "^2.4.2",
@ -24,11 +26,13 @@
"hsluv": "^0.1.0" "hsluv": "^0.1.0"
}, },
"devDependencies": { "devDependencies": {
"@essex/scripts": "^22.0.1", "@essex/eslint-config": "^20.3.5",
"@essex/jest-config": "^21.0.11",
"@essex/scripts": "^22.0.3",
"@essex/tsconfig-base": "^1.0.2", "@essex/tsconfig-base": "^1.0.2",
"@types/chroma-js": "^2.1.3", "@types/chroma-js": "^2.1.3",
"@types/jest": "^27.5.0", "@types/jest": "^27.5.1",
"@types/node": "^17.0.31" "@types/node": "^17.0.35"
}, },
"peerDependencies": { "peerDependencies": {
"@types/chroma-js": "*", "@types/chroma-js": "*",

14
packages/core/.eslintrc Normal file
Просмотреть файл

@ -0,0 +1,14 @@
{
"extends": "@essex/eslint-config",
"rules": {
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-non-null-assertion": 0,
// TODO: re-neable
"@typescript-eslint/no-unsafe-call": 0,
"@typescript-eslint/no-unsafe-member-access": 0,
"@typescript-eslint/no-unsafe-argument": 0,
"@typescript-eslint/no-unsafe-assignment": 0,
"@typescript-eslint/no-unsafe-return": 0
}
}

Просмотреть файл

@ -0,0 +1,7 @@
/*!
* Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project.
*/
import { configure } from '@essex/jest-config'
const configuration = configure()
export default configuration

Просмотреть файл

@ -16,7 +16,10 @@
}, },
"scripts": { "scripts": {
"clean": "essex clean", "clean": "essex clean",
"build": "essex build --skipExportCheck --docs" "build": "essex build --skipExportCheck --docs",
"release": "yarn npm publish --tolerate-republish --access public",
"test": "NODE_OPTIONS=--experimental-vm-modules yarn node $(yarn bin jest) --runInBand",
"lint": "essex lint --fix"
}, },
"dependencies": { "dependencies": {
"@thematic/color": "workspace:^", "@thematic/color": "workspace:^",
@ -25,13 +28,16 @@
"murmurhash-js": "^1.0.0" "murmurhash-js": "^1.0.0"
}, },
"devDependencies": { "devDependencies": {
"@essex/scripts": "^22.0.1", "@essex/eslint-config": "^20.3.5",
"@essex/jest-config": "^21.0.11",
"@essex/scripts": "^22.0.3",
"@essex/tsconfig-base": "^1.0.2", "@essex/tsconfig-base": "^1.0.2",
"@types/d3-scale": "^4.0.2", "@types/d3-scale": "^4.0.2",
"@types/jest": "^27.5.0", "@types/jest": "^27.5.1",
"@types/lodash-es": "^4.17.6", "@types/lodash-es": "^4.17.6",
"@types/murmurhash-js": "^1.0.3", "@types/murmurhash-js": "^1.0.3",
"@types/node": "^17.0.31", "@types/node": "^17.0.35",
"jest": "^28.1.0",
"npm-run-all": "^4.1.5" "npm-run-all": "^4.1.5"
}, },
"peerDependencies": { "peerDependencies": {

14
packages/d3/.eslintrc Normal file
Просмотреть файл

@ -0,0 +1,14 @@
{
"extends": "@essex/eslint-config",
"rules": {
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-non-null-assertion": 0,
// TODO: re-neable
"@typescript-eslint/no-unsafe-call": 0,
"@typescript-eslint/no-unsafe-member-access": 0,
"@typescript-eslint/no-unsafe-argument": 0,
"@typescript-eslint/no-unsafe-assignment": 0,
"@typescript-eslint/no-unsafe-return": 0
}
}

Просмотреть файл

@ -16,7 +16,9 @@
}, },
"scripts": { "scripts": {
"clean": "essex clean", "clean": "essex clean",
"build": "essex build --skipExportCheck --docs" "build": "essex build --skipExportCheck --docs",
"release": "yarn npm publish --tolerate-republish --access public",
"lint": "essex lint --fix"
}, },
"dependencies": { "dependencies": {
"@thematic/core": "workspace:^", "@thematic/core": "workspace:^",
@ -24,11 +26,12 @@
"d3-selection": "^3.0.0" "d3-selection": "^3.0.0"
}, },
"devDependencies": { "devDependencies": {
"@essex/scripts": "^22.0.1", "@essex/eslint-config": "^20.3.5",
"@essex/scripts": "^22.0.3",
"@essex/tsconfig-base": "^1.0.2", "@essex/tsconfig-base": "^1.0.2",
"@types/d3-axis": "^3.0.1", "@types/d3-axis": "^3.0.1",
"@types/d3-selection": "^3.0.2", "@types/d3-selection": "^3.0.2",
"@types/node": "^17.0.31" "@types/node": "^17.0.35"
}, },
"peerDependencies": { "peerDependencies": {
"@types/d3-axis": ">= 1", "@types/d3-axis": ">= 1",

14
packages/fluent/.eslintrc Normal file
Просмотреть файл

@ -0,0 +1,14 @@
{
"extends": "@essex/eslint-config",
"rules": {
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-non-null-assertion": 0,
// TODO: re-neable
"@typescript-eslint/no-unsafe-call": 0,
"@typescript-eslint/no-unsafe-member-access": 0,
"@typescript-eslint/no-unsafe-argument": 0,
"@typescript-eslint/no-unsafe-assignment": 0,
"@typescript-eslint/no-unsafe-return": 0
}
}

Просмотреть файл

@ -0,0 +1,7 @@
/*!
* Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project.
*/
import { configure } from '@essex/jest-config'
const configuration = configure()
export default configuration

Просмотреть файл

@ -16,7 +16,10 @@
}, },
"scripts": { "scripts": {
"clean": "essex clean", "clean": "essex clean",
"build": "essex build --skipExportCheck --docs" "build": "essex build --skipExportCheck --docs",
"release": "yarn npm publish --tolerate-republish --access public",
"test": "NODE_OPTIONS=--experimental-vm-modules yarn node $(yarn bin jest) --runInBand",
"lint": "essex lint --fix"
}, },
"dependencies": { "dependencies": {
"@thematic/color": "workspace:^", "@thematic/color": "workspace:^",
@ -25,15 +28,18 @@
"d3-scale": "^4.0.2" "d3-scale": "^4.0.2"
}, },
"devDependencies": { "devDependencies": {
"@essex/scripts": "^22.0.1", "@essex/eslint-config": "^20.3.5",
"@essex/jest-config": "^21.0.11",
"@essex/scripts": "^22.0.3",
"@essex/tsconfig-base": "^1.0.2", "@essex/tsconfig-base": "^1.0.2",
"@fluentui/font-icons-mdl2": "^8.3.2", "@fluentui/font-icons-mdl2": "^8.4.0",
"@fluentui/react": "^8.67.2", "@fluentui/react": "^8.68.4",
"@types/chroma-js": "^2.1.3", "@types/chroma-js": "^2.1.3",
"@types/d3-scale": "^4.0.2", "@types/d3-scale": "^4.0.2",
"@types/node": "^17.0.31", "@types/node": "^17.0.35",
"@types/react": "^18.0.8", "@types/react": "^18.0.9",
"chroma-js": "^2.4.2", "chroma-js": "^2.4.2",
"jest": "^28.1.0",
"react": "^18.1.0" "react": "^18.1.0"
}, },
"peerDependencies": { "peerDependencies": {

14
packages/react/.eslintrc Normal file
Просмотреть файл

@ -0,0 +1,14 @@
{
"extends": "@essex/eslint-config",
"rules": {
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-non-null-assertion": 0,
// TODO: re-neable
"@typescript-eslint/no-unsafe-call": 0,
"@typescript-eslint/no-unsafe-member-access": 0,
"@typescript-eslint/no-unsafe-argument": 0,
"@typescript-eslint/no-unsafe-assignment": 0,
"@typescript-eslint/no-unsafe-return": 0
}
}

Просмотреть файл

@ -16,17 +16,20 @@
}, },
"scripts": { "scripts": {
"clean": "essex clean", "clean": "essex clean",
"build": "essex build --skipExportCheck --docs" "build": "essex build --skipExportCheck --docs",
"release": "yarn npm publish --tolerate-republish --access public",
"lint": "essex lint --fix"
}, },
"dependencies": { "dependencies": {
"@thematic/color": "workspace:^", "@thematic/color": "workspace:^",
"@thematic/core": "workspace:^" "@thematic/core": "workspace:^"
}, },
"devDependencies": { "devDependencies": {
"@essex/scripts": "^22.0.1", "@essex/eslint-config": "^20.3.5",
"@essex/scripts": "^22.0.3",
"@essex/tsconfig-base": "^1.0.2", "@essex/tsconfig-base": "^1.0.2",
"@types/node": "^17.0.31", "@types/node": "^17.0.35",
"@types/react": "^18.0.8", "@types/react": "^18.0.9",
"react": "^18.1.0" "react": "^18.1.0"
}, },
"peerDependencies": { "peerDependencies": {

14
packages/vega/.eslintrc Normal file
Просмотреть файл

@ -0,0 +1,14 @@
{
"extends": "@essex/eslint-config",
"rules": {
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-non-null-assertion": 0,
// TODO: re-neable
"@typescript-eslint/no-unsafe-call": 0,
"@typescript-eslint/no-unsafe-member-access": 0,
"@typescript-eslint/no-unsafe-argument": 0,
"@typescript-eslint/no-unsafe-assignment": 0,
"@typescript-eslint/no-unsafe-return": 0
}
}

Просмотреть файл

@ -0,0 +1,7 @@
/*!
* Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project.
*/
import { configure } from '@essex/jest-config'
const configuration = configure()
export default configuration

Просмотреть файл

@ -16,15 +16,21 @@
}, },
"scripts": { "scripts": {
"clean": "essex clean", "clean": "essex clean",
"build": "essex build --skipExportCheck --docs" "build": "essex build --skipExportCheck --docs",
"release": "yarn npm publish --tolerate-republish --access public",
"test": "NODE_OPTIONS=--experimental-vm-modules yarn node $(yarn bin jest) --runInBand",
"lint": "essex lint --fix"
}, },
"dependencies": { "dependencies": {
"@thematic/core": "workspace:^" "@thematic/core": "workspace:^"
}, },
"devDependencies": { "devDependencies": {
"@essex/scripts": "^22.0.1", "@essex/eslint-config": "^20.3.5",
"@essex/jest-config": "^21.0.11",
"@essex/scripts": "^22.0.3",
"@essex/tsconfig-base": "^1.0.2", "@essex/tsconfig-base": "^1.0.2",
"@types/node": "^17.0.31", "@types/node": "^17.0.35",
"jest": "^28.1.0",
"vega": "4.4.0" "vega": "4.4.0"
}, },
"peerDependencies": { "peerDependencies": {

27
packages/webapp/.eslintrc Normal file
Просмотреть файл

@ -0,0 +1,27 @@
{
"extends": "@essex/eslint-config",
"rules": {
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-non-null-assertion": 0,
// TODO: re-neable
"@typescript-eslint/no-unsafe-call": 0,
"@typescript-eslint/no-unsafe-member-access": 0,
"@typescript-eslint/no-unsafe-argument": 0,
"@typescript-eslint/no-unsafe-assignment": 0,
"@typescript-eslint/no-unsafe-return": 0,
"@essex/extensions": [
"error",
[
{
"files": ["**/*.{ts,tsx,mts,js,jsx,mjs}"],
"ignorePackages": true,
"relativeModulePrefixes": ["./"],
"expectedExtensions": [".js", ".css", ".json"],
"disallowedExtensions": []
}
]
]
}
}

Просмотреть файл

@ -9,7 +9,8 @@
"clean": "essex clean", "clean": "essex clean",
"build": "tsc -b . && essex bundle", "build": "tsc -b . && essex bundle",
"start": "essex serve", "start": "essex serve",
"start:webapp": "yarn start" "start:webapp": "yarn start",
"lint": "essex lint --fix"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@ -17,8 +18,8 @@
"directory": "packages/webapp" "directory": "packages/webapp"
}, },
"dependencies": { "dependencies": {
"@fluentui/font-icons-mdl2": "^8.3.2", "@fluentui/font-icons-mdl2": "^8.4.0",
"@fluentui/react": "^8.67.2", "@fluentui/react": "^8.68.4",
"@thematic/color": "workspace:^", "@thematic/color": "workspace:^",
"@thematic/core": "workspace:^", "@thematic/core": "workspace:^",
"@thematic/d3": "workspace:^", "@thematic/d3": "workspace:^",
@ -34,15 +35,16 @@
"vega": "4.4.0" "vega": "4.4.0"
}, },
"devDependencies": { "devDependencies": {
"@essex/scripts": "^22.0.1", "@essex/eslint-config": "^20.3.5",
"@essex/scripts": "^22.0.3",
"@essex/tsconfig-base": "^1.0.2", "@essex/tsconfig-base": "^1.0.2",
"@essex/webpack-config": "^21.0.2", "@essex/webpack-config": "^21.0.3",
"@types/d3-axis": "^3.0.1", "@types/d3-axis": "^3.0.1",
"@types/d3-scale": "^4.0.2", "@types/d3-scale": "^4.0.2",
"@types/d3-selection": "^3.0.2", "@types/d3-selection": "^3.0.2",
"@types/node": "^17.0.31", "@types/node": "^17.0.35",
"@types/react": "^18.0.8", "@types/react": "^18.0.9",
"@types/react-dom": "^18.0.3", "@types/react-dom": "^18.0.5",
"typescript": "^4.6.4" "typescript": "^4.6.4"
}, },
"browserslist": [ "browserslist": [

Просмотреть файл

@ -5,7 +5,7 @@
import type { FC } from 'react' import type { FC } from 'react'
import { MainPage } from '../pages/MainPage/index.js' import { MainPage } from '../pages/MainPage/index.js'
import { DataContext } from './DataContext' import { DataContext } from './DataContext.js'
import { StyleContext } from './StyleContext.js' import { StyleContext } from './StyleContext.js'
export const App: FC = () => { export const App: FC = () => {

Просмотреть файл

@ -7,7 +7,7 @@ import { ApplicationStyles } from '@thematic/react'
import type { FC, ReactNode } from 'react' import type { FC, ReactNode } from 'react'
import { memo } from 'react' import { memo } from 'react'
import { useTheme } from '../state' import { useTheme } from '../state/index.js'
export const StyleContext: FC<{ export const StyleContext: FC<{
children?: ReactNode children?: ReactNode

Просмотреть файл

@ -4,7 +4,7 @@
*/ */
import { createRoot } from 'react-dom/client' import { createRoot } from 'react-dom/client'
import { App } from './App' import { App } from './App/index.js'
function mount(): void { function mount(): void {
try { try {

Просмотреть файл

@ -7,9 +7,10 @@ import './MainPage.css'
import { useThematic } from '@thematic/react' import { useThematic } from '@thematic/react'
import type { FC } from 'react' import type { FC } from 'react'
import { ControlPanel } from './components/ControlPanel/ControlPanel' import { ControlPanel } from './components/ControlPanel/ControlPanel.js'
import { ThemeEditor } from './components/ThemeEditor/ThemeEditor' import { ThemeEditor } from './components/ThemeEditor/ThemeEditor.js'
import { ThemeViewer } from './components/ThemeViewer/ThemeViewer' import { ThemeViewer } from './components/ThemeViewer/ThemeViewer.js'
export const MainPage: FC = () => { export const MainPage: FC = () => {
const theme = useThematic() const theme = useThematic()
return ( return (

Просмотреть файл

@ -12,7 +12,7 @@ import { ColorPickerButton } from '@thematic/fluent'
import type { FC } from 'react' import type { FC } from 'react'
import { useCallback, useMemo } from 'react' import { useCallback, useMemo } from 'react'
import { EnumDropdown } from '../../../../components/EnumDropdown' import { EnumDropdown } from '../../../../components/EnumDropdown.js'
export interface ControlPanelProps { export interface ControlPanelProps {
themes: ThemeListing[] themes: ThemeListing[]

Просмотреть файл

@ -12,8 +12,8 @@ import {
useSetTheme, useSetTheme,
useThemeInfo, useThemeInfo,
useThemes, useThemes,
} from '../../../../state' } from '../../../../state/index.js'
import { ControlPanel as ControlPanelBase } from './ControlPanel.base' import { ControlPanel as ControlPanelBase } from './ControlPanel.base.js'
export const ControlPanel = () => { export const ControlPanel = () => {
const [drawNodes, setDrawNodes] = useDrawNodes() const [drawNodes, setDrawNodes] = useDrawNodes()

Просмотреть файл

@ -8,10 +8,10 @@ import { mark2style, useThematic } from '@thematic/react'
import type { FC } from 'react' import type { FC } from 'react'
import { Fragment, useMemo } from 'react' import { Fragment, useMemo } from 'react'
import { ApplicationPalette } from './ApplicationPalette' import { ApplicationPalette } from './ApplicationPalette.js'
import { ColorBand } from './ColorBand' import { ColorBand } from './ColorBand.js'
import { ColorStrip } from './ColorStrip' import { ColorStrip } from './ColorStrip.js'
import { Contrast } from './Contrast' import { Contrast } from './Contrast.js'
// this is the same number we use under the hood when constructing the continuous scales, // this is the same number we use under the hood when constructing the continuous scales,
// so it makes sense to use here and potentially allow the gradation bands to be visible, // so it makes sense to use here and potentially allow the gradation bands to be visible,

Просмотреть файл

@ -7,14 +7,14 @@ import './ThemeEditor.css'
import { Pivot, PivotItem } from '@fluentui/react' import { Pivot, PivotItem } from '@fluentui/react'
import type { FC } from 'react' import type { FC } from 'react'
import { ColorPicker } from './panes/ColorPickerPane' import { ColorPicker } from './panes/ColorPickerPane/index.js'
import { FluentPane } from './panes/FluentPane' import { FluentPane } from './panes/FluentPane.js'
import { GimpPane } from './panes/GimpPane' import { GimpPane } from './panes/GimpPane.js'
import { JSONPane } from './panes/JSONPane' import { JSONPane } from './panes/JSONPane.js'
import { MarkGrid } from './panes/MarksPane' import { MarkGrid } from './panes/MarksPane/index.js'
import { OfficePane } from './panes/OfficePane' import { OfficePane } from './panes/OfficePane.js'
import { PowerBIPane } from './panes/PowerBIPane' import { PowerBIPane } from './panes/PowerBIPane.js'
import { ThemeColors } from './ThemeColors' import { ThemeColors } from './ThemeColors/index.js'
export interface ThemeEditorProps { export interface ThemeEditorProps {
scaleItemCount: number scaleItemCount: number

Просмотреть файл

@ -2,8 +2,8 @@
* Copyright (c) Microsoft. All rights reserved. * Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project. * Licensed under the MIT license. See LICENSE file in the project.
*/ */
import { useScaleItemCount } from '../../../../state' import { useScaleItemCount } from '../../../../state/index.js'
import { ThemeEditor as ThemeEditorBase } from './ThemeEditor.base' import { ThemeEditor as ThemeEditorBase } from './ThemeEditor.base.js'
export const ThemeEditor = () => { export const ThemeEditor = () => {
const [scaleItemCount] = useScaleItemCount() const [scaleItemCount] = useScaleItemCount()

Просмотреть файл

@ -7,8 +7,8 @@ import './ColorPicker.css'
import type { Theme } from '@thematic/core' import type { Theme } from '@thematic/core'
import type { FC } from 'react' import type { FC } from 'react'
import { useSetTheme } from '../../../../../../state' import { useSetTheme } from '../../../../../../state/index.js'
import { ColorSelection } from './ColorSelection' import { ColorSelection } from './ColorSelection.js'
export interface ColorPickerProps { export interface ColorPickerProps {
themeLoaded: (theme: Theme) => void themeLoaded: (theme: Theme) => void

Просмотреть файл

@ -7,8 +7,8 @@ import { useThematic } from '@thematic/react'
import type { FC } from 'react' import type { FC } from 'react'
import { useMemo } from 'react' import { useMemo } from 'react'
import { DownloadLink } from '../../../../../components/DownloadLink' import { DownloadLink } from '../../../../../components/DownloadLink.js'
import { FluentPalette } from './FluentPalette' import { FluentPalette } from './FluentPalette.js'
/** /**
* This component hosts the Fluent Theme slots in the style of Thematic. * This component hosts the Fluent Theme slots in the style of Thematic.

Просмотреть файл

@ -8,7 +8,7 @@ import { useThematic } from '@thematic/react'
import type { FC } from 'react' import type { FC } from 'react'
import { useMemo } from 'react' import { useMemo } from 'react'
import { DownloadLink } from '../../../../../components/DownloadLink' import { DownloadLink } from '../../../../../components/DownloadLink.js'
// the deep nesting of the component requires several layers of size adjustment // the deep nesting of the component requires several layers of size adjustment
const styles = { const styles = {
root: { root: {

Просмотреть файл

@ -6,9 +6,9 @@ import { useThematic } from '@thematic/react'
import type { FC } from 'react' import type { FC } from 'react'
import { useMemo } from 'react' import { useMemo } from 'react'
import { DownloadLink } from '../../../../../components/DownloadLink' import { DownloadLink } from '../../../../../components/DownloadLink.js'
import { JSONEditor } from '../../../../../components/JSONEditor' import { JSONEditor } from '../../../../../components/JSONEditor.js'
import { useScaleItemCount } from '../../../../../state' import { useScaleItemCount } from '../../../../../state/index.js'
export interface JSONPaneProps { export interface JSONPaneProps {
scaleItemCount?: number scaleItemCount?: number

Просмотреть файл

@ -7,7 +7,13 @@ import { mark2style, useThematic } from '@thematic/react'
import type { CSSProperties, FC } from 'react' import type { CSSProperties, FC } from 'react'
import { useMemo } from 'react' import { useMemo } from 'react'
import { Arc, Circle, Line, Rect, Text } from '../../../../../../components/svg' import {
Arc,
Circle,
Line,
Rect,
Text,
} from '../../../../../../components/svg/index.js'
export interface GridCellProps { export interface GridCellProps {
name: ThemeElementType name: ThemeElementType

Просмотреть файл

@ -10,8 +10,8 @@ import { useThematic } from '@thematic/react'
import type { FC } from 'react' import type { FC } from 'react'
import { useCallback, useMemo, useState } from 'react' import { useCallback, useMemo, useState } from 'react'
import { EnumButtonBar } from '../../../../../../components/EnumButtonBar' import { EnumButtonBar } from '../../../../../../components/EnumButtonBar.js'
import { GridCell } from './GridCell' import { GridCell } from './GridCell.js'
const SIZE = 30 const SIZE = 30

Просмотреть файл

@ -8,8 +8,8 @@ import { useThematic } from '@thematic/react'
import type { FC } from 'react' import type { FC } from 'react'
import { useMemo } from 'react' import { useMemo } from 'react'
import { DownloadLink } from '../../../../../components/DownloadLink' import { DownloadLink } from '../../../../../components/DownloadLink.js'
import { OfficePalette } from './OfficePalette' import { OfficePalette } from './OfficePalette.js'
export const OfficePane: FC = () => { export const OfficePane: FC = () => {
const theme = useThematic() const theme = useThematic()

Просмотреть файл

@ -8,8 +8,8 @@ import { useThematic } from '@thematic/react'
import type { FC } from 'react' import type { FC } from 'react'
import { useMemo } from 'react' import { useMemo } from 'react'
import { DownloadLink } from '../../../../../components/DownloadLink' import { DownloadLink } from '../../../../../components/DownloadLink.js'
import { PowerBIPalette } from './PowerBIPalette' import { PowerBIPalette } from './PowerBIPalette.js'
export const PowerBIPane: FC = () => { export const PowerBIPane: FC = () => {
const theme = useThematic() const theme = useThematic()

Просмотреть файл

@ -15,7 +15,7 @@ import { useThematic } from '@thematic/react'
import type { FC } from 'react' import type { FC } from 'react'
import { useCallback, useMemo, useState } from 'react' import { useCallback, useMemo, useState } from 'react'
import { useSetTheme } from '../../../../../state' import { useSetTheme } from '../../../../../state/index.js'
export interface FluentControlsComponentProps { export interface FluentControlsComponentProps {
themeLoaded: (theme: Theme) => void themeLoaded: (theme: Theme) => void

Просмотреть файл

@ -8,11 +8,11 @@ import { Pivot, PivotItem } from '@fluentui/react'
import type { FC } from 'react' import type { FC } from 'react'
import { useMemo } from 'react' import { useMemo } from 'react'
import type { Graph } from '../../../../types' import type { Graph } from '../../../../types.js'
import { D3Chart } from './charts/D3' import { D3Chart } from './charts/D3/index.js'
import { charts, VegaChart } from './charts/Vega' import { charts, VegaChart } from './charts/Vega/index.js'
import { FluentControls } from './FluentControls' import { FluentControls } from './FluentControls/index.js'
import { D3Graph } from './graphs/D3' import { D3Graph } from './graphs/D3/index.js'
export interface ThemeViewerProps { export interface ThemeViewerProps {
graph: Graph graph: Graph

Просмотреть файл

@ -7,8 +7,8 @@ import {
useDrawLinks, useDrawLinks,
useDrawNodes, useDrawNodes,
useGraph, useGraph,
} from '../../../../state' } from '../../../../state/index.js'
import { ThemeViewer as ThemeViewerBase } from './ThemeViewer.base' import { ThemeViewer as ThemeViewerBase } from './ThemeViewer.base.js'
export const ThemeViewer = () => { export const ThemeViewer = () => {
const [drawNodes] = useDrawNodes() const [drawNodes] = useDrawNodes()

Просмотреть файл

@ -23,8 +23,8 @@ import {
useState, useState,
} from 'react' } from 'react'
import type { Edge, Graph, Node } from '../../../../../../types' import type { Edge, Graph, Node } from '../../../../../../types.js'
import { bounds } from '../../../../../../util/graph' import { bounds } from '../../../../../../util/graph.js'
export interface GraphProps { export interface GraphProps {
graph: Graph graph: Graph

Просмотреть файл

@ -4,8 +4,8 @@
*/ */
import { atom, useRecoilState } from 'recoil' import { atom, useRecoilState } from 'recoil'
import { graph } from '../data' import { graph } from '../data/index.js'
import type { Graph } from '../types' import type { Graph } from '../types.js'
const graphState = atom<Graph>({ const graphState = atom<Graph>({
key: 'graph', key: 'graph',

Просмотреть файл

@ -2,6 +2,6 @@
* Copyright (c) Microsoft. All rights reserved. * Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project. * Licensed under the MIT license. See LICENSE file in the project.
*/ */
export * from './data' export * from './data.js'
export * from './theme' export * from './theme.js'
export * from './ui' export * from './ui.js'

34
turbo.json Normal file
Просмотреть файл

@ -0,0 +1,34 @@
{
"$schema": "https://turborepo.org/schema.json",
"baseBranch": "origin/main",
"pipeline": {
"clean": {
"outputs": ["dist/**", "docsTemp/**"]
},
"build": {
"dependsOn": [],
"outputs": ["dist/**", "docsTemp/**"]
},
"release": {
"outputs": []
},
"test": {
"dependsOn": [],
"outputs": []
},
"lint": {
"dependsOn": [],
"outputs": []
},
"bundle": {
"dependsOn": [],
"outputs": ["dist/**", "build/**"]
},
"ci": {
"dependsOn": ["build", "lint", "test", "bundle"]
},
"dev": {
"cache": false
}
}
}

2464
yarn.lock

Разница между файлами не показана из-за своего большого размера Загрузить разницу