@threedddplus/logoeditor 0.0.1 → 0.0.2
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/LICENSE +20 -20
- package/README.md +181 -181
- package/dist/index.d.ts +4 -1
- package/dist/logoeditor.cjs.development.js +29 -7
- package/dist/logoeditor.cjs.development.js.map +1 -1
- package/dist/logoeditor.cjs.production.min.js +1 -1
- package/dist/logoeditor.cjs.production.min.js.map +1 -1
- package/dist/logoeditor.esm.js +29 -7
- package/dist/logoeditor.esm.js.map +1 -1
- package/dist/store/auth/index.d.ts +2 -0
- package/example/index.html +14 -14
- package/example/index.tsx +41 -41
- package/example/package.json +25 -25
- package/example/tsconfig.json +18 -18
- package/example/yarn.lock +5601 -5601
- package/package.json +125 -125
- package/example/.npmignore +0 -3
package/LICENSE
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
MIT License
|
2
|
-
|
3
|
-
Copyright (c) 2023 Syed Sadiq
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2023 Syed Sadiq
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
21
|
SOFTWARE.
|
package/README.md
CHANGED
@@ -1,181 +1,181 @@
|
|
1
|
-
# TSDX React w/ Storybook User Guide
|
2
|
-
|
3
|
-
Congrats! You just saved yourself hours of work by bootstrapping this project with TSDX. Let’s get you oriented with what’s here and how to use it.
|
4
|
-
|
5
|
-
> This TSDX setup is meant for developing React component libraries (not apps!) that can be published to NPM. If you’re looking to build a React-based app, you should use `create-react-app`, `razzle`, `nextjs`, `gatsby`, or `react-static`.
|
6
|
-
|
7
|
-
> If you’re new to TypeScript and React, checkout [this handy cheatsheet](https://github.com/sw-yx/react-typescript-cheatsheet/)
|
8
|
-
|
9
|
-
## Commands
|
10
|
-
|
11
|
-
TSDX scaffolds your new library inside `/src`, and also sets up a [Parcel-based](https://parceljs.org) playground for it inside `/example`.
|
12
|
-
|
13
|
-
The recommended workflow is to run TSDX in one terminal:
|
14
|
-
|
15
|
-
```bash
|
16
|
-
npm start # or yarn start
|
17
|
-
```
|
18
|
-
|
19
|
-
This builds to `/dist` and runs the project in watch mode so any edits you save inside `src` causes a rebuild to `/dist`.
|
20
|
-
|
21
|
-
Then run either Storybook or the example playground:
|
22
|
-
|
23
|
-
### Storybook
|
24
|
-
|
25
|
-
Run inside another terminal:
|
26
|
-
|
27
|
-
```bash
|
28
|
-
yarn storybook
|
29
|
-
```
|
30
|
-
|
31
|
-
This loads the stories from `./stories`.
|
32
|
-
|
33
|
-
> NOTE: Stories should reference the components as if using the library, similar to the example playground. This means importing from the root project directory. This has been aliased in the tsconfig and the storybook webpack config as a helper.
|
34
|
-
|
35
|
-
### Example
|
36
|
-
|
37
|
-
Then run the example inside another:
|
38
|
-
|
39
|
-
```bash
|
40
|
-
cd example
|
41
|
-
npm i # or yarn to install dependencies
|
42
|
-
npm start # or yarn start
|
43
|
-
```
|
44
|
-
|
45
|
-
The default example imports and live reloads whatever is in `/dist`, so if you are seeing an out of date component, make sure TSDX is running in watch mode like we recommend above. **No symlinking required**, we use [Parcel's aliasing](https://parceljs.org/module_resolution.html#aliases).
|
46
|
-
|
47
|
-
To do a one-off build, use `npm run build` or `yarn build`.
|
48
|
-
|
49
|
-
To run tests, use `npm test` or `yarn test`.
|
50
|
-
|
51
|
-
## Configuration
|
52
|
-
|
53
|
-
Code quality is set up for you with `prettier`, `husky`, and `lint-staged`. Adjust the respective fields in `package.json` accordingly.
|
54
|
-
|
55
|
-
### Jest
|
56
|
-
|
57
|
-
Jest tests are set up to run with `npm test` or `yarn test`.
|
58
|
-
|
59
|
-
### Bundle analysis
|
60
|
-
|
61
|
-
Calculates the real cost of your library using [size-limit](https://github.com/ai/size-limit) with `npm run size` and visulize it with `npm run analyze`.
|
62
|
-
|
63
|
-
#### Setup Files
|
64
|
-
|
65
|
-
This is the folder structure we set up for you:
|
66
|
-
|
67
|
-
```txt
|
68
|
-
/example
|
69
|
-
index.html
|
70
|
-
index.tsx # test your component here in a demo app
|
71
|
-
package.json
|
72
|
-
tsconfig.json
|
73
|
-
/src
|
74
|
-
index.tsx # EDIT THIS
|
75
|
-
/test
|
76
|
-
blah.test.tsx # EDIT THIS
|
77
|
-
/stories
|
78
|
-
Thing.stories.tsx # EDIT THIS
|
79
|
-
/.storybook
|
80
|
-
main.js
|
81
|
-
preview.js
|
82
|
-
.gitignore
|
83
|
-
package.json
|
84
|
-
README.md # EDIT THIS
|
85
|
-
tsconfig.json
|
86
|
-
```
|
87
|
-
|
88
|
-
#### React Testing Library
|
89
|
-
|
90
|
-
We do not set up `react-testing-library` for you yet, we welcome contributions and documentation on this.
|
91
|
-
|
92
|
-
### Rollup
|
93
|
-
|
94
|
-
TSDX uses [Rollup](https://rollupjs.org) as a bundler and generates multiple rollup configs for various module formats and build settings. See [Optimizations](#optimizations) for details.
|
95
|
-
|
96
|
-
### TypeScript
|
97
|
-
|
98
|
-
`tsconfig.json` is set up to interpret `dom` and `esnext` types, as well as `react` for `jsx`. Adjust according to your needs.
|
99
|
-
|
100
|
-
## Continuous Integration
|
101
|
-
|
102
|
-
### GitHub Actions
|
103
|
-
|
104
|
-
Two actions are added by default:
|
105
|
-
|
106
|
-
- `main` which installs deps w/ cache, lints, tests, and builds on all pushes against a Node and OS matrix
|
107
|
-
- `size` which comments cost comparison of your library on every pull request using [size-limit](https://github.com/ai/size-limit)
|
108
|
-
|
109
|
-
## Optimizations
|
110
|
-
|
111
|
-
Please see the main `tsdx` [optimizations docs](https://github.com/palmerhq/tsdx#optimizations). In particular, know that you can take advantage of development-only optimizations:
|
112
|
-
|
113
|
-
```js
|
114
|
-
// ./types/index.d.ts
|
115
|
-
declare var __DEV__: boolean;
|
116
|
-
|
117
|
-
// inside your code...
|
118
|
-
if (__DEV__) {
|
119
|
-
console.log('foo');
|
120
|
-
}
|
121
|
-
```
|
122
|
-
|
123
|
-
You can also choose to install and use [invariant](https://github.com/palmerhq/tsdx#invariant) and [warning](https://github.com/palmerhq/tsdx#warning) functions.
|
124
|
-
|
125
|
-
## Module Formats
|
126
|
-
|
127
|
-
CJS, ESModules, and UMD module formats are supported.
|
128
|
-
|
129
|
-
The appropriate paths are configured in `package.json` and `dist/index.js` accordingly. Please report if any issues are found.
|
130
|
-
|
131
|
-
## Deploying the Example Playground
|
132
|
-
|
133
|
-
The Playground is just a simple [Parcel](https://parceljs.org) app, you can deploy it anywhere you would normally deploy that. Here are some guidelines for **manually** deploying with the Netlify CLI (`npm i -g netlify-cli`):
|
134
|
-
|
135
|
-
```bash
|
136
|
-
cd example # if not already in the example folder
|
137
|
-
npm run build # builds to dist
|
138
|
-
netlify deploy # deploy the dist folder
|
139
|
-
```
|
140
|
-
|
141
|
-
Alternatively, if you already have a git repo connected, you can set up continuous deployment with Netlify:
|
142
|
-
|
143
|
-
```bash
|
144
|
-
netlify init
|
145
|
-
# build command: yarn build && cd example && yarn && yarn build
|
146
|
-
# directory to deploy: example/dist
|
147
|
-
# pick yes for netlify.toml
|
148
|
-
```
|
149
|
-
|
150
|
-
## Named Exports
|
151
|
-
|
152
|
-
Per Palmer Group guidelines, [always use named exports.](https://github.com/palmerhq/typescript#exports) Code split inside your React app instead of your React library.
|
153
|
-
|
154
|
-
## Including Styles
|
155
|
-
|
156
|
-
There are many ways to ship styles, including with CSS-in-JS. TSDX has no opinion on this, configure how you like.
|
157
|
-
|
158
|
-
For vanilla CSS, you can include it at the root directory and add it to the `files` section in your `package.json`, so that it can be imported separately by your users and run through their bundler's loader.
|
159
|
-
|
160
|
-
## Publishing to NPM
|
161
|
-
|
162
|
-
We recommend using [np](https://github.com/sindresorhus/np).
|
163
|
-
|
164
|
-
## Usage with Lerna
|
165
|
-
|
166
|
-
When creating a new package with TSDX within a project set up with Lerna, you might encounter a `Cannot resolve dependency` error when trying to run the `example` project. To fix that you will need to make changes to the `package.json` file _inside the `example` directory_.
|
167
|
-
|
168
|
-
The problem is that due to the nature of how dependencies are installed in Lerna projects, the aliases in the example project's `package.json` might not point to the right place, as those dependencies might have been installed in the root of your Lerna project.
|
169
|
-
|
170
|
-
Change the `alias` to point to where those packages are actually installed. This depends on the directory structure of your Lerna project, so the actual path might be different from the diff below.
|
171
|
-
|
172
|
-
```diff
|
173
|
-
"alias": {
|
174
|
-
- "react": "../node_modules/react",
|
175
|
-
- "react-dom": "../node_modules/react-dom"
|
176
|
-
+ "react": "../../../node_modules/react",
|
177
|
-
+ "react-dom": "../../../node_modules/react-dom"
|
178
|
-
},
|
179
|
-
```
|
180
|
-
|
181
|
-
An alternative to fixing this problem would be to remove aliases altogether and define the dependencies referenced as aliases as dev dependencies instead. [However, that might cause other problems.](https://github.com/palmerhq/tsdx/issues/64)
|
1
|
+
# TSDX React w/ Storybook User Guide
|
2
|
+
|
3
|
+
Congrats! You just saved yourself hours of work by bootstrapping this project with TSDX. Let’s get you oriented with what’s here and how to use it.
|
4
|
+
|
5
|
+
> This TSDX setup is meant for developing React component libraries (not apps!) that can be published to NPM. If you’re looking to build a React-based app, you should use `create-react-app`, `razzle`, `nextjs`, `gatsby`, or `react-static`.
|
6
|
+
|
7
|
+
> If you’re new to TypeScript and React, checkout [this handy cheatsheet](https://github.com/sw-yx/react-typescript-cheatsheet/)
|
8
|
+
|
9
|
+
## Commands
|
10
|
+
|
11
|
+
TSDX scaffolds your new library inside `/src`, and also sets up a [Parcel-based](https://parceljs.org) playground for it inside `/example`.
|
12
|
+
|
13
|
+
The recommended workflow is to run TSDX in one terminal:
|
14
|
+
|
15
|
+
```bash
|
16
|
+
npm start # or yarn start
|
17
|
+
```
|
18
|
+
|
19
|
+
This builds to `/dist` and runs the project in watch mode so any edits you save inside `src` causes a rebuild to `/dist`.
|
20
|
+
|
21
|
+
Then run either Storybook or the example playground:
|
22
|
+
|
23
|
+
### Storybook
|
24
|
+
|
25
|
+
Run inside another terminal:
|
26
|
+
|
27
|
+
```bash
|
28
|
+
yarn storybook
|
29
|
+
```
|
30
|
+
|
31
|
+
This loads the stories from `./stories`.
|
32
|
+
|
33
|
+
> NOTE: Stories should reference the components as if using the library, similar to the example playground. This means importing from the root project directory. This has been aliased in the tsconfig and the storybook webpack config as a helper.
|
34
|
+
|
35
|
+
### Example
|
36
|
+
|
37
|
+
Then run the example inside another:
|
38
|
+
|
39
|
+
```bash
|
40
|
+
cd example
|
41
|
+
npm i # or yarn to install dependencies
|
42
|
+
npm start # or yarn start
|
43
|
+
```
|
44
|
+
|
45
|
+
The default example imports and live reloads whatever is in `/dist`, so if you are seeing an out of date component, make sure TSDX is running in watch mode like we recommend above. **No symlinking required**, we use [Parcel's aliasing](https://parceljs.org/module_resolution.html#aliases).
|
46
|
+
|
47
|
+
To do a one-off build, use `npm run build` or `yarn build`.
|
48
|
+
|
49
|
+
To run tests, use `npm test` or `yarn test`.
|
50
|
+
|
51
|
+
## Configuration
|
52
|
+
|
53
|
+
Code quality is set up for you with `prettier`, `husky`, and `lint-staged`. Adjust the respective fields in `package.json` accordingly.
|
54
|
+
|
55
|
+
### Jest
|
56
|
+
|
57
|
+
Jest tests are set up to run with `npm test` or `yarn test`.
|
58
|
+
|
59
|
+
### Bundle analysis
|
60
|
+
|
61
|
+
Calculates the real cost of your library using [size-limit](https://github.com/ai/size-limit) with `npm run size` and visulize it with `npm run analyze`.
|
62
|
+
|
63
|
+
#### Setup Files
|
64
|
+
|
65
|
+
This is the folder structure we set up for you:
|
66
|
+
|
67
|
+
```txt
|
68
|
+
/example
|
69
|
+
index.html
|
70
|
+
index.tsx # test your component here in a demo app
|
71
|
+
package.json
|
72
|
+
tsconfig.json
|
73
|
+
/src
|
74
|
+
index.tsx # EDIT THIS
|
75
|
+
/test
|
76
|
+
blah.test.tsx # EDIT THIS
|
77
|
+
/stories
|
78
|
+
Thing.stories.tsx # EDIT THIS
|
79
|
+
/.storybook
|
80
|
+
main.js
|
81
|
+
preview.js
|
82
|
+
.gitignore
|
83
|
+
package.json
|
84
|
+
README.md # EDIT THIS
|
85
|
+
tsconfig.json
|
86
|
+
```
|
87
|
+
|
88
|
+
#### React Testing Library
|
89
|
+
|
90
|
+
We do not set up `react-testing-library` for you yet, we welcome contributions and documentation on this.
|
91
|
+
|
92
|
+
### Rollup
|
93
|
+
|
94
|
+
TSDX uses [Rollup](https://rollupjs.org) as a bundler and generates multiple rollup configs for various module formats and build settings. See [Optimizations](#optimizations) for details.
|
95
|
+
|
96
|
+
### TypeScript
|
97
|
+
|
98
|
+
`tsconfig.json` is set up to interpret `dom` and `esnext` types, as well as `react` for `jsx`. Adjust according to your needs.
|
99
|
+
|
100
|
+
## Continuous Integration
|
101
|
+
|
102
|
+
### GitHub Actions
|
103
|
+
|
104
|
+
Two actions are added by default:
|
105
|
+
|
106
|
+
- `main` which installs deps w/ cache, lints, tests, and builds on all pushes against a Node and OS matrix
|
107
|
+
- `size` which comments cost comparison of your library on every pull request using [size-limit](https://github.com/ai/size-limit)
|
108
|
+
|
109
|
+
## Optimizations
|
110
|
+
|
111
|
+
Please see the main `tsdx` [optimizations docs](https://github.com/palmerhq/tsdx#optimizations). In particular, know that you can take advantage of development-only optimizations:
|
112
|
+
|
113
|
+
```js
|
114
|
+
// ./types/index.d.ts
|
115
|
+
declare var __DEV__: boolean;
|
116
|
+
|
117
|
+
// inside your code...
|
118
|
+
if (__DEV__) {
|
119
|
+
console.log('foo');
|
120
|
+
}
|
121
|
+
```
|
122
|
+
|
123
|
+
You can also choose to install and use [invariant](https://github.com/palmerhq/tsdx#invariant) and [warning](https://github.com/palmerhq/tsdx#warning) functions.
|
124
|
+
|
125
|
+
## Module Formats
|
126
|
+
|
127
|
+
CJS, ESModules, and UMD module formats are supported.
|
128
|
+
|
129
|
+
The appropriate paths are configured in `package.json` and `dist/index.js` accordingly. Please report if any issues are found.
|
130
|
+
|
131
|
+
## Deploying the Example Playground
|
132
|
+
|
133
|
+
The Playground is just a simple [Parcel](https://parceljs.org) app, you can deploy it anywhere you would normally deploy that. Here are some guidelines for **manually** deploying with the Netlify CLI (`npm i -g netlify-cli`):
|
134
|
+
|
135
|
+
```bash
|
136
|
+
cd example # if not already in the example folder
|
137
|
+
npm run build # builds to dist
|
138
|
+
netlify deploy # deploy the dist folder
|
139
|
+
```
|
140
|
+
|
141
|
+
Alternatively, if you already have a git repo connected, you can set up continuous deployment with Netlify:
|
142
|
+
|
143
|
+
```bash
|
144
|
+
netlify init
|
145
|
+
# build command: yarn build && cd example && yarn && yarn build
|
146
|
+
# directory to deploy: example/dist
|
147
|
+
# pick yes for netlify.toml
|
148
|
+
```
|
149
|
+
|
150
|
+
## Named Exports
|
151
|
+
|
152
|
+
Per Palmer Group guidelines, [always use named exports.](https://github.com/palmerhq/typescript#exports) Code split inside your React app instead of your React library.
|
153
|
+
|
154
|
+
## Including Styles
|
155
|
+
|
156
|
+
There are many ways to ship styles, including with CSS-in-JS. TSDX has no opinion on this, configure how you like.
|
157
|
+
|
158
|
+
For vanilla CSS, you can include it at the root directory and add it to the `files` section in your `package.json`, so that it can be imported separately by your users and run through their bundler's loader.
|
159
|
+
|
160
|
+
## Publishing to NPM
|
161
|
+
|
162
|
+
We recommend using [np](https://github.com/sindresorhus/np).
|
163
|
+
|
164
|
+
## Usage with Lerna
|
165
|
+
|
166
|
+
When creating a new package with TSDX within a project set up with Lerna, you might encounter a `Cannot resolve dependency` error when trying to run the `example` project. To fix that you will need to make changes to the `package.json` file _inside the `example` directory_.
|
167
|
+
|
168
|
+
The problem is that due to the nature of how dependencies are installed in Lerna projects, the aliases in the example project's `package.json` might not point to the right place, as those dependencies might have been installed in the root of your Lerna project.
|
169
|
+
|
170
|
+
Change the `alias` to point to where those packages are actually installed. This depends on the directory structure of your Lerna project, so the actual path might be different from the diff below.
|
171
|
+
|
172
|
+
```diff
|
173
|
+
"alias": {
|
174
|
+
- "react": "../node_modules/react",
|
175
|
+
- "react-dom": "../node_modules/react-dom"
|
176
|
+
+ "react": "../../../node_modules/react",
|
177
|
+
+ "react-dom": "../../../node_modules/react-dom"
|
178
|
+
},
|
179
|
+
```
|
180
|
+
|
181
|
+
An alternative to fixing this problem would be to remove aliases altogether and define the dependencies referenced as aliases as dev dependencies instead. [However, that might cause other problems.](https://github.com/palmerhq/tsdx/issues/64)
|
package/dist/index.d.ts
CHANGED
@@ -6,8 +6,11 @@ import * as services from './services';
|
|
6
6
|
/**
|
7
7
|
* A custom App component. Neat!
|
8
8
|
*/
|
9
|
-
declare const LogoEditor: ({ stepperId, onApply }: {
|
9
|
+
declare const LogoEditor: ({ stepperId, onApply, customLogoColorList, defaultColorList, logoData, }: {
|
10
10
|
stepperId: any;
|
11
11
|
onApply: any;
|
12
|
+
customLogoColorList: any;
|
13
|
+
defaultColorList: any;
|
14
|
+
logoData: any;
|
12
15
|
}) => React.JSX.Element;
|
13
16
|
export { LogoEditor, Components, use3dddPlus, services };
|
@@ -944,6 +944,8 @@ var setSessionStorage = function setSessionStorage(cname, cvalue) {
|
|
944
944
|
|
945
945
|
var authSlice = function authSlice(set, get) {
|
946
946
|
return {
|
947
|
+
customUploadLogoColorList: [],
|
948
|
+
defaultColorList: [],
|
947
949
|
priceLevel: '',
|
948
950
|
token: '',
|
949
951
|
clearLoginInfo: function clearLoginInfo() {
|
@@ -1329,8 +1331,8 @@ var fabricSlice = function fabricSlice(set, get) {
|
|
1329
1331
|
};
|
1330
1332
|
};
|
1331
1333
|
|
1332
|
-
/* This Source Code Form is subject to the terms of the Mozilla Public
|
1333
|
-
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
1334
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
1335
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
1334
1336
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
1335
1337
|
|
1336
1338
|
function TIFFParser() {
|
@@ -1934,8 +1936,8 @@ TIFFParser.prototype = {
|
|
1934
1936
|
}
|
1935
1937
|
}
|
1936
1938
|
|
1937
|
-
/* for (var i = 0, numFileDirectories = this.fileDirectories.length; i < numFileDirectories; i++) {
|
1938
|
-
// Stuff
|
1939
|
+
/* for (var i = 0, numFileDirectories = this.fileDirectories.length; i < numFileDirectories; i++) {
|
1940
|
+
// Stuff
|
1939
1941
|
}*/
|
1940
1942
|
|
1941
1943
|
return this.canvas;
|
@@ -4586,6 +4588,7 @@ var MyLogo$1 = function MyLogo(_ref) {
|
|
4586
4588
|
if (logo) {
|
4587
4589
|
onApply();
|
4588
4590
|
setLogoSelected(false);
|
4591
|
+
console.log('handleApplyLogo', logo);
|
4589
4592
|
}
|
4590
4593
|
};
|
4591
4594
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
@@ -5855,14 +5858,33 @@ var MiddleMenu = function MiddleMenu(_ref) {
|
|
5855
5858
|
*/
|
5856
5859
|
var LogoEditor = function LogoEditor(_ref) {
|
5857
5860
|
var stepperId = _ref.stepperId,
|
5858
|
-
onApply = _ref.onApply
|
5861
|
+
onApply = _ref.onApply,
|
5862
|
+
customLogoColorList = _ref.customLogoColorList,
|
5863
|
+
defaultColorList = _ref.defaultColorList,
|
5864
|
+
logoData = _ref.logoData;
|
5859
5865
|
var _use3dddPlus = use3dddPlus(function (state) {
|
5860
|
-
return [state.setSelectedStepper];
|
5866
|
+
return [state.setSelectedStepper, state.myLogoHandler];
|
5861
5867
|
}),
|
5862
|
-
setSelectedStepper = _use3dddPlus[0]
|
5868
|
+
setSelectedStepper = _use3dddPlus[0],
|
5869
|
+
myLogoHandler = _use3dddPlus[1];
|
5863
5870
|
React__default.useEffect(function () {
|
5864
5871
|
setSelectedStepper(stepperId);
|
5872
|
+
if (stepperId == undefined) {
|
5873
|
+
myLogoHandler(logoData);
|
5874
|
+
console.log('logoData', logoData);
|
5875
|
+
}
|
5865
5876
|
}, [stepperId]);
|
5877
|
+
React__default.useEffect(function () {
|
5878
|
+
use3dddPlus.setState({
|
5879
|
+
customUploadLogoColorList: customLogoColorList
|
5880
|
+
});
|
5881
|
+
}, [customLogoColorList]);
|
5882
|
+
React__default.useEffect(function () {
|
5883
|
+
use3dddPlus.setState({
|
5884
|
+
defaultColorList: defaultColorList
|
5885
|
+
});
|
5886
|
+
}, [defaultColorList]);
|
5887
|
+
console.log('defaultColorList', defaultColorList);
|
5866
5888
|
return (
|
5867
5889
|
// <Modal
|
5868
5890
|
// backdropStyle={`z-[7]`}
|