@threedddplus/logoeditor 0.0.1 → 0.0.3

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.
@@ -11,6 +11,8 @@ export interface AuthSlice {
11
11
  generateCustomizerToken: (setInCookies?: boolean) => void;
12
12
  setCustomizerToken: () => void;
13
13
  isLoggedIn: () => boolean;
14
+ customUploadLogoColorList: any[];
15
+ defaultColorList: any[];
14
16
  }
15
17
  export declare const authSlice: StateCreator<AuthSlice>;
16
18
  export default AuthSlice;
@@ -1,14 +1,14 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <meta http-equiv="X-UA-Compatible" content="ie=edge" />
7
- <title>Playground</title>
8
- </head>
9
-
10
- <body>
11
- <div id="root"></div>
12
- <script src="./index.tsx"></script>
13
- </body>
14
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <meta http-equiv="X-UA-Compatible" content="ie=edge" />
7
+ <title>Playground</title>
8
+ </head>
9
+
10
+ <body>
11
+ <div id="root"></div>
12
+ <script src="./index.tsx"></script>
13
+ </body>
14
+ </html>
package/example/index.tsx CHANGED
@@ -1,41 +1,41 @@
1
- import 'react-app-polyfill/ie11';
2
- import * as React from 'react';
3
- import * as ReactDOM from 'react-dom';
4
- import { Componnets, use3dddPlus } from '../.';
5
- import { shallow } from 'zustand/shallow';
6
-
7
- const App = () => {
8
- const queryString = window.location.search;
9
- const urlParams = new URLSearchParams(queryString);
10
- const projectId = urlParams.get('projectId');
11
- const productId = urlParams.get('productId');
12
- const [accessToken] = use3dddPlus((state) => [state.accessToken], shallow);
13
- const modelId = use3dddPlus((state) => state.modelId);
14
-
15
- // API calls for Login in 3dddPlus
16
- React.useEffect(() => {
17
- if (!projectId) return;
18
- // setCookie('projectId', projectId, 1);
19
- use3dddPlus.getState().mutation.login(projectId);
20
- }, [projectId]);
21
-
22
- // API calls for Product Details and Varients Detail
23
- React.useEffect(() => {
24
- if (!accessToken) return;
25
- use3dddPlus.getState().queries.getDetails(productId!, projectId!);
26
- if (!modelId) return;
27
- use3dddPlus.getState().queries.getVarientByModelId(modelId!);
28
- }, [accessToken, modelId]);
29
- return (
30
- <div className="flex flex-col">
31
- {/* {children ||
32
- `You Should not see this Screen! If you're then the Customizer is still under maintainance`} */}
33
- <div className="flex md:flex-row flex-col h-screen">
34
- <Componnets.Canvas />
35
- <Componnets.Sidebar />
36
- </div>
37
- </div>
38
- );
39
- };
40
-
41
- ReactDOM.render(<App />, document.getElementById('root'));
1
+ import 'react-app-polyfill/ie11';
2
+ import * as React from 'react';
3
+ import * as ReactDOM from 'react-dom';
4
+ import { Componnets, use3dddPlus } from '../.';
5
+ import { shallow } from 'zustand/shallow';
6
+
7
+ const App = () => {
8
+ const queryString = window.location.search;
9
+ const urlParams = new URLSearchParams(queryString);
10
+ const projectId = urlParams.get('projectId');
11
+ const productId = urlParams.get('productId');
12
+ const [accessToken] = use3dddPlus((state) => [state.accessToken], shallow);
13
+ const modelId = use3dddPlus((state) => state.modelId);
14
+
15
+ // API calls for Login in 3dddPlus
16
+ React.useEffect(() => {
17
+ if (!projectId) return;
18
+ // setCookie('projectId', projectId, 1);
19
+ use3dddPlus.getState().mutation.login(projectId);
20
+ }, [projectId]);
21
+
22
+ // API calls for Product Details and Varients Detail
23
+ React.useEffect(() => {
24
+ if (!accessToken) return;
25
+ use3dddPlus.getState().queries.getDetails(productId!, projectId!);
26
+ if (!modelId) return;
27
+ use3dddPlus.getState().queries.getVarientByModelId(modelId!);
28
+ }, [accessToken, modelId]);
29
+ return (
30
+ <div className="flex flex-col">
31
+ {/* {children ||
32
+ `You Should not see this Screen! If you're then the Customizer is still under maintainance`} */}
33
+ <div className="flex md:flex-row flex-col h-screen">
34
+ <Componnets.Canvas />
35
+ <Componnets.Sidebar />
36
+ </div>
37
+ </div>
38
+ );
39
+ };
40
+
41
+ ReactDOM.render(<App />, document.getElementById('root'));
@@ -1,25 +1,25 @@
1
- {
2
- "name": "example",
3
- "version": "1.0.0",
4
- "main": "index.js",
5
- "license": "MIT",
6
- "scripts": {
7
- "start": "parcel index.html",
8
- "build": "parcel build index.html"
9
- },
10
- "dependencies": {
11
- "react-app-polyfill": "^1.0.0",
12
- "zustand": "^4.3.9"
13
- },
14
- "alias": {
15
- "react": "../node_modules/react",
16
- "react-dom": "../node_modules/react-dom/profiling",
17
- "scheduler/tracing": "../node_modules/scheduler/tracing-profiling"
18
- },
19
- "devDependencies": {
20
- "@types/react": "^16.9.11",
21
- "@types/react-dom": "^16.8.4",
22
- "parcel": "1.12.3",
23
- "typescript": "^3.4.5"
24
- }
25
- }
1
+ {
2
+ "name": "example",
3
+ "version": "1.0.0",
4
+ "main": "index.js",
5
+ "license": "MIT",
6
+ "scripts": {
7
+ "start": "parcel index.html",
8
+ "build": "parcel build index.html"
9
+ },
10
+ "dependencies": {
11
+ "react-app-polyfill": "^1.0.0",
12
+ "zustand": "^4.3.9"
13
+ },
14
+ "alias": {
15
+ "react": "../node_modules/react",
16
+ "react-dom": "../node_modules/react-dom/profiling",
17
+ "scheduler/tracing": "../node_modules/scheduler/tracing-profiling"
18
+ },
19
+ "devDependencies": {
20
+ "@types/react": "^16.9.11",
21
+ "@types/react-dom": "^16.8.4",
22
+ "parcel": "1.12.3",
23
+ "typescript": "^3.4.5"
24
+ }
25
+ }
@@ -1,18 +1,18 @@
1
- {
2
- "compilerOptions": {
3
- "allowSyntheticDefaultImports": false,
4
- "target": "es5",
5
- "module": "commonjs",
6
- "jsx": "react",
7
- "moduleResolution": "node",
8
- "noImplicitAny": false,
9
- "noUnusedLocals": false,
10
- "noUnusedParameters": false,
11
- "removeComments": true,
12
- "strictNullChecks": true,
13
- "preserveConstEnums": true,
14
- "sourceMap": true,
15
- "lib": ["es2015", "es2016", "dom"],
16
- "types": ["node"]
17
- }
18
- }
1
+ {
2
+ "compilerOptions": {
3
+ "allowSyntheticDefaultImports": false,
4
+ "target": "es5",
5
+ "module": "commonjs",
6
+ "jsx": "react",
7
+ "moduleResolution": "node",
8
+ "noImplicitAny": false,
9
+ "noUnusedLocals": false,
10
+ "noUnusedParameters": false,
11
+ "removeComments": true,
12
+ "strictNullChecks": true,
13
+ "preserveConstEnums": true,
14
+ "sourceMap": true,
15
+ "lib": ["es2015", "es2016", "dom"],
16
+ "types": ["node"]
17
+ }
18
+ }