@mirai/core 0.1.1
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/.env.development +8 -0
- package/.env.production +9 -0
- package/.eslintcache +1 -0
- package/.gitlab-ci.yml +16 -0
- package/.nvmrc +1 -0
- package/.parcel-cache/006382683751cb2c +0 -0
- package/.parcel-cache/51ea8fb016c64eb8 +0 -0
- package/.parcel-cache/70c3d7e52fdd0976 +0 -0
- package/.parcel-cache/748e64b1ec39ac27.txt +40036 -0
- package/.parcel-cache/data.mdb +0 -0
- package/.parcel-cache/ecf7e61a8deef7e6 +0 -0
- package/.parcel-cache/lock.mdb +0 -0
- package/README.md +1 -0
- package/dist/Environment.4d7269b8.js +1 -0
- package/dist/Finder.69dd37d8.js +1 -0
- package/dist/Finder.a1939c41.css +1 -0
- package/dist/Ghost.e921253c.js +1 -0
- package/dist/Session.56d47c98.css +1 -0
- package/dist/Session.e424a026.js +1 -0
- package/dist/Session.f41c5015.js +4 -0
- package/dist/Signup.27ec86f1.js +1 -0
- package/dist/State.148b99f5.css +1 -0
- package/dist/State.205b6d65.js +1 -0
- package/dist/index.css +1 -0
- package/dist/index.js +7 -0
- package/package.json +64 -0
- package/public/index.css +78 -0
- package/public/index.html +87 -0
- package/scripts/command.js +12 -0
- package/scripts/test.js +9 -0
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mirai/core",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"source": "src/index.js",
|
|
5
|
+
"repository": "https://gitlab.com/miraicorp/dev/frontend/core",
|
|
6
|
+
"author": "JΛVI <hello@soyjavi.com>",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"setup": "rm -rf node_modules && rm -rf yarn.lock && yarn install --force",
|
|
10
|
+
"start": "parcel public/index.html --dist-dir build --port 8080 --host local.mirai.com --open",
|
|
11
|
+
"build": "rm -rf dist && parcel build --dist-dir dist --no-source-maps --no-autoinstall --detailed-report",
|
|
12
|
+
"build:dev": "rm -rf dist && NODE_ENV=development parcel build --dist-dir dist",
|
|
13
|
+
"lint": "eslint --cache --fix --format codeframe --ext .jsx,.js src",
|
|
14
|
+
"test": "node scripts/test.js --watchAll=false",
|
|
15
|
+
"test:coverage": "node scripts/test.js --coverage --coverageReporters=text --detectOpenHandles --forceExit --silent",
|
|
16
|
+
"test:watch": "node scripts/test.js",
|
|
17
|
+
"pipeline": "yarn lint && yarn test && yarn build",
|
|
18
|
+
"release": "yarn version --patch && yarn publish --access public"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@mirai/data-sources": "^0.1",
|
|
22
|
+
"@mirai/finder": "^0.1",
|
|
23
|
+
"@mirai/locale": "^0.2",
|
|
24
|
+
"@mirai/services": "^0.2",
|
|
25
|
+
"@mirai/ui": "^1.0",
|
|
26
|
+
"@mirai/user": "^0.1",
|
|
27
|
+
"prop-types": "^15.8.1",
|
|
28
|
+
"react": "^17.0.2",
|
|
29
|
+
"react-dom": "^17.0.2",
|
|
30
|
+
"react-icons": "^4.7.1"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@mirai/eslint": "^0.1",
|
|
34
|
+
"@testing-library/react": "12.1.5",
|
|
35
|
+
"@testing-library/react-hooks": "7.0.2",
|
|
36
|
+
"jest-fetch-mock": "^3.0.3",
|
|
37
|
+
"parcel": "2.7.0",
|
|
38
|
+
"process": "0.11.10",
|
|
39
|
+
"react-scripts": "5.0.1"
|
|
40
|
+
},
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=16.15.0"
|
|
43
|
+
},
|
|
44
|
+
"resolutions": {
|
|
45
|
+
"@mirai/data-sources": "^0.1",
|
|
46
|
+
"@mirai/locale": "^0.2",
|
|
47
|
+
"@mirai/services": "^0.2",
|
|
48
|
+
"@mirai/ui": "^1.0",
|
|
49
|
+
"react": "^17.0.2",
|
|
50
|
+
"react-dom": "^17.0.2"
|
|
51
|
+
},
|
|
52
|
+
"browserslist": "> 0.5%, last 2 versions, not dead",
|
|
53
|
+
"targets": {
|
|
54
|
+
"default": {
|
|
55
|
+
"context": "browser",
|
|
56
|
+
"includeNodeModules": true
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"@parcel/transformer-css": {
|
|
60
|
+
"cssModules": {
|
|
61
|
+
"dashedIdents": true
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
package/public/index.css
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
@import '../node_modules/@mirai/ui/build/theme/default.theme.css';
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
/* legacy */
|
|
5
|
+
/* --corporative-color: #f2a900; */
|
|
6
|
+
--border-radius: 2px;
|
|
7
|
+
/* theming */
|
|
8
|
+
--mirai-ui-accent: #f2a900;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
body {
|
|
12
|
+
color: var(--mirai-ui-content);
|
|
13
|
+
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
|
|
14
|
+
margin: 0;
|
|
15
|
+
padding: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
header,
|
|
19
|
+
footer {
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
width: 100%;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
header {
|
|
25
|
+
background-color: var(--mirai-ui-accent);
|
|
26
|
+
padding: 0.25rem 1rem;
|
|
27
|
+
position: fixed;
|
|
28
|
+
top: 0;
|
|
29
|
+
z-index: 1;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
header h1 {
|
|
33
|
+
flex: 1;
|
|
34
|
+
font-size: var(--mirai-ui-font-size-headline-3);
|
|
35
|
+
color: var(--mirai-ui-base);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
header nav > * {
|
|
39
|
+
margin-left: 1rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
section {
|
|
43
|
+
padding: 1rem;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
section.booking {
|
|
47
|
+
background-color: var(--mirai-ui-content-border);
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
padding-top: 6rem;
|
|
52
|
+
min-height: 6rem;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
section article {
|
|
56
|
+
padding: 1rem;
|
|
57
|
+
width: 50%;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
footer {
|
|
61
|
+
display: flex;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
background-color: var(--mirai-ui-content-border);
|
|
64
|
+
padding: 1rem;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.row {
|
|
68
|
+
align-items: center;
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-direction: row;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.wrapper {
|
|
74
|
+
align-items: flex-start;
|
|
75
|
+
max-width: calc(var(--mirai-ui-breakpoint-content) * 0.75);
|
|
76
|
+
margin: 0 auto;
|
|
77
|
+
width: 100%;
|
|
78
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
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" />
|
|
6
|
+
<title>@mirai/core</title>
|
|
7
|
+
<link rel="stylesheet" href="index.css" rel="preload" defer />
|
|
8
|
+
<!-- <link rel="stylesheet" href="../dist/index.css" /> -->
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
12
|
+
|
|
13
|
+
<!-- <div data-mirai-id="500255" data-type="chain" data-locale="es-ES" hidden></div> -->
|
|
14
|
+
<!-- <div data-mirai-id="501404" data-locale="en-GB" data-currency="GBP" hidden></div> -->
|
|
15
|
+
<div data-mirai-id="501404" data-type="chain" hidden></div>
|
|
16
|
+
|
|
17
|
+
<header class="row">
|
|
18
|
+
<h1>@mirai/core</h1>
|
|
19
|
+
<nav class="row">
|
|
20
|
+
<div data-mirai-component="session">
|
|
21
|
+
<!-- <button class="login" data-ghost>Login</button> -->
|
|
22
|
+
|
|
23
|
+
<!-- <div class="session" data-ghost>
|
|
24
|
+
<small class="email">{{email}}</small>
|
|
25
|
+
<span>{{firstName}}</span>
|
|
26
|
+
<span>{{lastName}}</span>
|
|
27
|
+
</div> -->
|
|
28
|
+
</div>
|
|
29
|
+
<div data-mirai-component="environment" class="row"></div>
|
|
30
|
+
<div data-mirai-component="state"></div>
|
|
31
|
+
</nav>
|
|
32
|
+
</header>
|
|
33
|
+
|
|
34
|
+
<section class="booking">
|
|
35
|
+
<div data-mirai-component="finder"></div>
|
|
36
|
+
</section>
|
|
37
|
+
|
|
38
|
+
<section class="row wrapper">
|
|
39
|
+
<article>
|
|
40
|
+
<h2>Lorem ipsum dolor sit amet consectetur adipisicing elit.</h2>
|
|
41
|
+
<p>
|
|
42
|
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestiae laborum corrupti sapiente illo suscipit
|
|
43
|
+
nisi in, maxime natus, architecto excepturi ipsum ducimus alias eligendi repudiandae consequuntur, fuga
|
|
44
|
+
explicabo rerum modi.
|
|
45
|
+
</p>
|
|
46
|
+
<p>
|
|
47
|
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestiae laborum corrupti sapiente illo suscipit
|
|
48
|
+
nisi in, maxime natus, architecto excepturi ipsum ducimus alias eligendi repudiandae consequuntur, fuga
|
|
49
|
+
explicabo rerum modi.
|
|
50
|
+
</p>
|
|
51
|
+
<p>
|
|
52
|
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestiae laborum corrupti sapiente illo suscipit
|
|
53
|
+
nisi in, maxime natus, architecto excepturi ipsum ducimus alias eligendi repudiandae consequuntur, fuga
|
|
54
|
+
explicabo rerum modi.
|
|
55
|
+
</p>
|
|
56
|
+
<p>
|
|
57
|
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestiae laborum corrupti sapiente illo suscipit
|
|
58
|
+
nisi in, maxime natus, architecto excepturi ipsum ducimus alias eligendi repudiandae consequuntur, fuga
|
|
59
|
+
explicabo rerum modi.
|
|
60
|
+
</p>
|
|
61
|
+
<p>
|
|
62
|
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestiae laborum corrupti sapiente illo suscipit
|
|
63
|
+
nisi in, maxime natus, architecto excepturi ipsum ducimus alias eligendi repudiandae consequuntur, fuga
|
|
64
|
+
explicabo rerum modi.
|
|
65
|
+
</p>
|
|
66
|
+
</article>
|
|
67
|
+
<article>
|
|
68
|
+
<div data-mirai-component="signup"></div>
|
|
69
|
+
</article>
|
|
70
|
+
</section>
|
|
71
|
+
|
|
72
|
+
<section class="wrapper">
|
|
73
|
+
<!-- <div data-mirai-component="ghost"></div> -->
|
|
74
|
+
|
|
75
|
+
<!-- This ones are not in our repository> -->
|
|
76
|
+
<div data-mirai-component="login" data-id="10030559"></div>
|
|
77
|
+
<div data-mirai-component="fi_nder" data-id="10030559"></div>
|
|
78
|
+
</section>
|
|
79
|
+
|
|
80
|
+
<footer>
|
|
81
|
+
<small>Copyright, 2022</small>
|
|
82
|
+
</footer>
|
|
83
|
+
|
|
84
|
+
<script type="module" defer src="../src/index.js"></script>
|
|
85
|
+
<!-- <script type="module" defer src="../dist/index.js"></script> -->
|
|
86
|
+
</body>
|
|
87
|
+
</html>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const { execSync } = require('child_process');
|
|
2
|
+
|
|
3
|
+
const breakline = () => console.log(line());
|
|
4
|
+
const line = (char = '-') => `\n${Array(78).join(char)}\n`;
|
|
5
|
+
|
|
6
|
+
const command = async (command, verbose = true) => {
|
|
7
|
+
if (verbose) console.log(line(), `⚙️ ${command}`, line());
|
|
8
|
+
|
|
9
|
+
execSync(command, { stdio: 'inherit' });
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
module.exports = { breakline, command };
|
package/scripts/test.js
ADDED