@proteinjs/server 3.3.0 → 3.4.0
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.4.0](https://github.com/proteinjs/server/compare/@proteinjs/server@3.3.1...@proteinjs/server@3.4.0) (2026-08-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* maximum-scale=1 in the viewport meta — iOS auto-zoom on sub-16px input focus left the page zoomed and pannable ([5cef4bb](https://github.com/proteinjs/server/commit/5cef4bbdc633d147ea06385b816fc79115dda708))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* mobile meta tags in the react app shell ([1baa8e1](https://github.com/proteinjs/server/commit/1baa8e10028e5ca71e8b7e6098e29e0207e523bc))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [3.3.1](https://github.com/proteinjs/server/compare/@proteinjs/server@3.3.0...@proteinjs/server@3.3.1) (2026-08-13)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @proteinjs/server
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
6
30
|
# [3.3.0](https://github.com/proteinjs/server/compare/@proteinjs/server@3.2.1...@proteinjs/server@3.3.0) (2026-08-12)
|
|
7
31
|
|
|
8
32
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactApp.d.ts","sourceRoot":"","sources":["../../../src/routes/reactApp.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAA4B,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"reactApp.d.ts","sourceRoot":"","sources":["../../../src/routes/reactApp.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAA4B,MAAM,uBAAuB,CAAC;AAU/E,eAAO,MAAM,cAAc,iBAAkB,YAAY;;;yBAI1B,GAAG,YAAY,GAAG,KAAG,QAAQ,IAAI,CAAC;CA+BhE,CAAC"}
|
|
@@ -45,6 +45,11 @@ var react_helmet_1 = __importDefault(require("react-helmet"));
|
|
|
45
45
|
var server_api_1 = require("@proteinjs/server-api");
|
|
46
46
|
var util_node_1 = require("@proteinjs/util-node");
|
|
47
47
|
var DevClientBuild_1 = require("../DevClientBuild");
|
|
48
|
+
// Browser-chrome ground colors mirrored from @n3xah/util-ui Theme.tsx getTheme()
|
|
49
|
+
// (lightPalette/darkPalette `background.default`) — proteinjs cannot import n3xah,
|
|
50
|
+
// so the hex values are hard-coded here and must track that file.
|
|
51
|
+
var THEME_COLOR_LIGHT = '#FAFAFB';
|
|
52
|
+
var THEME_COLOR_DARK = '#202020';
|
|
48
53
|
var createReactApp = function (serverConfig) {
|
|
49
54
|
return {
|
|
50
55
|
path: '*',
|
|
@@ -63,7 +68,7 @@ var createReactApp = function (serverConfig) {
|
|
|
63
68
|
}
|
|
64
69
|
helmet = react_helmet_1.default.renderStatic();
|
|
65
70
|
_b = (_a = response).send;
|
|
66
|
-
_e = (_d = "<!DOCTYPE html>\n <html ".concat(helmet.htmlAttributes, ">\n <head>\n <meta charset='utf-8' />\n <meta name='viewport' content='width=device-width, initial-scale=1.0'>\n <link href='").concat(((_j = serverConfig.staticContent) === null || _j === void 0 ? void 0 : _j.faviconPath) ? path_1.default.join('/static/', serverConfig.staticContent.faviconPath) : '', "' rel='icon' type='image/png' />\n ").concat(helmet.title.toString(), "\n ").concat(helmet.meta.toString(), "\n ").concat(helmet.link.toString(), "\n </head>\n <body ").concat(helmet.bodyAttributes.toString(), ">\n <div id='app'></div>\n <script>proteinjs = {};</script>\n ")).concat;
|
|
71
|
+
_e = (_d = "<!DOCTYPE html>\n <html ".concat(helmet.htmlAttributes, ">\n <head>\n <meta charset='utf-8' />\n <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover'>\n <meta name='theme-color' content='").concat(THEME_COLOR_LIGHT, "' media='(prefers-color-scheme: light)'>\n <meta name='theme-color' content='").concat(THEME_COLOR_DARK, "' media='(prefers-color-scheme: dark)'>\n <link href='").concat(((_j = serverConfig.staticContent) === null || _j === void 0 ? void 0 : _j.faviconPath) ? path_1.default.join('/static/', serverConfig.staticContent.faviconPath) : '', "' rel='icon' type='image/png' />\n ").concat(helmet.title.toString(), "\n ").concat(helmet.meta.toString(), "\n ").concat(helmet.link.toString(), "\n </head>\n <body ").concat(helmet.bodyAttributes.toString(), ">\n <div id='app'></div>\n <script>proteinjs = {};</script>\n ")).concat;
|
|
67
72
|
return [4 /*yield*/, serverRenderedScriptTags()];
|
|
68
73
|
case 1:
|
|
69
74
|
_f = (_c = _e.apply(_d, [_k.sent(), "\n "])).concat;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactApp.js","sourceRoot":"","sources":["../../../src/routes/reactApp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAwB;AACxB,8DAAuC;AACvC,oDAA+E;AAC/E,kDAA0C;AAC1C,oDAAmD;
|
|
1
|
+
{"version":3,"file":"reactApp.js","sourceRoot":"","sources":["../../../src/routes/reactApp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAwB;AACxB,8DAAuC;AACvC,oDAA+E;AAC/E,kDAA0C;AAC1C,oDAAmD;AAEnD,iFAAiF;AACjF,mFAAmF;AACnF,kEAAkE;AAClE,IAAM,iBAAiB,GAAG,SAAS,CAAC;AACpC,IAAM,gBAAgB,GAAG,SAAS,CAAC;AAE5B,IAAM,cAAc,GAAG,UAAC,YAA0B;IACvD,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S,GAAG,SAAgE;oBAClF,WAAgC,EAAT,uBAAS,EAAT,uBAAS,EAAT,IAAS,EAAE;wBAAvB,QAAQ;wBACX,YAAY,GAAG,cAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,aAAa,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;wBAC1F,UAAU,CAAC,IAAI,CAAC,uBAAgB,cAAI,CAAC,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,gBAAa,CAAC,CAAC;qBACnF;;wBAGH,sBAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAC;;;;CAC9B;AAED,SAAe,wBAAwB;;;;;;oBAC/B,OAAO,GAAG,IAAA,qCAAwB,GAAE,CAAC;oBACrC,UAAU,GAAa,EAAE,CAAC;0BACJ,EAAP,mBAAO;;;yBAAP,CAAA,qBAAO,CAAA;oBAAjB,MAAM;oBACf,KAAA,CAAA,KAAA,UAAU,CAAA,CAAC,IAAI,CAAA;;oBAAY,qBAAM,MAAM,CAAC,MAAM,EAAE,EAAA;;oBAAhD,cAAgB,sBAAW,SAAqB,eAAW,EAAC,CAAC;;;oBAD1C,IAAO,CAAA;;wBAI5B,sBAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAC;;;;CAC9B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proteinjs/server",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "A server impl",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"test": "jest --runInBand"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@proteinjs/event": "^1.0.
|
|
25
|
+
"@proteinjs/event": "^1.0.18",
|
|
26
26
|
"@proteinjs/logger": "^1.0.21",
|
|
27
27
|
"@proteinjs/reflection": "^1.1.12",
|
|
28
|
-
"@proteinjs/server-api": "^3.1.
|
|
28
|
+
"@proteinjs/server-api": "^3.1.1",
|
|
29
29
|
"@proteinjs/util-node": "^1.10.1",
|
|
30
30
|
"body-parser": "1.19.0",
|
|
31
31
|
"cookie-parser": "1.4.5",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
},
|
|
65
65
|
"main": "./dist/generated/index.js",
|
|
66
66
|
"types": "./dist/generated/index.d.ts",
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "39aaa3c4d8cc17b359d34583b34c84911d77b840"
|
|
68
68
|
}
|
package/src/routes/reactApp.ts
CHANGED
|
@@ -4,6 +4,12 @@ import { ServerConfig, getServerRenderedScripts } from '@proteinjs/server-api';
|
|
|
4
4
|
import { Fs } from '@proteinjs/util-node';
|
|
5
5
|
import { DevClientBuild } from '../DevClientBuild';
|
|
6
6
|
|
|
7
|
+
// Browser-chrome ground colors mirrored from @n3xah/util-ui Theme.tsx getTheme()
|
|
8
|
+
// (lightPalette/darkPalette `background.default`) — proteinjs cannot import n3xah,
|
|
9
|
+
// so the hex values are hard-coded here and must track that file.
|
|
10
|
+
const THEME_COLOR_LIGHT = '#FAFAFB';
|
|
11
|
+
const THEME_COLOR_DARK = '#202020';
|
|
12
|
+
|
|
7
13
|
export const createReactApp = (serverConfig: ServerConfig) => {
|
|
8
14
|
return {
|
|
9
15
|
path: '*',
|
|
@@ -22,7 +28,9 @@ export const createReactApp = (serverConfig: ServerConfig) => {
|
|
|
22
28
|
<html ${helmet.htmlAttributes}>
|
|
23
29
|
<head>
|
|
24
30
|
<meta charset='utf-8' />
|
|
25
|
-
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
|
|
31
|
+
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover'>
|
|
32
|
+
<meta name='theme-color' content='${THEME_COLOR_LIGHT}' media='(prefers-color-scheme: light)'>
|
|
33
|
+
<meta name='theme-color' content='${THEME_COLOR_DARK}' media='(prefers-color-scheme: dark)'>
|
|
26
34
|
<link href='${serverConfig.staticContent?.faviconPath ? path.join('/static/', serverConfig.staticContent.faviconPath) : ''}' rel='icon' type='image/png' />
|
|
27
35
|
${helmet.title.toString()}
|
|
28
36
|
${helmet.meta.toString()}
|