@gogitcms/editor 0.36.0 → 0.37.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.
@@ -3,7 +3,7 @@
3
3
  // plugin field components into the editor.
4
4
 
5
5
  import React, { Suspense, useSyncExternalStore, type ComponentType, type LazyExoticComponent } from "react";
6
- import { Text, type RenderField } from "@gogitcms/design-system";
6
+ import { Text, useTheme, type RenderField } from "@gogitcms/design-system";
7
7
  import { PLUGIN_COMPONENT_PREFIX, PluginRegistry } from "./registry";
8
8
  import type { PluginComponentLoader, PluginScreenProps, PluginTabContext } from "./types";
9
9
 
@@ -76,6 +76,7 @@ export function PluginScreenHost({
76
76
  tab?: PluginTabContext;
77
77
  }) {
78
78
  usePluginRegistry(registry);
79
+ const t = useTheme();
79
80
  const status = registry.status(pluginId);
80
81
  if (status === "pending") return null;
81
82
  const match = status === "ready" ? registry.matchRoute(pluginId, path) : null;
@@ -100,10 +101,31 @@ export function PluginScreenHost({
100
101
  apiUrl,
101
102
  tab,
102
103
  };
104
+ // Plugin screens are plain DOM, and the host is React Native Web, which
105
+ // colours its own Text components and leaves the document's defaults alone.
106
+ // Without this wrapper a plugin's <div> inherits the browser's black serif —
107
+ // unreadable on a dark theme and unstyled on a light one. So the theme's
108
+ // text colour and typeface are set once here, and `color: inherit` in a
109
+ // plugin means what it says.
103
110
  return (
104
- <Suspense fallback={<React.Fragment />}>
105
- <Lazy {...props} />
106
- </Suspense>
111
+ <div
112
+ data-testid="plugin-screen"
113
+ style={{
114
+ display: "flex",
115
+ flexDirection: "column",
116
+ flex: 1,
117
+ minHeight: 0,
118
+ color: t.color.textPrimary,
119
+ fontFamily: t.font.sans,
120
+ fontSize: 14,
121
+ lineHeight: 1.5,
122
+ colorScheme: t.mode,
123
+ }}
124
+ >
125
+ <Suspense fallback={<React.Fragment />}>
126
+ <Lazy {...props} />
127
+ </Suspense>
128
+ </div>
107
129
  );
108
130
  }
109
131
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@gogitcms/editor",
3
- "version": "0.36.0",
3
+ "version": "0.37.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@gogitcms/editor",
9
- "version": "0.36.0",
9
+ "version": "0.37.0",
10
10
  "dependencies": {
11
11
  "@apollo/client": "^3.11.8",
12
12
  "@handlewithcare/react-prosemirror": "^3.2.7",
@@ -47,11 +47,11 @@
47
47
  "node": ">=20"
48
48
  },
49
49
  "optionalDependencies": {
50
- "@gogitcms/gitcms-local-darwin-arm64": "0.36.0",
51
- "@gogitcms/gitcms-local-darwin-x64": "0.36.0",
52
- "@gogitcms/gitcms-local-linux-arm64": "0.36.0",
53
- "@gogitcms/gitcms-local-linux-x64": "0.36.0",
54
- "@gogitcms/gitcms-local-win32-x64": "0.36.0"
50
+ "@gogitcms/gitcms-local-darwin-arm64": "0.37.0",
51
+ "@gogitcms/gitcms-local-darwin-x64": "0.37.0",
52
+ "@gogitcms/gitcms-local-linux-arm64": "0.37.0",
53
+ "@gogitcms/gitcms-local-linux-x64": "0.37.0",
54
+ "@gogitcms/gitcms-local-win32-x64": "0.37.0"
55
55
  }
56
56
  },
57
57
  "node_modules/@apollo/client": {
@@ -751,9 +751,9 @@
751
751
  }
752
752
  },
753
753
  "node_modules/@gogitcms/gitcms-local-darwin-arm64": {
754
- "version": "0.36.0",
755
- "resolved": "https://registry.npmjs.org/@gogitcms/gitcms-local-darwin-arm64/-/gitcms-local-darwin-arm64-0.36.0.tgz",
756
- "integrity": "sha512-3SPtjHnW2iFzSpwDWB4kakJill7WOw3yB/+/jXhN8Rv66CR0ly5ArpJiEVj90z97RXCrJCOiz+OPW6bAX7HWRg==",
754
+ "version": "0.37.0",
755
+ "resolved": "https://registry.npmjs.org/@gogitcms/gitcms-local-darwin-arm64/-/gitcms-local-darwin-arm64-0.37.0.tgz",
756
+ "integrity": "sha512-dk84X+vFCow3ZHQnkNw2uYDJHWDJZgpZhbWD31EUbrih9bdWZFZ70y/jyzmZ3g23qVVKAKjvVN0+4+E0fzLyQw==",
757
757
  "cpu": [
758
758
  "arm64"
759
759
  ],
@@ -764,9 +764,9 @@
764
764
  ]
765
765
  },
766
766
  "node_modules/@gogitcms/gitcms-local-darwin-x64": {
767
- "version": "0.36.0",
768
- "resolved": "https://registry.npmjs.org/@gogitcms/gitcms-local-darwin-x64/-/gitcms-local-darwin-x64-0.36.0.tgz",
769
- "integrity": "sha512-Dmsr+bXGBr9bqI6QTIRV6e2sZirfyNatuZwJU1kGr0W0ZGhfibS0phzQeru43ABfn0prMWpCxbdschkouzlSKQ==",
767
+ "version": "0.37.0",
768
+ "resolved": "https://registry.npmjs.org/@gogitcms/gitcms-local-darwin-x64/-/gitcms-local-darwin-x64-0.37.0.tgz",
769
+ "integrity": "sha512-qlL8E9xYpCduwJTZhprtKtvohB58jezZxELr5qhAaGsir0WearEy5C9dc6J6Y/urss7wGb3Yh1EpgWHPLWAXuA==",
770
770
  "cpu": [
771
771
  "x64"
772
772
  ],
@@ -777,9 +777,9 @@
777
777
  ]
778
778
  },
779
779
  "node_modules/@gogitcms/gitcms-local-linux-x64": {
780
- "version": "0.36.0",
781
- "resolved": "https://registry.npmjs.org/@gogitcms/gitcms-local-linux-x64/-/gitcms-local-linux-x64-0.36.0.tgz",
782
- "integrity": "sha512-gdzFRnZ8zqowY7Y9XU18LwXo4U04+i0Y4SJ1yQQYiObt6YpY3wIWjzQagZg14UViLZoRKBt/apruBKooikMJPg==",
780
+ "version": "0.37.0",
781
+ "resolved": "https://registry.npmjs.org/@gogitcms/gitcms-local-linux-x64/-/gitcms-local-linux-x64-0.37.0.tgz",
782
+ "integrity": "sha512-OzBK5zlw84wB0eRiS3+Vx2EYFMcD0wiF5Eiat5YCJBkhPbvkEHF9mtmLPx2DErY9qp0wT8dKcwYDMbSmEgKRdQ==",
783
783
  "cpu": [
784
784
  "x64"
785
785
  ],
@@ -790,9 +790,9 @@
790
790
  ]
791
791
  },
792
792
  "node_modules/@gogitcms/gitcms-local-win32-x64": {
793
- "version": "0.36.0",
794
- "resolved": "https://registry.npmjs.org/@gogitcms/gitcms-local-win32-x64/-/gitcms-local-win32-x64-0.36.0.tgz",
795
- "integrity": "sha512-2c/GH7xz8jmagqa7Sb/qa8xeBpCVB+D9CwZ9F3TUtwvlqewN8uwBBzwLJtbyj3ITfb36bU7Tsj0P7BrvrxUGug==",
793
+ "version": "0.37.0",
794
+ "resolved": "https://registry.npmjs.org/@gogitcms/gitcms-local-win32-x64/-/gitcms-local-win32-x64-0.37.0.tgz",
795
+ "integrity": "sha512-7rHbZ2TSDeTmrAWKEmMd/O6bCZCOjKvgzaX0LzCZGs2ZM8XB185VfEB3FpV5+qn/Wps2d5VGu5yULsxN6qAKwQ==",
796
796
  "cpu": [
797
797
  "x64"
798
798
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gogitcms/editor",
3
- "version": "0.36.0",
3
+ "version": "0.37.0",
4
4
  "description": "Terminal UI for setting up and running the Go·Git CMS content editor",
5
5
  "type": "module",
6
6
  "bin": {
@@ -65,10 +65,10 @@
65
65
  "@gogitcms/frontend": "workspace:*"
66
66
  },
67
67
  "optionalDependencies": {
68
- "@gogitcms/gitcms-local-darwin-arm64": "0.36.0",
69
- "@gogitcms/gitcms-local-darwin-x64": "0.36.0",
70
- "@gogitcms/gitcms-local-linux-arm64": "0.36.0",
71
- "@gogitcms/gitcms-local-linux-x64": "0.36.0",
72
- "@gogitcms/gitcms-local-win32-x64": "0.36.0"
68
+ "@gogitcms/gitcms-local-darwin-arm64": "0.37.0",
69
+ "@gogitcms/gitcms-local-darwin-x64": "0.37.0",
70
+ "@gogitcms/gitcms-local-linux-arm64": "0.37.0",
71
+ "@gogitcms/gitcms-local-linux-x64": "0.37.0",
72
+ "@gogitcms/gitcms-local-win32-x64": "0.37.0"
73
73
  }
74
74
  }