@onexapis/cli 1.1.49 → 1.1.51
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/cli.js +34 -1
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +34 -1
- package/dist/cli.mjs.map +1 -1
- package/dist/index.js +34 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -1
- package/dist/index.mjs.map +1 -1
- package/dist/preview/preview-app.tsx +6 -2
- package/package.json +2 -2
|
@@ -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,7 +724,7 @@ 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 (top-level or metadata) */}
|
|
727
|
+
{/* Header — hidden if page config sets hideHeader: true (top-level or metadata) */}
|
|
724
728
|
{headerSections.length > 0 &&
|
|
725
729
|
!currentPage.config?.hideHeader &&
|
|
726
730
|
!currentPage.config?.metadata?.hideHeader && (
|
|
@@ -730,7 +734,7 @@ function PreviewApp() {
|
|
|
730
734
|
{/* Page sections */}
|
|
731
735
|
<main>{pageSections.map(renderSection)}</main>
|
|
732
736
|
|
|
733
|
-
{/* Footer — hidden if page config sets hideFooter (top-level or metadata) */}
|
|
737
|
+
{/* Footer — hidden if page config sets hideFooter: true (top-level or metadata) */}
|
|
734
738
|
{footerSections.length > 0 &&
|
|
735
739
|
!currentPage.config?.hideFooter &&
|
|
736
740
|
!currentPage.config?.metadata?.hideFooter && (
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onexapis/cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.51",
|
|
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.
|
|
52
|
+
"@onexapis/core": "^1.0.17",
|
|
53
53
|
"@tanstack/react-query": "^5.90.16",
|
|
54
54
|
"adm-zip": "^0.5.16",
|
|
55
55
|
"archiver": "^7.0.1",
|