@pack/react 0.0.14-canary.0 → 0.0.14-canary.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"render-sections.d.ts","sourceRoot":"","sources":["../src/render-sections.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAyClD,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,EAAE,GAAG,4BAiC9C"}
1
+ {"version":3,"file":"render-sections.d.ts","sourceRoot":"","sources":["../src/render-sections.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AA0ClD,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,EAAE,GAAG,4BA+B9C"}
@@ -5,7 +5,7 @@ import { sectionMap } from "./register-section";
5
5
  import { storefrontSettingsSchema } from "./register-storefront-settings-schema";
6
6
  function Sections({ sections }) {
7
7
  const renderedSections = useMemo(() => {
8
- console.log('sections', sections);
8
+ console.log('DEBUG: sections', sections);
9
9
  return sections
10
10
  .map((section) => {
11
11
  // TODO: Return a consistent data structure from the API and the customizer
@@ -16,6 +16,7 @@ function Sections({ sections }) {
16
16
  data.dataSource = section.dataSource;
17
17
  const schemaKey = data._template;
18
18
  const Component = sectionMap.get(schemaKey);
19
+ console.log('DEBUG: Component', Component);
19
20
  if (!Component)
20
21
  return null;
21
22
  return (React.createElement("section", { key: key, "data-comp": schemaKey, "data-comp-id": key, hidden: data?.sectionVisibility === "hidden" },
@@ -27,7 +28,6 @@ function Sections({ sections }) {
27
28
  }
28
29
  export function RenderSections({ content }) {
29
30
  const { isPreview, setPreviewStorefrontSettings } = usePreviewContext();
30
- console.log('test 123');
31
31
  const { content: liveContent, storefrontSettings } = useCustomizerShell({
32
32
  environment: "production",
33
33
  isPreview,
@@ -47,7 +47,7 @@ export function RenderSections({ content }) {
47
47
  setPreviewStorefrontSettings({ settings: storefrontSettings });
48
48
  }, [setPreviewStorefrontSettings, storefrontSettings]);
49
49
  const sections = useMemo(() => {
50
- console.log('live content', liveContent?.sections?.nodes || liveContent?.sections);
50
+ console.log('DEBUG: liveContent', liveContent?.sections?.nodes || liveContent?.sections);
51
51
  return liveContent?.sections?.nodes || liveContent?.sections;
52
52
  }, [liveContent?.sections]);
53
53
  if (!sections)
@@ -93,7 +93,7 @@ export const useCustomizerShell = ({ environment = "production", isPreview, sect
93
93
  useEffect(() => {
94
94
  if (!isPreview)
95
95
  return;
96
- console.log('refreshing sections');
96
+ console.log('DEBUG: refreshing sections');
97
97
  refreshSections();
98
98
  refreshStorefrontSettingsSchema();
99
99
  }, [
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pack/react",
3
3
  "description": "React",
4
- "version": "0.0.14-canary.0",
4
+ "version": "0.0.14-canary.1",
5
5
  "exports": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "engines": {