@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 CHANGED
@@ -1,10 +1,12 @@
1
1
  import {
2
- getServerVersion
3
- } from "./chunk-N4Z3O53K.js";
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-MSJGHSR6.js";
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://gci.rootjs.dev";
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: "Sign in", ctx, favicon: options.cmsConfig.favicon })
244
+ /* @__PURE__ */ jsx(SignIn, { title, ctx, favicon: options.cmsConfig.favicon })
239
245
  );
240
246
  const nonce = generateNonce();
241
247
  const html = `<!doctype html>