@gogitcms/editor 0.36.0 → 0.38.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/app/vendor/plugin-sdk/src/react.tsx +26 -4
- package/npm-shrinkwrap.json +16 -29
- package/package.json +6 -6
|
@@ -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
|
-
<
|
|
105
|
-
|
|
106
|
-
|
|
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
|
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gogitcms/editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@gogitcms/editor",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.38.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.
|
|
51
|
-
"@gogitcms/gitcms-local-darwin-x64": "0.
|
|
52
|
-
"@gogitcms/gitcms-local-linux-arm64": "0.
|
|
53
|
-
"@gogitcms/gitcms-local-linux-x64": "0.
|
|
54
|
-
"@gogitcms/gitcms-local-win32-x64": "0.
|
|
50
|
+
"@gogitcms/gitcms-local-darwin-arm64": "0.38.0",
|
|
51
|
+
"@gogitcms/gitcms-local-darwin-x64": "0.38.0",
|
|
52
|
+
"@gogitcms/gitcms-local-linux-arm64": "0.38.0",
|
|
53
|
+
"@gogitcms/gitcms-local-linux-x64": "0.38.0",
|
|
54
|
+
"@gogitcms/gitcms-local-win32-x64": "0.38.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.
|
|
755
|
-
"resolved": "https://registry.npmjs.org/@gogitcms/gitcms-local-darwin-arm64/-/gitcms-local-darwin-arm64-0.
|
|
756
|
-
"integrity": "sha512-
|
|
754
|
+
"version": "0.38.0",
|
|
755
|
+
"resolved": "https://registry.npmjs.org/@gogitcms/gitcms-local-darwin-arm64/-/gitcms-local-darwin-arm64-0.38.0.tgz",
|
|
756
|
+
"integrity": "sha512-H8SJS8frXpgA3tmWN8ex+Biho0qiM8CZbwwLC07GJ+Vzx8d3q1QNnmu+8R4D3HuecoOhD9UzMnzQXBSJ+Qb4TA==",
|
|
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.
|
|
768
|
-
"resolved": "https://registry.npmjs.org/@gogitcms/gitcms-local-darwin-x64/-/gitcms-local-darwin-x64-0.
|
|
769
|
-
"integrity": "sha512-
|
|
767
|
+
"version": "0.38.0",
|
|
768
|
+
"resolved": "https://registry.npmjs.org/@gogitcms/gitcms-local-darwin-x64/-/gitcms-local-darwin-x64-0.38.0.tgz",
|
|
769
|
+
"integrity": "sha512-KokjE3yBXCXZr2y3cXm9c0tWWXI1PbR5BMhNU8Fi23ShWLh7BKepGoexTW+YTz+1Nc9zcmT8nSSU1kxTzOQXlw==",
|
|
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.
|
|
781
|
-
"resolved": "https://registry.npmjs.org/@gogitcms/gitcms-local-linux-x64/-/gitcms-local-linux-x64-0.
|
|
782
|
-
"integrity": "sha512-
|
|
780
|
+
"version": "0.38.0",
|
|
781
|
+
"resolved": "https://registry.npmjs.org/@gogitcms/gitcms-local-linux-x64/-/gitcms-local-linux-x64-0.38.0.tgz",
|
|
782
|
+
"integrity": "sha512-YvD7qc+Va0OvcEXVmtSoyAY5VvS4D54O4HwR+Yel9EhuSvAiihmgkbCuWQQpDNPOAp/6t8dHLYJwe4Jr+7a6/Q==",
|
|
783
783
|
"cpu": [
|
|
784
784
|
"x64"
|
|
785
785
|
],
|
|
@@ -789,19 +789,6 @@
|
|
|
789
789
|
"linux"
|
|
790
790
|
]
|
|
791
791
|
},
|
|
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==",
|
|
796
|
-
"cpu": [
|
|
797
|
-
"x64"
|
|
798
|
-
],
|
|
799
|
-
"license": "UNLICENSED",
|
|
800
|
-
"optional": true,
|
|
801
|
-
"os": [
|
|
802
|
-
"win32"
|
|
803
|
-
]
|
|
804
|
-
},
|
|
805
792
|
"node_modules/@graphql-typed-document-node/core": {
|
|
806
793
|
"version": "3.2.0",
|
|
807
794
|
"resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gogitcms/editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.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.
|
|
69
|
-
"@gogitcms/gitcms-local-darwin-x64": "0.
|
|
70
|
-
"@gogitcms/gitcms-local-linux-arm64": "0.
|
|
71
|
-
"@gogitcms/gitcms-local-linux-x64": "0.
|
|
72
|
-
"@gogitcms/gitcms-local-win32-x64": "0.
|
|
68
|
+
"@gogitcms/gitcms-local-darwin-arm64": "0.38.0",
|
|
69
|
+
"@gogitcms/gitcms-local-darwin-x64": "0.38.0",
|
|
70
|
+
"@gogitcms/gitcms-local-linux-arm64": "0.38.0",
|
|
71
|
+
"@gogitcms/gitcms-local-linux-x64": "0.38.0",
|
|
72
|
+
"@gogitcms/gitcms-local-win32-x64": "0.38.0"
|
|
73
73
|
}
|
|
74
74
|
}
|