@lowdefy/server-dev 0.0.0-experimental-20260417114648 → 0.0.0-experimental-20260420102242
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/lib/build/theme.js +19 -0
- package/package.json +32 -33
- package/package.original.json +32 -33
- package/pages/_document.js +13 -0
- package/pages/api/agent/[...path].js +5 -4
- package/postcss.config.js +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { serializer } from '@lowdefy/helpers';
|
|
17
|
+
import raw from '../../build/theme.json';
|
|
18
|
+
|
|
19
|
+
export default serializer.deserialize(raw);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/server-dev",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-20260420102242",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -31,57 +31,56 @@
|
|
|
31
31
|
"pages/*",
|
|
32
32
|
"public_default/*",
|
|
33
33
|
"next.config.js",
|
|
34
|
-
"postcss.config.js",
|
|
35
34
|
"package.original.json",
|
|
36
35
|
".eslintrc.yaml",
|
|
37
36
|
".npmrc"
|
|
38
37
|
],
|
|
39
38
|
"dependencies": {
|
|
39
|
+
"@lowdefy/actions-core": "0.0.0-experimental-20260420102242",
|
|
40
|
+
"@lowdefy/api": "0.0.0-experimental-20260420102242",
|
|
41
|
+
"@lowdefy/block-utils": "0.0.0-experimental-20260420102242",
|
|
42
|
+
"@lowdefy/blocks-aggrid": "0.0.0-experimental-20260420102242",
|
|
43
|
+
"@lowdefy/blocks-antd": "0.0.0-experimental-20260420102242",
|
|
44
|
+
"@lowdefy/blocks-antd-x": "0.0.0-experimental-20260420102242",
|
|
45
|
+
"@lowdefy/blocks-basic": "0.0.0-experimental-20260420102242",
|
|
46
|
+
"@lowdefy/blocks-echarts": "0.0.0-experimental-20260420102242",
|
|
47
|
+
"@lowdefy/blocks-loaders": "0.0.0-experimental-20260420102242",
|
|
48
|
+
"@lowdefy/blocks-markdown": "0.0.0-experimental-20260420102242",
|
|
49
|
+
"@lowdefy/build": "0.0.0-experimental-20260420102242",
|
|
50
|
+
"@lowdefy/client": "0.0.0-experimental-20260420102242",
|
|
51
|
+
"@lowdefy/connection-axios-http": "0.0.0-experimental-20260420102242",
|
|
52
|
+
"@lowdefy/engine": "0.0.0-experimental-20260420102242",
|
|
53
|
+
"@lowdefy/errors": "0.0.0-experimental-20260420102242",
|
|
54
|
+
"@lowdefy/helpers": "0.0.0-experimental-20260420102242",
|
|
55
|
+
"@lowdefy/layout": "0.0.0-experimental-20260420102242",
|
|
56
|
+
"@lowdefy/logger": "0.0.0-experimental-20260420102242",
|
|
57
|
+
"@lowdefy/node-utils": "0.0.0-experimental-20260420102242",
|
|
58
|
+
"@lowdefy/operators-change-case": "0.0.0-experimental-20260420102242",
|
|
59
|
+
"@lowdefy/operators-dayjs": "0.0.0-experimental-20260420102242",
|
|
60
|
+
"@lowdefy/operators-diff": "0.0.0-experimental-20260420102242",
|
|
61
|
+
"@lowdefy/operators-js": "0.0.0-experimental-20260420102242",
|
|
62
|
+
"@lowdefy/operators-mql": "0.0.0-experimental-20260420102242",
|
|
63
|
+
"@lowdefy/operators-nunjucks": "0.0.0-experimental-20260420102242",
|
|
64
|
+
"@lowdefy/operators-uuid": "0.0.0-experimental-20260420102242",
|
|
65
|
+
"@lowdefy/operators-yaml": "0.0.0-experimental-20260420102242",
|
|
66
|
+
"@lowdefy/plugin-next-auth": "0.0.0-experimental-20260420102242",
|
|
40
67
|
"@ant-design/cssinjs": "2.1.2",
|
|
41
|
-
"@lowdefy/actions-core": "0.0.0-experimental-20260417114648",
|
|
42
|
-
"@lowdefy/api": "0.0.0-experimental-20260417114648",
|
|
43
|
-
"@lowdefy/block-utils": "0.0.0-experimental-20260417114648",
|
|
44
|
-
"@lowdefy/blocks-aggrid": "0.0.0-experimental-20260417114648",
|
|
45
|
-
"@lowdefy/blocks-antd": "0.0.0-experimental-20260417114648",
|
|
46
|
-
"@lowdefy/blocks-antd-x": "0.0.0-experimental-20260417114648",
|
|
47
|
-
"@lowdefy/blocks-basic": "0.0.0-experimental-20260417114648",
|
|
48
|
-
"@lowdefy/blocks-echarts": "0.0.0-experimental-20260417114648",
|
|
49
|
-
"@lowdefy/blocks-loaders": "0.0.0-experimental-20260417114648",
|
|
50
|
-
"@lowdefy/blocks-markdown": "0.0.0-experimental-20260417114648",
|
|
51
|
-
"@lowdefy/build": "0.0.0-experimental-20260417114648",
|
|
52
|
-
"@lowdefy/client": "0.0.0-experimental-20260417114648",
|
|
53
|
-
"@lowdefy/connection-axios-http": "0.0.0-experimental-20260417114648",
|
|
54
|
-
"@lowdefy/engine": "0.0.0-experimental-20260417114648",
|
|
55
|
-
"@lowdefy/errors": "0.0.0-experimental-20260417114648",
|
|
56
|
-
"@lowdefy/helpers": "0.0.0-experimental-20260417114648",
|
|
57
|
-
"@lowdefy/layout": "0.0.0-experimental-20260417114648",
|
|
58
|
-
"@lowdefy/logger": "0.0.0-experimental-20260417114648",
|
|
59
|
-
"@lowdefy/node-utils": "0.0.0-experimental-20260417114648",
|
|
60
|
-
"@lowdefy/operators-change-case": "0.0.0-experimental-20260417114648",
|
|
61
|
-
"@lowdefy/operators-dayjs": "0.0.0-experimental-20260417114648",
|
|
62
|
-
"@lowdefy/operators-diff": "0.0.0-experimental-20260417114648",
|
|
63
|
-
"@lowdefy/operators-js": "0.0.0-experimental-20260417114648",
|
|
64
|
-
"@lowdefy/operators-mql": "0.0.0-experimental-20260417114648",
|
|
65
|
-
"@lowdefy/operators-nunjucks": "0.0.0-experimental-20260417114648",
|
|
66
|
-
"@lowdefy/operators-uuid": "0.0.0-experimental-20260417114648",
|
|
67
|
-
"@lowdefy/operators-yaml": "0.0.0-experimental-20260417114648",
|
|
68
|
-
"@lowdefy/plugin-next-auth": "0.0.0-experimental-20260417114648",
|
|
69
|
-
"@tailwindcss/postcss": "4.2.1",
|
|
70
68
|
"antd": "6.3.1",
|
|
71
69
|
"dayjs": "1.11.19",
|
|
72
70
|
"chokidar": "3.5.3",
|
|
73
71
|
"dotenv": "16.3.1",
|
|
72
|
+
"@tailwindcss/postcss": "4.2.1",
|
|
74
73
|
"next": "16.1.6",
|
|
74
|
+
"postcss": "8.5.6",
|
|
75
|
+
"tailwindcss": "4.2.1",
|
|
75
76
|
"next-auth": "4.24.10",
|
|
76
77
|
"opener": "1.5.2",
|
|
77
78
|
"pino": "8.16.2",
|
|
78
|
-
"postcss": "8.5.6",
|
|
79
79
|
"process": "0.11.10",
|
|
80
80
|
"react": "18.2.0",
|
|
81
81
|
"react-dom": "18.2.0",
|
|
82
82
|
"react-icons": "5.6.0",
|
|
83
83
|
"swr": "2.2.4",
|
|
84
|
-
"tailwindcss": "4.2.1",
|
|
85
84
|
"uuid": "13.0.0",
|
|
86
85
|
"yaml": "2.3.4",
|
|
87
86
|
"yargs": "17.7.2"
|
package/package.original.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/server-dev",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-20260420102242",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
"pages/*",
|
|
32
32
|
"public_default/*",
|
|
33
33
|
"next.config.js",
|
|
34
|
-
"postcss.config.js",
|
|
35
34
|
"package.original.json",
|
|
36
35
|
".eslintrc.yaml",
|
|
37
36
|
".npmrc"
|
|
@@ -45,51 +44,51 @@
|
|
|
45
44
|
"prepublishOnly": "pnpm build"
|
|
46
45
|
},
|
|
47
46
|
"dependencies": {
|
|
47
|
+
"@lowdefy/actions-core": "0.0.0-experimental-20260420102242",
|
|
48
|
+
"@lowdefy/api": "0.0.0-experimental-20260420102242",
|
|
49
|
+
"@lowdefy/block-utils": "0.0.0-experimental-20260420102242",
|
|
50
|
+
"@lowdefy/blocks-aggrid": "0.0.0-experimental-20260420102242",
|
|
51
|
+
"@lowdefy/blocks-antd": "0.0.0-experimental-20260420102242",
|
|
52
|
+
"@lowdefy/blocks-antd-x": "0.0.0-experimental-20260420102242",
|
|
53
|
+
"@lowdefy/blocks-basic": "0.0.0-experimental-20260420102242",
|
|
54
|
+
"@lowdefy/blocks-echarts": "0.0.0-experimental-20260420102242",
|
|
55
|
+
"@lowdefy/blocks-loaders": "0.0.0-experimental-20260420102242",
|
|
56
|
+
"@lowdefy/blocks-markdown": "0.0.0-experimental-20260420102242",
|
|
57
|
+
"@lowdefy/build": "0.0.0-experimental-20260420102242",
|
|
58
|
+
"@lowdefy/client": "0.0.0-experimental-20260420102242",
|
|
59
|
+
"@lowdefy/connection-axios-http": "0.0.0-experimental-20260420102242",
|
|
60
|
+
"@lowdefy/engine": "0.0.0-experimental-20260420102242",
|
|
61
|
+
"@lowdefy/errors": "0.0.0-experimental-20260420102242",
|
|
62
|
+
"@lowdefy/helpers": "0.0.0-experimental-20260420102242",
|
|
63
|
+
"@lowdefy/layout": "0.0.0-experimental-20260420102242",
|
|
64
|
+
"@lowdefy/logger": "0.0.0-experimental-20260420102242",
|
|
65
|
+
"@lowdefy/node-utils": "0.0.0-experimental-20260420102242",
|
|
66
|
+
"@lowdefy/operators-change-case": "0.0.0-experimental-20260420102242",
|
|
67
|
+
"@lowdefy/operators-dayjs": "0.0.0-experimental-20260420102242",
|
|
68
|
+
"@lowdefy/operators-diff": "0.0.0-experimental-20260420102242",
|
|
69
|
+
"@lowdefy/operators-js": "0.0.0-experimental-20260420102242",
|
|
70
|
+
"@lowdefy/operators-mql": "0.0.0-experimental-20260420102242",
|
|
71
|
+
"@lowdefy/operators-nunjucks": "0.0.0-experimental-20260420102242",
|
|
72
|
+
"@lowdefy/operators-uuid": "0.0.0-experimental-20260420102242",
|
|
73
|
+
"@lowdefy/operators-yaml": "0.0.0-experimental-20260420102242",
|
|
74
|
+
"@lowdefy/plugin-next-auth": "0.0.0-experimental-20260420102242",
|
|
48
75
|
"@ant-design/cssinjs": "2.1.2",
|
|
49
|
-
"@lowdefy/actions-core": "0.0.0-experimental-20260417114648",
|
|
50
|
-
"@lowdefy/api": "0.0.0-experimental-20260417114648",
|
|
51
|
-
"@lowdefy/block-utils": "0.0.0-experimental-20260417114648",
|
|
52
|
-
"@lowdefy/blocks-aggrid": "0.0.0-experimental-20260417114648",
|
|
53
|
-
"@lowdefy/blocks-antd": "0.0.0-experimental-20260417114648",
|
|
54
|
-
"@lowdefy/blocks-antd-x": "0.0.0-experimental-20260417114648",
|
|
55
|
-
"@lowdefy/blocks-basic": "0.0.0-experimental-20260417114648",
|
|
56
|
-
"@lowdefy/blocks-echarts": "0.0.0-experimental-20260417114648",
|
|
57
|
-
"@lowdefy/blocks-loaders": "0.0.0-experimental-20260417114648",
|
|
58
|
-
"@lowdefy/blocks-markdown": "0.0.0-experimental-20260417114648",
|
|
59
|
-
"@lowdefy/build": "0.0.0-experimental-20260417114648",
|
|
60
|
-
"@lowdefy/client": "0.0.0-experimental-20260417114648",
|
|
61
|
-
"@lowdefy/connection-axios-http": "0.0.0-experimental-20260417114648",
|
|
62
|
-
"@lowdefy/engine": "0.0.0-experimental-20260417114648",
|
|
63
|
-
"@lowdefy/errors": "0.0.0-experimental-20260417114648",
|
|
64
|
-
"@lowdefy/helpers": "0.0.0-experimental-20260417114648",
|
|
65
|
-
"@lowdefy/layout": "0.0.0-experimental-20260417114648",
|
|
66
|
-
"@lowdefy/logger": "0.0.0-experimental-20260417114648",
|
|
67
|
-
"@lowdefy/node-utils": "0.0.0-experimental-20260417114648",
|
|
68
|
-
"@lowdefy/operators-change-case": "0.0.0-experimental-20260417114648",
|
|
69
|
-
"@lowdefy/operators-dayjs": "0.0.0-experimental-20260417114648",
|
|
70
|
-
"@lowdefy/operators-diff": "0.0.0-experimental-20260417114648",
|
|
71
|
-
"@lowdefy/operators-js": "0.0.0-experimental-20260417114648",
|
|
72
|
-
"@lowdefy/operators-mql": "0.0.0-experimental-20260417114648",
|
|
73
|
-
"@lowdefy/operators-nunjucks": "0.0.0-experimental-20260417114648",
|
|
74
|
-
"@lowdefy/operators-uuid": "0.0.0-experimental-20260417114648",
|
|
75
|
-
"@lowdefy/operators-yaml": "0.0.0-experimental-20260417114648",
|
|
76
|
-
"@lowdefy/plugin-next-auth": "0.0.0-experimental-20260417114648",
|
|
77
|
-
"@tailwindcss/postcss": "4.2.1",
|
|
78
76
|
"antd": "6.3.1",
|
|
79
77
|
"dayjs": "1.11.19",
|
|
80
78
|
"chokidar": "3.5.3",
|
|
81
79
|
"dotenv": "16.3.1",
|
|
80
|
+
"@tailwindcss/postcss": "4.2.1",
|
|
82
81
|
"next": "16.1.6",
|
|
82
|
+
"postcss": "8.5.6",
|
|
83
|
+
"tailwindcss": "4.2.1",
|
|
83
84
|
"next-auth": "4.24.10",
|
|
84
85
|
"opener": "1.5.2",
|
|
85
86
|
"pino": "8.16.2",
|
|
86
|
-
"postcss": "8.5.6",
|
|
87
87
|
"process": "0.11.10",
|
|
88
88
|
"react": "18.2.0",
|
|
89
89
|
"react-dom": "18.2.0",
|
|
90
90
|
"react-icons": "5.6.0",
|
|
91
91
|
"swr": "2.2.4",
|
|
92
|
-
"tailwindcss": "4.2.1",
|
|
93
92
|
"uuid": "13.0.0",
|
|
94
93
|
"yaml": "2.3.4",
|
|
95
94
|
"yargs": "17.7.2"
|
package/pages/_document.js
CHANGED
|
@@ -19,8 +19,13 @@ import Document, { Html, Head, Main, NextScript } from 'next/document';
|
|
|
19
19
|
|
|
20
20
|
import appJson from '../lib/build/app.js';
|
|
21
21
|
import lowdefyConfig from '../lib/build/config.js';
|
|
22
|
+
import themeConfig from '../lib/build/theme.js';
|
|
22
23
|
|
|
23
24
|
const basePath = lowdefyConfig.basePath ?? '';
|
|
25
|
+
const VALID_COLOR_MODES = ['system', 'light', 'dark'];
|
|
26
|
+
const configColorMode = VALID_COLOR_MODES.includes(themeConfig.darkMode)
|
|
27
|
+
? themeConfig.darkMode
|
|
28
|
+
: 'system';
|
|
24
29
|
|
|
25
30
|
class LowdefyDocument extends Document {
|
|
26
31
|
render() {
|
|
@@ -38,6 +43,14 @@ class LowdefyDocument extends Document {
|
|
|
38
43
|
__html: `(function(){var s=document.createElement("style");s.id="__lf-layer-order";s.textContent="@layer theme, base, antd, components, utilities;";document.head.prepend(s);new MutationObserver(function(){if(document.head.firstChild!==s)document.head.prepend(s)}).observe(document.head,{childList:true})})();`,
|
|
39
44
|
}}
|
|
40
45
|
/>
|
|
46
|
+
{/* Synchronous dark-mode background script — prevents white flash during
|
|
47
|
+
page navigation when the user is in dark mode. Mirrors the logic in
|
|
48
|
+
useDarkMode.js: configDarkMode → localStorage → prefers-color-scheme. */}
|
|
49
|
+
<script
|
|
50
|
+
dangerouslySetInnerHTML={{
|
|
51
|
+
__html: `(function(){var c="${configColorMode}";if(c==="light")return;var d=false;if(c==="dark"){d=true}else{try{var p=localStorage.getItem("lowdefy_darkMode");if(p==="dark")d=true;else if(p==="light")d=false;else d=window.matchMedia("(prefers-color-scheme:dark)").matches}catch(e){d=window.matchMedia("(prefers-color-scheme:dark)").matches}}if(d)document.documentElement.style.backgroundColor="#000"})();`,
|
|
52
|
+
}}
|
|
53
|
+
/>
|
|
41
54
|
<link rel="manifest" href={`${basePath}/manifest.webmanifest`} />
|
|
42
55
|
<link rel="icon" type="image/svg+xml" href={`${basePath}/icon.svg`} />
|
|
43
56
|
<link rel="apple-touch-icon" href={`${basePath}/apple-touch-icon.png`} />
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { callAgent } from '@lowdefy/api';
|
|
18
|
+
import { type } from '@lowdefy/helpers';
|
|
18
19
|
|
|
19
20
|
import apiWrapper from '../../../lib/server/apiWrapper.js';
|
|
20
21
|
|
|
@@ -31,7 +32,7 @@ async function handler({ context, req, res }) {
|
|
|
31
32
|
const pageId = segments.slice(0, -1).join('/');
|
|
32
33
|
context.logger.info({ color: 'gray' }, `Agent: ${pageId} → ${agentId}`);
|
|
33
34
|
const { conversationId } = req.query;
|
|
34
|
-
const { messages, urlQuery,
|
|
35
|
+
const { messages, urlQuery, sharedState } = req.body;
|
|
35
36
|
if (!Array.isArray(messages)) {
|
|
36
37
|
res.status(400).json({ error: 'messages must be an array' });
|
|
37
38
|
return;
|
|
@@ -40,8 +41,8 @@ async function handler({ context, req, res }) {
|
|
|
40
41
|
res.status(400).json({ error: 'urlQuery must be an object' });
|
|
41
42
|
return;
|
|
42
43
|
}
|
|
43
|
-
if (
|
|
44
|
-
res.status(400).json({ error: '
|
|
44
|
+
if (sharedState != null && !type.isObject(sharedState)) {
|
|
45
|
+
res.status(400).json({ error: 'sharedState must be an object' });
|
|
45
46
|
return;
|
|
46
47
|
}
|
|
47
48
|
const { response: webResponse } = await callAgent(context, {
|
|
@@ -49,7 +50,7 @@ async function handler({ context, req, res }) {
|
|
|
49
50
|
pageId,
|
|
50
51
|
messages,
|
|
51
52
|
conversationId: conversationId ?? undefined,
|
|
52
|
-
|
|
53
|
+
sharedState: sharedState ?? undefined,
|
|
53
54
|
urlQuery: urlQuery ?? undefined,
|
|
54
55
|
});
|
|
55
56
|
|
package/postcss.config.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = { plugins: { '@tailwindcss/postcss': {} } };
|