@pack/react 0.0.2 → 0.0.4

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/index.d.ts CHANGED
@@ -2,5 +2,7 @@ import { RenderSections } from "./render-sections";
2
2
  import { PreviewProvider } from "./preview/preview-provider";
3
3
  import { usePreviewContext } from "./preview/preview-content";
4
4
  import { useSiteSettings } from "./use-site-settings";
5
- export { RenderSections, PreviewProvider, usePreviewContext, useSiteSettings };
5
+ import { registerSection } from "./register-section";
6
+ import { registerStorefrontSettingsSchema } from "./register-storefront-settings-schema";
7
+ export { registerSection, registerStorefrontSettingsSchema, usePreviewContext, useSiteSettings, PreviewProvider, RenderSections, };
6
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,iBAAiB,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AAEzF,OAAO,EACL,eAAe,EACf,gCAAgC,EAChC,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,cAAc,GACf,CAAC"}
package/dist/index.js CHANGED
@@ -2,4 +2,6 @@ import { RenderSections } from "./render-sections";
2
2
  import { PreviewProvider } from "./preview/preview-provider";
3
3
  import { usePreviewContext } from "./preview/preview-content";
4
4
  import { useSiteSettings } from "./use-site-settings";
5
- export { RenderSections, PreviewProvider, usePreviewContext, useSiteSettings };
5
+ import { registerSection } from "./register-section";
6
+ import { registerStorefrontSettingsSchema } from "./register-storefront-settings-schema";
7
+ export { registerSection, registerStorefrontSettingsSchema, usePreviewContext, useSiteSettings, PreviewProvider, RenderSections, };
@@ -25,7 +25,7 @@ export function RenderSections({ content }) {
25
25
  const { content: liveContent, storefrontSettings } = useCustomizerShell({
26
26
  environment: 'production',
27
27
  isPreview,
28
- sectionMap,
28
+ sectionComponents: sectionMap,
29
29
  data: {
30
30
  content,
31
31
  template: content.template?.type,
@@ -10,8 +10,8 @@ export const useCustomizerShell = ({ environment = 'production', isPreview, sect
10
10
  const refreshSections = useCallback(() => {
11
11
  if (!sectionComponents || !parentConnection)
12
12
  return [];
13
- const sectionSchemas = sectionComponents
14
- .map((section) => {
13
+ const sectionSchemas = Array.from(sectionComponents)
14
+ .map(([, section]) => {
15
15
  return typeof section.Schema === 'function'
16
16
  ? section.Schema(data)
17
17
  : section.Schema;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pack/react",
3
3
  "description": "React",
4
- "version": "0.0.2",
4
+ "version": "0.0.4",
5
5
  "exports": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "engines": {