@bigbinary/neeto-image-uploader-frontend 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,153 +1,195 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-image-uploader-frontend",
3
- "version": "1.0.3",
4
- "main": "dist/index.cjs.js",
5
- "module": "dist/index.js",
6
- "types": "types.d.ts",
7
- "engines": {
8
- "node": ">=18.12",
9
- "npm": ">=9",
10
- "yarn": ">=1.22"
3
+ "version": "1.0.5",
4
+ "license": "UNLICENSED",
5
+ "bugs": {
6
+ "url": "https://github.com/bigbinary/neeto-message-templates-engine/issues"
11
7
  },
8
+ "repository": "neeto-message-templates-engine",
9
+ "author": "BigBinary",
12
10
  "files": [
13
- "dist/*",
11
+ "dist",
14
12
  "types.d.ts"
15
13
  ],
14
+ "main": "dist/index.cjs.js",
15
+ "module": "dist/index.js",
16
+ "types": "types.d.ts",
16
17
  "scripts": {
18
+ "build": "NODE_ENV=production rollup -c --environment production",
17
19
  "prepare": "husky install",
18
- "start": "NODE_ENV=development rm -rf dist && webpack-dev-server --open --mode development",
19
- "build": "NODE_ENV=production rollup -c rollup.config.js",
20
+ "release": "yarn build && yalc push --sig",
20
21
  "build-preview": "NODE_ENV=production webpack"
21
22
  },
22
23
  "lint-staged": {
23
- "app/views/**/*.html.erb": [
24
- "bundle exec erblint --lint-all --format compact -a"
24
+ "app/**/*.{html,md,js,css,jsx,json,yml}": [
25
+ "prettier --write",
26
+ "eslint --cache --fix"
27
+ ],
28
+ "cypress-tests/**/*.{html,md,js,css,jsx,json,yml}": [
29
+ "prettier --write",
30
+ "eslint --cache --fix"
31
+ ],
32
+ "{package.json,.eslintrc.js,.prettierrc.js}": [
33
+ "prettier --write",
34
+ "eslint --cache --fix"
25
35
  ],
26
36
  "./**/*.rb": [
27
- "bundle exec rubocop -a"
37
+ "bundle exec rubocop -a --force-exclusion"
28
38
  ],
29
39
  "{Gemfile,Rakefile,config.ru}": [
30
- "bundle exec rubocop -a"
40
+ "bundle exec rubocop -a --force-exclusion"
31
41
  ],
32
- "{src,example}/**/*.{js,jsx,json}": [
33
- "prettier --write",
34
- "eslint --fix"
42
+ "app/views/**/*.html.erb": [
43
+ "bundle exec erblint --lint-all --format compact -a"
35
44
  ]
36
45
  },
37
46
  "devDependencies": {
38
- "@babel/core": "^7.19.1",
39
- "@babel/eslint-parser": "7.17.0",
40
- "@babel/plugin-transform-runtime": "^7.19.1",
41
- "@babel/preset-env": "7.17.10",
42
- "@babel/preset-react": "7.16.7",
43
- "@babel/preset-typescript": "^7.18.6",
44
- "@babel/runtime": "^7.19.0",
45
- "@bigbinary/eslint-plugin-neeto": "^1.0.21",
46
- "@bigbinary/neeto-commons-frontend": "^2.0.42",
47
- "@bigbinary/neeto-icons": "1.9.12",
48
- "@bigbinary/neetoui": "4.4.0",
47
+ "@babel/core": "7.21.5",
48
+ "@babel/eslint-parser": "7.21.3",
49
+ "@babel/plugin-transform-runtime": "7.21.4",
50
+ "@babel/preset-env": "7.21.5",
51
+ "@babel/preset-react": "7.18.6",
52
+ "@babel/preset-typescript": "7.21.5",
53
+ "@babel/runtime": "7.21.5",
54
+ "@bigbinary/babel-preset-neeto": "1.0.3",
55
+ "@bigbinary/eslint-plugin-neeto": "1.0.41",
56
+ "@bigbinary/neeto-commons-frontend": "2.0.42",
57
+ "@bigbinary/neeto-editor": "^1.26.3",
58
+ "@bigbinary/neeto-filters-frontend": "2.10.1",
59
+ "@bigbinary/neeto-icons": "^1.11.0",
60
+ "@bigbinary/neeto-molecules": "^1.0.30",
61
+ "@bigbinary/neeto-team-members-frontend": "2.7.2",
62
+ "@bigbinary/neetoui": "4.4.27",
49
63
  "@emotion/is-prop-valid": "1.2.0",
64
+ "@faker-js/faker": "7.6.0",
50
65
  "@honeybadger-io/react": "2.0.1",
51
- "@rollup/plugin-alias": "3.1.9",
52
- "@rollup/plugin-babel": "5.3.1",
53
- "@rollup/plugin-commonjs": "22.0.2",
54
- "@rollup/plugin-html": "0.2.4",
55
- "@rollup/plugin-json": "4.1.0",
56
- "@rollup/plugin-node-resolve": "14.1.0",
57
- "@rollup/plugin-replace": "4.0.0",
58
- "antd": "4.24.3",
59
- "autoprefixer": "^10.4.5",
66
+ "@rails/activestorage": "^7.0.4",
67
+ "@rollup/plugin-alias": "5.0.0",
68
+ "@rollup/plugin-babel": "6.0.3",
69
+ "@rollup/plugin-commonjs": "24.1.0",
70
+ "@rollup/plugin-json": "6.0.0",
71
+ "@rollup/plugin-node-resolve": "^15.0.2",
72
+ "@rollup/plugin-replace": "5.0.2",
73
+ "@svgr/rollup": "7.0.0",
74
+ "antd": "4.18.7",
75
+ "autoprefixer": "10.4.14",
60
76
  "axios": "0.27.2",
61
- "babel-loader": "^8.2.5",
62
- "babel-plugin-istanbul": "^6.1.1",
77
+ "babel-loader": "9.1.2",
78
+ "babel-plugin-istanbul": "6.1.1",
63
79
  "babel-plugin-js-logger": "1.0.17",
64
80
  "babel-plugin-macros": "3.1.0",
65
81
  "babel-plugin-transform-react-remove-prop-types": "0.4.24",
66
82
  "babel-preset-react": "6.24.1",
67
- "babel-preset-typescript": "^7.0.0-alpha.19",
83
+ "babel-preset-typescript": "7.0.0-alpha.19",
84
+ "browserify-zlib": "^0.2.0",
68
85
  "buffer": "^6.0.3",
69
- "classnames": "2.3.1",
86
+ "classnames": "2.3.2",
70
87
  "crypto-browserify": "^3.12.0",
71
- "css-loader": "6.7.1",
72
- "dayjs": "1.11.1",
73
- "eslint": "8.14.0",
74
- "eslint-config-prettier": "8.5.0",
75
- "eslint-plugin-cypress": "2.12.1",
76
- "eslint-plugin-import": "2.26.0",
88
+ "css-loader": "^6.7.1",
89
+ "dompurify": "3.0.2",
90
+ "dotenv-webpack": "^8.0.1",
91
+ "eslint": "8.39.0",
92
+ "eslint-config-prettier": "8.8.0",
93
+ "eslint-plugin-cypress": "2.13.3",
94
+ "eslint-plugin-import": "2.27.5",
77
95
  "eslint-plugin-jam3": "0.2.3",
78
96
  "eslint-plugin-json": "3.1.0",
79
- "eslint-plugin-prettier": "4.0.0",
80
- "eslint-plugin-promise": "6.0.0",
81
- "eslint-plugin-react": "7.29.4",
82
- "eslint-plugin-react-hooks": "4.5.0",
97
+ "eslint-plugin-prettier": "4.2.1",
98
+ "eslint-plugin-promise": "6.1.1",
99
+ "eslint-plugin-react": "7.32.2",
100
+ "eslint-plugin-react-hooks": "4.6.0",
83
101
  "eslint-plugin-unused-imports": "2.0.0",
84
102
  "formik": "2.2.9",
85
- "html-loader": "4.2.0",
86
103
  "html-webpack-plugin": "5.5.0",
87
- "husky": "7.0.4",
88
- "i18next": "21.7.0",
89
- "js-logger": "^1.6.1",
90
- "lint-staged": "12.4.1",
91
- "mixpanel-browser": "^2.46.0",
92
- "postcss": "^8.4.17",
93
- "postcss-import": "^15.0.0",
94
- "postcss-loader": "^7.0.1",
95
- "postcss-preset-env": "7.8.2",
96
- "prettier": "2.6.2",
97
- "prettier-plugin-tailwindcss": "0.1.10",
98
- "prop-types": "15.8.1",
104
+ "https-browserify": "^1.0.0",
105
+ "husky": "8.0.3",
106
+ "i18next": "22.4.10",
107
+ "i18next-browser-languagedetector": "7.0.1",
108
+ "imagekitio-react": "^2.0.0",
109
+ "js-logger": "1.6.1",
110
+ "lint-staged": "13.2.2",
111
+ "mini-css-extract-plugin": "^2.6.1",
112
+ "mixpanel-browser": "2.46.0",
113
+ "os-browserify": "^0.3.0",
114
+ "path-browserify": "^1.0.1",
115
+ "perf_hooks": "^0.0.1",
116
+ "postcss": "8.4.23",
117
+ "postcss-import": "15.1.0",
118
+ "postcss-loader": "7.3.0",
119
+ "postcss-preset-env": "8.3.2",
120
+ "prettier": "2.8.8",
121
+ "prettier-plugin-tailwindcss": "0.2.8",
122
+ "process": "^0.11.10",
99
123
  "ramda": "0.28.0",
100
124
  "react": "17.0.2",
101
125
  "react-dom": "17.0.2",
102
126
  "react-dropzone": "^14.2.3",
103
- "react-helmet": "^6.1.0",
127
+ "react-helmet": "6.1.0",
104
128
  "react-i18next": "11.16.8",
105
129
  "react-image-crop": "^10.0.9",
106
130
  "react-masonry-infinite": "^1.2.2",
107
- "react-query": "3.39.2",
108
- "react-router-dom": "5.3.1",
131
+ "react-query": "3.39.3",
132
+ "react-router-dom": "5.2.0",
109
133
  "react-toastify": "8.0.2",
110
- "react-transition-group": "4.4.5",
134
+ "react_ujs": "2.6.2",
111
135
  "rollup": "2.79.1",
112
136
  "rollup-plugin-analyzer": "4.0.0",
113
- "rollup-plugin-bundle-html": "0.2.2",
114
137
  "rollup-plugin-cleaner": "1.0.0",
115
- "rollup-plugin-generate-html-template": "1.7.0",
116
- "rollup-plugin-livereload": "2.0.5",
117
138
  "rollup-plugin-peer-deps-external": "2.2.4",
118
- "rollup-plugin-polyfill-node": "0.10.2",
119
- "rollup-plugin-serve": "2.0.1",
120
139
  "rollup-plugin-styles": "4.0.0",
121
- "rollup-plugin-terser": "7.0.2",
122
- "sass": "^1.54.9",
140
+ "sass": "1.62.1",
123
141
  "sass-loader": "^13.0.2",
142
+ "shakapacker": "6.5.2",
124
143
  "stream-browserify": "^3.0.0",
125
- "style-loader": "3.3.1",
144
+ "stream-http": "^3.2.0",
145
+ "style-loader": "^3.3.1",
126
146
  "tailwindcss": "npm:@tailwindcss/postcss7-compat",
147
+ "tty-browserify": "^0.0.1",
127
148
  "url": "^0.11.0",
128
- "util": "^0.12.5",
149
+ "util": "0.12.5",
150
+ "vm-browserify": "^1.1.2",
129
151
  "webpack": "5.76.0",
152
+ "webpack-assets-manifest": "^5.1.0",
130
153
  "webpack-cli": "4.10.0",
131
- "webpack-dev-server": "4.11.1",
154
+ "webpack-dev-server": "^4.15.0",
132
155
  "yup": "0.32.11"
133
156
  },
134
157
  "peerDependencies": {
135
- "@bigbinary/neeto-commons-frontend": "latest",
136
- "@bigbinary/neeto-icons": "latest",
137
- "@bigbinary/neetoui": "latest",
138
- "@honeybadger-io/react": "2.0.1",
139
- "antd": "4.24.3",
140
- "axios": "0.27.2",
141
- "classnames": "2.3.1",
142
- "dayjs": "1.11.1",
143
- "formik": "2.2.9",
144
- "ramda": "0.28.0",
158
+ "@bigbinary/neeto-commons-frontend": "^2.0.54",
159
+ "@bigbinary/neeto-editor": "^1.26.3",
160
+ "@bigbinary/neeto-filters-frontend": "^2.8.1",
161
+ "@bigbinary/neeto-icons": "^1.9.22",
162
+ "@bigbinary/neeto-molecules": "^1.0.30",
163
+ "@bigbinary/neetoui": "^4.4.10",
164
+ "@honeybadger-io/react": "^2.0.1",
165
+ "@rails/activestorage": "^7.0.4",
166
+ "assert": "^2.0.0",
167
+ "axios": "^0.27.2",
168
+ "classnames": "^2.3.2",
169
+ "formik": "^2.2.9",
170
+ "js-logger": "^1.6.1",
171
+ "mixpanel-browser": "^2.45.0",
172
+ "ramda": "^0.28.0",
145
173
  "react": "17.0.2",
146
174
  "react-dom": "17.0.2",
147
175
  "react-helmet": "^6.1.0",
148
176
  "react-query": "3.39.2",
149
177
  "react-router-dom": "5.3.0",
150
- "react-toastify": "8.0.2",
151
- "yup": "0.32.11"
178
+ "react-toastify": "8.2.0",
179
+ "yup": "^0.32.11",
180
+ "zustand": "4.3.2"
181
+ },
182
+ "resolutions": {
183
+ "postcss": "^8"
184
+ },
185
+ "engines": {
186
+ "node": ">=18.12",
187
+ "npm": ">=9",
188
+ "yarn": ">=1.22"
189
+ },
190
+ "dependencies": {
191
+ "react-router-nav-prompt": "0.4.1",
192
+ "source-map-loader": "^4.0.1",
193
+ "zustand": "4.3.2"
152
194
  }
153
195
  }
package/types.d.ts CHANGED
@@ -0,0 +1,36 @@
1
+ interface Image {
2
+ id: number;
3
+ url: string;
4
+ }
5
+
6
+ interface ImageUploaderProps {
7
+ assets?: Image[];
8
+ isOpen?: boolean;
9
+ }
10
+
11
+ interface ImageTransformations {
12
+ height?: number;
13
+ width?: number;
14
+ }
15
+
16
+ interface ImageProps {
17
+ size?: string;
18
+ src: string;
19
+ alt?: string;
20
+ blurrredFallback?: boolean;
21
+ imageTransformations?: ImageTransformations;
22
+ className?: string;
23
+ }
24
+
25
+ interface VideoProps {
26
+ size?: string;
27
+ src: string;
28
+ videoTransformations?: string;
29
+ className?: string;
30
+ }
31
+
32
+ export function NeetoImageUploader(props: ImageUploaderProps): JSX.Element;
33
+
34
+ export function Image(props: ImageProps): JSX.Element;
35
+
36
+ export function Video(props: VideoProps): JSX.Element;