eddev 2.0.0-beta.113 → 2.0.0-beta.115

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.
@@ -2,7 +2,7 @@ import { installFieldTypes } from "../lib/admin/installFieldTypes.js";
2
2
  import { runWidgets } from "../lib/admin/runWidgets.js";
3
3
  import { installEDGutenbergHooks } from "../lib/blocks/editor/installGutenbergHooks.js";
4
4
  export default function bootAdmin() {
5
- console.log("Booting admin");
5
+ console.log("Booting admin", window.name);
6
6
  if (window.name === "editor-canvas") {
7
7
  console.log("Running in the editor canvas");
8
8
  }
@@ -1,5 +1,16 @@
1
1
  import { useRouter } from "../routing/index.js";
2
2
  function useAppData(selector) {
3
+ if (env.admin) {
4
+ const appData = window.__ED_APP_DATA.data;
5
+ if (appData) {
6
+ if (selector) {
7
+ return selector(appData);
8
+ }
9
+ else {
10
+ return appData;
11
+ }
12
+ }
13
+ }
3
14
  const loader = useRouter((r) => r.loader);
4
15
  if (selector) {
5
16
  return selector(loader.appData);
@@ -1 +1 @@
1
- export declare const VERSION = "2.0.0-beta.113";
1
+ export declare const VERSION = "2.0.0-beta.115";
@@ -1 +1 @@
1
- export const VERSION = "2.0.0-beta.113";
1
+ export const VERSION = "2.0.0-beta.115";
@@ -188,11 +188,11 @@ export function getViteConfig(args) {
188
188
  entry: [entryFile],
189
189
  fileName: (format, entryName) => `${entryName}.${format}.js`,
190
190
  name: "eddev",
191
- formats: args.target === "cms" ? ["iife"] : ["es"],
191
+ formats: ["iife"],
192
192
  }
193
193
  : undefined,
194
194
  rollupOptions: {
195
- input: args.target === "frontend" ? entryFile : "./.eddev/prod-spa/entry.admin.tsx",
195
+ input: args.target === "frontend" ? entryFile : undefined,
196
196
  external: args.target === "cms" ? ["react", "react-dom"] : [],
197
197
  onwarn(warning, warn) {
198
198
  if (!cliMode.verbose &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eddev",
3
- "version": "2.0.0-beta.113",
3
+ "version": "2.0.0-beta.115",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",