mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
feat: extract resizing-anchor
Signed-off-by: Gabriel <gaccettola@mirantis.com>
This commit is contained in:
parent
90ac50176a
commit
ec59dab906
56
package-lock.json
generated
56
package-lock.json
generated
@ -3946,6 +3946,10 @@
|
|||||||
"resolved": "packages/release-tool",
|
"resolved": "packages/release-tool",
|
||||||
"link": true
|
"link": true
|
||||||
},
|
},
|
||||||
|
"node_modules/@k8slens/resizing-anchor": {
|
||||||
|
"resolved": "packages/ui-components/resizing-anchor",
|
||||||
|
"link": true
|
||||||
|
},
|
||||||
"node_modules/@k8slens/run-many": {
|
"node_modules/@k8slens/run-many": {
|
||||||
"resolved": "packages/utility-features/run-many",
|
"resolved": "packages/utility-features/run-many",
|
||||||
"link": true
|
"link": true
|
||||||
@ -35060,6 +35064,7 @@
|
|||||||
"@k8slens/messaging": "^1.0.0-alpha.1",
|
"@k8slens/messaging": "^1.0.0-alpha.1",
|
||||||
"@k8slens/messaging-for-main": "^1.0.0-alpha.1",
|
"@k8slens/messaging-for-main": "^1.0.0-alpha.1",
|
||||||
"@k8slens/messaging-for-renderer": "^1.0.0-alpha.1",
|
"@k8slens/messaging-for-renderer": "^1.0.0-alpha.1",
|
||||||
|
"@k8slens/resizing-anchor": "^1.0.0-alpha.0",
|
||||||
"@k8slens/run-many": "^1.0.0-alpha.1",
|
"@k8slens/run-many": "^1.0.0-alpha.1",
|
||||||
"@k8slens/startable-stoppable": "^1.0.0-alpha.1",
|
"@k8slens/startable-stoppable": "^1.0.0-alpha.1",
|
||||||
"@k8slens/test-utils": "^1.0.0-alpha.1",
|
"@k8slens/test-utils": "^1.0.0-alpha.1",
|
||||||
@ -36601,6 +36606,57 @@
|
|||||||
"react-dom": "^17.0.2"
|
"react-dom": "^17.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"packages/ui-components/resizing-anchor": {
|
||||||
|
"name": "@k8slens/resizing-anchor",
|
||||||
|
"version": "1.0.0-alpha.0",
|
||||||
|
"license": "MIT",
|
||||||
|
"devDependencies": {
|
||||||
|
"@async-fn/jest": "^1.6.4",
|
||||||
|
"@k8slens/eslint-config": "6.5.0-alpha.1",
|
||||||
|
"@k8slens/react-testing-library-discovery": "^1.0.0-alpha.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@k8slens/feature-core": "^6.5.0-alpha.0",
|
||||||
|
"@k8slens/utilities": "^1.0.0-alpha.1",
|
||||||
|
"@ogre-tools/fp": "^15.1.2",
|
||||||
|
"@ogre-tools/injectable": "^15.1.2",
|
||||||
|
"@ogre-tools/injectable-extension-for-auto-registration": "^15.1.2",
|
||||||
|
"auto-bind": "^4.0.0",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
|
"mobx": "^6.8.0",
|
||||||
|
"mobx-react": "^7.6.0",
|
||||||
|
"react": "^17.0.2",
|
||||||
|
"react-dom": "^17.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"packages/ui-components/resizing-anchor/node_modules/@k8slens/eslint-config": {
|
||||||
|
"version": "6.5.0-alpha.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@k8slens/eslint-config/-/eslint-config-6.5.0-alpha.1.tgz",
|
||||||
|
"integrity": "sha512-6DdfKe/iafX85GBK/UlKgz29FOIOp/UVS03bFGLyw7Vmm7pauB0FEHTAdbr3g1qG/Zcn6nxhOM3uqQyRY/uEyA==",
|
||||||
|
"dev": true,
|
||||||
|
"bin": {
|
||||||
|
"lens-lint": "bin/lint"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@typescript-eslint/eslint-plugin": ">= 5",
|
||||||
|
"@typescript-eslint/parser": ">= 5",
|
||||||
|
"eslint": ">= 7",
|
||||||
|
"eslint-config-airbnb-typescript": ">= 17",
|
||||||
|
"eslint-config-prettier": ">= 8",
|
||||||
|
"eslint-config-react-app": "^7.0.1",
|
||||||
|
"eslint-plugin-import": ">= 2",
|
||||||
|
"eslint-plugin-jest": ">= 27",
|
||||||
|
"eslint-plugin-jsx-a11y": ">= 6",
|
||||||
|
"eslint-plugin-no-unsanitized": ">= 4.0.2",
|
||||||
|
"eslint-plugin-prettier": ">= 4",
|
||||||
|
"eslint-plugin-react-hooks": ">= 4",
|
||||||
|
"eslint-plugin-security": ">= 1.6.0",
|
||||||
|
"eslint-plugin-simple-import-sort": ">= 7",
|
||||||
|
"eslint-plugin-unused-imports": ">= 2",
|
||||||
|
"eslint-plugin-xss": ">= 0.1.12",
|
||||||
|
"prettier": ">= 2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"packages/utility-features/react-testing-library-discovery": {
|
"packages/utility-features/react-testing-library-discovery": {
|
||||||
"name": "@k8slens/react-testing-library-discovery",
|
"name": "@k8slens/react-testing-library-discovery",
|
||||||
"version": "1.0.0-alpha.3",
|
"version": "1.0.0-alpha.3",
|
||||||
|
|||||||
@ -321,6 +321,7 @@
|
|||||||
"@k8slens/run-many": "^1.0.0-alpha.1",
|
"@k8slens/run-many": "^1.0.0-alpha.1",
|
||||||
"@k8slens/startable-stoppable": "^1.0.0-alpha.1",
|
"@k8slens/startable-stoppable": "^1.0.0-alpha.1",
|
||||||
"@k8slens/test-utils": "^1.0.0-alpha.1",
|
"@k8slens/test-utils": "^1.0.0-alpha.1",
|
||||||
|
"@k8slens/resizing-anchor": "^1.0.0-alpha.0",
|
||||||
"@k8slens/utilities": "^1.0.0-alpha.1",
|
"@k8slens/utilities": "^1.0.0-alpha.1",
|
||||||
"@ogre-tools/fp": "^15.3.1",
|
"@ogre-tools/fp": "^15.3.1",
|
||||||
"@ogre-tools/injectable": "^15.3.1",
|
"@ogre-tools/injectable": "^15.3.1",
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import { cssNames } from "@k8slens/utilities";
|
|||||||
import { Icon } from "../icon";
|
import { Icon } from "../icon";
|
||||||
import { MenuItem } from "../menu";
|
import { MenuItem } from "../menu";
|
||||||
import { MenuActions } from "../menu/menu-actions";
|
import { MenuActions } from "../menu/menu-actions";
|
||||||
import { ResizeDirection, ResizingAnchor } from "../resizing-anchor";
|
import { ResizeDirection, ResizingAnchor } from "@k8slens/resizing-anchor";
|
||||||
import { CreateResource } from "./create-resource/view";
|
import { CreateResource } from "./create-resource/view";
|
||||||
import { DockTabs } from "./dock-tabs";
|
import { DockTabs } from "./dock-tabs";
|
||||||
import type { DockStore, DockTab } from "./dock/store";
|
import type { DockStore, DockTab } from "./dock/store";
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import { cssNames, noop } from "@k8slens/utilities";
|
|||||||
import { Icon } from "../icon";
|
import { Icon } from "../icon";
|
||||||
import type { AnimateName } from "../animate";
|
import type { AnimateName } from "../animate";
|
||||||
import { Animate } from "../animate";
|
import { Animate } from "../animate";
|
||||||
import { ResizeDirection, ResizeGrowthDirection, ResizeSide, ResizingAnchor } from "../resizing-anchor";
|
import { ResizeDirection, ResizeGrowthDirection, ResizeSide, ResizingAnchor } from "@k8slens/resizing-anchor";
|
||||||
import drawerStorageInjectable, { defaultDrawerWidth } from "./drawer-storage/drawer-storage.injectable";
|
import drawerStorageInjectable, { defaultDrawerWidth } from "./drawer-storage/drawer-storage.injectable";
|
||||||
import { withInjectables } from "@ogre-tools/injectable-react";
|
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||||
import historyInjectable from "../../navigation/history.injectable";
|
import historyInjectable from "../../navigation/history.injectable";
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import React from "react";
|
|||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { cssNames } from "@k8slens/utilities";
|
import { cssNames } from "@k8slens/utilities";
|
||||||
import { ErrorBoundary } from "../error-boundary";
|
import { ErrorBoundary } from "../error-boundary";
|
||||||
import { ResizeDirection, ResizeGrowthDirection, ResizeSide, ResizingAnchor } from "../resizing-anchor";
|
import { ResizeDirection, ResizeGrowthDirection, ResizeSide, ResizingAnchor } from "@k8slens/resizing-anchor";
|
||||||
import { withInjectables } from "@ogre-tools/injectable-react";
|
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||||
import type { SidebarStorageState } from "./sidebar-storage/sidebar-storage.injectable";
|
import type { SidebarStorageState } from "./sidebar-storage/sidebar-storage.injectable";
|
||||||
import sidebarStorageInjectable, { defaultSidebarWidth } from "./sidebar-storage/sidebar-storage.injectable";
|
import sidebarStorageInjectable, { defaultSidebarWidth } from "./sidebar-storage/sidebar-storage.injectable";
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import "@k8slens/core/styles";
|
import "@k8slens/core/styles";
|
||||||
|
import "@k8slens/resizing-anchor/dist/index.css";
|
||||||
import { runInAction } from "mobx";
|
import { runInAction } from "mobx";
|
||||||
import {
|
import {
|
||||||
rendererExtensionApi as Renderer,
|
rendererExtensionApi as Renderer,
|
||||||
|
|||||||
6
packages/ui-components/resizing-anchor/.eslintrc.json
Normal file
6
packages/ui-components/resizing-anchor/.eslintrc.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"extends": "@k8slens/eslint-config/eslint",
|
||||||
|
"parserOptions": {
|
||||||
|
"project": "./tsconfig.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
1
packages/ui-components/resizing-anchor/.prettierrc
Normal file
1
packages/ui-components/resizing-anchor/.prettierrc
Normal file
@ -0,0 +1 @@
|
|||||||
|
"@k8slens/eslint-config/prettier"
|
||||||
19
packages/ui-components/resizing-anchor/.swcrc
Normal file
19
packages/ui-components/resizing-anchor/.swcrc
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"module": {
|
||||||
|
"type": "commonjs"
|
||||||
|
},
|
||||||
|
"jsc": {
|
||||||
|
"parser": {
|
||||||
|
"syntax": "typescript",
|
||||||
|
"tsx": true,
|
||||||
|
"decorators": true,
|
||||||
|
"dynamicImport": false
|
||||||
|
},
|
||||||
|
"transform": {
|
||||||
|
"legacyDecorator": true,
|
||||||
|
"decoratorMetadata": true
|
||||||
|
},
|
||||||
|
"target": "es2019"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
15
packages/ui-components/resizing-anchor/README.md
Normal file
15
packages/ui-components/resizing-anchor/README.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# @k8slens/resizing-anchor
|
||||||
|
|
||||||
|
This package contains stuff related to creating Lens-applications.
|
||||||
|
|
||||||
|
# Usage
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ npm install @k8slens/resizing-anchor
|
||||||
|
```
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { ResizeDirection, ResizeGrowthDirection, ResizeSide, ResizingAnchor } from "@k8slens/resizing-anchor";
|
||||||
|
```
|
||||||
|
|
||||||
|
## Extendability
|
||||||
6
packages/ui-components/resizing-anchor/index.ts
Normal file
6
packages/ui-components/resizing-anchor/index.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export * from "./src/resizing-anchor";
|
||||||
1
packages/ui-components/resizing-anchor/jest.config.js
Normal file
1
packages/ui-components/resizing-anchor/jest.config.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
module.exports = require("@k8slens/jest").monorepoPackageConfig(__dirname).configForReact;
|
||||||
50
packages/ui-components/resizing-anchor/package.json
Normal file
50
packages/ui-components/resizing-anchor/package.json
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
"name": "@k8slens/resizing-anchor",
|
||||||
|
"private": false,
|
||||||
|
"version": "1.0.0-alpha.0",
|
||||||
|
"description": "Highly extendable resizing-anchor in the Lens.",
|
||||||
|
"type": "commonjs",
|
||||||
|
"files": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public",
|
||||||
|
"registry": "https://registry.npmjs.org/"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/lensapp/lens.git"
|
||||||
|
},
|
||||||
|
"main": "dist/index.js",
|
||||||
|
"types": "dist/index.d.ts",
|
||||||
|
"author": {
|
||||||
|
"name": "OpenLens Authors",
|
||||||
|
"email": "info@k8slens.dev"
|
||||||
|
},
|
||||||
|
"license": "MIT",
|
||||||
|
"homepage": "https://github.com/lensapp/lens",
|
||||||
|
"scripts": {
|
||||||
|
"build": "webpack",
|
||||||
|
"test:unit": "jest --coverage --runInBand",
|
||||||
|
"lint": "lens-lint",
|
||||||
|
"lint:fix": "lens-lint --fix"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@k8slens/feature-core": "^6.5.0-alpha.0",
|
||||||
|
"@k8slens/utilities": "^1.0.0-alpha.1",
|
||||||
|
"@ogre-tools/injectable": "^15.1.2",
|
||||||
|
"@ogre-tools/injectable-extension-for-auto-registration": "^15.1.2",
|
||||||
|
"@ogre-tools/fp": "^15.1.2",
|
||||||
|
"auto-bind": "^4.0.0",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
|
"mobx": "^6.8.0",
|
||||||
|
"mobx-react": "^7.6.0",
|
||||||
|
"react": "^17.0.2",
|
||||||
|
"react-dom": "^17.0.2"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@async-fn/jest": "^1.6.4",
|
||||||
|
"@k8slens/eslint-config": "6.5.0-alpha.1",
|
||||||
|
"@k8slens/react-testing-library-discovery": "^1.0.0-alpha.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
30
packages/ui-components/resizing-anchor/tailwind.config.js
Normal file
30
packages/ui-components/resizing-anchor/tailwind.config.js
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
|
*/
|
||||||
|
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
content: [
|
||||||
|
path.join(__dirname, "src/**/*.tsx")
|
||||||
|
],
|
||||||
|
darkMode: "class",
|
||||||
|
theme: {
|
||||||
|
fontFamily: {
|
||||||
|
sans: ["Roboto", "Helvetica", "Arial", "sans-serif"],
|
||||||
|
},
|
||||||
|
extend: {
|
||||||
|
colors: {
|
||||||
|
textAccent: "var(--textColorAccent)",
|
||||||
|
textPrimary: "var(--textColorPrimary)",
|
||||||
|
textTertiary: "var(--textColorTertiary)",
|
||||||
|
textDimmed: "var(--textColorDimmed)",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
variants: {
|
||||||
|
extend: {},
|
||||||
|
},
|
||||||
|
plugins: [],
|
||||||
|
};
|
||||||
4
packages/ui-components/resizing-anchor/tsconfig.json
Normal file
4
packages/ui-components/resizing-anchor/tsconfig.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"extends": "@k8slens/typescript/config/base.json",
|
||||||
|
"include": ["**/*.ts", "**/*.tsx"],
|
||||||
|
}
|
||||||
1
packages/ui-components/resizing-anchor/webpack.config.js
Normal file
1
packages/ui-components/resizing-anchor/webpack.config.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
module.exports = require("@k8slens/webpack").configForReact;
|
||||||
Loading…
Reference in New Issue
Block a user