@onexapis/cli 1.1.48 → 1.1.50

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,6 +3,7 @@
3
3
  import React, { useState, useEffect, useRef, useCallback } from "react";
4
4
  import { createRoot } from "react-dom/client";
5
5
  import * as jsxRuntime from "react/jsx-runtime";
6
+ import * as ReactQuery from "@tanstack/react-query";
6
7
  import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
7
8
 
8
9
  // Core subpath imports — MUST match what setup-theme-globals.ts sets
@@ -40,6 +41,9 @@ const coreHooks = coreHooksAll;
40
41
  (globalThis as any).__ONEX_REACT_DOM__ = { createRoot };
41
42
  (globalThis as any).__ONEX_JSX_RUNTIME__ = jsxRuntime;
42
43
 
44
+ // Expose react-query so theme bundle can share the same instance
45
+ (globalThis as any).__REACT_QUERY__ = ReactQuery;
46
+
43
47
  // Set core globals with subpath modules
44
48
  // Theme bundle accesses: globalThis.__ONEX_CORE__["renderers"], globalThis.__ONEX_CORE__["utils"]
45
49
  // This matches the pattern in: apps/storefront/lib/setup-theme-globals.ts
@@ -720,18 +724,22 @@ function PreviewApp() {
720
724
  {/* Inject theme CSS variables (Gap 2) */}
721
725
  {themeCSS && <style dangerouslySetInnerHTML={{ __html: themeCSS }} />}
722
726
 
723
- {/* Header — hidden if page config sets hideHeader: true */}
724
- {headerSections.length > 0 && !currentPage.config?.hideHeader && (
725
- <header>{headerSections.map(renderSection)}</header>
726
- )}
727
+ {/* Header — hidden if page config sets hideHeader: true (top-level or metadata) */}
728
+ {headerSections.length > 0 &&
729
+ !currentPage.config?.hideHeader &&
730
+ !currentPage.config?.metadata?.hideHeader && (
731
+ <header>{headerSections.map(renderSection)}</header>
732
+ )}
727
733
 
728
734
  {/* Page sections */}
729
735
  <main>{pageSections.map(renderSection)}</main>
730
736
 
731
- {/* Footer — hidden if page config sets hideFooter: true */}
732
- {footerSections.length > 0 && !currentPage.config?.hideFooter && (
733
- <footer>{footerSections.map(renderSection)}</footer>
734
- )}
737
+ {/* Footer — hidden if page config sets hideFooter: true (top-level or metadata) */}
738
+ {footerSections.length > 0 &&
739
+ !currentPage.config?.hideFooter &&
740
+ !currentPage.config?.metadata?.hideFooter && (
741
+ <footer>{footerSections.map(renderSection)}</footer>
742
+ )}
735
743
  </>
736
744
  );
737
745
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onexapis/cli",
3
- "version": "1.1.48",
3
+ "version": "1.1.50",
4
4
  "description": "CLI tool for OneX theme development - scaffolds themes using @onexapis/core",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -49,7 +49,7 @@
49
49
  "registry": "https://registry.npmjs.org/"
50
50
  },
51
51
  "dependencies": {
52
- "@onexapis/core": "^1.0.14",
52
+ "@onexapis/core": "^1.0.16",
53
53
  "@tanstack/react-query": "^5.90.16",
54
54
  "adm-zip": "^0.5.16",
55
55
  "archiver": "^7.0.1",
@@ -16,8 +16,10 @@ export const forgotPasswordPageConfig: Omit<
16
16
  themeId: "my-simple",
17
17
  editable: true,
18
18
  published: true,
19
- hideHeader: true,
20
- hideFooter: true,
19
+ metadata: {
20
+ hideHeader: true,
21
+ hideFooter: true,
22
+ },
21
23
 
22
24
  seo: {
23
25
  title: "Forgot Password",
@@ -16,8 +16,10 @@ export const loginPageConfig: Omit<
16
16
  themeId: "my-simple",
17
17
  editable: true,
18
18
  published: true,
19
- hideHeader: true,
20
- hideFooter: true,
19
+ metadata: {
20
+ hideHeader: true,
21
+ hideFooter: true,
22
+ },
21
23
 
22
24
  seo: {
23
25
  title: "Sign In",
@@ -16,8 +16,10 @@ export const registerPageConfig: Omit<
16
16
  themeId: "my-simple",
17
17
  editable: true,
18
18
  published: true,
19
- hideHeader: true,
20
- hideFooter: true,
19
+ metadata: {
20
+ hideHeader: true,
21
+ hideFooter: true,
22
+ },
21
23
 
22
24
  seo: {
23
25
  title: "Create Account",
@@ -16,8 +16,10 @@ export const verifyCodePageConfig: Omit<
16
16
  themeId: "my-simple",
17
17
  editable: true,
18
18
  published: true,
19
- hideHeader: true,
20
- hideFooter: true,
19
+ metadata: {
20
+ hideHeader: true,
21
+ hideFooter: true,
22
+ },
21
23
 
22
24
  seo: {
23
25
  title: "Verify Your Account",