@lowdefy/client 5.5.1 → 5.6.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.
@@ -36,8 +36,11 @@ function createHandleError(lowdefy) {
36
36
  }
37
37
  // Send known error types to server for logging with location resolution
38
38
  if (error.isLowdefyError) {
39
- // Server-originated errors already have source resolved — just display locally
40
- if (error.source) {
39
+ // The server already logged this one — just display locally. Keyed on
40
+ // `handled`, not on `source`: a LowdefyInternalError is logged server-side
41
+ // but never gets a source (location resolution is skipped for it), so
42
+ // keying on source POSTed it back and had it logged twice.
43
+ if (error.handled) {
41
44
  logError(error);
42
45
  return;
43
46
  }
@@ -120,12 +120,14 @@ function useDarkMode({ antd, configDarkMode }) {
120
120
  lightComponents,
121
121
  darkComponents
122
122
  ]);
123
- // Keep the <html> background in sync with the resolved mode. The _document.js
124
- // inline script sets an initial background before hydration; this effect takes
125
- // over once React is active and updates on every dark/light toggle.
123
+ // Keep the <html> background and color-scheme in sync with the resolved mode.
124
+ // The _document.js pre-hydration inline script sets initial values before
125
+ // hydration; this effect takes over once React is active and updates on every
126
+ // dark/light toggle.
126
127
  const darkBg = darkToken?.colorBgLayout;
127
128
  const lightBg = lightToken?.colorBgLayout;
128
129
  useEffect(()=>{
130
+ document.documentElement.style.colorScheme = isDark ? 'dark' : 'light';
129
131
  if (isDark) {
130
132
  document.documentElement.style.backgroundColor = darkBg ?? '#000';
131
133
  } else if (lightBg) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/client",
3
- "version": "5.5.1",
3
+ "version": "5.6.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Lowdefy Client",
6
6
  "homepage": "https://lowdefy.com",
@@ -35,12 +35,12 @@
35
35
  "dependencies": {
36
36
  "@ant-design/icons": "6.1.0",
37
37
  "antd": "6.3.1",
38
- "@lowdefy/block-utils": "5.5.1",
39
- "@lowdefy/engine": "5.5.1",
40
- "@lowdefy/errors": "5.5.1",
41
- "@lowdefy/helpers": "5.5.1",
42
- "@lowdefy/layout": "5.5.1",
43
- "@lowdefy/logger": "5.5.1",
38
+ "@lowdefy/block-utils": "5.6.0",
39
+ "@lowdefy/engine": "5.6.0",
40
+ "@lowdefy/errors": "5.6.0",
41
+ "@lowdefy/helpers": "5.6.0",
42
+ "@lowdefy/layout": "5.6.0",
43
+ "@lowdefy/logger": "5.6.0",
44
44
  "dayjs": "1.11.19",
45
45
  "react": "18.2.0",
46
46
  "react-dom": "18.2.0",
@@ -48,7 +48,7 @@
48
48
  },
49
49
  "devDependencies": {
50
50
  "@jest/globals": "28.1.3",
51
- "@lowdefy/jest-yaml-transform": "5.5.1",
51
+ "@lowdefy/jest-yaml-transform": "5.6.0",
52
52
  "@swc/cli": "0.8.0",
53
53
  "@swc/core": "1.15.18",
54
54
  "@swc/jest": "0.2.39",