@blinkk/root-cms 3.0.1-alpha.0 → 3.0.1-beta.2
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/dist/app.js +12 -6
- package/dist/chunk-ATPWU3CU.js +921 -0
- package/dist/chunk-CRK7N6RR.js +298 -0
- package/dist/{chunk-YMUZ5H5C.js → chunk-F4SODS5S.js} +108 -297
- package/dist/{chunk-MSJGHSR6.js → chunk-MAZA5B27.js} +23 -27
- package/dist/chunk-TRM4MQHU.js +1180 -0
- package/dist/{chunk-KDXHFMIH.js → chunk-XLX37FRL.js} +3 -0
- package/dist/cli.js +3 -2
- package/dist/{client-cP6yMgT8.d.ts → client-1puwLgNx.d.ts} +317 -24
- package/dist/client.d.ts +2 -2
- package/dist/client.js +2 -1
- package/dist/core.d.ts +3 -3
- package/dist/core.js +8 -1
- package/dist/functions.js +3 -2
- package/dist/{generate-types-MHWSSOWV.js → generate-types-SPV7I3A5.js} +1 -1
- package/dist/plugin.d.ts +2 -2
- package/dist/plugin.js +369 -79
- package/dist/project.d.ts +16 -3
- package/dist/project.js +3 -1
- package/dist/richtext.d.ts +25 -18
- package/dist/richtext.js +98 -43
- package/dist/{schema-D7MOj-YC.d.ts → schema-Db_xODoi.d.ts} +66 -1
- package/dist/ui/signin.css +1 -1
- package/dist/ui/signin.js +3 -3
- package/dist/ui/ui.css +1 -1
- package/dist/ui/ui.js +259 -175
- package/dist/ui/ui.js.LEGAL.txt +16 -3
- package/package.json +12 -8
- package/dist/ai-OZY3JXDH.js +0 -19
- package/dist/altText-RDKJNVGH.js +0 -7
- package/dist/chunk-H6ZKML2S.js +0 -157
- package/dist/chunk-N4Z3O53K.js +0 -191
- package/dist/chunk-T5UK2H24.js +0 -419
package/dist/app.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
getServerVersion
|
|
3
|
-
|
|
2
|
+
getServerVersion,
|
|
3
|
+
serializeAiConfig
|
|
4
|
+
} from "./chunk-ATPWU3CU.js";
|
|
5
|
+
import "./chunk-CRK7N6RR.js";
|
|
4
6
|
import {
|
|
5
7
|
getCollectionSchema,
|
|
6
8
|
getProjectSchemas
|
|
7
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MAZA5B27.js";
|
|
8
10
|
import "./chunk-MLKGABMK.js";
|
|
9
11
|
|
|
10
12
|
// core/app.tsx
|
|
@@ -100,7 +102,7 @@ async function renderApp(req, res, options) {
|
|
|
100
102
|
const cmsConfig = options.cmsConfig || {};
|
|
101
103
|
let gci = cmsConfig.gci;
|
|
102
104
|
if (gci === true) {
|
|
103
|
-
gci = "https://
|
|
105
|
+
gci = "https://services.rootjs.dev";
|
|
104
106
|
}
|
|
105
107
|
const ctx = {
|
|
106
108
|
rootConfig: {
|
|
@@ -120,6 +122,7 @@ async function renderApp(req, res, options) {
|
|
|
120
122
|
collections,
|
|
121
123
|
sidebar: cmsConfig.sidebar,
|
|
122
124
|
experiments: cmsConfig.experiments,
|
|
125
|
+
ai: cmsConfig.ai ? serializeAiConfig(cmsConfig.ai) : null,
|
|
123
126
|
preview: {
|
|
124
127
|
channel: cmsConfig.preview?.channel ?? false
|
|
125
128
|
},
|
|
@@ -135,7 +138,8 @@ async function renderApp(req, res, options) {
|
|
|
135
138
|
icon: t.icon,
|
|
136
139
|
hasImport: isFunction(t.onImport),
|
|
137
140
|
hasExport: isFunction(t.onExport)
|
|
138
|
-
}))
|
|
141
|
+
})),
|
|
142
|
+
defaultOneOfVariant: cmsConfig.defaultOneOfVariant || "dropdown"
|
|
139
143
|
};
|
|
140
144
|
const projectName = cmsConfig.name || cmsConfig.id || "";
|
|
141
145
|
const title = getCmsTitle(projectName, cmsConfig.minimalBranding);
|
|
@@ -234,8 +238,10 @@ async function renderSignIn(req, res, options) {
|
|
|
234
238
|
ctx.warning = "Dev warning: Server may be misconfigured. See logs for more information.";
|
|
235
239
|
}
|
|
236
240
|
}
|
|
241
|
+
const siteName = ctx.name;
|
|
242
|
+
const title = siteName ? `Sign in \u2013 ${siteName}` : "Sign in";
|
|
237
243
|
const mainHtml = renderJsxToString(
|
|
238
|
-
/* @__PURE__ */ jsx(SignIn, { title
|
|
244
|
+
/* @__PURE__ */ jsx(SignIn, { title, ctx, favicon: options.cmsConfig.favicon })
|
|
239
245
|
);
|
|
240
246
|
const nonce = generateNonce();
|
|
241
247
|
const html = `<!doctype html>
|