Skip to content

Commit

Permalink
chore: fix update modules
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed Jun 27, 2023
1 parent 9300af7 commit bb608dc
Show file tree
Hide file tree
Showing 29 changed files with 3,913 additions and 2,781 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"intercept-stdout": "0.1.2",
"lerna": "^4.0.0",
"lerna-changelog": "2.2.0",
"typescript": "^4.5.0 <4.6.0"
"typescript": "^4.8 <4.9"
},
"workspaces": {
"packages": [
Expand All @@ -97,7 +97,7 @@
"resolutions": {
"@daybrush/utils": "^1.13.0",
"@types/react": "^16.9.17",
"typescript": "^4.5.0 <4.6.0",
"typescript": "^4.8 <4.9",
"@storybook/react": "^6.4.22",
"@storybook/addon-actions": "^6.4.22",
"@storybook/addon-controls": "^6.4.22",
Expand All @@ -121,7 +121,7 @@
"overrides": {
"@daybrush/utils": "^1.13.0",
"@types/react": "^16.9.17",
"typescript": "^4.5.0 <4.6.0",
"typescript": "^4.8 <4.9",
"@storybook/react": "^6.4.22",
"@storybook/addon-actions": "^6.4.22",
"@storybook/addon-controls": "^6.4.22",
Expand Down
6 changes: 2 additions & 4 deletions packages/croact-moveable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"sideEffects": false,
"types": "declaration/index.d.ts",
"scripts": {
"lint": "tslint -c tslint.json 'src/**/*.ts'",
"start": "open ./demo/index.html && rollup -c rollup.config.demo.js -w",
"build": "rollup -c && npm run declaration && print-sizes ./dist ",
"declaration": "rm -rf declaration && tsc -p tsconfig.declaration.json",
Expand Down Expand Up @@ -56,16 +55,15 @@
},
"homepage": "https://daybrush.com/moveable",
"devDependencies": {
"@daybrush/builder": "^0.1.2",
"@daybrush/builder": "^0.2.4",
"@types/react": "^16.9.17",
"croact": "^1.0.4",
"keycon": "^0.3.0",
"print-sizes": "^0.2.0",
"pvu": "^0.6.1",
"rollup-plugin-css-bundle": "^1.0.4",
"rollup-plugin-react-compat": "^0.1.1",
"tslint": "^5.16.0",
"typescript": "^4.5.0 <4.6.0"
"typescript": "^4.8 <4.9"
},
"peerDependencies": {
"croact": "^1.0.4"
Expand Down
2 changes: 2 additions & 0 deletions packages/croact-moveable/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ module.exports = builder([
format: "es",
plugins: [reactPlugin],
external,
typescript2: true,
},
{
sourcemap: false,
Expand All @@ -50,5 +51,6 @@ module.exports = builder([
plugins: [reactPlugin],
format: "cjs",
external,
typescript2: true,
},
]);
11 changes: 2 additions & 9 deletions packages/helper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,13 @@
"homepage": "https://daybrush.com/moveable",
"devDependencies": {
"@babel/core": "^7.7.2",
"@daybrush/builder": "^0.1.2",
"@daybrush/builder": "^0.2.4",
"@daybrush/tester": "^0.1.3",
"@types/node": "^14.6.0",
"@types/react": "^16.9.17",
"@types/react-dom": "^16.9.4",
"@types/jest": "^24.0.13",
"@typescript-eslint/eslint-plugin": "^3.9.1",
"@typescript-eslint/parser": "^3.9.1",
"babel-loader": "^8.0.6",
"css-loader": "^5.0.1",
"eslint": "^7.7.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-react": "^7.22.0",
"gh-pages": "^2.1.1",
"jest": "^24.8.0",
"ts-jest": "^24.0.2",
Expand All @@ -79,9 +73,8 @@
"raw-loader": "^4.0.2",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"ts-loader": "^8.3.0",
"tslib": "^2.3.1",
"typescript": "^4.5.0 <4.6.0"
"typescript": "^4.8 <4.9"
},
"dependencies": {
"@daybrush/utils": "^1.13.0"
Expand Down
1 change: 1 addition & 0 deletions packages/helper/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const builder = require("@daybrush/builder");

const defaultOptions = {
typescript2: true,
tsconfig: "tsconfig.build.json",
};

Expand Down
5 changes: 2 additions & 3 deletions packages/lit-moveable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,9 @@
"declaration": "rm -rf declaration && tsc -p tsconfig.declaration.json"
},
"devDependencies": {
"@daybrush/builder": "^0.1.2",
"@daybrush/builder": "^0.2.4",
"lit": "^2.0",
"tslint": "^5.20.1",
"typescript": "^4.5.0 <4.6.0"
"typescript": "^4.8 <4.9"
},
"dependencies": {
"@daybrush/utils": "^1.13.0",
Expand Down
6 changes: 2 additions & 4 deletions packages/moveable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@
"react-moveable": "~0.52.0"
},
"devDependencies": {
"@daybrush/builder": "^0.1.2",
"@daybrush/demo": "0.0.2",
"@daybrush/builder": "^0.2.4",
"@types/react": "^16.9.17",
"@types/react-dom": "^16.9.4",
"gh-pages": "^2.0.1",
Expand All @@ -83,7 +82,6 @@
"rollup-plugin-css-bundle": "^1.0.4",
"rollup-plugin-react-compat": "^0.1.1",
"tslib": "^2.3.1",
"tslint": "^6.1.3",
"typescript": "^4.5.0 <4.6.0"
"typescript": "^4.8 <4.9"
}
}
4 changes: 4 additions & 0 deletions packages/moveable/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ module.exports = builder([
format: "umd",
minifyPrototype: true,
plugins: [resolveCompatPlugin],
typescript2: true,
},
{
name: "Moveable",
Expand All @@ -56,6 +57,7 @@ module.exports = builder([
minifyPrototype: true,
plugins: [resolveCompatPlugin],
uglify: true,
typescript2: true,
},
{
input: "src/index.ts",
Expand All @@ -65,6 +67,7 @@ module.exports = builder([
minifyPrototype: true,
plugins: [compatPlugin],
external,
typescript2: true,
},
{
input: "src/index.cjs.ts",
Expand All @@ -74,5 +77,6 @@ module.exports = builder([
minifyPrototype: true,
plugins: [compatPlugin],
external,

},
]);
3 changes: 1 addition & 2 deletions packages/moveable/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export function getElementInfo(
export function makeAble<
Name extends string,
AbleObject extends Partial<Able<any, any>>,
Props extends DefaultProps<Name, AbleObject>,
>(name: Name, able: AbleObject) {
return makeAbleFunction<Name, AbleObject, Props>(name, able);
return makeAbleFunction<Name, AbleObject>(name, able);
}
2 changes: 1 addition & 1 deletion packages/ngx-moveable/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/ngx-moveable/tsconfig.lib.json",
"project": "projects/ngx-moveable/ng-package.json"
Expand Down
32 changes: 15 additions & 17 deletions packages/ngx-moveable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~13.1.1",
"@angular-devkit/build-ng-packagr": "^0.1002.4",
"@angular/animations": "~13.1.1",
"@angular/cdk": "^13.1.1",
"@angular/cli": "~13.1.1",
"@angular/common": "~13.1.1",
"@angular/compiler": "~13.1.1",
"@angular/compiler-cli": "~13.1.1",
"@angular/core": "~13.1.1",
"@angular/forms": "~13.1.1",
"@angular/material": "^13.1.1",
"@angular/platform-browser": "~13.1.1",
"@angular/platform-browser-dynamic": "~13.1.1",
"@angular/router": "~13.1.1",
"@angular-devkit/build-angular": "~15.0.4",
"ng-packagr": "~15.0.3",
"@angular/animations": "~15.0.4",
"@angular/cdk": "^15.0.4",
"@angular/cli": "~15.0.4",
"@angular/common": "~15.0.4",
"@angular/compiler": "~15.0.4",
"@angular/compiler-cli": "~15.0.4",
"@angular/core": "~15.0.4",
"@angular/forms": "~15.0.4",
"@angular/material": "^15.0.4",
"@angular/platform-browser": "~15.0.4",
"@angular/platform-browser-dynamic": "~15.0.4",
"@angular/router": "~15.0.4",
"@types/jasmine": "~3.5.12",
"@types/node": "~14.0.27",
"codelyzer": "^6.0.0",
Expand All @@ -46,11 +46,9 @@
"karma-coverage-istanbul-reporter": "~3.0.3",
"karma-jasmine": "~3.3.1",
"karma-jasmine-html-reporter": "^1.5.4",
"ng-packagr": "~13.1.1",
"protractor": "~7.0.0",
"ts-node": "~8.10.2",
"tslib": "^2.3.1",
"tslint": "~6.1.3",
"typescript": "^4.5.0 <4.6.0"
"typescript": "^4.8 <4.9"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
EventEmitter,
ElementRef,
NgZone,
Inject,
} from '@angular/core';
import Moveable, { PROPERTIES, EVENTS, MoveableOptions } from 'moveable';
import { IObject } from '@daybrush/utils';
Expand All @@ -15,6 +16,7 @@ import { NgxMoveableInterface } from './ngx-moveable.interface';
import { ANGULAR_MOVEABLE_INPUTS, ANGULAR_MOVEABLE_OUTPUTS } from './consts';

@Component({
standalone: true,
selector: 'ngx-moveable',
template: '',
inputs: ANGULAR_MOVEABLE_INPUTS,
Expand All @@ -25,8 +27,10 @@ export class NgxMoveableComponent
implements OnDestroy, OnInit, OnChanges
{
constructor(
@Inject(NgZone)
private _ngZone: NgZone,
private _elementRef: ElementRef<HTMLElement>
@Inject(ElementRef)
private _elementRef: ElementRef<HTMLElement>,
) {
super();
EVENTS.forEach((name) => {
Expand Down
6 changes: 2 additions & 4 deletions packages/preact-moveable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"sideEffects": false,
"types": "declaration/index.d.ts",
"scripts": {
"lint": "tslint -c tslint.json 'src/**/*.ts'",
"start": "open ./demo/index.html && rollup -c rollup.config.demo.js -w",
"build": "rollup -c && npm run declaration && print-sizes ./dist ",
"declaration": "rm -rf declaration && tsc -p tsconfig.declaration.json"
Expand Down Expand Up @@ -53,15 +52,14 @@
},
"homepage": "https://daybrush.com/moveable",
"devDependencies": {
"@daybrush/builder": "^0.1.2",
"@daybrush/builder": "^0.2.4",
"keycon": "^0.3.0",
"preact": "^10.0.0",
"print-sizes": "^0.2.0",
"pvu": "^0.3.1",
"rollup-plugin-css-bundle": "^1.0.4",
"rollup-plugin-preact": "^0.5.2",
"tslint": "^5.16.0",
"typescript": "^4.5.0 <4.6.0"
"typescript": "^4.8"
},
"dependencies": {
"preact-css-styled": "^1.1.9",
Expand Down
1 change: 1 addition & 0 deletions packages/preact-moveable/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const preact = require("rollup-plugin-preact");
const defaultOptions = {
sourcemap: false,
tsconfig: "tsconfig.build.json",
typescript2: true,
external: {
"@daybrush/utils": "utils",
"gesto": "Gesto",
Expand Down
13 changes: 6 additions & 7 deletions packages/react-moveable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
"homepage": "https://daybrush.com/moveable",
"devDependencies": {
"@babel/core": "^7.7.2",
"@croffle/bakery": "^0.0.22",
"@daybrush/builder": "^0.1.2",
"@croffle/bakery": "^0.0.23",
"@daybrush/builder": "^0.2.4",
"@daybrush/tester": "^0.1.3",
"@scena/react-guides": "^0.17.1",
"@storybook/addon-actions": "6.5.16",
Expand All @@ -90,11 +90,11 @@
"@types/node": "^18.11.3",
"@types/react": "^16.9.17",
"@types/react-dom": "^16.9.4",
"@typescript-eslint/eslint-plugin": "^3.9.1",
"@typescript-eslint/parser": "^3.9.1",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"babel-loader": "^8.0.6",
"concurrently": "^7.6.0",
"croffle": "^0.0.18",
"croffle": "^0.0.19",
"css-loader": "^5.0.1",
"eslint": "^7.7.0",
"eslint-plugin-import": "^2.22.1",
Expand All @@ -114,9 +114,8 @@
"react-selecto": "^1.24.0",
"storybook-addon-preview": "^2.3.0",
"storybook-dark-mode": "^1.0.9",
"ts-loader": "^8.3.0",
"tslib": "^2.3.1",
"typescript": "^4.5.0 <4.6.0",
"typescript": "^4.8",
"wait-on": "^7.0.1"
},
"dependencies": {
Expand Down
32 changes: 17 additions & 15 deletions packages/react-moveable/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@ const builder = require("@daybrush/builder");

const defaultOptions = {
tsconfig: "tsconfig.build.json",
typescript2: true,
};

module.exports = builder([{
...defaultOptions,
input: "src/index.ts",
output: "./dist/moveable.esm.js",
visualizer: true,
format: "es",
exports: "named",
},
{
...defaultOptions,
input: "src/index.umd.ts",
output: "./dist/moveable.cjs.js",
format: "cjs",
exports: "named",
},
module.exports = builder([
{
...defaultOptions,
input: "src/index.ts",
output: "./dist/moveable.esm.js",
visualizer: true,
format: "es",
exports: "named",
},
{
...defaultOptions,
input: "src/index.umd.ts",
output: "./dist/moveable.cjs.js",
format: "cjs",
exports: "named",
},
]);
2 changes: 1 addition & 1 deletion packages/react-moveable/src/MoveableManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ export default class MoveableManager<T = {}>
const parentMoveable = this.props.parentMoveable;

if (parentMoveable) {
(parentMoveable as MoveableManager).checkUpdateRect();
(parentMoveable as any).checkUpdateRect();
return;
}
cancelAnimationFrame(this._observerId);
Expand Down
3 changes: 1 addition & 2 deletions packages/react-moveable/src/ables/AbleManager.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { Able, DefaultProps } from "../types";
import { Able } from "../types";

export function makeAble<
Name extends string,
AbleObject extends Partial<Able<any, any>>,
Props extends DefaultProps<Name, AbleObject>,
>(name: Name, able: AbleObject) {
return {
events: [] as AbleObject["events"] extends readonly any[] ? AbleObject["events"] : readonly [],
Expand Down
Loading

0 comments on commit bb608dc

Please sign in to comment.