wapplr 1.0.82 → 1.0.84
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.txt +0 -0
- package/README.md +0 -0
- package/dist/client/app.js +0 -0
- package/dist/client/config.js +0 -0
- package/dist/client/createClient.js +0 -0
- package/dist/client/history.js +0 -0
- package/dist/client/index.js +0 -0
- package/dist/client/middlewares.js +0 -0
- package/dist/common/config.js +0 -0
- package/dist/common/contents.js +0 -0
- package/dist/common/index.js +0 -0
- package/dist/common/log/index.js +0 -0
- package/dist/common/log/log.css +0 -0
- package/dist/common/log/log_css.js +2 -2
- package/dist/common/log/renderedContent.js +0 -0
- package/dist/common/logo/index.js +0 -0
- package/dist/common/logo/logo.css +0 -0
- package/dist/common/logo/logo_css.js +2 -2
- package/dist/common/middlewares.js +2 -1
- package/dist/common/requests.js +0 -0
- package/dist/common/router.js +82 -20
- package/dist/common/states.js +0 -0
- package/dist/common/styles.js +0 -0
- package/dist/common/template/app.css +0 -0
- package/dist/common/template/app_css.js +2 -2
- package/dist/common/template/index.js +0 -0
- package/dist/common/template/template.css +0 -0
- package/dist/common/template/template_css.js +2 -2
- package/dist/common/utils.js +0 -0
- package/dist/server/app.js +0 -0
- package/dist/server/config.js +0 -0
- package/dist/server/createServer.js +0 -0
- package/dist/server/html.js +0 -0
- package/dist/server/index.js +0 -0
- package/dist/server/middlewares.js +0 -0
- package/dist/server/static.js +0 -0
- package/package.json +2 -2
package/LICENSE.txt
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
File without changes
|
package/dist/client/app.js
CHANGED
|
File without changes
|
package/dist/client/config.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/client/history.js
CHANGED
|
File without changes
|
package/dist/client/index.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/common/config.js
CHANGED
|
File without changes
|
package/dist/common/contents.js
CHANGED
|
File without changes
|
package/dist/common/index.js
CHANGED
|
File without changes
|
package/dist/common/log/index.js
CHANGED
|
File without changes
|
package/dist/common/log/log.css
CHANGED
|
File without changes
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
const tokens = {"log":"
|
|
6
|
-
tokens._getCss = function () {return `/* imported from log.css */ .
|
|
5
|
+
const tokens = {"log":"log_3Wi9h","logo":"log_VkVt7"};
|
|
6
|
+
tokens._getCss = function () {return `/* imported from log.css */ .log_3Wi9h { display: -ms-flexbox; display: flex; -ms-flex-direction: column; flex-direction: column; -ms-flex-align: center; align-items: center; -ms-flex-pack: center; justify-content: center; -webkit-box-sizing: border-box; box-sizing: border-box; padding: 16px; width: 100%; height: 100%; position: absolute; } .log_VkVt7 { height: 128px; max-width: 100%; } .log_3Wi9h > div { width: 100%; text-align: center; } `;};
|
|
7
7
|
tokens._module = (typeof module !== "undefined") ? module : {id:"./common/log/log_css.js"};
|
|
8
8
|
exports["default"] = tokens;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
const tokens = {"logo":"
|
|
6
|
-
tokens._getCss = function () {return `/* imported from logo.css */ .
|
|
5
|
+
const tokens = {"logo":"logo_3qwrk","icon":"logo_34umO","svg":"logo_2_1PA"};
|
|
6
|
+
tokens._getCss = function () {return `/* imported from logo.css */ .logo_3qwrk { height: 100%; width: auto; display: -ms-inline-flexbox; display: inline-flex; -ms-flex-align: center; align-items: center; -ms-flex-pack: center; justify-content: center; } .logo_34umO { height: 90%; width: auto; } .logo_2_1PA { height: 100%; width: auto; display: -ms-flexbox; display: flex; max-width: 100%; } .logo_2_1PA path{ fill: currentColor; } `;};
|
|
7
7
|
tokens._module = (typeof module !== "undefined") ? module : {id:"./common/logo/logo_css.js"};
|
|
8
8
|
exports["default"] = tokens;
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports["default"] = createMiddlewares;
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
|
+
var _arrayLikeToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/arrayLikeToArray"));
|
|
9
10
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
10
11
|
var _log = _interopRequireDefault(require("./log"));
|
|
11
12
|
var _states = _interopRequireDefault(require("./states"));
|
|
@@ -177,7 +178,7 @@ function createWappMiddleware() {
|
|
|
177
178
|
attributes[_key] = arguments[_key];
|
|
178
179
|
}
|
|
179
180
|
var html = attributes[0],
|
|
180
|
-
restAttr = attributes.slice(1);
|
|
181
|
+
restAttr = (0, _arrayLikeToArray2["default"])(attributes).slice(1);
|
|
181
182
|
wappResponse.sendData = {
|
|
182
183
|
data: html
|
|
183
184
|
};
|
package/dist/common/requests.js
CHANGED
|
File without changes
|
package/dist/common/router.js
CHANGED
|
@@ -17,6 +17,60 @@ function createDefaultRouter() {
|
|
|
17
17
|
var p = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
18
18
|
var wapp = p.wapp,
|
|
19
19
|
routes = p.routes;
|
|
20
|
+
function matchFlexible(rPath, sPath) {
|
|
21
|
+
var rpa = rPath.split("/");
|
|
22
|
+
var pa = sPath.split("/");
|
|
23
|
+
var prefixEnd = 0;
|
|
24
|
+
for (var i = 0; i < rpa.length; i++) {
|
|
25
|
+
var seg = rpa[i];
|
|
26
|
+
if (seg && seg.slice(0, 1) !== ":" && seg !== "*") {
|
|
27
|
+
if (i + 1 < rpa.length && rpa[i + 1] && rpa[i + 1].slice(0, 1) === ":") {
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
prefixEnd = i + 1;
|
|
31
|
+
} else {
|
|
32
|
+
prefixEnd = i + 1;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
for (var _i = 0; _i < prefixEnd; _i++) {
|
|
36
|
+
if (typeof pa[_i] !== "string" || pa[_i] !== rpa[_i]) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
var expectedPairs = {};
|
|
41
|
+
var expectedCount = 0;
|
|
42
|
+
for (var _i2 = prefixEnd; _i2 < rpa.length - 1; _i2 += 2) {
|
|
43
|
+
var key = rpa[_i2];
|
|
44
|
+
var paramSeg = rpa[_i2 + 1];
|
|
45
|
+
if (key && paramSeg && paramSeg.slice(0, 1) === ":") {
|
|
46
|
+
expectedPairs[key] = paramSeg.slice(1);
|
|
47
|
+
expectedCount++;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
var remaining = pa.slice(prefixEnd);
|
|
51
|
+
if (remaining.length % 2 !== 0) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
var actualPairs = {};
|
|
55
|
+
var actualCount = 0;
|
|
56
|
+
for (var _i3 = 0; _i3 < remaining.length; _i3 += 2) {
|
|
57
|
+
actualPairs[remaining[_i3]] = remaining[_i3 + 1];
|
|
58
|
+
actualCount++;
|
|
59
|
+
}
|
|
60
|
+
if (actualCount !== expectedCount) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
var thisParams = {};
|
|
64
|
+
var expectedKeys = Object.keys(expectedPairs);
|
|
65
|
+
for (var k = 0; k < expectedKeys.length; k++) {
|
|
66
|
+
var ek = expectedKeys[k];
|
|
67
|
+
if (typeof actualPairs[ek] === "undefined") {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
thisParams[expectedPairs[ek]] = actualPairs[ek];
|
|
71
|
+
}
|
|
72
|
+
return thisParams;
|
|
73
|
+
}
|
|
20
74
|
function match() {
|
|
21
75
|
var p = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
22
76
|
var path = p.path;
|
|
@@ -30,30 +84,38 @@ function createDefaultRouter() {
|
|
|
30
84
|
try {
|
|
31
85
|
var rPath = r.path.slice(-1) === "/" ? r.path.slice(0, -1) : r.path;
|
|
32
86
|
var sPath = path.slice(-1) === "/" ? path.slice(0, -1) : path;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
var param = rpas && rpas.slice(0, 1) === ":";
|
|
39
|
-
var allow = rpas === "*";
|
|
40
|
-
if (allow) {
|
|
41
|
-
wasAllowChar = true;
|
|
87
|
+
if (r.flexibleParams) {
|
|
88
|
+
var flexResult = matchFlexible(rPath, sPath);
|
|
89
|
+
if (flexResult) {
|
|
90
|
+
thisParams = flexResult;
|
|
91
|
+
_match = true;
|
|
42
92
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
93
|
+
} else {
|
|
94
|
+
var rpa = rPath.split("/");
|
|
95
|
+
var pa = sPath.split("/");
|
|
96
|
+
var allPartIsMatch = true;
|
|
97
|
+
var wasAllowChar = false;
|
|
98
|
+
rpa.forEach(function (rpas, i) {
|
|
99
|
+
var param = rpas && rpas.slice(0, 1) === ":";
|
|
100
|
+
var allow = rpas === "*";
|
|
101
|
+
if (allow) {
|
|
102
|
+
wasAllowChar = true;
|
|
46
103
|
}
|
|
47
|
-
if (
|
|
48
|
-
|
|
104
|
+
if (typeof pa[i] == "string") {
|
|
105
|
+
if (pa[i] === rpas || param || allow) {} else {
|
|
106
|
+
allPartIsMatch = false;
|
|
107
|
+
}
|
|
108
|
+
if (param) {
|
|
109
|
+
thisParams[rpas.slice(1)] = pa[i];
|
|
110
|
+
}
|
|
49
111
|
}
|
|
112
|
+
});
|
|
113
|
+
if (pa.length > rpa.length && !wasAllowChar) {
|
|
114
|
+
allPartIsMatch = false;
|
|
115
|
+
}
|
|
116
|
+
if (allPartIsMatch) {
|
|
117
|
+
_match = true;
|
|
50
118
|
}
|
|
51
|
-
});
|
|
52
|
-
if (pa.length > rpa.length && !wasAllowChar) {
|
|
53
|
-
allPartIsMatch = false;
|
|
54
|
-
}
|
|
55
|
-
if (allPartIsMatch) {
|
|
56
|
-
_match = true;
|
|
57
119
|
}
|
|
58
120
|
} catch (e) {}
|
|
59
121
|
if (_match && !route) {
|
package/dist/common/states.js
CHANGED
|
File without changes
|
package/dist/common/styles.js
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
const tokens = {"app":"
|
|
6
|
-
tokens._getCss = function () {return `/* imported from app.css */ body { margin: 0; padding: 0; max-width: 100vw; overflow-x: hidden; } * { -webkit-box-sizing: border-box; box-sizing: border-box; } .
|
|
5
|
+
const tokens = {"app":"app_2f0Nm"};
|
|
6
|
+
tokens._getCss = function () {return `/* imported from app.css */ body { margin: 0; padding: 0; max-width: 100vw; overflow-x: hidden; } * { -webkit-box-sizing: border-box; box-sizing: border-box; } .app_2f0Nm { font-size: 14px; color: rgba(0,0,0,0.87); display: block; position: relative; overflow-x: hidden; } div.app_2f0Nm > * { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } @media (orientation: portrait) { .app_2f0Nm { max-width: 100vh; } } `;};
|
|
7
7
|
tokens._module = (typeof module !== "undefined") ? module : {id:"./common/template/app_css.js"};
|
|
8
8
|
exports["default"] = tokens;
|
|
File without changes
|
|
File without changes
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
const tokens = {"page":"
|
|
6
|
-
tokens._getCss = function () {return `/* imported from template.css */ .
|
|
5
|
+
const tokens = {"page":"template_2pYWt","header":"template_2eiGu","sticky":"template_3UDsg","innerHeader":"template_3kWDb","logo":"template_qf6kn","content":"template_mZfJ1","footer":"template_3WkoV","menu":"template__Jeh1","button":"template_2AgIs","copyright":"template_1_9QV"};
|
|
6
|
+
tokens._getCss = function () {return `/* imported from template.css */ .template_2pYWt { display: block; position: relative; overflow-x: hidden; overflow-y: hidden; min-height: 100vh; max-width: 100vw; } .template_2eiGu { display: block; position: fixed; width: 100%; height: 64px; padding: 6px; background: white; z-index: 1; -webkit-transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; } .template_2eiGu.template_3UDsg { -webkit-box-shadow: 0 2px 3px rgba(62, 62, 62, 0.15); box-shadow: 0 2px 3px rgba(62, 62, 62, 0.15); } .template_3kWDb { display: block; width: 100%; height: 100%; position: relative; overflow: hidden; } .template_2eiGu .template_qf6kn { height: 52px; -webkit-transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; margin-top: 100%; } .template_2eiGu.template_3UDsg .template_qf6kn { margin-top: 0; } .template_mZfJ1 { min-height: 100vh; position: relative; padding-top: 64px; } .template_3WkoV { display: -ms-flexbox; display: flex; min-height: 128px; -ms-flex-align: center; align-items: center; -ms-flex-pack: center; justify-content: center; } .template__Jeh1 { } .template__Jeh1 > div { } .template_3WkoV .template__Jeh1 { -ms-flex-pack: center; justify-content: center; display: -ms-flexbox; display: flex; } .template_3WkoV .template__Jeh1 > div { display: inline-block; } .template_2AgIs { color: rgba(0, 0, 0, 0.87); padding: 6px 16px; font-size: 14px; font-size: 0.875rem; min-width: 64px; -webkit-box-sizing: border-box; box-sizing: border-box; -webkit-transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,-webkit-box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,-webkit-box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,-webkit-box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; line-height: 1.75; border-radius: 4px; letter-spacing: 0.02857em; text-transform: uppercase; font-weight: bold; border: 0; cursor: pointer; margin: 0; display: -ms-inline-flexbox; display: inline-flex; outline: 0; position: relative; -ms-flex-align: center; align-items: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; vertical-align: middle; -ms-flex-pack: center; justify-content: center; text-decoration: none; background-color: transparent; text-align: center; } a.template_2AgIs { text-decoration: none; } .template_1_9QV { font-size: 12px; margin: 24px; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } `;};
|
|
7
7
|
tokens._module = (typeof module !== "undefined") ? module : {id:"./common/template/template_css.js"};
|
|
8
8
|
exports["default"] = tokens;
|
package/dist/common/utils.js
CHANGED
|
File without changes
|
package/dist/server/app.js
CHANGED
|
File without changes
|
package/dist/server/config.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/server/html.js
CHANGED
|
File without changes
|
package/dist/server/index.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/server/static.js
CHANGED
|
File without changes
|
package/package.json
CHANGED